From be0856c1bf533ed6001ff786908ae98e4b853eb5 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 09 一月 2025 10:09:02 +0800
Subject: [PATCH] 1
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs | 146
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PrintStatusEnum.cs | 12
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs | 12
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 25
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs | 4
代码管理/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue | 209 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesOutboundOrder.cs | 116 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs | 12
代码管理/WMS/WIDESEA_WMSClient/src/views/system/Sys_Log.vue | 363 +--
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/LambdaExtensions.cs | 65
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs | 5
代码管理/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue | 1
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs | 70
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs | 16
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs | 45
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_UserInfo.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 54
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs | 5
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail_Hty.cs | 81
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder_Hty.cs | 74
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletCodeInfo.cs | 3
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/StackerCraneJob_GM.cs | 131 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs | 91
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/W_ConveyorLineDBName.cs | 4
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs | 252 ++
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/bb8909d9-102a-4651-8147-b631fc4f6ca7.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Log.cs | 9
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WCSTaskDTO.cs | 16
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs | 30
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/MesOutboundOrderType.cs | 27
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs | 15
代码管理/WCS/WIDESEAWCS_Client/src/extension/taskinfo/extend/taskExecuteDetail.vue | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs | 4
代码管理/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js | 42
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 14
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/WIDESEA_DTO.csproj | 17
代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue | 5
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/WIDESEA_Model.csproj | 25
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs | 56
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs | 26
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dda13b32-6b9a-4501-9213-3b3205c26c21.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletTypeInfo.cs | 38
代码管理/WMS/WIDESEA_WMSClient/src/views/record/stockQuantityChangeRecord.vue | 1
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json | 5
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/ConveyorWorkTypeEnum.cs | 17
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 74
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs | 35
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs | 8
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/ConveyorLineJob_BC.cs | 240 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesOutboundOrderService.cs | 41
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesOutboundOrderRepository.cs | 18
代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue | 9
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_ApiInfo.cs | 3
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/测试架仓/StackerCraneJob_CSJ.cs | 15
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesOutboundOrderService.cs | 144 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/BasicRepository.cs | 5
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs | 10
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesMaterialLotaAceptModel.cs | 89 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs | 246 +++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 8
代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue | 12
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs | 58
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs | 59
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs | 5
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs | 42
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IBasicRepository.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs | 188 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 84
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs | 16
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 29
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8ec93a91-d59a-425d-8fc0-681c90b68b09.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs | 36
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MESRoot.cs | 16
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/HttpContextExtension.cs | 24
代码管理/WMS/WIDESEA_WMSClient/src/views/record/locationStatusChangeRecord.vue | 372 ++--
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail.cs | 8
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrder_Hty.cs | 88
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/WebSocketSetup.cs | 7
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs | 21
代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue | 1
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesOutboundOrderRepository.cs | 14
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletCodeInfoService.cs | 3
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/PalletTypeInfoRepository.cs | 18
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/SubstrateModel.cs | 90 +
代码管理/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue | 8
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SwaggerContextExtension.cs | 72
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_PurchaseOrder.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs | 25
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs | 10
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/PalletCodeInfoService.cs | 21
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletCodeInfoController.cs | 6
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 9
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs | 8
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/ConveyorLineJob_GM.cs | 88
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs | 14
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs | 76
/dev/null | 23
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs | 8
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail_Hty.cs | 107 -
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IPalletTypeInfoRepository.cs | 14
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/74867a10-626f-4e30-a018-f262a1dd62c2.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs | 32
116 files changed, 3,395 insertions(+), 1,463 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/extension/taskinfo/extend/taskExecuteDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/extension/taskinfo/extend/taskExecuteDetail.vue"
index 5e99f33..f761927 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/extension/taskinfo/extend/taskExecuteDetail.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/extension/taskinfo/extend/taskExecuteDetail.vue"
@@ -113,7 +113,7 @@
showDetialBox: false,
row: {},
steps: [],
- viewType: 1,
+ viewType: 2,
height: "200px",
tableData: [],
previousShow: false,
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue"
index 9742628..703f91e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue"
@@ -4,67 +4,154 @@
*浠g爜鐢辨鏋剁敓鎴�,浠讳綍鏇存敼閮藉彲鑳藉鑷磋浠g爜鐢熸垚鍣ㄨ鐩�
*涓氬姟璇峰湪@/extension/system/Sys_Log.js姝ゅ缂栧啓
-->
-<template>
- <view-grid ref="grid"
- :columns="columns"
- :detail="detail"
- :editFormFields="editFormFields"
- :editFormOptions="editFormOptions"
- :searchFormFields="searchFormFields"
- :searchFormOptions="searchFormOptions"
- :table="table"
- :extend="extend">
- </view-grid>
+ <template>
+ <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/system/Sys_Log.js";
- import { ref, defineComponent } from "vue";
- export default defineComponent({
- setup() {
- const table = ref({
- key: 'Id',
- footer: "Foots",
- cnName: '绯荤粺鏃ュ織',
- name: 'Sys_Log',
- url: "/Sys_Log/",
- sortName: "Id"
- });
- const editFormFields = ref({});
- const editFormOptions = ref([]);
- const searchFormFields = ref({"BeginDate":"","Url":"","LogType":[],"Success":[],"UserIP":"","ServiceIP":"","Role_Id":""});
- const searchFormOptions = ref([[{"title":"璇锋眰鍦板潃","field":"Url","type":"text"},{"title":"鐢ㄦ埛IP","field":"UserIP","type":"text"},{"title":"鏈嶅姟鍣↖P","field":"ServiceIP","type":"text"}],[{"title":"寮�濮嬫椂闂�","field":"BeginDate","type":"datetime"},{"dataKey":"restatus","data":[],"title":"鍝嶅簲鐘舵��","field":"Success","type":"selectList"},{"dataKey":"roles","data":[],"title":"瑙掕壊ID","field":"Role_Id","type":"select"}],[{"dataKey":"log","data":[],"title":"鏃ュ織绫诲瀷","field":"LogType","colSize":12,"type":"checkbox"}]]);
- const columns = ref([{field:'Id',title:'Id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
- {field:'BeginDate',title:'寮�濮嬫椂闂�',type:'datetime',width:140,align:'left',sortable:true},
- {field:'UserName',title:'鐢ㄦ埛鍚嶇О',type:'string',width:90,align:'left'},
- {field:'Url',title:'璇锋眰鍦板潃',type:'string',width:110,align:'left'},
- {field:'LogType',title:'鏃ュ織绫诲瀷',type:'string',bind:{ key:'log',data:[]},width:80,align:'left'},
- {field:'Success',title:'鍝嶅簲鐘舵��',type:'int',bind:{ key:'restatus',data:[]},width:80,align:'left'},
- {field:'ElapsedTime',title:'鏃堕暱',type:'int',width:60,align:'left'},
- {field:'RequestParameter',title:'璇锋眰鍙傛暟',type:'string',width:70,align:'left'},
- {field:'ResponseParameter',title:'鍝嶅簲鍙傛暟',type:'string',width:70,align:'left'},
- {field:'ExceptionInfo',title:'寮傚父淇℃伅',type:'string',width:70,align:'left'},
- {field:'UserIP',title:'鐢ㄦ埛IP',type:'string',width:90,align:'left'},
- {field:'ServiceIP',title:'鏈嶅姟鍣↖P',type:'string',width:90,hidden:true,align:'left'},
- {field:'BrowserType',title:'娴忚鍣ㄧ被鍨�',type:'string',width:90,align:'left'},
- {field:'User_Id',title:'鐢ㄦ埛ID',type:'int',width:90,hidden:true,align:'left'},
- {field:'Role_Id',title:'瑙掕壊ID',type:'int',bind:{ key:'roles',data:[]},width:90,hidden:true,align:'left'},
- {field:'EndDate',title:'缁撴潫鏃堕棿',type:'datetime',width:150,hidden:true,align:'left',sortable:true}]);
- const detail = ref({
- cnName: "#detailCnName",
- columns: [],
- sortName: "",
- key: ""
- });
- return {
- table,
- extend,
- editFormFields,
- editFormOptions,
- searchFormFields,
- searchFormOptions,
- columns,
- detail,
- };
- },
+ <script>
+import extend from "@/extension/system/Sys_Log.js";
+import { ref, defineComponent } from "vue";
+export default defineComponent({
+ setup() {
+ const table = ref({
+ key: "Id",
+ footer: "Foots",
+ cnName: "绯荤粺鏃ュ織",
+ name: "Sys_Log",
+ url: "/Sys_Log/",
+ sortName: "Id",
});
+ const editFormFields = ref({});
+ const editFormOptions = ref([]);
+ const searchFormFields = ref({
+ url: "",
+ requestParam: "",
+ responseParam: "",
+ beginDate: "",
+ });
+ const searchFormOptions = ref([
+ [
+ { title: "璇锋眰鍦板潃", field: "url", type: "like" },
+ { title: "璇锋眰鍙傛暟", field: "requestParam", type: "like" },
+ { title: "鍝嶅簲鍙傛暟", field: "responseParam", type: "like" },
+ ],
+ [{ title: "寮�濮嬫椂闂�", field: "beginDate", type: "datetime" }],
+ ]);
+ const columns = ref([
+ {
+ field: "id",
+ title: "Id",
+ type: "int",
+ width: 90,
+ hidden: true,
+ readonly: true,
+ require: true,
+ align: "left",
+ },
+ {
+ field: "beginDate",
+ title: "寮�濮嬫椂闂�",
+ type: "datetime",
+ width: 140,
+ align: "left",
+ sortable: true,
+ },
+ {
+ field: "elapsedTime",
+ title: "鏃堕暱",
+ type: "int",
+ width: 60,
+ align: "left",
+ },
+ {
+ field: "endDate",
+ title: "缁撴潫鏃堕棿",
+ type: "datetime",
+ width: 150,
+ hidden: true,
+ align: "left",
+ sortable: true,
+ },
+ {
+ field: "requestParam",
+ title: "璇锋眰鍙傛暟",
+ type: "string",
+ width: 70,
+ align: "left",
+ },
+ {
+ field: "responseParam",
+ title: "鍝嶅簲鍙傛暟",
+ type: "string",
+ width: 70,
+ align: "left",
+ },
+ {
+ field: "url",
+ title: "璇锋眰鍦板潃",
+ type: "string",
+ width: 110,
+ align: "left",
+ },
+ {
+ field: "userName",
+ title: "鐢ㄦ埛鍚嶇О",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "success",
+ title: "鍝嶅簲鐘舵��",
+ type: "int",
+ bind: { key: "restatus", data: [] },
+ width: 80,
+ align: "left",
+ hidden: true,
+ },
+ {
+ field: "userIP",
+ title: "鐢ㄦ埛IP",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "userId",
+ title: "鐢ㄦ埛ID",
+ type: "int",
+ width: 90,
+ hidden: true,
+ align: "left",
+ },
+ ]);
+ const detail = ref({
+ cnName: "#detailCnName",
+ columns: [],
+ sortName: "",
+ key: "",
+ });
+ 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/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue"
index 1c1154f..887aced 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue"
@@ -152,7 +152,6 @@
type: "string",
width: 90,
align: "left",
- hidden: true,
},
{
field: "grade",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/74867a10-626f-4e30-a018-f262a1dd62c2.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/74867a10-626f-4e30-a018-f262a1dd62c2.vsidx"
new file mode 100644
index 0000000..1d8a286
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/74867a10-626f-4e30-a018-f262a1dd62c2.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/8e07ae55-a2e7-4407-b10c-4a5a0c8d3f3a.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8e07ae55-a2e7-4407-b10c-4a5a0c8d3f3a.vsidx"
deleted file mode 100644
index f2e1345..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8e07ae55-a2e7-4407-b10c-4a5a0c8d3f3a.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/bb8909d9-102a-4651-8147-b631fc4f6ca7.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/bb8909d9-102a-4651-8147-b631fc4f6ca7.vsidx"
new file mode 100644
index 0000000..790c47a
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/bb8909d9-102a-4651-8147-b631fc4f6ca7.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/ConveyorWorkTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/ConveyorWorkTypeEnum.cs"
new file mode 100644
index 0000000..07ce34f
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/ConveyorWorkTypeEnum.cs"
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEAWCS_Common
+{
+ public enum ConveyorWorkTypeEnum
+ {
+ Undefined = 0,
+
+ Inbound = 1,
+
+ Outbound = 2
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
index d69da77..f20c07c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
@@ -27,7 +27,7 @@
namespace WIDESEAWCS_Model.Models
{
- [SugarTable(nameof(Dt_Task), "浠诲姟淇℃伅")]
+ [SugarTable(nameof(Dt_Task), "浠诲姟淇℃伅"), SugarIndex("unique_task_taskNum", nameof(TaskNum), OrderByType.Asc, true)]
public class Dt_Task : BaseEntity
{
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs"
index 4aceb97..c03ad9c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_UserController.cs"
@@ -29,6 +29,7 @@
{
_httpContextAccessor = httpContextAccessor;
}
+
[HttpPost, Route("swgLogin"), AllowAnonymous]
public dynamic SwgLogin([FromBody] SwaggerLoginRequest loginRequest)
{
@@ -39,21 +40,9 @@
try
{
- LoginInfo loginInfo = new LoginInfo
- {
- Password = loginRequest.pwd,
- UserName = loginRequest.name
- };
- var result = Service.Login(loginInfo);
- if (result.Status)
+ if (loginRequest.name == "admin" && loginRequest.pwd == $"admin!{DateTime.Now.ToString("yyyyMMdd")}")
{
HttpContext.SuccessSwagger();
- Dictionary<string, object>? dict = JsonConvert.DeserializeObject<Dictionary<string, object>>(result.Data.Serialize());
- if (dict != null)
- {
- HttpContext.SuccessSwaggerJwt((dict.ContainsKey("token") ? dict["token"].ToString() : "") ?? "");
- }
- string str = HttpContext.GetSuccessSwaggerJwt();
return new { result = true };
}
}
@@ -64,6 +53,7 @@
return new { result = false };
}
+
[HttpPost, Route("login"), AllowAnonymous]
public IActionResult Login([FromBody] LoginInfo loginInfo)
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 833dff5..80d033d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -28,6 +28,7 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_DTO.Agv;
+using WIDESEAWCS_Common;
using WIDESEAWCS_Common.APIEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
@@ -149,10 +150,14 @@
List<Dt_WarehouseDevice> warehouseDevices = Db.Queryable<Dt_WarehouseDevice>().ToList();
List<Dt_Task> tasks = new List<Dt_Task>();
+
+ bool flag = false;
+
foreach (var item in taskDTOs)
{
if (BaseDal.QueryFirst(x => x.TaskNum == item.TaskNum || x.PalletCode == item.PalletCode) != null)
{
+ flag = true;
continue;
}
Dt_Task task = _mapper.Map<Dt_Task>(item);
@@ -259,7 +264,7 @@
_taskExecuteDetailService.AddTaskExecuteDetail(tasks.Select(x => x.TaskNum).ToList(), "鎺ユ敹WMS浠诲姟");
- content = tasks.Count > 0 ? WebResponseContent.Instance.OK("鎴愬姛") : WebResponseContent.Instance.Error("澶辫触");
+ content = (tasks.Count > 0 || flag) ? WebResponseContent.Instance.OK("鎴愬姛") : WebResponseContent.Instance.Error("澶辫触");
}
catch (Exception ex)
{
@@ -312,7 +317,7 @@
/// <returns></returns>
public string? RequestAssignLocation(int taskNum, string roadwayNo)
{
- string responseStr = HttpHelper.Get($"http://127.0.0.1:9283/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}");
+ string responseStr = HttpHelper.Get($"http://127.0.0.1:9293/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}");
WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
if (responseContent != null && responseContent.Status && responseContent.Data != null)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/W_ConveyorLineDBName.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/W_ConveyorLineDBName.cs"
index 4d0cd05..890fd0e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/W_ConveyorLineDBName.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/W_ConveyorLineDBName.cs"
@@ -51,12 +51,12 @@
/// <summary>
/// 棰勭暀1
/// </summary>
- Sapre1,
+ Spare1,
/// <summary>
/// 棰勭暀2
/// </summary>
- Sapre2,
+ Spare2,
/// <summary>
/// 璇锋眰淇″彿
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs"
index 1a2f5e4..447ca5d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs"
@@ -31,7 +31,7 @@
private readonly IStationMangerRepository _stationMangerRepository;
private readonly IRouterRepository _routerRepository;
- public ConveyorLineJob_GM(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository,IRouterRepository routerRepository)
+ public ConveyorLineJob_GM(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
@@ -74,21 +74,46 @@
WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
if (content.Status)
{
- device.SetValue(W_ConveyorLineDB.ACK, true);
+ device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
}
}
}
else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
{
- device.SetValue(W_ConveyorLineDB.ACK, false);
+ Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.PalletCode == conveyorLineInfoRead.Barcode && x.DeviceCode == item.StationDeviceCode);
+ if (task != null)
+ {
+ task.CurrentAddress = item.StackerCraneStationCode;
+ task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
+ task.DeviceCode = item.StackerCraneCode;
+ _taskRepository.UpdateData(task);
+ }
+
+ device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
}
}
else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt())
{
- if(conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)
+ if(!conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Online && !conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK)
{
- Dt_Task task = _taskRepository.QueryFirst(x => x.NextAddress == item.StackerCraneCode);
+ Dt_Task task = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && string.IsNullOrEmpty(x.NextAddress));
+ if(task != null)
+ {
+ string oldAddress = task.NextAddress;
+ int oldStatus = task.TaskState;
+ task.NextAddress = item.StationCode;
+ task.DeviceCode = item.StackerCraneCode;
+ task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
+ task.TargetAddress = item.StationCode;
+ _taskRepository.UpdateData(task);
+ _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绯荤粺鑷姩娴佺▼,鐩爣鍦板潃鐢眥oldAddress}鍙樻洿涓簕task.NextAddress},浠诲姟鐘舵�佺敱{oldStatus}鍙樻洿涓簕task.TaskState}");
+ }
+ }
+
+ if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)//鍏ュ簱
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode);
if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
{
Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
@@ -114,18 +139,19 @@
_taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绯荤粺鑷姩娴佺▼,鐩爣鍦板潃鐢眥oldAddress}鍙樻洿涓簕task.NextAddress},浠诲姟鐘舵�佺敱{oldStatus}鍙樻洿涓簕task.TaskState}");
- device.SetValue(W_ConveyorLineDB.ACK, true);
+ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
+ device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
}
}
else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
{
- device.SetValue(W_ConveyorLineDB.ACK, false);
+ device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
}
else
{
if (!conveyorLineSignalWrite.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
{
- Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt());
+ Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == item.StationDeviceCode);
if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
{
Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
@@ -151,28 +177,54 @@
_taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绯荤粺鑷姩娴佺▼,鐩爣鍦板潃鐢眥oldAddress}鍙樻洿涓簕task.NextAddress},浠诲姟鐘舵�佺敱{oldStatus}鍙樻洿涓簕task.TaskState}");
- device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum);
- device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress);
- device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress);
- device.SetValue(W_ConveyorLineDB.STB, true);
+ device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
+ device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
}
}
- else if(conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
+ else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
{
- //todo 浠诲姟瀹屾垚
+ _taskService.TaskCompleted(conveyorLineInfoRead.TaskNum);
+ device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode);
}
}
}
else if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt())
{
- if(!conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK && !conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm)
+ if (!conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK && !conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm)
{
- Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType));
- if(task != null)
+ Dt_Task outTask = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState != TaskStatusEnum.New.ObjToInt() && x.TaskState != TaskStatusEnum.SC_Execute.ObjToInt() && x.TargetAddress == item.StationCode);
+ if (outTask == null)
{
- device.SetValue(W_ConveyorLineDB.STB, true);
+ Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType));
+ if (task != null)
+ {
+ //todo 杈撻�佺嚎宸ヤ綔妯″紡闇�瑕佸垽鏂�
+
+ string oldAddress = task.NextAddress;
+ int oldStatus = task.TaskState;
+ task.TaskState = TaskStatusEnum.Line_Execute.ObjToInt();
+ _taskRepository.UpdateData(task);
+
+ _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绯荤粺鑷姩娴佺▼,鐩爣鍦板潃鐢眥oldAddress}鍙樻洿涓簕task.NextAddress},浠诲姟鐘舵�佺敱{oldStatus}鍙樻洿涓簕task.TaskState}");
+
+ device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
+ device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
+ }
}
}
+ else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && !conveyorLineStatus.Alarm)
+ {
+ device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode);
+ }
+ else if (!conveyorLineSignalRead.STB && conveyorLineSignalWrite.ACK && !conveyorLineStatus.Alarm)
+ {
+ device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
+ }
}
}
else
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
index ffa7452..f2d5676 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
@@ -1,4 +1,5 @@
锘縰sing Microsoft.AspNetCore.Components.Routing;
+using Newtonsoft.Json;
using Quartz;
using System;
using System.Collections.Generic;
@@ -6,7 +7,9 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEAWCS_Common.APIEnum;
using WIDESEAWCS_Common.TaskEnum;
+using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_IBasicInfoRepository;
@@ -20,32 +23,54 @@
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
using WIDESEAWCS_Tasks.HoisterJob;
using WIDESEAWCS_Tasks.StackerCraneJob;
+using WIDESEAWCS_Core.Caches;
+using WIDESEAWCS_Tasks.ConveyorLineJob;
+using WIDESEAWCS_QuartzJob.Repository;
namespace WIDESEAWCS_Tasks
{
[DisallowConcurrentExecution]
public class StackerCraneJob_GM : JobBase, IJob
{
+ private readonly ICacheService _cacheService;
private readonly ITaskService _taskService;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
private readonly ITaskRepository _taskRepository;
private readonly IRouterService _routerService;
private readonly IStationMangerRepository _stationMangerRepository;
+ private readonly IRouterRepository _routerRepository;
+ private List<Dt_ApiInfo> apiInfos;
- public StackerCraneJob_GM(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository)
+ public StackerCraneJob_GM(ITaskService taskService, ICacheService cacheService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
_taskRepository = taskRepository;
_routerService = routerService;
_stationMangerRepository = stationMangerRepository;
+ _cacheService = cacheService;
+ _routerRepository = routerRepository;
+
+ string? apiInfoStr = _cacheService.Get("apiInfos");
+ if (!string.IsNullOrEmpty(apiInfoStr))
+ {
+ List<Dt_ApiInfo>? infos = JsonConvert.DeserializeObject<List<Dt_ApiInfo>>(apiInfoStr);
+ if (infos == null || infos.Count == 0)
+ {
+ apiInfos = new List<Dt_ApiInfo>();
+ }
+ else
+ {
+ apiInfos = infos;
+ }
+ }
}
public Task Execute(IJobExecutionContext context)
{
- CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams");
try
{
+ CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams");
if (commonStackerCrane != null)
{
if (!commonStackerCrane.IsEventSubscribed)
@@ -67,10 +92,12 @@
commonStackerCrane.LastTaskType = task.TaskType;
int oldState = task.TaskState;
task.TaskState = TaskStatusEnum.SC_Executing.ObjToInt();
- task.ExceptionMessage = "";
task.Dispatchertime = DateTime.Now;
+ task.ExceptionMessage = "";
_taskRepository.UpdateData(task);
_taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"绯荤粺鑷姩娴佺▼锛屼换鍔$姸鎬佷粠銆恵oldState}銆戣浆鍒般�恵task.TaskState}銆�");
+
+ commonStackerCrane.Communicator.Write("DB105.54", (short)1);
}
}
}
@@ -79,7 +106,7 @@
}
catch (Exception ex)
{
- WriteError(commonStackerCrane.DeviceName, ex.Message, ex);
+ WriteError(nameof(CommonStackerCraneJob), ex.Message, ex);
}
return Task.CompletedTask;
}
@@ -92,30 +119,64 @@
private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender, WIDESEAWCS_QuartzJob.StackerCrane.StackerCraneTaskCompletedEventArgs e)
{
CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane;
+ if (commonStackerCrane != null)
+ {
+ if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
+ {
+ StackerCraneTaskCompleted(e.TaskNum, commonStackerCrane.DeviceCode);
+ commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5);
+ }
+ }
+ }
+
+ public WebResponseContent StackerCraneTaskCompleted(int taskNum, string deviceCode)
+ {
try
{
- if (commonStackerCrane != null)
+ Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == taskNum);
+ if (task != null)
{
- if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
+ if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
{
- WriteInfo(commonStackerCrane.DeviceName, $"璇诲彇鍒颁换鍔″畬鎴愪俊鍙�,{e.TaskNum}");
- Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == e.TaskNum);
- if (task != null)
+ Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneStationCode == task.NextAddress);
+ if (stationManger == null)
{
- _taskService.TaskCompleted(e.TaskNum);
+ _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"杈撻�佺嚎鍑哄簱绔欑偣鏈厤缃�,{task.NextAddress}");
+ _taskService.UpdateTaskExceptionMessage(taskNum, $"杈撻�佺嚎鍑哄簱绔欑偣鏈厤缃�,{task.NextAddress}");
+ return WebResponseContent.Instance.Error($"杈撻�佺嚎鍑哄簱绔欑偣鏈厤缃�,{task.NextAddress}");
}
- else
- {
- WriteInfo(commonStackerCrane.DeviceName, $"璇诲彇鍒颁换鍔″畬鎴愪俊鍙�,鏈壘鍒板搴旂殑浠诲姟淇℃伅,{e.TaskNum}");
- }
- commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5);
+
+ int oldStatus = task.TaskState;
+ task.DeviceCode = "CL01_GM";
+ task.TaskState = TaskStatusEnum.Line_Execute.ObjToInt();
+ task.CurrentAddress = stationManger.StationCode;
+ _taskRepository.UpdateData(task);
+ _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"绯荤粺鑷姩娴佺▼,锛屼换鍔$姸鎬佷粠銆恵oldStatus}銆戣浆鍒般�恵task.TaskState}銆�");
+ //todo 瀹屾垚
+ }
+ else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup || task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
+ {
+ _taskService.TaskCompleted(taskNum);
+ }
+ else
+ {
+ WriteInfo(deviceCode, $"鏈壘鍒拌浠诲姟绫诲瀷鍥炶皟WMS浠诲姟瀹屾垚鎺ュ彛,{task.TaskType}");
+ _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"鏈壘鍒拌浠诲姟绫诲瀷鍥炶皟WMS浠诲姟瀹屾垚鎺ュ彛,{task.TaskType}");
+ _taskService.UpdateTaskExceptionMessage(taskNum, $"鏈壘鍒拌浠诲姟绫诲瀷鍥炶皟WMS浠诲姟瀹屾垚鎺ュ彛,{task.TaskType}");
}
}
+ else
+ {
+ WriteInfo(deviceCode, $"鏈壘鍒颁换鍔′俊鎭�,浠诲姟鍙�:{taskNum}");
+ return WebResponseContent.Instance.Error($"鏈壘鍒颁换鍔′俊鎭�,浠诲姟鍙�:{taskNum}");
+ }
+
+ return WebResponseContent.Instance.OK();
}
catch (Exception ex)
{
- WriteError(commonStackerCrane?.DeviceCode ?? nameof(StackerCraneJob_YM), ex.Message, ex);
-
+ WriteError(deviceCode, $"浠诲姟瀹屾垚閿欒", ex);
+ return WebResponseContent.Instance.Error(ex.Message);
}
}
@@ -153,23 +214,37 @@
if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
{
- if (OutTaskStationIsOccupied(task) != null || true)
+ if (OutTaskStationIsOccupied(task) == null)
{
- return task;
- }
- else
- {
+ bool flag = false;
List<string> otherOutStaionCodes = _routerService.QueryNextRoutes(commonStackerCrane.DeviceCode, task.NextAddress).Select(x => x.ChildPosi).ToList();
List<Dt_Task> tasks = _taskService.QueryStackerCraneOutTasks(commonStackerCrane.DeviceCode, otherOutStaionCodes);
foreach (var item in tasks)
{
if (OutTaskStationIsOccupied(task) != null)
{
- return task;
+ flag = true;
+ break;
}
}
- task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
+ if (!flag)
+ {
+ task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
+ }
}
+ }
+
+ if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
+ {
+ string? url = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.FeedBackWMSTaskCompleted.ToString())?.ApiAddress;
+ if (string.IsNullOrEmpty(url))
+ {
+ _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛");
+ WriteInfo(commonStackerCrane.DeviceCode, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛");
+ _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛");
+ return null;
+ }
+ HttpHelper.Post($"{url}?taskNum={task.TaskNum}&locationCode={task.NextAddress}", "");//todo 璋冪敤WMS浠诲姟瀹屾垚鏂规硶
}
return task;
@@ -182,14 +257,14 @@
/// <returns>濡傛灉鏈鍗犵敤锛岃繑鍥炰紶鍏ョ殑浠诲姟淇℃伅锛屽惁鍒欙紝杩斿洖null</returns>
private Dt_Task? OutTaskStationIsOccupied([NotNull] Dt_Task task)
{
- Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.TargetAddress && x.StackerCraneCode == task.DeviceCode);
+ Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.NextAddress && x.StackerCraneCode == task.DeviceCode);
if (stationManger != null)
{
IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
if (device != null)
{
OtherDevice client = (OtherDevice)device;
- if (client.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, stationManger.StationCode))//鍑哄簱绔欏彴鏈鍗犵敤
+ if (!client.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Goods, stationManger.StationCode))//鍑哄簱绔欏彴鏈鍗犵敤
{
task.NextAddress = stationManger.StackerCraneStationCode;
_taskRepository.UpdateData(task);
@@ -198,11 +273,13 @@
}
else
{
+ WriteInfo(task.DeviceCode, $"鏈壘鍒板嚭搴撶珯鍙般�恵stationManger.StationDeviceCode}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞垽鏂嚭搴撶珯鍙版槸鍚﹁鍗犵敤");
_taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒板嚭搴撶珯鍙般�恵stationManger.StationDeviceCode}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞垽鏂嚭搴撶珯鍙版槸鍚﹁鍗犵敤");
}
}
else
{
+ WriteInfo(task.DeviceCode, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鏍¢獙绔欏彴");
_taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鏍¢獙绔欏彴");
}
return null;
@@ -221,7 +298,7 @@
stackerCraneTaskCommand.Barcode = task.PalletCode;
stackerCraneTaskCommand.TaskNum = task.TaskNum;
stackerCraneTaskCommand.WorkType = 1;
- stackerCraneTaskCommand.TrayType = 1;
+ stackerCraneTaskCommand.TrayType = (Int16)task.PalletType;
if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//鍒ゆ柇鏄惁鏄叆搴撲换鍔�
{
string[] startCodes = task.CurrentAddress.Split("-");
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"
new file mode 100644
index 0000000..8efb4dd
--- /dev/null
+++ "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"
@@ -0,0 +1,240 @@
+锘縰sing Quartz;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEAWCS_Common;
+using WIDESEAWCS_Common.Helper;
+using WIDESEAWCS_Common.TaskEnum;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_IBasicInfoRepository;
+using WIDESEAWCS_ITaskInfoRepository;
+using WIDESEAWCS_ITaskInfoService;
+using WIDESEAWCS_Model.Models;
+using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_QuartzJob.DTO;
+using WIDESEAWCS_QuartzJob.Models;
+using WIDESEAWCS_QuartzJob.Repository;
+using WIDESEAWCS_Tasks.ConveyorLineJob;
+
+namespace WIDESEAWCS_Tasks
+{
+ [DisallowConcurrentExecution]
+ public class ConveyorLineJob_BC : JobBase, IJob
+ {
+
+ private readonly ITaskService _taskService;
+ private readonly ITaskExecuteDetailService _taskExecuteDetailService;
+ private readonly ITaskRepository _taskRepository;
+ private readonly IStationMangerRepository _stationMangerRepository;
+ private readonly IRouterRepository _routerRepository;
+
+ public ConveyorLineJob_BC(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository)
+ {
+ _taskService = taskService;
+ _taskExecuteDetailService = taskExecuteDetailService;
+ _taskRepository = taskRepository;
+ _stationMangerRepository = stationMangerRepository;
+ _routerRepository = routerRepository;
+ }
+
+ public Task Execute(IJobExecutionContext context)
+ {
+ bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
+ if (flag && value != null)
+ {
+ OtherDevice device = (OtherDevice)value;
+ List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList();
+ List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
+ foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
+ {
+ DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
+
+ DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_ConveyorLineDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
+
+ if (deviceProRead != null && deviceProWrite != null)
+ {
+ R_ConveyorLineInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineInfo>(deviceProRead.DeviceProAddress);
+
+ R_ConveyorLineStatus conveyorLineStatus = conveyorLineInfoRead.Status.ByteToBoolObject<R_ConveyorLineStatus>();
+
+ ConveyorLineSignal conveyorLineSignalRead = conveyorLineInfoRead.Signal.ByteToBoolObject<ConveyorLineSignal>();
+
+ W_ConveyorLineInfo conveyorLineInfoWrite = device.Communicator.ReadCustomer<W_ConveyorLineInfo>(deviceProWrite.DeviceProAddress);
+
+ ConveyorLineSignal conveyorLineSignalWrite = conveyorLineInfoWrite.Signal.ByteToBoolObject<ConveyorLineSignal>();
+ if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt())
+ {
+ if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)
+ {
+ if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))
+ {
+ WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
+ if (content.Status)
+ {
+ device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ }
+ }
+ }
+ else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.PalletCode == conveyorLineInfoRead.Barcode && x.DeviceCode == item.StationDeviceCode);
+ if (task != null)
+ {
+ task.CurrentAddress = item.StackerCraneStationCode;
+ task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
+ task.DeviceCode = item.StackerCraneCode;
+ _taskRepository.UpdateData(task);
+ }
+
+ device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
+ }
+
+ }
+ else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt())
+ {
+ if (!conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Online && !conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK)
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && string.IsNullOrEmpty(x.NextAddress));
+ if (task != null)
+ {
+ string oldAddress = task.NextAddress;
+ int oldStatus = task.TaskState;
+ task.NextAddress = item.StationCode;
+ task.DeviceCode = item.StackerCraneCode;
+ task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
+ task.TargetAddress = item.StationCode;
+ _taskRepository.UpdateData(task);
+ _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绯荤粺鑷姩娴佺▼,鐩爣鍦板潃鐢眥oldAddress}鍙樻洿涓簕task.NextAddress},浠诲姟鐘舵�佺敱{oldStatus}鍙樻洿涓簕task.TaskState}");
+ }
+ }
+
+ if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)//鍏ュ簱
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode);
+ if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
+ {
+ Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
+ if (stationManger == null)
+ {
+ WriteInfo(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ continue;
+ }
+ string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
+ if (string.IsNullOrEmpty(locationCode))
+ {
+ WriteInfo(item.StationName, $"璇锋眰鍒嗛厤璐т綅杩斿洖淇℃伅閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ continue;
+ }
+ string oldAddress = task.NextAddress;
+ int oldStatus = task.TaskState;
+ task.CurrentAddress = stationManger.StackerCraneStationCode;
+ task.TargetAddress = locationCode;
+ task.NextAddress = locationCode;
+ task.DeviceCode = stationManger.StackerCraneCode;
+ task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
+ _taskRepository.UpdateData(task);
+
+ _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绯荤粺鑷姩娴佺▼,鐩爣鍦板潃鐢眥oldAddress}鍙樻洿涓簕task.NextAddress},浠诲姟鐘舵�佺敱{oldStatus}鍙樻洿涓簕task.TaskState}");
+
+ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
+ device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ }
+ }
+ else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
+ {
+ device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
+ }
+ else
+ {
+ if (!conveyorLineSignalWrite.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == item.StationDeviceCode);
+ if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
+ {
+ Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
+ if (stationManger == null)
+ {
+ WriteInfo(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ continue;
+ }
+
+ Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && (task.CurrentAddress == x.StartPosi));
+ if (router == null)
+ {
+ WriteInfo(item.StationName, $"鏈壘鍒拌矾鐢遍厤缃俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ continue;
+ }
+
+ string oldAddress = task.NextAddress;
+ int oldStatus = task.TaskState;
+ task.NextAddress = router.NextPosi;
+ task.TargetAddress = router.NextPosi;
+ task.TaskState = TaskStatusEnum.Line_Executing.ObjToInt();
+ _taskRepository.UpdateData(task);
+
+ _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绯荤粺鑷姩娴佺▼,鐩爣鍦板潃鐢眥oldAddress}鍙樻洿涓簕task.NextAddress},浠诲姟鐘舵�佺敱{oldStatus}鍙樻洿涓簕task.TaskState}");
+
+ device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode);
+ device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
+ }
+ }
+ else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
+ {
+ _taskService.TaskCompleted(conveyorLineInfoRead.TaskNum);
+ device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode);
+ }
+ }
+ }
+ else if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt())
+ {
+ if (!conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK && !conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm)
+ {
+ Dt_Task outTask = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState != TaskStatusEnum.New.ObjToInt() && x.TaskState != TaskStatusEnum.SC_Execute.ObjToInt() && x.TargetAddress == item.StationCode);
+ if (outTask == null)
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType));
+ if (task != null)
+ {
+ //todo 杈撻�佺嚎宸ヤ綔妯″紡闇�瑕佸垽鏂�
+
+ string oldAddress = task.NextAddress;
+ int oldStatus = task.TaskState;
+ task.TaskState = TaskStatusEnum.Line_Execute.ObjToInt();
+ _taskRepository.UpdateData(task);
+
+ _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绯荤粺鑷姩娴佺▼,鐩爣鍦板潃鐢眥oldAddress}鍙樻洿涓簕task.NextAddress},浠诲姟鐘舵�佺敱{oldStatus}鍙樻洿涓簕task.TaskState}");
+
+ device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Inbound.ObjToInt(), item.StationCode);
+ device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
+ }
+ }
+ }
+ else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && !conveyorLineStatus.Alarm)
+ {
+ device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode);
+ }
+ else if (!conveyorLineSignalRead.STB && conveyorLineSignalWrite.ACK && !conveyorLineStatus.Alarm)
+ {
+ device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
+ }
+ }
+ }
+ else
+ {
+ WriteInfo(device.DeviceName, $"鏈壘鍒拌澶囧瓙缂栧彿{item.StationCode}鐨勫崗璁俊鎭�");
+ }
+ }
+ }
+
+ return Task.CompletedTask;
+ }
+ }
+}
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/StackerCraneJob_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/StackerCraneJob_BC.cs"
index 9f1fdb7..14ec422 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/StackerCraneJob_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/StackerCraneJob_BC.cs"
@@ -20,25 +20,47 @@
using WIDESEAWCS_Tasks.HoisterJob;
using WIDESEAWCS_Tasks.StackerCraneJob;
using WIDESEAWCS_Tasks;
+using WIDESEAWCS_Common.APIEnum;
+using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Caches;
+using Newtonsoft.Json;
namespace WIDESEAWCS_Tasks
{
[DisallowConcurrentExecution]
public class StackerCraneJob_BC : JobBase, IJob
{
+ private readonly ICacheService _cacheService;
private readonly ITaskService _taskService;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
private readonly ITaskRepository _taskRepository;
private readonly IRouterService _routerService;
private readonly IStationMangerRepository _stationMangerRepository;
+ private List<Dt_ApiInfo> apiInfos;
- public StackerCraneJob_BC(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository)
+ public StackerCraneJob_BC(ITaskService taskService, ICacheService cacheService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
_taskRepository = taskRepository;
_routerService = routerService;
_stationMangerRepository = stationMangerRepository;
+ _cacheService = cacheService;
+
+ string? apiInfoStr = _cacheService.Get("apiInfos");
+ if (!string.IsNullOrEmpty(apiInfoStr))
+ {
+ List<Dt_ApiInfo>? infos = JsonConvert.DeserializeObject<List<Dt_ApiInfo>>(apiInfoStr);
+ if (infos == null || infos.Count == 0)
+ {
+ apiInfos = new List<Dt_ApiInfo>();
+ }
+ else
+ {
+ apiInfos = infos;
+ }
+ }
}
public Task Execute(IJobExecutionContext context)
@@ -52,25 +74,25 @@
{
commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//璁㈤槄浠诲姟瀹屾垚浜嬩欢
}
-
- if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal)
+ commonStackerCrane.CheckStackerCraneTaskCompleted();//闃叉浠诲姟瀹屾垚浜嬩欢鐩戞祴瓒呮椂锛屽啀鎵嬪姩瑙﹀彂涓�娆�
+ if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
{
- commonStackerCrane.CheckStackerCraneTaskCompleted();//闃叉浠诲姟瀹屾垚浜嬩欢鐩戞祴瓒呮椂锛屽啀鎵嬪姩瑙﹀彂涓�娆�
-
- if (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
+ Dt_Task? task = GetTask(commonStackerCrane);
+ if (task != null)
{
- Dt_Task? task = GetTask(commonStackerCrane);
- if (task != null)
+ StackerCraneTaskCommand? stackerCraneTaskCommand = ConvertToStackerCraneTaskCommand(task);
+ if (stackerCraneTaskCommand != null)
{
- StackerCraneTaskCommand? stackerCraneTaskCommand = ConvertToStackerCraneTaskCommand(task);
- if (stackerCraneTaskCommand != null)
+ bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
+ if (sendFlag)
{
- bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
- if (sendFlag)
- {
- commonStackerCrane.LastTaskType = task.TaskType;
- // _taskService.UpdateTaskStatusToNext(task.TaskNum);
- }
+ commonStackerCrane.LastTaskType = task.TaskType;
+ int oldState = task.TaskState;
+ task.TaskState = TaskStatusEnum.SC_Executing.ObjToInt();
+ task.Dispatchertime = DateTime.Now;
+ task.ExceptionMessage = "";
+ _taskRepository.UpdateData(task);
+ _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"绯荤粺鑷姩娴佺▼锛屼换鍔$姸鎬佷粠銆恵oldState}銆戣浆鍒般�恵task.TaskState}銆�");
}
}
}
@@ -96,10 +118,59 @@
{
if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
{
- Console.Out.WriteLine("TaskCompleted" + e.TaskNum);
- // _taskService.StackCraneTaskCompleted(e.TaskNum);
+ StackerCraneTaskCompleted(e.TaskNum, commonStackerCrane.DeviceCode);
commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5);
}
+ }
+ }
+
+ public WebResponseContent StackerCraneTaskCompleted(int taskNum, string deviceCode)
+ {
+ try
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == taskNum);
+ if (task != null)
+ {
+ if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
+ {
+ Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneStationCode == task.NextAddress);
+ if (stationManger == null)
+ {
+ _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"AGV绔欑偣鏈厤缃�,{task.NextAddress}");
+ _taskService.UpdateTaskExceptionMessage(taskNum, $"AGV绔欑偣鏈厤缃�,{task.NextAddress}");
+ return WebResponseContent.Instance.Error($"AGV绔欑偣鏈厤缃�,{task.NextAddress}");
+ }
+ int oldStatus = task.TaskState;
+ task.DeviceCode = "AGV_CSJ";
+ task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
+ task.CurrentAddress = stationManger.AGVStationCode;
+ task.NextAddress = task.TargetAddress;
+ _taskRepository.UpdateData(task);
+ _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"绯荤粺鑷姩娴佺▼,锛屼换鍔$姸鎬佷粠銆恵oldStatus}銆戣浆鍒般�恵task.TaskState}銆�");
+ }
+ else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup || task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
+ {
+ _taskService.TaskCompleted(taskNum);
+ }
+ else
+ {
+ WriteInfo(deviceCode, $"鏈壘鍒拌浠诲姟绫诲瀷鍥炶皟WMS浠诲姟瀹屾垚鎺ュ彛,{task.TaskType}");
+ _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"鏈壘鍒拌浠诲姟绫诲瀷鍥炶皟WMS浠诲姟瀹屾垚鎺ュ彛,{task.TaskType}");
+ _taskService.UpdateTaskExceptionMessage(taskNum, $"鏈壘鍒拌浠诲姟绫诲瀷鍥炶皟WMS浠诲姟瀹屾垚鎺ュ彛,{task.TaskType}");
+ }
+ }
+ else
+ {
+ WriteInfo(deviceCode, $"鏈壘鍒颁换鍔′俊鎭�,浠诲姟鍙�:{taskNum}");
+ return WebResponseContent.Instance.Error($"鏈壘鍒颁换鍔′俊鎭�,浠诲姟鍙�:{taskNum}");
+ }
+
+ return WebResponseContent.Instance.OK();
+ }
+ catch (Exception ex)
+ {
+ WriteError(deviceCode, $"浠诲姟瀹屾垚閿欒", ex);
+ return WebResponseContent.Instance.Error(ex.Message);
}
}
@@ -137,23 +208,37 @@
if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
{
- if (OutTaskStationIsOccupied(task) != null || true)
+ if (OutTaskStationIsOccupied(task) == null)
{
- return task;
- }
- else
- {
+ bool flag = false;
List<string> otherOutStaionCodes = _routerService.QueryNextRoutes(commonStackerCrane.DeviceCode, task.NextAddress).Select(x => x.ChildPosi).ToList();
List<Dt_Task> tasks = _taskService.QueryStackerCraneOutTasks(commonStackerCrane.DeviceCode, otherOutStaionCodes);
foreach (var item in tasks)
{
if (OutTaskStationIsOccupied(task) != null)
{
- return task;
+ flag = true;
+ break;
}
}
- task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
+ if (!flag)
+ {
+ task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
+ }
}
+ }
+
+ if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
+ {
+ string? url = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.FeedBackWMSTaskCompleted.ToString())?.ApiAddress;
+ if (string.IsNullOrEmpty(url))
+ {
+ _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛");
+ WriteInfo(commonStackerCrane.DeviceCode, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛");
+ _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛");
+ return null;
+ }
+ HttpHelper.Post($"{url}?taskNum={task.TaskNum}&locationCode={task.NextAddress}", "");//todo 璋冪敤WMS浠诲姟瀹屾垚鏂规硶
}
return task;
@@ -166,7 +251,7 @@
/// <returns>濡傛灉鏈鍗犵敤锛岃繑鍥炰紶鍏ョ殑浠诲姟淇℃伅锛屽惁鍒欙紝杩斿洖null</returns>
private Dt_Task? OutTaskStationIsOccupied([NotNull] Dt_Task task)
{
- Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.TargetAddress && x.StackerCraneCode == task.DeviceCode);
+ Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.NextAddress && x.StackerCraneCode == task.DeviceCode);
if (stationManger != null)
{
IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
@@ -175,18 +260,21 @@
OtherDevice client = (OtherDevice)device;
if (client.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, stationManger.StationCode))//鍑哄簱绔欏彴鏈鍗犵敤
{
- task.TargetAddress = stationManger.StackerCraneStationCode;
+ task.NextAddress = stationManger.StackerCraneStationCode;
_taskRepository.UpdateData(task);
+ client.SetValue(GroundStationDBName.R_IsCanPut, true, stationManger.StationCode);
return task;
}
}
else
{
+ WriteInfo(task.DeviceCode, $"鏈壘鍒板嚭搴撶珯鍙般�恵stationManger.StationDeviceCode}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞垽鏂嚭搴撶珯鍙版槸鍚﹁鍗犵敤");
_taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒板嚭搴撶珯鍙般�恵stationManger.StationDeviceCode}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞垽鏂嚭搴撶珯鍙版槸鍚﹁鍗犵敤");
}
}
else
{
+ WriteInfo(task.DeviceCode, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鏍¢獙绔欏彴");
_taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鏍¢獙绔欏彴");
}
return null;
@@ -205,19 +293,42 @@
stackerCraneTaskCommand.Barcode = task.PalletCode;
stackerCraneTaskCommand.TaskNum = task.TaskNum;
stackerCraneTaskCommand.WorkType = 1;
- stackerCraneTaskCommand.TrayType = 1;
+ stackerCraneTaskCommand.TrayType = (Int16)task.PalletType;
if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//鍒ゆ柇鏄惁鏄叆搴撲换鍔�
{
- //List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway);
- //if (routers.Count > 0)
- //{
string[] startCodes = task.CurrentAddress.Split("-");
-
- stackerCraneTaskCommand.StartRow = Convert.ToInt16(startCodes[0]);
- stackerCraneTaskCommand.StartColumn = Convert.ToInt16(startCodes[1]);
- stackerCraneTaskCommand.StartLayer = Convert.ToInt16(startCodes[2]);
+ if (startCodes.Length == 3)
+ {
+ stackerCraneTaskCommand.StartRow = Convert.ToInt16(startCodes[0]);
+ stackerCraneTaskCommand.StartColumn = Convert.ToInt16(startCodes[1]);
+ stackerCraneTaskCommand.StartLayer = Convert.ToInt16(startCodes[2]);
+ }
+ else
+ {
+ _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍏ュ簱浠诲姟璧风偣閿欒锛岃捣鐐癸細銆恵task.CurrentAddress}銆�");
+ WriteInfo(task.DeviceCode, $"鍏ュ簱浠诲姟璧风偣閿欒锛岃捣鐐癸細銆恵task.CurrentAddress}銆�");
+ return null;
+ }
string[] targetCodes = task.NextAddress.Split("-");
+ if (targetCodes.Length == 5)
+ {
+ stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[1]);
+ stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[2]);
+ stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[3]);
+ }
+ else
+ {
+ //鏁版嵁閰嶇疆閿欒
+ _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍏ュ簱浠诲姟缁堢偣閿欒锛岀粓鐐癸細銆恵task.NextAddress}銆�");
+ WriteInfo(task.DeviceCode, $"鍏ュ簱浠诲姟缁堢偣閿欒锛岀粓鐐癸細銆恵task.NextAddress}銆�");
+ return null;
+ }
+ }
+ else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
+ {
+ string[] targetCodes = task.NextAddress.Split("-");
+
if (targetCodes.Length == 3)
{
stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
@@ -227,73 +338,54 @@
else
{
//鏁版嵁閰嶇疆閿欒
- _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍏ュ簱浠诲姟缁堢偣閿欒锛岃捣鐐癸細銆恵task.NextAddress}銆�");
+ _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍑哄簱浠诲姟缁堢偣閿欒锛岀粓鐐癸細銆恵task.NextAddress}銆�");
+ WriteInfo(task.DeviceCode, $"鍑哄簱浠诲姟缁堢偣閿欒锛岀粓鐐癸細銆恵task.NextAddress}銆�");
return null;
}
- //}
- //else
- //{
- // _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鑾峰彇瀵瑰簲鐨勫爢鍨涙満鍙栬揣绔欏彴淇℃伅");
- // return null;
- //}
- }
- else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
- {
- //List<Dt_Router> routers = _routerService.QueryNextRoutes(task.Roadway, task.TargetAddress);
- //if (routers.Count > 0)
+
+ string[] sourceCodes = task.CurrentAddress.Split("-");
+ if (sourceCodes.Length == 5)
{
- string[] targetCodes = task.NextAddress.Split("-");
-
- stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
- stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
- stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
-
- string[] sourceCodes = task.CurrentAddress.Split("-");
- if (sourceCodes.Length == 3)
- {
- stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]);
- stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
- stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
- }
- else
- {
- //鏁版嵁閰嶇疆閿欒
- _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍑哄簱浠诲姟璧风偣閿欒锛岃捣鐐癸細銆恵task.CurrentAddress}銆�");
- return null;
- }
+ stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[1]);
+ stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[2]);
+ stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[3]);
}
- //else
- //{
- // _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鑾峰彇瀵瑰簲鐨勫爢鍨涙満鏀捐揣绔欏彴淇℃伅");
- // return null;
- //}
+ else
+ {
+ //鏁版嵁閰嶇疆閿欒
+ _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍑哄簱浠诲姟璧风偣閿欒锛岃捣鐐癸細銆恵task.CurrentAddress}銆�");
+ WriteInfo(task.DeviceCode, $"鍑哄簱浠诲姟璧风偣閿欒锛岃捣鐐癸細銆恵task.CurrentAddress}銆�");
+ return null;
+ }
}
else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
{
string[] targetCodes = task.NextAddress.Split("-");
- if (targetCodes.Length == 3)
+ if (targetCodes.Length == 5)
{
- stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
- stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
- stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
+ stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[1]);
+ stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[2]);
+ stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[3]);
}
else
{
//鏁版嵁閰嶇疆閿欒
- _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"绉诲簱浠诲姟缁堢偣閿欒锛岃捣鐐癸細銆恵task.NextAddress}銆�");
+ _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"绉诲簱浠诲姟缁堢偣閿欒锛岀粓鐐癸細銆恵task.NextAddress}銆�");
+ WriteInfo(task.DeviceCode, $"绉诲簱浠诲姟缁堢偣閿欒锛岀粓鐐癸細銆恵task.NextAddress}銆�");
return null;
}
string[] sourceCodes = task.CurrentAddress.Split("-");
- if (sourceCodes.Length == 3)
+ if (sourceCodes.Length == 5)
{
- stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]);
- stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
- stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
+ stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[1]);
+ stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[2]);
+ stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[3]);
}
else
{
//鏁版嵁閰嶇疆閿欒
_taskService.UpdateTaskExceptionMessage(task.TaskNum, $"绉诲簱浠诲姟璧风偣閿欒锛岃捣鐐癸細銆恵task.CurrentAddress}銆�");
+ WriteInfo(task.DeviceCode, $"绉诲簱浠诲姟璧风偣閿欒锛岃捣鐐癸細銆恵task.CurrentAddress}銆�");
return null;
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs"
index 92aa37b..c9593f4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs"
@@ -208,22 +208,23 @@
if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
{
- if (OutTaskStationIsOccupied(task) != null)
+ if (OutTaskStationIsOccupied(task) == null)
{
- return task;
- }
- else
- {
+ bool flag = false;
List<string> otherOutStaionCodes = _routerService.QueryNextRoutes(commonStackerCrane.DeviceCode, task.NextAddress).Select(x => x.ChildPosi).ToList();
List<Dt_Task> tasks = _taskService.QueryStackerCraneOutTasks(commonStackerCrane.DeviceCode, otherOutStaionCodes);
foreach (var item in tasks)
{
if (OutTaskStationIsOccupied(task) != null)
{
- return task;
+ flag = true;
+ break;
}
}
- task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
+ if (!flag)
+ {
+ task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue"
index e123323..5b7a400 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue"
@@ -66,9 +66,16 @@
printWindow.focus();
printWindow.print();
printWindow.close();
+ this.http
+ .post("api/palletCodeInfo/PrintStatusUp?printCode="+this.palletCode, null, "鏁版嵁澶勭悊涓�")
+ .then((x) => {
+ if (!x.status) return this.$message.error(x.message);
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.$parent.refresh();
+ this.showDetialBox = false;
+ });
},
},
-
created() {},
};
</script>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
index 35b3d5e..86d7f1c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
@@ -179,9 +179,12 @@
});
},
outbound() {
+ if(this.selection.length<=0){
+ return this.$message.error("璇峰嬀閫�");
+ }
this.http
.post(
- "api/Task/GenerateOutboundTask?id=" + this.row.id,
+ "api/Task/GenerateOutboundTask?orderDetailId=" + this.row.id,
this.selection,
"鏁版嵁澶勭悊涓�"
)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
index 40096ab..9f0e8c5 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
@@ -231,6 +231,7 @@
if (column.prop == "assignStock") {
this.$refs.child.open(row);
} else {
+ //鐐瑰嚮鎵撳紑鍑哄簱璇︽儏
this.$refs.selectedStock.open(row);
}
},
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
index e43f901..a009b54 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
@@ -17,22 +17,22 @@
methods: {
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
onInit() {
- let InOrder = this.buttons.find(x => x.value == 'StockOutbound');
- if (InOrder) {
- InOrder.onClick = function () {
- let rows = this.$refs.table.getSelected();
- if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
- if (rows.length > 1) return this.$error("璇烽�夋嫨鍗曟潯鏁版嵁!");
- var keys = rows.map(x => { return x.stockId });
- this.http
- .post("api/Task/Outbound?id="+keys[0], null, "鏁版嵁澶勭悊涓�")
- .then((x) => {
- if (!x.status) return this.$message.error(x.message);
- this.$message.success("鎿嶄綔鎴愬姛");
- this.refresh();
- });
- }
- }
+ // let InOrder = this.buttons.find(x => x.value == 'StockOutbound');
+ // if (InOrder) {
+ // InOrder.onClick = function () {
+ // let rows = this.$refs.table.getSelected();
+ // if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+ // if (rows.length > 1) return this.$error("璇烽�夋嫨鍗曟潯鏁版嵁!");
+ // var keys = rows.map(x => { return x.stockId });
+ // this.http
+ // .post("api/Task/Outbound?id="+keys[0], null, "鏁版嵁澶勭悊涓�")
+ // .then((x) => {
+ // if (!x.status) return this.$message.error(x.message);
+ // this.$message.success("鎿嶄綔鎴愬姛");
+ // this.refresh();
+ // });
+ // }
+ // }
this.columns.forEach(column => {
if (column.field == 'materielCode') {
column.formatter = (row) => {
@@ -71,6 +71,16 @@
return '<span style="color: #F56C6C">'+ daysSinceClosest+"澶�"+'</span>';
}
}
+ if (column.field == 'sumStock') {
+ column.formatter = (row) => {
+ var sum=0;
+ const closestDate = row.details
+ .map(x => {
+ sum+=(x.stockQuantity)
+ })
+ return '<span style="color: #F56C6C">'+ sum+row.details[0].unit+'</span>';
+ }
+ }
})
},
onInited() {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue"
index 991ad93..a6d37ee 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue"
@@ -116,14 +116,14 @@
},
{
field: "modifier",
- title: "淇敼浜�",
+ title: "鏈�鍚庢墦鍗颁汉鍛�",
type: "string",
width: 100,
align: "left",
},
{
field: "modifyDate",
- title: "淇敼鏃堕棿",
+ title: "鏈�鍚庢墦鍗版椂闂�",
type: "datetime",
width: 160,
align: "left",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
index 00422e9..ff1cc15 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
@@ -48,6 +48,7 @@
field: "orderNo",
title: "鍗曟嵁缂栧彿",
type: "string",
+ readonly:true
},
{
title: "涓婃父鍗曟嵁缂栧彿",
@@ -142,7 +143,7 @@
type: "string",
width: 160,
align: "left",
- link: true,
+ // link: true,
},
{
field: "upperOrderNo",
@@ -269,6 +270,15 @@
required: true,
},
{
+ field: "rowNo",
+ title: "琛屽彿",
+ type: "string",
+ width: 90,
+ align: "left",
+ edit: { type: "number" },
+ required: true,
+ },
+ {
field: "lockQuantity",
title: "閿佸畾鏁伴噺",
type: "int",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/record/locationStatusChangeRecord.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/record/locationStatusChangeRecord.vue"
index 8eff3c6..a22ee58 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/record/locationStatusChangeRecord.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/record/locationStatusChangeRecord.vue"
@@ -1,191 +1,207 @@
<template>
- <view-grid
- ref="grid"
- :columns="columns"
- :detail="detail"
- :editFormFields="editFormFields"
- :editFormOptions="editFormOptions"
- :searchFormFields="searchFormFields"
- :searchFormOptions="searchFormOptions"
- :table="table"
- :extend="extend"
- >
- </view-grid>
- </template>
+ <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/record/locationStatusChangeRecord.js";
- import { ref, defineComponent } from "vue";
- export default defineComponent({
- setup() {
- const table = ref({
- key: "id",
- footer: "Foots",
- cnName: "璐т綅鐘舵�佸彉鍔ㄨ褰�",
- name: "locationStatusChangeRecord",
- url: "/LocationStatusChangeRecord/",
- sortName: "id",
- });
- const editFormFields = ref({
- deviceCode: "",
- deviceName: "",
- deviceType: "",
- deviceStatus: "",
- deviceIp: "",
- devicePort: "",
- devicePlcType: "",
- deviceRemark: "",
- });
- const editFormOptions = ref([
-
- ]);
- const searchFormFields = ref({
- locationCode: "",
- orderNo: "",
- taskNum: "",
- });
- const searchFormOptions = ref([
- [
- { title: "璐т綅鍙�", field: "locationCode" },
- { title: "鍗曟嵁缂栧彿", field: "orderNo" },
- { title: "浠诲姟鍙�", field: "taskNum" },
- ],
- [
- { title: "鍙樺姩鍓嶈揣浣嶇姸鎬�", field: "beforeStatus" ,type: "selectList",dataKey: "locationStatusEnum",data: [],},
- { title: "鍙樺姩鍚庤揣浣嶇姸鎬�", field: "afterStatus" ,type: "selectList",dataKey: "locationStatusEnum",data: [],},
- { title: "鍙樺姩绫诲瀷", field: "changeType" ,type: "selectList",dataKey: "stockChangeType",data: [],},
- ],
- ]);
- const columns = ref([
+import extend from "@/extension/record/locationStatusChangeRecord.js";
+import { ref, defineComponent } from "vue";
+export default defineComponent({
+ setup() {
+ const table = ref({
+ key: "id",
+ footer: "Foots",
+ cnName: "璐т綅鐘舵�佸彉鍔ㄨ褰�",
+ name: "locationStatusChangeRecord",
+ url: "/LocationStatusChangeRecord/",
+ sortName: "id",
+ });
+ const editFormFields = ref({
+ deviceCode: "",
+ deviceName: "",
+ deviceType: "",
+ deviceStatus: "",
+ deviceIp: "",
+ devicePort: "",
+ devicePlcType: "",
+ deviceRemark: "",
+ });
+ const editFormOptions = ref([]);
+ const searchFormFields = ref({
+ locationCode: "",
+ orderNo: "",
+ taskNum: "",
+ });
+ const searchFormOptions = ref([
+ [
+ { title: "璐т綅鍙�", field: "locationCode" },
+ { title: "鍗曟嵁缂栧彿", field: "orderNo" },
+ { title: "浠诲姟鍙�", field: "taskNum" },
+ ],
+ [
{
- field: "id",
- title: "Id",
- type: "int",
- width: 90,
- hidden: true,
- readonly: true,
- require: true,
- align: "left",
- },
- {
- field: "locationId",
- title: "璐т綅涓婚敭",
- type: "string",
- width: 90,
- align: "left",
- },
- {
- field: "taskNum",
- title: "浠诲姟鍙�",
- type: "string",
- width: 90,
- align: "left",
- },
- {
- field: "locationCode",
- title: "璐т綅缂栧彿",
- type: "string",
- width: 150,
- align: "left",
- },
- {
- field: "beforeStatus",
title: "鍙樺姩鍓嶈揣浣嶇姸鎬�",
- type: "string",
- width: 150,
- align: "left",
- bind: { key: "locationStatusEnum", data: [] },
+ field: "beforeStatus",
+ type: "selectList",
+ dataKey: "locationStatusEnum",
+ data: [],
},
{
- field: "afterStatus",
title: "鍙樺姩鍚庤揣浣嶇姸鎬�",
- type: "decimal",
- width: 150,
- align: "left",
- bind: { key: "locationStatusEnum", data: [] },
+ field: "afterStatus",
+ type: "selectList",
+ dataKey: "locationStatusEnum",
+ data: [],
},
{
- field: "changeType",
title: "鍙樺姩绫诲瀷",
- type: "string",
- width: 90,
- align: "left",
- bind: { key: "stockChangeType", data: [] },
+ field: "changeType",
+ type: "selectList",
+ dataKey: "locationChangeType",
+ data: [],
},
- {
- field: "orderId",
- title: "鍗曟嵁涓婚敭",
- type: "string",
- width: 90,
- align: "left",
- },
- {
- field: "orderNo",
- title: "鍗曟嵁缂栧彿",
- type: "int",
- width: 120,
- align: "left",
- },
- {
- field: "orderDetailId",
- title: "鍗曟嵁鏄庣粏涓婚敭",
- type: "string",
- width: 200,
- align: "left",
- },
- {
- field: "creater",
- title: "鍒涘缓浜�",
- type: "string",
- width: 90,
- align: "left",
- },
- {
- field: "createDate",
- title: "鍒涘缓鏃堕棿",
- type: "datetime",
- width: 160,
- align: "left",
- },
- {
- field: "modifier",
- title: "淇敼浜�",
- type: "string",
- width: 100,
- align: "left",
- },
- {
- field: "modifyDate",
- title: "淇敼鏃堕棿",
- type: "datetime",
- width: 160,
- align: "left",
- },
- {
- field: "remark",
- title: "澶囨敞",
- type: "string",
- width: 100,
- align: "left",
- },
- ]);
- const detail = ref({
- cnName: "#detailCnName",
- table: "",
- columns: [],
- sortName: "",
- });
- return {
- table,
- extend,
- editFormFields,
- editFormOptions,
- searchFormFields,
- searchFormOptions,
- columns,
- detail,
- };
- },
- });
- </script>
+ ],
+ ]);
+ const columns = ref([
+ {
+ field: "id",
+ title: "Id",
+ type: "int",
+ width: 90,
+ hidden: true,
+ readonly: true,
+ require: true,
+ align: "left",
+ },
+ {
+ field: "locationId",
+ title: "璐т綅涓婚敭",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "taskNum",
+ title: "浠诲姟鍙�",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "locationCode",
+ title: "璐т綅缂栧彿",
+ type: "string",
+ width: 150,
+ align: "left",
+ },
+ {
+ field: "beforeStatus",
+ title: "鍙樺姩鍓嶈揣浣嶇姸鎬�",
+ type: "string",
+ width: 150,
+ align: "left",
+ bind: { key: "locationStatusEnum", data: [] },
+ },
+ {
+ field: "afterStatus",
+ title: "鍙樺姩鍚庤揣浣嶇姸鎬�",
+ type: "decimal",
+ width: 150,
+ align: "left",
+ bind: { key: "locationStatusEnum", data: [] },
+ },
+ {
+ field: "changeType",
+ title: "鍙樺姩绫诲瀷",
+ type: "string",
+ width: 90,
+ align: "left",
+ bind: { key: "locationChangeType", data: [] },
+ },
+ {
+ field: "orderId",
+ title: "鍗曟嵁涓婚敭",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "orderNo",
+ title: "鍗曟嵁缂栧彿",
+ type: "int",
+ width: 120,
+ align: "left",
+ },
+ {
+ field: "orderDetailId",
+ title: "鍗曟嵁鏄庣粏涓婚敭",
+ type: "string",
+ width: 200,
+ align: "left",
+ },
+ {
+ field: "creater",
+ title: "鍒涘缓浜�",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "createDate",
+ title: "鍒涘缓鏃堕棿",
+ type: "datetime",
+ width: 160,
+ align: "left",
+ },
+ {
+ field: "modifier",
+ title: "淇敼浜�",
+ type: "string",
+ width: 100,
+ align: "left",
+ },
+ {
+ field: "modifyDate",
+ title: "淇敼鏃堕棿",
+ type: "datetime",
+ width: 160,
+ align: "left",
+ },
+ {
+ field: "remark",
+ title: "澶囨敞",
+ type: "string",
+ width: 100,
+ 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/record/stockQuantityChangeRecord.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/record/stockQuantityChangeRecord.vue"
index 118f9bf..f7d65a4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/record/stockQuantityChangeRecord.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/record/stockQuantityChangeRecord.vue"
@@ -110,7 +110,6 @@
width: 150,
align: "left",
},
-
{
field: "taskNum",
title: "浠诲姟鍙�",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
index 703a792..3804f15 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
@@ -93,7 +93,6 @@
align: "left",
hidden:true
},
-
{
field: "materielCode",
title: "鎵�鍚墿鏂欑紪鍙�",
@@ -116,6 +115,13 @@
align: "left",
},
{
+ field: "sumStock",
+ title: "鎬诲簱瀛�",
+ type: "string",
+ width: 140,
+ align: "left",
+ },
+ {
field: "row",
title: "璐т綅琛�",
type: "string",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/system/Sys_Log.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/system/Sys_Log.vue"
index d9ae6b2..67e913d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/system/Sys_Log.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/system/Sys_Log.vue"
@@ -5,220 +5,153 @@
*涓氬姟璇峰湪@/extension/system/Sys_Log.js姝ゅ缂栧啓
-->
<template>
- <view-grid
- ref="grid"
- :columns="columns"
- :detail="detail"
- :editFormFields="editFormFields"
- :editFormOptions="editFormOptions"
- :searchFormFields="searchFormFields"
- :searchFormOptions="searchFormOptions"
- :table="table"
- :extend="extend"
- >
- </view-grid>
- </template>
+ <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/system/Sys_Log.js";
- import { ref, defineComponent } from "vue";
- export default defineComponent({
- setup() {
- const table = ref({
- key: "Id",
- footer: "Foots",
- cnName: "绯荤粺鏃ュ織",
- name: "Sys_Log",
- url: "/Sys_Log/",
- sortName: "Id",
- });
- const editFormFields = ref({});
- const editFormOptions = ref([]);
- const searchFormFields = ref({
- BeginDate: "",
- Url: "",
- LogType: [],
- Success: [],
- UserIP: "",
- ServiceIP: "",
- Role_Id: "",
- });
- const searchFormOptions = ref([
- [
- { title: "璇锋眰鍦板潃", field: "url", type: "text" },
- { title: "鐢ㄦ埛IP", field: "userIP", type: "text" },
- { title: "鏈嶅姟鍣↖P", field: "serviceIP", type: "text" },
- ],
- [
- { title: "寮�濮嬫椂闂�", field: "beginDate", type: "datetime" },
- // {
- // dataKey: "restatus",
- // data: [],
- // title: "鍝嶅簲鐘舵��",
- // field: "success",
- // type: "selectList",
- // },
- // {
- // dataKey: "roles",
- // data: [],
- // title: "瑙掕壊ID",
- // field: "role_Id",
- // type: "select",
- // },
- ],
- // [
- // {
- // dataKey: "log",
- // data: [],
- // title: "鏃ュ織绫诲瀷",
- // field: "logType",
- // colSize: 12,
- // type: "checkbox",
- // },
- // ],
- ]);
- const columns = ref([
- {
- field: "id",
- title: "Id",
- type: "int",
- width: 90,
- hidden: true,
- readonly: true,
- require: true,
- align: "left",
- },
- {
- field: "beginDate",
- title: "寮�濮嬫椂闂�",
- type: "datetime",
- width: 140,
- align: "left",
- sortable: true,
- },
- {
- field: "userName",
- title: "鐢ㄦ埛鍚嶇О",
- type: "string",
- width: 90,
- align: "left",
- },
- {
- field: "url",
- title: "璇锋眰鍦板潃",
- type: "string",
- width: 110,
- align: "left",
- },
- {
- field: "logType",
- title: "鏃ュ織绫诲瀷",
- type: "string",
- bind: { key: "log", data: [] },
- width: 80,
- align: "left",
- },
- {
- field: "success",
- title: "鍝嶅簲鐘舵��",
- type: "int",
- bind: { key: "restatus", data: [] },
- width: 80,
- align: "left",
- },
- {
- field: "elapsedTime",
- title: "鏃堕暱",
- type: "int",
- width: 60,
- align: "left",
- },
- {
- field: "requestParam",
- title: "璇锋眰鍙傛暟",
- type: "string",
- width: 70,
- align: "left",
- },
- {
- field: "responseParam",
- title: "鍝嶅簲鍙傛暟",
- type: "string",
- width: 70,
- align: "left",
- },
- {
- field: "exceptionInfo",
- title: "寮傚父淇℃伅",
- type: "string",
- width: 70,
- align: "left",
- },
- {
- field: "userIP",
- title: "鐢ㄦ埛IP",
- type: "string",
- width: 90,
- align: "left",
- },
- {
- field: "serviceIP",
- title: "鏈嶅姟鍣↖P",
- type: "string",
- width: 90,
- hidden: true,
- align: "left",
- },
- {
- field: "browserType",
- title: "娴忚鍣ㄧ被鍨�",
- type: "string",
- width: 90,
- align: "left",
- },
- {
- field: "userId",
- title: "鐢ㄦ埛ID",
- type: "int",
- width: 90,
- hidden: true,
- align: "left",
- },
- {
- field: "roleId",
- title: "瑙掕壊ID",
- type: "int",
- bind: { key: "roles", data: [] },
- width: 90,
- hidden: true,
- align: "left",
- },
- {
- field: "endDate",
- title: "缁撴潫鏃堕棿",
- type: "datetime",
- width: 150,
- hidden: true,
- align: "left",
- sortable: true,
- },
- ]);
- const detail = ref({
- cnName: "#detailCnName",
- columns: [],
- sortName: "",
- key: "",
- });
- return {
- table,
- extend,
- editFormFields,
- editFormOptions,
- searchFormFields,
- searchFormOptions,
- columns,
- detail,
- };
- },
- });
- </script>
+import extend from "@/extension/system/Sys_Log.js";
+import { ref, defineComponent } from "vue";
+export default defineComponent({
+ setup() {
+ const table = ref({
+ key: "Id",
+ footer: "Foots",
+ cnName: "绯荤粺鏃ュ織",
+ name: "Sys_Log",
+ url: "/Sys_Log/",
+ sortName: "Id",
+ });
+ const editFormFields = ref({});
+ const editFormOptions = ref([]);
+ const searchFormFields = ref({
+ url: "",
+ requestParam: "",
+ responseParam: "",
+ beginDate: "",
+ });
+ const searchFormOptions = ref([
+ [
+ { title: "璇锋眰鍦板潃", field: "url", type: "like" },
+ { title: "璇锋眰鍙傛暟", field: "requestParam", type: "like" },
+ { title: "鍝嶅簲鍙傛暟", field: "responseParam", type: "like" },
+ ],
+ [{ title: "寮�濮嬫椂闂�", field: "beginDate", type: "datetime" }],
+ ]);
+ const columns = ref([
+ {
+ field: "id",
+ title: "Id",
+ type: "int",
+ width: 90,
+ hidden: true,
+ readonly: true,
+ require: true,
+ align: "left",
+ },
+ {
+ field: "beginDate",
+ title: "寮�濮嬫椂闂�",
+ type: "datetime",
+ width: 140,
+ align: "left",
+ sortable: true,
+ },
+ {
+ field: "elapsedTime",
+ title: "鏃堕暱",
+ type: "int",
+ width: 60,
+ align: "left",
+ },
+ {
+ field: "endDate",
+ title: "缁撴潫鏃堕棿",
+ type: "datetime",
+ width: 150,
+ hidden: true,
+ align: "left",
+ sortable: true,
+ },
+ {
+ field: "requestParam",
+ title: "璇锋眰鍙傛暟",
+ type: "string",
+ width: 70,
+ align: "left",
+ },
+ {
+ field: "responseParam",
+ title: "鍝嶅簲鍙傛暟",
+ type: "string",
+ width: 70,
+ align: "left",
+ },
+ {
+ field: "url",
+ title: "璇锋眰鍦板潃",
+ type: "string",
+ width: 110,
+ align: "left",
+ },
+ {
+ field: "userName",
+ title: "鐢ㄦ埛鍚嶇О",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "success",
+ title: "鍝嶅簲鐘舵��",
+ type: "int",
+ bind: { key: "restatus", data: [] },
+ width: 80,
+ align: "left",
+ hidden: true,
+ },
+ {
+ field: "userIP",
+ title: "鐢ㄦ埛IP",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "userId",
+ title: "鐢ㄦ埛ID",
+ type: "int",
+ width: 90,
+ hidden: true,
+ align: "left",
+ },
+ ]);
+ const detail = ref({
+ cnName: "#detailCnName",
+ columns: [],
+ sortName: "",
+ key: "",
+ });
+ 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_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/339ccc6a-95ea-4f78-8616-45299be9dd90.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/339ccc6a-95ea-4f78-8616-45299be9dd90.vsidx"
deleted file mode 100644
index 4a82009..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/339ccc6a-95ea-4f78-8616-45299be9dd90.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/4b4ce8f6-d231-4356-8904-ece35b20d64d.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4b4ce8f6-d231-4356-8904-ece35b20d64d.vsidx"
deleted file mode 100644
index 03acc8a..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4b4ce8f6-d231-4356-8904-ece35b20d64d.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/51bc4fd8-adae-43fe-aa0e-8971136a692a.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/51bc4fd8-adae-43fe-aa0e-8971136a692a.vsidx"
deleted file mode 100644
index 33cf4fa..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/51bc4fd8-adae-43fe-aa0e-8971136a692a.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/8ec93a91-d59a-425d-8fc0-681c90b68b09.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8ec93a91-d59a-425d-8fc0-681c90b68b09.vsidx"
new file mode 100644
index 0000000..5c3eb59
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8ec93a91-d59a-425d-8fc0-681c90b68b09.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/d25efbec-11d1-4ce7-a481-6187db1d5fbb.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d25efbec-11d1-4ce7-a481-6187db1d5fbb.vsidx"
deleted file mode 100644
index 56a1289..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d25efbec-11d1-4ce7-a481-6187db1d5fbb.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/dda13b32-6b9a-4501-9213-3b3205c26c21.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dda13b32-6b9a-4501-9213-3b3205c26c21.vsidx"
new file mode 100644
index 0000000..da801a6
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dda13b32-6b9a-4501-9213-3b3205c26c21.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/BasicRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/BasicRepository.cs"
index 51266df..d3c9037 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/BasicRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/BasicRepository.cs"
@@ -25,11 +25,14 @@
/// </summary>
public IWarehouseRepository WarehouseRepository { get; }
- public BasicRepository(ILocationInfoRepository locationInfoRepository, IMaterielInfoRepository materielInfoRepository, IWarehouseRepository warehouseRepository)
+ public IPalletTypeInfoRepository PalletTypeInfoRepository { get; }
+
+ public BasicRepository(ILocationInfoRepository locationInfoRepository, IMaterielInfoRepository materielInfoRepository, IWarehouseRepository warehouseRepository, IPalletTypeInfoRepository palletTypeInfoRepository)
{
LocationInfoRepository = locationInfoRepository;
MaterielInfoRepository = materielInfoRepository;
WarehouseRepository = warehouseRepository;
+ PalletTypeInfoRepository = palletTypeInfoRepository;
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/PalletTypeInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/PalletTypeInfoRepository.cs"
new file mode 100644
index 0000000..a38afd5
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/PalletTypeInfoRepository.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_IBasicRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_BasicRepository
+{
+ public class PalletTypeInfoRepository : RepositoryBase<Dt_PalletTypeInfo>, IPalletTypeInfoRepository
+ {
+ public PalletTypeInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
+ {
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs"
index bbe6eee..9a3f2cb 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs"
@@ -14,20 +14,32 @@
{
public class BasicService : IBasicService
{
+ public ICustomerInfoService CustomerInfoService { get; }
+
+ public IPalletCodeInfoService PalletCodeInfoService { get; }
+
+ public ISupplierInfoService SupplierInfoService { get; }
+
+ public IUserInfoService UserInfoService { get; }
+
public ILocationInfoService LocationInfoService { get; }
public IMaterielInfoService MaterielInfoService { get; }
public IWarehouseService WarehouseService { get; }
- public ISupplierInfoService SupplierInfoService { get; }
+ public IMaterielCodeInfoService MaterielCodeInfoService { get; }
- public BasicService(ILocationInfoService locationInfoService, IMaterielInfoService materielInfoService, IWarehouseService warehouseService, ISupplierInfoService supplierInfoService)
+ public BasicService(ILocationInfoService locationInfoService, IMaterielInfoService materielInfoService, IWarehouseService warehouseService, ISupplierInfoService supplierInfoService,ICustomerInfoService customerInfoService,IPalletCodeInfoService palletCodeInfoService, IUserInfoService userInfoService, IMaterielCodeInfoService materielCodeInfoService)
{
LocationInfoService = locationInfoService;
MaterielInfoService = materielInfoService;
WarehouseService = warehouseService;
SupplierInfoService = supplierInfoService;
+ CustomerInfoService = customerInfoService;
+ PalletCodeInfoService = palletCodeInfoService;
+ UserInfoService = userInfoService;
+ MaterielCodeInfoService = materielCodeInfoService;
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/PalletCodeInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/PalletCodeInfoService.cs"
index 4600058..622391f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/PalletCodeInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/PalletCodeInfoService.cs"
@@ -4,6 +4,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Common.CommonEnum;
using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
@@ -80,5 +81,25 @@
return base.AddData(palletCodeInfos);
}
}
+ public WebResponseContent PrintStatusUp(string printCode)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ Dt_PalletCodeInfo palletCodeInfo = BaseDal.QueryFirst(x=>x.PalletCode==printCode);
+ if (palletCodeInfo==null)
+ {
+ return content.Error("鎵撳嵃鐨勬墭鐩樼爜涓嶅瓨鍦�");
+ }
+ palletCodeInfo.Status = PrintStatusEnum.Printed.ObjToInt();
+ BaseDal.UpdateData(palletCodeInfo);
+ return content.OK();
+ }
+ 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_BasicService/Service/AssignLocation/LocationInfoService_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs"
index 8750b59..5649ce6 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs"
@@ -29,7 +29,7 @@
/// 鎵樼洏绫诲瀷
/// </param>
/// <returns></returns>
- public Dt_LocationInfo? AssignLocation_BC(string roadwayNo, PalletTypeEnum palletType, string beRelocationCode = "")
+ public Dt_LocationInfo? AssignLocation_BC(string roadwayNo, int palletType, Dt_PalletTypeInfo palletTypeInfo, string beRelocationCode = "")
{
lock (_locker_BC)
{
@@ -77,14 +77,17 @@
if ((locationInfos.Count * weightValue_BC >= definedTypeLocations.Count && undefinedTypeEmptyLocations.Any()) || !definedTypeEmptyLocations.Any())//濡傛灉宸插畾涔夌被鍨嬭揣浣嶆湭瓒呰繃姣斾緥锛屼笖鏈夋湭瀹氫箟绫诲瀷鐨勮揣浣�
{
- if (palletType == PalletTypeEnum.LargePallet || palletType == PalletTypeEnum.LargestPallet)
+ if (palletTypeInfo.LocaitonCount == 2)
{
- undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
+ if (palletTypeInfo.IsOdd)
+ undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
+ else
+ undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 0).ToList();
}
for (int i = 0; i < undefinedTypeEmptyLocations.Count; i++)
{
Dt_LocationInfo undefinedTypeEmptyLocation = undefinedTypeEmptyLocations[i];
- Dt_LocationInfo? locationInfo = GetUsableLocation_BC(locationInfos, undefinedTypeEmptyLocation, palletType);
+ Dt_LocationInfo? locationInfo = GetUsableLocation_BC(locationInfos, undefinedTypeEmptyLocation, palletType, palletTypeInfo);
if (locationInfo != null)
{
locationCaches_BC.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now });
@@ -97,7 +100,7 @@
for (int i = 0; i < definedTypeEmptyLocations.Count; i++)
{
Dt_LocationInfo definedTypeEmptyLocation = definedTypeEmptyLocations[i];
- Dt_LocationInfo? locationInfo = GetUsableLocation_BC(locationInfos, definedTypeEmptyLocation, palletType);
+ Dt_LocationInfo? locationInfo = GetUsableLocation_BC(locationInfos, definedTypeEmptyLocation, palletType, palletTypeInfo);
if (locationInfo != null)
{
locationCaches_BC.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now });
@@ -116,22 +119,32 @@
/// <param name="emptyLocation"></param>
/// <param name="palletType"></param>
/// <returns></returns>
- private Dt_LocationInfo? GetUsableLocation_BC(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, PalletTypeEnum palletType)
+ private Dt_LocationInfo? GetUsableLocation_BC(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, int palletType, Dt_PalletTypeInfo palletTypeInfo)
{
- switch (palletType)
+
+ if (palletTypeInfo.LocaitonCount == 2)
{
- case PalletTypeEnum.LargestPallet:
- case PalletTypeEnum.LargePallet:
- if (emptyLocation.Column % 2 == 0)
+ if (palletTypeInfo.IsOdd && emptyLocation.Column % 2 != 1 || !palletTypeInfo.IsOdd && emptyLocation.Column % 2 != 0)
+ return null;
+
+ Dt_LocationInfo? nearLocation = locationInfos.FirstOrDefault(x => x.Row == emptyLocation.Row && x.Layer == emptyLocation.Layer && x.Depth == emptyLocation.Depth && x.Column == emptyLocation.Column + 1);
+ if (nearLocation != null && DepthLocationIsEmpty_BC(locationInfos, nearLocation) != null)
+ {
+ Dt_LocationInfo? locationInfo = DepthLocationIsEmpty_BC(locationInfos, emptyLocation);
+ if (locationInfo != null)
{
- return null;
+ return locationInfo;
}
- break;
+ }
}
- Dt_LocationInfo? locationInfo = DepthLocationIsEmpty_BC(locationInfos, emptyLocation, palletType);
- if (locationInfo != null)
+
+ else
{
- return locationInfo;
+ Dt_LocationInfo? locationInfo = DepthLocationIsEmpty_BC(locationInfos, emptyLocation);
+ if (locationInfo != null)
+ {
+ return locationInfo;
+ }
}
return null;
}
@@ -142,24 +155,18 @@
/// <param name="locationInfos"></param>
/// <param name="emptyLocation"></param>
/// <returns></returns>
- private Dt_LocationInfo? DepthLocationIsEmpty_BC(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, PalletTypeEnum palletType)
+ private Dt_LocationInfo? DepthLocationIsEmpty_BC(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation)
{
List<Dt_LocationInfo> locations = GetGroupLocations(locationInfos, emptyLocation);
bool moreDepthFlag = false;
bool littleDepthFlag = false;
- switch (palletType)
- {
- case PalletTypeEnum.LargestPallet:
- case PalletTypeEnum.LargePallet:
- List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
- moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt()) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
+ List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
+ moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
- List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
- littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
- break;
- }
+ List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
+ littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
if (moreDepthFlag && littleDepthFlag)
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs"
index b5999c3..f9bb800 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs"
@@ -43,7 +43,7 @@
/// 4锛氱壒闀�
/// </param>
/// <returns></returns>
- public Dt_LocationInfo? AssignLocation_CSJ(string roadwayNo, PalletTypeEnum palletType, string beRelocationCode = "")
+ public Dt_LocationInfo? AssignLocation_CSJ(string roadwayNo, int palletType, Dt_PalletTypeInfo palletTypeInfo, string beRelocationCode = "")
{
lock (_locker_CSJ)
{
@@ -91,7 +91,7 @@
if ((locationInfos.Count * weightValue_CSJ >= definedTypeLocations.Count && undefinedTypeEmptyLocations.Any()) || !definedTypeEmptyLocations.Any())//濡傛灉宸插畾涔夌被鍨嬭揣浣嶆湭瓒呰繃姣斾緥锛屼笖鏈夋湭瀹氫箟绫诲瀷鐨勮揣浣�
{
- if (palletType == PalletTypeEnum.LargePallet || palletType == PalletTypeEnum.LargestPallet)
+ if (palletType == 3 || palletType == 4)
{
undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Depth % 2 == 1).ToList();
}
@@ -130,12 +130,12 @@
/// <param name="emptyLocation"></param>
/// <param name="palletType"></param>
/// <returns></returns>
- private Dt_LocationInfo? GetUsableLocation_CSJ(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, PalletTypeEnum palletType)
+ private Dt_LocationInfo? GetUsableLocation_CSJ(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, int palletType)
{
switch (palletType)
{
- case PalletTypeEnum.LargestPallet:
- case PalletTypeEnum.LargePallet:
+ case 3:
+ case 4:
if (emptyLocation.Depth % 2 == 0)
{
return null;
@@ -150,20 +150,20 @@
return null;
}
- private bool LittleDepthLocationIsEmpty_CSJ(Dt_LocationInfo locationInfo, PalletTypeEnum palletType)
+ private bool LittleDepthLocationIsEmpty_CSJ(Dt_LocationInfo locationInfo, int palletType)
{
List<Dt_LocationInfo> locations = GetGroupLocations(locationInfo);
switch (palletType)
{
- case PalletTypeEnum.LargestPallet:
- case PalletTypeEnum.LargePallet:
+ case 4:
+ case 3:
{
List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= locationInfo.Depth).ToList();
return littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
}
- case PalletTypeEnum.MediumPallet:
- case PalletTypeEnum.SmallPallet:
+ case 1:
+ case 2:
{
List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= locationInfo.Depth).ToList();
return littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
@@ -178,7 +178,7 @@
/// <param name="locationInfos"></param>
/// <param name="emptyLocation"></param>
/// <returns></returns>
- private Dt_LocationInfo? DepthLocationIsEmpty_CSJ(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, PalletTypeEnum palletType)
+ private Dt_LocationInfo? DepthLocationIsEmpty_CSJ(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, int palletType)
{
List<Dt_LocationInfo> locations = GetGroupLocations(locationInfos, emptyLocation);
@@ -187,8 +187,8 @@
switch (palletType)
{
- case PalletTypeEnum.LargestPallet:
- case PalletTypeEnum.LargePallet:
+ case 3:
+ case 4:
{
List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
@@ -197,8 +197,8 @@
littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
}
break;
- case PalletTypeEnum.MediumPallet:
- case PalletTypeEnum.SmallPallet:
+ case 1:
+ case 2:
{
List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs"
index bd9d5ef..4aa5502 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs"
@@ -29,7 +29,7 @@
/// 鎵樼洏绫诲瀷
/// </param>
/// <returns></returns>
- public Dt_LocationInfo? AssignLocation_GM(string roadwayNo, PalletTypeEnum palletType, string beRelocationCode = "")
+ public Dt_LocationInfo? AssignLocation_GM(string roadwayNo, int palletType, Dt_PalletTypeInfo palletTypeInfo, string beRelocationCode = "")
{
lock (_locker_GM)
{
@@ -77,14 +77,17 @@
if ((locationInfos.Count * weightValue_GM >= definedTypeLocations.Count && undefinedTypeEmptyLocations.Any()) || !definedTypeEmptyLocations.Any())//濡傛灉宸插畾涔夌被鍨嬭揣浣嶆湭瓒呰繃姣斾緥锛屼笖鏈夋湭瀹氫箟绫诲瀷鐨勮揣浣�
{
- if (palletType == PalletTypeEnum.LargePallet || palletType == PalletTypeEnum.LargestPallet)
+ if (palletTypeInfo.LocaitonCount == 2)
{
- undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
+ if (palletTypeInfo.IsOdd)
+ undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
+ else
+ undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 0).ToList();
}
for (int i = 0; i < undefinedTypeEmptyLocations.Count; i++)
{
Dt_LocationInfo undefinedTypeEmptyLocation = undefinedTypeEmptyLocations[i];
- Dt_LocationInfo? locationInfo = GetUsableLocation_GM(locationInfos, undefinedTypeEmptyLocation, palletType);
+ Dt_LocationInfo? locationInfo = GetUsableLocation_GM(locationInfos, undefinedTypeEmptyLocation, palletType, palletTypeInfo);
if (locationInfo != null)
{
locationCaches_GM.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now });
@@ -97,7 +100,7 @@
for (int i = 0; i < definedTypeEmptyLocations.Count; i++)
{
Dt_LocationInfo definedTypeEmptyLocation = definedTypeEmptyLocations[i];
- Dt_LocationInfo? locationInfo = GetUsableLocation_GM(locationInfos, definedTypeEmptyLocation, palletType);
+ Dt_LocationInfo? locationInfo = GetUsableLocation_GM(locationInfos, definedTypeEmptyLocation, palletType, palletTypeInfo);
if (locationInfo != null)
{
locationCaches_GM.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now });
@@ -116,25 +119,34 @@
/// <param name="emptyLocation"></param>
/// <param name="palletType"></param>
/// <returns></returns>
- private Dt_LocationInfo? GetUsableLocation_GM(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, PalletTypeEnum palletType)
+ private Dt_LocationInfo? GetUsableLocation_GM(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, int palletType, Dt_PalletTypeInfo palletTypeInfo)
{
- switch (palletType)
+ if (palletTypeInfo.LocaitonCount == 2)
{
- case PalletTypeEnum.LargestPallet:
- case PalletTypeEnum.LargePallet:
- if (emptyLocation.Column % 2 == 0)
+ if (palletTypeInfo.IsOdd && emptyLocation.Column % 2 != 1 || !palletTypeInfo.IsOdd && emptyLocation.Column % 2 != 0)
+ return null;
+
+ Dt_LocationInfo? nearLocation = locationInfos.FirstOrDefault(x => x.Row == emptyLocation.Row && x.Layer == emptyLocation.Layer && x.Depth == emptyLocation.Depth && x.Column == emptyLocation.Column + 1);
+ if (nearLocation != null && DepthLocationIsEmpty_BC(locationInfos, nearLocation) != null)
+ {
+ Dt_LocationInfo? locationInfo = DepthLocationIsEmpty_BC(locationInfos, emptyLocation);
+ if (locationInfo != null)
{
- return null;
+ return locationInfo;
}
- break;
+ }
}
- Dt_LocationInfo? locationInfo = DepthLocationIsEmpty_GM(locationInfos, emptyLocation, palletType);
- if (locationInfo != null)
+ else
{
- return locationInfo;
+ Dt_LocationInfo? locationInfo = DepthLocationIsEmpty_BC(locationInfos, emptyLocation);
+ if (locationInfo != null)
+ {
+ return locationInfo;
+ }
}
return null;
}
+
/// <summary>
/// 鍒ゆ柇涓嶅悓娣卞害鐨勫悓缁勮揣浣嶇姸鎬佹槸鍚︿负绌洪棽绌轰綅(娴嬭瘯鏋朵粨)
@@ -142,24 +154,18 @@
/// <param name="locationInfos"></param>
/// <param name="emptyLocation"></param>
/// <returns></returns>
- private Dt_LocationInfo? DepthLocationIsEmpty_GM(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, PalletTypeEnum palletType)
+ private Dt_LocationInfo? DepthLocationIsEmpty_GM(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation)
{
List<Dt_LocationInfo> locations = GetGroupLocations(locationInfos, emptyLocation);
bool moreDepthFlag = false;
bool littleDepthFlag = false;
- switch (palletType)
- {
- case PalletTypeEnum.LargestPallet:
- case PalletTypeEnum.LargePallet:
- List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
- moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt()) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
+ List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
+ moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
- List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
- littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
- break;
- }
+ List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
+ littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
if (moreDepthFlag && littleDepthFlag)
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs"
index 2a006d0..f0a7242 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs"
@@ -29,7 +29,7 @@
/// 鎵樼洏绫诲瀷
/// </param>
/// <returns></returns>
- public Dt_LocationInfo? AssignLocation_PP(string roadwayNo, PalletTypeEnum palletType, string beRelocationCode = "")
+ public Dt_LocationInfo? AssignLocation_PP(string roadwayNo, int palletType, Dt_PalletTypeInfo palletTypeInfo, string beRelocationCode = "")
{
lock (_locker_PP)
{
@@ -77,10 +77,6 @@
if ((locationInfos.Count * weightValue_PP >= definedTypeLocations.Count && undefinedTypeEmptyLocations.Any()) || !definedTypeEmptyLocations.Any())//濡傛灉宸插畾涔夌被鍨嬭揣浣嶆湭瓒呰繃姣斾緥锛屼笖鏈夋湭瀹氫箟绫诲瀷鐨勮揣浣�
{
- if (palletType == PalletTypeEnum.LargePallet || palletType == PalletTypeEnum.LargestPallet)
- {
- undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
- }
for (int i = 0; i < undefinedTypeEmptyLocations.Count; i++)
{
Dt_LocationInfo undefinedTypeEmptyLocation = undefinedTypeEmptyLocations[i];
@@ -116,18 +112,8 @@
/// <param name="emptyLocation"></param>
/// <param name="palletType"></param>
/// <returns></returns>
- private Dt_LocationInfo? GetUsableLocation_PP(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, PalletTypeEnum palletType)
+ private Dt_LocationInfo? GetUsableLocation_PP(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, int palletType)
{
- switch (palletType)
- {
- case PalletTypeEnum.LargestPallet:
- case PalletTypeEnum.LargePallet:
- if (emptyLocation.Column % 2 == 0)
- {
- return null;
- }
- break;
- }
Dt_LocationInfo? locationInfo = DepthLocationIsEmpty_PP(locationInfos, emptyLocation, palletType);
if (locationInfo != null)
{
@@ -142,25 +128,17 @@
/// <param name="locationInfos"></param>
/// <param name="emptyLocation"></param>
/// <returns></returns>
- private Dt_LocationInfo? DepthLocationIsEmpty_PP(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, PalletTypeEnum palletType)
+ private Dt_LocationInfo? DepthLocationIsEmpty_PP(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, int palletType)
{
List<Dt_LocationInfo> locations = GetGroupLocations(locationInfos, emptyLocation);
bool moreDepthFlag = false;
bool littleDepthFlag = false;
+ List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
+ moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt()) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
- switch (palletType)
- {
- case PalletTypeEnum.LargestPallet:
- case PalletTypeEnum.LargePallet:
- List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
- moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt()) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
-
- List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
- littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
- break;
- }
-
+ List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
+ littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
if (moreDepthFlag && littleDepthFlag)
{
return emptyLocation;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs"
index a6ec2f1..22d2318 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs"
@@ -29,7 +29,7 @@
/// 鎵樼洏绫诲瀷
/// </param>
/// <returns></returns>
- public Dt_LocationInfo? AssignLocation_ZH(string roadwayNo, PalletTypeEnum palletType, string beRelocationCode = "")
+ public Dt_LocationInfo? AssignLocation_ZH(string roadwayNo, int palletType, Dt_PalletTypeInfo palletTypeInfo, string beRelocationCode = "")
{
lock (_locker_ZH)
{
@@ -77,7 +77,7 @@
if ((locationInfos.Count * weightValue_ZH >= definedTypeLocations.Count && undefinedTypeEmptyLocations.Any()) || !definedTypeEmptyLocations.Any())//濡傛灉宸插畾涔夌被鍨嬭揣浣嶆湭瓒呰繃姣斾緥锛屼笖鏈夋湭瀹氫箟绫诲瀷鐨勮揣浣�
{
- if (palletType == PalletTypeEnum.LargePallet || palletType == PalletTypeEnum.LargestPallet)
+ if (palletType == 3 || palletType == 4)
{
undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 0).ToList();
}
@@ -116,12 +116,12 @@
/// <param name="emptyLocation"></param>
/// <param name="palletType"></param>
/// <returns></returns>
- private Dt_LocationInfo? GetUsableLocation_ZH(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, PalletTypeEnum palletType)
+ private Dt_LocationInfo? GetUsableLocation_ZH(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, int palletType)
{
switch (palletType)
{
- case PalletTypeEnum.LargestPallet:
- case PalletTypeEnum.LargePallet:
+ case 4:
+ case 3:
if (emptyLocation.Column % 2 != 0)
{
return null;
@@ -142,24 +142,18 @@
/// <param name="locationInfos"></param>
/// <param name="emptyLocation"></param>
/// <returns></returns>
- private Dt_LocationInfo? DepthLocationIsEmpty_ZH(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, PalletTypeEnum palletType)
+ private Dt_LocationInfo? DepthLocationIsEmpty_ZH(List<Dt_LocationInfo> locationInfos, Dt_LocationInfo emptyLocation, int palletType)
{
List<Dt_LocationInfo> locations = GetGroupLocations(locationInfos, emptyLocation);
bool moreDepthFlag = false;
bool littleDepthFlag = false;
- switch (palletType)
- {
- case PalletTypeEnum.LargestPallet:
- case PalletTypeEnum.LargePallet:
- List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
- moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt()) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
+ List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
+ moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt()) == null;//鏌ヨ澶т簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓烘湁璐х殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娣辫揣浣嶆湁鏈浣跨敤鐨勬儏鍐�
- List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
- littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
- break;
- }
+ List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
+ littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //鏌ヨ灏忎簬褰撳墠璐т綅娣卞害鐨勯泦鍚堥噷鏄惁鏈夌姸鎬佷笉涓虹┖锛屼笖绂佺敤鐘舵�佷笉涓虹鐢ㄤ互鍙婂彧鍏ョ殑璐т綅锛屽鏋滄槸true锛屽垯琛ㄧず娴呰揣浣嶈浣跨敤鎴栬�呰绂佺敤鐨勬儏鍐�
if (moreDepthFlag && littleDepthFlag)
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
index 4a0ddcd..3391097 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
@@ -18,12 +18,14 @@
using WIDESEA_Model.Models;
using WIDESEA_Common.CommonEnum;
using WIDESEA_Common.LocationEnum;
+using WIDESEA_Common.TaskEnum;
namespace WIDESEA_BasicService
{
public partial class LocationInfoService
{
- public Dt_LocationInfo? AssignLocation(string roadwayNo, PalletTypeEnum palletType, int warehouseId)
+
+ public Dt_LocationInfo? AssignLocation(string roadwayNo, int palletType, int warehouseId)
{
Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == warehouseId);
if (warehouse == null)
@@ -31,16 +33,22 @@
throw new Exception($"鏈壘鍒颁粨搴撲俊鎭�");
}
- return warehouse.WarehouseName switch
+ Dt_PalletTypeInfo palletTypeInfo = _basicRepository.PalletTypeInfoRepository.QueryFirst(x => x.PalletType == palletType && x.WarehouseId == warehouse.WarehouseId);
+ if (palletTypeInfo == null)
{
- "鏉挎潗浠�" => AssignLocation_BC(roadwayNo, palletType),
- "PP浠�" => AssignLocation_PP(roadwayNo, palletType),
- "骞茶啘浠�" => AssignLocation_GM(roadwayNo, palletType),
- "娴嬭瘯鏋朵粨" => AssignLocation_CSJ(roadwayNo, palletType),
- "闃荤剨浠�" => AssignLocation_ZH(roadwayNo, palletType),
- "娌瑰ⅷ浠�" => AssignLocation(roadwayNo),
- "鎴愬搧浠�" => AssignLocation(roadwayNo),
- "杈呮枡浠�" => AssignLocation(roadwayNo),
+ throw new Exception($"璇烽厤缃墭鐩樼被鍨嬩俊鎭�");
+ }
+
+ return warehouse.WarehouseCode switch
+ {
+ "HA57" => AssignLocation_BC(roadwayNo, palletType, palletTypeInfo),
+ "HA58" => AssignLocation_PP(roadwayNo, palletType, palletTypeInfo),
+ "HA152" => AssignLocation_GM(roadwayNo, palletType, palletTypeInfo),
+ "HA64" => AssignLocation_CSJ(roadwayNo, palletType, palletTypeInfo),
+ "闃荤剨浠�" => AssignLocation_ZH(roadwayNo, palletType, palletTypeInfo),
+ "HA153" => AssignLocation(roadwayNo),
+ "HA71" => AssignLocation(roadwayNo),
+ "HA60" => AssignLocation(roadwayNo),
_ => throw new Exception($"鏈壘鍒颁粨搴撹揣浣嶅垎閰嶆柟娉�")
};
}
@@ -85,7 +93,7 @@
/// <param name="locationCode">璐т綅缂栧彿</param>
/// <param name="palletType">鎵樼洏绫诲瀷</param>
/// <param name="locationStatus">璐т綅鐘舵��</param>
- public void UpdateLocationStatus(string locationCode, PalletTypeEnum palletType, LocationStatusEnum locationStatus, int warehousId)
+ public void UpdateLocationStatus(string locationCode, int palletType, LocationStatusEnum locationStatus, int warehousId)
{
Dt_LocationInfo location = Repository.QueryFirst(x => x.LocationCode == locationCode);
if (location == null)
@@ -101,7 +109,7 @@
/// <param name="location">璐т綅瀵硅薄</param>
/// <param name="palletType">鎵樼洏绫诲瀷</param>
/// <param name="locationStatus">璐т綅鐘舵��</param>
- public void UpdateLocationStatus(Dt_LocationInfo location, PalletTypeEnum palletType, LocationStatusEnum locationStatus, int warehousId)
+ public void UpdateLocationStatus2(Dt_LocationInfo location, int palletType, LocationStatusEnum locationStatus, int warehousId)
{
List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => x.RoadwayNo == location.RoadwayNo);
@@ -176,7 +184,7 @@
nearLocations[i].LocationStatus = LocationStatusEnum.FreeLock.ObjToInt();
}
}
- else if (locationStatus == LocationStatusEnum.Free || locationStatus == LocationStatusEnum.InStock)
+ else if (locationStatus == LocationStatusEnum.InStock)
{
if (nearLocations[i].LocationStatus == LocationStatusEnum.InStockLock.ObjToInt())
{
@@ -233,10 +241,164 @@
}
}
}
+
+ if (locations.Where(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt()).Count() == locations.Count && locationStatus == LocationStatusEnum.Free)
+ {
+ locations.ForEach(x =>
+ {
+ x.LocationType = 0;
+ });
+ }
+
Repository.UpdateData(locations);
}
+ public void UpdateLocationStatus(Dt_LocationInfo location, int palletType, LocationStatusEnum locationStatus, int warehousId)
+ {
+ List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => x.RoadwayNo == location.RoadwayNo);
+ List<Dt_PalletTypeInfo> palletTypeInfos = _basicRepository.PalletTypeInfoRepository.QueryData(x => x.WarehouseId == warehousId);
+
+ Dt_PalletTypeInfo? palletTypeInfo = palletTypeInfos.FirstOrDefault(x => x.PalletType == palletType && x.WarehouseId == warehousId);
+ if (palletTypeInfo == null)
+ {
+ throw new Exception($"璇烽厤缃墭鐩樼被鍨嬩俊鎭�");
+ }
+ List<Dt_LocationInfo> locations = GetGroupLocations(locationInfos, location);
+ if (locationInfos.Max(x => x.Depth) < 3)
+ {
+ for (int i = 0; i < locations.Count; i++)
+ {
+ if (locations[i].LocationType != palletType)
+ {
+ locations[i].LocationType = palletType;
+ }
+
+ if (locations[i].LocationCode == location.LocationCode)
+ {
+ locations[i].LocationStatus = locationStatus.ObjToInt();
+ }
+ else
+ {
+ if (locationStatus == LocationStatusEnum.Lock)
+ {
+ if (locations[i].LocationStatus == LocationStatusEnum.InStock.ObjToInt())
+ {
+ locations[i].LocationStatus = LocationStatusEnum.InStockLock.ObjToInt();
+ }
+ else if (locations[i].LocationStatus == LocationStatusEnum.Free.ObjToInt())
+ {
+ locations[i].LocationStatus = LocationStatusEnum.FreeLock.ObjToInt();
+ }
+ }
+ else if (locationStatus == LocationStatusEnum.Free || locationStatus == LocationStatusEnum.InStock)
+ {
+ if (locations[i].LocationStatus == LocationStatusEnum.InStockLock.ObjToInt())
+ {
+ locations[i].LocationStatus = LocationStatusEnum.InStock.ObjToInt();
+ }
+ else if (locations[i].LocationStatus == LocationStatusEnum.FreeLock.ObjToInt())
+ {
+ locations[i].LocationStatus = LocationStatusEnum.Free.ObjToInt();
+ }
+ }
+ }
+ }
+
+ if (palletTypeInfos.FirstOrDefault(x => x.LocaitonCount == 2) != null)
+ {
+ Dt_LocationInfo? nearLocation;
+ if (palletTypeInfo.IsOdd)
+ {
+ nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column + 1);
+ }
+ else
+ {
+ nearLocation = locationInfos.FirstOrDefault(x => x.Row == location.Row && x.Layer == location.Layer && x.Depth == location.Depth && x.Column == location.Column - 1);
+ }
+
+ if (nearLocation != null)
+ {
+ List<Dt_LocationInfo> nearLocations = GetGroupLocations(locationInfos, nearLocation);
+ for (int i = 0; i < nearLocations.Count; i++)
+ {
+ if (nearLocations[i].LocationType != palletType)
+ {
+ nearLocations[i].LocationType = palletType;
+ }
+
+ if (locationStatus == LocationStatusEnum.Lock)
+ {
+ if (nearLocations[i].LocationStatus == LocationStatusEnum.InStock.ObjToInt())
+ {
+ nearLocations[i].LocationStatus = LocationStatusEnum.InStockLock.ObjToInt();
+ }
+ else if (nearLocations[i].LocationStatus == LocationStatusEnum.Free.ObjToInt())
+ {
+ nearLocations[i].LocationStatus = LocationStatusEnum.FreeLock.ObjToInt();
+ }
+ }
+ else if (locationStatus == LocationStatusEnum.Free || locationStatus == LocationStatusEnum.InStock)
+ {
+ if (nearLocations[i].LocationStatus == LocationStatusEnum.InStockLock.ObjToInt())
+ {
+ nearLocations[i].LocationStatus = LocationStatusEnum.InStock.ObjToInt();
+ }
+ else if (nearLocations[i].LocationStatus == LocationStatusEnum.FreeLock.ObjToInt())
+ {
+ nearLocations[i].LocationStatus = LocationStatusEnum.Free.ObjToInt();
+ }
+ }
+
+ }
+ locations.AddRange(nearLocations);
+ }
+ }
+
+
+
+ }
+ else
+ {
+ for (int i = 0; i < locations.Count; i++)
+ {
+ if (locations[i].LocationCode == location.LocationCode)
+ {
+ locations[i].LocationStatus = locationStatus.ObjToInt();
+ }
+ else
+ {
+ if (locationStatus == LocationStatusEnum.Lock)
+ {
+ if (locations[i].LocationStatus == LocationStatusEnum.InStock.ObjToInt())
+ {
+ locations[i].LocationStatus = LocationStatusEnum.InStockLock.ObjToInt();
+ }
+ else if (locations[i].LocationStatus == LocationStatusEnum.Free.ObjToInt())
+ {
+ locations[i].LocationStatus = LocationStatusEnum.FreeLock.ObjToInt();
+ }
+ }
+ else if (locationStatus == LocationStatusEnum.Free || locationStatus == LocationStatusEnum.InStock)
+ {
+ if (locations[i].LocationStatus == LocationStatusEnum.InStockLock.ObjToInt())
+ {
+ locations[i].LocationStatus = LocationStatusEnum.InStock.ObjToInt();
+ }
+ else if (locations[i].LocationStatus == LocationStatusEnum.FreeLock.ObjToInt())
+ {
+ locations[i].LocationStatus = LocationStatusEnum.Free.ObjToInt();
+ }
+ }
+ }
+ if (locations[i].LocationType != palletType.ObjToInt())
+ {
+ locations[i].LocationType = palletType.ObjToInt();
+ }
+ }
+ }
+ Repository.UpdateData(locations);
+ }
/// <summary>
/// 鑾峰彇涓嶅悓娣卞害鐨勫悓缁勮揣浣嶄俊鎭�
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PrintStatusEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PrintStatusEnum.cs"
index 5c4c3b3..87ab8c8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PrintStatusEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PrintStatusEnum.cs"
@@ -10,14 +10,14 @@
public enum PrintStatusEnum
{
/// <summary>
- /// 宸叉墦鍗�
- /// </summary>
- [Description("宸叉墦鍗�")]
- Printed = 0,
- /// <summary>
/// 鏈墦鍗�
/// </summary>
[Description("鏈墦鍗�")]
- UnPrinted =1
+ UnPrinted = 0,
+ /// <summary>
+ /// 宸叉墦鍗�
+ /// </summary>
+ [Description("宸叉墦鍗�")]
+ Printed = 1
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/MesOutboundOrderType.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/MesOutboundOrderType.cs"
new file mode 100644
index 0000000..d269e16
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/MesOutboundOrderType.cs"
@@ -0,0 +1,27 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_Common.OrderEnum
+{
+ /// <summary>
+ ///
+ /// </summary>
+ public enum MesOutboundOrderTypeEnum
+ {
+ /// <summary>
+ /// 鍩烘澘鍑哄簱
+ /// </summary>
+ [Description("鍩烘澘鍑哄簱")]
+ SubstrateOut = 100,
+
+ /// <summary>
+ /// 鍩烘澘浣欐枡閫�搴�
+ /// </summary>
+ [Description("鍩烘澘浣欐枡閫�搴�")]
+ SubstrateBack = 200,
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
index 668fe03..a269f80 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
@@ -29,6 +29,12 @@
/// </summary>
[Description("璐ㄦ鍑哄簱")]
OutQuality = 130,
+
+ /// <summary>
+ /// MES鍑哄簱
+ /// </summary>
+ [Description("MES鍑哄簱")]
+ MesOutbound = 200,
/// <summary>
/// 閲囪喘鍏ュ簱
/// </summary>
@@ -49,11 +55,19 @@
/// </summary>
[Description("璐ㄦ鍏ュ簱")]
InQuality = 540,
+
/// <summary>
/// 鐢熶骇閫�鏂�
/// </summary>
[Description("鐢熶骇閫�鏂�")]
ProductionReturn = 550,
+
+ /// <summary>
+ /// MES閫�鏂�
+ /// </summary>
+ [Description("MES閫�鏂�")]
+ MesMatReturn = 560,
+
/// <summary>
/// 宸烽亾鍐呯Щ搴�
/// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs"
index 50c68e1..14b05f2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs"
@@ -30,18 +30,21 @@
CodeRuleAttribute? codeRuleAttribute = propertyInfo.GetCustomAttribute<CodeRuleAttribute>();
if (codeRuleAttribute != null)
{
- SqlSugarClient sugarClient = new SqlSugarClient(new ConnectionConfig
+ if (propertyInfo.GetValue(entityInfo.EntityValue) == null)
{
- ConfigId = MainDb.CurrentDbConnId,
- ConnectionString = DBContext.GetMainConnectionDb().Connection,
- IsAutoCloseConnection = true,
- DbType = MainDb.DbType,
- });
- dynamic ruleConfig = sugarClient.Queryable(MainDb.CodeRuleConfig, "x").Where(nameof(CodeRuleAttribute.RuleCode), "=", codeRuleAttribute.RuleCode.ToString()).First();
- if (ruleConfig != null)
- {
- string code = CreateCodeByRule(ruleConfig, sugarClient);
- propertyInfo.SetValue(entityInfo.EntityValue, code, null);
+ SqlSugarClient sugarClient = new SqlSugarClient(new ConnectionConfig
+ {
+ ConfigId = MainDb.CurrentDbConnId,
+ ConnectionString = DBContext.GetMainConnectionDb().Connection,
+ IsAutoCloseConnection = true,
+ DbType = MainDb.DbType,
+ });
+ dynamic ruleConfig = sugarClient.Queryable(MainDb.CodeRuleConfig, "x").Where(nameof(CodeRuleAttribute.RuleCode), "=", codeRuleAttribute.RuleCode.ToString()).First();
+ if (ruleConfig != null)
+ {
+ string code = CreateCodeByRule(ruleConfig, sugarClient);
+ propertyInfo.SetValue(entityInfo.EntityValue, code, null);
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs"
index 785290a..23c0f6a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs"
@@ -122,7 +122,7 @@
}
}
- private Expression<Func<TEntity, bool>> GetWhereExpression(string propertyName, object propertyValue, ParameterExpression parameter, LinqExpressionType expressionType)
+ protected Expression<Func<TEntity, bool>> GetWhereExpression(string propertyName, object propertyValue, ParameterExpression parameter, LinqExpressionType expressionType)
{
Type proType = typeof(TEntity).GetProperty(propertyName).PropertyType;
ConstantExpression constant = proType.ToString() == "System.String"
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/HttpContextExtension.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/HttpContextExtension.cs"
new file mode 100644
index 0000000..92ecb6e
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/HttpContextExtension.cs"
@@ -0,0 +1,24 @@
+锘縰sing Microsoft.AspNetCore.Http;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_Core.Extensions
+{
+ public static class HttpContextExtension
+ {
+ public static ISession GetSession(this HttpContext context)
+ {
+ try
+ {
+ return context.Session;
+ }
+ catch (Exception)
+ {
+ return default;
+ }
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SwaggerContextExtension.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SwaggerContextExtension.cs"
new file mode 100644
index 0000000..d3e686f
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SwaggerContextExtension.cs"
@@ -0,0 +1,72 @@
+锘縰sing Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Http.Extensions;
+using System;
+using System.Collections.Generic;
+using System.IdentityModel.Tokens.Jwt;
+using System.Linq;
+using System.Security.Claims;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.Helper;
+
+namespace WIDESEA_Core.Extensions
+{
+ public static class SwaggerContextExtension
+ {
+ public const string SwaggerCodeKey = "swagger-code";
+ public const string SwaggerJwt = "swagger-jwt";
+
+ public static bool IsSuccessSwagger()
+ {
+ return App.HttpContext?.GetSession()?.GetString(SwaggerCodeKey) == "success";
+ }
+
+ public static bool IsSuccessSwagger(this HttpContext context)
+ {
+ return context.GetSession()?.GetString(SwaggerCodeKey) == "success";
+ }
+
+ public static void SuccessSwagger()
+ {
+ App.HttpContext?.GetSession()?.SetString(SwaggerCodeKey, "success");
+ }
+
+ public static void SuccessSwagger(this HttpContext context)
+ {
+ context.GetSession()?.SetString(SwaggerCodeKey, "success");
+ }
+
+ public static void SuccessSwaggerJwt(this HttpContext context, string token)
+ {
+ var claims = new ClaimsIdentity(GetClaimsIdentity(token));
+ context.User.AddIdentity(claims);
+ context.GetSession().SetString(SwaggerJwt, token);
+ }
+
+ private static IEnumerable<Claim> GetClaimsIdentity(string token)
+ {
+ var jwtHandler = new JwtSecurityTokenHandler();
+ // token鏍¢獙
+ if (token.IsNotEmptyOrNull() && jwtHandler.CanReadToken(token))
+ {
+ var jwtToken = jwtHandler.ReadJwtToken(token);
+
+ return jwtToken.Claims;
+ }
+
+ return new List<Claim>();
+ }
+
+ public static string GetSuccessSwaggerJwt(this HttpContext context)
+ {
+ return context.GetSession().GetString(SwaggerJwt);
+ }
+
+
+ public static void RedirectSwaggerLogin(this HttpContext context)
+ {
+ var returnUrl = context.Request.GetDisplayUrl(); //鑾峰彇褰撳墠url鍦板潃
+ context.Response.Redirect("/swg-login.html?returnUrl=" + returnUrl);
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/WebSocketSetup.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/WebSocketSetup.cs"
index b0b9fc5..48dc714 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/WebSocketSetup.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/WebSocketSetup.cs"
@@ -5,6 +5,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core.Helper;
namespace WIDESEA_Core.Extensions
{
@@ -14,6 +15,12 @@
{
if (services == null) throw new ArgumentNullException(nameof(services));
+ int port = AppSettings.Get("WebSocketPort").ObjToInt();
+ if (port == 0)
+ {
+ port = 9296;
+ }
+
services.AddSingleton(x =>
{
WebSocketServer socketServer = new WebSocketServer();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs"
index 15b0ead..4ad30c7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs"
@@ -9,6 +9,7 @@
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core.Extensions;
using WIDESEA_Core.Helper;
using ICacheService = WIDESEA_Core.Caches.ICacheService;
@@ -46,21 +47,19 @@
public string GetToken()
{
- string token = _accessor.HttpContext?.Request?.Headers["Authorization"].ObjToString().Replace("Bearer ", "") ?? "";
+ string token = "";
+ token = _cacheService.Get(UserId.ToString());
+ if (!string.IsNullOrEmpty(token)) { return token; }
+ token = _accessor.HttpContext?.Request?.Headers["Authorization"].ObjToString().Replace("Bearer ", "") ?? "";
if (!token.IsNullOrEmpty())
{
return token;
}
- //if (_accessor.HttpContext?.IsSuccessSwagger() == true)
+ //if (_accessor.HttpContext?.IsSuccessSwagger() ?? false)
//{
// token = _accessor.HttpContext.GetSuccessSwaggerJwt();
// if (token.IsNotEmptyOrNull())
// {
- // //UserInfo userInfo = JwtHelper.SerializeJwt(token);
- // //if (userInfo.UserId > 0)
- // //{
- // // return token;
- // //}
// List<Claim> claims1 = _accessor.HttpContext.User.Claims.ToList();
// if (_accessor.HttpContext.User.Claims.Any(s => s.Type == JwtRegisteredClaimNames.Jti))
// {
@@ -72,8 +71,6 @@
// return token;
// }
//}
- token = _cacheService.Get(UserId.ToString());
- if (!string.IsNullOrEmpty(token)) { return token; }
return token;
// string token = _cacheService.Get(UserId.ToString());
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs"
index b6c5235..a57e31b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs"
@@ -5,10 +5,12 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
+using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Const;
+using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
namespace WIDESEA_Core.Utilities
@@ -318,5 +320,48 @@
}
return null;
}
+
+ public static void ValidatePageOptions<TEntity>(PageDataOptions options, ref ISugarQueryable<TEntity> sugarQueryable)
+ {
+ string where = string.Empty;
+ PropertyInfo[] entityProperties = typeof(TEntity).GetProperties();
+ List<SearchParameters> searchParametersList = new List<SearchParameters>();
+ if (options.Filter != null && options.Filter.Count > 0)
+ {
+ searchParametersList.AddRange(options.Filter);
+ }
+ else if (!string.IsNullOrEmpty(options.Wheres))
+ {
+ try
+ {
+ searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
+ options.Filter = searchParametersList;
+ }
+ catch { }
+ }
+ for (int i = 0; i < searchParametersList.Count; i++)
+ {
+ if (string.IsNullOrEmpty(searchParametersList[i].Value))
+ {
+ continue;
+ }
+
+ PropertyInfo? property = entityProperties.Where(c => c.Name.ToUpper() == searchParametersList[i].Name.ToUpper()).FirstOrDefault();
+
+ if (property == null) continue;
+
+ List<(bool, string, object)> results = property.ValidationValueForDbType(searchParametersList[i].Value.Split(',')).ToList();
+ if (results == null || results.Count() == 0)
+ {
+ continue;
+ }
+ for (int j = 0; j < results.Count(); j++)
+ {
+ LinqExpressionType expressionType = searchParametersList[i].DisplayType.GetLinqCondition();
+ Expression<Func<TEntity, bool>> expression = property.GetWhereExpression<TEntity>(results[j].Item3, null, expressionType);
+ sugarQueryable = sugarQueryable.Where(expression);
+ }
+ }
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/LambdaExtensions.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/LambdaExtensions.cs"
index 459408a..a8e0099 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/LambdaExtensions.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/LambdaExtensions.cs"
@@ -179,5 +179,70 @@
return p => false;
}
+
+ public static Expression<Func<TEntity, bool>> GetWhereExpression<TEntity>(this PropertyInfo propertyInfo, object propertyValue, ParameterExpression parameter, LinqExpressionType expressionType)
+ {
+ Type proType = propertyInfo.PropertyType;
+ ConstantExpression constant = proType.ToString() == "System.String"
+ ? Expression.Constant(propertyValue) : Expression.Constant(propertyValue.ToString().ChangeType(proType));
+
+ // DateTime鍙�夋嫨浜嗘棩鏈熺殑鏃跺�欒嚜鍔ㄥ湪缁撴潫鏃ユ湡鍔犱竴澶╋紝淇DateTime绫诲瀷浣跨敤鏃ユ湡鍖洪棿鏌ヨ鏃犳硶鏌ヨ鍒扮粨鏉熸棩鏈熺殑闂
+ if ((proType == typeof(DateTime) || proType == typeof(DateTime?)) && expressionType == LinqExpressionType.LessThanOrEqual && propertyValue.ToString().Length == 10)
+ {
+ constant = Expression.Constant(Convert.ToDateTime(propertyValue.ToString()).AddDays(1));
+ }
+ parameter = parameter ?? Expression.Parameter(typeof(TEntity), "b");
+ //鍒涘缓鑺傜偣鐨勫睘鎬=>p.name 灞炴�ame
+ MemberExpression memberProperty = Expression.PropertyOrField(parameter, propertyInfo.Name);
+ UnaryExpression member = Expression.Convert(memberProperty, constant.Type);
+ Expression<Func<TEntity, bool>> expression = p => false;
+ switch (expressionType)
+ {
+ //p=>p.propertyName == propertyValue
+ case LinqExpressionType.Equal:
+ expression = Expression.Lambda<Func<TEntity, bool>>(Expression.Equal(member, constant), parameter);
+ break;
+ //p=>p.propertyName != propertyValue
+ case LinqExpressionType.NotEqual:
+ expression = Expression.Lambda<Func<TEntity, bool>>(Expression.NotEqual(member, constant), parameter);
+ break;
+ // p => p.propertyName > propertyValue
+ case LinqExpressionType.GreaterThan:
+ expression = Expression.Lambda<Func<TEntity, bool>>(Expression.GreaterThan(member, constant), parameter);
+ break;
+ // p => p.propertyName < propertyValue
+ case LinqExpressionType.LessThan:
+ expression = Expression.Lambda<Func<TEntity, bool>>(Expression.LessThan(member, constant), parameter);
+ break;
+ // p => p.propertyName >= propertyValue
+ case LinqExpressionType.ThanOrEqual:
+ expression = Expression.Lambda<Func<TEntity, bool>>(Expression.GreaterThanOrEqual(member, constant), parameter);
+ break;
+ // p => p.propertyName <= propertyValue
+ case LinqExpressionType.LessThanOrEqual:
+ expression = Expression.Lambda<Func<TEntity, bool>>(Expression.LessThanOrEqual(member, constant), parameter);
+ break;
+ // p => p.propertyName.Contains(propertyValue)
+ // p => !p.propertyName.Contains(propertyValue)
+ case LinqExpressionType.Contains:
+ case LinqExpressionType.NotContains:
+ MethodInfo method = typeof(string).GetMethod("Contains", new[] { typeof(string) });
+ constant = Expression.Constant(propertyValue, typeof(string));
+ if (expressionType == LinqExpressionType.Contains)
+ {
+ expression = Expression.Lambda<Func<TEntity, bool>>(Expression.Call(member, method, constant), parameter);
+ }
+ else
+ {
+ expression = Expression.Lambda<Func<TEntity, bool>>(Expression.Not(Expression.Call(member, method, constant)), parameter);
+ }
+ break;
+ default:
+ //
+ expression = p => false;
+ break;
+ }
+ return expression;
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs"
index bd88b18..d8c83e1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs"
@@ -8,6 +8,9 @@
namespace WIDESEA_DTO.Basic
{
+ /// <summary>
+ ///
+ /// </summary>
[AnalysisRule, ModelValidate]
public class MatSerNumAnalysisModel
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MESRoot.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MESRoot.cs"
index 2a18606..b7125f4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MESRoot.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MESRoot.cs"
@@ -20,19 +20,5 @@
public T Content { get; set; }
}
- /// <summary>
- ///娴嬭瘯鏋跺悓姝�
- /// </summary>
- public class TestToolSynInfo
- {
- /// <summary>
- /// 娴嬭瘯鏋舵壒娆″彿
- /// </summary>
- public string ToolCode { get; set; }
- /// <summary>
- /// 鍒濆瀵垮懡
- /// </summary>
- public int Life { get; set; }
-
- }
+
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesMaterialLotaAceptModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesMaterialLotaAceptModel.cs"
new file mode 100644
index 0000000..ed4d371
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesMaterialLotaAceptModel.cs"
@@ -0,0 +1,89 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_DTO.MES
+{
+ /// <summary>
+ /// 鐗╂枡鍑哄簱锛學MS鍚屾鍑哄簱鐗╂枡鎵规鑷矼ES
+ /// </summary>
+ public class MesMaterialLotaAceptModel
+ {
+ /// <summary>
+ /// 鐗╂枡缂栫爜
+ /// </summary>
+ public string MaterialCode { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡鍚嶇О
+ /// </summary>
+ public string MaterialName { get; set; }
+
+ /// <summary>
+ /// 鍘熷鐗╂枡鎵规 渚涘簲鍟嗘壒娆�(MES鎸夌墿鏂欑紪鐮�+鈥�,鈥�+鐗╂枡鎵规鎷兼帴)
+ /// </summary>
+ public string MaterialLot { get; set; }
+
+ /// <summary>
+ /// 鏁伴噺
+ /// </summary>
+ public float Quantity { get; set; }
+
+ /// <summary>
+ /// 绾胯竟搴撳尯
+ /// </summary>
+ public string WarehouseArea { get; set; }
+
+ /// <summary>
+ /// 绾胯竟搴撲綅
+ /// </summary>
+ public string WarehouseLocation { get; set; }
+
+ /// <summary>
+ /// 渚涘簲鍟�
+ /// </summary>
+ public string Supplier { get; set; }
+
+ /// <summary>
+ /// 杞藉叿缂栫爜
+ /// </summary>
+ public string CarrierCode { get; set; }
+
+ /// <summary>
+ /// 浠诲姟鍗曞彿
+ /// </summary>
+ public string TaskNo { get; set; }
+
+ /// <summary>
+ /// 鍑哄簱绫诲瀷
+ /// </summary>
+ public int Type { get; set; }
+
+ /// <summary>
+ /// 鏈夋晥鏈�
+ /// </summary>
+ public string ExpirationDate { get; set; }
+
+ /// <summary>
+ /// 鐢熶骇鏃ユ湡
+ /// </summary>
+ public string ProductionDate { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡鏍囩
+ /// </summary>
+ public string MaterialBarCode { get; set; }
+
+ /// <summary>
+ /// 瑁佸垏鍨嬪彿
+ /// </summary>
+ public string CutedType { get; set; }
+
+ /// <summary>
+ /// PP瀹藉害
+ /// </summary>
+ public float PPWidth { get; set; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/RootList.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/RootList.cs"
deleted file mode 100644
index 9ff5822..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/RootList.cs"
+++ /dev/null
@@ -1,23 +0,0 @@
-锘縰sing OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WIDESEA_DTO.MES
-{
- public class RootList
- {
- /// <summary>
- ///
- /// </summary>
- public string From { get; set; }
- /// <summary>
- ///
- /// </summary>
- public string DateTime { get; set; }
-
- public List<TestToolScrap> Content { get; set; }
- }
-}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/SubstrateModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/SubstrateModel.cs"
new file mode 100644
index 0000000..b36a00d
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/SubstrateModel.cs"
@@ -0,0 +1,90 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_DTO.MES
+{
+ /// <summary>
+ /// 鍩烘澘鍑哄簱
+ /// </summary>
+ public class SubstrateOutModel
+ {
+ /// <summary>
+ /// 浠诲姟鍗曞彿
+ /// </summary>
+ public string TaskNo { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡缂栫爜
+ /// </summary>
+ public string MaterialCode { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡鍚嶇О
+ /// </summary>
+ public string MaterialName { get; set; }
+
+ /// <summary>
+ /// 闇�姹傛暟閲�
+ /// </summary>
+ public float RequiredQuantity { get; set; }
+
+ /// <summary>
+ /// 鍗曚綅
+ /// </summary>
+ public string Unit { get; set; }
+
+ /// <summary>
+ /// 绾夸綋
+ /// </summary>
+ public string Line { get; set; }
+ }
+
+ /// <summary>
+ /// 鍩烘澘浣欐枡閫�搴�
+ /// </summary>
+ public class SubstrateBackModel
+ {
+ /// <summary>
+ /// 鐗╂枡鎵规
+ /// </summary>
+ public string MaterialLot { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡缂栫爜
+ /// </summary>
+ public string MaterialCode { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡鍒嗙被
+ /// </summary>
+ public string MaterialCategory { get; set; }
+
+ /// <summary>
+ /// 閫�搴撴暟閲�
+ /// </summary>
+ public float Quantity { get; set; }
+
+ /// <summary>
+ /// 鍗曚綅
+ /// </summary>
+ public string Unit { get; set; }
+
+ /// <summary>
+ /// 杞藉叿缂栫爜
+ /// </summary>
+ public string CarrierCode { get; set; }
+
+ /// <summary>
+ /// 鐢熶骇鏃ユ湡
+ /// </summary>
+ public string ProductionDate { get; set; }
+
+ /// <summary>
+ /// 鏈夋晥鏈�
+ /// </summary>
+ public string ExpirationDate { get; set; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs"
index 93d371f..f529847 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs"
@@ -56,5 +56,24 @@
[PropertyValidate("娴嬭瘯鏋舵壒娆″彿", NotNullAndEmpty = true)]
public string TestToolCode { get; set; }
}
-
+
+ /// <summary>
+ ///娴嬭瘯鏋跺悓姝�
+ /// </summary>
+ public class TestToolSynInfo
+ {
+ /// <summary>
+ /// 娴嬭瘯鏋舵壒娆″彿
+ /// </summary>
+ public string ToolCode { get; set; }
+ /// <summary>
+ /// 娴嬭瘯鏋剁墿鏂欏悕绉�
+ /// </summary>
+ public string MaterialName { get; set; }
+ /// <summary>
+ /// 鍒濆瀵垮懡
+ /// </summary>
+ public int Life { get; set; }
+
+ }
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
index 53eaf86..29b47b1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
@@ -10,53 +10,119 @@
namespace WIDESEA_DTO.Stock
{
+ /// <summary>
+ ///
+ /// </summary>
public class StockViewDTO
{
- [SugarColumn(IsNullable = true, ColumnDescription = "璐т綅鍙�")]
+ /// <summary>
+ ///
+ /// </summary>
public string LocationCode { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public string LocationName { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public int Column { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public int Row { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public int Layer { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public int Depth { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public int LocationStatus { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public int LocationType { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public string RoadwayNo { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public int EnalbeStatus { get; set; }
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
+ /// <summary>
+ ///
+ /// </summary>
public int StockId { get; set; }
- [SugarColumn(IsNullable = true, ColumnDescription = "鎵樼洏鍙�")]
+
+ /// <summary>
+ ///
+ /// </summary>
public string PalletCode { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public bool IsFull { get; set; }
- [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡鍙�")]
+
+ /// <summary>
+ ///
+ /// </summary>
public string MaterielCode { get; set; }
- [SugarColumn(IsNullable = true, ColumnDescription = "鎵规鍙�")]
+ /// <summary>
+ ///
+ /// </summary>
public string BatchNo { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public int StockStatus { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public string StockRemark { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public string Creater { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public DateTime CreateDate { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public string Modifier { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public DateTime? ModifyDate { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
[Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(StockId))]
public List<Dt_StockInfoDetail> Details { get; set; }
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WCSTaskDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WCSTaskDTO.cs"
new file mode 100644
index 0000000..5e6fe8e
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WCSTaskDTO.cs"
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_DTO.Task
+{
+ /// <summary>
+ ///
+ /// </summary>
+ public class WCSTaskDTO
+ {
+ // public int Task
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs"
index bde6341..4b0b5f8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs"
@@ -6,6 +6,9 @@
namespace WIDESEA_DTO.Task
{
+ /// <summary>
+ /// 浠诲姟DTO
+ /// </summary>
public class WMSTaskDTO
{
/// <summary>
@@ -53,10 +56,19 @@
/// </summary>
public int Grade { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public int WarehouseId { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public string AGVArea { get; set; }
+ /// <summary>
+ ///
+ /// </summary>
public int PalletType { get; set; }
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/WIDESEA_DTO.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/WIDESEA_DTO.csproj"
index 3c9bb11..502ce7c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/WIDESEA_DTO.csproj"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/WIDESEA_DTO.csproj"
@@ -1,13 +1,14 @@
锘�<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- </PropertyGroup>
+ <PropertyGroup>
+ <TargetFramework>net6.0</TargetFramework>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ <GenerateDocumentationFile>True</GenerateDocumentationFile>
+ </PropertyGroup>
- <ItemGroup>
- <ProjectReference Include="..\WIDESEA_Model\WIDESEA_Model.csproj" />
- </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\WIDESEA_Model\WIDESEA_Model.csproj" />
+ </ItemGroup>
</Project>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IBasicRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IBasicRepository.cs"
index dde299e..5be3300 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IBasicRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IBasicRepository.cs"
@@ -16,5 +16,7 @@
IWarehouseRepository WarehouseRepository { get; }
+ IPalletTypeInfoRepository PalletTypeInfoRepository { get; }
+
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IPalletTypeInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IPalletTypeInfoRepository.cs"
new file mode 100644
index 0000000..5eef1f6
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IPalletTypeInfoRepository.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_IBasicRepository
+{
+ public interface IPalletTypeInfoRepository : IRepository<Dt_PalletTypeInfo>
+ {
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs"
index 3bdd8dc..cab3468 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs"
@@ -28,5 +28,13 @@
/// 渚涘簲鍟嗕笟鍔″眰
/// </summary>
ISupplierInfoService SupplierInfoService { get; }
+
+ IUserInfoService UserInfoService { get; }
+
+ IPalletCodeInfoService PalletCodeInfoService { get; }
+
+ ICustomerInfoService CustomerInfoService { get; }
+
+ IMaterielCodeInfoService MaterielCodeInfoService { get; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs"
index a03995e..535e99a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs"
@@ -58,7 +58,7 @@
/// <param name="roadwayNo">宸烽亾鍙�</param>
/// <param name="palletType">鎵樼洏绫诲瀷</param>
/// <returns></returns>
- Dt_LocationInfo? AssignLocation(string roadwayNo, PalletTypeEnum palletType, int warehouseId);
+ Dt_LocationInfo? AssignLocation(string roadwayNo, int palletType, int warehouseId);
/// <summary>
/// 淇敼璐т綅鐘舵�佸強绫诲瀷
@@ -66,7 +66,7 @@
/// <param name="locationCode">璐т綅缂栧彿</param>
/// <param name="palletType">鎵樼洏绫诲瀷</param>
/// <param name="locationStatus">璐т綅鐘舵��</param>
- void UpdateLocationStatus(string locationCode, PalletTypeEnum palletType, LocationStatusEnum locationStatus, int warehousId);
+ void UpdateLocationStatus(string locationCode, int palletType, LocationStatusEnum locationStatus, int warehousId);
/// <summary>
/// 淇敼璐т綅鐘舵�佸強绫诲瀷
@@ -74,7 +74,7 @@
/// <param name="location">璐т綅瀵硅薄</param>
/// <param name="palletType">鎵樼洏绫诲瀷</param>
/// <param name="locationStatus">璐т綅鐘舵��</param>
- void UpdateLocationStatus(Dt_LocationInfo location, PalletTypeEnum palletType, LocationStatusEnum locationStatus, int warehousId);
+ void UpdateLocationStatus(Dt_LocationInfo location, int palletType, LocationStatusEnum locationStatus, int warehousId);
/// <summary>
/// 鑾峰彇涓嶅悓娣卞害鐨勫悓缁勮揣浣嶄俊鎭�
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletCodeInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletCodeInfoService.cs"
index 47eef01..51916de 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletCodeInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletCodeInfoService.cs"
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Model.Models;
@@ -10,5 +11,7 @@
{
public interface IPalletCodeInfoService : IService<Dt_PalletCodeInfo>
{
+ //鏇存柊鎵撳嵃鐘舵��
+ WebResponseContent PrintStatusUp(string printCode);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
index 0f88297..edec038 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
@@ -23,7 +23,7 @@
WebResponseContent InPinKu(string inboundOrderId,int warehouseId, List<string> serNums);
WebResponseContent MaterielGroup(string palletCode, int Initiallife, int warehouseId, List<string> serNums);
- WebResponseContent FeedbackInboundOrder(int id);
+ //WebResponseContent FeedbackInboundOrder(int id);
WebResponseContent MaterielGroup(SaveModel saveModel);
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs"
index fea1b5b..1c45a8d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs"
@@ -17,5 +17,9 @@
IReceiveOrderDetailService ReceiveOrderDetailService { get; }
IReceiveOrderService ReceiveOrderService { get; }
+
+ IPurchaseOrderService PurchaseOrderService { get; }
+
+ IPurchaseOrderDetailService PurchaseOrderDetailService { get; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesOutboundOrderRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesOutboundOrderRepository.cs"
new file mode 100644
index 0000000..9ea7dab
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IMesOutboundOrderRepository.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_IOutboundRepository
+{
+ public interface IMesOutboundOrderRepository : IRepository<Dt_MesOutboundOrder>
+ {
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesOutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesOutboundOrderService.cs"
new file mode 100644
index 0000000..0704dab
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IMesOutboundOrderService.cs"
@@ -0,0 +1,41 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_DTO.MES;
+using WIDESEA_DTO;
+using WIDESEA_Model.Models;
+using WIDESEA_IOutboundRepository;
+using WIDESEA_Common.LocationEnum;
+using WIDESEA_Core;
+
+namespace WIDESEA_IOutboundService
+{
+ public interface IMesOutboundOrderService : IService<Dt_MesOutboundOrder>
+ {
+ /// <summary>
+ ///
+ /// </summary>
+ IMesOutboundOrderRepository Repository { get; }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="mesOutboundOrder"></param>
+ /// <returns></returns>
+ (List<Dt_StockInfo>, Dt_MesOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesOutboundOrder mesOutboundOrder);
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="stockInfos"></param>
+ /// <param name="outStockLockInfos"></param>
+ /// <param name="locationInfos"></param>
+ /// <param name="locationStatus"></param>
+ /// <param name="tasks"></param>
+ /// <returns></returns>
+ WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null);
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
index 58c2951..f34fe08 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
@@ -14,13 +14,55 @@
{
public interface IOutStockLockInfoService : IService<Dt_OutStockLockInfo>
{
+ /// <summary>
+ ///
+ /// </summary>
IOutStockLockInfoRepository Repository { get; }
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="outboundOrder"></param>
+ /// <param name="outboundOrderDetail"></param>
+ /// <param name="outStocks"></param>
+ /// <param name="taskNum"></param>
+ /// <returns></returns>
List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_StockInfo> outStocks, int? taskNum = null);
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="outboundOrder"></param>
+ /// <param name="outboundOrderDetail"></param>
+ /// <param name="outStock"></param>
+ /// <param name="assignQuantity"></param>
+ /// <param name="taskNum"></param>
+ /// <returns></returns>
Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null);
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="mesOutboundOrder"></param>
+ /// <param name="outStock"></param>
+ /// <param name="assignQuantity"></param>
+ /// <param name="taskNum"></param>
+ /// <returns></returns>
+ Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesOutboundOrder mesOutboundOrder, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null);
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="orderDetailId"></param>
+ /// <param name="outStockStatus"></param>
+ /// <returns></returns>
List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum outStockStatus);
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
List<Dt_OutStockLockInfo> GetStockOutboundOrder(SaveModel saveModel);
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs"
index 7e86e2f..b1d4b85 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs"
@@ -9,6 +9,8 @@
{
public interface IOutboundService:IDependency
{
+ IMesOutboundOrderService MesOutboundOrderService { get; }
+
IOutboundOrderDetailService OutboundOrderDetailService { get; }
IOutboundOrderService OutboundOrderService { get; }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs"
index f3826a3..8bc79c6 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs"
@@ -12,5 +12,9 @@
IStockInfoDetailRepository StockInfoDetailRepository { get; }
IStockInfoRepository StockInfoRepository { get; }
+
+ IStockInfoDetail_HtyRepository StockInfoDetail_HtyRepository { get; }
+
+ IStockInfo_HtyRepository StockInfo_HtyRepository { get; }
}
}
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 ffe18b8..c17ee33 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"
@@ -39,8 +39,20 @@
{
ITaskRepository Repository { get; }
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="tasks"></param>
+ /// <param name="agvDescription"></param>
+ /// <returns></returns>
WebResponseContent PushTasksToWCS(List<Dt_Task> tasks, string agvDescription = "");
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="taskNum"></param>
+ /// <param name="agvDescription"></param>
+ /// <returns></returns>
WebResponseContent PushTasksToWCSSingle(int taskNum, string agvDescription = "");
/// <summary>
@@ -77,6 +89,11 @@
/// <returns></returns>
WebResponseContent AssignInboundTaskLocation(int taskNum, string roadwayNo);
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="taskNum"></param>
+ /// <returns></returns>
WebResponseContent TaskCompleted(int taskNum);
/// <summary>
@@ -121,20 +138,55 @@
/// <param name="locationCode">鍏ュ簱鎴栧嚭搴撶殑璐т綅鍙�</param>
/// <returns></returns>
MesResponseContent TestToolBack(TestToolBackModel backModel);
+
/// <summary>
/// 娴嬭瘯鏋舵姤搴�
/// </summary>
/// <param name="toolScrap"></param>
/// <returns></returns>
MesResponseContent TestScrap(TestToolScrap toolScraps);
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="taskNum"></param>
+ /// <param name="locationCode"></param>
+ /// <returns></returns>
WebResponseContent IsRelocation(int taskNum, string locationCode);
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="toolSynInfo"></param>
+ /// <returns></returns>
WebResponseContent TestSynStock(TestToolSynInfo toolSynInfo);
+
/// <summary>
/// 閫夋嫨搴撳瓨鐢熸垚鍑哄簱浠诲姟
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
WebResponseContent Outbound(int id);
- WebResponseContent OutEmpty(int qty, string address, int WarehouseId);
+
+ /// <summary>
+ /// 鐗╂枡鍑哄簱锛學MS鍚屾鍑哄簱鐗╂枡鎵规鑷矼ES
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ WebResponseContent UploadMesMaterialLotaAcept(MesMaterialLotaAceptModel model);
+
+ /// <summary>
+ /// 鍩烘澘鍑哄簱
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ MesResponseContent SubstrateOut(SubstrateOutModel model);
+
+ /// <summary>
+ /// 鍩烘澘浣欐枡閫�搴�
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ MesResponseContent SubstrateBack(SubstrateBackModel model);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index 9c7ded2..3c7c036 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -52,10 +52,11 @@
private readonly IRecordService _recordService;
private readonly IInvokeERPService _invokeERPService;
private readonly IWarehouseService _warehouseService;
+ private readonly IPalletTypeInfoRepository _palletTypeInfoRepository;
public IInboundOrderRepository Repository => BaseDal;
- public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IInboundRepository inboundRepository, IBasicRepository basicRepository, IStockRepository stockRepository, IRecordService recordService, IInvokeERPService invokeERPService, IWarehouseService warehouseService) : base(BaseDal)
+ public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IInboundRepository inboundRepository, IBasicRepository basicRepository, IStockRepository stockRepository, IRecordService recordService, IInvokeERPService invokeERPService, IWarehouseService warehouseService, IPalletTypeInfoRepository palletTypeInfoRepository) : base(BaseDal)
{
_mapper = mapper;
_unitOfWorkManage = unitOfWorkManage;
@@ -65,6 +66,7 @@
_recordService = recordService;
_invokeERPService = invokeERPService;
_warehouseService = warehouseService;
+ _palletTypeInfoRepository = palletTypeInfoRepository;
}
/// <summary>
/// 鍏朵粬鍏ュ簱鍗曞垱寤�
@@ -493,7 +495,7 @@
PalletCode = palletCode,
StockStatus = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(),
WarehouseId = inboundOrder.WarehouseId,
- PalletType = PalletTypeEnum.SmallPallet.ObjToInt(),
+ PalletType = GetPalletType(warehouse, palletCode, materielInfo),
Details = new List<Dt_StockInfoDetail>()
};
}
@@ -504,7 +506,30 @@
return WebResponseContent.Instance.Error($"鎵樼洏鍙烽噸澶�");
}
beforeQuantity = stockInfo.Details.Sum(x => x.StockQuantity);
- };
+ }
+
+ if (warehouse.WarehouseCode == WarehouseEnum.HA64.ToString())
+ {
+ stockInfo.Remark = Initiallife.ToString();
+ string batchNo = models.FirstOrDefault()?.LotNo ?? "";
+ Dt_StockInfoDetail existDetail = _stockRepository.StockInfoDetailRepository.QueryFirst(x => x.BatchNo == batchNo);
+ if (existDetail != null)
+ {
+ return WebResponseContent.Instance.Error($"{batchNo}娴嬭瘯鏋跺凡瀛樺湪");
+ }
+ if (models.Count >= 2)
+ {
+ return WebResponseContent.Instance.Error($"缁勭洏鏄庣粏涓嶅敮涓�");
+ }
+ if (palletCode.Substring(0, 1) == "6")
+ {
+ stockInfo.PalletType = PalletTypeEnum.MediumPallet.ObjToInt();
+ }
+ else
+ {
+ stockInfo.PalletType = PalletTypeEnum.LargestPallet.ObjToInt();
+ }
+ }
List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
List<int> detailKeys = new List<int>();
@@ -567,14 +592,6 @@
_inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
_recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.MaterielGroup);
_unitOfWorkManage.CommitTran();
- //if (warehouse.WarehouseCode==WarehouseEnum.HA153.ToString())
- //{
- // //鍚屾娴嬭瘯鏋朵俊鎭�
- // foreach (var model in models)
- // {
- // _taskService.TestSynStock(new TestToolSynInfo() { ToolCode = model.LotNo, Life = Initiallife });
- // }
- //}
content.OK();
}
catch (Exception ex)
@@ -614,6 +631,7 @@
float beforeQuantity = 0;
Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
+
if (stockInfo == null)
{
stockInfo = new Dt_StockInfo()
@@ -621,7 +639,7 @@
PalletCode = palletCode,
StockStatus = StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt(),
WarehouseId = warehouse.WarehouseId,
- PalletType = PalletTypeEnum.SmallPallet.ObjToInt(),
+ PalletType = GetPalletType(warehouse, palletCode, materielInfo),
Details = new List<Dt_StockInfoDetail>()
};
}
@@ -636,6 +654,16 @@
if (warehouse.WarehouseCode == WarehouseEnum.HA64.ToString())
{
+ string batchNo = models.FirstOrDefault()?.LotNo ?? "";
+ Dt_StockInfoDetail existDetail = _stockRepository.StockInfoDetailRepository.QueryFirst(x => x.BatchNo == batchNo);
+ if (existDetail != null)
+ {
+ return WebResponseContent.Instance.Error($"{batchNo}娴嬭瘯鏋跺凡瀛樺湪");
+ }
+ if (models.Count >= 2)
+ {
+ return WebResponseContent.Instance.Error($"缁勭洏鏄庣粏涓嶅敮涓�");
+ }
stockInfo.Remark = Initiallife.ToString();
if (palletCode.Substring(0, 1) == "6")
{
@@ -660,7 +688,7 @@
SerialNumber = model.SerialNumber,
StockQuantity = model.Quantity,
OutboundQuantity = 0,
- Unit= materielInfo.MaterielUnit,
+ Unit = materielInfo.MaterielUnit,
Status = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(),
ProductionDate = model.ProductionDate,
EffectiveDate = model.EffectiveDate,
@@ -689,11 +717,6 @@
}
_recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.MaterielGroup);
_unitOfWorkManage.CommitTran();
- //鍚屾娴嬭瘯鏋朵俊鎭�
- //foreach (var model in models)
- //{
- // _taskService.TestSynStock(new TestToolSynInfo() { ToolCode = model.LotNo, Life = Initiallife });
- //}
content.OK();
}
catch (Exception ex)
@@ -834,5 +857,30 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+
+ public int GetPalletType(Dt_Warehouse warehouse, string palletCode, Dt_MaterielInfo materielInfo)
+ {
+ if (warehouse.WarehouseCode == WarehouseEnum.HA64.ToString())
+ {
+ if (palletCode.Substring(0, 1) == "6")
+ {
+ return PalletTypeEnum.MediumPallet.ObjToInt();
+ }
+ else
+ {
+ return PalletTypeEnum.LargestPallet.ObjToInt();
+ }
+ }
+ else if (warehouse.WarehouseCode == WarehouseEnum.HA152.ObjToString())
+ {
+ Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 2));
+ if (palletTypeInfo == null)
+ {
+ throw new Exception($"鎵樼洏鍙烽敊璇�");
+ }
+ return palletTypeInfo.PalletType;
+ }
+ return -1;
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
index 7936dcd..345f0f5 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
@@ -18,12 +18,18 @@
public IReceiveOrderService ReceiveOrderService { get; }
- public InboundService(IInboundOrderDetailService inboundOrderDetailService, IInboundOrderService inbounOrderService, IReceiveOrderDetailService receiveOrderDetailService, IReceiveOrderService receiveOrderService)
+ public IPurchaseOrderService PurchaseOrderService { get; }
+
+ public IPurchaseOrderDetailService PurchaseOrderDetailService { get; }
+
+ public InboundService(IInboundOrderDetailService inboundOrderDetailService, IInboundOrderService inbounOrderService, IReceiveOrderDetailService receiveOrderDetailService, IReceiveOrderService receiveOrderService, IPurchaseOrderService purchaseOrderService, IPurchaseOrderDetailService purchaseOrderDetailService)
{
InboundOrderDetailService = inboundOrderDetailService;
InbounOrderService = inbounOrderService;
ReceiveOrderDetailService = receiveOrderDetailService;
ReceiveOrderService = receiveOrderService;
+ PurchaseOrderService = purchaseOrderService;
+ PurchaseOrderDetailService = purchaseOrderDetailService;
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_ApiInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_ApiInfo.cs"
index 9b42375..e0dc8f8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_ApiInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_ApiInfo.cs"
@@ -8,6 +8,9 @@
namespace WIDESEA_Model.Models
{
+ /// <summary>
+ /// 鎺ュ彛淇℃伅
+ /// </summary>
[SugarTable(nameof(Dt_ApiInfo), "鎺ュ彛淇℃伅")]
public class Dt_ApiInfo : BaseEntity
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs"
index 4431357..02df027 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs"
@@ -9,6 +9,9 @@
namespace WIDESEA_Model.Models
{
+ /// <summary>
+ /// 鐗╂枡鐮佷俊鎭�
+ /// </summary>
[SugarTable(nameof(Dt_MaterielCodeInfo), "鐗╂枡鐮佷俊鎭�")]
public class Dt_MaterielCodeInfo : BaseEntity
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletCodeInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletCodeInfo.cs"
index 16d765a..cfbc12e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletCodeInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletCodeInfo.cs"
@@ -8,6 +8,9 @@
namespace WIDESEA_Model.Models
{
+ /// <summary>
+ /// 鎵樼洏缂栧彿淇℃伅
+ /// </summary>
[SugarTable(nameof(Dt_PalletCodeInfo), "鎵樼洏缂栧彿淇℃伅")]
public class Dt_PalletCodeInfo : BaseEntity
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletTypeInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletTypeInfo.cs"
index 4eecf5a..5e15a8c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletTypeInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletTypeInfo.cs"
@@ -9,63 +9,81 @@
namespace WIDESEA_Model.Models
{
/// <summary>
- ///
+ /// 鎵樼洏绫诲瀷
/// </summary>
[SugarTable(nameof(Dt_PalletTypeInfo), "鎵樼洏绫诲瀷")]
public class Dt_PalletTypeInfo : BaseEntity
{
/// <summary>
- ///
+ /// 涓婚敭
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
public int Id { get; set; }
/// <summary>
- ///
+ /// 鎵樼洏绫诲瀷
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "鎵樼洏绫诲瀷")]
public int PalletType { get; set; }
/// <summary>
- ///
+ /// 鎵樼洏鍙疯捣濮嬪瓧绗︿覆
+ /// </summary>
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵樼洏鍙疯捣濮嬪瓧绗︿覆")]
+ public string CodeStartStr { get; set; }
+
+ /// <summary>
+ /// 鎵樼洏绫诲瀷鍚嶇О
/// </summary>
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵樼洏绫诲瀷鍚嶇О")]
public string TypeName { get; set; }
/// <summary>
- ///
+ /// 闀垮害
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "闀垮害")]
public int Length { get; set; }
/// <summary>
- ///
+ /// 瀹藉害
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "瀹藉害")]
public int Width { get; set; }
/// <summary>
- ///
+ /// 楂樺害
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "楂樺害")]
public int Height { get; set; }
/// <summary>
- ///
+ /// 鐘舵��
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "鐘舵��")]
public int Enbale { get; set; }
/// <summary>
- ///
+ /// 浠撳簱缂栧彿
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "浠撳簱缂栧彿")]
public int WarehouseId { get; set; }
/// <summary>
- ///
+ /// 鎵�灞炲眰
/// </summary>
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵�灞炲眰")]
public string SortNum { get; set; }
+
+ /// <summary>
+ /// 鍗犵敤璐т綅鏁�
+ /// </summary>
+ [SugarColumn(IsNullable = false, ColumnDescription = "鍗犵敤璐т綅鏁�")]
+ public int LocaitonCount { get; set; }
+
+ /// <summary>
+ /// 澶ф墭鐩樻槸鍚︽斁濂囨暟鍒�
+ /// </summary>
+ [SugarColumn(IsNullable = false, ColumnDescription = "澶ф墭鐩樻槸鍚︽斁濂囨暟鍒�")]
+ public bool IsOdd { get; set; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_UserInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_UserInfo.cs"
index c6f027f..5e5066e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_UserInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_UserInfo.cs"
@@ -8,6 +8,9 @@
namespace WIDESEA_Model.Models
{
+ /// <summary>
+ /// 鍛樺伐淇℃伅
+ /// </summary>
[SugarTable(nameof(Dt_UserInfo), "鍛樺伐淇℃伅")]
public class Dt_UserInfo : BaseEntity
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail_Hty.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail_Hty.cs"
index a23c3d2..34e13aa 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail_Hty.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail_Hty.cs"
@@ -9,73 +9,34 @@
namespace WIDESEA_Model.Models
{
+ /// <summary>
+ /// 鍏ュ簱鍗曟槑缁�
+ /// </summary>
[SugarTable(nameof(Dt_InboundOrderDetail_Hty), "鍏ュ簱鍗曟槑缁�")]
- public class Dt_InboundOrderDetail_Hty : BaseEntity
+ public class Dt_InboundOrderDetail_Hty : Dt_InboundOrderDetail, IBaseHistoryEntity
{
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
- public int Id { get; set; }
-
- [SugarColumn(IsNullable = false, ColumnDescription = "鍏ュ簱鍗曚富閿�")]
- public int OrderId { get; set; }
-
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")]
- public string MaterielCode { get; set; }
-
- [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")]
- public string MaterielName { get; set; }
-
- [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鎵规鍙�")]
- public string BatchNo { get; set; }
-
- [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "鍗曟嵁鏁伴噺")]
- public decimal OrderQuantity { get; set; }
-
- [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "缁勭洏鏁伴噺", DefaultValue = "0")]
- public decimal ReceiptQuantity { get; set; }
-
- [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "涓婃灦鏁伴噺", DefaultValue = "0")]
- public decimal OverInQuantity { get; set; }
-
- [SugarColumn(IsNullable = false, ColumnDescription = "璁㈠崟鏄庣粏鐘舵��")]
- public int OrderDetailStatus { get; set; }
-
- [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")]
- public string Remark { get; set; }
- [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "婧愪富閿�")]
+ /// <summary>
+ /// 鍘熻〃涓婚敭
+ /// </summary>
+ [ImporterHeader(Name = "鍘熻〃涓婚敭")]
+ [ExporterHeader(DisplayName = "鍘熻〃涓婚敭")]
+ [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "鍘熻〃涓婚敭")]
public int SourceId { get; set; }
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "澶囨敞")]
+ /// <summary>
+ /// 鎿嶄綔绫诲瀷
+ /// </summary>
+ [ImporterHeader(Name = "鎿嶄綔绫诲瀷")]
+ [ExporterHeader(DisplayName = "鎿嶄綔绫诲瀷")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎿嶄綔绫诲瀷")]
public string OperateType { get; set; }
- /// <summary>
- /// 鍒涘缓浜�
- /// </summary>
- [ImporterHeader(Name = "鍒涘缓浜�")]
- [ExporterHeader(DisplayName = "鍒涘缓浜�")]
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍒涘缓浜�")]
- public string Creater { get; set; }
/// <summary>
- /// 鍒涘缓鏃堕棿
+ /// 绉诲叆鍘嗗彶鏃堕棿
/// </summary>
- [ImporterHeader(Name = "鍒涘缓鏃堕棿")]
- [ExporterHeader(DisplayName = "鍒涘缓鏃堕棿")]
- [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏃堕棿")]
- public DateTime CreateDate { get; set; } = DateTime.Now;
-
- /// <summary>
- /// 鏇存柊鑰�
- /// </summary>
- [ImporterHeader(Name = "淇敼浜�")]
- [ExporterHeader(DisplayName = "淇敼浜�")]
- [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "淇敼浜�")]
- public string Modifier { get; set; }
-
- /// <summary>
- /// 淇敼鏃ユ湡
- /// </summary>
- [ImporterHeader(Name = "淇敼鏃ユ湡")]
- [ExporterHeader(DisplayName = "淇敼鏃ユ湡")]
- [SugarColumn(IsNullable = true, ColumnDescription = "淇敼鏃ユ湡")]
- public DateTime? ModifyDate { get; set; }
+ [ImporterHeader(Name = "绉诲叆鍘嗗彶鏃堕棿")]
+ [ExporterHeader(DisplayName = "绉诲叆鍘嗗彶鏃堕棿")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "绉诲叆鍘嗗彶鏃堕棿")]
+ public DateTime InsertTime { get; set; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrder_Hty.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrder_Hty.cs"
index e5df887..2442f67 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrder_Hty.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrder_Hty.cs"
@@ -12,95 +12,33 @@
namespace WIDESEA_Model.Models
{
/// <summary>
- ///
+ /// 鍏ュ簱鍗曞巻鍙�
/// </summary>
[SugarTable(nameof(Dt_InboundOrder_Hty), "鍏ュ簱鍗曞巻鍙�")]
- public class Dt_InboundOrder_Hty
+ public class Dt_InboundOrder_Hty : Dt_InboundOrder, IBaseHistoryEntity
{
/// <summary>
- ///
+ /// 鍘熻〃涓婚敭
/// </summary>
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
- public int Id { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿")]
- public string OrderNo { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "涓婃父鍗曟嵁缂栧彿")]
- public string UpperOrderNo { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁绫诲瀷")]
- public int OrderType { get; set; }
-
- /// <summary>
- /// 鍗曟嵁鐘舵��
- /// </summary>
- [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鐘舵��")]
- public int OrderStatus { get; set; }
-
- /// <summary>
- /// 鍒涘缓鏂瑰紡
- /// </summary>
- [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏂瑰紡")]
- public int CreateType { get; set; }
-
- /// <summary>
- /// 澶囨敞
- /// </summary>
- [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "澶囨敞")]
- public string Remark { get; set; }
-
- /// <summary>
- /// 婧愪富閿�
- /// </summary>
- [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "婧愪富閿�")]
+ [ImporterHeader(Name = "鍘熻〃涓婚敭")]
+ [ExporterHeader(DisplayName = "鍘熻〃涓婚敭")]
+ [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "鍘熻〃涓婚敭")]
public int SourceId { get; set; }
/// <summary>
/// 鎿嶄綔绫诲瀷
/// </summary>
+ [ImporterHeader(Name = "鎿嶄綔绫诲瀷")]
+ [ExporterHeader(DisplayName = "鎿嶄綔绫诲瀷")]
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎿嶄綔绫诲瀷")]
public string OperateType { get; set; }
/// <summary>
- /// 鍒涘缓浜�
+ /// 绉诲叆鍘嗗彶鏃堕棿
/// </summary>
- [ImporterHeader(Name = "鍒涘缓浜�")]
- [ExporterHeader(DisplayName = "鍒涘缓浜�")]
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍒涘缓浜�")]
- public string Creater { get; set; }
-
- /// <summary>
- /// 鍒涘缓鏃堕棿
- /// </summary>
- [ImporterHeader(Name = "鍒涘缓鏃堕棿")]
- [ExporterHeader(DisplayName = "鍒涘缓鏃堕棿")]
- [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏃堕棿")]
- public DateTime CreateDate { get; set; } = DateTime.Now;
-
- /// <summary>
- /// 鏇存柊鑰�
- /// </summary>
- [ImporterHeader(Name = "淇敼浜�")]
- [ExporterHeader(DisplayName = "淇敼浜�")]
- [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "淇敼浜�")]
- public string Modifier { get; set; }
-
- /// <summary>
- /// 淇敼鏃ユ湡
- /// </summary>
- [ImporterHeader(Name = "淇敼鏃ユ湡")]
- [ExporterHeader(DisplayName = "淇敼鏃ユ湡")]
- [SugarColumn(IsNullable = true, ColumnDescription = "淇敼鏃ユ湡")]
- public DateTime? ModifyDate { get; set; }
+ [ImporterHeader(Name = "绉诲叆鍘嗗彶鏃堕棿")]
+ [ExporterHeader(DisplayName = "绉诲叆鍘嗗彶鏃堕棿")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "绉诲叆鍘嗗彶鏃堕棿")]
+ public DateTime InsertTime { get; set; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_PurchaseOrder.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_PurchaseOrder.cs"
index f5691b5..52c9f66 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_PurchaseOrder.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_PurchaseOrder.cs"
@@ -10,7 +10,7 @@
namespace WIDESEA_Model.Models
{
/// <summary>
- ///
+ /// 閲囪喘鍗�
/// </summary>
[SugarTable(nameof(Dt_PurchaseOrder), "閲囪喘鍗�"), ModelValidate]
public class Dt_PurchaseOrder : BaseEntity
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesOutboundOrder.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesOutboundOrder.cs"
new file mode 100644
index 0000000..235c50e
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesOutboundOrder.cs"
@@ -0,0 +1,116 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.Attributes;
+using WIDESEA_Core.CodeConfigEnum;
+using WIDESEA_Core.DB.Models;
+
+namespace WIDESEA_Model.Models
+{
+ /// <summary>
+ ///
+ /// </summary>
+ [SugarTable(nameof(Dt_MesOutboundOrder))]
+ public class Dt_MesOutboundOrder : 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>
+ [CodeRule(RuleCodeEnum.OutboundOrderRule)]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿", IsOnlyIgnoreUpdate = true)]
+ public string OrderNo { get; set; }
+
+ /// <summary>
+ /// 浠诲姟鍗曞彿
+ /// </summary>
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "浠诲姟鍗曞彿")]
+ public string TaskNo { get; set; }
+
+ /// <summary>
+ /// 鍗曟嵁绫诲瀷
+ /// </summary>
+ [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁绫诲瀷", IsOnlyIgnoreUpdate = true)]
+ public int OrderType { get; set; }
+
+ /// <summary>
+ /// 鍗曟嵁鐘舵��
+ /// </summary>
+ [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鐘舵��")]
+ public int OrderStatus { get; set; }
+
+ /// <summary>
+ /// 鍒涘缓鏂瑰紡
+ /// </summary>
+ [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏂瑰紡", IsOnlyIgnoreUpdate = true)]
+ public int CreateType { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡缂栧彿
+ /// </summary>
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")]
+ public string MaterialCode { get; set; }
+
+ /// <summary>
+ /// 鐗╂枡鍚嶇О
+ /// </summary>
+ [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")]
+ public string MaterialName { get; set; }
+
+ /// <summary>
+ /// 鍗曚綅
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "鍗曚綅")]
+ public string Unit { get; set; }
+
+ /// <summary>
+ /// 鍗曟嵁鏁伴噺
+ /// </summary>
+ [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鏁伴噺")]
+ public float OrderQuantity { get; set; }
+
+ /// <summary>
+ /// 閿佸畾鏁伴噺
+ /// </summary>
+ [SugarColumn(IsNullable = false, ColumnDescription = "閿佸畾鏁伴噺", DefaultValue = "0")]
+ public float LockQuantity { get; set; }
+
+ /// <summary>
+ /// 宸插嚭鏁伴噺
+ /// </summary>
+ [SugarColumn(IsNullable = false, ColumnDescription = "宸插嚭鏁伴噺", DefaultValue = "0")]
+ public float OverOutQuantity { get; set; }
+
+ /// <summary>
+ /// 绾夸綋
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "绾夸綋")]
+ public string Line { get; set; }
+
+ /// <summary>
+ /// 绾胯竟浠撳湴鍧�鐮�
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "绾胯竟浠撳湴鍧�鐮�")]
+ public string TargetAddressCode { get; set; }
+
+ /// <summary>
+ /// 瑁佸垏瀹�
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "瑁佸垏瀹�")]
+ public float Width { get; set; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs"
index d192ad4..190c8ae 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs"
@@ -42,7 +42,7 @@
/// <summary>
/// 鎵规鍙�
/// </summary>
- [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鎵规鍙�")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵规鍙�")]
public string BatchNo { get; set; }
/// <summary>
@@ -84,7 +84,7 @@
/// <summary>
/// 璐т綅缂栧彿
/// </summary>
- [SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "璐т綅缂栧彿")]
+ [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "璐т綅缂栧彿")]
public string LocationCode { get; set; }
/// <summary>
@@ -92,7 +92,11 @@
/// </summary>
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵樼洏缂栧彿")]
public string PalletCode { get; set; }
-
+ /// <summary>
+ /// 鍗曚綅
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "鍗曚綅")]
+ public string Unit { get; set; }
/// <summary>
/// 浠诲姟鍙�
/// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs"
index cb46215..c5aff01 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs"
@@ -58,23 +58,24 @@
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏂瑰紡", IsOnlyIgnoreUpdate = true)]
public int CreateType { get; set; }
+
/// <summary>
/// 閮ㄩ棬缂栧彿
/// </summary>
[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "閮ㄩ棬缂栧彿")]
public string DepartmentCode { get; set; }
+
/// <summary>
/// 閮ㄩ棬鍚嶇О
/// </summary>
[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "閮ㄩ棬鍚嶇О")]
public string DepartmentName { get; set; }
+
/// <summary>
/// 澶囨敞
/// </summary>
[SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "澶囨敞")]
public string Remark { get; set; }
-
-
/// <summary>
/// 鍑哄簱鍗曟槑缁�
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail.cs"
index e5b4711..78a2c67 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail.cs"
@@ -41,7 +41,7 @@
/// <summary>
/// 鎵规鍙�
/// </summary>
- [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "鎵规鍙�")]
+ [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鎵规鍙�")]
public string BatchNo { get; set; }
/// <summary>
@@ -73,7 +73,11 @@
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "璁㈠崟鏄庣粏鐘舵��")]
public int OrderDetailStatus { get; set; }
-
+ /// <summary>
+ /// 鍗曚綅
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "鍗曚綅")]
+ public string Unit { get; set; }
/// <summary>
/// 澶囨敞
/// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail_Hty.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail_Hty.cs"
index 996da79..01d46d6 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail_Hty.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail_Hty.cs"
@@ -13,109 +13,30 @@
///
/// </summary>
[SugarTable(nameof(Dt_OutboundOrderDetail_Hty), "鍑哄簱鍗曟槑缁�")]
- public class Dt_OutboundOrderDetail_Hty
+ public class Dt_OutboundOrderDetail_Hty : Dt_OutboundOrderDetail, IBaseHistoryEntity
{
/// <summary>
- ///
+ /// 鍘熻〃涓婚敭
/// </summary>
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
- public int Id { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鍗曚富閿�")]
- public int OrderId { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")]
- public string MaterielCode { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")]
- public string MaterielName { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鎵规鍙�")]
- public string BatchNo { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "鍗曟嵁鏁伴噺")]
- public decimal OrderQuantity { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "閿佸畾鏁伴噺", DefaultValue = "0")]
- public decimal LockQuantity { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "宸插嚭鏁伴噺", DefaultValue = "0")]
- public decimal OverOutQuantity { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = false, ColumnDescription = "璁㈠崟鏄庣粏鐘舵��")]
- public int OrderDetailStatus { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")]
- public string Remark { get; set; }
-
- /// <summary>
- ///
- /// </summary>
- [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "婧愪富閿�")]
+ [ImporterHeader(Name = "鍘熻〃涓婚敭")]
+ [ExporterHeader(DisplayName = "鍘熻〃涓婚敭")]
+ [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "鍘熻〃涓婚敭")]
public int SourceId { get; set; }
/// <summary>
- ///
+ /// 鎿嶄綔绫诲瀷
/// </summary>
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "澶囨敞")]
+ [ImporterHeader(Name = "鎿嶄綔绫诲瀷")]
+ [ExporterHeader(DisplayName = "鎿嶄綔绫诲瀷")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎿嶄綔绫诲瀷")]
public string OperateType { get; set; }
- /// <summary>
- /// 鍒涘缓浜�
- /// </summary>
- [ImporterHeader(Name = "鍒涘缓浜�")]
- [ExporterHeader(DisplayName = "鍒涘缓浜�")]
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍒涘缓浜�")]
- public string Creater { get; set; }
/// <summary>
- /// 鍒涘缓鏃堕棿
+ /// 绉诲叆鍘嗗彶鏃堕棿
/// </summary>
- [ImporterHeader(Name = "鍒涘缓鏃堕棿")]
- [ExporterHeader(DisplayName = "鍒涘缓鏃堕棿")]
- [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏃堕棿")]
- public DateTime CreateDate { get; set; } = DateTime.Now;
-
- /// <summary>
- /// 鏇存柊鑰�
- /// </summary>
- [ImporterHeader(Name = "淇敼浜�")]
- [ExporterHeader(DisplayName = "淇敼浜�")]
- [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "淇敼浜�")]
- public string Modifier { get; set; }
-
- /// <summary>
- /// 淇敼鏃ユ湡
- /// </summary>
- [ImporterHeader(Name = "淇敼鏃ユ湡")]
- [ExporterHeader(DisplayName = "淇敼鏃ユ湡")]
- [SugarColumn(IsNullable = true, ColumnDescription = "淇敼鏃ユ湡")]
- public DateTime? ModifyDate { get; set; }
+ [ImporterHeader(Name = "绉诲叆鍘嗗彶鏃堕棿")]
+ [ExporterHeader(DisplayName = "绉诲叆鍘嗗彶鏃堕棿")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "绉诲叆鍘嗗彶鏃堕棿")]
+ public DateTime InsertTime { get; set; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder_Hty.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder_Hty.cs"
index 621f32f..c53b331 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder_Hty.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder_Hty.cs"
@@ -11,66 +11,34 @@
namespace WIDESEA_Model.Models
{
+ /// <summary>
+ ///
+ /// </summary>
[SugarTable(nameof(Dt_OutboundOrder_Hty), "鍑哄簱鍗�")]
- public class Dt_OutboundOrder_Hty
+ public class Dt_OutboundOrder_Hty : Dt_OutboundOrder, IBaseHistoryEntity
{
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
- public int Id { get; set; }
-
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿", IsOnlyIgnoreUpdate = true)]
- public string OrderNo { get; set; }
-
- [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "涓婃父鍗曟嵁缂栧彿", IsOnlyIgnoreUpdate = true)]
- public string UpperOrderNo { get; set; }
-
- [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁绫诲瀷", IsOnlyIgnoreUpdate = true)]
- public int OrderType { get; set; }
-
- [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鐘舵��")]
- public int OrderStatus { get; set; }
-
- [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏂瑰紡", IsOnlyIgnoreUpdate = true)]
- public int CreateType { get; set; }
-
- [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "澶囨敞")]
- public string Remark { get; set; }
-
- [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "婧愪富閿�")]
+ /// <summary>
+ /// 鍘熻〃涓婚敭
+ /// </summary>
+ [ImporterHeader(Name = "鍘熻〃涓婚敭")]
+ [ExporterHeader(DisplayName = "鍘熻〃涓婚敭")]
+ [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "鍘熻〃涓婚敭")]
public int SourceId { get; set; }
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "澶囨敞")]
-
+ /// <summary>
+ /// 鎿嶄綔绫诲瀷
+ /// </summary>
+ [ImporterHeader(Name = "鎿嶄綔绫诲瀷")]
+ [ExporterHeader(DisplayName = "鎿嶄綔绫诲瀷")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎿嶄綔绫诲瀷")]
public string OperateType { get; set; }
- /// <summary>
- /// 鍒涘缓浜�
- /// </summary>
- [ImporterHeader(Name = "鍒涘缓浜�")]
- [ExporterHeader(DisplayName = "鍒涘缓浜�")]
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍒涘缓浜�")]
- public string Creater { get; set; }
/// <summary>
- /// 鍒涘缓鏃堕棿
+ /// 绉诲叆鍘嗗彶鏃堕棿
/// </summary>
- [ImporterHeader(Name = "鍒涘缓鏃堕棿")]
- [ExporterHeader(DisplayName = "鍒涘缓鏃堕棿")]
- [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏃堕棿")]
- public DateTime CreateDate { get; set; } = DateTime.Now;
-
- /// <summary>
- /// 鏇存柊鑰�
- /// </summary>
- [ImporterHeader(Name = "淇敼浜�")]
- [ExporterHeader(DisplayName = "淇敼浜�")]
- [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "淇敼浜�")]
- public string Modifier { get; set; }
-
- /// <summary>
- /// 淇敼鏃ユ湡
- /// </summary>
- [ImporterHeader(Name = "淇敼鏃ユ湡")]
- [ExporterHeader(DisplayName = "淇敼鏃ユ湡")]
- [SugarColumn(IsNullable = true, ColumnDescription = "淇敼鏃ユ湡")]
- public DateTime? ModifyDate { get; set; }
+ [ImporterHeader(Name = "绉诲叆鍘嗗彶鏃堕棿")]
+ [ExporterHeader(DisplayName = "绉诲叆鍘嗗彶鏃堕棿")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "绉诲叆鍘嗗彶鏃堕棿")]
+ public DateTime InsertTime { get; set; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs"
index b385f73..82096fc 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs"
@@ -9,81 +9,34 @@
namespace WIDESEA_Model.Models
{
- [SugarTable(nameof(Dt_StockInfoDetail_Hty), "搴撳瓨淇℃伅鏄庣粏")]
- public class Dt_StockInfoDetail_Hty
+ /// <summary>
+ /// 搴撳瓨淇℃伅鏄庣粏鍘嗗彶
+ /// </summary>
+ [SugarTable(nameof(Dt_StockInfoDetail_Hty), "搴撳瓨淇℃伅鏄庣粏鍘嗗彶")]
+ public class Dt_StockInfoDetail_Hty : Dt_StockInfoDetail, IBaseHistoryEntity
{
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
- public int Id { get; set; }
-
- [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨淇℃伅涓婚敭")]
- public int StockId { get; set; }
-
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")]
- public string MaterielCode { get; set; }
-
- [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")]
- public string MaterielName { get; set; }
-
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿")]
- public string OrderNo { get; set; }
-
- [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鎵规鍙�")]
- public string BatchNo { get; set; }
-
- [SugarColumn(IsNullable = false, Length = 100, ColumnDescription = "搴忓垪鍙�")]
- public string SerialNumber { get; set; }
-
- [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨鏁伴噺")]
- public decimal StockQuantity { get; set; }
-
- [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鏁伴噺", DefaultValue = "0")]
- public decimal OutboundQuantity { get; set; }
-
- [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨鏄庣粏鐘舵��")]
- public int Status { get; set; }
-
- [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")]
- public string Remark { get; set; }
-
- [Navigate(NavigateType.OneToOne, nameof(Dt_StockQuantityChangeRecord.StockDetailId), nameof(Id))]
- public Dt_StockQuantityChangeRecord StockQuantityChangeRecord { get; set; }
-
-
- [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "婧愪富閿�")]
+ /// <summary>
+ /// 鍘熻〃涓婚敭
+ /// </summary>
+ [ImporterHeader(Name = "鍘熻〃涓婚敭")]
+ [ExporterHeader(DisplayName = "鍘熻〃涓婚敭")]
+ [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "鍘熻〃涓婚敭")]
public int SourceId { get; set; }
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "澶囨敞")]
+ /// <summary>
+ /// 鎿嶄綔绫诲瀷
+ /// </summary>
+ [ImporterHeader(Name = "鎿嶄綔绫诲瀷")]
+ [ExporterHeader(DisplayName = "鎿嶄綔绫诲瀷")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎿嶄綔绫诲瀷")]
public string OperateType { get; set; }
- /// <summary>
- /// 鍒涘缓浜�
- /// </summary>
- [ImporterHeader(Name = "鍒涘缓浜�")]
- [ExporterHeader(DisplayName = "鍒涘缓浜�")]
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍒涘缓浜�")]
- public string Creater { get; set; }
/// <summary>
- /// 鍒涘缓鏃堕棿
+ /// 绉诲叆鍘嗗彶鏃堕棿
/// </summary>
- [ImporterHeader(Name = "鍒涘缓鏃堕棿")]
- [ExporterHeader(DisplayName = "鍒涘缓鏃堕棿")]
- [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏃堕棿")]
- public DateTime CreateDate { get; set; } = DateTime.Now;
-
- /// <summary>
- /// 鏇存柊鑰�
- /// </summary>
- [ImporterHeader(Name = "淇敼浜�")]
- [ExporterHeader(DisplayName = "淇敼浜�")]
- [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "淇敼浜�")]
- public string Modifier { get; set; }
-
- /// <summary>
- /// 淇敼鏃ユ湡
- /// </summary>
- [ImporterHeader(Name = "淇敼鏃ユ湡")]
- [ExporterHeader(DisplayName = "淇敼鏃ユ湡")]
- [SugarColumn(IsNullable = true, ColumnDescription = "淇敼鏃ユ湡")]
- public DateTime? ModifyDate { get; set; }
+ [ImporterHeader(Name = "绉诲叆鍘嗗彶鏃堕棿")]
+ [ExporterHeader(DisplayName = "绉诲叆鍘嗗彶鏃堕棿")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "绉诲叆鍘嗗彶鏃堕棿")]
+ public DateTime InsertTime { get; set; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs"
index 1662516..00a0f08 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs"
@@ -9,62 +9,34 @@
namespace WIDESEA_Model.Models
{
+ /// <summary>
+ /// 搴撳瓨淇℃伅鍘嗗彶
+ /// </summary>
[SugarTable(nameof(Dt_StockInfo_Hty), "搴撳瓨淇℃伅")]
- public class Dt_StockInfo_Hty
+ public class Dt_StockInfo_Hty : Dt_StockInfo, IBaseHistoryEntity
{
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
- public int Id { get; set; }
-
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵樼洏缂栧彿")]
- public string PalletCode { get; set; }
-
- [SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "璐т綅缂栧彿")]
- public string LocationCode { get; set; }
-
- [SugarColumn(IsNullable = false, ColumnDescription = "鏄惁婊$洏", DefaultValue = "0")]
- public bool IsFull { get; set; }
-
- [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨鐘舵��")]
- public int StockStatus { get; set; }
-
- [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")]
- public string Remark { get; set; }
-
- [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "婧愪富閿�")]
+ /// <summary>
+ /// 鍘熻〃涓婚敭
+ /// </summary>
+ [ImporterHeader(Name = "鍘熻〃涓婚敭")]
+ [ExporterHeader(DisplayName = "鍘熻〃涓婚敭")]
+ [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "鍘熻〃涓婚敭")]
public int SourceId { get; set; }
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "澶囨敞")]
+ /// <summary>
+ /// 鎿嶄綔绫诲瀷
+ /// </summary>
+ [ImporterHeader(Name = "鎿嶄綔绫诲瀷")]
+ [ExporterHeader(DisplayName = "鎿嶄綔绫诲瀷")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎿嶄綔绫诲瀷")]
public string OperateType { get; set; }
- /// <summary>
- /// 鍒涘缓浜�
- /// </summary>
- [ImporterHeader(Name = "鍒涘缓浜�")]
- [ExporterHeader(DisplayName = "鍒涘缓浜�")]
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍒涘缓浜�")]
- public string Creater { get; set; }
/// <summary>
- /// 鍒涘缓鏃堕棿
+ /// 绉诲叆鍘嗗彶鏃堕棿
/// </summary>
- [ImporterHeader(Name = "鍒涘缓鏃堕棿")]
- [ExporterHeader(DisplayName = "鍒涘缓鏃堕棿")]
- [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏃堕棿")]
- public DateTime CreateDate { get; set; } = DateTime.Now;
-
- /// <summary>
- /// 鏇存柊鑰�
- /// </summary>
- [ImporterHeader(Name = "淇敼浜�")]
- [ExporterHeader(DisplayName = "淇敼浜�")]
- [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "淇敼浜�")]
- public string Modifier { get; set; }
-
- /// <summary>
- /// 淇敼鏃ユ湡
- /// </summary>
- [ImporterHeader(Name = "淇敼鏃ユ湡")]
- [ExporterHeader(DisplayName = "淇敼鏃ユ湡")]
- [SugarColumn(IsNullable = true, ColumnDescription = "淇敼鏃ユ湡")]
- public DateTime? ModifyDate { get; set; }
+ [ImporterHeader(Name = "绉诲叆鍘嗗彶鏃堕棿")]
+ [ExporterHeader(DisplayName = "绉诲叆鍘嗗彶鏃堕棿")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "绉诲叆鍘嗗彶鏃堕棿")]
+ public DateTime InsertTime { get; set; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Log.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Log.cs"
index 8c15781..a2d31ba 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Log.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Log.cs"
@@ -8,6 +8,9 @@
namespace WIDESEA_Model.Models
{
+ /// <summary>
+ /// 鎺ュ彛鏃ュ織
+ /// </summary>
[SugarTable(nameof(Sys_Log), "鎺ュ彛鏃ュ織")]
public class Sys_Log
{
@@ -34,12 +37,6 @@
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "缁撴潫鏃堕棿")]
public DateTime EndDate { get; set; }
-
- /// <summary>
- /// 鏃ュ織绫诲瀷
- /// </summary>
- //[SugarColumn(IsNullable = true, ColumnDescription = "鏃ュ織绫诲瀷")]
- //public DateTime LogType { get; set; }
/// <summary>
/// 璇锋眰鍙傛暟
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs"
index b69fc0c..f903756 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs"
@@ -11,6 +11,9 @@
namespace WIDESEA_Model.Models
{
+ /// <summary>
+ /// 浠诲姟淇℃伅鍘嗗彶
+ /// </summary>
[SugarTable(nameof(Dt_Task_Hty), "浠诲姟淇℃伅鍘嗗彶")]
public class Dt_Task_Hty : Dt_Task, IBaseHistoryEntity
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/WIDESEA_Model.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/WIDESEA_Model.csproj"
index f1d8179..efb20bf 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/WIDESEA_Model.csproj"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/WIDESEA_Model.csproj"
@@ -1,18 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- </PropertyGroup>
+ <PropertyGroup>
+ <TargetFramework>net6.0</TargetFramework>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ <GenerateDocumentationFile>True</GenerateDocumentationFile>
+ </PropertyGroup>
- <ItemGroup>
- <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
- </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
+ </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\WIDESEA_Common\WIDESEA_Common.csproj" />
- <ProjectReference Include="..\WIDESEA_Core\WIDESEA_Core.csproj" />
- </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\WIDESEA_Common\WIDESEA_Common.csproj" />
+ <ProjectReference Include="..\WIDESEA_Core\WIDESEA_Core.csproj" />
+ </ItemGroup>
</Project>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesOutboundOrderRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesOutboundOrderRepository.cs"
new file mode 100644
index 0000000..276f503
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/MesOutboundOrderRepository.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_IOutboundRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_OutboundRepository
+{
+ public class MesOutboundOrderRepository : RepositoryBase<Dt_MesOutboundOrder>, IMesOutboundOrderRepository
+ {
+ public MesOutboundOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
+ {
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesOutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesOutboundOrderService.cs"
new file mode 100644
index 0000000..fa7fd73
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/MesOutboundOrderService.cs"
@@ -0,0 +1,144 @@
+锘�
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_DTO.ERP;
+using WIDESEA_DTO.MES;
+using WIDESEA_DTO;
+using WIDESEA_IOutboundRepository;
+using WIDESEA_IOutboundService;
+using WIDESEA_Model.Models;
+using WIDESEA_Common.OrderEnum;
+using WIDESEA_Core.Helper;
+using WIDESEA_IBasicRepository;
+using WIDESEA_Common.WareHouseEnum;
+using WIDESEA_Core;
+using WIDESEA_IStockService;
+using WIDESEA_IBasicService;
+using WIDESEA_Common.LocationEnum;
+using WIDESEA_IRecordService;
+
+namespace WIDESEA_OutboundService
+{
+ public class MesOutboundOrderService : ServiceBase<Dt_MesOutboundOrder, IMesOutboundOrderRepository>, IMesOutboundOrderService
+ {
+ private readonly IBasicRepository _basicRepository;
+ private readonly IStockService _stockService;
+ private readonly IOutStockLockInfoService _outStockLockInfoService;
+ private readonly IBasicService _basicService;
+ private readonly IRecordService _recordService;
+
+ public IMesOutboundOrderRepository Repository => BaseDal;
+
+ public MesOutboundOrderService(IMesOutboundOrderRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal)
+ {
+ _basicRepository = basicRepository;
+ _stockService = stockService;
+ _outStockLockInfoService = outStockLockInfoService;
+ _basicService = basicService;
+ _recordService = recordService;
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="mesOutboundOrder"></param>
+ /// <returns></returns>
+ /// <exception cref="Exception"></exception>
+ public (List<Dt_StockInfo>, Dt_MesOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesOutboundOrder mesOutboundOrder)
+ {
+ List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>();
+
+ List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>();
+ List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
+
+ float originalNeedQuantity = mesOutboundOrder.OrderQuantity;
+
+ float needQuantity = originalNeedQuantity;
+
+ List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(mesOutboundOrder.MaterialCode, "", mesOutboundOrder.WarehouseId);
+ if (!stockInfos.Any())
+ {
+ throw new Exception($"鏈壘鍒板彲鍒嗛厤搴撳瓨");
+ }
+ List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, mesOutboundOrder.MaterialCode, needQuantity, out float residueQuantity);
+ mesOutboundOrder.LockQuantity += needQuantity - residueQuantity;
+ outStocks.AddRange(autoAssignStocks);
+ float assignQuantity = needQuantity - residueQuantity;
+
+ float orderQuantity = mesOutboundOrder.OrderQuantity;
+ for (int j = 0; j < autoAssignStocks.Count; j++)
+ {
+ float detailAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesOutboundOrder.MaterialCode).Sum(x => x.AssignQuantity);//鍑哄簱璁㈠崟鏄庣粏宸插垎閰嶆暟閲�
+
+ float palletAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesOutboundOrder.MaterialCode && x.PalletCode == autoAssignStocks[j].PalletCode).Sum(x => x.AssignQuantity);//鍑哄簱璇︽儏宸插垎閰嶆暟閲�
+
+ float palletOutboundQuantity = autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity);
+ if (palletAssignQuantity < palletOutboundQuantity)//濡傛灉鍑哄簱璇︽儏宸插垎閰嶆暟閲忓皬浜庢墭鐩樺凡鍒嗛厤鏁伴噺锛屽垯鍙互缁х画娣诲姞璇ユ墭鐩樺嚭搴撲俊鎭�
+ {
+ float orderDetailNeedQuantity = mesOutboundOrder.OrderQuantity - detailAssignQuantity;
+ if (orderDetailNeedQuantity > autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity)
+ {
+ mesOutboundOrder.LockQuantity += autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity;
+ Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesOutboundOrder, autoAssignStocks[j], autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity);
+ outStockLockInfos.Add(outStockLockInfo);
+ }
+ else
+ {
+ Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesOutboundOrder, autoAssignStocks[j], mesOutboundOrder.OrderQuantity - mesOutboundOrder.LockQuantity);
+ outStockLockInfos.Add(outStockLockInfo);
+ mesOutboundOrder.LockQuantity = mesOutboundOrder.OrderQuantity;
+ break;
+ }
+ }
+ }
+ locationInfos.AddRange(_basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList()));
+
+ return (outStocks, mesOutboundOrder, outStockLockInfos, locationInfos);
+ }
+
+ public WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null)
+ {
+ try
+ {
+ _stockService.StockInfoService.Repository.UpdateData(stockInfos);
+ List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
+ foreach (var item in stockInfos)
+ {
+ stockInfoDetails.AddRange(item.Details);
+ }
+ _stockService.StockInfoDetailService.Repository.UpdateData(stockInfoDetails);
+
+ 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);
+ }
+
+ _recordService.LocationStatusChangeRecordSetvice.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);
+ }
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
index e5d85bc..d4e21aa 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -66,7 +66,7 @@
PalletCode = outStock.PalletCode,
AssignQuantity = assignQuantity,
MaterielCode = outboundOrderDetail.MaterielCode,
- BatchNo = outboundOrderDetail.BatchNo,
+ BatchNo = outboundOrderDetail.BatchNo ?? outStock.Details.FirstOrDefault()?.BatchNo,
LocationCode = outStock.LocationCode,
MaterielName = outboundOrderDetail.MaterielName,
OrderDetailId = outboundOrderDetail.Id,
@@ -76,7 +76,32 @@
Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(),
StockId = outStock.Id,
TaskNum = taskNum,
- OrderQuantity = outboundOrderDetail.OrderQuantity
+ OrderQuantity = outboundOrderDetail.OrderQuantity,
+ Unit=outboundOrderDetail.Unit,
+ };
+
+ return outStockLockInfo;
+ }
+
+ public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesOutboundOrder mesOutboundOrder, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null)
+ {
+
+ Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo()
+ {
+ PalletCode = outStock.PalletCode,
+ AssignQuantity = assignQuantity,
+ MaterielCode = mesOutboundOrder.MaterialCode,
+ BatchNo = outStock.Details.FirstOrDefault()?.BatchNo ?? "",
+ LocationCode = outStock.LocationCode,
+ MaterielName = mesOutboundOrder.MaterialName,
+ OrderDetailId = mesOutboundOrder.Id,
+ OrderNo = mesOutboundOrder.OrderNo,
+ OrderType = mesOutboundOrder.OrderType,
+ OriginalQuantity = outStock.Details.Where(x => x.MaterielCode == mesOutboundOrder.MaterialCode).Sum(x => x.StockQuantity),
+ Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(),
+ StockId = outStock.Id,
+ TaskNum = taskNum,
+ OrderQuantity = mesOutboundOrder.OrderQuantity
};
return outStockLockInfo;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs"
index 1c3fe6f..5c1ea82 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs"
@@ -283,8 +283,6 @@
locationInfos.AddRange(_basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList()));
}
-
-
return (outStocks, outboundOrderDetails, outStockLockInfos, locationInfos);
}
@@ -399,14 +397,14 @@
List<Dt_OutStockLockInfo> addOutStockLockInfos = outStockLockInfos.Where(x => x.Id == 0).ToList();
if (addOutStockLockInfos != null && addOutStockLockInfos.Any())
{
- if(tasks != null)
+ 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();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
index 010d9b4..b69b804 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
@@ -56,7 +56,19 @@
_invokeERPService = invokeERPService;
_outStockLockInfoService = outStockLockInfoService;
}
-
+ public override WebResponseContent AddData(SaveModel saveModel)
+ {
+ if (saveModel.MainData.TryGetValue(nameof(Dt_OutboundOrder.UpperOrderNo).FirstLetterToLower(), out object? upperOrderNo) && upperOrderNo != null && !string.IsNullOrEmpty(upperOrderNo.ToString()))
+ {
+ Dt_OutboundOrder outboundOrder = BaseDal.QueryFirst(x => x.UpperOrderNo == upperOrderNo.ToString() && x.WarehouseId == Convert.ToInt32(saveModel.MainData[nameof(Dt_OutboundOrder.WarehouseId).FirstLetterToLower()]));
+ if (outboundOrder != null)
+ {
+ return WebResponseContent.Instance.Error($"{upperOrderNo}棰嗘枡鍗曞彿宸插瓨鍦�");
+ }
+ }
+ saveModel.DetailData[0].Add("orderDetailStatus", OrderDetailStatusEnum.New.ObjToInt());
+ return base.AddData(saveModel);
+ }
public WebResponseContent ReceiveOutOrder(ErpOutOrderDTO model)
{
try
@@ -112,6 +124,7 @@
MaterielName = materielInfo.MaterielName,
OrderDetailStatus = OrderDetailStatusEnum.New.ObjToInt(),
OrderQuantity = model.Qty,
+ Unit=materielInfo.MaterielUnit
};
Dt_OutboundOrder outboundOrder = new Dt_OutboundOrder()
{
@@ -181,8 +194,16 @@
ERPIssueModel issueModel = new ERPIssueModel();
List<Dt_StockInfo> stockInfos = new List<Dt_StockInfo>();
List<Dt_OutStockLockInfo> _OutStockLockInfos=new List<Dt_OutStockLockInfo>();
+ if (outboundOrder==null)
+ {
+ return WebResponseContent.Instance.Error("鍑哄簱鍗曚笉瀛樺湪");
+ }
+ if (outboundOrder.CreateType == OrderCreateTypeEnum.CreateInSystem.ObjToInt())
+ {
+ return WebResponseContent.Instance.OK();
+ }
//娴嬭瘯鏋跺簱缁橢RP涓婃姤鍑哄簱瀹屾垚
- if (outStockLockInfos.Count<=0 || outStockLockInfos==null)
+ if (warehouse.WarehouseCode==WarehouseEnum.HA64.ToString())
{
stockInfos = TestOutStocksUpdate(warehouse).Data as List<Dt_StockInfo> ?? new List<Dt_StockInfo>();
List<ERPPickItemModel> eRPOutPick =new List<ERPPickItemModel>();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
index 4b48024..11576a6 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
@@ -9,17 +9,20 @@
{
public class OutboundService : IOutboundService
{
+ public IMesOutboundOrderService MesOutboundOrderService { get; }
+
public IOutboundOrderDetailService OutboundOrderDetailService { get; }
public IOutboundOrderService OutboundOrderService { get; }
public IOutStockLockInfoService OutboundStockLockInfoService { get; }
- public OutboundService(IOutboundOrderDetailService outboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService)
+ public OutboundService(IOutboundOrderDetailService outboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IMesOutboundOrderService mesOutboundOrderService)
{
OutboundOrderDetailService = outboundOrderDetailService;
OutboundOrderService = outboundOrderService;
OutboundStockLockInfoService = outboundStockLockInfoService;
+ MesOutboundOrderService = mesOutboundOrderService;
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs"
index fd0185e..685992d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs"
@@ -28,7 +28,7 @@
{
x.PalleCode = stockInfo.PalletCode;
x.BeforeQuantity = beforeQuantity;
- if (totalQuantity > beforeQuantity)
+ if (totalQuantity >= beforeQuantity)
{
x.ChangeQuantity = stockInfoDetails[index].StockQuantity;
currentQuantity += stockInfoDetails[index].StockQuantity;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs"
index d400d0e..6ecd970 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs"
@@ -13,10 +13,16 @@
public IStockInfoRepository StockInfoRepository { get; }
- public StockRepository(IStockInfoDetailRepository stockInfoDetailRepository, IStockInfoRepository stockInfoRepository)
+ public IStockInfoDetail_HtyRepository StockInfoDetail_HtyRepository { get; }
+
+ public IStockInfo_HtyRepository StockInfo_HtyRepository { get; }
+
+ public StockRepository(IStockInfoDetailRepository stockInfoDetailRepository, IStockInfoRepository stockInfoRepository, IStockInfoDetail_HtyRepository stockInfoDetail_HtyRepository,IStockInfo_HtyRepository stockInfo_HtyRepository)
{
StockInfoDetailRepository = stockInfoDetailRepository;
StockInfoRepository = stockInfoRepository;
+ StockInfoDetail_HtyRepository = stockInfoDetail_HtyRepository;
+ StockInfo_HtyRepository = stockInfo_HtyRepository;
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
index a843426..5348412 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
@@ -8,12 +8,14 @@
using System.Drawing.Printing;
using System.Dynamic;
using System.Linq;
+using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Const;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_Core.Utilities;
@@ -37,84 +39,82 @@
public virtual PageGridData<StockViewDTO> GetPageData(PageDataOptions options)
{
+ List<StockViewDTO> stockViewDTOs = new List<StockViewDTO>();
- //string where = options.ValidatePageOptions(typeof(StockViewDTO).GetProperties());
- //鑾峰彇鎺掑簭瀛楁
- //Dictionary<string, OrderByType> orderbyDic = options.GetPageDataSort(typeof(StockViewDTO).GetProperties());
- //List<OrderByModel> orderByModels = new List<OrderByModel>();
- //foreach (var item in orderbyDic)
- //{
- // OrderByModel orderByModel = new OrderByModel()
- // {
- // FieldName = item.Key,
- // OrderByType = item.Value
- // };
- // orderByModels.Add(orderByModel);
- //}
+ string where = string.Empty;
+ ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Includes(x => x.Details);
+ if (!string.IsNullOrEmpty(options.Wheres))
+ {
+ try
+ {
+ List<SearchParameters> searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
+ if (searchParametersList.Count > 0)
+ {
+ {
+ SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.MaterielCode).FirstLetterToLower());
+ if (searchParameters != null)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.Details.Any(v => v.MaterielCode.Contains(searchParameters.Value)));
+ }
+ }
+
+ {
+ SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.BatchNo).FirstLetterToLower());
+ if (searchParameters != null)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.Details.Any(v => v.BatchNo.Contains(searchParameters.Value)));
+ }
+ }
+
+ }
+
+ }
+ catch { }
+ }
+
+ EntityProperties.ValidatePageOptions(options, ref sugarQueryable1);
+
+ ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>();
+
+ EntityProperties.ValidatePageOptions(options, ref sugarQueryable);
+
+ ISugarQueryable<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).Select((b, a)
+ => new StockViewDTO
+ {
+ LocationCode = b.LocationCode,
+ Column = a.Column,
+ CreateDate = b.CreateDate,
+ Creater = b.Creater,
+ Depth = a.Depth,
+ EnalbeStatus = a.EnableStatus,
+ Layer = a.Layer,
+ LocationName = a.LocationName,
+ LocationStatus = a.LocationStatus,
+ LocationType = a.LocationType,
+ Modifier = b.Modifier,
+ ModifyDate = b.ModifyDate,
+ PalletCode = b.PalletCode,
+ StockRemark = b.Remark,
+ RoadwayNo = a.RoadwayNo,
+ Row = a.Row,
+ StockId = b.Id,
+ StockStatus = b.StockStatus,
+ Details = b.Details,
+ });
+
+
int totalCount = 0;
- ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Includes(x=>x.Details);
- ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>();
-
- List<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).Select((b, a)
- => new StockViewDTO
+ stockViewDTOs = list.ToPageList(options.Page, options.Rows, ref totalCount);
+
+ stockViewDTOs.ForEach(x =>
{
- LocationCode = b.LocationCode,
- Column = a.Column,
- CreateDate = b.CreateDate,
- Creater = b.Creater,
- Depth = a.Depth,
- EnalbeStatus = a.EnableStatus,
- Layer = a.Layer,
- LocationName = a.LocationName,
- LocationStatus = a.LocationStatus,
- LocationType = a.LocationType,
- Modifier = b.Modifier,
- ModifyDate = b.ModifyDate,
- PalletCode = b.PalletCode,
- StockRemark = b.Remark,
- RoadwayNo = a.RoadwayNo,
- Row = a.Row,
- StockId = b.Id,
- StockStatus = b.StockStatus,
- Details = b.Details,
- }).ToPageList(options.Page, options.Rows, ref totalCount);
- list.ForEach(x =>
- {
- x.MaterielCode = string.Join(",", x.Details.Select(x => x.MaterielCode).Distinct());
- x.BatchNo = string.Join(",", x.Details.Select(x => x.BatchNo).Distinct());
- }
- );
- if (options.Wheres.IsNotEmptyOrNull())
- {
- List<SearchParameters> searchParameters = options.Wheres.DeserializeObject<List<SearchParameters>>();
- foreach (var item in searchParameters)
- {
- switch (item.Name)
- {
- case "palletCode":
- list = list.Where(x => x.PalletCode.Contains(item.Value)).ToList();
- break;
- case "locationStatus":
- List<int> locationStatus = item.Value.Split(",").Select(int.Parse).ToList();
- list = list.Where(x => locationStatus.Contains(x.LocationStatus)).ToList();
- break;
- case "stockStatus":
- List<int> stockStatus = item.Value.Split(",").Select(int.Parse).ToList();
- list = list.Where(x => stockStatus.Contains(x.StockStatus)).ToList();
- break;
- case "materielCode":
- list = list.Where(x => x.MaterielCode.Contains(item.Value)).ToList();
- break;
- case "batchNo":
- list=list.Where(x => x.BatchNo.Contains(item.Value)).ToList();
- break;
- default:
- break;
- }
- }
+ x.MaterielCode = string.Join(",", x.Details.Select(x => x.MaterielCode).Distinct());
+ x.BatchNo = string.Join(",", x.Details.Select(x => x.BatchNo).Distinct());
}
- return new PageGridData<StockViewDTO>(totalCount, list);
+ );
+
+ return new PageGridData<StockViewDTO>(totalCount, stockViewDTOs);
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs"
index 87598ea..d8bd020 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs"
@@ -34,9 +34,13 @@
{
}
+ static object lock_taskNum = new object();
public int GetTaskNum(string sequenceName)
{
- return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt();
+ lock (lock_taskNum)
+ {
+ return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt();
+ }
}
public override int AddData(Dt_Task entity)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
index 3d8e7d2..92d02fb 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -23,6 +23,7 @@
using WIDESEA_ITaskInfoRepository;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
+using WIDESEA_Common.OrderEnum;
namespace WIDESEA_TaskInfoService
{
@@ -43,7 +44,7 @@
try
{
Dt_Task exsit = Repository.QueryFirst(x => x.TargetAddress == model.TargetAddressCode);
- if(exsit != null)
+ if (exsit != null)
{
return responseContent.Error($"鐩爣鍦板潃閲嶅");
}
@@ -96,7 +97,7 @@
//鏇存柊搴撳瓨鐘舵��
_stockRepository.StockInfoRepository.UpdateData(stockInfo);
//鏇存柊璐т綅鐘舵��
- _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
+ _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, stockInfo.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
//鏂板缓浠诲姟
BaseDal.AddData(taskOut);
//鍔犲叆璐т綅鍙樺姩璁板綍
@@ -195,7 +196,7 @@
//娓呴櫎搴撳瓨淇℃伅
_unitOfWorkManage.BeginTran();
_stockRepository.StockInfoRepository.DeleteAndMoveIntoHty(stockInfoUpdates, OperateTypeEnum.鑷姩鍒犻櫎);
- _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfoDetails,OperateTypeEnum.鑷姩鍒犻櫎);
+ _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfoDetails, OperateTypeEnum.鑷姩鍒犻櫎);
_unitOfWorkManage.CommitTran();
responseContent.OK($"鎶ュ簾鎴愬姛");
}
@@ -246,5 +247,244 @@
}
return content;
}
+
+ /// <summary>
+ /// 鐗╂枡鍑哄簱锛學MS鍚屾鍑哄簱鐗╂枡鎵规鑷矼ES
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ public WebResponseContent UploadMesMaterialLotaAcept(MesMaterialLotaAceptModel model)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMS_MES_TestToolSync.ToString());
+ MESRoot<MesMaterialLotaAceptModel> root = new MESRoot<MesMaterialLotaAceptModel>()
+ {
+ From = "WMS",
+ DateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
+ Content = model
+ };
+ JsonSerializerSettings settings = new JsonSerializerSettings
+ {
+ ContractResolver = new CamelCasePropertyNamesContractResolver()
+ };
+ string request = JsonConvert.SerializeObject(root, settings);
+ string response = HttpMesHelper.Post(apiInfo.ApiAddress, request);
+ MesResponseContent mesResponseContent = response.DeserializeObject<MesResponseContent>();
+ //璋冪敤鎺ュ彛
+ if (mesResponseContent.BSucc == true)
+ {
+ content.OK(mesResponseContent.StrMsg);
+ }
+ else
+ {
+ content.Error(mesResponseContent.StrMsg);
+ }
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="stockInfo"></param>
+ /// <param name="stockInfoDetail"></param>
+ /// <param name="taskNo"></param>
+ /// <param name="warehouseCode"></param>
+ /// <param name="quantity"></param>
+ /// <param name="cutedType"></param>
+ /// <param name="ppWidth"></param>
+ /// <returns></returns>
+ public MesMaterialLotaAceptModel GetMesMaterialLotaAceptModel(Dt_StockInfo stockInfo, Dt_StockInfoDetail stockInfoDetail, string taskNo, string warehouseCode, float quantity, string cutedType = "", float ppWidth = 0)
+ {
+ MesMaterialLotaAceptModel model = new MesMaterialLotaAceptModel()
+ {
+ CarrierCode = stockInfo.PalletCode,
+ CutedType = cutedType,
+ ExpirationDate = stockInfoDetail.EffectiveDate,
+ MaterialBarCode = stockInfoDetail.SerialNumber,
+ MaterialCode = stockInfoDetail.MaterielCode,
+ MaterialLot = stockInfoDetail.MaterielCode + "," + stockInfoDetail.BatchNo,
+ MaterialName = stockInfoDetail.MaterielName,
+ PPWidth = ppWidth,
+ ProductionDate = stockInfoDetail.ProductionDate,
+ Quantity = quantity,
+ Supplier = "",
+ TaskNo = taskNo,
+ Type = 1,
+ WarehouseArea = warehouseCode,
+ WarehouseLocation = warehouseCode
+ };
+
+ return model;
+ }
+
+ /// <summary>
+ /// 鍩烘澘鍑哄簱
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ public MesResponseContent SubstrateOut(SubstrateOutModel model)
+ {
+ try
+ {
+ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA57.ToString());
+ if (warehouse == null)
+ {
+ return MesResponseContent.Instance.Error($"浠撳簱鍩虹淇℃伅鏈厤缃�");
+ }
+
+ Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == model.MaterialCode);
+ if (materielInfo == null)
+ {
+ return MesResponseContent.Instance.Error($"鏈壘鍒拌鐗╂枡淇℃伅");
+ }
+
+ Dt_MesOutboundOrder mesOutboundOrder = new Dt_MesOutboundOrder()
+ {
+ CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(),
+ Line = model.Line,
+ MaterialCode = model.MaterialCode,
+ MaterialName = model.MaterialName,
+ OrderQuantity = model.RequiredQuantity,
+ TaskNo = model.TaskNo,
+ Unit = model.Unit,
+ OrderType = MesOutboundOrderTypeEnum.SubstrateOut.ObjToInt(),
+ OrderStatus = OutOrderStatusEnum.鏈紑濮�.ObjToInt(),
+ WarehouseId = warehouse.WarehouseId
+ };
+
+ List<Dt_Task> tasks = new List<Dt_Task>();
+
+ List<Dt_StockInfo>? stockInfos = null;
+ List<Dt_OutStockLockInfo>? outStockLockInfos = null;
+ List<Dt_LocationInfo>? locationInfos = null;
+ {
+ (List<Dt_StockInfo>, Dt_MesOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.MesOutboundOrderService.AssignStockOutbound(mesOutboundOrder);
+ if (result.Item1 != null && result.Item1.Count > 0)
+ {
+ tasks = GetTasks(result.Item1, TaskTypeEnum.MesOutbound);
+ result.Item2.OrderStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
+ result.Item3.ForEach(x =>
+ {
+ x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
+ });
+
+ stockInfos = result.Item1;
+ mesOutboundOrder = result.Item2;
+ outStockLockInfos = result.Item3;
+ locationInfos = result.Item4;
+ }
+ else
+ {
+ throw new Exception("鏃犲簱瀛�");
+ }
+ }
+ _unitOfWorkManage.BeginTran();
+
+ int id = BaseDal.AddData(tasks);
+ outStockLockInfos.ForEach(x =>
+ {
+ x.OrderNo = mesOutboundOrder.TaskNo;
+ x.OrderDetailId = id;
+ });
+ _outboundService.MesOutboundOrderService.Repository.AddData(mesOutboundOrder);
+ if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0)
+ {
+ WebResponseContent content = _outboundService.MesOutboundOrderService.LockOutboundStockDataUpdate(stockInfos, outStockLockInfos, locationInfos, tasks: tasks);
+
+ if (!content.Status)
+ {
+ _unitOfWorkManage.RollbackTran();
+ return MesResponseContent.Instance.Error(content.Message);
+ }
+ }
+ _unitOfWorkManage.CommitTran();
+ PushTasksToWCS(tasks);
+
+
+ return MesResponseContent.Instance.OK();
+ }
+ catch (Exception ex)
+ {
+ return MesResponseContent.Instance.Error(ex.Message);
+ }
+ }
+
+ /// <summary>
+ /// 鍩烘澘浣欐枡閫�搴�
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ public MesResponseContent SubstrateBack(SubstrateBackModel model)
+ {
+ try
+ {
+ Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => model.CarrierCode.Contains(x.CodeStartStr));
+ if (palletTypeInfo == null)
+ {
+ return MesResponseContent.Instance.Error($"鏈瘑鍒鎵樼洏绫诲瀷锛岃纭鎵樼洏鍙�");
+ }
+
+ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode == WarehouseEnum.HA57.ToString());
+
+ Dt_StockInfo stockInfo = new Dt_StockInfo()
+ {
+ PalletCode = model.CarrierCode,
+ PalletType = palletTypeInfo.PalletType,
+ WarehouseId = warehouse.WarehouseId,
+ StockStatus = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt()
+ };
+
+ Dt_StockInfoDetail_Hty stockInfoDetail_Hty = _stockRepository.StockInfoDetail_HtyRepository.QueryFirst(x => x.BatchNo == model.MaterialLot && x.MaterielCode == model.MaterialCode);
+
+ Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail()
+ {
+ BatchNo = stockInfoDetail_Hty?.BatchNo ?? "",
+ EffectiveDate = model.ExpirationDate,
+ MaterielCode = model.MaterialCode,
+ InboundOrderRowNo = stockInfoDetail_Hty?.InboundOrderRowNo ?? 0,
+ MaterielName = model.MaterialCode,
+ ProductionDate = model.ProductionDate,
+ OrderNo = stockInfoDetail_Hty?.OrderNo ?? "",
+ OutboundQuantity = 0,
+ SerialNumber = stockInfoDetail_Hty?.SerialNumber ?? "0",
+ StockQuantity = model.Quantity,
+ Status = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(),
+ Unit = model.Unit
+ };
+
+ Dt_Task task = new Dt_Task()
+ {
+ PalletCode = stockInfo.PalletCode,
+ CurrentAddress = "",
+ NextAddress = "",
+ PalletType = stockInfo.PalletType,
+ Roadway = "",
+ SourceAddress = "",
+ TargetAddress = "",
+ TaskStatus = TaskStatusEnum.New.ObjToInt(),
+ TaskType = TaskTypeEnum.MesMatReturn.ObjToInt(),
+ WarehouseId = warehouse.WarehouseId
+ };
+
+ _unitOfWorkManage.BeginTran();
+ Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand();
+ BaseDal.AddData(task);
+ _unitOfWorkManage.CommitTran();
+
+ return MesResponseContent.Instance.OK();
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ return MesResponseContent.Instance.Error(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 7115035..94d4ca8 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"
@@ -68,6 +68,7 @@
private readonly IInvokeERPService _invokeERPService;
private readonly IInboundRepository _inboundRepository;
private readonly IInboundOrderService _inboundOrderService;
+ private readonly IPalletTypeInfoRepository _palletTypeInfoRepository;
public ITaskRepository Repository => BaseDal;
@@ -81,7 +82,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) : 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) : base(BaseDal)
{
_mapper = mapper;
_unitOfWorkManage = unitOfWorkManage;
@@ -95,6 +96,7 @@
_invokeERPService = invokeERPService;
_inboundRepository = inboundRepository;
_inboundOrderService = inboundOrderService;
+ _palletTypeInfoRepository = palletTypeInfoRepository;
}
/// <summary>
@@ -243,7 +245,7 @@
{
foreach (var model in stockInfo.Details)
{
- TestSynStock(new TestToolSynInfo() { ToolCode = model.BatchNo, Life = int.TryParse(model.Remark, out int val) ? val : 1000 });
+ TestSynStock(new TestToolSynInfo() { ToolCode = model.BatchNo,MaterialName=model.MaterielName ,Life = int.TryParse(model.Remark, out int val) ? val : 1000 });
}
}
@@ -265,7 +267,7 @@
task.TaskStatus = (int)TaskStatusEnum.Finish;
_unitOfWorkManage.BeginTran();
BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
- _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
+ _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
_stockRepository.StockInfoRepository.UpdateData(stockInfo);
_stockRepository.StockInfoDetailRepository.UpdateData(stockInfo.Details);
_recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationStatusEnum.InStock, LocationChangeType.InboundCompleted);
@@ -314,6 +316,7 @@
Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == task.WarehouseId);
List<Dt_OutStockLockInfo> outStockLockInfos = _outboundService.OutboundStockLockInfoService.Repository.QueryData(x => x.TaskNum == taskNum);
List<Dt_OutboundOrderDetail> outboundOrderDetails = new List<Dt_OutboundOrderDetail>();
+ List<Dt_MesOutboundOrder> mesOutboundOrders = new List<Dt_MesOutboundOrder>();
if ((outStockLockInfos == null || outStockLockInfos.Count == 0) && warehouse.WarehouseCode != WarehouseEnum.HA64.ToString())
{
@@ -323,40 +326,77 @@
{
foreach (var item in outStockLockInfos)
{
- Dt_OutboundOrderDetail outboundOrderDetail = _outboundService.OutboundOrderDetailService.Repository.QueryFirst(x => x.Id == item.OrderDetailId);
- if (outboundOrderDetail != null)
+ if (task.TaskType == TaskTypeEnum.MesOutbound.ObjToInt())
{
- outboundOrderDetail.OverOutQuantity = item.AssignQuantity;
- if (outboundOrderDetail.OverOutQuantity == outboundOrderDetail.OrderQuantity)
+ Dt_MesOutboundOrder mesOutboundOrder = _outboundService.MesOutboundOrderService.Repository.QueryFirst(x => x.Id == item.OrderDetailId);
+ if (mesOutboundOrder != null)
{
- outboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Over.ObjToInt();
+ mesOutboundOrder.OverOutQuantity = item.AssignQuantity;
+ if (mesOutboundOrder.OverOutQuantity == mesOutboundOrder.OrderQuantity)
+ {
+ mesOutboundOrder.OrderStatus = OrderDetailStatusEnum.Over.ObjToInt();
+ }
+ mesOutboundOrders.Add(mesOutboundOrder);
}
- outboundOrderDetails.Add(outboundOrderDetail);
}
+ else
+ {
+ Dt_OutboundOrderDetail outboundOrderDetail = _outboundService.OutboundOrderDetailService.Repository.QueryFirst(x => x.Id == item.OrderDetailId);
+ if (outboundOrderDetail != null)
+ {
+ outboundOrderDetail.OverOutQuantity = item.AssignQuantity;
+ if (outboundOrderDetail.OverOutQuantity == outboundOrderDetail.OrderQuantity)
+ {
+ outboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Over.ObjToInt();
+ }
+ outboundOrderDetails.Add(outboundOrderDetail);
+ }
+ }
+ item.Status = OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt();
}
}
-
+ task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
_unitOfWorkManage.BeginTran();
- if (outboundOrderDetails.Count > 0)
+
+ if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt())
{
- _outboundService.OutboundOrderDetailService.Repository.UpdateData(outboundOrderDetails);
+ if (outboundOrderDetails.Count > 0)
+ {
+ _outboundService.OutboundOrderDetailService.Repository.UpdateData(outboundOrderDetails);
+ }
+
+ stockInfo.LocationCode = "";
+ stockInfo.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
+ _stockService.StockInfoService.Repository.UpdateData(stockInfo);
}
- stockInfo.LocationCode = "";
- stockInfo.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
- _stockService.StockInfoService.Repository.UpdateData(stockInfo);
+ else if (task.TaskType == TaskTypeEnum.MesOutbound.ObjToInt())
+ {
+ _outboundService.MesOutboundOrderService.Repository.UpdateData(mesOutboundOrders);
+ _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
+ _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfo.Details, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
+ }
+ _outboundService.OutboundStockLockInfoService.Repository.UpdateData(outStockLockInfos);
+
int beforeStatus = locationInfo.LocationStatus;
locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
- _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId);
+ _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId);
+
BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
_recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, (LocationStatusEnum)beforeStatus, LocationStatusEnum.Free, LocationChangeType.OutboundCompleted, stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
_unitOfWorkManage.CommitTran();
- if (warehouse.WarehouseCode != WarehouseEnum.HA64.ToString())
+ if (warehouse.WarehouseCode != WarehouseEnum.HA64.ToString() && task.TaskType == TaskTypeEnum.Outbound.ObjToInt())
{
_outboundService.OutboundOrderService.TestOutUpload(outboundOrderDetails.FirstOrDefault().Id, outStockLockInfos);
}
+ if (task.TaskType == TaskTypeEnum.MesOutbound.ObjToInt())
+ {
+ MesMaterialLotaAceptModel model = GetMesMaterialLotaAceptModel(stockInfo, stockInfo.Details.FirstOrDefault(), mesOutboundOrders.FirstOrDefault().TaskNo, warehouse.WarehouseCode, mesOutboundOrders.FirstOrDefault().OrderQuantity);
+
+ UploadMesMaterialLotaAcept(model);
+ }
return WebResponseContent.Instance.OK();
}
catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs"
index 383eeb8..54f6266 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs"
@@ -78,5 +78,10 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+
+ //public WebResponseContent UpdateTaskInfo(WCSTaskDTO taskDTO)
+ //{
+
+ //}
}
}
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 965b256..7e410ca 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"
@@ -230,7 +230,7 @@
return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡缁戝畾璐т綅");
}
- Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(roadwayNo, (PalletTypeEnum)stockInfo.PalletType, stockInfo.WarehouseId);
+ Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(roadwayNo, stockInfo.PalletType, stockInfo.WarehouseId);
if (locationInfo == null)
{
return WebResponseContent.Instance.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅");
@@ -262,7 +262,7 @@
LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus;
_unitOfWorkManage.BeginTran();
_recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationStatusEnum.Lock, LocationChangeType.InboundAssignLocation);
- _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)newTask.PalletType, LocationStatusEnum.Lock, newTask.WarehouseId);
+ _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, newTask.PalletType, LocationStatusEnum.Lock, newTask.WarehouseId);
int taskId = BaseDal.AddData(newTask);
newTask.TaskId = taskId;
_stockRepository.StockInfoRepository.UpdateData(stockInfo);
@@ -301,7 +301,7 @@
return WebResponseContent.Instance.OK(data: task.TargetAddress);
}
- Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(roadwayNo, (PalletTypeEnum)task.PalletType, task.WarehouseId);
+ Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(roadwayNo, task.PalletType, task.WarehouseId);
if (locationInfo == null)
{
return WebResponseContent.Instance.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅");
@@ -315,7 +315,7 @@
_unitOfWorkManage.BeginTran();
_recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationStatusEnum.Lock, LocationChangeType.InboundAssignLocation);
- _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)task.PalletType, LocationStatusEnum.Lock, task.WarehouseId);
+ _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, task.PalletType, LocationStatusEnum.Lock, task.WarehouseId);
BaseDal.UpdateData(task);
_unitOfWorkManage.CommitTran();
return WebResponseContent.Instance.OK(data: locationInfo.LocationCode);
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 f8fa0af..67f133f 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"
@@ -38,7 +38,7 @@
Dt_LocationInfo locationInfo = _basicRepository.LocationInfoRepository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
if (locationInfo!=null && (locationInfo.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || locationInfo.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && locationInfo.LocationStatus==LocationStatusEnum.InStock.ObjToInt() && stockInfo.StockStatus==StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt())
{
- List<Dt_Task> tasks = GetTasks(new List<Dt_StockInfo>() { stockInfo });
+ List<Dt_Task> tasks = GetTasks(new List<Dt_StockInfo>() { stockInfo }, TaskTypeEnum.Outbound);
if (tasks == null || tasks.Count <= 0)
{
return content.Error($"鐢熸垚浠诲姟澶辫触");
@@ -52,7 +52,7 @@
//鏇存柊搴撳瓨鐘舵��
_stockRepository.StockInfoRepository.UpdateData(stockInfo);
//鏇存柊璐т綅鐘舵��
- _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
+ _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, stockInfo.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
//鏂板缓浠诲姟
BaseDal.AddData(tasks);
//鍔犲叆璐т綅鍙樺姩璁板綍
@@ -77,7 +77,7 @@
/// </summary>
/// <param name="stockInfos"></param>
/// <returns></returns>
- public List<Dt_Task> GetTasks(List<Dt_StockInfo> stockInfos)
+ public List<Dt_Task> GetTasks(List<Dt_StockInfo> stockInfos, TaskTypeEnum taskType)
{
List<Dt_Task> tasks = new List<Dt_Task>();
for (int i = 0; i < stockInfos.Count; i++)
@@ -99,7 +99,7 @@
SourceAddress = stockInfo.LocationCode,
TargetAddress = "",
TaskStatus = TaskStatusEnum.New.ObjToInt(),
- TaskType = TaskTypeEnum.Outbound.ObjToInt(),
+ TaskType = taskType.ObjToInt(),
TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
PalletType = stockInfo.PalletType,
WarehouseId = stockInfo.WarehouseId,
@@ -141,7 +141,7 @@
(List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutboundOrderDetailService.AssignStockOutbound(outboundOrderDetail, stockSelectViews);
if (result.Item1 != null && result.Item1.Count > 0)
{
- tasks = GetTasks(result.Item1);
+ tasks = GetTasks(result.Item1, TaskTypeEnum.Outbound);
result.Item2.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
result.Item3.ForEach(x =>
{
@@ -164,7 +164,7 @@
if (stockLockInfos != null && stockLockInfos.Count > 0)
{
List<Dt_StockInfo> stocks = _stockService.StockInfoService.Repository.GetStockInfosByPalletCodes(stockLockInfos.Select(x => x.PalletCode).Distinct().ToList());
- tasks = GetTasks(stocks);
+ tasks = GetTasks(stocks, TaskTypeEnum.Outbound);
}
}
@@ -197,7 +197,7 @@
(List<Dt_StockInfo>, List<Dt_OutboundOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutboundOrderDetailService.AssignStockOutbound(outboundOrderDetails);
if (result.Item1 != null && result.Item1.Count > 0)
{
- tasks = GetTasks(result.Item1);
+ tasks = GetTasks(result.Item1, TaskTypeEnum.Outbound);
result.Item2.ForEach(x =>
{
x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
index a390a33..b1ed752 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
@@ -61,7 +61,7 @@
return WebResponseContent.Instance.OK(data: _mapper.Map<WMSTaskDTO>(taskTemp));
}
- Dt_LocationInfo? newLocation = _basicService.LocationInfoService.AssignLocation(needRelocationItem.RoadwayNo, (PalletTypeEnum)task.PalletType, task.WarehouseId);
+ Dt_LocationInfo? newLocation = _basicService.LocationInfoService.AssignLocation(needRelocationItem.RoadwayNo, task.PalletType, task.WarehouseId);
if (newLocation != null)
{
Dt_Task newTask = new Dt_Task()
@@ -85,12 +85,12 @@
Repository.AddData(newTask);
{
LocationStatusEnum lastStatus = (LocationStatusEnum)newLocation.LocationStatus;
- _basicService.LocationInfoService.UpdateLocationStatus(newLocation, (PalletTypeEnum)task.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
+ _basicService.LocationInfoService.UpdateLocationStatus(newLocation, task.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
_recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(newLocation, lastStatus, LocationStatusEnum.Lock, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum);
}
{
LocationStatusEnum lastStatus = (LocationStatusEnum)needRelocationItem.LocationStatus;
- _basicService.LocationInfoService.UpdateLocationStatus(needRelocationItem, (PalletTypeEnum)task.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
+ _basicService.LocationInfoService.UpdateLocationStatus(needRelocationItem, task.PalletType, LocationStatusEnum.Lock, stockInfo.WarehouseId);
_recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(needRelocationItem, lastStatus, LocationStatusEnum.Lock, LocationChangeType.RelocationAssignLocation, taskNum: newTask.TaskNum);
}
stockInfo.StockStatus = StockStatusEmun.绉诲簱閿佸畾.ObjToInt();
@@ -134,12 +134,12 @@
{
return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑缁堢偣璐т綅淇℃伅");
}
-
+ task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
_unitOfWorkManage.BeginTran();
stockInfo.LocationCode = locationInfoEnd.LocationCode;
_stockService.StockInfoService.Repository.UpdateData(stockInfo);
- _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId);
- _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
+ _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId);
+ _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚);
_unitOfWorkManage.CommitTran();
return WebResponseContent.Instance.OK();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs"
index b46552d..a3e3666 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs"
@@ -46,7 +46,7 @@
/// <param name="palletType"></param>
/// <returns></returns>
[HttpPost, HttpGet, Route("AssignLocation"), AllowAnonymous]
- public Dt_LocationInfo? AssignLocation(string roadwayNo, PalletTypeEnum palletType, int warehouseId)
+ public Dt_LocationInfo? AssignLocation(string roadwayNo, int palletType, int warehouseId)
{
return Service.AssignLocation(roadwayNo, palletType, warehouseId);
}
@@ -74,7 +74,7 @@
}
[HttpPost, Route("UpdateLocationStatus"), AllowAnonymous]
- public WebResponseContent UpdateLocationStatus(string locationCode, PalletTypeEnum palletType, LocationStatusEnum locationStatus, int warehousId)
+ public WebResponseContent UpdateLocationStatus(string locationCode, int palletType, LocationStatusEnum locationStatus, int warehousId)
{
try
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletCodeInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletCodeInfoController.cs"
index ce7247f..24276b1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletCodeInfoController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletCodeInfoController.cs"
@@ -1,5 +1,6 @@
锘縰sing Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
+using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
@@ -13,5 +14,10 @@
public PalletCodeInfoController(IPalletCodeInfoService service) : base(service)
{
}
+ [HttpPost,Route("PrintStatusUp")]
+ public WebResponseContent PrintStatusUp(string printCode)
+ {
+ return Service.PrintStatusUp(printCode);
+ }
}
}
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 660d379..ac5eaf8 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"
@@ -16,6 +16,7 @@
using WIDESEA_IBasicService;
using WIDESEA_IInboundRepository;
using WIDESEA_IInboundService;
+using WIDESEA_InboundService;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
using static WIDESEA_DTO.ErpResponseContent;
@@ -29,23 +30,15 @@
[ApiController]
public class ErpController : ControllerBase
{
- private readonly IPurchaseOrderRepository _purchaseOrderRepository;
- private readonly IPurchaseOrderService _purchaseOrderService;
- private readonly ISupplierInfoService _supplierInfoService;
- private readonly IMaterielInfoService _materielInfoService;
- private readonly IOutboundOrderService _outboundOrderService;
- private readonly ICustomerInfoService _customerInfoService;
- private readonly IUserInfoService _userInfoService;
+ private readonly IBasicService _basicService;
+ private readonly IOutboundService _outboundService;
+ private readonly IInboundService _inboundService;
- public ErpController(IPurchaseOrderRepository purchaseOrderRepository, IPurchaseOrderService purchaseOrderService, ISupplierInfoService supplierInfoService, IMaterielInfoService materielInfoService, IOutboundOrderService outboundOrderService,ICustomerInfoService customerInfoService, IUserInfoService userInfoService)
+ public ErpController(IBasicService basicService, IOutboundService outboundService, IInboundService inboundService)
{
- _purchaseOrderRepository = purchaseOrderRepository;
- _purchaseOrderService = purchaseOrderService;
- _supplierInfoService = supplierInfoService;
- _materielInfoService = materielInfoService;
- _outboundOrderService = outboundOrderService;
- _customerInfoService = customerInfoService;
- _userInfoService = userInfoService;
+ _basicService = basicService;
+ _outboundService = outboundService;
+ _inboundService = inboundService;
}
/// <summary>
@@ -56,7 +49,7 @@
[HttpPost, Route("ReceivePurchaseOrder"), AllowAnonymous, MethodParamsValidate]
public ErpResponseContent ReceivePurchaseOrder([FromBody] Root<PurchaseOrderModel> model)
{
- WebResponseContent content = _purchaseOrderService.ReceivePurchaseOrder(model.Content);
+ WebResponseContent content = _inboundService.PurchaseOrderService.ReceivePurchaseOrder(model.Content);
if (content.Status) return Instance.OK();
else return Instance.Error(content.Message);
}
@@ -69,7 +62,7 @@
[HttpPost, Route("ReceiveUser"), AllowAnonymous, MethodParamsValidate]
public ErpResponseContent ReceiveUser([FromBody] Root<UserInfoDTO> model)
{
- WebResponseContent content = _userInfoService.ReceiveUser(model.Content);
+ WebResponseContent content = _basicService.UserInfoService.ReceiveUser(model.Content);
if (content.Status) return Instance.OK();
else return Instance.Error(content.Message);
}
@@ -82,7 +75,7 @@
[HttpPost, Route("ReceiveSupplier"), AllowAnonymous, MethodParamsValidate]
public ErpResponseContent ReceiveSupplier([FromBody] Root<SupplierDTO> model)
{
- WebResponseContent content = _supplierInfoService.ReceiveSupplier(model.Content);
+ WebResponseContent content = _basicService.SupplierInfoService.ReceiveSupplier(model.Content);
if (content.Status) return Instance.OK();
else return Instance.Error(content.Message);
}
@@ -95,7 +88,7 @@
[HttpPost, Route("ReceiveMaterial"), AllowAnonymous, MethodParamsValidate]
public ErpResponseContent ReceiveMaterial([FromBody] Root<MaterielInfoDTO> model)
{
- WebResponseContent content = _materielInfoService.ReceiveMaterial(model.Content);
+ WebResponseContent content = _basicService.MaterielInfoService.ReceiveMaterial(model.Content);
if (content.Status) return Instance.OK();
else return Instance.Error(content.Message);
}
@@ -108,7 +101,7 @@
[HttpPost, Route("ReceiveCustomer"), AllowAnonymous, MethodParamsValidate]
public ErpResponseContent ReceiveCustomer([FromBody] Root<CustomerInfoDTO> model)
{
- WebResponseContent content = _customerInfoService.ReceiveCustomer(model.Content);
+ WebResponseContent content = _basicService.CustomerInfoService.ReceiveCustomer(model.Content);
if (content.Status) return Instance.OK();
else return Instance.Error(content.Message);
}
@@ -121,7 +114,7 @@
[HttpPost, Route("ReceiveOutOrder"), AllowAnonymous, MethodParamsValidate]
public ErpResponseContent ReceiveOutOrder([FromBody] Root<ErpOutOrderDTO> erpOutOrder)
{
- WebResponseContent content = _outboundOrderService.ReceiveOutOrder(erpOutOrder.Content);
+ WebResponseContent content = _outboundService.OutboundOrderService.ReceiveOutOrder(erpOutOrder.Content);
if (content.Status) return Instance.OK();
else return Instance.Error(content.Message);
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
index 9f64e5f..6b6894e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
@@ -82,11 +82,11 @@
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
- [HttpPost, HttpGet, Route("FeedbackInboundOrder")]
- public WebResponseContent FeedbackInboundOrder(int id)
- {
- return Service.FeedbackInboundOrder(id);
- }
+ //[HttpPost, HttpGet, Route("FeedbackInboundOrder")]
+ //public WebResponseContent FeedbackInboundOrder(int id)
+ //{
+ // return Service.FeedbackInboundOrder(id);
+ //}
[HttpPost, HttpGet, Route("ManualMaterielGroup")]
public WebResponseContent MaterielGroup(string palletCode, int initiallife, int warehouseId, [FromBody] List<string> serNums)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
index 8e39f2d..81d9b0f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
@@ -22,22 +22,15 @@
[ApiController]
public class MesController : ControllerBase
{
- private readonly IPurchaseOrderRepository _purchaseOrderRepository;
- private readonly IPurchaseOrderService _purchaseOrderService;
- private readonly ISupplierInfoService _supplierInfoService;
- private readonly IMaterielInfoService _materielInfoService;
- private readonly IOutboundOrderService _outboundOrderService;
+ private readonly IOutboundService _outboundService;
private readonly ITaskService _taskService;
- public MesController(IPurchaseOrderRepository purchaseOrderRepository, IPurchaseOrderService purchaseOrderService, ISupplierInfoService supplierInfoService, IMaterielInfoService materielInfoService, IOutboundOrderService outboundOrderService, ITaskService taskService)
+ public MesController(IOutboundService outboundService, ITaskService taskService)
{
- _purchaseOrderRepository = purchaseOrderRepository;
- _purchaseOrderService = purchaseOrderService;
- _supplierInfoService = supplierInfoService;
- _materielInfoService = materielInfoService;
- _outboundOrderService = outboundOrderService;
+ _outboundService = outboundService;
_taskService = taskService;
}
+
/// <summary>
/// 鎺ユ敹MES娴嬭瘯鏋跺嚭搴�
/// </summary>
@@ -48,6 +41,7 @@
{
return _taskService.TestToolOut(model.Content);
}
+
/// <summary>
/// 鎺ユ敹MES娴嬭瘯鏋堕��搴�
/// </summary>
@@ -58,6 +52,7 @@
{
return _taskService.TestToolBack(model.Content);
}
+
/// <summary>
/// 娴嬭瘯鏋舵姤搴�
/// </summary>
@@ -68,15 +63,48 @@
{
return _taskService.TestScrap(model.Content);
}
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="toolSynInfo"></param>
+ /// <returns></returns>
[HttpPost, Route("TestSynStock"), AllowAnonymous]
public WebResponseContent TestSynStock([FromBody]TestToolSynInfo toolSynInfo)
{
return _taskService.TestSynStock(toolSynInfo);
}
- [HttpPost, Route("testHttp"), AllowAnonymous, MethodParamsValidate]
- public string TestScrap(string str)
+
+ /// <summary>
+ /// 鍩烘澘鍑哄簱
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ [HttpPost, Route("SubstrateOut"), AllowAnonymous]
+ public MesResponseContent SubstrateOut([FromBody] Root<SubstrateOutModel> model)
{
- return HttpMesHelper.GetStr(str);
+ return _taskService.SubstrateOut(model.Content);
+ }
+
+ /// <summary>
+ /// 鍩烘澘浣欐枡閫�搴�
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ [HttpPost, Route("SubstrateBack"), AllowAnonymous]
+ public MesResponseContent SubstrateBack([FromBody] Root<SubstrateBackModel> model)
+ {
+ return _taskService.SubstrateBack(model.Content);
+ }
+
+ /// <summary>
+ /// 鐗╂枡鍑哄簱锛學MS鍚屾鍑哄簱鐗╂枡鎵规鑷矼ES
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ public WebResponseContent UploadMesMaterialLotaAcept([FromBody] MesMaterialLotaAceptModel model)
+ {
+ return _taskService.UploadMesMaterialLotaAcept(model);
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
index d9033aa..8345af4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
@@ -2,12 +2,14 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
+using Newtonsoft.Json;
using StackExchange.Profiling;
using WIDESEA_Core;
using WIDESEA_Core.Authorization;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.Caches;
using WIDESEA_Core.Const;
+using WIDESEA_Core.Extensions;
using WIDESEA_Core.Helper;
using WIDESEA_Core.HttpContextUser;
using WIDESEA_Core.Utilities;
@@ -37,6 +39,30 @@
public IActionResult Login([FromBody] LoginInfo loginInfo)
{
return Json(Service.Login(loginInfo));
+ }
+
+ [HttpPost, Route("swgLogin"), AllowAnonymous]
+ public dynamic SwgLogin([FromBody] SwaggerLoginRequest loginRequest)
+ {
+ if (loginRequest is null)
+ {
+ return new { result = false };
+ }
+
+ try
+ {
+ if (loginRequest.name == "admin" && loginRequest.pwd == $"admin!{DateTime.Now.ToString("yyyyMMdd")}")
+ {
+ HttpContext.SuccessSwagger();
+ return new { result = true };
+ }
+ }
+ catch (Exception ex)
+ {
+
+ }
+
+ return new { result = false };
}
[HttpPost, Route("getCurrentUserInfo")]
@@ -98,4 +124,10 @@
}
}
+
+ public class SwaggerLoginRequest
+ {
+ public string name { get; set; }
+ public string pwd { get; set; }
+ }
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
index 2a23123..c8b83e9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
@@ -106,8 +106,8 @@
//if (app.Environment.IsDevelopment())
{
//todo
- //app.UseSwaggerAuthorized();
- app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEA_WMSServer.index.html"));
+ app.UseSwaggerAuthorized();
+ app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEA_WMSServer.index.html") ?? throw new Exception("WIDESEA_WMSServer.index.html文件"));
}//判断是否需要打开swagger
app.UseIpLimitMiddle();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
index c70e3ac..9fde51e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
@@ -6,7 +6,7 @@
"Microsoft.AspNetCore": "Warning"
}
},
- "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType,warehouses,suppliers,taskType,receiveStatus,purchaseType",
+ "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType,warehouses,suppliers,taskType,receiveStatus,purchaseType,purchaseOrderStatus,printStatus",
"AllowedHosts": "*",
"ConnectionStringsEncryption": false,
"MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue
@@ -28,5 +28,6 @@
"ApiName": "WIDESEA",
"ExpMinutes": 120,
"QuartzJobAutoStart": true,
- "PDAVersion": "2"
+ "PDAVersion": "2",
+ "WebSocketPort": 9296
}
--
Gitblit v1.9.3