From d0cc37c3c11859cc55f30624692dca55be2b8a32 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 29 十二月 2025 07:26:51 +0800
Subject: [PATCH] 变更及代码优化
---
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 26
项目代码/WCS/WCSServices/WIDESEAWCS_Model/Models/PackInfo/Dt_PackType.cs | 38 +
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs | 33
项目代码/WCS/WCSServices/WIDESEAWCS_IPackInfoRepository/IDt_PackaxisRepository.cs | 1
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs | 66 ++
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPB.cs | 193 ++---
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs | 2
项目资料/通信协议/纸片料架DB块数据.zip | 0
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 142 +++-
项目代码/WMS/WMSServices/WIDESEA_IStockService/IProStockInfoService.cs | 8
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs | 13
项目代码/WMS/WMSClient/src/components/basic/ViewGrid/methods.js | 9
项目代码/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs | 15
项目代码/WMS/WMSServices/WIDESEA_External/IERPService/IInvokeERPService.cs | 6
项目代码/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs | 94 +
项目代码/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_PackaxisTask_Hty.cs | 18
项目代码/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs | 64 +
项目代码/WCS/WCSServices/WIDESEAWCS_Server/Controllers/PackInfo/PackaxisController.cs | 1
项目代码/WMS/WMSServices/WIDESEA_DTO/Basic/ERPMaterialDTO.cs | 8
项目代码/WMS/WMSClient/package-lock.json | 174 ++--
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 223 +++++-
项目代码/WMS/WMSServices/WIDESEA_Core/BaseModels/WebResponseContent.cs | 4
项目代码/WCS/WCSServices/WIDESEAWCS_Model/Models/PackInfo/Dt_Packaxis.cs | 2
项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutMESOrderService.cs | 17
项目代码/WMS/WMSServices/WIDESEA_StockService/ProStockInfoService.cs | 47 +
项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutStockLockInfoService.cs | 4
项目代码/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs | 4
项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs | 118 +--
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPH.cs | 1
项目代码/WMS/WMSServices/WIDESEA_Common/APIEnum/APIEnum.cs | 5
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs | 111 +++
项目代码/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_PackaxisTask.cs | 127 +++
项目代码/WMS/WMSServices/WIDESEA_Common/CommonEnum/StationAreaEnum.cs | 7
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/AGV_CPExtend.cs | 2
项目资料/接口协议/RCS取货放货完成信号.docx | 0
项目代码/WCS/WCSClient/package-lock.json | 174 ++--
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/码垛/MDJob_CP.cs | 3
项目代码/WCS/WCSServices/WIDESEAWCS_PackInfoRepository/Dt_PackaxisRepository.cs | 1
项目代码/WMS/WMSServices/WIDESEA_IStockRepository/IProStockInfoRepository.cs | 1
项目代码/WMS/WMSClient/src/views/basic/agvStationInfo.vue | 6
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/ConveyorLineJob_YL1ndFloor.cs | 30
项目资料/接口协议/ERP 原纸重量修正接口对接文档.docx | 0
项目代码/WMS/WMSServices/WIDESEA_DTO/ERP/BSTWeightUpDTO.cs | 49 +
项目代码/WMS/WMSServices/WIDESEA_StockRepository/ProStockInfoRepository.cs | 10
项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs | 2
项目代码/WCS/WCSServices/WIDESEAWCS_IPackInfoService/IDt_PackaxisService.cs | 2
项目代码/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs | 15
项目代码/WMS/WMSClient/src/extension/basic/agvStationInfo.js | 30
项目资料/接口协议/物料克重查询 API 接口文档.pdf | 0
项目代码/WCS/WCSServices/WIDESEAWCS_PackInfoService/Dt_PackaxisService.cs | 2
项目代码/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs | 7
项目代码/WMS/WMSServices/WIDESEA_Core/Helper/HttpHelper.cs | 6
52 files changed, 1,397 insertions(+), 524 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/package-lock.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/package-lock.json"
index 15e9bc4..79b2868 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/package-lock.json"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/package-lock.json"
@@ -1278,11 +1278,6 @@
"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",
@@ -1841,6 +1836,87 @@
"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": {
@@ -4938,6 +5014,13 @@
"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": {
@@ -12522,87 +12605,6 @@
"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"
- }
}
}
},
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
index 7b0aa03..97179eb 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
@@ -10,12 +10,6 @@
public enum TaskTypeEnum
{
/// <summary>
- /// 棰嗘枡鍑哄簱
- /// </summary>
- [Description("棰嗘枡鍑哄簱")]
- Outbound = 100,
-
- /// <summary>
/// 鐩樼偣鍑哄簱
/// </summary>
[Description("鐩樼偣鍑哄簱")]
@@ -34,28 +28,46 @@
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>
/// 杈呮枡鏃犵汉甯冨嚭搴�
@@ -76,12 +88,6 @@
OutWFBLM = 370,
/// <summary>
- /// 绾稿紶娣嬭啘鍑哄簱
- /// </summary>
- [Description("绾稿紶娣嬭啘鍑哄簱")]
- OutPaperLM = 380,
-
- /// <summary>
/// 鍐插垏鍖哄嚭搴�
/// </summary>
[Description("鍐插垏鍖哄嚭搴�")]
@@ -98,12 +104,6 @@
/// </summary>
[Description("鍒嗗垏鍖哄嚭搴�")]
OutFenQie = 410,
-
- /// <summary>
- /// 鏃犵汉甯冨埗琚嬩緵鏂�
- /// </summary>
- [Description("鏃犵汉琚嬪埗琚嬩緵鏂�")]
- OutWFBGL = 420,
/// <summary>
/// 閲囪喘鍏ュ簱
@@ -142,27 +142,57 @@
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>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_IPackInfoRepository/IDt_PackaxisRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_IPackInfoRepository/IDt_PackaxisRepository.cs"
index 90593bb..149194f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_IPackInfoRepository/IDt_PackaxisRepository.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_IPackInfoRepository/IDt_PackaxisRepository.cs"
@@ -5,7 +5,6 @@
using System.Threading.Tasks;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Model.Models;
-using WIDESEAWCS_Model.Models.PackInfo;
namespace WIDESEAWCS_IPackInfoRepository
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_IPackInfoService/IDt_PackaxisService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_IPackInfoService/IDt_PackaxisService.cs"
index 93c51b4..d91b749 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_IPackInfoService/IDt_PackaxisService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_IPackInfoService/IDt_PackaxisService.cs"
@@ -4,7 +4,7 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.BaseServices;
-using WIDESEAWCS_Model.Models.PackInfo;
+using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_PackInfoService
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
index f17ce7c..5b01ba4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
@@ -60,12 +60,13 @@
WebResponseContent ReceiveWMSTask([NotNull] List<WMSTaskDTO> taskDTOs);
/// <summary>
- /// 鏍规嵁鎵樼洏鍙枫�佽捣濮嬪湴鍧�鍚慦MS璇锋眰浠诲姟
+ /// 鏍规嵁缁堢偣鍦板潃鍚慦MS璇锋眰浠诲姟
/// </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>
@@ -95,7 +96,7 @@
/// <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);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/PackInfo/Dt_PackType.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/PackInfo/Dt_PackType.cs"
new file mode 100644
index 0000000..ae986ce
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/PackInfo/Dt_PackType.cs"
@@ -0,0 +1,38 @@
+锘縰sing 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; }
+ }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/PackInfo/Dt_Packaxis.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/PackInfo/Dt_Packaxis.cs"
index 4cc0027..9c53d8a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/PackInfo/Dt_Packaxis.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/PackInfo/Dt_Packaxis.cs"
@@ -6,7 +6,7 @@
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
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_PackaxisTask.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_PackaxisTask.cs"
new file mode 100644
index 0000000..da3214c
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_PackaxisTask.cs"
@@ -0,0 +1,127 @@
+锘�#region << 鐗� 鏈� 娉� 閲� >>
+/*----------------------------------------------------------------
+ * 鍛藉悕绌洪棿锛歐IDESEAWCS_Model.Models.TaskInfo
+ * 鍒涘缓鑰咃細鑳$搴�
+ * 鍒涘缓鏃堕棿锛�2024/8/2 16:13:36
+ * 鐗堟湰锛歏1.0.0
+ * 鎻忚堪锛�
+ *
+ * ----------------------------------------------------------------
+ * 淇敼浜猴細
+ * 淇敼鏃堕棿锛�
+ * 鐗堟湰锛歏1.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; }
+ }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_PackaxisTask_Hty.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_PackaxisTask_Hty.cs"
new file mode 100644
index 0000000..e788630
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Model/Models/TaskInfo/Dt_PackaxisTask_Hty.cs"
@@ -0,0 +1,18 @@
+锘縰sing 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; }
+ }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoRepository/Dt_PackaxisRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoRepository/Dt_PackaxisRepository.cs"
index dbf58a8..fcd0201 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoRepository/Dt_PackaxisRepository.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoRepository/Dt_PackaxisRepository.cs"
@@ -6,7 +6,6 @@
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_IPackInfoRepository;
using WIDESEAWCS_Model.Models;
-using WIDESEAWCS_Model.Models.PackInfo;
namespace WIDESEAWCS_PackInfoRepository
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/Dt_PackaxisService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/Dt_PackaxisService.cs"
index 2a793c3..0088e12 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/Dt_PackaxisService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_PackInfoService/Dt_PackaxisService.cs"
@@ -11,11 +11,11 @@
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
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
index e1f0907..68f68b3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
@@ -278,6 +278,10 @@
_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;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/PackInfo/PackaxisController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/PackInfo/PackaxisController.cs"
index 08c52b5..6d861c9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/PackInfo/PackaxisController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/PackInfo/PackaxisController.cs"
@@ -9,7 +9,6 @@
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
-using WIDESEAWCS_Model.Models.PackInfo;
using WIDESEAWCS_PackInfoService;
using WIDESEAWCS_Tasks;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 202738c..27f36e1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -234,9 +234,18 @@
//鍏ュ簱
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 //鍑哄簱
{
@@ -302,17 +311,15 @@
}
/// <summary>
- /// 鏍规嵁鎵樼洏鍙枫�佽捣濮嬪湴鍧�鍚慦MS璇锋眰浠诲姟
+ /// 鏍规嵁缁堢偣鍦板潃鍚慦MS璇锋眰浠诲姟
/// </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($"鏈壘鍒扮珯鍙颁俊鎭�");
@@ -322,29 +329,15 @@
{
return WebResponseContent.Instance.Error($"鏈壘鍒癢MSApi鍦板潃");
}
- 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;
}
@@ -366,7 +359,7 @@
return WebResponseContent.Instance.Error($"鏈壘鍒癢MSApi鍦板潃");
}
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());
@@ -377,13 +370,13 @@
}
else
{
- content = responseContent ?? content.Error("缁撴灉閿欒");
+ content = responseContent;
}
}
catch (Exception ex)
{
- content = WebResponseContent.Instance.Error(ex.Message);
+ content.Error(ex.Message);
}
return content;
}
@@ -392,7 +385,7 @@
/// </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");
@@ -401,7 +394,7 @@
return WebResponseContent.Instance.Error($"鏈壘鍒癢MSApi鍦板潃");
}
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;
@@ -436,7 +429,7 @@
}
catch (Exception ex)
{
- content = WebResponseContent.Instance.Error(ex.Message);
+ content.Error(ex.Message);
}
return content;
}
@@ -456,16 +449,15 @@
return WebResponseContent.Instance.Error($"鏈壘鍒癢MSApi鍦板潃");
}
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;
}
@@ -476,40 +468,30 @@
/// <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($"鏈壘鍒癢MSApi鍦板潃");
- //}
- //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($"鏈壘鍒癢MSApi鍦板潃");
+ }
+ 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)
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs"
index 3d32d3f..3cb75a6 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs"
@@ -120,22 +120,26 @@
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
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
index 28dbd16..0aede40 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
@@ -139,7 +139,7 @@
{
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)
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs"
index ffded56..640efb0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs"
@@ -79,74 +79,77 @@
{
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鎺ラ┏浣嶄氦浜�
+ {//浜屾ゼ鍑哄簱鍙h浆AGV浠诲姟
R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 2 && conveyorLineInfoRead.TaskNo > 0)
{
@@ -173,7 +176,7 @@
else if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProRead != null && deviceProWrite != null)
{
R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
- //鎴愬搧涓�妤煎叆搴撳彛鍐欏叆瀵瑰簲鍏ュ簱绔欏彴鍦板潃
+ //鎴愬搧浜屾ゼ鍏ュ簱鍙e啓鍏ュ搴斿叆搴撶珯鍙板湴鍧�
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);
@@ -209,72 +212,32 @@
}
}
}
- 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
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs"
index 39105b3..78997e5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPH.cs"
@@ -106,7 +106,6 @@
//鐮佸灈鐜嚎璇锋眰浠诲姟
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);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs"
index 7a01bb0..2e405db 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs"
@@ -21,7 +21,6 @@
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;
@@ -157,7 +156,7 @@
//鏇存柊浠诲姟淇℃伅
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;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/package-lock.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/package-lock.json"
index 16d2d91..357f40e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/package-lock.json"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/package-lock.json"
@@ -1438,6 +1438,11 @@
"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",
@@ -1996,87 +2001,6 @@
"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": {
@@ -5174,13 +5098,6 @@
"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": {
@@ -12932,6 +12849,87 @@
}
}
},
+ "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",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/components/basic/ViewGrid/methods.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/components/basic/ViewGrid/methods.js"
index fa02eca..70ff0a4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/components/basic/ViewGrid/methods.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/components/basic/ViewGrid/methods.js"
@@ -853,7 +853,7 @@
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;
@@ -861,6 +861,13 @@
this.resetDetailTable(row);
this.setEditForm(row);
this.setContinueAdd(false);
+ this.boxButtons.forEach((btn) => {
+ if (btn.name == '淇� 瀛�') {
+ btn.hidden = true;
+ //鎴栬�呰缃彧璇�
+ //btn.readonly=true;
+ }
+ });
//璁剧疆杩滅▼鏌ヨ琛ㄥ崟鐨勯粯璁ey/value
this.getRemoteFormDefaultKeyValue();
//鐐瑰嚮缂栬緫鎸夐挳寮瑰嚭妗嗗悗锛屽彲浠ュ湪姝ゅ鍐欓�昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/basic/agvStationInfo.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/basic/agvStationInfo.js"
index 8b85be7..8fa58aa 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/basic/agvStationInfo.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/basic/agvStationInfo.js"
@@ -16,6 +16,36 @@
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鎴栬�卻plice鏂规硶鏉ヤ慨鏀筨uttons鏁扮粍
// name: '鎸夐挳', //鎸夐挳鍚嶇О
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/agvStationInfo.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/agvStationInfo.vue"
index bec428d..89a8ecf 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/agvStationInfo.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/agvStationInfo.vue"
@@ -69,13 +69,15 @@
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'},
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/APIEnum/APIEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/APIEnum/APIEnum.cs"
index e2e9911..cf50bb7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/APIEnum/APIEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/APIEnum/APIEnum.cs"
@@ -72,5 +72,10 @@
/// </summary>
[Description("ERP鍗婃垚鍝佸叆搴撴帹閫�")]
ERPSemiProInUp,
+ /// <summary>
+ /// BST绉伴噸鍥炰紶
+ /// </summary>
+ [Description("BST绉伴噸鍥炰紶")]
+ BSTWeightUp
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/CommonEnum/StationAreaEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/CommonEnum/StationAreaEnum.cs"
index cc38534..ba42f2a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/CommonEnum/StationAreaEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/CommonEnum/StationAreaEnum.cs"
@@ -114,6 +114,11 @@
/// 浜屾ゼ鎴愬搧搴撶紦瀛樺尯
/// </summary>
[Description("浜屾ゼ鎴愬搧搴撶紦瀛樺尯")]
- 浜屾ゼ鎴愬搧搴撶紦瀛樺尯 = 18
+ 浜屾ゼ鎴愬搧搴撶紦瀛樺尯 = 18,
+ /// <summary>
+ /// 涓�妤兼殏瀛樻灦
+ /// </summary>
+ [Description("涓�妤兼殏瀛樻灦")]
+ 涓�妤兼殏瀛樻灦 = 19
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
index 61a71e3..74f97e1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
@@ -28,21 +28,27 @@
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>
@@ -52,9 +58,9 @@
OutPaperLM = 320,
/// <summary>
- /// 鍘熸枡绾歌鍒惰渚涙枡
+ /// 绾歌鍒惰渚涙枡
/// </summary>
- [Description("鍘熸枡绾歌鍒惰渚涙枡")]
+ [Description("绾歌鍒惰渚涙枡")]
PaperYLOutZDGL = 330,
/// <summary>
@@ -136,27 +142,57 @@
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>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/WebResponseContent.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/WebResponseContent.cs"
index e2304b9..fb426a9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/WebResponseContent.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/WebResponseContent.cs"
@@ -43,7 +43,7 @@
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;
}
@@ -51,7 +51,7 @@
{
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;
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/HttpHelper.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/HttpHelper.cs"
index 91b3d43..4d2dca8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/HttpHelper.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/HttpHelper.cs"
@@ -111,11 +111,7 @@
{
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)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/ERPMaterialDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/ERPMaterialDTO.cs"
index 9a3b1bf..f96de2f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/ERPMaterialDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/ERPMaterialDTO.cs"
@@ -64,8 +64,8 @@
/// <summary>
/// 鐗╂枡閲�
/// </summary>
- [PropertyValidate("鐗╂枡閲�", NotNullAndEmpty = true)]
- public decimal Weight { get; set; }
+ [PropertyValidate("鐗╂枡閲�", NotNullAndEmpty = false)]
+ public string Weight { get; set; }
/// <summary>
/// 鐘舵��
/// </summary>
@@ -90,9 +90,9 @@
[PropertyValidate("璁¢噺鍗曚綅锛欿g:鍏枻銆丮锛氱背銆丳cs锛氫釜(鍙�)", NotNullAndEmpty = true)]
public string Unit { get; set; }
/// <summary>
- /// 璁¢噺鍗曚綅
+ /// 杈呭崟浣�
/// </summary>
- [PropertyValidate("璁¢噺鍗曚綅锛欿g:鍏枻銆丮锛氱背銆丳cs锛氫釜(鍙�)", NotNullAndEmpty = true)]
+ [PropertyValidate("杈呭崟浣嶏細Kg:鍏枻銆丮锛氱背銆丳cs锛氫釜(鍙�)", NotNullAndEmpty = true)]
public string AssistUnitCode { get; set; }
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTWeightUpDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTWeightUpDTO.cs"
new file mode 100644
index 0000000..18440c0
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTWeightUpDTO.cs"
@@ -0,0 +1,49 @@
+锘縰sing 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; }
+ }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs"
index 422137e..759c6e8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs"
@@ -8,6 +8,7 @@
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;
@@ -106,5 +107,19 @@
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;
+ }
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/IERPService/IInvokeERPService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/IERPService/IInvokeERPService.cs"
index 8b862e7..23fdc34 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/IERPService/IInvokeERPService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/IERPService/IInvokeERPService.cs"
@@ -5,6 +5,7 @@
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.Helper;
+using WIDESEA_DTO.ERP;
using WIDESEA_External.Model;
using WIDESEA_Model.Models;
@@ -45,5 +46,10 @@
/// </summary>
/// <returns></returns>
string ERPSemiProInUp(ERPProInUpModel eRPProInUpModel);
+ /// <summary>
+ /// BST绉伴噸鍥炰紶
+ /// </summary>
+ /// <returns></returns>
+ string BSTWeightUp(BSTWeightUpDTO bSTWeightUpDTO);
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutMESOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutMESOrderService.cs"
index f673809..c92d838 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutMESOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutMESOrderService.cs"
@@ -20,9 +20,24 @@
/// </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);
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
index 17e057a..8177273 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
@@ -32,6 +32,10 @@
/// <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);
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockRepository/IProStockInfoRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockRepository/IProStockInfoRepository.cs"
index 553243d..7995eb4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockRepository/IProStockInfoRepository.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockRepository/IProStockInfoRepository.cs"
@@ -10,5 +10,6 @@
{
public interface IProStockInfoRepository : IRepository<Dt_ProStockInfo>
{
+ List<Dt_ProStockInfo> GetStockInfos(string materielCode, List<string> locationCodes);
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IProStockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IProStockInfoService.cs"
index 85db83e..9b35b49 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IProStockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IProStockInfoService.cs"
@@ -13,5 +13,13 @@
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);
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
index 4293f6d..967a02c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -260,5 +260,20 @@
/// <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);
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs"
index 1e1cc51..bae658a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs"
@@ -10,7 +10,7 @@
namespace WIDESEA_Model.Models
{
/// <summary>
- /// 鍑哄簱璇︽儏
+ /// 鍑哄簱璇︽儏(鍘熸枡)
/// </summary>
[SugarTable(nameof(Dt_OutStockLockInfo), "鍑哄簱璇︽儏")]
public class Dt_OutStockLockInfo : BaseEntity
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs"
index c420a2a..3368a57 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs"
@@ -6,6 +6,7 @@
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;
@@ -107,7 +108,7 @@
}
/// <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)
{
@@ -146,7 +147,46 @@
}
}
/// <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)
{
@@ -212,5 +252,72 @@
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);
+ }
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs"
index 1a663c2..c26b099 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -66,7 +66,7 @@
return outStockLockInfo;
}
/// <summary>
- /// 鐢熸垚MES鍑哄簱璇︽儏
+ /// 鐢熸垚MES鍑哄簱璇︽儏(鍘熸枡)
/// </summary>
public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutMESOrder ouMESOrder, Dt_StockInfo outStock, decimal assignQuantity, int? taskNum = null)
{
@@ -75,7 +75,7 @@
PalletCode = outStock.PalletCode,
AssignQuantity = assignQuantity,
MaterielCode = ouMESOrder.MaterialCode,
- BatchNo = outStock.BatchNo,
+ BatchNo = outStock.BatchNo ?? "",
LocationCode = outStock.LocationCode,
MaterielName = outStock.MaterielName,
OrderDetailId = ouMESOrder.OutDetailId,
@@ -96,6 +96,35 @@
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)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/ProStockInfoRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/ProStockInfoRepository.cs"
index b78cdfd..d1f0c0c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/ProStockInfoRepository.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/ProStockInfoRepository.cs"
@@ -21,5 +21,15 @@
{
_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;
+ }
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockInfoService.cs"
index aff2f8f..b584466 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockInfoService.cs"
@@ -26,5 +26,52 @@
_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;
+ }
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
index 752fc07..182cac7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -228,6 +228,7 @@
//閫�鏂�
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;
@@ -309,13 +310,25 @@
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();
//鎺ㄩ�佷换鍔�
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs"
index 342c059..517040a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs"
@@ -18,11 +18,13 @@
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;
@@ -35,6 +37,7 @@
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;
@@ -185,5 +188,68 @@
}
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;
+ }
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index e20a855..e1b621b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -2,6 +2,7 @@
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;
@@ -51,12 +52,7 @@
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($"鏈壘鍒扮粍鐩樹俊鎭�");
@@ -98,7 +94,7 @@
_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);
@@ -216,8 +212,13 @@
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);
//璁板綍搴撳瓨鍙樺姩
@@ -227,8 +228,13 @@
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);
//璁板綍搴撳瓨鍙樺姩
@@ -349,32 +355,64 @@
/// 鏇存柊閫�鏂欏簱瀛�
/// </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}涓�鏈烢RP搴撳瓨涓嶅瓨鍦�");
- }
+ BSTResponse<BSTStockInfoDTO> bSTResponse = _invokeERPService.BSTStockAsync(stockInfoOld.PalletCode).DeserializeObject<BSTResponse<BSTStockInfoDTO>>();
+ if (bSTResponse.Code == 500)
+ {
+ throw new Exception($"鏈壘鍒版潯鐮亄stockInfoOld.PalletCode}涓�鏈烢RP搴撳瓨涓嶅瓨鍦�");
+ }
- BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"涓�鏈烢RP鏈繑鍥瀧stockInfoOld.PalletCode}鐨勫簱瀛樹俊鎭�");
- if (stockInfoOld.StockStatus == StockStatusEmun.鑰佸巶閫�鏂欐殏瀛�.ObjToInt())
- {
- stockInfoOld.IsPick = WhetherEnum.False.ObjToInt();
+ BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"涓�鏈烢RP鏈繑鍥瀧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)
{
@@ -820,9 +858,14 @@
//闄愬埗鐩村緞
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);
}
}
@@ -916,7 +959,7 @@
{
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();
@@ -973,7 +1016,7 @@
}
//鑾峰彇璐т綅淇℃伅
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($"鏈壘鍒板搴旂殑缁堢偣璐т綅淇℃伅");
}
@@ -985,14 +1028,25 @@
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();
//璁板綍搴撳瓨鍙樺姩
@@ -1883,5 +1937,21 @@
}
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);
+ }
+ }
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index 8217f9e..7e82669 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -299,7 +299,59 @@
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>
@@ -320,6 +372,7 @@
{
(int)StationAreaEnum.浜屾ゼ绾歌 => TaskTypeEnum.PaperYLOutZDGL,
(int)StationAreaEnum.涓�妤煎嵃鍒� => TaskTypeEnum.PrintYLOutbound,
+ (int)StationAreaEnum.涓�妤煎垎鍒� => TaskTypeEnum.OutFenQie,
_ => throw new Exception($"鏈壘鍒板姞宸ヤ腑蹇冧换鍔$被鍨嬪垎閰�")
};
Dt_Task task = new()
@@ -383,7 +436,7 @@
PalletType = stockInfo.PalletType,
WarehouseId = stockInfo.WarehouseId,
MaterielCode= stockInfo.proStockInfoDetails?.FirstOrDefault().ProductCode ?? "" ,
- Quantity = 0,
+ Quantity = stockInfo.proStockInfoDetails?.Sum(x=>x.StockQty) ?? 0,
};
tasks.Add(task);
}
@@ -455,6 +508,7 @@
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,
@@ -897,54 +951,98 @@
//鎿嶄綔鏁版嵁锛屽苟鍒嗛厤闇�姹傚簱瀛�
_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("鎺ユ敹鎴愬姛");
@@ -955,5 +1053,56 @@
}
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;
+ }
}
}
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index f09f439..6e7bed8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -300,5 +300,31 @@
{
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);
+ }
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
index d526399..638257a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
@@ -52,7 +52,7 @@
//鎴愬搧鍗婃垚鍝佸疄浣撹浆鎹�
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渚涘簲鍟嗚浆鎹�
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/ERP \345\216\237\347\272\270\351\207\215\351\207\217\344\277\256\346\255\243\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\243.docx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/ERP \345\216\237\347\272\270\351\207\215\351\207\217\344\277\256\346\255\243\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\243.docx"
new file mode 100644
index 0000000..1139cb0
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/ERP \345\216\237\347\272\270\351\207\215\351\207\217\344\277\256\346\255\243\346\216\245\345\217\243\345\257\271\346\216\245\346\226\207\346\241\243.docx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/RCS\345\217\226\350\264\247\346\224\276\350\264\247\345\256\214\346\210\220\344\277\241\345\217\267.docx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/RCS\345\217\226\350\264\247\346\224\276\350\264\247\345\256\214\346\210\220\344\277\241\345\217\267.docx"
new file mode 100644
index 0000000..7ce33fb
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/RCS\345\217\226\350\264\247\346\224\276\350\264\247\345\256\214\346\210\220\344\277\241\345\217\267.docx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\347\211\251\346\226\231\345\205\213\351\207\215\346\237\245\350\257\242 API \346\216\245\345\217\243\346\226\207\346\241\243.pdf" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\347\211\251\346\226\231\345\205\213\351\207\215\346\237\245\350\257\242 API \346\216\245\345\217\243\346\226\207\346\241\243.pdf"
new file mode 100644
index 0000000..294bce6
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\347\211\251\346\226\231\345\205\213\351\207\215\346\237\245\350\257\242 API \346\216\245\345\217\243\346\226\207\346\241\243.pdf"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256.zip" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256.zip"
new file mode 100644
index 0000000..a040f9b
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\347\272\270\347\211\207\346\226\231\346\236\266DB\345\235\227\346\225\260\346\215\256.zip"
Binary files differ
--
Gitblit v1.9.3