From ad4d32dc4e162ba7fb71cd3bc213f1d71c964551 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期二, 13 五月 2025 14:30:57 +0800 Subject: [PATCH] 最新代码上传 --- 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/dc43775f-a589-43e0-ab2e-b520b2970e2f.vsidx | 0 代码管理/WMS/WIDESEA_WMSClient/package.json | 1 代码管理/WMS/WIDESEA_WMSClient/src/views/inbound/takeStockOrder.vue | 12 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs | 10 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesSolderService.cs | 39 + 代码管理/WMS/WIDESEA_WMSClient/src/extension/inbound/proInStatistics.js | 58 ++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/ProInStatisticsRepository.cs | 18 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs | 60 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs | 5 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpProInErpStaticResponseContent.cs | 53 ++ 代码管理/WMS/WIDESEA_WMSClient/src/views/inbound/proInStatistics.vue | 133 +++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs | 16 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 35 + 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/75693363-5582-43f5-be32-c05f8e59864c.vsidx | 0 代码管理/WMS/WIDESEA_WMSClient/src/views/Index.vue | 2 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8dd87865-fe22-4130-8231-509473f7b6d4.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/SupplierInfoService.cs | 29 + 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5c317bcb-c94b-4bed-9f83-e46eb803dadb.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_ProInStatistics.cs | 58 ++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IProInStatisticsService.cs | 20 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs | 2 代码管理/WMS/WIDESEA_WMSClient/src/router/viewGird.js | 10 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/UserInfoService.cs | 40 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs | 95 ++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ProInStatisticsController.cs | 25 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IProInStatisticsRepository.cs | 14 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/ProInStaticDTO.cs | 18 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesSolderModel.cs | 39 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 6 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs | 9 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 8 /dev/null | 0 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/proOutboundOrderDetail.vue | 28 + 代码管理/WMS/WIDESEA_WMSClient/src/views/charts/AssembleDist.vue | 418 ++++++++++++++++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/LargeScreen/LargeController.cs | 57 + 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/44cb5461-c100-4e78-a381-4330ae4ab9de.vsidx | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/ConveyorLineJob_BC.cs | 2 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/64543623-d20f-4ad8-bb49-9a281bd1f5fd.vsidx | 0 代码管理/WMS/WIDESEA_WMSClient/package-lock.json | 6 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/98f0b9d5-ff15-4c89-a627-e626a260486c.vsidx | 0 代码管理/WMS/WIDESEA_WMSClient/src/views/inbound/purchaseOrder.vue | 1 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrder.cs | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/成品仓/AGV_CPExtend.cs | 4 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs | 8 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/RGVJob_BC.cs | 2 47 files changed, 1,258 insertions(+), 89 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/3af1e258-93ea-4eb7-beaf-1a32711c2304.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/3af1e258-93ea-4eb7-beaf-1a32711c2304.vsidx" deleted file mode 100644 index 943b571..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/3af1e258-93ea-4eb7-beaf-1a32711c2304.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9a32a7aa-97ea-4fa5-b885-f035e75f06c6.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/44cb5461-c100-4e78-a381-4330ae4ab9de.vsidx" similarity index 100% rename from "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9a32a7aa-97ea-4fa5-b885-f035e75f06c6.vsidx" rename to "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/44cb5461-c100-4e78-a381-4330ae4ab9de.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8dd87865-fe22-4130-8231-509473f7b6d4.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8dd87865-fe22-4130-8231-509473f7b6d4.vsidx" new file mode 100644 index 0000000..8e7940b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8dd87865-fe22-4130-8231-509473f7b6d4.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/105c41ea-f6a5-49a4-bf37-5ca1545f12a9.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/dc43775f-a589-43e0-ab2e-b520b2970e2f.vsidx" similarity index 100% rename from "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/105c41ea-f6a5-49a4-bf37-5ca1545f12a9.vsidx" rename to "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/dc43775f-a589-43e0-ab2e-b520b2970e2f.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" index 2a6d1fb..8909902 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" @@ -55,7 +55,7 @@ }; if (taskDTO.TaskTyp== "CPC") { - taskDTO.Priority = (24 - DateTime.Now.Hour).ToString(); + taskDTO.Priority = task.Grade.ToString(); } if (task.GroupId.IsNotEmptyOrNull()) { @@ -67,10 +67,12 @@ throw new Exception(content.Message); if (taskDTO.TaskTyp == "CPC") { + task.Dispatchertime = DateTime.Now; _taskService.UpdateTask(task, TaskStatusEnum.AGV_Executing); } else { + task.Dispatchertime = DateTime.Now; _taskService.UpdateTask(task, TaskStatusEnum.AGV_Takeing); } Thread.Sleep(500); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" index fa79a4f..dff1ff8 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" @@ -228,7 +228,7 @@ else//鐢熶骇閫�搴� //鎹㈠贩閬撳叆搴� { #region 鐢熶骇閫�搴�,甯︿换鍔″彿鏌ヨ浠诲姟 - Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.WarehouseId == warehouseDevice.WarehouseId); // 甯︿换鍔″彿鏌ヨ浠诲姟 + Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.WarehouseId == warehouseDevice.WarehouseId && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt()); // 甯︿换鍔″彿鏌ヨ浠诲姟 Dt_Task taskIn = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.DeviceCode == item.StationDeviceCode && x.NextAddress == item.StationCode && x.WarehouseId == warehouseDevice.WarehouseId && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt()); // 甯︿换鍔″彿鏌ヨ浠诲姟 if (task != null) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs" index 6f74481..a6c540b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs" @@ -133,7 +133,7 @@ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode); device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode); device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); - _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing); + _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute); } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/package-lock.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/package-lock.json" index 71a1cc1..3879cd6 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/package-lock.json" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/package-lock.json" @@ -4701,9 +4701,9 @@ "integrity": "sha512-GODcnWq3YGoTnygPfi02ygEiRxqUxpJwuRHjdhJYuxpcZmDq4rjBiXYmbCCzStxo176ixfLT6i4NPwQooRySnw==" }, "dayjs": { - "version": "1.11.5", - "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.5.tgz", - "integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==" + "version": "1.11.13", + "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz", + "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" }, "debug": { "version": "4.3.2", diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/package.json" index e81efa4..7b4688c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/package.json" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/package.json" @@ -14,6 +14,7 @@ "ali-oss": "^6.17.1", "axios": "^0.21.1", "core-js": "^3.6.5", + "dayjs": "^1.11.13", "echarts": "^5.0.2", "element-plus": "^2.2.14", "jsbarcode": "^3.11.6", diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/inbound/proInStatistics.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/inbound/proInStatistics.js" new file mode 100644 index 0000000..24e1d94 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/inbound/proInStatistics.js" @@ -0,0 +1,58 @@ + +//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 + +let extension = { + components: { + //鏌ヨ鐣岄潰鎵╁睍缁勪欢 + gridHeader: '', + gridBody: '', + gridFooter: '', + //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 + modelHeader: '', + modelBody: '', + modelFooter: '' + }, + tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) + buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽� + methods: { + //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� + onInit() { + }, + onInited() { + //妗嗘灦鍒濆鍖栭厤缃悗 + //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔 + //this.detailOptions.columns.forEach(column=>{ }); + }, + searchBefore(param) { + //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟 + //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ + return true; + }, + searchAfter(result) { + //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊� + return true; + }, + addBefore(formData) { + //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫�� + return true; + }, + updateBefore(formData) { + //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d + return true; + }, + rowClick({ row, column, event }) { + //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠� + this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�; + }, + modelOpenAfter(row) { + //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁 + //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add'; + //(2)缁欏脊鍑烘璁剧疆榛樿鍊� + //(3)this.editFormFields.瀛楁='xxx'; + //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊� + //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions) + } + } + }; + export default extension; + \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/proOutboundOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/proOutboundOrderDetail.vue" index 436365b..04d31cf 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/proOutboundOrderDetail.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/proOutboundOrderDetail.vue" @@ -2,6 +2,7 @@ <div> <vol-box v-model="dialogFormVisible" + :on-model-close="closeCustomModel" :lazy="true" width="20%" :padding="15" @@ -185,6 +186,7 @@ formLabelWidth: '160px', formFields1: { LineCode: "", + Grade: "0", }, formRules1:[[ { @@ -201,7 +203,16 @@ extra: { }, - }]], + }], + [ + { + title: "鏄惁浼樺厛", + field: "Grade", + data: [], + required: false, + type: "switch", + }, + ]], form: { name: '', region: '', @@ -472,17 +483,18 @@ var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id this.http - .post("api/Task/OutProductTask?stationCode="+this.formFields1.LineCode, keys, "鏁版嵁澶勭悊涓�") + .post("api/Task/OutProductTask?stationCode="+this.formFields1.LineCode +"&grade="+this.formFields1.Grade, keys, "鏁版嵁澶勭悊涓�") .then((x) => { if (!x.status) return this.$message.error(x.message); this.$message.success("鎿嶄綔鎴愬姛"); + this.formFields1.LineCode=""; + this.formFields1.Grade="0"; + this.dialogFormVisible=false; + this.$parent.refresh(); this.showDetialBox = false; this.$emit("parentCall", ($vue) => { $vue.getData(); }); - this.formFields1.LineCode=""; - this.dialogFormVisible=false; - this.$parent.refresh(); }); }, setCurrent(row) { @@ -537,6 +549,12 @@ } }); }, + closeCustomModel() { + this.formFields1.LineCode=""; + this.formFields1.Grade="0"; + this.dialogFormVisible=false; + this.$parent.refresh(); + }, getDictionary(row, column) { if (this.dictionaryList) { var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" index 0e479ce..afb1d59 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" @@ -273,6 +273,16 @@ path: '/materielnfoStatistics', name: 'materielnfoStatistics', component: () => import('@/views/stock/materielnfoStatistics.vue') + }, + { + path: '/materielnfoStatistics', + name: 'materielnfoStatistics', + component: () => import('@/views/stock/materielnfoStatistics.vue') + }, + { + path: '/proInStatistics', + name: 'proInStatistics', + component: () => import('@/views/inbound/proInStatistics.vue') } ] export default viewgird diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/Index.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/Index.vue" index f0568f5..519f89b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/Index.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/Index.vue" @@ -339,7 +339,7 @@ console.log("WebSocket 杩炴帴鍏抽棴"); setTimeout(createSocket, 10000); }; - + //鐩戝惉socket閿欒淇℃伅 client.onerror = function () {}; }; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/charts/AssembleDist.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/charts/AssembleDist.vue" new file mode 100644 index 0000000..b1c2b43 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/charts/AssembleDist.vue" @@ -0,0 +1,418 @@ +<template> + <el-card + style="border-radius: 0" + :body-style="{ padding: '1rem 2rem' }" + v-loading="loading" + > + <template #header> + <div + style=" + font-weight: bold; + font-size: 1.2rem; + height: 2rem; + line-height: 2rem; + " + > + 鎴愬搧褰撴湀鏁版嵁缁熻 + <el-button @click="refresh" type="success">鍒锋柊</el-button> + </div> + </template> + <div style="display: flex; justify-content: space-between"> + <div ref="operationDom" style="height: 25rem; width: 100%"></div> + </div> + </el-card> +</template> + +<script setup> +import { ref, onMounted, onUnmounted, nextTick } from "vue"; +// 寮曞叆echarts +import * as echarts from "echarts"; +import dayjs from "dayjs"; +import { ElLoading } from "element-plus"; +import http from "@/../src/api/http.js"; +const loading = ref(true); +// 鍒涘缓涓�涓搷搴斿紡寮曠敤鏉ヤ繚瀛楧OM鍏冪礌 +const operationDom = ref(null); +let operationChartInstance = null; +let infoChartInstance = null; +const infoDom = ref(null); +const xData = ref([]); +const yData = ref([]); +const refresh = () => { + const url = "api/ProInStatistics/GetMonthProductions"; + http.post(url, {}, true).then((result) => { + loading.value = true; + operationChartInstance = echarts.init(operationDom.value); + // infoChartInstance=echarts.init(infoDom.value) + let dateList = [ + ["2025-5-1", 0], + ["2025-5-2", 0], + ["2025-5-3", 0], + ["2025-5-4", 0], + ["2025-5-5", 0], + ["2025-5-6", 0], + ["2025-5-7", 10050], + ["2025-5-8", 30000], + ["2025-5-9", 300000], + ["2025-5-10", 0], + ["2025-5-11", 0], + ["2025-5-12", 0], + ["2025-5-13", 0], + ["2025-5-14", 0], + ["2025-5-15", 0], + ["2025-5-16", 0], + ["2025-5-17", 0], + ["2025-5-18", 0], + ["2025-5-19", 0], + ["2025-5-20", 0], + ["2025-5-21", 0], + ["2025-5-22", 0], + ["2025-5-23", 0], + ["2025-5-24", 0], + ["2025-5-25", 0], + ["2025-5-26", 0], + ["2025-5-27", 0], + ["2025-5-28", 0], + ["2025-5-29", 0], + ["2025-5-30", 0], + ["2025-5-31", 0], + ]; + dateList=[]; + const data = result.data; + data.forEach((item) => { + dateList.push([item.dateNow, item.dayProDuctions]); + }); + console.log(dateList); + const heatmapData = []; + const lunarData = []; + for (let i = 0; i < dateList.length; i++) { + heatmapData.push([dateList[i][0], Math.random() * 300]); + lunarData.push([dateList[i][0], 1, dateList[i][1], dateList[i][2]]); + } + let chartData = []; + dateList.forEach((item) => { + chartData.push({ + value: [item[0], item[1]], + itemStyle: + item[0] === dayjs().format('YYYY-MM-DD') + ? { + borderColor: "red", + } + : {}, //褰撳墠鏃ユ湡鏍囨敞杈规涓虹孩鑹� + symbol: "rect", // 鏍稿績1锛岄暱鏂瑰舰鏉ュ~鍏� + }); + }); + var option = { + // tooltip: { + // formatter: function (params) { + // return '闄嶉洦閲�: ' + params.value[1].toFixed(2); + // } + // }, + + visualMap: { + show: false, + min: 0, + max: 300, + calculable: true, + seriesIndex: [2], + orient: "horizontal", + left: "center", + bottom: 20, + inRange: { + color: ["#e0ffff", "#006edd"], + opacity: 0.3, + }, + controller: { + inRange: { + opacity: 0.5, + }, + }, + }, + calendar: { + left: "center", + top: 49, + cellSize: [70, 70], + orient: "vertical", + dayLabel: { + firstDay: 1, + nameMap: "cn", + }, + monthLabel: { + formatter: "{M}鏈�", + }, + range: "2025-05", + yearLabel: { + show: false, + }, + }, + series: [ + { + type: "scatter", + coordinateSystem: "calendar", + symbolSize(params) { + //鏍稿績2 + if (params[0] === dayjs().format('YYYY-MM-DD')) { + return 70; //褰撳墠鏃ユ湡楂樹寒 瀹藉害楂樺害璁剧疆鎴愬拰鍗曞厓鏍煎搴﹂珮搴︿竴鏍� + } else { + return 1; + } + }, + label: { + show: true, + formatter: function (params) { + var d = echarts.number.parseDate(params.value[0]); + if (params.value[0] === dayjs().format('YYYY-MM-DD')) { + return d.getDate() + "\n\n褰撴棩鍏ヤ粨閲廫n\n"; + } + return d.getDate() + "\n\n鍏ヤ粨閲廫n\n"; + }, + color: "#000", + }, + data: chartData, + silent: true, + }, + { + type: "scatter", + coordinateSystem: "calendar", + symbolSize: 0, + label: { + show: true, + formatter: function (params) { + return ( + "\n\n\n" + + (params.value[1] && params.value[1] != undefined + ? params.value[1] + "銕�" + : "0銕�") + ); + }, + fontSize: 14, + fontWeight: 700, + color: "#a00", + }, + data: chartData, + silent: true, + }, + // { + // type: 'scatter', + // coordinateSystem: 'calendar', + // symbolSize: 0, + // label: { + // show: true, + // formatter: function (params) { + // return '\n\n\n' + (params.value[3]?params.value[3]+'銕�' : ''); + // }, + // fontSize: 14, + // fontWeight: 700, + // color: '#a00' + // }, + // data: lunarData, + // silent: true + // }, + ], + }; + operationChartInstance.setOption(option); + // infoChartInstance.setOption(option); + nextTick(() => { + loading.value = false; + }); + + }); + +}; +// 鍒濆鍖朎Charts瀹炰緥骞惰缃厤缃」锛堣繖閲屼互鎶樼嚎鍥句负渚嬶紝浣嗗彲鐏垫椿鏇挎崲锛� +onMounted(async () => { + await nextTick(); // 纭繚DOM宸茬粡娓叉煋瀹屾垚 + const url = "api/ProInStatistics/GetMonthProductions"; + http.post(url, {}, true).then((result) => { + operationChartInstance = echarts.init(operationDom.value); + // infoChartInstance=echartss.init(infoDom.value) + let dateList = [ + ["2025-5-1", 0], + ["2025-5-2", 0], + ["2025-5-3", 0], + ["2025-5-4", 0], + ["2025-5-5", 0], + ["2025-5-6", 0], + ["2025-5-7", 10050], + ["2025-5-8", 30000], + ["2025-5-9", 300000], + ["2025-5-10", 0], + ["2025-5-11", 0], + ["2025-5-12", 0], + ["2025-5-13", 0], + ["2025-5-14", 0], + ["2025-5-15", 0], + ["2025-5-16", 0], + ["2025-5-17", 0], + ["2025-5-18", 0], + ["2025-5-19", 0], + ["2025-5-20", 0], + ["2025-5-21", 0], + ["2025-5-22", 0], + ["2025-5-23", 0], + ["2025-5-24", 0], + ["2025-5-25", 0], + ["2025-5-26", 0], + ["2025-5-27", 0], + ["2025-5-28", 0], + ["2025-5-29", 0], + ["2025-5-30", 0], + ["2025-5-31", 0], + ]; + dateList=[]; + const data = result.data; + data.forEach((item) => { + dateList.push([item.dateNow, item.dayProDuctions]); + }); + console.log(dateList); + const heatmapData = []; + const lunarData = []; + for (let i = 0; i < dateList.length; i++) { + heatmapData.push([dateList[i][0], Math.random() * 300]); + lunarData.push([dateList[i][0], 1, dateList[i][1], dateList[i][2]]); + } + let chartData = []; + dateList.forEach((item) => { + chartData.push({ + value: [item[0], item[1]], + itemStyle: + item[0] === dayjs().format('YYYY-MM-DD') + ? { + borderColor: "red", + } + : {}, //褰撳墠鏃ユ湡鏍囨敞杈规涓虹孩鑹� + symbol: "rect", // 鏍稿績1锛岄暱鏂瑰舰鏉ュ~鍏� + }); + }); + var option = { + // tooltip: { + // formatter: function (params) { + // return '闄嶉洦閲�: ' + params.value[1].toFixed(2); + // } + // }, + + visualMap: { + show: false, + min: 0, + max: 300, + calculable: true, + seriesIndex: [2], + orient: "horizontal", + left: "center", + bottom: 20, + inRange: { + color: ["#e0ffff", "#006edd"], + opacity: 0.3, + }, + controller: { + inRange: { + opacity: 0.5, + }, + }, + }, + calendar: { + left: "center", + top: 49, + cellSize: [70, 70], + orient: "vertical", + dayLabel: { + firstDay: 1, + nameMap: "cn", + }, + monthLabel: { + formatter: "{M}鏈�", + }, + range: "2025-05", + yearLabel: { + show: false, + }, + }, + series: [ + { + type: "scatter", + coordinateSystem: "calendar", + symbolSize(params) { + //鏍稿績2 + if (params[0] === dayjs().format('YYYY-MM-DD')) { + return 70; //褰撳墠鏃ユ湡楂樹寒 瀹藉害楂樺害璁剧疆鎴愬拰鍗曞厓鏍煎搴﹂珮搴︿竴鏍� + } else { + return 1; + } + }, + label: { + show: true, + formatter: function (params) { + var d = echarts.number.parseDate(params.value[0]); + if (params.value[0] === dayjs().format('YYYY-MM-DD')) { + return d.getDate() + "\n\n褰撴棩鍏ヤ粨閲廫n\n"; + } + return d.getDate() + "\n\n鍏ヤ粨閲廫n\n"; + }, + color: "#000", + }, + data: chartData, + silent: true, + }, + { + type: "scatter", + coordinateSystem: "calendar", + symbolSize: 0, + label: { + show: true, + formatter: function (params) { + return ( + "\n\n\n" + + (params.value[1] && params.value[1] != undefined + ? params.value[1] + "銕�" + : "0銕�") + ); + }, + fontSize: 14, + fontWeight: 700, + color: "#a00", + }, + data: chartData, + silent: true, + }, + // { + // type: 'scatter', + // coordinateSystem: 'calendar', + // symbolSize: 0, + // label: { + // show: true, + // formatter: function (params) { + // return '\n\n\n' + (params.value[3]?params.value[3]+'銕�' : ''); + // }, + // fontSize: 14, + // fontWeight: 700, + // color: '#a00' + // }, + // data: lunarData, + // silent: true + // }, + ], + }; + operationChartInstance.setOption(option); +}); + // infoChartInstance.setOption(option); + nextTick(() => { + loading.value = false; + }); +}); + +// 閿�姣丒Charts瀹炰緥 +onUnmounted(() => { + if (operationChartInstance != null && operationChartInstance.dispose) { + operationChartInstance.dispose(); + } +}); + +//绐楀彛澶у皬鍙樺寲閲嶇粯echart +window.onresize = function () { + if (operationChartInstance != null && operationChartInstance.resize) { + operationChartInstance.resize(); + } +}; +</script> + +<style></style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/proInStatistics.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/proInStatistics.vue" new file mode 100644 index 0000000..ed50310 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/proInStatistics.vue" @@ -0,0 +1,133 @@ +<template> + <div> + <assemble-dist></assemble-dist> + </div> + <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" + :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions" + :table="table" :extend="extend"> + </view-grid> + </template> + <script> + import extend from "@/extension/inbound/proInStatistics.js"; + import { ref, defineComponent } from "vue"; + import AssembleDistVue from '../charts/AssembleDist.vue'; + export default defineComponent({ + components: { + 'assemble-dist': AssembleDistVue, + }, + setup() { + const table = ref({ + key: "id", + footer: "Foots", + cnName: "鎴愬搧鍏ュ簱缁熻", + name: "proInStatistics", + url: "/proInStatistics/", + sortName: "id", + }); + const editFormFields = ref({ + + }); + const editFormOptions = ref([ + [ + + ], + ]); + const searchFormFields = ref({ + warehouseId: "", + productCode: "", + productRev: "", + }); + const searchFormOptions = ref([ + [ + { title: "浜у搧缂栫爜", field: "productCode",type: "like"}, + { + title: "浠撳簱", + field: "warehouseId", + type: "select", + dataKey: "warehouses", + data: [] + }, + { title: "浜у搧鐗堟湰", field: "productRev",type: "like"}, + ], + ]); + const columns = ref([ + { + field: "id", + title: "Id", + type: "int", + width: 90, + hidden: true, + readonly: true, + require: true, + align: "left", + }, + { + field: "warehouseId", + title: "鎵�灞炰粨搴�", + type: "string", + width: 120, + align: "left", + bind: { key: "warehouses", data: [] }, + }, + { + field: "productCode", + title: "浜у搧鍨嬪彿", + type: "string", + width: 150, + align: "left", + }, + { + field: "productRev", + title: "浜у搧鐗堟湰", + type: "string", + width: 90, + align: "left", + }, + { + field: "pcsQty", + title: "鍖呰Pcs鏁伴噺", + type: "string", + width: 120, + align: "left", + }, + { + field: "squareMeter", + title: "闈㈢Н(銕�)", + type: "string", + width: 200, + align: "left", + }, + { + field: "createDate", + title: "鍒涘缓鏃堕棿", + type: "datetime", + width: 160, + align: "left", + }, + { + field: "modifyDate", + title: "淇敼鏃堕棿", + type: "datetime", + width: 160, + align: "left", + } + ]); + const detail = ref({ + cnName: "#detailCnName", + table: "", + columns: [], + sortName: "", + }); + return { + table, + extend, + editFormFields, + editFormOptions, + searchFormFields, + searchFormOptions, + columns, + detail, + }; + }, + }); + </script> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/purchaseOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/purchaseOrder.vue" index 74baab4..5d3a627 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/purchaseOrder.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/purchaseOrder.vue" @@ -153,6 +153,7 @@ type: "datetime", width: 160, align: "left", + }, { field: "modifier", diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/takeStockOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/takeStockOrder.vue" index 97b5bc3..2a5d9b9 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/takeStockOrder.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/takeStockOrder.vue" @@ -1,5 +1,8 @@ <template> + <!-- <div> + <assemble-dist></assemble-dist> + </div> --> <view-grid ref="grid" :columns="columns" @@ -13,12 +16,17 @@ > </view-grid> </template> - <script> +<script> import extend from "@/extension/inbound/takeStockOrder.js"; import { ref, defineComponent } from "vue"; + // import AssembleDistVue from '../charts/AssembleDist.vue'; export default defineComponent({ + // components: { + // 'assemble-dist': AssembleDistVue, + // }, setup() { - const table = ref({ + //浣跨敤缁勪欢AssembleDist + const table = ref({ key: "id", footer: "Foots", cnName: "鐩樼偣鍗�", diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2176e72f-5c08-467b-a195-d29b07fa8150.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2176e72f-5c08-467b-a195-d29b07fa8150.vsidx" deleted file mode 100644 index 8793b5c..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2176e72f-5c08-467b-a195-d29b07fa8150.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3abc5cd6-1f76-4eec-970e-7b02818d60fc.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3abc5cd6-1f76-4eec-970e-7b02818d60fc.vsidx" deleted file mode 100644 index 2056552..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3abc5cd6-1f76-4eec-970e-7b02818d60fc.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4382f799-a985-4ba2-b4ed-4747dfb56fbd.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4382f799-a985-4ba2-b4ed-4747dfb56fbd.vsidx" deleted file mode 100644 index a7af651..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4382f799-a985-4ba2-b4ed-4747dfb56fbd.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5c317bcb-c94b-4bed-9f83-e46eb803dadb.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5c317bcb-c94b-4bed-9f83-e46eb803dadb.vsidx" new file mode 100644 index 0000000..cff3a69 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5c317bcb-c94b-4bed-9f83-e46eb803dadb.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/64543623-d20f-4ad8-bb49-9a281bd1f5fd.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/64543623-d20f-4ad8-bb49-9a281bd1f5fd.vsidx" new file mode 100644 index 0000000..8d922a8 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/64543623-d20f-4ad8-bb49-9a281bd1f5fd.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/75693363-5582-43f5-be32-c05f8e59864c.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/75693363-5582-43f5-be32-c05f8e59864c.vsidx" new file mode 100644 index 0000000..805f38c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/75693363-5582-43f5-be32-c05f8e59864c.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/98f0b9d5-ff15-4c89-a627-e626a260486c.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/98f0b9d5-ff15-4c89-a627-e626a260486c.vsidx" new file mode 100644 index 0000000..ce60ad3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/98f0b9d5-ff15-4c89-a627-e626a260486c.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d99124c1-6980-4477-97d8-7d3cc479e764.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d99124c1-6980-4477-97d8-7d3cc479e764.vsidx" deleted file mode 100644 index f5e778d..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d99124c1-6980-4477-97d8-7d3cc479e764.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" index 578c271..7b5555e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" @@ -109,26 +109,48 @@ Dt_MaterielInfo materielInfo = BaseDal.QueryFirst(x => x.MaterielCode == model.Code); if (materielInfo == null) { - return WebResponseContent.Instance.Error($"鏈壘鍒扮墿鏂欎俊鎭�"); + Dt_MaterielInfo materielInfoAddNew = new Dt_MaterielInfo() + { + IsCheck = warehouse == null ? 0 : (WhetherEnum)model.IsCheck, + MaterielCode = model.Code, + MaterielInvOrgId = model.InvOrgId, + MaterielLength = model.Length, + MaterielModel = model.Model, + MaterielName = model.Name, + MaterielSize = model.Size, + MaterielSourceType = (MaterielSourceTypeEnum)(model.ItemSourceType.ObjToInt()), + MaterielSpec = warehouse == null ? "绌�" : model.StandType, + MaterielState = (EnableEnum)(model.State.ObjToInt()), + MaterielThickness = model.Thickness, + MaterielType = (MaterielTypeEnum)(model.ItemType.ObjToInt()), + MaterielUnit = model.Unit == null ? "" : model.Unit, + MaterielVersion = model.MaterialVersion, + MaterielWide = model.Wide, + WarehouseId = warehouse == null ? 0 : warehouse.WarehouseId, + }; + BaseDal.AddData(materielInfoAddNew); } - - materielInfo.IsCheck = warehouse == null ? 0 : (WhetherEnum)model.IsCheck; - materielInfo.MaterielCode = model.Code; - materielInfo.MaterielInvOrgId = model.InvOrgId; - materielInfo.MaterielLength = model.Length; - materielInfo.MaterielModel = model.Model; - materielInfo.MaterielName = model.Name; - materielInfo.MaterielSize = model.Size; - materielInfo.MaterielSourceType = (MaterielSourceTypeEnum)model.ItemSourceType.ObjToInt(); - materielInfo.MaterielSpec = warehouse == null ? "" : model.StandType; - materielInfo.MaterielState = (EnableEnum)model.State.ObjToInt(); - materielInfo.MaterielThickness = model.Thickness; - materielInfo.MaterielType = (MaterielTypeEnum)model.ItemType.ObjToInt(); - materielInfo.MaterielUnit = model.Unit == null ? "" : model.Unit; - materielInfo.MaterielVersion = model.MaterialVersion; - materielInfo.MaterielWide = model.Wide; - materielInfo.WarehouseId = warehouse == null ? 0 : warehouse.WarehouseId; - BaseDal.UpdateData(materielInfo); + else + { + materielInfo.IsCheck = warehouse == null ? 0 : (WhetherEnum)model.IsCheck; + materielInfo.MaterielCode = model.Code; + materielInfo.MaterielInvOrgId = model.InvOrgId; + materielInfo.MaterielLength = model.Length; + materielInfo.MaterielModel = model.Model; + materielInfo.MaterielName = model.Name; + materielInfo.MaterielSize = model.Size; + materielInfo.MaterielSourceType = (MaterielSourceTypeEnum)model.ItemSourceType.ObjToInt(); + materielInfo.MaterielSpec = warehouse == null ? "" : model.StandType; + materielInfo.MaterielState = (EnableEnum)model.State.ObjToInt(); + materielInfo.MaterielThickness = model.Thickness; + materielInfo.MaterielType = (MaterielTypeEnum)model.ItemType.ObjToInt(); + materielInfo.MaterielUnit = model.Unit == null ? "" : model.Unit; + materielInfo.MaterielVersion = model.MaterialVersion; + materielInfo.MaterielWide = model.Wide; + materielInfo.WarehouseId = warehouse == null ? 0 : warehouse.WarehouseId; + BaseDal.UpdateData(materielInfo); + } + } else if (model.OperateType.ObjToInt() == 2) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/SupplierInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/SupplierInfoService.cs" index 8dc8ce7..a682d53 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/SupplierInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/SupplierInfoService.cs" @@ -48,13 +48,30 @@ Dt_SupplierInfo supplierInfo = BaseDal.QueryFirst(x => x.SupplierCode == model.Code); if (supplierInfo == null) { - return WebResponseContent.Instance.Error($"鏈壘鍒拌渚涘簲鍟嗕俊鎭�"); + Dt_SupplierInfo supplierInfoAddNew = new Dt_SupplierInfo() + { + Status = 1, + SupplierCode = model.Code, + ContactAddress = model.ContactAddress, + ContactNumber = model.ContactNumber, + Contacts = model.Contacts, + Description = model.Description, + Email = model.Email, + InvOrgId = model.InvOrgId, + SupplierName = model.Name, + SupplierShortName = model.ShortName + }; + + BaseDal.AddData(supplierInfoAddNew); } - supplierInfo.Status = 1; - supplierInfo.SupplierCode = model.Code; - supplierInfo.SupplierName = model.Name; - supplierInfo.SupplierShortName = model.ShortName; - BaseDal.UpdateData(supplierInfo); + else + { + supplierInfo.Status = 1; + supplierInfo.SupplierCode = model.Code; + supplierInfo.SupplierName = model.Name; + supplierInfo.SupplierShortName = model.ShortName; + BaseDal.UpdateData(supplierInfo); + } } else if (model.OperateType == "2") { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/UserInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/UserInfoService.cs" index 2f00dc3..f4724bc 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/UserInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/UserInfoService.cs" @@ -61,14 +61,40 @@ Dt_UserInfo userInfo = BaseDal.QueryFirst(x => x.Code == model.Code); if (userInfo == null) { - return WebResponseContent.Instance.Error($"鏈壘鍒拌鍛樺伐鍙枫�恵model.Code}銆戜俊鎭�"); + Dt_UserInfo userInfoAddNew = new Dt_UserInfo() + { + Code = model.Code, + DeptName = model.DeptName, + DeptNo = model.DeptNo, + InvOrgId = model.InvOrgId, + Name = model.Name, + State = model.State + }; + Sys_User userAddNew = new Sys_User() + { + UserName = userInfo.Code, + RoleId = 0, + UserPwd = "TC123456".EncryptDES(AppSecret.User), + RoleName = "", + Enable = (byte)userInfo.State, + LastModifyPwdDate = DateTime.Now, + Address = "绯荤粺鏈嶅姟鍣�", + TenantId = 0, + Creater = "绯荤粺", + UserTrueName = userInfo.Name, + }; + BaseDal.AddData(userInfoAddNew); + _userRepository.AddData(userAddNew); } - userInfo.State = model.State; - userInfo.DeptName = model.DeptName; - userInfo.DeptNo = model.DeptNo; - userInfo.InvOrgId = model.InvOrgId; - userInfo.Name = model.Name; - BaseDal.UpdateData(userInfo); + else + { + userInfo.State = model.State; + userInfo.DeptName = model.DeptName; + userInfo.DeptNo = model.DeptNo; + userInfo.InvOrgId = model.InvOrgId; + userInfo.Name = model.Name; + BaseDal.UpdateData(userInfo); + } } else if (model.OperateType == "2") { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" index fc0fe80..aa2255b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" @@ -38,6 +38,11 @@ [Description("ERP鎴愬搧璁㈠崟瀹㈡埛鏌ヨ鎺ュ彛璋冪敤")] InvokeErpOutProErpSyncApi, /// <summary> + /// ERP鎴愬搧鍏ュ簱浜у搧鍨嬪彿闈㈢Н鏌ヨ鎺ュ彛 + /// </summary> + [Description("ERP鎴愬搧鍏ュ簱浜у搧鍨嬪彿闈㈢Н鏌ヨ鎺ュ彛")] + InvokeProInErpStatic, + /// <summary> /// MES鍚屾娴嬭瘯鏋跺彴璐︿俊鎭� /// </summary> [Description("MES鍚屾娴嬭瘯鏋跺彴璐︿俊鎭�")] @@ -48,6 +53,11 @@ [Description("MES鍚屾鏉挎枡鍑哄簱")] WMS_MES_MaterialLotaAcept, /// <summary> + /// MES鎺ュ彛鑾峰彇鎵规淇℃伅ZH + /// </summary> + [Description("MES鎺ュ彛鑾峰彇鎵规淇℃伅ZH")] + WMS_MES_GetProductByLot, + /// <summary> /// MES鍚屾鎴愬搧鍑哄簱 /// </summary> [Description("MES鍚屾鎴愬搧鍑哄簱")] diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpProInErpStaticResponseContent.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpProInErpStaticResponseContent.cs" new file mode 100644 index 0000000..7d477a2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpProInErpStaticResponseContent.cs" @@ -0,0 +1,53 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_DTO.ERP +{ + /// <summary> + /// 鎴愬搧搴撳瓨闈㈢Н鎺ユ敹杩斿弬 + /// </summary> + public class ErpProInErpStaticResponseContent + { + /// <summary> + /// 杩斿洖鐮� + /// </summary> + public int Code { get; set; } + /// <summary> + /// 杩斿洖淇℃伅 + /// </summary> + public string Msg { get; set; } + /// <summary> + /// 搴撳瓨淇℃伅 + /// </summary> + public List<ProInStatic> Data { get; set; } + } + /// <summary> + /// 鍙傛暟 + /// </summary> + public class ProInStatic + { + /// <summary> + /// 鐢熶骇鐗堟湰 + /// </summary> + public string PartRev { get; set; } + /// <summary> + /// 鐢熶骇鍨嬪彿 + /// </summary> + public string PartNum { get; set; } + /// <summary> + /// 鐩墠鍥哄畾涓�1 + /// </summary> + public string Jbfl { get; set; } + /// <summary> + /// 鍗曞厓闈㈢Н + /// </summary> + public float UnitArea { get; set; } + /// <summary> + /// 鐢熶骇鍨嬪彿+鐢熶骇鐗堟湰 + /// </summary> + public string PartNumWithRev { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/ProInStaticDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/ProInStaticDTO.cs" new file mode 100644 index 0000000..7e81ed0 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Inbound/ProInStaticDTO.cs" @@ -0,0 +1,18 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_DTO.Inbound +{ + /// <summary> + /// + /// </summary> + public class ProInStaticDTO + { + public string ProductCode { get; set; } + public string ProductVersion { get; set; } + public float SumPcs { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesSolderModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesSolderModel.cs" new file mode 100644 index 0000000..6ba2f15 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesSolderModel.cs" @@ -0,0 +1,39 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_DTO.MES +{ + /// <summary> + /// MES闃荤剨鑾峰彇鎵规鐗╂枡淇℃伅 + /// </summary> + public class MesSolderModel + { + /// <summary> + /// 鏂欏彿 + /// </summary> + public string Product { get; set; } + /// <summary> + /// 鐗堟湰 + /// </summary> + public string ProductVersion { get; set; } + /// <summary> + /// 鏁伴噺 + /// </summary> + public float Qty { get; set; } + /// <summary> + /// 鍛ㄦ湡 + /// </summary> + public string DateCode { get; set; } + /// <summary> + /// 鎵规 + /// </summary> + public string LotNo { get; set; } + /// <summary> + /// 鏄惁婊ot + /// </summary> + public string IsFullNumber { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs" index 4291447..f279c45 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/ERPService/InvokeERPService.cs" @@ -192,6 +192,22 @@ return response; } /// <summary> + /// ERP鎴愬搧鍏ュ簱浜у搧鍨嬪彿闈㈢Н鏌ヨ + /// </summary> + /// <returns></returns> + public string InvokeProInErpStatic(string partNum,string partNumWithRev) + { + Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.InvokeProInErpStatic.ToString()); + object inObj = new { partNum, partNumWithRev }; + string request = JsonConvert.SerializeObject(inObj, settings); + Dictionary<string, string> requestHeader = new Dictionary<string, string> + { + { "AccessToken", "TCKJF60B03C07E8E41B0B3CF759B7B01AB81HATC"}, + }; + string response = HttpHelper.Post(apiInfo.ApiAddress, request, headers: requestHeader); + return response; + } + /// <summary> /// ERP鎴愬搧鍏ュ簱涓婃姤鎺ュ彛璋冪敤 /// </summary> public string InvokeProInApi(ERPProInboundModel inboundModel) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs" index a3afc14..d2c6d98 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_External/IERPService/IInvokeERPService.cs" @@ -86,5 +86,10 @@ /// </summary> /// <returns></returns> string InvokeOutProErpSync(string outProOrderNo); + /// <summary> + /// ERP鎴愬搧鍏ュ簱浜у搧鍨嬪彿闈㈢Н鏌ヨ + /// </summary> + /// <returns></returns> + string InvokeProInErpStatic(string partNum, string partNumWithRev); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IProInStatisticsRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IProInStatisticsRepository.cs" new file mode 100644 index 0000000..db5f58c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IProInStatisticsRepository.cs" @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseRepository; +using WIDESEA_Model.Models; + +namespace WIDESEA_IInboundRepository +{ + public interface IProInStatisticsRepository : IRepository<Dt_ProInStatistics> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IProInStatisticsService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IProInStatisticsService.cs" new file mode 100644 index 0000000..b9fbf47 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IProInStatisticsService.cs" @@ -0,0 +1,20 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core; +using WIDESEA_Core.BaseServices; +using WIDESEA_DTO.MES; +using WIDESEA_IInboundRepository; +using WIDESEA_Model.Models; + +namespace WIDESEA_IInboundService +{ + public interface IProInStatisticsService : IService<Dt_ProInStatistics> + { + IProInStatisticsRepository Repository { get; } + void SaveStatic(MesBagInfoModel mesBagInfoModel); + WebResponseContent GetMonthProductions(); + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" index 17092e3..d1eb330 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" @@ -354,7 +354,7 @@ /// <param name="ProOutNo">鍑哄簱璁㈠崟鍙�</param> /// <param name="StationCode">绔欏彴鍦板潃</param> /// <returns></returns> - Task<WebResponseContent> OutProductTask(int[] keys, string StationCode); + Task<WebResponseContent> OutProductTask(int[] keys, string StationCode, int Grade); /// <summary> /// 鎴愬搧浣欐枡閫�搴撳叆浠� /// </summary> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/ProInStatisticsRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/ProInStatisticsRepository.cs" new file mode 100644 index 0000000..85feacf --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/ProInStatisticsRepository.cs" @@ -0,0 +1,18 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseRepository; +using WIDESEA_IInboundRepository; +using WIDESEA_Model.Models; + +namespace WIDESEA_InboundRepository +{ + public class ProInStatisticsRepository : RepositoryBase<Dt_ProInStatistics>, IProInStatisticsRepository + { + public ProInStatisticsRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + { + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs" new file mode 100644 index 0000000..cd459fa --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs" @@ -0,0 +1,95 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core; +using WIDESEA_Core.BaseRepository; +using WIDESEA_Core.BaseServices; +using WIDESEA_Core.Helper; +using WIDESEA_DTO.ERP; +using WIDESEA_DTO.Inbound; +using WIDESEA_DTO.MES; +using WIDESEA_External.ERPService; +using WIDESEA_IBasicRepository; +using WIDESEA_IInboundRepository; +using WIDESEA_IInboundService; +using WIDESEA_Model.Models; + +namespace WIDESEA_InboundService +{ + public class ProInStatisticsService : ServiceBase<Dt_ProInStatistics, IProInStatisticsRepository>, IProInStatisticsService + { + public IProInStatisticsRepository Repository => BaseDal; + private readonly IUnitOfWorkManage _unitOfWorkManage; + private readonly IInvokeERPService _invokeERPService; + private readonly IBasicRepository _basicRepository; + public ProInStatisticsService(IProInStatisticsRepository BaseDal, IUnitOfWorkManage unitOfWorkManag,IInvokeERPService invokeERPService,IBasicRepository basicRepository) : base(BaseDal) + { + _unitOfWorkManage = unitOfWorkManag; + _invokeERPService = invokeERPService; + _basicRepository = basicRepository; + } + + public void SaveStatic(MesBagInfoModel mesBagInfoModel) + { + List<ProInStaticDTO> mESBagDetails = mesBagInfoModel.BagDetails.GroupBy(x=>new { x.ProductCode, x.ProductVersion }).Select(x=>new ProInStaticDTO + { + ProductCode= x.Key.ProductCode, + ProductVersion= x.Key.ProductVersion, + SumPcs=x.Sum(x => x.OKPCSQTY) + }).ToList(); + List<Dt_ProInStatistics> proInStatistics= new List<Dt_ProInStatistics>(); + Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode==mesBagInfoModel.WarehouseCode); + foreach (var m in mESBagDetails) + { + string response = _invokeERPService.InvokeProInErpStatic(m.ProductCode, m.ProductCode + m.ProductVersion); + ErpProInErpStaticResponseContent erpProInErpStatic = response.DeserializeObject<ErpProInErpStaticResponseContent>(); + if (erpProInErpStatic.Code != 200) + { + return; + } + float adjusted = (float)Math.Round(erpProInErpStatic.Data[0].UnitArea, 3); + Dt_ProInStatistics inStatistics = new Dt_ProInStatistics() + { + WarehouseId = warehouse.WarehouseId, + ProductCode = m.ProductCode, + ProductRev = m.ProductVersion, + PcsQty = m.SumPcs, + SquareMeter = (float)Math.Round((adjusted * m.SumPcs), 3), + Remark = mesBagInfoModel.BatchNo + }; + proInStatistics.Add(inStatistics); + } + BaseDal.AddData(proInStatistics); + } + /// <summary> + /// 鑾峰彇鏈堜唤浜ч噺 + /// </summary> + /// <returns></returns> + public WebResponseContent GetMonthProductions() + { + WebResponseContent content=new WebResponseContent(); + try + { + DateTime date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); + List<object> list = new List<object>(); + //鏈湀鎬诲ぉ鏁� + int daysInMonth = DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month); + for (int i = 1; i <= daysInMonth; i++) + { + DateTime dateTime = date.AddDays(i); + //鑾峰彇鏁版嵁 + var dayProDuctions = BaseDal.QueryData(x => x.CreateDate <= dateTime && x.CreateDate >= dateTime.AddDays(-1)).Sum(x => x.SquareMeter); + list.Add(new { dateNow= dateTime.AddHours(-1).ToString("yyyy-MM-dd"), dayProDuctions }); + } + content.OK("鎴愬姛",list); + } + catch (Exception ex) + { + content.Error(ex.Message); + } + return content; + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrder.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrder.cs" index dff43da..7831749 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrder.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrder.cs" @@ -59,7 +59,7 @@ /// <summary> /// 涓婁紶ERP鐘舵�� /// </summary> - [SugarColumn(IsNullable = false, ColumnDescription = "涓婁紶ERP鐘舵��")] + [SugarColumn(IsNullable = true, ColumnDescription = "涓婁紶ERP鐘舵��")] public int UpErpStatus { get; set; } /// <summary> /// 澶囨敞 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_ProInStatistics.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_ProInStatistics.cs" new file mode 100644 index 0000000..055f237 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_ProInStatistics.cs" @@ -0,0 +1,58 @@ +锘縰sing Magicodes.ExporterAndImporter.Core; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.DB.Models; +namespace WIDESEA_Model.Models +{ + /// <summary> + /// 鎴愬搧鍏ュ簱缁熻琛� + /// </summary> + [SugarTable(nameof(Dt_ProInStatistics), "鎴愬搧鍏ュ簱缁熻琛�")] + public class Dt_ProInStatistics : BaseEntity + { + /// <summary> + /// 涓婚敭 + /// </summary> + [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")] + public int Id { get; set; } + /// <summary> + /// 浠撳簱涓婚敭 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "浠撳簱涓婚敭")] + public int WarehouseId { get; set; } + /// <summary> + /// 浜у搧鍨嬪彿 + /// </summary> + [ExporterHeader(DisplayName = "浜у搧鍨嬪彿")] + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "浜у搧鍨嬪彿")] + public string ProductCode { get; set; } + /// <summary> + /// 浜у搧鐗堟湰 + /// </summary> + [ExporterHeader(DisplayName = "浜у搧鐗堟湰")] + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "浜у搧鐗堟湰")] + public string ProductRev { get; set; } + /// <summary> + /// PCS鏁� + /// </summary> + [ExporterHeader(DisplayName = "PCS鏁�")] + [SugarColumn(IsNullable = false, ColumnDescription = "PCS鏁�")] + public float PcsQty { get; set; } + /// <summary> + /// 闈㈢Н + /// </summary> + [ExporterHeader(DisplayName = "闈㈢Н(銕�)")] + [SugarColumn(IsNullable = false, ColumnDescription = "闈㈢Н(銕�)")] + public float SquareMeter { get; set; } + /// <summary> + /// 澶囨敞 + /// </summary> + [ExporterHeader(DisplayName = "鑳舵鍙�")] + [SugarColumn(IsNullable = false, ColumnDescription = "澶囨敞")] + public string Remark { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs" index 6b87fac..fd9691d 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs" @@ -230,7 +230,7 @@ roadwayNo = location?.RoadwayNo ?? ""; break; } - return !string.IsNullOrEmpty(roadwayNo) ? WebResponseContent.Instance.OK(data: roadwayNo) : WebResponseContent.Instance.Error("鏈壘鍒板彲鍒嗛厤宸烽亾"); + return !string.IsNullOrEmpty(roadwayNo) ? WebResponseContent.Instance.OK(data: roadwayNo) : WebResponseContent.Instance.Error("鏈壘鍒板彲鍒嗛厤宸烽亾"+ $"锛歿locationCounts.Serialize()}"); } catch (Exception ex) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" index a2e1a4c..6a41a2b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" @@ -78,12 +78,10 @@ { return content.Error(inProRespone.Message); } + _proInStatisticsService.SaveStatic(bagInfoModel); return content.OK(inProRespone.Message); } - else if (isValid) - { - - } + foreach (var item in bagInfoModel.BagDetails) { if (proDetailsExists.Contains(item.BagNo)) @@ -170,9 +168,9 @@ int taskId = BaseDal.AddData(newTask); newTask.TaskId = taskId; Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand(); - //涓婁紶ERP WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder); + _proInStatisticsService.SaveStatic(bagInfoModel); if (!responseContent.Status) { mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt(); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesSolderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesSolderService.cs" index 84fb282..9c952e5 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesSolderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesSolderService.cs" @@ -1,9 +1,16 @@ -锘縰sing System; +锘縰sing Newtonsoft.Json.Serialization; +using Newtonsoft.Json; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEA_Common.APIEnum; +using WIDESEA_Core.Helper; +using WIDESEA_Core; using WIDESEA_DTO; +using WIDESEA_DTO.MES; +using WIDESEA_Model.Models; namespace WIDESEA_TaskInfoService { @@ -27,5 +34,35 @@ return responseContent; } } + /// <summary> + /// 闃茬剨绔嬪簱鍏ュ簱鍚庤皟鐢∕ES鎺ュ彛鑾峰彇鎵规淇℃伅 + /// </summary> + /// <param name="LotNo"></param> + /// <returns></returns> + public MesSolderModel? GetProductByLot(string LotNo) + { + WebResponseContent content = new WebResponseContent(); + try + { + Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMS_MES_GetProductByLot.ToString()); + string requestApi = apiInfo.ApiAddress + "?lotNo=" + LotNo; + string response = HttpMesHelper.Post(requestApi); + MesResponseContent mesResponseContent = response.DeserializeObject<MesResponseContent>(); + //璋冪敤鎺ュ彛 + if (mesResponseContent.BSucc == true) + { + MesSolderModel? mesSolder= mesResponseContent.Content.ToString()?.DeserializeObject<MesSolderModel>(); + return mesSolder; + } + else + { + throw new Exception(mesResponseContent.StrMsg); + } + } + catch (Exception ex) + { + throw new Exception(ex.Message); + } + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" index f3ea816..5c6c1ad 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" @@ -73,6 +73,8 @@ private readonly IPalletTypeInfoRepository _palletTypeInfoRepository; private readonly IOutProStockInfoRepository _outProStockInfoRepository; private readonly IOutboundRepository _outboundRepository; + private readonly IProInStatisticsRepository _proInStatisticsRepository; + private readonly IProInStatisticsService _proInStatisticsService; public ITaskRepository Repository => BaseDal; private Dictionary<string, OrderByType> _taskOrderBy = new() @@ -85,7 +87,7 @@ public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList(); - public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService, IInboundRepository inboundRepository, IInboundOrderService inboundOrderService, IPalletTypeInfoRepository palletTypeInfoRepository, IOutProStockInfoRepository outProStockInfoRepository, IOutboundRepository outboundRepository) : base(BaseDal) + public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService, IInboundRepository inboundRepository, IInboundOrderService inboundOrderService, IPalletTypeInfoRepository palletTypeInfoRepository, IOutProStockInfoRepository outProStockInfoRepository, IOutboundRepository outboundRepository, IProInStatisticsRepository proInStatisticsRepository, IProInStatisticsService proInStatisticsService) : base(BaseDal) { _mapper = mapper; _unitOfWorkManage = unitOfWorkManage; @@ -102,6 +104,8 @@ _palletTypeInfoRepository = palletTypeInfoRepository; _outProStockInfoRepository = outProStockInfoRepository; _outboundRepository = outboundRepository; + _proInStatisticsRepository = proInStatisticsRepository; + _proInStatisticsService = proInStatisticsService; } /// <summary> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" index feae449..e71f13f 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" @@ -404,7 +404,7 @@ { return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�"); } - if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎷i�夊畬鎴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.閫�搴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES閫�搴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES绌烘墭閫�搴�.ObjToInt()) + if (stockInfo.StockStatus != StockStatusEmun.閫�搴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES閫�搴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MES绌烘墭閫�搴�.ObjToInt()) { return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱"); } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" index 7208d9e..e295122 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" @@ -83,7 +83,7 @@ /// <param name="ProOutNo">鍑哄簱璁㈠崟鍙�</param> /// <param name="StationCode">绔欏彴鍦板潃</param> /// <returns></returns> - public async Task<WebResponseContent> OutProductTask(int[] keys, string StationCode) + public async Task<WebResponseContent> OutProductTask(int[] keys, string StationCode, int Grade) { WebResponseContent content = new WebResponseContent(); try @@ -93,10 +93,10 @@ return await Task.FromResult(content.Error("绾夸綋杈撳叆閿欒")); } //鑾峰彇鎴愬搧鍑哄簱璁㈠崟 - List<Dt_ProOutOrderDetail> _ProOutOrderDetails = await _outboundRepository.ProOutOrderDetailRepository.QueryDataAsync(x => keys.Contains(x.Id)); + List<Dt_ProOutOrderDetail> _ProOutOrderDetails = await _outboundRepository.ProOutOrderDetailRepository.QueryDataAsync(x => keys.Contains(x.Id) && x.ProOrderDetailStatus== OrderDetailStatusEnum.New.ObjToInt()); if (_ProOutOrderDetails.Count<=0) { - return await Task.FromResult(content.Error("鍕鹃�夎鍗曟槑缁嗕笉瀛樺湪")); + return await Task.FromResult(content.Error("鍕鹃�夎鍗曟槑缁嗙姸鎬佷负鍑哄簱涓�")); } List<Dt_Task> tasks = new List<Dt_Task>(); List<StockSelectViewDTO> stockSelectViews = new List<StockSelectViewDTO>(); @@ -124,10 +124,26 @@ } if (result.Item1 != null && result.Item1.Count > 0) { + Dt_Task? task = BaseDal.QueryData(x=>x.TaskType==TaskTypeEnum.OutProduct.ObjToInt()).OrderByDescending(x=>x.Grade).FirstOrDefault(); //鏇存柊鍑哄簱鐩殑浣嶇疆 result.Item1.ForEach(x => { x.TargetAddress = StationCode; + if (Grade==1 || task==null) + { + x.Grade = 127; + } + else + { + if (task.Grade==0 || task.Grade==1) + { + x.Grade = 1; + } + else + { + x.Grade = task.Grade - 1; + } + } }); tasks.AddRange(result.Item1); } @@ -422,9 +438,7 @@ { x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(); }); - string groupId = DateTime.Now.ToString("yyyyMMddHHmmss"); tasks.ForEach(x => x.OrderNo = proOutOrder.ProOutOrderNo); - tasks.ForEach(x => x.GroupId = groupId); proStockInfos = result.Item1; proOutOrderDetails = result.Item2; outProStockInfos = result.Item3; @@ -445,10 +459,14 @@ public List<Dt_Task> GetTasks(List<Dt_ProStockInfo> stockInfos, TaskTypeEnum taskType) { List<Dt_Task> tasks = new List<Dt_Task>(); - for (int i = 0; i < stockInfos.Count; i++) + string groupId = DateTime.Now.ToString("yyMMddHHmmss"); + for (int i = 1; i <= stockInfos.Count; i++) { - Dt_ProStockInfo stockInfo = stockInfos[i]; - + Dt_ProStockInfo stockInfo = stockInfos[i-1]; + if (i%5==0) + { + groupId= DateTime.Now.AddSeconds(i).ToString("yyMMddHHmmss"); + } if (stockInfo != null) { Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode); @@ -468,6 +486,7 @@ TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), PalletType = stockInfo.PalletType, WarehouseId = stockInfo.WarehouseId, + GroupId= groupId }; tasks.Add(task); } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs" index 6702606..35772a2 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs" @@ -325,5 +325,14 @@ { return _invokeERPService.InvokeOutProErpSync(outProOrderNo); } + /// <summary> + /// ERP鎴愬搧鍏ュ簱浜у搧鍨嬪彿闈㈢Н鏌ヨ + /// </summary> + /// <returns></returns> + [HttpPost, Route("InvokeProInErpStatic"), AllowAnonymous] + public string InvokeProInErpStatic(string partNum, string partNumWithRev) + { + return _invokeERPService.InvokeProInErpStatic(partNum, partNumWithRev); + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ProInStatisticsController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ProInStatisticsController.cs" new file mode 100644 index 0000000..56c465a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ProInStatisticsController.cs" @@ -0,0 +1,25 @@ +锘縰sing Microsoft.AspNetCore.Mvc; +using WIDESEA_Core; +using WIDESEA_Core.BaseController; +using WIDESEA_IInboundService; +using WIDESEA_Model.Models; + +namespace WIDESEA_WMSServer.Controllers.Inbound +{ + /// <summary> + /// Mes鎴愬搧鍏ュ簱鏄庣粏 + /// </summary> + [Route("api/ProInStatistics")] + [ApiController] + public class ProInStatisticsController : ApiBaseController<IProInStatisticsService, Dt_ProInStatistics> + { + public ProInStatisticsController(IProInStatisticsService service) : base(service) + { + } + [HttpGet,HttpPost,Route("GetMonthProductions")] + public WebResponseContent GetMonthProductions() + { + return Service.GetMonthProductions(); + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/LargeScreen/LargeController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/LargeScreen/LargeController.cs" index 4108172..a95ca9f 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/LargeScreen/LargeController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/LargeScreen/LargeController.cs" @@ -21,6 +21,7 @@ using SqlSugar; using WIDESEA_IStockService; using WIDESEA_Common.StockEnum; +using HslCommunication.WebSocket; namespace WIDESEA_WMSServer.Controllers.LargeScreen { @@ -28,26 +29,42 @@ [ApiController] public class LargeController : ControllerBase { - //private readonly IOutboundService _outboundService; - //private readonly ITaskService _taskService; - //private readonly ITask_HtyService _task_HtyService; - //private readonly IBasicService _basicService; - //private readonly IMesProInOrderService _mesProInOrderService; - //private readonly IOutProStockInfoService _outProStockInfoService; - //private readonly IProStockInfoDetailService _proStockInfoDetailService; - //private readonly IProStockInfoService _proStockInfoService; + private readonly IOutboundService _outboundService; + private readonly ITaskService _taskService; + private readonly ITask_HtyService _task_HtyService; + private readonly IBasicService _basicService; + private readonly IMesProInOrderService _mesProInOrderService; + private readonly IOutProStockInfoService _outProStockInfoService; + private readonly WebSocketServer _webSocketServer; + private readonly IProStockInfoDetailService _proStockInfoDetailService; + private readonly IProStockInfoService _proStockInfoService; - //public LargeController(IOutboundService outboundService, ITaskService taskService, ITask_HtyService task_HtyService, IBasicService basicService, IMesProInOrderService mesProInOrderService, IOutProStockInfoService outProStockInfoService,IProStockInfoDetailService proStockInfoDetailService, IProStockInfoService proStockInfoService) - //{ - // _outboundService = outboundService; - // _taskService = taskService; - // _task_HtyService = task_HtyService; - // _basicService = basicService; - // _mesProInOrderService = mesProInOrderService; - // _outProStockInfoService = outProStockInfoService; - // _proStockInfoDetailService= proStockInfoDetailService; - // _proStockInfoService=proStockInfoService; - //} + public LargeController(IOutboundService outboundService, ITaskService taskService, ITask_HtyService task_HtyService, IBasicService basicService, IMesProInOrderService mesProInOrderService, IOutProStockInfoService outProStockInfoService, IProStockInfoDetailService proStockInfoDetailService, IProStockInfoService proStockInfoService, WebSocketServer webSocketServer) + { + _outboundService = outboundService; + _taskService = taskService; + _task_HtyService = task_HtyService; + _basicService = basicService; + _mesProInOrderService = mesProInOrderService; + _outProStockInfoService = outProStockInfoService; + _proStockInfoDetailService = proStockInfoDetailService; + _proStockInfoService = proStockInfoService; + _webSocketServer = webSocketServer; + } + /// <summary> + /// 娴嬭瘯 + /// </summary> + /// <returns></returns> + [HttpPost, Route("PushInfoSocket"), AllowAnonymous] + public WebResponseContent ProMonthTaskStatistics(string info) + { + WebSocketSession[] webSocketSession = _webSocketServer.OnlineSessions; + if (webSocketSession != null) + { + _webSocketServer.SendClientPayload(webSocketSession[0], "鍚屾剰"); + } + return WebResponseContent.Instance.OK(_webSocketServer.OnlineSessions.Select(x=>x.Url).Serialize()); + } ///// <summary> ///// 鎴愬搧褰撴湀浠诲姟缁熻 ///// </summary> @@ -173,7 +190,7 @@ // try // { // var list = _proStockInfoDetailService.Repository.QueryData(x => true).GroupBy(x => x.ProductCode).Select(x => new { pCode = x.Key, qtys = x.Sum(x=>x.StockPcsQty) }).OrderByDescending(x=>x.qtys).Take(5); - + // content.OK("鎴愬姛", list); // } // catch (Exception ex) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" index f84c7dc..8bb450b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" @@ -183,9 +183,9 @@ /// <param name="StationCode">绔欏彴鍦板潃</param> /// <returns></returns> [HttpPost, HttpGet, Route("OutProductTask"), AllowAnonymous] - public async Task<WebResponseContent> OutProductTask([FromBody] int[] keys, string StationCode) + public async Task<WebResponseContent> OutProductTask([FromBody] int[] keys, string StationCode, int Grade) { - return await Service.OutProductTask(keys, StationCode); + return await Service.OutProductTask(keys, StationCode, Grade); } /// <summary> /// 鎴愬搧浣欐枡閫�搴撳叆浠� @@ -213,9 +213,9 @@ /// 鐢熸垚鎴愬搧鎻愬簱浠诲姟 /// </summary> [HttpPost, HttpGet, Route("OutProRworkTask"), AllowAnonymous] - public async Task<WebResponseContent> OutProRworkTask([FromBody] int[] keys, string StationCode) + public async Task<WebResponseContent> OutProRworkTask([FromBody] int[] keys, string StationCode, int Grade) { - return await Service.OutProductTask(keys, StationCode); + return await Service.OutProductTask(keys, StationCode, Grade); } ///// <summary> ///// 鐢熸垚MESPP浠撳ぇ鍗峰嚭搴撲换鍔� -- Gitblit v1.9.3