| | |
| | | "fastq": "^1.6.0" |
| | | } |
| | | }, |
| | | "@popperjs/core": { |
| | | "version": "npm:@sxzz/popperjs-es@2.11.7", |
| | | "resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", |
| | | "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" |
| | | }, |
| | | "@soda/friendly-errors-webpack-plugin": { |
| | | "version": "1.8.0", |
| | | "resolved": "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.8.0.tgz?cache=0&sync_timestamp=1607927406873&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40soda%2Ffriendly-errors-webpack-plugin%2Fdownload%2F%40soda%2Ffriendly-errors-webpack-plugin-1.8.0.tgz", |
| | |
| | | "webpack-chain": "^6.4.0", |
| | | "webpack-dev-server": "^3.11.0", |
| | | "webpack-merge": "^4.2.2" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "@vue/cli-shared-utils": { |
| | |
| | | "lodash-unified": "^1.0.2", |
| | | "memoize-one": "^6.0.0", |
| | | "normalize-wheel-es": "^1.2.0" |
| | | }, |
| | | "dependencies": { |
| | | "@popperjs/core": { |
| | | "version": "npm:@sxzz/popperjs-es@2.11.7", |
| | | "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", |
| | | "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" |
| | | } |
| | | } |
| | | }, |
| | | "elliptic": { |
| | |
| | | "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz", |
| | | "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", |
| | | "dev": true |
| | | } |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | public enum TaskTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// 颿åºåº |
| | | /// </summary> |
| | | [Description("颿åºåº")] |
| | | Outbound = 100, |
| | | |
| | | /// <summary> |
| | | /// çç¹åºåº |
| | | /// </summary> |
| | | [Description("çç¹åºåº")] |
| | |
| | | OutEmpty = 130, |
| | | |
| | | /// <summary> |
| | | /// äºæ¥¼ç©ºæå çåºåº |
| | | /// </summary> |
| | | [Description("äºæ¥¼ç©ºæå çåºåº")] |
| | | OutEmptyPlate = 140, |
| | | |
| | | /// <summary> |
| | | /// æååºåº |
| | | /// </summary> |
| | | [Description("æååºåº")] |
| | | OutProduct = 230, |
| | | |
| | | /// <summary> |
| | | /// åæèååºåº |
| | | /// èååºåº |
| | | /// </summary> |
| | | [Description("åæèååºåº")] |
| | | [Description("èååºåº")] |
| | | OldYLOutbound = 300, |
| | | |
| | | /// <summary> |
| | | /// åæå°å·åºåº |
| | | /// å°å·åºåº |
| | | /// </summary> |
| | | [Description("åæå°å·åºåº")] |
| | | [Description("å°å·åºåº")] |
| | | PrintYLOutbound = 310, |
| | | |
| | | /// <summary> |
| | | /// åæçº¸è¢å¶è¢ä¾æ |
| | | /// çº¸å¼ æ·èåºåº |
| | | /// </summary> |
| | | [Description("åæçº¸è¢å¶è¢ä¾æ")] |
| | | [Description("çº¸å¼ æ·èåºåº")] |
| | | OutPaperLM = 320, |
| | | |
| | | /// <summary> |
| | | /// 纸è¢å¶è¢ä¾æ |
| | | /// </summary> |
| | | [Description("纸è¢å¶è¢ä¾æ")] |
| | | PaperYLOutZDGL = 330, |
| | | |
| | | /// <summary> |
| | | /// æ 纺å¸å¶è¢ä¾æ |
| | | /// </summary> |
| | | [Description("æ 纺è¢å¶è¢ä¾æ")] |
| | | OutWFBGL = 340, |
| | | |
| | | /// <summary> |
| | | /// è¾
ææ çººå¸åºåº |
| | |
| | | OutWFBLM = 370, |
| | | |
| | | /// <summary> |
| | | /// çº¸å¼ æ·èåºåº |
| | | /// </summary> |
| | | [Description("çº¸å¼ æ·èåºåº")] |
| | | OutPaperLM = 380, |
| | | |
| | | /// <summary> |
| | | /// å²ååºåºåº |
| | | /// </summary> |
| | | [Description("å²ååºåºåº")] |
| | |
| | | /// </summary> |
| | | [Description("åååºåºåº")] |
| | | OutFenQie = 410, |
| | | |
| | | /// <summary> |
| | | /// æ 纺å¸å¶è¢ä¾æ |
| | | /// </summary> |
| | | [Description("æ 纺è¢å¶è¢ä¾æ")] |
| | | OutWFBGL = 420, |
| | | |
| | | /// <summary> |
| | | /// éè´å
¥åº |
| | |
| | | EmptyProductBack = 630, |
| | | |
| | | /// <summary> |
| | | /// åæå°å·åæåå
¥åº |
| | | /// æ 纺å¸åæåå
¥åº |
| | | /// </summary> |
| | | [Description("åæå°å·åæåå
¥åº")] |
| | | [Description("æ 纺å¸åæåå
¥åº")] |
| | | WFBYLInbound = 700, |
| | | |
| | | /// <summary> |
| | | /// çº¸å¼ æ·èåæåå
¥åº |
| | | /// </summary> |
| | | [Description("çº¸å¼ æ·èåæåå
¥åº")] |
| | | PaperFilmInbound = 705, |
| | | |
| | | /// <summary> |
| | | /// å°å·åæåå
¥åº |
| | | /// </summary> |
| | | [Description("å°å·åæåå
¥åº")] |
| | | PrintYLInbound = 710, |
| | | |
| | | /// <summary> |
| | | /// åæå°å·ä½æéåº |
| | | /// æ çººå¸æ·è使éåº |
| | | /// </summary> |
| | | [Description("åæå°å·ä½æéåº")] |
| | | [Description("æ çººå¸æ·è使éåº")] |
| | | WFBLMYLBackInbound = 715, |
| | | |
| | | /// <summary> |
| | | /// å°å·ä½æéåº |
| | | /// </summary> |
| | | [Description("å°å·ä½æéåº")] |
| | | PrintYLBackInbound = 720, |
| | | |
| | | /// <summary> |
| | | /// åæå°å·ä½æéåº |
| | | /// çº¸å¼ æ·è使éåº |
| | | /// </summary> |
| | | [Description("åæçº¸è¢ä½æéåº")] |
| | | [Description("çº¸å¼ æ·è使éåº")] |
| | | PaperFilmYLBackInbound = 725, |
| | | |
| | | /// <summary> |
| | | /// 纸è¢ä½æéåº |
| | | /// </summary> |
| | | [Description("纸è¢ä½æéåº")] |
| | | PaperYLBackInbound = 730, |
| | | |
| | | /// <summary> |
| | | /// åæèåéåº |
| | | /// åå使éåº |
| | | /// </summary> |
| | | [Description("åæèåéåº")] |
| | | [Description("åå使éåº")] |
| | | PartOffYLBackInbound = 735, |
| | | |
| | | /// <summary> |
| | | /// èåéåº |
| | | /// </summary> |
| | | [Description("èåéåº")] |
| | | PaperOldYLBackInbound = 740, |
| | | |
| | | /// <summary> |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_Model.Models.PackInfo; |
| | | |
| | | namespace WIDESEAWCS_IPackInfoRepository |
| | | { |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Model.Models.PackInfo; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_PackInfoService |
| | | { |
| | |
| | | WebResponseContent ReceiveWMSTask([NotNull] List<WMSTaskDTO> taskDTOs); |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æçå·ãèµ·å§å°ååWMS请æ±ä»»å¡ |
| | | /// æ ¹æ®ç»ç¹å°ååWMS请æ±ä»»å¡ |
| | | /// </summary> |
| | | /// <param name="palletCode">æçå·</param> |
| | | /// <param name="sourceAddress">èµ·å§å°å</param> |
| | | /// <returns></returns> |
| | | WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string materielBoxCode = ""); |
| | | WebResponseContent RequestPlateOutTask(string targetAddress); |
| | | |
| | | /// <summary> |
| | | /// 请æ±åæå
¥åº |
| | | /// </summary> |
| | |
| | | /// <param name="sourceAddress">èµ·å§å°å</param> |
| | | /// /// <param name="roadWay">å··é</param> |
| | | /// <returns></returns> |
| | | WebResponseContent RequestWMSTaskSimple(string palletCode, string sourceAddress, string roadWay="", int taskType = 630,int taskNum=0,string targetAddress=""); |
| | | WebResponseContent RequestWMSTaskSimple(string palletCode, string sourceAddress, string roadWay="", int taskType = 630); |
| | | //ä¸ä¼ æ¡ç |
| | | |
| | | WebResponseContent MESBoxCodeNotice(string boxCode); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_PackType), "ç åç±»å")] |
| | | public class Dt_PackType : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç åååé¿åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ç åååé¿åº¦")] |
| | | public int PackLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç ååå宽度 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "ç ååå宽度")] |
| | | public string PackWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç åååé«åº¦ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ç åååé«åº¦")] |
| | | public int PackHeight { get; set; } |
| | | } |
| | | } |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models.PackInfo |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_Packaxis), "ç ååæ ")] |
| | | public class Dt_Packaxis : BaseEntity |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #region << ç æ¬ 注 é >> |
| | | /*---------------------------------------------------------------- |
| | | * å½å空é´ï¼WIDESEAWCS_Model.Models.TaskInfo |
| | | * å建è
ï¼è¡ç«¥åº |
| | | * å建æ¶é´ï¼2024/8/2 16:13:36 |
| | | * çæ¬ï¼V1.0.0 |
| | | * æè¿°ï¼ |
| | | * |
| | | * ---------------------------------------------------------------- |
| | | * ä¿®æ¹äººï¼ |
| | | * ä¿®æ¹æ¶é´ï¼ |
| | | * çæ¬ï¼V1.0.1 |
| | | * ä¿®æ¹è¯´æï¼ |
| | | * |
| | | *----------------------------------------------------------------*/ |
| | | #endregion << ç æ¬ 注 é >> |
| | | |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.Attributes; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_PackaxisTask), "ç åä»»å¡ä¿¡æ¯"), SugarIndex("unique_pack_taskNum", nameof(PackTaskNum), OrderByType.Asc, true)] |
| | | public class Dt_PackaxisTask : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [ImporterHeader(Name = "主é®")] |
| | | [ExporterHeader(DisplayName = "主é®")] |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int PackTaskId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç åä»»å¡å· |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ç åä»»å¡å·")] |
| | | [ExporterHeader(DisplayName = "ç åä»»å¡å·")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç åä»»å¡å·")] |
| | | public int PackTaskNum { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®±ç |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ç®±ç ")] |
| | | [ExporterHeader(DisplayName = "ç®±ç ")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç®±ç ")] |
| | | public string BoxCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "设å¤ç¼å·")] |
| | | public string DeviceCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡ç±»å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä»»å¡ç±»å")] |
| | | [ExporterHeader(DisplayName = "ä»»å¡ç±»å")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»»å¡ç±»å")] |
| | | public int TaskType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡ç¶æ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä»»å¡ç¶æ")] |
| | | [ExporterHeader(DisplayName = "ä»»å¡ç¶æ")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»»å¡ç¶æ")] |
| | | public int TaskState { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èµ·å§å°å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "èµ·å§å°å")] |
| | | [ExporterHeader(DisplayName = "èµ·å§å°å")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "èµ·å§å°å")] |
| | | public string SourceAddress { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®æ å°å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ç®æ å°å")] |
| | | [ExporterHeader(DisplayName = "ç®æ å°å")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç®æ å°å")] |
| | | public string TargetAddress { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å½åä½ç½® |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å½åä½ç½®")] |
| | | [ExporterHeader(DisplayName = "å½åä½ç½®")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å½åä½ç½®")] |
| | | public string CurrentAddress { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¸ä¸å°å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¸ä¸å°å")] |
| | | [ExporterHeader(DisplayName = "ä¸ä¸å°å")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ä¸ä¸å°å")] |
| | | public string NextAddress { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 箱类å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "箱类å")] |
| | | [ExporterHeader(DisplayName = "箱类å")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "箱类å")] |
| | | public int PackType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡ä¸åæ¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä»»å¡ä¸åæ¶é´")] |
| | | [ExporterHeader(DisplayName = "ä»»å¡ä¸åæ¶é´")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä»»å¡ä¸åæ¶é´")] |
| | | public DateTime? Dispatchertime { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | public class Dt_PackaxisTask_Hty : Dt_PackaxisTask, IBaseHistoryEntity |
| | | { |
| | | public int SourceId { get; set; } |
| | | |
| | | public string OperateType { get; set; } |
| | | |
| | | public DateTime InsertTime { get; set; } |
| | | } |
| | | } |
| | |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_IPackInfoRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_Model.Models.PackInfo; |
| | | |
| | | namespace WIDESEAWCS_PackInfoRepository |
| | | { |
| | |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_IPackInfoRepository; |
| | | using WIDESEAWCS_Model.Models.PackInfo; |
| | | using WIDESEAWCS_PackInfoRepository; |
| | | using Magicodes.ExporterAndImporter.Core.Models; |
| | | using Magicodes.ExporterAndImporter.Excel; |
| | | using WIDESEAWCS_Common.Utilities; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_PackInfoService |
| | | { |
| | |
| | | _taskService.UpdateTask(task, TaskStatusEnum.AGV_Finish); |
| | | PutFinish(oldAddress, task.TaskNum); |
| | | } |
| | | else if (task.TaskType == TaskTypeEnum.WFBLMYLBackInbound.ObjToInt() || task.TaskType == TaskTypeEnum.WFBYLInbound.ObjToInt()) |
| | | { |
| | | _taskService.TaskCompleted(task.TaskNum); |
| | | } |
| | | else |
| | | { |
| | | task.CurrentAddress = dt_Station.StationCode; |
| | |
| | | using WIDESEAWCS_DTO.TaskInfo; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_Model.Models.PackInfo; |
| | | using WIDESEAWCS_PackInfoService; |
| | | using WIDESEAWCS_Tasks; |
| | | |
| | |
| | | //å
¥åº |
| | | if (taskTypeGroup == TaskTypeGroup.InboundGroup) |
| | | { |
| | | task.CurrentAddress = router.StartPosi; |
| | | task.NextAddress = router.NextPosi; |
| | | task.DeviceCode = router.ChildPosiDeviceCode; |
| | | if (router.NextPosi == "AGV" && router.StartPosi=="AGV") |
| | | { |
| | | task.CurrentAddress = item.SourceAddress; |
| | | task.NextAddress = item.TargetAddress; |
| | | task.DeviceCode = router.ChildPosiDeviceCode; |
| | | } |
| | | else |
| | | { |
| | | task.CurrentAddress = router.StartPosi; |
| | | task.NextAddress = router.NextPosi; |
| | | task.DeviceCode = router.ChildPosiDeviceCode; |
| | | } |
| | | } |
| | | else //åºåº |
| | | { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æçå·ãèµ·å§å°ååWMS请æ±ä»»å¡ |
| | | /// æ ¹æ®ç»ç¹å°ååWMS请æ±ä»»å¡ |
| | | /// </summary> |
| | | /// <param name="palletCode">æçå·</param> |
| | | /// <param name="sourceAddress">èµ·å§å°å</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string materielBoxCode = "") |
| | | public WebResponseContent RequestPlateOutTask(string targetAddress) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == sourceAddress); |
| | | Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == targetAddress); |
| | | if (stationManger == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç«å°ä¿¡æ¯"); |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°WMSApiå°å"); |
| | | } |
| | | string responseStr = ""; |
| | | if (!string.IsNullOrEmpty(materielBoxCode)) |
| | | { |
| | | responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={stationManger.StackerCraneCode}&palletCode={palletCode}&materielBoxCode={materielBoxCode}"); |
| | | } |
| | | else |
| | | { |
| | | responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={stationManger.StackerCraneCode}&palletCode={palletCode}"); |
| | | } |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); |
| | | if (responseContent != null && responseContent.Status && responseContent.Data != null) |
| | | { |
| | | WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString()); |
| | | if (taskDTO != null) |
| | | { |
| | | content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); |
| | | } |
| | | } |
| | | string responseStr = HttpHelper.Get($"{address}/api/Task/PlateOutbound?stationCode={targetAddress}"); |
| | | |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr) ?? throw new Exception("ç»æè¿å为空"); |
| | | |
| | | content = responseContent; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error(ex.Message); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°WMSApiå°å"); |
| | | } |
| | | string responseStr = HttpHelper.Get($"{address}/api/Task/RequestYLWMSTaskSimple?stationCode={sourceAddress}&palletCode={palletCode}&taskNum{taskNum}"); |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr) ?? throw new Exception("ç»æè¿å为空"); |
| | | if (responseContent != null && responseContent.Status && responseContent.Data != null) |
| | | { |
| | | WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString()); |
| | |
| | | } |
| | | else |
| | | { |
| | | content = responseContent ?? content.Error("ç»æé误"); |
| | | content = responseContent; |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error(ex.Message); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | |
| | | /// </summary> |
| | | public WebResponseContent YLPurchaseBoxing(string palletCode, decimal weight = 0, decimal thickness = 0, decimal wide = 0,string stationCode="") |
| | | { |
| | | WebResponseContent? content = new WebResponseContent(); |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | string address = AppSettings.Get("WMSApiAddress"); |
| | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°WMSApiå°å"); |
| | | } |
| | | string responseStr = HttpHelper.Get($"{address}/api/Task/YLPurchaseBoxing?palletCode={palletCode}&weight={weight}&thickness={thickness}&wide={wide}&stationCode={stationCode}"); |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr) ?? throw new Exception("ç»æè¿å为空"); |
| | | |
| | | content = responseContent; |
| | | |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error(ex.Message); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°WMSApiå°å"); |
| | | } |
| | | string responseStr = HttpHelper.Get($"{address}/api/Task/AssignYLRoadwayNo?palletCode={palletCode}&wide={wide}&thickness={thickness}&weight={weight}"); |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); |
| | | if (responseContent != null && responseContent.Status && responseContent.Data != null) |
| | | { |
| | | content = responseContent; |
| | | } |
| | | |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr) ?? throw new Exception("ç»æè¿å为空"); |
| | | |
| | | content = responseContent; |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error(ex.Message); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | |
| | | /// <param name="sourceAddress">èµ·å§å°å</param> |
| | | /// /// <param name="roadWay">å··é</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent RequestWMSTaskSimple(string palletCode, string sourceAddress,string roadWay="", int taskType=630, int taskNum = 0, string targetAddress = "") |
| | | public WebResponseContent RequestWMSTaskSimple(string palletCode, string sourceAddress,string roadWay="", int taskType=630) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | //string address = AppSettings.Get("WMSApiAddress"); |
| | | //if (string.IsNullOrEmpty(address)) |
| | | //{ |
| | | // return WebResponseContent.Instance.Error($"æªæ¾å°WMSApiå°å"); |
| | | //} |
| | | //string responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTaskSimple?stationCode={sourceAddress}&palletCode={palletCode}"); |
| | | //WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); |
| | | //if (responseContent != null && responseContent.Status && responseContent.Data != null) |
| | | //{ |
| | | // WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString()); |
| | | // if (taskDTO != null) |
| | | // { |
| | | WMSTaskDTO? taskDTO = new WMSTaskDTO() |
| | | string address = AppSettings.Get("WMSApiAddress"); |
| | | if (string.IsNullOrEmpty(address)) |
| | | { |
| | | TaskNum = taskNum ==0 ? DateTime.Now.ToString("mmss").ObjToInt(): taskNum, |
| | | PalletCode= palletCode, |
| | | RoadWay= roadWay, |
| | | TaskType= taskType, |
| | | PalletType=1, |
| | | TaskStatus= TaskStatusEnum.New.ObjToInt(), |
| | | SourceAddress= sourceAddress, |
| | | TargetAddress= targetAddress, |
| | | WarehouseId=2, |
| | | Grade=0, |
| | | }; |
| | | content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); |
| | | // } |
| | | //} |
| | | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°WMSApiå°å"); |
| | | } |
| | | string responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTaskSimple?stationCode={sourceAddress}&palletCode={palletCode}"); |
| | | WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr) ?? throw new Exception("ç»æè¿å为空"); |
| | | if (responseContent != null && responseContent.Status && responseContent.Data != null) |
| | | { |
| | | WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString()); |
| | | if (taskDTO != null) |
| | | { |
| | | content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | content = responseContent; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | if (string.IsNullOrEmpty(task.Roadway) && string.IsNullOrEmpty(task.NextAddress)) |
| | | { |
| | | WebResponseContent content = _taskService.AssignYLRoadwayNo(task.PalletCode,weight: conveyorLineInfoRead.WR_Weight, thickness: conveyorLineInfoRead.WR_Height, wide: conveyorLineInfoRead.WR_Width); |
| | | if (!content.Status) |
| | | if (content.Status) |
| | | { |
| | | string roadWay = content.Data.ToString(); |
| | | //è·åè·¯ç±é
ç½® |
| | | List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && task.CurrentAddress == x.StartPosi && x.ChildPosiDeviceCode == roadWay); |
| | | Dt_Router router = routers.FirstOrDefault(); |
| | | if (router == null) |
| | | { |
| | | WriteError(item.StationName, $"ä»»å¡å·:{task.TaskNum}æªæ¾å°è·¯ç±é
置信æ¯"); |
| | | return Task.CompletedTask; |
| | | } |
| | | task.Roadway = roadWay; |
| | | task.NextAddress = router.NextPosi; |
| | | _taskService.UpdateTask(task, TaskStatusEnum.AGV_Finish); |
| | | } |
| | | else |
| | | { |
| | | WriteError(item.StationCode, $"请æ±å
¥åºå¤±è´¥ï¼{content.Message}"); |
| | | } |
| | | string roadWay = content.Data.ToString(); |
| | | //è·åè·¯ç±é
ç½® |
| | | List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && task.CurrentAddress == x.StartPosi && x.ChildPosiDeviceCode== roadWay); |
| | | Dt_Router router = routers.FirstOrDefault(); |
| | | if (router == null) |
| | | { |
| | | WriteError(item.StationName, $"ä»»å¡å·:{task.TaskNum}æªæ¾å°è·¯ç±é
置信æ¯"); |
| | | return Task.CompletedTask; |
| | | } |
| | | task.Roadway = roadWay; |
| | | task.NextAddress = router.NextPosi; |
| | | _taskService.UpdateTask(task,TaskStatusEnum.AGV_Finish); |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | agvTaskSend.Variables.FirstOrDefault(x => x.Code == "FHMH").Value = "0"; |
| | | agvTaskSend.Variables.FirstOrDefault(x => x.Code == "GoodPoint").Value = ""; |
| | | //å¤æäººå·¥æå¨ |
| | | //å¤æäººå·¥æå¨ 1 éæ¾è´§å®æ 2éåè´§å®æ 3 åè´§å®æåæ¾è´§å®æé½éè¦ 0 åè´§æ¾è´§å®æé½ä¸éè¦ |
| | | PointDetail complete = new(); |
| | | if (stationMangerStart.IsManual==1 && stationMangerEnd.IsManual==0) |
| | | { |
| | |
| | | { |
| | | R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress); |
| | | //äºæ¥¼å
¥åºæ«ç 请æ±å·¥ä½ |
| | | if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 5 && conveyorLineInfoRead.TaskNo > 0)//&& !string.IsNullOrEmpty(conveyorLineInfoRead.PalletCode) todo临æ¶å 餿¡ä»¶éå¶ |
| | | if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 5 && conveyorLineInfoRead.TaskNo > 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.PalletCode)) |
| | | { |
| | | //æ¥æ¾å¯¹åºä»»å¡ |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | //åé
å··é åå
¥æçæ°æ® |
| | | //string roadWay = _taskService.AssignCPRoadwayNo().Data.ToString(); |
| | | //if (!string.IsNullOrEmpty(roadWay)) |
| | | //{ |
| | | |
| | | //} |
| | | Dt_StationManger stationManger = stationMangers.FirstOrDefault(x => x.StationCode == task.SourceAddress); |
| | | if (stationManger != null) |
| | | string roadWay = _taskService.AssignCPRoadwayNo().Data.ToString(); |
| | | if (!string.IsNullOrEmpty(roadWay)) |
| | | { |
| | | string roadWay = ""; |
| | | switch (stationManger.AGVStationCode.ObjToInt() % 5) |
| | | List<Dt_Router> routers = _routerService.QueryNextRoutes(item.StationCode, roadWay, task.TaskType); |
| | | Dt_Router? router = routers.FirstOrDefault(); |
| | | if (routers == null || routers.Count == 0 || router == null) |
| | | { |
| | | case 1: |
| | | roadWay = "SC01_CP"; |
| | | break; |
| | | case 2: |
| | | roadWay = "SC02_CP"; |
| | | break; |
| | | case 3: |
| | | roadWay = "SC03_CP"; |
| | | break; |
| | | case 4: |
| | | roadWay = "SC04_CP"; |
| | | break; |
| | | case 0: |
| | | roadWay = "SC05_CP"; |
| | | break; |
| | | default: |
| | | WriteError(item.StationName, $"æªæ¾å°å¯åé
å··é{task.TaskNum}"); |
| | | break; |
| | | WriteError(item.StationName, $"æªæ¾å°å¯¹åºè·¯ç±ä¿¡æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | if (!string.IsNullOrEmpty(roadWay)) |
| | | if (routers.Count > 1) |
| | | { |
| | | List<Dt_Router> routers = _routerService.QueryNextRoutes(item.StationCode, roadWay, task.TaskType); |
| | | Dt_Router? router = routers.FirstOrDefault(); |
| | | if (routers == null || routers.Count == 0 || router == null) |
| | | { |
| | | WriteError(item.StationName, $"æªæ¾å°å¯¹åºè·¯ç±ä¿¡æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | if (routers.Count > 1) |
| | | { |
| | | WriteError(item.StationName, $"è·¯ç±ä¿¡æ¯é
ç½®é误,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | device.SetValue(W_ConveyorLineCPDB.W_TargetAddress, router.NextPosi, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.W_TaskNo, task.TaskNum, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.W_Command, 1, item.StationCode); |
| | | task.CurrentAddress = item.StationCode; |
| | | task.NextAddress = router.NextPosi; |
| | | task.PalletCode = DateTime.Now.ToString("yyMMddHHmmss");//todoä¸´æ¶ |
| | | task.Roadway = roadWay; |
| | | task.DeviceCode = router.ChildPosiDeviceCode; |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing); |
| | | WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}ä¸ä¸æ¥"); |
| | | WriteError(item.StationName, $"è·¯ç±ä¿¡æ¯é
ç½®é误,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | device.SetValue(W_ConveyorLineCPDB.W_TargetAddress, router.NextPosi, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.W_TaskNo, task.TaskNum, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.W_Command, 1, item.StationCode); |
| | | task.CurrentAddress = item.StationCode; |
| | | task.NextAddress = router.NextPosi; |
| | | task.PalletCode = conveyorLineInfoRead.PalletCode; |
| | | task.Roadway = roadWay; |
| | | task.DeviceCode = router.ChildPosiDeviceCode; |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing); |
| | | WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}ä¸ä¸æ¥"); |
| | | } |
| | | else |
| | | { |
| | | WriteError(item.StationName, $"ä»»å¡å·:{task.TaskNum}æªæ¾å°å¯åé
å··é"); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && deviceProRead != null) |
| | | {//å
¥åºRGVæ¥é©³ä½äº¤äº |
| | | R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress); |
| | | if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && conveyorLineInfoRead.TaskNo > 0) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && task.CurrentAddress == x.StartPosi); |
| | | Dt_Router? router = routers.FirstOrDefault(); |
| | | if (routers == null || routers.Count == 0 || router == null) |
| | | { |
| | | WriteError(item.StationName, $"æªæ¾å°å¯¹åºè·¯ç±ä¿¡æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | if (routers.Count > 1) |
| | | { |
| | | WriteError(item.StationName, $"è·¯ç±ä¿¡æ¯é
ç½®é误,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | device.SetValue(W_ConveyorLineCPDB.W_Command, 2, item.StationCode); |
| | | task.NextAddress = router.NextPosi; |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing); |
| | | WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}ä¸ä¸æ¥"); |
| | | } |
| | | } |
| | | } |
| | | else if (item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() && deviceProRead != null) |
| | | {//å
¥åºRGVæ¥é©³ä½äº¤äº |
| | | {//äºæ¥¼åºåºå£è½¬AGVä»»å¡ |
| | | R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress); |
| | | if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 2 && conveyorLineInfoRead.TaskNo > 0) |
| | | { |
| | |
| | | else if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProRead != null && deviceProWrite != null) |
| | | { |
| | | R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress); |
| | | //æå䏿¥¼å
¥åºå£åå
¥å¯¹åºå
¥åºç«å°å°å |
| | | //æåäºæ¥¼å
¥åºå£åå
¥å¯¹åºå
¥åºç«å°å°å |
| | | if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && !string.IsNullOrEmpty(conveyorLineInfoRead.PalletCode)) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == conveyorLineInfoRead.PalletCode && x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.AGV_Finish.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | |
| | | } |
| | | } |
| | | } |
| | | else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && deviceProRead != null) |
| | | {//å
¥åºRGVæ¥é©³ä½äº¤äº |
| | | R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress); |
| | | if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && conveyorLineInfoRead.TaskNo > 0) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && task.CurrentAddress == x.StartPosi); |
| | | Dt_Router? router = routers.FirstOrDefault(); |
| | | if (routers == null || routers.Count == 0 || router == null) |
| | | { |
| | | WriteError(item.StationName, $"æªæ¾å°å¯¹åºè·¯ç±ä¿¡æ¯,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | if (routers.Count > 1) |
| | | { |
| | | WriteError(item.StationName, $"è·¯ç±ä¿¡æ¯é
ç½®é误,设å¤ç¼å·:{item.StationCode},ä»»å¡å·:{task.TaskNum}"); |
| | | continue; |
| | | } |
| | | device.SetValue(W_ConveyorLineCPDB.W_Command, 2, item.StationCode); |
| | | task.NextAddress = router.NextPosi; |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing); |
| | | WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}ä¸ä¸æ¥"); |
| | | } |
| | | } |
| | | } |
| | | else if (item.StationType == StationTypeEnum.StationType_StackingPlates.ObjToInt() && deviceProRead != null && deviceProWrite != null) |
| | | {//å çæºå·¥ä½å«æ |
| | | R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress); |
| | | |
| | | //if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 7 && conveyorLineInfoRead.TaskNo <= 0) |
| | | //{ |
| | | // Dt_Task task = _taskRepository.QueryFirst(x => x.TargetAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType)); |
| | | // if (task == null) |
| | | // { |
| | | // //请æ±ä»»å¡ |
| | | // WMSTaskDTO taskDTO = new WMSTaskDTO() |
| | | // { |
| | | // Id = 1, |
| | | // SourceAddress = "SC02_CP-001-064-001-01", |
| | | // TaskNum = DateTime.Now.ToString("mmss").ObjToInt(), |
| | | // PalletCode = "" + DateTime.Now.ToString("mmss"), |
| | | // RoadWay = "SC02_CP", |
| | | // TaskType = 160, |
| | | // TaskStatus = TaskStatusEnum.New.ObjToInt(), |
| | | // TargetAddress = item.StationCode, |
| | | // Grade = 0, |
| | | // WarehouseId = 1, |
| | | // PalletType = 1 |
| | | // }; |
| | | // WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}çæï¼ä¸ä¸æ¥"); |
| | | // _taskService.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); |
| | | // } |
| | | //} |
| | | ////å çä»»å¡å®æäº¤äº |
| | | //else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 8 && conveyorLineInfoRead.TaskNo > 0) |
| | | //{ |
| | | // Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | // if (task != null) |
| | | // { |
| | | // //ä»»å¡å®æ |
| | | // device.SetValue(W_ConveyorLineCPDB.W_Command, 2, item.StationCode); |
| | | // WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}å çä½åºåºå®æ"); |
| | | // } |
| | | //} |
| | | if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 7 && conveyorLineInfoRead.TaskNo <= 0) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TargetAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType)); |
| | | if (task == null) |
| | | { |
| | | //请æ±ä»»å¡ |
| | | WebResponseContent content = _taskService.RequestPlateOutTask(item.StationCode); |
| | | WriteInfo(item.StationName, $"äºæ¥¼ç©ºæå çåºåºä»»å¡çæ"); |
| | | } |
| | | } |
| | | //å çä»»å¡å®æäº¤äº |
| | | else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 8 && conveyorLineInfoRead.TaskNo > 0) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | //ä»»å¡å®æ |
| | | device.SetValue(W_ConveyorLineCPDB.W_Command, 2, item.StationCode); |
| | | _taskService.TaskCompleted(task.TaskNum); |
| | | WriteInfo(item.StationName, $"ä»»å¡å·{conveyorLineInfoRead.TaskNo}å çåºåºå®æ"); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | //ç åç¯çº¿è¯·æ±ä»»å¡ |
| | | if (conveyorLineInfoRead != null && (conveyorLineInfoRead.R_State == 2 || conveyorLineInfoRead.R_State == 3) && conveyorLineInfoRead.R_TaskNo <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.R_BoxCode) && conveyorLineInfoRead.R_Request == 1) |
| | | { |
| | | |
| | | #region todo:临æ¶é»è¾ |
| | | //åå
¥æ§è¡æ°æ® |
| | | device.SetValue(W_CLineCPHDB.W_TaskNo, 100 + 5, RequestIn.StationCode); |
| | |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_Model.Models.PackInfo; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.ConveyorLine.Enum; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | |
| | | //æ´æ°ä»»å¡ä¿¡æ¯ |
| | | task.TaskState = TaskStatusEnum.Finish.ObjToInt(); |
| | | //_taskRepository.UpdateData(task); |
| | | //_taskService.TaskCompleted(task.TaskNum); |
| | | _taskService.TaskCompleted(task.TaskNum); |
| | | Thread.Sleep(1000); |
| | | WriteInfo(item.StationName, $"ä»»å¡å·{task.TaskNum}ç å"); |
| | | return Task.CompletedTask; |
| | |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "@popperjs/core": { |
| | | "version": "npm:@sxzz/popperjs-es@2.11.7", |
| | | "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", |
| | | "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" |
| | | }, |
| | | "@soda/friendly-errors-webpack-plugin": { |
| | | "version": "1.8.0", |
| | | "resolved": "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.8.0.tgz?cache=0&sync_timestamp=1607927406873&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40soda%2Ffriendly-errors-webpack-plugin%2Fdownload%2F%40soda%2Ffriendly-errors-webpack-plugin-1.8.0.tgz", |
| | |
| | | "webpack-chain": "^6.4.0", |
| | | "webpack-dev-server": "^3.11.0", |
| | | "webpack-merge": "^4.2.2" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "@vue/cli-shared-utils": { |
| | |
| | | "lodash-unified": "^1.0.2", |
| | | "memoize-one": "^6.0.0", |
| | | "normalize-wheel-es": "^1.2.0" |
| | | }, |
| | | "dependencies": { |
| | | "@popperjs/core": { |
| | | "version": "npm:@sxzz/popperjs-es@2.11.7", |
| | | "resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", |
| | | "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" |
| | | } |
| | | } |
| | | }, |
| | | "elliptic": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "vue-qrcode": { |
| | | "version": "2.2.2", |
| | | "resolved": "https://registry.npmmirror.com/vue-qrcode/-/vue-qrcode-2.2.2.tgz", |
| | |
| | | this.boxModel = true; |
| | | }, |
| | | async linkData(row, column) { |
| | | this.boxOptions.title = this.table.cnName + '(ç¼è¾)'; |
| | | this.boxOptions.title = this.table.cnName + '(æ¥ç)'; |
| | | //ç¹å»tableåå
æ ¼å¿«æ·é¾æ¥æ¾ç¤ºç¼è¾æ°æ® |
| | | this.currentAction = this.const.EDIT; |
| | | this.currentRow = row; |
| | |
| | | this.resetDetailTable(row); |
| | | this.setEditForm(row); |
| | | this.setContinueAdd(false); |
| | | this.boxButtons.forEach((btn) => { |
| | | if (btn.name == 'ä¿ å') { |
| | | btn.hidden = true; |
| | | //æè
设置åªè¯» |
| | | //btn.readonly=true; |
| | | } |
| | | }); |
| | | //设置è¿ç¨æ¥è¯¢è¡¨åçé»è®¤key/value |
| | | this.getRemoteFormDefaultKeyValue(); |
| | | //ç¹å»ç¼è¾æé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { //æ¡æ¶åå§åé
ç½®åï¼ |
| | | let EnableBtn = this.buttons.find(x => x.value == 'Enable'); |
| | | if (EnableBtn) { |
| | | EnableBtn.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | var keys = rows.map(x => { return x.id }); |
| | | this.http |
| | | .post("api/Task/EnableStatus", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success(x.message); |
| | | this.refresh(); |
| | | }); |
| | | } |
| | | } |
| | | let DisableBtn = this.buttons.find(x => x.value == 'Disable'); |
| | | if (DisableBtn) { |
| | | DisableBtn.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | var keys = rows.map(x => { return x.id }); |
| | | this.http |
| | | .post("api/Task/DisableStatus", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success(x.message); |
| | | this.refresh(); |
| | | }); |
| | | } |
| | | } |
| | | //示ä¾ï¼å¨æé®çæå颿·»å ä¸ä¸ªæé® |
| | | // this.buttons.unshift({ //ä¹å¯ä»¥ç¨pushæè
spliceæ¹æ³æ¥ä¿®æ¹buttonsæ°ç» |
| | | // name: 'æé®', //æé®åç§° |
| | |
| | | const searchFormFields = ref({ |
| | | aGVStationCode:"", |
| | | aGVStationHeight:"", |
| | | aGVFrontCode:"" |
| | | aGVFrontCode:"", |
| | | enable:"" |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | {title:"ç«ç¹ä¿¡æ¯", field:"aGVStationCode", type:"like"}, |
| | | {title:"MESç¹ä½", field:"mesPointCode", type:"flaot"}, |
| | | {title:"åºå", field:"stationArea",type:"select",dataKey:"agvStationAreaEnum",data:[]} |
| | | {title:"åºå", field:"stationArea",type:"select",dataKey:"agvStationAreaEnum",data:[]}, |
| | | { title: "æ¯å¦å ç¨", field: "isOccupied", type: "select", dataKey: "enable", data: [] }, |
| | | ] |
| | | ]); |
| | | const columns = ref([{field:'id',title:'主é®',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'}, |
| | |
| | | /// </summary> |
| | | [Description("ERPåæåå
¥åºæ¨é")] |
| | | ERPSemiProInUp, |
| | | /// <summary> |
| | | /// BSTç§°éåä¼ |
| | | /// </summary> |
| | | [Description("BSTç§°éåä¼ ")] |
| | | BSTWeightUp |
| | | } |
| | | } |
| | |
| | | /// äºæ¥¼æååºç¼ååº |
| | | /// </summary> |
| | | [Description("äºæ¥¼æååºç¼ååº")] |
| | | äºæ¥¼æååºç¼ååº = 18 |
| | | äºæ¥¼æååºç¼ååº = 18, |
| | | /// <summary> |
| | | /// 䏿¥¼æåæ¶ |
| | | /// </summary> |
| | | [Description("䏿¥¼æåæ¶")] |
| | | 䏿¥¼æåæ¶ = 19 |
| | | } |
| | | } |
| | |
| | | OutEmpty = 130, |
| | | |
| | | /// <summary> |
| | | /// äºæ¥¼ç©ºæå çåºåº |
| | | /// </summary> |
| | | [Description("äºæ¥¼ç©ºæå çåºåº")] |
| | | OutEmptyPlate = 140, |
| | | |
| | | /// <summary> |
| | | /// æååºåº |
| | | /// </summary> |
| | | [Description("æååºåº")] |
| | | OutProduct = 230, |
| | | |
| | | /// <summary> |
| | | /// åæèååºåº |
| | | /// èååºåº |
| | | /// </summary> |
| | | [Description("åæèååºåº")] |
| | | [Description("èååºåº")] |
| | | OldYLOutbound = 300, |
| | | |
| | | /// <summary> |
| | | /// åæå°å·åºåº |
| | | /// å°å·åºåº |
| | | /// </summary> |
| | | [Description("åæå°å·åºåº")] |
| | | [Description("å°å·åºåº")] |
| | | PrintYLOutbound = 310, |
| | | |
| | | /// <summary> |
| | |
| | | OutPaperLM = 320, |
| | | |
| | | /// <summary> |
| | | /// åæçº¸è¢å¶è¢ä¾æ |
| | | /// 纸è¢å¶è¢ä¾æ |
| | | /// </summary> |
| | | [Description("åæçº¸è¢å¶è¢ä¾æ")] |
| | | [Description("纸è¢å¶è¢ä¾æ")] |
| | | PaperYLOutZDGL = 330, |
| | | |
| | | /// <summary> |
| | |
| | | EmptyProductBack = 630, |
| | | |
| | | /// <summary> |
| | | /// åæå°å·åæåå
¥åº |
| | | /// æ 纺å¸åæåå
¥åº |
| | | /// </summary> |
| | | [Description("åæå°å·åæåå
¥åº")] |
| | | [Description("æ 纺å¸åæåå
¥åº")] |
| | | WFBYLInbound = 700, |
| | | |
| | | /// <summary> |
| | | /// çº¸å¼ æ·èåæåå
¥åº |
| | | /// </summary> |
| | | [Description("çº¸å¼ æ·èåæåå
¥åº")] |
| | | PaperFilmInbound = 705, |
| | | |
| | | /// <summary> |
| | | /// å°å·åæåå
¥åº |
| | | /// </summary> |
| | | [Description("å°å·åæåå
¥åº")] |
| | | PrintYLInbound = 710, |
| | | |
| | | /// <summary> |
| | | /// åæå°å·ä½æéåº |
| | | /// æ çººå¸æ·è使éåº |
| | | /// </summary> |
| | | [Description("åæå°å·ä½æéåº")] |
| | | [Description("æ çººå¸æ·è使éåº")] |
| | | WFBLMYLBackInbound = 715, |
| | | |
| | | /// <summary> |
| | | /// å°å·ä½æéåº |
| | | /// </summary> |
| | | [Description("å°å·ä½æéåº")] |
| | | PrintYLBackInbound = 720, |
| | | |
| | | /// <summary> |
| | | /// åæå°å·ä½æéåº |
| | | /// çº¸å¼ æ·è使éåº |
| | | /// </summary> |
| | | [Description("åæçº¸è¢ä½æéåº")] |
| | | [Description("çº¸å¼ æ·è使éåº")] |
| | | PaperFilmYLBackInbound = 725, |
| | | |
| | | /// <summary> |
| | | /// 纸è¢ä½æéåº |
| | | /// </summary> |
| | | [Description("纸è¢ä½æéåº")] |
| | | PaperYLBackInbound = 730, |
| | | |
| | | /// <summary> |
| | | /// åæèåéåº |
| | | /// åå使éåº |
| | | /// </summary> |
| | | [Description("åæèåéåº")] |
| | | [Description("åå使éåº")] |
| | | PartOffYLBackInbound = 735, |
| | | |
| | | /// <summary> |
| | | /// èåéåº |
| | | /// </summary> |
| | | [Description("èåéåº")] |
| | | PaperOldYLBackInbound = 740, |
| | | |
| | | /// <summary> |
| | |
| | | Status = true; |
| | | Message = message; |
| | | Data = data; |
| | | Datetime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"); |
| | | Datetime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); |
| | | return this; |
| | | } |
| | | |
| | |
| | | { |
| | | Status = false; |
| | | Message = message; |
| | | Datetime= DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"); |
| | | Datetime= DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); |
| | | return this; |
| | | } |
| | | } |
| | |
| | | { |
| | | httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json"); |
| | | using HttpClient httpClient = new HttpClient(); |
| | | httpClient.Timeout = new TimeSpan(0, 0, 60); |
| | | if (serviceAddress.Contains("cimforce/AtomJsonService")) |
| | | { |
| | | httpClient.Timeout = new TimeSpan(0, 0, 30); |
| | | } |
| | | httpClient.Timeout = new TimeSpan(0, 0, 30); |
| | | if (headers != null) |
| | | { |
| | | foreach (var header in headers) |
| | |
| | | /// <summary> |
| | | /// ç©æé |
| | | /// </summary> |
| | | [PropertyValidate("ç©æé", NotNullAndEmpty = true)] |
| | | public decimal Weight { get; set; } |
| | | [PropertyValidate("ç©æé", NotNullAndEmpty = false)] |
| | | public string Weight { get; set; } |
| | | /// <summary> |
| | | /// ç¶æ |
| | | /// </summary> |
| | |
| | | [PropertyValidate("计éåä½ï¼Kg:å
¬æ¤ãMï¼ç±³ãPcsï¼ä¸ª(åª)", NotNullAndEmpty = true)] |
| | | public string Unit { get; set; } |
| | | /// <summary> |
| | | /// 计éåä½ |
| | | /// è¾
åä½ |
| | | /// </summary> |
| | | [PropertyValidate("计éåä½ï¼Kg:å
¬æ¤ãMï¼ç±³ãPcsï¼ä¸ª(åª)", NotNullAndEmpty = true)] |
| | | [PropertyValidate("è¾
åä½ï¼Kg:å
¬æ¤ãMï¼ç±³ãPcsï¼ä¸ª(åª)", NotNullAndEmpty = true)] |
| | | public string AssistUnitCode { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO.ERP |
| | | { |
| | | /// <summary> |
| | | /// ç产æç¨æç» |
| | | /// </summary> |
| | | public class BSTWeightUpDTO |
| | | { |
| | | /// <summary> |
| | | /// å纸å¯ä¸ç¼ç |
| | | /// </summary> |
| | | public string Paper_code { get; set; } |
| | | /// <summary> |
| | | /// ç管é¢ä¼°éé |
| | | /// </summary> |
| | | public decimal Estimate_weight { get; set; } |
| | | /// <summary> |
| | | /// ç§°ééé |
| | | /// </summary> |
| | | public decimal Actual_weight { get; set; } |
| | | /// <summary> |
| | | /// 误差éé |
| | | /// </summary> |
| | | public decimal Error_weight { get; set; } |
| | | /// <summary> |
| | | /// ç§°éæ¶é´ |
| | | /// </summary> |
| | | public string Weigh_time { get; set; } |
| | | /// <summary> |
| | | /// æµè¯äººå |
| | | /// </summary> |
| | | public string Operator { get; set; } |
| | | /// <summary> |
| | | /// å纸é¨å¹
|
| | | /// </summary> |
| | | public decimal Width { get; set; } |
| | | /// <summary> |
| | | /// å
é |
| | | /// </summary> |
| | | public int Gram_weight { get; set; } |
| | | } |
| | | } |
| | |
| | | using WIDESEA_Common.APIEnum; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_External.Model; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_Model.Models; |
| | |
| | | |
| | | return response; |
| | | } |
| | | /// <summary> |
| | | /// BSTç§°éåä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public string BSTWeightUp(BSTWeightUpDTO bSTWeightUpDTO) |
| | | { |
| | | Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.BSTWeightUp.ToString() && x.Enable == WhetherEnum.True.ObjToInt()); |
| | | |
| | | Dictionary<string, string> headers = new Dictionary<string, string>{{ "X-API-Token", "300883" }}; |
| | | string request = JsonConvert.SerializeObject(bSTWeightUpDTO, settings); |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, request, headers: headers); |
| | | |
| | | return response; |
| | | } |
| | | } |
| | | } |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_External.Model; |
| | | using WIDESEA_Model.Models; |
| | | |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | string ERPSemiProInUp(ERPProInUpModel eRPProInUpModel); |
| | | /// <summary> |
| | | /// BSTç§°éåä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | string BSTWeightUp(BSTWeightUpDTO bSTWeightUpDTO); |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | WebResponseContent ReceiveOutBound(List<OutMESOrderDTO> outMESOrderDTO); |
| | | /// <summary> |
| | | /// åºåºåºååé
åï¼æ´æ°æ°æ®åºæ°æ® |
| | | /// åºåºåºååé
åï¼æ´æ°æ°æ®åºæ°æ®(åæ) |
| | | /// </summary> |
| | | WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutMESOrder> outboundOrderDetails, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null); |
| | | /// <summary> |
| | | /// åºåºåºååé
åï¼æ´æ°æ°æ®åºæ°æ®(æå) |
| | | /// </summary> |
| | | WebResponseContent LockOutboundStockDataUpdate(List<Dt_ProStockInfo> stockInfos, List<Dt_OutMESOrder> outboundOrderDetails, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null); |
| | | /// <summary> |
| | | /// åé
åºå(åæ) |
| | | /// </summary> |
| | | /// <param name="outboundOrderDetails"></param> |
| | | /// <returns></returns> |
| | | (List<Dt_StockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(List<Dt_OutMESOrder> outboundOrderDetails); |
| | | /// <summary> |
| | | /// åé
åºå(æå) |
| | | /// </summary> |
| | | /// <param name="outboundOrderDetails"></param> |
| | | /// <returns></returns> |
| | | (List<Dt_ProStockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignProStockOutbound(List<Dt_OutMESOrder> outboundOrderDetails); |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// çæåºåºè¯¦æ
|
| | | /// </summary> |
| | | Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutMESOrder ouMESOrder, Dt_ProStockInfo outStock, decimal assignQuantity, int? taskNum = null); |
| | | /// <summary> |
| | | /// çæåºåºè¯¦æ
|
| | | /// </summary> |
| | | public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutSGOrder outBSTOrder, Dt_OutSGOrderDetail outSGOrderDetail, Dt_StockInfo outStock, decimal assignQuantity, int? taskNum = null); |
| | | } |
| | | } |
| | |
| | | { |
| | | public interface IProStockInfoRepository : IRepository<Dt_ProStockInfo> |
| | | { |
| | | List<Dt_ProStockInfo> GetStockInfos(string materielCode, List<string> locationCodes); |
| | | } |
| | | } |
| | |
| | | public interface IProStockInfoService : IService<Dt_ProStockInfo> |
| | | { |
| | | IProStockInfoRepository Repository { get; } |
| | | /// <summary> |
| | | /// è·åå¯ä½¿ç¨åºå |
| | | /// </summary> |
| | | List<Dt_ProStockInfo> GetUseableStocks(string materielCode, int warehoseId); |
| | | /// <summary> |
| | | /// åé
å®é
åºå |
| | | /// </summary> |
| | | List<Dt_ProStockInfo> GetOutboundStocks(List<Dt_ProStockInfo> stockInfos, decimal needQuantity); |
| | | } |
| | | } |
| | |
| | | /// <param name="ids"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent CreateSGManualTasks(List<int> ids); |
| | | /// <summary> |
| | | /// 空æå çåºåº |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent PlateOutbound(string stationCode); |
| | | /// <summary> |
| | | /// å¯ç¨ç«ç¹ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent EnableStatus(int[] keys); |
| | | /// <summary> |
| | | /// ç¦ç¨ç«ç¹ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent DisableStatus(int[] keys); |
| | | } |
| | | } |
| | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// åºåºè¯¦æ
|
| | | /// åºåºè¯¦æ
(åæ) |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_OutStockLockInfo), "åºåºè¯¦æ
")] |
| | | public class Dt_OutStockLockInfo : BaseEntity |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.MaterielEnum; |
| | | using WIDESEA_Common.WareHouseEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Helper; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åºåºåºååé
åï¼æ´æ°æ°æ®åºæ°æ® |
| | | /// åºåºåºååé
åï¼æ´æ°æ°æ®åºæ°æ®(åæ) |
| | | /// </summary> |
| | | public WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutMESOrder> outboundOrderDetails, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null) |
| | | { |
| | |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// åé
åºå |
| | | /// åºåºåºååé
åï¼æ´æ°æ°æ®åºæ°æ®(æå) |
| | | /// </summary> |
| | | public WebResponseContent LockOutboundStockDataUpdate(List<Dt_ProStockInfo> stockInfos, List<Dt_OutMESOrder> outboundOrderDetails, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null) |
| | | { |
| | | try |
| | | { |
| | | _stockService.ProStockInfoService.Repository.UpdateData(stockInfos); |
| | | BaseDal.UpdateData(outboundOrderDetails); |
| | | |
| | | List<Dt_OutStockLockInfo> addOutStockLockInfos = outStockLockInfos.Where(x => x.Id == 0).ToList(); |
| | | if (addOutStockLockInfos != null && addOutStockLockInfos.Any()) |
| | | { |
| | | if (tasks != null) |
| | | { |
| | | addOutStockLockInfos.ForEach(x => |
| | | { |
| | | x.TaskNum = tasks.FirstOrDefault(v => v.PalletCode == x.PalletCode)?.TaskNum; |
| | | }); |
| | | } |
| | | |
| | | _outStockLockInfoService.Repository.AddData(addOutStockLockInfos); |
| | | } |
| | | List<Dt_OutStockLockInfo> updateOutStockLockInfos = outStockLockInfos.Where(x => x.Id > 0).ToList(); |
| | | if (updateOutStockLockInfos != null && updateOutStockLockInfos.Any()) |
| | | { |
| | | _outStockLockInfoService.Repository.UpdateData(updateOutStockLockInfos); |
| | | } |
| | | //æ·»å è´§ä½ç¶æ |
| | | _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfos, locationStatus, LocationChangeType.OutboundAssignLocation, "", tasks?.Select(x => x.TaskNum).ToList()); |
| | | //æ¹éæ´æ°è´§ä½ç¶æ |
| | | _basicService.LocationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// åé
åºå(åæ) |
| | | /// </summary> |
| | | public (List<Dt_StockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(List<Dt_OutMESOrder> outboundOrders) |
| | | { |
| | |
| | | |
| | | return (outStocks, outboundOrders, outStockLockInfos, locationInfos); |
| | | } |
| | | /// <summary> |
| | | /// åé
åºå(æå) |
| | | /// </summary> |
| | | public (List<Dt_ProStockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignProStockOutbound(List<Dt_OutMESOrder> outboundOrders) |
| | | { |
| | | if (!outboundOrders.Any()) |
| | | { |
| | | throw new Exception($"æªæ¾å°åºåºåæç»ä¿¡æ¯"); |
| | | } |
| | | |
| | | List<Dt_ProStockInfo> outStocks = new List<Dt_ProStockInfo>(); |
| | | |
| | | //åºåºè¯¦æ
|
| | | List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); |
| | | //è´§ä½åå¨ |
| | | List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); |
| | | |
| | | foreach (var item in outboundOrders) |
| | | { |
| | | decimal needQuantity = item.ReqQuantity; |
| | | //è·åå¯ç¨åºå |
| | | List<Dt_ProStockInfo> stockInfos = _stockService.ProStockInfoService.GetUseableStocks(item.MaterialCode, WarehouseEnum.LLDCP.ObjToInt()).Where(x => !outStocks.Select(x => x.PalletCode).Contains(x.PalletCode)).ToList(); |
| | | if (!stockInfos.Any()) |
| | | { |
| | | throw new Exception($"æªæ¾å°å¯åé
åºå"); |
| | | } |
| | | //åé
å®é
åºå |
| | | List<Dt_ProStockInfo> autoAssignStocks = _stockService.ProStockInfoService.GetOutboundStocks(stockInfos, needQuantity); |
| | | //æ·»å åºååé
|
| | | outStocks.AddRange(autoAssignStocks); |
| | | //è®¢åæ°é |
| | | decimal orderQuantity = item.ReqQuantity; |
| | | bool assignStop = true; |
| | | while (assignStop) |
| | | { |
| | | //åºåºè®¢åæç»å·²åé
æ°é |
| | | decimal detailAssignQuantity = outStockLockInfos.Where(x => x.OrderDetailId == item.OutDetailId).Sum(x => x.AssignQuantity); |
| | | |
| | | decimal orderDetailNeedQuantity = item.ReqQuantity - detailAssignQuantity; |
| | | |
| | | decimal useStockLength = autoAssignStocks[0].proStockInfoDetails |
| | | .Sum(x => x.StockQty); |
| | | if (orderDetailNeedQuantity > useStockLength) |
| | | { |
| | | |
| | | //çæè¯¦æ
|
| | | Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(item, autoAssignStocks[0], useStockLength); |
| | | outStockLockInfos.Add(outStockLockInfo); |
| | | item.AssignTotalUsage += useStockLength; |
| | | autoAssignStocks.Remove(autoAssignStocks[0]); |
| | | } |
| | | else |
| | | { |
| | | //çæè¯¦æ
|
| | | Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(item, autoAssignStocks[0], orderDetailNeedQuantity); |
| | | outStockLockInfos.Add(outStockLockInfo); |
| | | item.AssignTotalUsage = orderQuantity; |
| | | autoAssignStocks.Remove(autoAssignStocks[0]); |
| | | assignStop = false; |
| | | } |
| | | } |
| | | |
| | | locationInfos.AddRange(_basicRepository.LocationInfoRepository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList())); |
| | | } |
| | | |
| | | return (outStocks, outboundOrders, outStockLockInfos, locationInfos); |
| | | } |
| | | } |
| | | } |
| | |
| | | return outStockLockInfo; |
| | | } |
| | | /// <summary> |
| | | /// çæMESåºåºè¯¦æ
|
| | | /// çæMESåºåºè¯¦æ
(åæ) |
| | | /// </summary> |
| | | public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutMESOrder ouMESOrder, Dt_StockInfo outStock, decimal assignQuantity, int? taskNum = null) |
| | | { |
| | |
| | | PalletCode = outStock.PalletCode, |
| | | AssignQuantity = assignQuantity, |
| | | MaterielCode = ouMESOrder.MaterialCode, |
| | | BatchNo = outStock.BatchNo, |
| | | BatchNo = outStock.BatchNo ?? "", |
| | | LocationCode = outStock.LocationCode, |
| | | MaterielName = outStock.MaterielName, |
| | | OrderDetailId = ouMESOrder.OutDetailId, |
| | |
| | | return outStockLockInfo; |
| | | } |
| | | /// <summary> |
| | | /// çæMESåºåºè¯¦æ
(æå) |
| | | /// </summary> |
| | | public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutMESOrder ouMESOrder, Dt_ProStockInfo outStock, decimal assignQuantity, int? taskNum = null) |
| | | { |
| | | Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo() |
| | | { |
| | | PalletCode = outStock.PalletCode, |
| | | AssignQuantity = assignQuantity, |
| | | MaterielCode = ouMESOrder.MaterialCode, |
| | | BatchNo = outStock.proStockInfoDetails.FirstOrDefault()?.LotNumber ?? "", |
| | | LocationCode = outStock.LocationCode, |
| | | MaterielName = outStock.proStockInfoDetails.FirstOrDefault()?.ProductName, |
| | | OrderDetailId = ouMESOrder.OutDetailId, |
| | | OrderNo = ouMESOrder.OutMESOrderNo, |
| | | MakeCode = ouMESOrder.MakeCode, |
| | | MachineName = ouMESOrder.MakeArea.ToString(), |
| | | OrderType = OutOrderTypeEnum.OutMESPick.ObjToInt(), |
| | | OriginalQuantity = outStock.proStockInfoDetails.Sum(x=>x.StockQty), |
| | | Status = taskNum == null ? OutLockStockStatusEnum.å·²åé
.ObjToInt() : OutLockStockStatusEnum.åºåºä¸.ObjToInt(), |
| | | StockId = outStock.Id, |
| | | TaskNum = taskNum, |
| | | OrderQuantity = ouMESOrder.ReqQuantity, |
| | | Unit = outStock.proStockInfoDetails.FirstOrDefault()?.ProductUnit, |
| | | AssistUnit = ouMESOrder.AssistUnitCode |
| | | }; |
| | | |
| | | return outStockLockInfo; |
| | | } |
| | | /// <summary> |
| | | /// çæç管åºåºè¯¦æ
|
| | | /// </summary> |
| | | public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutSGOrder outSGOrder, Dt_OutSGOrderDetail outSGOrderDetail, Dt_StockInfo outStock, decimal assignQuantity, int? taskNum = null) |
| | |
| | | { |
| | | _basicRepository = basicRepository; |
| | | } |
| | | public List<Dt_ProStockInfo> GetStockInfos(string materielCode, List<string> locationCodes) |
| | | { |
| | | List<Dt_ProStockInfo> stockInfos = Db.Queryable<Dt_ProStockInfo>().Where(x => locationCodes.Contains(x.LocationCode) && x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt()).Includes(x => x.proStockInfoDetails) |
| | | .Where(x => x.proStockInfoDetails |
| | | .Any(v => |
| | | v.ProductCode == materielCode && |
| | | v.OutboundQuantity<=0) |
| | | ).OrderBy(x=>x.CreateDate).ToList(); |
| | | return stockInfos; |
| | | } |
| | | } |
| | | } |
| | |
| | | _stockRepository = stockRepository; |
| | | _basicRepository = basicRepository; |
| | | } |
| | | public List<Dt_ProStockInfo> GetUseableStocks(string materielCode, int warehoseId) |
| | | { |
| | | List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(warehoseId); |
| | | |
| | | return BaseDal.GetStockInfos(materielCode, locationCodes); |
| | | } |
| | | public List<Dt_ProStockInfo> GetOutboundStocks(List<Dt_ProStockInfo> stockInfos, decimal needQuantity) |
| | | { |
| | | List<Dt_ProStockInfo> assignOutStocks = new List<Dt_ProStockInfo>(); |
| | | |
| | | decimal stockTotalQuantity = stockInfos.Select(x => x.proStockInfoDetails.Sum(v => v.StockQty-v.OutboundQuantity)).Sum(x => x); |
| | | |
| | | if (stockTotalQuantity >= needQuantity)//åºåå¤ |
| | | { |
| | | int index = 0; |
| | | while (needQuantity > 0) |
| | | { |
| | | Dt_ProStockInfo stockInfo = stockInfos[index]; |
| | | decimal useableStockQuantity = stockInfo.proStockInfoDetails |
| | | .Sum(x => x.StockQty - x.OutboundQuantity); |
| | | if (useableStockQuantity < needQuantity && useableStockQuantity > 0) |
| | | { |
| | | stockInfo.proStockInfoDetails.ForEach(x => x.OutboundQuantity = x.StockQty); |
| | | needQuantity -= useableStockQuantity; |
| | | } |
| | | else |
| | | { |
| | | stockInfo.proStockInfoDetails.ForEach(x => |
| | | { |
| | | if (x.StockQty - x.OutboundQuantity >= needQuantity) |
| | | { |
| | | x.OutboundQuantity += needQuantity; |
| | | needQuantity = 0; |
| | | } |
| | | else |
| | | { |
| | | needQuantity -= (x.StockQty - x.OutboundQuantity); |
| | | x.OutboundQuantity = x.StockQty; |
| | | } |
| | | }); |
| | | } |
| | | assignOutStocks.Add(stockInfo); |
| | | index++; |
| | | } |
| | | } |
| | | return assignOutStocks; |
| | | } |
| | | } |
| | | } |
| | |
| | | //éæ |
| | | List<Dt_StockInfo> stockInfos=new List<Dt_StockInfo>(); |
| | | List<Dt_Task> tasksNew = new List<Dt_Task>(); |
| | | List<Dt_AGVStationInfo> _AGVStationInfos = new List<Dt_AGVStationInfo>(); |
| | | foreach (var item in returnIssueDTOs.Where(x => x.ReturnMaterial != null)) |
| | | { |
| | | MESReturnMaterial? returnMaterial = item.ReturnMaterial; |
| | |
| | | TaskTypeEnum taskTypeEnum = aGVStationInfo.StationArea switch |
| | | { |
| | | nameof(StationAreaEnum.䏿¥¼å°å·) => TaskTypeEnum.PrintYLBackInbound, |
| | | nameof(StationAreaEnum.䏿¥¼çº¸å¼ æ·è) => TaskTypeEnum.PaperFilmYLBackInbound, |
| | | nameof(StationAreaEnum.䏿¥¼æ 纺æ·è) => TaskTypeEnum.WFBLMYLBackInbound, |
| | | _ => throw new Exception("æªæ¾å°å¯¹åºä»»å¡") |
| | | }; |
| | | if (taskTypeEnum== TaskTypeEnum.WFBLMYLBackInbound) |
| | | { |
| | | Dt_AGVStationInfo? stationInfo = AssignWFBStation(_AGVStationInfos?.Select(x=>x.AGVStationCode).ToList()) ?? throw new Exception("æªæ¾å°å¯ç¨æ çººå¸æåæ¶"); |
| | | newTask.NextAddress = stationInfo.AGVStationCode; |
| | | newTask.TargetAddress = stationInfo.AGVStationCode; |
| | | newTask.Roadway = "AGV"; |
| | | stationInfo.IsOccupied = 1; |
| | | _AGVStationInfos.Add(stationInfo); |
| | | } |
| | | newTask.TaskType = taskTypeEnum.ObjToInt(); |
| | | tasksNew.Add(newTask); |
| | | } |
| | | _unitOfWorkManage.BeginTran(); |
| | | BaseDal.AddData(tasksNew); |
| | | _basicRepository.AGVStationInfoRepository.UpdateData(_AGVStationInfos); |
| | | _stockRepository.StockInfoRepository.AddData(stockInfos); |
| | | _unitOfWorkManage.CommitTran(); |
| | | //æ¨éä»»å¡ |
| | |
| | | using AutoMapper; |
| | | using Microsoft.AspNetCore.Mvc.ApiExplorer; |
| | | using Newtonsoft.Json; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Math; |
| | | using SqlSugar; |
| | | using System.Reflection.Emit; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.MaterielEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Common.TaskEnum; |
| | |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_DTO.Task; |
| | | using WIDESEA_External.ERPService; |
| | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¯ç¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent EnableStatus(int[] keys) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | List<Dt_Task> tasks = BaseDal.QueryData(x => x.TaskType < TaskTypeEnum.Inbound.ObjToInt()); |
| | | List<Dt_AGVStationInfo> stationInfos = _basicRepository.AGVStationInfoRepository.QueryData(x => keys.Contains(x.Id)); |
| | | foreach (var station in stationInfos) |
| | | { |
| | | Dt_Task? taskOld = tasks.FirstOrDefault(x => x.TargetAddress == station.AGVStationCode); |
| | | if (taskOld!=null) |
| | | { |
| | | content.Message+= $"{station.AGVStationCode}åºåº{taskOld.TaskNum}任塿§è¡ä¸;"; |
| | | continue; |
| | | } |
| | | if (station.StationArea==StationAreaEnum.䏿¥¼æåæ¶.ToString()) |
| | | { |
| | | Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x=>x.LocationCode==station.AGVStationCode); |
| | | if (stockInfo!=null) |
| | | { |
| | | content.Message += $"{station.AGVStationCode}{stockInfo.PalletCode}åºåç»å®;"; |
| | | continue; |
| | | } |
| | | } |
| | | station.IsOccupied = WhetherEnum.False.ObjToInt(); |
| | | } |
| | | _basicRepository.AGVStationInfoRepository.UpdateData(stationInfos); |
| | | content.OK(content.Message.IsNullOrEmpty() ? "æå" : $"é¨åæåå¯ç¨!{content.Message}æ æ³å¯ç¨"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// ç¦ç¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent DisableStatus(int[] keys) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | List<Dt_AGVStationInfo> stationInfos = _basicRepository.AGVStationInfoRepository.QueryData(x => keys.Contains(x.Id)); |
| | | stationInfos.ForEach(x => |
| | | { |
| | | x.IsOccupied = WhetherEnum.True.ObjToInt(); |
| | | }); |
| | | _basicRepository.AGVStationInfoRepository.UpdateData(stationInfos); |
| | | content.OK("æå"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
| | |
| | | using Microsoft.IdentityModel.Tokens; |
| | | using Newtonsoft.Json; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Operators; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | return WebResponseContent.Instance.OK($"该æçå·²çæä»»å¡", _mapper.Map<WMSTaskDTO>(task)); |
| | | } |
| | | |
| | | if (Repository.QueryFirst(x => x.SourceAddress == stationCode && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该ç«ç¹å·²ææªæ§è¡çä»»å¡"); |
| | | } |
| | | |
| | | Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == palletCode); |
| | | Dt_ProStockInfo stockInfo = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == palletCode); |
| | | if (stockInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç»çä¿¡æ¯"); |
| | |
| | | _unitOfWorkManage.BeginTran(); |
| | | int taskId = BaseDal.AddData(newTask); |
| | | newTask.TaskId = taskId; |
| | | _stockRepository.StockInfoRepository.UpdateData(stockInfo); |
| | | _stockRepository.ProStockInfoRepository.UpdateData(stockInfo); |
| | | _unitOfWorkManage.CommitTran(); |
| | | WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask); |
| | | |
| | |
| | | else if (stockInfoOld != null && stockInfoOld.MaterielInvOrgId == MaterielInvOrgEnum.èå.ObjToInt() && stockInfoOld.StockStatus == StockStatusEmun.åºåºå®æ.ObjToInt() && stockInfoOld.IsPick==WhetherEnum.False.ObjToInt() && stationCode.IsNotEmptyOrNull()) |
| | | { |
| | | decimal oldQty = stockInfoOld.StockLength; |
| | | //è°ç¨æ´æ°éæåºå |
| | | stockInfoOld = ReturnStockUp(stockInfoOld, thickness); |
| | | //è°ç¨æ´æ°éæåºåå䏿¥éé |
| | | WebResponseContent returnContent = ReturnStockUp(stockInfoOld, thickness, weight); |
| | | if (!returnContent.Status) |
| | | { |
| | | throw new Exception(returnContent.Message); |
| | | } |
| | | stockInfoOld = returnContent.Data as Dt_StockInfo; |
| | | //æ´æ°æ°æ® |
| | | UpdateStock(stockInfoOld, weight, thickness, wide); |
| | | //è®°å½åºååå¨ |
| | |
| | | else if (stockInfoOld != null && stockInfoOld.MaterielInvOrgId == MaterielInvOrgEnum.èå.ObjToInt() && stockInfoOld.StockStatus == StockStatusEmun.èåéææå.ObjToInt() && stationCode.IsNotEmptyOrNull()) |
| | | { |
| | | decimal oldQty = stockInfoOld.StockLength; |
| | | //è°ç¨æ´æ°éæåºå |
| | | stockInfoOld = ReturnStockUp(stockInfoOld, thickness); |
| | | //è°ç¨æ´æ°éæåºåå䏿¥éé |
| | | WebResponseContent returnContent = ReturnStockUp(stockInfoOld, thickness, weight); |
| | | if (!returnContent.Status) |
| | | { |
| | | throw new Exception(returnContent.Message); |
| | | } |
| | | stockInfoOld = returnContent.Data as Dt_StockInfo; |
| | | //æ´æ°æ°æ® |
| | | UpdateStock(stockInfoOld, weight, thickness, wide); |
| | | //è®°å½åºååå¨ |
| | |
| | | /// æ´æ°éæåºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public Dt_StockInfo ReturnStockUp(Dt_StockInfo stockInfoOld,decimal thickness) |
| | | public WebResponseContent ReturnStockUp(Dt_StockInfo stockInfoOld,decimal thickness,decimal weight) |
| | | { |
| | | BSTResponse<BSTStockInfoDTO> bSTResponse = _invokeERPService.BSTStockAsync(stockInfoOld.PalletCode).DeserializeObject<BSTResponse<BSTStockInfoDTO>>(); |
| | | if (bSTResponse.Code == 500) |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | throw new Exception($"æªæ¾å°æ¡ç {stockInfoOld.PalletCode}䏿ERPåºåä¸åå¨"); |
| | | } |
| | | BSTResponse<BSTStockInfoDTO> bSTResponse = _invokeERPService.BSTStockAsync(stockInfoOld.PalletCode).DeserializeObject<BSTResponse<BSTStockInfoDTO>>(); |
| | | if (bSTResponse.Code == 500) |
| | | { |
| | | throw new Exception($"æªæ¾å°æ¡ç {stockInfoOld.PalletCode}䏿ERPåºåä¸åå¨"); |
| | | } |
| | | |
| | | BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"䏿ERPæªè¿å{stockInfoOld.PalletCode}çåºåä¿¡æ¯"); |
| | | if (stockInfoOld.StockStatus == StockStatusEmun.èåéææå.ObjToInt()) |
| | | { |
| | | stockInfoOld.IsPick = WhetherEnum.False.ObjToInt(); |
| | | BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"䏿ERPæªè¿å{stockInfoOld.PalletCode}çåºåä¿¡æ¯"); |
| | | if (stockInfoOld.StockStatus == StockStatusEmun.èåéææå.ObjToInt()) |
| | | { |
| | | stockInfoOld.IsPick = WhetherEnum.False.ObjToInt(); |
| | | } |
| | | decimal stockLength = bSTStockInfoDTO.StockMeter; |
| | | if (weight != bSTStockInfoDTO.Qty) |
| | | { |
| | | Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterialSourceId == stockInfoOld.MaterielId); |
| | | int gramWeight = (int)(materielInfo.MaterielWeight * 1000); |
| | | BSTWeightUpDTO bSTWeightUpDTO = new BSTWeightUpDTO() |
| | | { |
| | | Paper_code = stockInfoOld.PalletCode, |
| | | Estimate_weight = bSTStockInfoDTO.Qty, |
| | | Actual_weight = weight, |
| | | Error_weight = Math.Abs(weight - bSTStockInfoDTO.Qty), |
| | | Weigh_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), |
| | | Operator = "LiKu", |
| | | Width = bSTStockInfoDTO.W, |
| | | Gram_weight = gramWeight |
| | | }; |
| | | BSTResponse<object> Response = _invokeERPService.BSTWeightUp(bSTWeightUpDTO).DeserializeObject<BSTResponse<object>>(); |
| | | if (Response.Code != 200) |
| | | { |
| | | throw new Exception($"䏿¥ç§°é失败"); |
| | | } |
| | | stockLength = weight / bSTStockInfoDTO.W / gramWeight * 1000000; |
| | | } |
| | | stockInfoOld.StockStatus = StockStatusEmun.èåéåº.ObjToInt(); |
| | | stockInfoOld.MaterielThickness = bSTStockInfoDTO.Thick; |
| | | stockInfoOld.MaterielWeight = weight; |
| | | stockInfoOld.MaterielWide = bSTStockInfoDTO.W; |
| | | stockInfoOld.StockLength = stockLength; |
| | | stockInfoOld.IsFull = WhetherEnum.True.ObjToInt(); |
| | | stockInfoOld.StockOutLength = 0; |
| | | stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt(); |
| | | if (thickness < 400) |
| | | { |
| | | throw new Exception($"RFID{stockInfoOld.RfidCode}æ¡ç {stockInfoOld.PalletCode}ç´å¾å°äº400mm"); |
| | | } |
| | | content.OK("æå",data:stockInfoOld); |
| | | } |
| | | stockInfoOld.StockStatus = StockStatusEmun.èåéåº.ObjToInt(); |
| | | stockInfoOld.MaterielThickness = bSTStockInfoDTO.Thick; |
| | | stockInfoOld.MaterielWeight = bSTStockInfoDTO.Qty; |
| | | stockInfoOld.MaterielWide = bSTStockInfoDTO.W; |
| | | stockInfoOld.StockLength = bSTStockInfoDTO.StockMeter; |
| | | stockInfoOld.IsFull = WhetherEnum.True.ObjToInt(); |
| | | stockInfoOld.StockOutLength = 0; |
| | | stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt(); |
| | | if (thickness < 400) |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception($"RFID{stockInfoOld.RfidCode}æ¡ç {stockInfoOld.PalletCode}ç´å¾å°äº400mm"); |
| | | content.Error(ex.Message); |
| | | } |
| | | return stockInfoOld; |
| | | return content; |
| | | } |
| | | public void UpdateStock(Dt_StockInfo stockInfo, decimal weight = 0, decimal thickness = 0, decimal wide = 0) |
| | | { |
| | |
| | | //éå¶ç´å¾ |
| | | if (stockInfo.CheckThickness >= 300 && stockInfo.CheckThickness <= 1300 && stockInfo.MaterielWide >= 690 && stockInfo.MaterielWide <= 2500) |
| | | { |
| | | bool LayerLimit = stockInfo.CheckThickness >= 1200; |
| | | //è·ååé
|
| | | List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo.Contains("YLDual") && (stockInfo.PalletType == LocationTypeEnum.MediumPallet.ObjToInt() ? x.LocationType == LocationTypeEnum.MediumPallet.ObjToInt(): x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt())).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).OrderBy(x => x.RoadwayNo).ToList(); |
| | | |
| | | if (LayerLimit) |
| | | { |
| | | locationCounts = locationCounts.Where(x => x.RoadwayNo != "SC03_YLDual").ToList(); |
| | | } |
| | | |
| | | roadwayNo = HandleRoadway(locationCounts, warehouse); |
| | | } |
| | | } |
| | |
| | | { |
| | | return content.Error($"æªæ¾å°å¯¹åºçç»ç¹è´§ä½ä¿¡æ¯"); |
| | | } |
| | | Dt_AGVStationInfo agvstation = _basicRepository.AGVStationInfoRepository.QueryFirst(x => x.AGVStationCode == task.SourceAddress && ( x.StationArea == nameof(StationAreaEnum.䏿¥¼æå°ç 头) || x.StationArea == nameof(StationAreaEnum.䏿¥¼æ 纺ç»å¸) || x.StationArea == nameof(StationAreaEnum.䏿¥¼æ 纺æ·è) || x.StationArea == nameof(StationAreaEnum.䏿¥¼æ 纺æ·è))); |
| | | Dt_AGVStationInfo agvstation = _basicRepository.AGVStationInfoRepository.QueryFirst(x => x.AGVStationCode == task.SourceAddress && ( x.StationArea == nameof(StationAreaEnum.䏿¥¼æå°ç 头) || x.StationArea == nameof(StationAreaEnum.䏿¥¼æ 纺ç»å¸) || x.StationArea == nameof(StationAreaEnum.䏿¥¼æ 纺æ·è))); |
| | | if (agvstation != null) |
| | | { |
| | | agvstation.IsOccupied = WhetherEnum.False.ObjToInt(); |
| | |
| | | } |
| | | //è·åè´§ä½ä¿¡æ¯ |
| | | Dt_LocationInfo locationInfoEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress); |
| | | if (locationInfoEnd == null) |
| | | if (locationInfoEnd == null && task.TaskType!=TaskTypeEnum.WFBLMYLBackInbound.ObjToInt() && task.TaskType != TaskTypeEnum.WFBYLInbound.ObjToInt()) |
| | | { |
| | | return content.Error($"æªæ¾å°å¯¹åºçç»ç¹è´§ä½ä¿¡æ¯"); |
| | | } |
| | |
| | | Dt_LocationInfo locationInfoStart = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress); |
| | | _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId); |
| | | } |
| | | stockInfo.LocationCode = locationInfoEnd.LocationCode; |
| | | if (task.TaskType != TaskTypeEnum.WFBLMYLBackInbound.ObjToInt() && task.TaskType != TaskTypeEnum.WFBYLInbound.ObjToInt()) |
| | | { |
| | | stockInfo.LocationCode = locationInfoEnd.LocationCode; |
| | | } |
| | | else |
| | | { |
| | | stockInfo.LocationCode = task.TargetAddress; |
| | | } |
| | | |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºå®æ.ObjToInt(); |
| | | if (task.TaskType!=TaskTypeEnum.Inbound.ObjToInt()) |
| | | { |
| | | stockInfo.IsFull = WhetherEnum.True.ObjToInt(); |
| | | } |
| | | _stockService.StockInfoService.Repository.UpdateData(stockInfo); |
| | | _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId); |
| | | if (locationInfoEnd!=null) |
| | | { |
| | | _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId); |
| | | } |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.äººå·¥å®æ : WIDESEA_Core.Enums.OperateTypeEnum.èªå¨å®æ); |
| | | _unitOfWorkManage.CommitTran(); |
| | | //è®°å½åºååå¨ |
| | |
| | | } |
| | | return content; |
| | | } |
| | | public Dt_AGVStationInfo? AssignWFBStation(List<string> assignPoints) |
| | | { |
| | | try |
| | | { |
| | | Dictionary<string, OrderByType> orderBy = new Dictionary<string, OrderByType>() |
| | | { |
| | | { nameof(Dt_AGVStationInfo.Depth),OrderByType.Asc } |
| | | }; |
| | | List<string> stockPoints = _stockRepository.StockInfoRepository.QueryData(x=>x.StockAttribute== MaterielTypeEnum.åæå.ObjToInt() && x.LocationCode.StartsWith("PNT")).Select(x=>x.LocationCode).ToList(); |
| | | return _basicRepository.AGVStationInfoRepository.QueryFirst(x => x.StationArea == StationAreaEnum.䏿¥¼æåæ¶.ToString() && x.IsOccupied == WhetherEnum.False.ObjToInt() && !stockPoints.Contains(x.AGVStationCode) && !assignPoints.Contains(x.AGVStationCode), orderBy); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | return tasks; |
| | | } |
| | | /// <summary> |
| | | /// åºåæ°æ®è½¬åºåºä»»å¡(MESå·¥å) |
| | | /// åºåæ°æ®è½¬åºåºä»»å¡(MESå·¥åæå) |
| | | /// </summary> |
| | | /// <param name="stockInfos"></param> |
| | | /// <returns></returns> |
| | | public List<Dt_Task> GetTasks(List<Dt_ProStockInfo> stockInfos, List<Dt_OutStockLockInfo> outStockLockInfos, TaskTypeEnum taskType = new TaskTypeEnum()) |
| | | { |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | for (int i = 0; i < stockInfos.Count; i++) |
| | | { |
| | | Dt_ProStockInfo stockInfo = stockInfos[i]; |
| | | |
| | | if (stockInfo != null) |
| | | { |
| | | Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode); |
| | | if (!tasks.Exists(x => x.PalletCode == stockInfo.PalletCode)) |
| | | { |
| | | Dt_OutStockLockInfo outStockLockInfo = outStockLockInfos.FirstOrDefault(x => x.PalletCode == stockInfo.PalletCode); |
| | | taskType = outStockLockInfo.MachineName.ObjToInt() switch |
| | | { |
| | | (int)StationAreaEnum.äºæ¥¼çº¸è¢ or |
| | | (int)StationAreaEnum.äºæ¥¼æ 纺å¸è¢ or |
| | | (int)StationAreaEnum.äºæ¥¼çº¸æ¯ => TaskTypeEnum.OutCarton, |
| | | (int)StationAreaEnum.䏿¥¼æ 纺ç»å¸ => TaskTypeEnum.OutWFB, |
| | | _ => throw new Exception($"æªæ¾å°å å·¥ä¸å¿ä»»å¡ç±»ååé
") |
| | | }; |
| | | Dt_Task task = new() |
| | | { |
| | | CurrentAddress = stockInfo.LocationCode, |
| | | Grade = 0, |
| | | PalletCode = stockInfo.PalletCode, |
| | | NextAddress = "", |
| | | Roadway = locationInfo.RoadwayNo, |
| | | SourceAddress = stockInfo.LocationCode, |
| | | TargetAddress = "", |
| | | TaskStatus = TaskStatusEnum.CallPending.ObjToInt(), |
| | | TaskType = taskType.ObjToInt(), |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | PalletType = stockInfo.PalletType, |
| | | WarehouseId = stockInfo.WarehouseId, |
| | | MaterielCode = stockInfo.proStockInfoDetails?.FirstOrDefault().ProductCode ??"", |
| | | Quantity = stockInfo.proStockInfoDetails?.Sum(x=>x.StockQty) ?? 0, |
| | | OrderNo = outStockLockInfo.OrderNo, |
| | | DispatchPlanId = outStockLockInfo.OrderDetailId, |
| | | WorkCentreCode = outStockLockInfo.MakeCode |
| | | }; |
| | | tasks.Add(task); |
| | | } |
| | | } |
| | | } |
| | | return tasks; |
| | | } |
| | | /// <summary> |
| | | /// åºåæ°æ®è½¬åºåºä»»å¡(MESå·¥ååæ) |
| | | /// </summary> |
| | | /// <param name="stockInfos"></param> |
| | | /// <returns></returns> |
| | |
| | | { |
| | | (int)StationAreaEnum.äºæ¥¼çº¸è¢ => TaskTypeEnum.PaperYLOutZDGL, |
| | | (int)StationAreaEnum.䏿¥¼å°å· => TaskTypeEnum.PrintYLOutbound, |
| | | (int)StationAreaEnum.䏿¥¼åå => TaskTypeEnum.OutFenQie, |
| | | _ => throw new Exception($"æªæ¾å°å å·¥ä¸å¿ä»»å¡ç±»ååé
") |
| | | }; |
| | | Dt_Task task = new() |
| | |
| | | PalletType = stockInfo.PalletType, |
| | | WarehouseId = stockInfo.WarehouseId, |
| | | MaterielCode= stockInfo.proStockInfoDetails?.FirstOrDefault().ProductCode ?? "" , |
| | | Quantity = 0, |
| | | Quantity = stockInfo.proStockInfoDetails?.Sum(x=>x.StockQty) ?? 0, |
| | | }; |
| | | tasks.Add(task); |
| | | } |
| | |
| | | nameof(StationAreaEnum.䏿¥¼åå) => TaskTypeEnum.OutFenQie, |
| | | nameof(StationAreaEnum.䏿¥¼æ¨¡å) => TaskTypeEnum.OutMoQie, |
| | | nameof(StationAreaEnum.䏿¥¼å²å) => TaskTypeEnum.OutChongQie, |
| | | nameof(StationAreaEnum.䏿¥¼æå) => TaskTypeEnum.OutProduct, |
| | | nameof(StationAreaEnum.äºæ¥¼çº¸è¢) or |
| | | nameof(StationAreaEnum.äºæ¥¼æ 纺å¸è¢) or |
| | | nameof(StationAreaEnum.äºæ¥¼çº¸æ¯) => TaskTypeEnum.OutCarton, |
| | |
| | | //æä½æ°æ®ï¼å¹¶åé
éæ±åºå |
| | | _outboundRepository.OutMESOrderRepository.AddData(AddoutMESOrders); |
| | | List<Dt_OutMESOrder> mESOrders = _outboundRepository.OutMESOrderRepository.QueryData(x => AddoutMESOrders.Select(x => x.OutDetailId).Contains(x.OutDetailId)); |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | List<Dt_StockInfo>? stockInfos = null; |
| | | List<Dt_OutMESOrder>? Orders = null; |
| | | List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | { |
| | | //åé
åºå |
| | | (List<Dt_StockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutMESOrderService.AssignStockOutbound(mESOrders); |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | List<Dt_ProStockInfo>? stockInfos = null; |
| | | List<Dt_OutMESOrder>? Orders = null; |
| | | List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | { |
| | | //åå»ºä»»å¡ |
| | | tasks = GetTasks(result.Item1, result.Item3); |
| | | result.Item2.ForEach(x => |
| | | if (mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDFL.ObjToInt()).ToList().Count>0) |
| | | { |
| | | OutOrderStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | result.Item3.ForEach(x => |
| | | { |
| | | x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | //åé
åºå |
| | | (List<Dt_ProStockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutMESOrderService.AssignProStockOutbound(mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDFL.ObjToInt()).ToList()); |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | //åå»ºä»»å¡ |
| | | tasks = GetTasks(result.Item1, result.Item3); |
| | | result.Item2.ForEach(x => |
| | | { |
| | | OutOrderStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | result.Item3.ForEach(x => |
| | | { |
| | | x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | |
| | | stockInfos = result.Item1; |
| | | Orders = result.Item2; |
| | | outStockLockInfos = result.Item3; |
| | | locationInfos = result.Item4; |
| | | stockInfos = result.Item1; |
| | | Orders = result.Item2; |
| | | outStockLockInfos = result.Item3; |
| | | locationInfos = result.Item4; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count>0) |
| | | { |
| | | throw new Exception("æ åºå"); |
| | | BaseDal.AddData(tasks); |
| | | stockInfos.ForEach(x => |
| | | { |
| | | x.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | }); |
| | | WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks); |
| | | |
| | | if (!contentResponse.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content.Error(contentResponse.Message); |
| | | } |
| | | } |
| | | } |
| | | int id = BaseDal.AddData(tasks); |
| | | |
| | | if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0) |
| | | { |
| | | stockInfos.ForEach(x => |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | List<Dt_StockInfo>? stockInfos = null; |
| | | List<Dt_OutMESOrder>? Orders = null; |
| | | List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | { |
| | | x.StockStatus=StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | }); |
| | | WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks); |
| | | |
| | | if (!contentResponse.Status) |
| | | if (mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt()).ToList().Count > 0) |
| | | { |
| | | //åé
åºå |
| | | (List<Dt_StockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutMESOrderService.AssignStockOutbound(mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt()).ToList()); |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | //åå»ºä»»å¡ |
| | | tasks = GetTasks(result.Item1, result.Item3); |
| | | result.Item2.ForEach(x => |
| | | { |
| | | OutOrderStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | result.Item3.ForEach(x => |
| | | { |
| | | x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | stockInfos = result.Item1; |
| | | Orders = result.Item2; |
| | | outStockLockInfos = result.Item3; |
| | | locationInfos = result.Item4; |
| | | } |
| | | } |
| | | } |
| | | if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count>0) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content.Error(contentResponse.Message); |
| | | BaseDal.AddData(tasks); |
| | | stockInfos.ForEach(x => |
| | | { |
| | | x.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | }); |
| | | WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks); |
| | | if (!contentResponse.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content.Error(contentResponse.Message); |
| | | } |
| | | } |
| | | } |
| | | |
| | | _unitOfWorkManage.CommitTran(); |
| | | |
| | | return content.OK("æ¥æ¶æå"); |
| | |
| | | } |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// 空æå çåºåº |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent PlateOutbound(string stationCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | //è·åæææå°åºåºä»»å¡ |
| | | Dt_Task TasksOut = BaseDal.QueryFirst(x => x.TaskType == TaskTypeEnum.OutEmptyPlate.ObjToInt()); |
| | | if (TasksOut != null) |
| | | throw new Exception($"ä»»å¡å·²åå¨"); |
| | | //è·åè´§ä½ |
| | | List<Dt_LocationInfo> locationInfos = _basicRepository.LocationInfoRepository.QueryData(x => x.WarehouseId == WarehouseEnum.LLDCP.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt()); |
| | | Dt_ProStockInfo? stockInfo = BaseDal.Db.Queryable<Dt_ProStockInfo>().Where(x => locationInfos.Select(x => x.LocationCode).Contains(x.LocationCode) && x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt() && x.ProStockAttribute == ProStockAttributeEnum.空æ.ObjToInt()).OrderBy(x => x.CreateDate).ToList().FirstOrDefault() ?? throw new Exception($"åºåç©ºææ°éä¸è¶³"); |
| | | |
| | | Dt_LocationInfo locationInfo = locationInfos.FirstOrDefault(x => x.LocationCode == stockInfo.LocationCode); |
| | | stockInfo.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | |
| | | TaskTypeEnum typeEnum = TaskTypeEnum.OutEmptyPlate; |
| | | |
| | | List<Dt_Task> tasks = GetTasks(new List<Dt_ProStockInfo>() { stockInfo }, typeEnum, new List<Dt_LocationInfo>() { locationInfo }); |
| | | if (tasks == null || tasks.Count <= 0) |
| | | { |
| | | return content.Error($"çæä»»å¡å¤±è´¥"); |
| | | } |
| | | tasks.ForEach(x => |
| | | { |
| | | x.TargetAddress = stationCode; |
| | | }); |
| | | //夿æ¯å¦æåºåºåä¿¡æ¯ |
| | | _unitOfWorkManage.BeginTran(); |
| | | //æ´æ°åºåç¶æ |
| | | _stockRepository.ProStockInfoRepository.UpdateData(stockInfo); |
| | | //æ´æ°è´§ä½ç¶æ |
| | | _basicRepository.LocationInfoRepository.UpdateLocationStatus(new List<Dt_LocationInfo>() { locationInfo }, LocationStatusEnum.Lock); |
| | | //å å
¥è´§ä½åå¨è®°å½ |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(new List<Dt_LocationInfo>() { locationInfo }, LocationStatusEnum.Lock, LocationChangeType.OutboundAssignLocation, taskNums: tasks.Select(x => x.TaskNum).ToList()); |
| | | //æ°å»ºä»»å¡ |
| | | BaseDal.AddData(tasks); |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(tasks); |
| | | content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | return Service.PrintInbound(saveModel); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 空æå çåºåº |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("PlateOutbound"), AllowAnonymous] |
| | | public WebResponseContent PlateOutbound(string stationCode) |
| | | { |
| | | return Service.PlateOutbound(stationCode); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¯ç¨AGVç«ç¹ |
| | | /// </summary> |
| | | /// <param name="keys"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("EnableStatus")] |
| | | public WebResponseContent EnableStatus([FromBody] int[] keys) |
| | | { |
| | | return Service.EnableStatus(keys); |
| | | } |
| | | [HttpPost, HttpGet, Route("DisableStatus")] |
| | | public WebResponseContent DisableStatus([FromBody] int[] keys) |
| | | { |
| | | return Service.DisableStatus(keys); |
| | | } |
| | | } |
| | | } |
| | |
| | | //æååæåå®ä½è½¬æ¢ |
| | | CreateMap<MESProInDTO, Dt_MESProInOrderInfo>().ForMember(x => x.MESProInStatus, b => b.MapFrom(b => InOrderStatusEnum.æªå¼å§.ObjToInt())); |
| | | //äºæERPç©ææ¥æ¶å®ä½è½¬æ¢ |
| | | CreateMap<ERPMaterialDTO, Dt_MaterielInfo>().ForMember(x => x.MaterielInvOrgId, b => b.MapFrom(b => MaterielInvOrgEnum.æ°å.ObjToInt())).ForMember(x => x.MaterielCode, b => b.MapFrom(b => b.MaterielNo)).ForMember(x => x.MaterielSourceType, b => b.MapFrom(b => b.MaterielType)).ForMember(x => x.MaterielWide, b => b.MapFrom(b => b.MaterielWidth)).ForMember(x => x.MaterielWeight, b => b.MapFrom(b => b.Weight)).ForMember(x => x.MaterielState, b => b.MapFrom(b => b.State)).ForMember(x => x.MaterielUnit, b => b.MapFrom(b => b.Unit)).ForMember(x => x.MaterielSpec, b => b.MapFrom(b => b.MaterielSpec)); |
| | | CreateMap<ERPMaterialDTO, Dt_MaterielInfo>().ForMember(x => x.MaterielInvOrgId, b => b.MapFrom(b => MaterielInvOrgEnum.æ°å.ObjToInt())).ForMember(x => x.MaterielCode, b => b.MapFrom(b => b.MaterielNo)).ForMember(x => x.MaterielSourceType, b => b.MapFrom(b => b.MaterielType)).ForMember(x => x.MaterielWide, b => b.MapFrom(b => b.MaterielWidth)).ForMember(x => x.MaterielWeight, b => b.MapFrom(b => b.Weight.IsNullOrEmpty()? 0: Convert.ToDecimal(b.Weight))).ForMember(x => x.MaterielState, b => b.MapFrom(b => b.State)).ForMember(x => x.MaterielUnit, b => b.MapFrom(b => b.Unit)).ForMember(x => x.MaterielSpec, b => b.MapFrom(b => b.MaterielSpec)); |
| | | //åæéç¼åéè´è½¬æ¢ |
| | | CreateMap<Dt_PurchaseBSTOrderDetail, Dt_YLInboundCache>().ForMember(x => x.Id, b => b.MapFrom(b => 0)).ForMember(x => x.BindStatus, b => b.MapFrom(b => WhetherEnum.False.ObjToInt())).ForMember(x => x.RfidCode, b => b.MapFrom(b => "")).ForMember(x => x.InvOrg, b => b.MapFrom(b => MaterielInvOrgEnum.èå.ToString())); |
| | | //äºæERPä¾åºåè½¬æ¢ |