From 1f121db427cc068eee97b699c410d1b5f320e867 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期六, 06 九月 2025 14:26:27 +0800 Subject: [PATCH] 最新代码提交 --- 项目代码/WMS/WMSServices/WIDESEA_OutboundRepository/OutBSTOrderDetailRepository.cs | 21 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 25 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs | 30 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs | 68 + 项目代码/WMS/WMSServices/WIDESEA_DTO/Stock/ProStockViewDTO.cs | 38 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs | 16 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs | 15 项目代码/WMS/WMSClient/src/views/basic/materielInfo.vue | 47 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs | 8 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs | 6 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 153 +++ 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutBSTOrderDetailController.cs | 19 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutBSTOrderController.cs | 20 项目代码/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs | 17 项目代码/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutBSTOrderDetailRepository.cs | 18 项目代码/WMS/WMSServices/WIDESEA_InboundService/PurchaseBSTOrderService.cs | 50 + 项目代码/WMS/WMSServices/WIDESEA_External/IERPService/IInvokeERPService.cs | 2 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutBSTOrder.cs | 74 + 项目代码/WMS/WMSServices/WIDESEA_Common/MaterielEnum/MaterialMenu.cs | 81 + 项目代码/WMS/WMSServices/WIDESEA_Core/CodeConfigEnum/RuleCodeEnum.cs | 35 项目代码/WMS/WMSServices/WIDESEA_DTO/ERP/BSTOutOrderDTO.cs | 94 ++ 项目代码/WMS/WMSServices/WIDESEA_StockService/ProStockViewService.cs | 7 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs | 112 ++ 项目代码/WMS/WMSClient/src/extension/outbound/outBSTOrder.js | 0 项目代码/WMS/WMSClient/src/views/outbound/outBSTOrder.vue | 278 ++++++ 项目资料/通信协议/龙利得软件计划表.xlsx | 0 项目代码/WMS/WMSServices/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs | 7 项目代码/WMS/WMSServices/WIDESEA_Core/Helper/UtilConvert.cs | 4 项目代码/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs | 45 项目代码/WMS/WMSClient/src/views/stock/ProStockView.vue | 47 + 项目代码/WMS/WMSServices/WIDESEA_External/Model/BSTPurchaseUpModel.cs | 18 项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutBSTOrderService.cs | 24 项目代码/WMS/WMSServices/WIDESEA_Common/OrderEnum/OutboundOrderMenu.cs | 4 项目代码/WMS/WMSClient/src/extension/outbound/outBSTOrderDetail.js | 0 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 186 +++ 项目代码/WMS/WMSServices/WIDESEA_External/Model/BSTResponse.cs | 23 项目代码/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutStockLockInfoRepository.cs | 17 项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutBSTOrderDetailService.cs | 30 项目代码/WMS/WMSClient/src/views/stock/stockInfo.vue | 7 项目资料/接口协议/安全申请RCS-WCS-20250729.docx | 0 项目资料/通信协议/原纸残卷巷道库位数据.xlsx | 0 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderDetailService.cs | 166 +++ 项目代码/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutBSTOrderRepository.cs | 18 项目代码/WCS/WCSServices/WIDESEAWCS_Server/appsettings.json | 4 项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutStockLockInfoService.cs | 29 项目代码/WMS/WMSClient/src/extension/outbound/extend/outOrderDetail.vue | 131 +- 项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs | 24 项目代码/WMS/WMSServices/WIDESEA_IStockService/IStockInfoService.cs | 11 项目代码/WMS/WMSServices/WIDESEA_Common/APIEnum/APIEnum.cs | 7 项目代码/WMS/WMSServices/WIDESEA_Core/Const/HtmlElementType.cs | 4 项目资料/接口协议/龙利得-MES、ERP、WMS接口清单.xlsx | 0 项目代码/WMS/WMSServices/WIDESEA_DTO/Basic/BSTMaterialDTO.cs | 2 项目代码/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs | 2 项目代码/WMS/WMSServices/WIDESEA_OutboundRepository/OutBSTOrderRepository.cs | 21 项目代码/WMS/WMSServices/WIDESEA_IStockRepository/IStockInfoRepository.cs | 2 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderService.cs | 123 ++ 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/ConveyorLineJob_YL1ndFloor.cs | 13 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Program.cs | 2 项目代码/WMS/WMSServices/WIDESEA_WMSServer/appsettings.json | 2 项目资料/接口协议/博思通利拓接口.xlsx | 0 项目代码/WMS/WMSServices/WIDESEA_OutboundRepository/OutStockLockInfoRepository.cs | 20 项目代码/WMS/WMSServices/WIDESEA_BasicRepository/BasicRepository.cs | 5 项目代码/WMS/WMSServices/WIDESEA_Core/BaseModels/PageDataOptions.cs | 4 项目代码/WMS/WMSClient/src/views/outbound/outBSTOrderDetail.vue | 6 项目代码/WMS/WMSServices/WIDESEA_StockRepository/StockInfoRepository.cs | 13 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs | 20 项目代码/WMS/WMSServices/WIDESEA_IBasicRepository/IBasicRepository.cs | 2 项目资料/接口协议/龙利得MES接口.xlsx | 0 /dev/null | 0 项目代码/WMS/WMSServices/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj | 1 项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutBSTOrderDetail.cs | 96 ++ 项目代码/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs | 11 项目资料/接口协议/龙利得ERP&WMS接口清单.xlsx | 0 项目代码/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue | 40 项目代码/WMS/WMSClient/src/router/viewGird.js | 22 项目代码/WMS/WMSServices/WIDESEA_Model/WIDESEA_Model.csproj | 1 项目代码/WMS/WMSServices/WIDESEA_SystemService/Sys_DictionaryService.cs | 82 - 项目代码/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs | 7 78 files changed, 2,219 insertions(+), 318 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs" index 17574d3..1d949ca 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs" @@ -73,6 +73,13 @@ /// <returns></returns> WebResponseContent RequestYLWMSTaskSimple(string palletCode, string sourceAddress, int taskNum = 0); + /// <summary> + /// 鍏ュ簱鐢宠 + /// </summary> + /// <param name="palletCode">鏉$爜</param> + /// <returns></returns> + WebResponseContent YLPurchaseBoxing(string palletCode); + WebResponseContent AssignCPRoadwayNo(); // <summary> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/appsettings.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/appsettings.json" index 18b5d76..f8ed64e 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/appsettings.json" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/appsettings.json" @@ -14,10 +14,10 @@ //杩炴帴瀛楃涓� //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=", //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSLLD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", - "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSLLD;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", + "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSLLD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", //"ConnectionString": "Data Source=192.168.35.3;Initial Catalog=TestWCS_TC;User ID=sa;Password=Sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=TESTWCSCP_WCS;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", - "WMSConnectionStrings": "Data Source=.;Initial Catalog=WIDESEA_WMSLLD;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", + "WMSConnectionStrings": "Data Source=.;Initial Catalog=WIDESEA_WMSLLD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", //"WMSConnectionStrings": "Data Source=.;Initial Catalog=WIDESEA_WMSLLD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", //"WMSConnectionStrings": "Data Source=10.30.4.92;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", //璺ㄥ煙 diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" index 537c947..933b3d6 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" @@ -328,7 +328,31 @@ } return content; } + // <summary> + /// 鍏ュ簱鐢宠 + /// </summary> + public WebResponseContent YLPurchaseBoxing(string palletCode) + { + WebResponseContent? content = new WebResponseContent(); + try + { + string address = AppSettings.Get("WMSApiAddress"); + if (string.IsNullOrEmpty(address)) + { + return WebResponseContent.Instance.Error($"鏈壘鍒癢MSApi鍦板潃"); + } + string responseStr = HttpHelper.Get($"{address}/api/Task/YLPurchaseBoxing?palletCode={palletCode}"); + WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr); + content = responseContent; + + } + catch (Exception ex) + { + content.Error(ex.Message); + } + return content; + } // <summary> /// 璇锋眰鎴愬搧鍏ュ簱宸烽亾 /// </summary> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs" index 30ebadb..5c75d56 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs" @@ -78,8 +78,17 @@ R_ConveyorLineYLInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineYLInfo>(deviceProRead.DeviceProAddress); if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 86 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID)) //涓�妤兼潵鏂欑О閲嶇珯鍙板厑璁稿叆搴撶敵璇� { - device.SetValue(WR_CLineYLDB.WR_Reresult, 86, item.StationCode); - WriteInfo(item.StationCode, $"璇锋眰鍏ュ簱鏉$爜:{conveyorLineInfoRead.WR_TMID}"); + WebResponseContent content = _taskService.YLPurchaseBoxing(conveyorLineInfoRead.WR_TMID); + if (content.Status) + { + device.SetValue(WR_CLineYLDB.WR_Reresult, 86, item.StationCode); + WriteInfo(item.StationCode, $"璇锋眰鍏ュ簱鏉$爜:{conveyorLineInfoRead.WR_TMID}"); + } + else + { + WriteError(item.StationCode, $"璇锋眰鍏ュ簱澶辫触锛歿content.Message}"); + } + } else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 86 && conveyorLineInfoRead.WR_Task <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID)) //涓�妤煎垎閰嶇珯鍙板叆搴撳垎閰嶇洰鏍囩偣 { diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue" index 9dcd95e..0bab4d2 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/SelectedStock.vue" @@ -13,14 +13,14 @@ <el-col :span="24"> <span class="less-style">鐗╂枡鍚嶇О锛� {{ row.materielName }} </span> <el-divider direction="vertical"></el-divider> - <span class="less-style">鐗╂枡缂栧彿锛� {{ row.materielCode }} </span> + <span class="less-style">鐗╂枡缂栧彿锛� {{ row.materialNo }} </span> <el-divider direction="vertical"></el-divider> <span class="less-style" - >闇�姹傛暟閲忥細 {{ row.orderQuantity }} + >闇�姹傛暟閲忥細 {{ row.totalUsage }} </span> <el-divider direction="vertical"></el-divider> <span class="less-style" - >宸插垎閰嶆暟閲忥細 {{ row.lockQuantity }} + >宸插垎閰嶆暟閲忥細 {{ row.assignTotalUsage }} </span> </el-col> </el-row> @@ -81,6 +81,7 @@ data() { return { row: null, + orderNo:null, showDetialBox: false, tableData: [], tableColumns: [ @@ -105,16 +106,10 @@ hidden: true, }, { - prop: "orderType", - title: "鍗曟嵁绫诲瀷", + prop: "materielId", + title: "鐗╂枡Id", type: "string", width: 90, - }, - { - prop: "batchNo", - title: "鎵规鍙�", - type: "string", - width: 120, }, { prop: "materielCode", @@ -136,16 +131,22 @@ hidden: true, }, { - prop: "originalQuantity", - title: "鍘熷搴撳瓨閲�", + prop: "orderQuantity", + title: "鍗曟嵁闇�姹傞暱搴�", type: "string", - width: 100, + width: 110, + }, + { + prop: "originalQuantity", + title: "鍘熷簱瀛橀暱搴�", + type: "string", + width: 110, }, { prop: "assignQuantity", - title: "鍒嗛厤鍑哄簱閲�", + title: "鍒嗛厤鍑哄簱闀垮害", type: "string", - width: 100, + width: 110, }, { prop: "taskNum", @@ -155,7 +156,7 @@ }, { prop: "palletCode", - title: "鎵樼洏缂栧彿", + title: "鏉$爜缂栧彿", type: "string", width: 150, }, @@ -174,15 +175,16 @@ }; }, methods: { - open(row) { + open(row,orderNo) { this.row = row; + this.orderNo=orderNo; this.showDetialBox = true; this.getData(); }, getData() { this.http .post( - "api/OutStockLockInfo/GetByOrderDetailId?orderDetailId=" + + "api/OutStockLockInfo/GetByOrderDetailId?orderNo="+this.orderNo+"&orderDetailId=" + this.row.id, null, "鏌ヨ涓�" diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/outOrderDetail.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/outOrderDetail.vue" index 0357e55..8504352 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/outOrderDetail.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/extend/outOrderDetail.vue" @@ -14,13 +14,13 @@ <span>宸查�変腑 {{ selection.length }} 椤�</span> </el-col> <el-col :span="8"> - <el-link + <!-- <el-link type="primary" size="small" style="float: right; height: 20px" @click="lockstocks" >閿佸畾搴撳瓨</el-link - > + > --> <el-link type="primary" size="small" @@ -124,14 +124,20 @@ hidden: true, }, { - prop: "orderId", + prop: "outBSTOrderId", title: "鍑哄簱鍗曚富閿�", type: "string", width: 90, hidden: true, }, { - prop: "materielCode", + prop: "materialId", + title: "涓婃父鐗╂枡ID", + type: "string", + width: 120, + }, + { + prop: "materialNo", title: "鐗╂枡缂栧彿", type: "string", width: 150, @@ -141,51 +147,52 @@ title: "鐗╂枡鍚嶇О", type: "string", width: 150, + hidden: true, }, { - prop: "batchNo", - title: "鎵规鍙�", + prop: "width", + title: "骞呭", type: "string", - width: 90, + width: 100, }, { - prop: "orderQuantity", - title: "鍗曟嵁鏁伴噺", + prop: "xqLen", + title: "闇�姹傞暱搴�", type: "string", - width: 90, + width: 130, }, { - prop: "lockQuantity", - title: "閿佸畾鏁伴噺", + prop: "totalUsage", + title: "鎬荤敤閲嶉噺", type: "int", - width: 90, + width: 130, }, { - prop: "overOutQuantity", - title: "宸插嚭鏁伴噺", + prop: "assignTotalUsage", + title: "宸插垎閰嶉暱搴�", type: "string", - width: 90, + width: 130, }, { - prop: "unit", - title: "鍗曚綅", + prop: "outTotalUsage", + title: "宸插嚭闀垮害", type: "string", - width: 90, + width: 130, }, { - prop: "orderDetailStatus", + prop: "outBSTOrderDetailStatus", title: "璁㈠崟鏄庣粏鐘舵��", type: "tag", width: 180, - bindKey: "orderDetailStatusEnum", + bindKey: "outboundStatusEnum", }, - { - prop: "assignStock", - title: "鎸囧畾搴撳瓨", - type: "icon", - width: 90, - icon: "el-icon-s-grid", - }, + // { + // prop: "assignStock", + // title: "鎸囧畾搴撳瓨", + // type: "icon", + // width: 90, + // icon: "el-icon-s-grid", + // }, { prop: "viewDetail", title: "鍑哄簱璇︾粏", @@ -194,33 +201,16 @@ icon: "el-icon-s-operation", }, { - prop: "creater", - title: "鍒涘缓浜�", - type: "string", - width: 90, - }, - { prop: "createDate", title: "鍒涘缓鏃堕棿", type: "datetime", - width: 160, - }, - { - prop: "modifier", - title: "淇敼浜�", - type: "string", - width: 100, + width: 170, }, { prop: "modifyDate", title: "淇敼鏃堕棿", type: "datetime", - width: 160, - }, - { - prop: "remark", - title: "澶囨敞", - type: "string", + width: 170, }, ], paginations: { @@ -284,14 +274,15 @@ } // 浠呭鏁板�煎垪姹傚拰 - // 浠呭鏌愪竴鍒楁眰鍜� - if (column.property === 'lockQuantity' || column.property === 'overOutQuantity' || column.property === 'orderQuantity') { + if (column.property === 'xqLen' || column.property === 'assignTotalUsage' || column.property === 'outTotalUsage' || column.property === 'totalUsage') { const values = data.map(item => Number(item[column.property])) console.log(values); if (!values.every(value => isNaN(value))) { sums[index] = values.reduce((prev, curr) => { return prev + (isNaN(curr) ? 0 : curr) - }, 0) + }, 0); + //淇濈暀涓や綅灏忔暟 + sums[index] = sums[index].toFixed(4) } else { sums[index] = '-' } @@ -302,7 +293,7 @@ return sums }, getData() { - var wheres = [{ name: "orderId", value: this.row.id }]; + var wheres = [{ name: "outBSTOrderId", value: this.row.id }]; var param = { page: this.paginations.page, rows: this.paginations.rows, @@ -311,7 +302,7 @@ wheres: JSON.stringify(wheres), // 鏌ヨ鏉′欢锛屾牸寮忎负[{ name: "瀛楁", value: "xx" }] }; this.http - .post("api/OutboundOrderDetail/GetPageData", param, "鏌ヨ涓�") + .post("api/OutBSTOrderDetail/GetPageData", param, "鏌ヨ涓�") .then((x) => { this.tableData = x.rows; }); @@ -321,25 +312,25 @@ this.$refs.child.open(row); } else { //鐐瑰嚮鎵撳紑鍑哄簱璇︽儏 - this.$refs.selectedStock.open(row); + this.$refs.selectedStock.open(row,this.row.outBSTOrderNo); } }, - lockstocks() { - if (this.selection.length === 0) { - return this.$message.error("璇烽�夋嫨鍗曟嵁鏄庣粏"); - } - var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id - this.http - .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "鏁版嵁澶勭悊涓�") - .then((x) => { - if (!x.status) return this.$message.error(x.message); - this.$message.success("鎿嶄綔鎴愬姛"); - this.showDetialBox = false; - this.$emit("parentCall", ($vue) => { - $vue.getData(); - }); - }); - }, + // lockstocks() { + // if (this.selection.length === 0) { + // return this.$message.error("璇烽�夋嫨鍗曟嵁鏄庣粏"); + // } + // var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id + // this.http + // .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "鏁版嵁澶勭悊涓�") + // .then((x) => { + // if (!x.status) return this.$message.error(x.message); + // this.$message.success("鎿嶄綔鎴愬姛"); + // this.showDetialBox = false; + // this.$emit("parentCall", ($vue) => { + // $vue.getData(); + // }); + // }); + // }, outbound() { if (this.selection.length === 0) { return this.$message.error("璇烽�夋嫨鍗曟嵁鏄庣粏"); @@ -347,7 +338,7 @@ var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id this.http - .post("api/Task/GenerateOutboundTasks", keys, "鏁版嵁澶勭悊涓�") + .post("api/Task/CreateBSTOutboundTasks", keys, "鏁版嵁澶勭悊涓�") .then((x) => { if (!x.status) return this.$message.error(x.message); this.$message.success("鎿嶄綔鎴愬姛"); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outBSTOrder.js" similarity index 100% rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outboundOrder.js" rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outBSTOrder.js" diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outboundOrderDetail.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outBSTOrderDetail.js" similarity index 100% rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outboundOrderDetail.js" rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outBSTOrderDetail.js" diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outboundOrderDetail_Hty.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outboundOrderDetail_Hty.js" deleted file mode 100644 index 8935403..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outboundOrderDetail_Hty.js" +++ /dev/null @@ -1,75 +0,0 @@ -/***************************************************************************************** -** Author:jxx 2022 -** QQ:283591387 -**瀹屾暣鏂囨。瑙侊細http://v2.volcore.xyz/document/api 銆愪唬鐮佺敓鎴愰〉闈iewGrid銆� -**甯哥敤绀轰緥瑙侊細http://v2.volcore.xyz/document/vueDev -**鍚庡彴鎿嶄綔瑙侊細http://v2.volcore.xyz/document/netCoreDev -*****************************************************************************************/ -//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 - -let extension = { - components: { - //鏌ヨ鐣岄潰鎵╁睍缁勪欢 - gridHeader: '', - gridBody: '', - gridFooter: '', - //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 - modelHeader: '', - modelBody: '', - modelFooter: '' - }, - tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) - buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽� - methods: { - //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� - onInit() { //妗嗘灦鍒濆鍖栭厤缃墠锛� - //绀轰緥锛氬湪鎸夐挳鐨勬渶鍓嶉潰娣诲姞涓�涓寜閽� - // this.buttons.unshift({ //涔熷彲浠ョ敤push鎴栬�卻plice鏂规硶鏉ヤ慨鏀筨uttons鏁扮粍 - // name: '鎸夐挳', //鎸夐挳鍚嶇О - // icon: 'el-icon-document', //鎸夐挳鍥炬爣vue2鐗堟湰瑙乮view鏂囨。icon锛寁ue3鐗堟湰瑙乪lement ui鏂囨。icon(娉ㄦ剰涓嶆槸element puls鏂囨。) - // type: 'primary', //鎸夐挳鏍峰紡vue2鐗堟湰瑙乮view鏂囨。button锛寁ue3鐗堟湰瑙乪lement ui鏂囨。button - // onClick: function () { - // this.$Message.success('鐐瑰嚮浜嗘寜閽�'); - // } - // }); - - //绀轰緥锛氳缃慨鏀规柊寤恒�佺紪杈戝脊鍑烘瀛楁鏍囩鐨勯暱搴� - // this.boxOptions.labelWidth = 150; - }, - onInited() { - //妗嗘灦鍒濆鍖栭厤缃悗 - //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔 - //this.detailOptions.columns.forEach(column=>{ }); - }, - searchBefore(param) { - //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟 - //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ - return true; - }, - searchAfter(result) { - //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊� - return true; - }, - addBefore(formData) { - //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫�� - return true; - }, - updateBefore(formData) { - //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d - return true; - }, - rowClick({ row, column, event }) { - //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠� - // this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�; - }, - modelOpenAfter(row) { - //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁 - //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add'; - //(2)缁欏脊鍑烘璁剧疆榛樿鍊� - //(3)this.editFormFields.瀛楁='xxx'; - //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊� - //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions) - } - } -}; -export default extension; diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outboundOrder_Hty.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outboundOrder_Hty.js" deleted file mode 100644 index 8935403..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/extension/outbound/outboundOrder_Hty.js" +++ /dev/null @@ -1,75 +0,0 @@ -/***************************************************************************************** -** Author:jxx 2022 -** QQ:283591387 -**瀹屾暣鏂囨。瑙侊細http://v2.volcore.xyz/document/api 銆愪唬鐮佺敓鎴愰〉闈iewGrid銆� -**甯哥敤绀轰緥瑙侊細http://v2.volcore.xyz/document/vueDev -**鍚庡彴鎿嶄綔瑙侊細http://v2.volcore.xyz/document/netCoreDev -*****************************************************************************************/ -//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 - -let extension = { - components: { - //鏌ヨ鐣岄潰鎵╁睍缁勪欢 - gridHeader: '', - gridBody: '', - gridFooter: '', - //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 - modelHeader: '', - modelBody: '', - modelFooter: '' - }, - tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) - buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽� - methods: { - //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� - onInit() { //妗嗘灦鍒濆鍖栭厤缃墠锛� - //绀轰緥锛氬湪鎸夐挳鐨勬渶鍓嶉潰娣诲姞涓�涓寜閽� - // this.buttons.unshift({ //涔熷彲浠ョ敤push鎴栬�卻plice鏂规硶鏉ヤ慨鏀筨uttons鏁扮粍 - // name: '鎸夐挳', //鎸夐挳鍚嶇О - // icon: 'el-icon-document', //鎸夐挳鍥炬爣vue2鐗堟湰瑙乮view鏂囨。icon锛寁ue3鐗堟湰瑙乪lement ui鏂囨。icon(娉ㄦ剰涓嶆槸element puls鏂囨。) - // type: 'primary', //鎸夐挳鏍峰紡vue2鐗堟湰瑙乮view鏂囨。button锛寁ue3鐗堟湰瑙乪lement ui鏂囨。button - // onClick: function () { - // this.$Message.success('鐐瑰嚮浜嗘寜閽�'); - // } - // }); - - //绀轰緥锛氳缃慨鏀规柊寤恒�佺紪杈戝脊鍑烘瀛楁鏍囩鐨勯暱搴� - // this.boxOptions.labelWidth = 150; - }, - onInited() { - //妗嗘灦鍒濆鍖栭厤缃悗 - //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔 - //this.detailOptions.columns.forEach(column=>{ }); - }, - searchBefore(param) { - //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟 - //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ - return true; - }, - searchAfter(result) { - //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊� - return true; - }, - addBefore(formData) { - //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫�� - return true; - }, - updateBefore(formData) { - //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d - return true; - }, - rowClick({ row, column, event }) { - //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠� - // this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�; - }, - modelOpenAfter(row) { - //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁 - //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add'; - //(2)缁欏脊鍑烘璁剧疆榛樿鍊� - //(3)this.editFormFields.瀛楁='xxx'; - //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊� - //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions) - } - } -}; -export default extension; diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/router/viewGird.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/router/viewGird.js" index 46f3e0e..4e841e6 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/router/viewGird.js" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/router/viewGird.js" @@ -70,13 +70,13 @@ name: 'inboundOrderDetail', component: () => import('@/views/inbound/inboundOrderDetail.vue') }, { - path: '/outboundOrder', - name: 'outboundOrder', - component: () => import('@/views/outbound/outboundOrder.vue') + path: '/outBSTOrder', + name: 'outBSTOrder', + component: () => import('@/views/outbound/outBSTOrder.vue') }, { - path: '/outboundOrderDetail', - name: 'outboundOrderDetail', - component: () => import('@/views/outbound/outboundOrderDetail.vue') + path: '/outBSTOrderDetail', + name: 'outBSTOrderDetail', + component: () => import('@/views/outbound/outBSTOrderDetail.vue') }, { path: '/outStockLockInfo', @@ -150,16 +150,6 @@ path: '/purchaseOrderDetail', name: 'purchaseOrderDetail', component: () => import('@/views/inbound/purchaseOrderDetail.vue') - } - , { - path: '/outboundOrder_Hty', - name: 'outboundOrder_Hty', - component: () => import('@/views/outbound/outboundOrder_Hty.vue') - } - , { - path: '/outboundOrderDetail_Hty', - name: 'outboundOrderDetail_Hty', - component: () => import('@/views/outbound/outboundOrderDetail_Hty.vue') } , { path: '/receiveOrderDetail', diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/materielInfo.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/materielInfo.vue" index 6dd7d86..b83e09c 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/materielInfo.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/basic/materielInfo.vue" @@ -38,7 +38,8 @@ materielWide: "", materielState: "", isCheck: "", - materielInvOrgId: "" + materielInvOrgId: "", + materierlWeight: "", }); const editFormOptions = ref([ @@ -62,9 +63,7 @@ required: true, field: "materielName", type: "string", - } - ], - [ + }, { title: "鐗╂枡鍒嗙被", field: "materielSourceType", @@ -73,6 +72,9 @@ data: [], required: true, }, + ], + [ + { title: "鐗╂枡瑙勬牸", required: true, @@ -83,10 +85,10 @@ title: "鍩烘湰鍗曚綅", required: true, field: "materielUnit", - type: "string", + type: "select", + dataKey:"materielUnitEnum", + data:[] }, - ], - [ { title: "搴撳瓨缁勭粐", required: true, @@ -103,16 +105,13 @@ dataKey:"enableEnum", data:[] }, - { - title: "鏄惁璐ㄦ", - required: true, - field: "isCheck", - type: "select", - dataKey:"yesno", - data:[] - }, ], [ + { + title: "鐗╂枡閲嶉噺", + field: "materielWeight", + type: "float", + }, { title: "鐗╂枡闀垮害", field: "materielLength", @@ -127,6 +126,16 @@ title: "鐗╂枡瀹藉害", field: "materielWide", type: "float", + }, + ], + [ + { + title: "鏄惁璐ㄦ", + required: true, + field: "isCheck", + type: "select", + dataKey:"enableEnum", + data:[] }, ] ]); @@ -205,6 +214,7 @@ type: "string", width: 120, align: "left", + bind: { key: "materielUnitEnum", data: [] }, }, { field: "materielState", @@ -223,6 +233,13 @@ align: "left", }, { + field: "materielWeight", + title: "鐗╂枡閲嶉噺", + type: "float", + width: 180, + align: "left", + }, + { field: "materielLength", title: "鐗╂枡闀垮害", type: "float", diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outBSTOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outBSTOrder.vue" new file mode 100644 index 0000000..2cb8e71 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outBSTOrder.vue" @@ -0,0 +1,278 @@ + +<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/outbound/outBSTOrder.js"; +import { ref, defineComponent } from "vue"; +export default defineComponent({ + setup() { + const table = ref({ + key: "id", + footer: "Foots", + cnName: "鍑哄簱鍗�", + name: "outBSTOrder", + url: "/OutBSTOrder/", + sortName: "id", + }); + const editFormFields = ref({ + boardMpsNo:"" + }); + const editFormOptions = ref([ + [ + { + field: "boardMpsNo", + title: "鍗曟嵁缂栧彿", + type: "string", + readonly:true + } + ], + ]); + const searchFormFields = ref({ + outBSTOrderNo: "", + boardMpsId: "", + boardMpsNo: "", + outBSTOrderStatus: "", + warehouseId: "", + }); + const searchFormOptions = ref([ + [ + { title: "鍗曟嵁缂栧彿", field: "outBSTOrderNo", type: "like" }, + { title: "鍑哄簱涓婃父ID", field: "boardMpsId", type: "like" }, + { title: "涓婃父鍗曟嵁缂栧彿", field: "boardMpsNo", type: "like" }, + { + title: "鍗曟嵁鐘舵��", + field: "outBSTOrderStatus", + type: "select", + dataKey: "outboundStatusEnum", + data: [], + }, + ], + [ + { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],} + ], + ]); + const columns = ref([ + { + field: "id", + title: "Id", + type: "int", + width: 90, + hidden: true, + readonly: true, + require: true, + align: "left", + }, + { + field: "warehouseId", + title: "浠撳簱", + type: "string", + width: 90, + align: "left", + bind:{key: "warehouses", data: []} + }, + { + field: "outBSTOrderNo", + title: "鍗曟嵁缂栧彿", + type: "string", + width: 160, + align: "left", + // link: true, + }, + { + field: "boardMpsId", + title: "涓婃父鍗曟嵁ID", + type: "int", + width: 160, + align: "left", + // link: true, + }, + { + field: "boardMpsNo", + title: "涓婃父鍗曟嵁缂栧彿", + type: "string", + width: 160, + align: "left", + }, + { + field: "outBSTOrderStatus", + title: "鍑哄簱鍗曠姸鎬�", + type: "string", + width: 110, + align: "left", + bind: { key: "outboundStatusEnum", data: [] }, + }, + { + field: "creater", + title: "鍒涘缓浜�", + type: "string", + width: 90, + align: "left", + }, + { + field: "createDate", + title: "鍒涘缓鏃堕棿", + type: "datetime", + width: 160, + align: "left", + }, + { + field: "remark", + title: "澶囨敞", + type: "string", + width: 100, + align: "left", + }, + ]); + const detail = ref({ + cnName: "鍑哄簱鏄庣粏鍗�", + table: "OutBSTOrderDetail", + columns: [ + { + field: "id", + title: "Id", + type: "int", + width: 90, + hidden: true, + readonly: true, + require: true, + align: "left", + }, + { + field: "outBSTOrderId", + title: "鍑哄簱鍗曚富閿�", + type: "string", + width: 90, + align: "left", + hidden: true, + }, + { + field: "boardMpsId", + title: "鍏宠仈鐨勪富琛↖D(涓婃父)", + type: "string", + width: 90, + align: "left", + }, + { + field: "materialId", + title: "鍏宠仈鐨勪富琛↖D(涓婃父)", + type: "string", + width: 90, + align: "left", + }, + { + field: "materialNo", + title: "鐗╂枡缂栧彿", + type: "string", + width: 150, + align: "left", + edit: { type: "string" }, + required: true, + }, + { + field: "materielName", + title: "鐗╂枡鍚嶇О", + type: "string", + width: 150, + align: "left", + edit: { type: "string" }, + }, + { + field: "width", + title: "骞呭", + type: "string", + width: 110, + align: "left", + edit: { type: "string" }, + required: true, + }, + { + field: "xqLen", + title: "闇�姹傞暱搴�", + type: "string", + width: 110, + align: "left", + edit: { type: "number" }, + required: true, + }, + { + field: "totalUsage", + title: "鎬荤敤閲�", + type: "string", + width: 90, + align: "left", + edit: { type: "number" }, + required: true, + }, + { + field: "procurementLength", + title: "閲囪喘闀垮害", + type: "string", + width: 110, + align: "left", + }, + { + field: "assignTotalUsage", + title: "宸插垎閰嶇敤閲�", + type: "string", + width: 110, + align: "left", + }, + { + field: "outTotalUsage", + title: "宸插嚭鐢ㄩ噺", + type: "string", + width: 110, + align: "left", + }, + { + field: "outBSTOrderDetailStatus", + title: "璁㈠崟鏄庣粏鐘舵��", + type: "string", + width: 180, + align: "left", + bind: { key: "outboundStatusEnum", data: [] }, + }, + { + field: "creater", + title: "鍒涘缓浜�", + type: "string", + width: 90, + align: "left", + }, + { + field: "createDate", + title: "鍒涘缓鏃堕棿", + type: "datetime", + width: 160, + align: "left", + } + ], + sortName: "id", + key: "id", + }); + return { + table, + extend, + editFormFields, + editFormOptions, + searchFormFields, + searchFormOptions, + columns, + detail, + }; + }, +}); +</script> + \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrderDetail.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outBSTOrderDetail.vue" similarity index 97% rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrderDetail.vue" rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outBSTOrderDetail.vue" index e992c4c..03d0916 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrderDetail.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outBSTOrderDetail.vue" @@ -14,7 +14,7 @@ </view-grid> </template> <script> - import extend from "@/extension/outbound/outboundOrderDetail.js"; + import extend from "@/extension/outbound/outBSTOrderDetail.js"; import { ref, defineComponent } from "vue"; export default defineComponent({ setup() { @@ -22,8 +22,8 @@ key: "id", footer: "Foots", cnName: "鍑哄簱鍗曟槑缁�", - name: "outboundOrderDetail", - url: "/OutboundOrderDetail/", + name: "outBSTOrderDetail", + url: "/OutBSTOrderDetail/", sortName: "id", }); const editFormFields = ref({ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrder.vue" deleted file mode 100644 index 6b61d28..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrder.vue" +++ /dev/null @@ -1,371 +0,0 @@ - -<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/outbound/outboundOrder.js"; -import { ref, defineComponent } from "vue"; -export default defineComponent({ - setup() { - const table = ref({ - key: "id", - footer: "Foots", - cnName: "鍑哄簱鍗�", - name: "outboundOrder", - url: "/OutboundOrder/", - sortName: "id", - }); - const editFormFields = ref({ - orderType: "", - orderNo:"", - upperOrderNo: "", - orderStatus: "", - remark: "", - warehouseId:"" - }); - const editFormOptions = ref([ - [ - { - title: "鍗曟嵁绫诲瀷", - required: true, - field: "orderType", - type: "select", - dataKey: "outOrderType", - data: [], - }, - { - field: "orderNo", - title: "鍗曟嵁缂栧彿", - type: "string", - readonly:true - }, - { - title: "涓婃父鍗曟嵁缂栧彿", - field: "upperOrderNo", - type: "string", - }, - { - title: "鍗曟嵁鐘舵��", - field: "orderStatus", - type: "select", - dataKey: "inboundState", - data: [], - readonly: true, - }, - { - title: "浠撳簱", - field: "warehouseId", - type: "select", - dataKey: "warehouses", - data: [], - required: true, - }, - { - title: "澶囨敞", - field: "remark", - type: "textarea", - }, - ], - ]); - const searchFormFields = ref({ - orderNo: "", - upperOrderNo: "", - orderType: "", - orderStatus: "", - createType: "", - creater: "", - createDate: "", - }); - const searchFormOptions = ref([ - [ - { title: "鍗曟嵁缂栧彿", field: "orderNo", type: "like" }, - { title: "涓婃父鍗曟嵁缂栧彿", field: "upperOrderNo", type: "like" }, - { - title: "鍗曟嵁绫诲瀷", - field: "orderType", - type: "select", - dataKey: "outOrderType", - data: [], - }, - { - title: "鍗曟嵁鐘舵��", - field: "orderStatus", - type: "select", - dataKey: "outboundStatusEnum", - data: [], - }, - ], - [ - { - title: "鍒涘缓鏂瑰紡", - field: "createType", - type: "select", - dataKey: "createType", - data: [], - }, - { title: "鍒涘缓鑰�", field: "creater", type: "like" }, - { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" }, - { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],} - ], - ]); - const columns = ref([ - { - field: "id", - title: "Id", - type: "int", - width: 90, - hidden: true, - readonly: true, - require: true, - align: "left", - }, - { - field: "warehouseId", - title: "浠撳簱", - type: "string", - width: 90, - align: "left", - bind:{key: "warehouses", data: []} - }, - { - field: "orderNo", - title: "鍗曟嵁缂栧彿", - type: "string", - width: 160, - align: "left", - // link: true, - }, - { - field: "upperOrderNo", - title: "涓婃父鍗曟嵁缂栧彿", - type: "string", - width: 160, - align: "left", - }, - { - field: "orderType", - title: "鍗曟嵁绫诲瀷", - type: "string", - width: 150, - align: "left", - bind: { key: "outOrderType", data: [] }, - }, - { - field: "orderStatus", - title: "鍗曟嵁鐘舵��", - type: "decimal", - width: 90, - align: "left", - bind: { key: "outboundStatusEnum", data: [] }, - }, - { - field: "createType", - title: "鍒涘缓鏂瑰紡", - type: "string", - width: 120, - align: "left", - bind: { key: "createType", data: [] }, - }, - { - field: "departmentCode", - title: "淇敼鏃堕棿", - type: "string", - width: 120, - align: "left", - hidden:true - }, - { - field: "departmentName", - title: "閮ㄩ棬鍚嶇О", - type: "string", - width: 160, - 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: "鍑哄簱鏄庣粏鍗�", - table: "OnboundOrderDetail", - columns: [ - { - field: "id", - title: "Id", - type: "int", - width: 90, - hidden: true, - readonly: true, - require: true, - align: "left", - }, - { - field: "orderId", - title: "鍑哄簱鍗曚富閿�", - type: "string", - width: 90, - align: "left", - hidden: true, - }, - { - field: "materielCode", - title: "鐗╂枡缂栧彿", - type: "string", - width: 150, - align: "left", - edit: { type: "string" }, - required: true, - }, - { - field: "materielName", - title: "鐗╂枡鍚嶇О", - type: "string", - width: 150, - align: "left", - edit: { type: "string" }, - }, - { - field: "batchNo", - title: "鎵规鍙�", - type: "decimal", - width: 90, - align: "left", - edit: { type: "string" }, - required: true, - }, - { - field: "orderQuantity", - title: "鍗曟嵁鏁伴噺", - type: "string", - width: 90, - align: "left", - edit: { type: "number" }, - required: true, - }, - { - field: "rowNo", - title: "琛屽彿", - type: "string", - width: 90, - align: "left", - edit: { type: "number" }, - required: true, - }, - { - field: "lockQuantity", - title: "閿佸畾鏁伴噺", - type: "int", - width: 120, - align: "left", - }, - { - field: "overOutQuantity", - title: "宸插嚭鏁伴噺", - type: "string", - width: 200, - align: "left", - }, - { - field: "orderDetailStatus", - title: "璁㈠崟鏄庣粏鐘舵��", - type: "string", - width: 180, - align: "left", - bind: { key: "orderDetailStatusEnum", data: [] }, - }, - { - 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", - }, - ], - sortName: "id", - key: "id", - }); - return { - table, - extend, - editFormFields, - editFormOptions, - searchFormFields, - searchFormOptions, - columns, - detail, - }; - }, -}); -</script> - \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrderDetail_Hty.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrderDetail_Hty.vue" deleted file mode 100644 index 704e977..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrderDetail_Hty.vue" +++ /dev/null @@ -1,71 +0,0 @@ -<!-- -*Author锛歫xx - *Contact锛�283591387@qq.com - *浠g爜鐢辨鏋剁敓鎴�,浠讳綍鏇存敼閮藉彲鑳藉鑷磋浠g爜鐢熸垚鍣ㄨ鐩� - *涓氬姟璇峰湪@/extension/widesea_wcs/order/Dt_OutboundOrderDetail_Hty.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> -<script> - import extend from "@/extension/outbound/outboundOrderDetail_Hty.js"; - import { ref, defineComponent } from "vue"; - export default defineComponent({ - setup() { - const table = ref({ - key: 'id', - footer: "Foots", - cnName: '鍘嗗彶鍑哄簱鍗曟槑缁�', - name: 'outboundOrderDetail_Hty', - url: "/OutboundOrderDetail_Hty/", - sortName: "id" - }); - const editFormFields = ref({}); - const editFormOptions = ref([]); - const searchFormFields = ref({}); - const searchFormOptions = ref([]); - const columns = ref([{field:'id',title:'涓婚敭',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'}, - {field:'orderId',title:'鍑哄簱鍗曚富閿�',type:'int',width:110,require:true,align:'left',sort:true}, - {field:'materielCode',title:'鐗╂枡缂栧彿',type:'string',width:110,require:true,align:'left'}, - {field:'materielName',title:'鐗╂枡鍚嶇О',type:'string',width:180,align:'left'}, - {field:'batchNo',title:'鎵规鍙�',type:'string',width:110,require:true,align:'left'}, - {field:'orderQuantity',title:'鍗曟嵁鏁伴噺',type:'decimal',width:110,require:true,align:'left'}, - {field:'lockQuantity',title:'閿佸畾鏁伴噺',type:'decimal',width:110,require:true,align:'left'}, - {field:'overOutQuantity',title:'宸插嚭鏁伴噺',type:'decimal',width:110,require:true,align:'left'}, - {field:'orderDetailStatus',title:'璁㈠崟鏄庣粏鐘舵��',type:'int',width:110,require:true,align:'left'}, - {field:'remark',title:'澶囨敞',type:'string',width:220,align:'left'}, - {field:'sourceId',title:'婧愪富閿�',type:'int',width:110,require:true,align:'left'}, - {field:'operateType',title:'澶囨敞',type:'string',width:110,require:true,align:'left'}, - {field:'creater',title:'鍒涘缓浜�',type:'string',width:110,require:true,align:'left'}, - {field:'createDate',title:'鍒涘缓鏃堕棿',type:'datetime',width:150,require:true,align:'left',sort:true}, - {field:'modifier',title:'淇敼浜�',type:'string',width:100,align:'left'}, - {field:'modifyDate',title:'淇敼鏃ユ湡',type:'datetime',width:150,align:'left',sort:true}]); - const detail = ref({ - cnName: "#detailCnName", - table: "#detailTable", - columns: [], - sortName: "", - key: "" - }); - return { - table, - extend, - editFormFields, - editFormOptions, - searchFormFields, - searchFormOptions, - columns, - detail, - }; - }, - }); -</script> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrder_Hty.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrder_Hty.vue" deleted file mode 100644 index 7019c6c..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outboundOrder_Hty.vue" +++ /dev/null @@ -1,115 +0,0 @@ -<!-- -*Author锛歫xx - *Contact锛�283591387@qq.com - *浠g爜鐢辨鏋剁敓鎴�,浠讳綍鏇存敼閮藉彲鑳藉鑷磋浠g爜鐢熸垚鍣ㄨ鐩� - *涓氬姟璇峰湪@/extension/widesea_wcs/order/Dt_OutboundOrder_Hty.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> -<script> - import extend from "@/extension/outbound/outboundOrder_Hty.js"; - import { ref, defineComponent } from "vue"; - export default defineComponent({ - setup() { - const table = ref({ - key: 'id', - footer: "Foots", - cnName: '鍘嗗彶鍑哄簱鍗�', - name: 'outboundOrder_Hty', - url: "/OutboundOrder_Hty/", - sortName: "id" - }); - const editFormFields = ref({}); - const editFormOptions = ref([]); - const searchFormFields = ref({}); - const searchFormOptions = ref([ - [ - { title: "鍗曟嵁缂栧彿", field: "orderNo", type: "like" }, - { title: "涓婃父鍗曟嵁缂栧彿", field: "upperOrderNo", type: "like" }, - { - title: "鍗曟嵁绫诲瀷", - field: "orderType", - type: "select", - dataKey: "outOrderType", - data: [], - }, - { - title: "鍗曟嵁鐘舵��", - field: "orderStatus", - type: "select", - dataKey: "inboundState", - data: [], - }, - ], - [ - { - title: "鍒涘缓鏂瑰紡", - field: "createType", - type: "select", - dataKey: "createType", - data: [], - }, - { title: "鍒涘缓鑰�", field: "creater", type: "like" }, - { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" }, - ] - ]); - const columns = ref([{field:'id',title:'涓婚敭',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'}, - {field:'orderNo',title:'鍗曟嵁缂栧彿',type:'string',width:110,require:true,align:'left',sort:true}, - {field:'upperOrderNo',title:'涓婃父鍗曟嵁缂栧彿',type:'string',width:110,align:'left'}, - {field:'orderType',title:'鍗曟嵁绫诲瀷',type:'int',width:110,require:true,align:'left'}, - {field:'orderStatus',title:'鍗曟嵁鐘舵��',type:'int',width:110,require:true,align:'left'}, - {field:'createType',title:'鍒涘缓鏂瑰紡',type:'int',width:110,require:true,align:'left'}, - {field:'remark',title:'澶囨敞',type:'string',width:180,align:'left'}, - {field:'sourceId',title:'婧愪富閿�',type:'int',width:110,require:true,align:'left'}, - {field:'operateType',title:'澶囨敞',type:'string',width:110,require:true,align:'left'}, - {field:'creater',title:'鍒涘缓浜�',type:'string',width:110,require:true,align:'left'}, - {field:'createDate',title:'鍒涘缓鏃堕棿',type:'datetime',width:150,require:true,align:'left',sort:true}, - {field:'modifier',title:'淇敼浜�',type:'string',width:100,align:'left'}, - {field:'modifyDate',title:'淇敼鏃ユ湡',type:'datetime',width:150,align:'left',sort:true}]); - const detail = ref({ - cnName: "鍘嗗彶鍑哄簱鍗曟槑缁�", - table: "OutboundOrderDetail_Hty", - columns: [ - {field:'id',title:'涓婚敭',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'}, - {field:'orderId',title:'鍑哄簱鍗曚富閿�',type:'int',width:110,require:true,align:'left',sort:true}, - {field:'materielCode',title:'鐗╂枡缂栧彿',type:'string',width:110,require:true,align:'left'}, - {field:'materielName',title:'鐗╂枡鍚嶇О',type:'string',width:180,align:'left'}, - {field:'batchNo',title:'鎵规鍙�',type:'string',width:110,require:true,align:'left'}, - {field:'orderQuantity',title:'鍗曟嵁鏁伴噺',type:'decimal',width:110,require:true,align:'left'}, - {field:'lockQuantity',title:'閿佸畾鏁伴噺',type:'decimal',width:110,require:true,align:'left'}, - {field:'overOutQuantity',title:'宸插嚭鏁伴噺',type:'decimal',width:110,require:true,align:'left'}, - {field:'orderDetailStatus',title:'璁㈠崟鏄庣粏鐘舵��',type:'int',width:110,require:true,align:'left'}, - {field:'remark',title:'澶囨敞',type:'string',width:220,align:'left'}, - {field:'sourceId',title:'婧愪富閿�',type:'int',width:110,require:true,align:'left'}, - {field:'operateType',title:'澶囨敞',type:'string',width:110,require:true,align:'left'}, - {field:'creater',title:'鍒涘缓浜�',type:'string',width:110,require:true,align:'left'}, - {field:'createDate',title:'鍒涘缓鏃堕棿',type:'datetime',width:150,require:true,align:'left',sort:true}, - {field:'modifier',title:'淇敼浜�',type:'string',width:100,align:'left'}, - {field:'modifyDate',title:'淇敼鏃ユ湡',type:'datetime',width:150,align:'left',sort:true} - ], - sortName: "id", - key: "id" - }); - return { - table, - extend, - editFormFields, - editFormOptions, - searchFormFields, - searchFormOptions, - columns, - detail, - }; - }, - }); -</script> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/ProStockView.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/ProStockView.vue" index ffc36b8..6543683 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/ProStockView.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/ProStockView.vue" @@ -113,10 +113,24 @@ align: "left", }, { + field: "productName", + title: "鐗╂枡鍚嶇О", + type: "string", + width: 200, + align: "left", + }, + { field: "lotNumber", title: "鐗╂枡鎵瑰彿", type: "string", width: 110, + align: "left", + }, + { + field: "productSpec", + title: "鐗╂枡瑙勬牸", + type: "string", + width: 200, align: "left", }, { @@ -125,6 +139,14 @@ type: "string", width: 100, align: "left", + }, + { + field: "productUnit", + title: "鐗╂枡鍗曚綅", + type: "string", + width: 100, + align: "left", + bind: { key: "materielUnitEnum", data: [] }, }, { field: "row", @@ -235,6 +257,27 @@ align: "left", }, { + field: "productName", + title: "鐗╂枡鍚嶇О", + type: "string", + width: 150, + align: "left", + }, + { + field: "lotNumber", + title: "鐗╂枡鎵瑰彿", + type: "string", + width: 90, + align: "left", + }, + { + field: "productSpec", + title: "鐗╂枡瑙勬牸", + type: "string", + width: 90, + align: "left", + }, + { field: "stockQty", title: "搴撳瓨鏁�", type: "string", @@ -242,8 +285,8 @@ align: "left", }, { - field: "lotNumber", - title: "鐗╂枡鎵瑰彿", + field: "productUnit", + title: "鍗曚綅", type: "string", width: 90, align: "left", diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/stockInfo.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/stockInfo.vue" index 3ba97af..6aaff96 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/stockInfo.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/stock/stockInfo.vue" @@ -134,6 +134,13 @@ bind: { key: "stockStatusEmun", data: [] }, }, { + field: "stockLength", + title: "搴撳瓨鎬婚暱", + type: "string", + width: 110, + align: "left", + }, + { field: "materielWeight", title: "鐗╂枡閲嶉噺", type: "string", diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicRepository/BasicRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicRepository/BasicRepository.cs" index d3c9037..99e08ba 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicRepository/BasicRepository.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicRepository/BasicRepository.cs" @@ -27,12 +27,15 @@ public IPalletTypeInfoRepository PalletTypeInfoRepository { get; } - public BasicRepository(ILocationInfoRepository locationInfoRepository, IMaterielInfoRepository materielInfoRepository, IWarehouseRepository warehouseRepository, IPalletTypeInfoRepository palletTypeInfoRepository) + public ISupplierInfoRepository SupplierInfoRepository { get; } + + public BasicRepository(ILocationInfoRepository locationInfoRepository, IMaterielInfoRepository materielInfoRepository, IWarehouseRepository warehouseRepository, IPalletTypeInfoRepository palletTypeInfoRepository, ISupplierInfoRepository supplierInfoRepository) { LocationInfoRepository = locationInfoRepository; MaterielInfoRepository = materielInfoRepository; WarehouseRepository = warehouseRepository; PalletTypeInfoRepository = palletTypeInfoRepository; + SupplierInfoRepository = supplierInfoRepository; } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/APIEnum/APIEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/APIEnum/APIEnum.cs" index e8d1e48..6f347c5 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/APIEnum/APIEnum.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/APIEnum/APIEnum.cs" @@ -16,6 +16,11 @@ /// 鍥炶皟WCS浠诲姟瀹屾垚 /// </summary> [Description("鍥炶皟WCS浠诲姟瀹屾垚")] - FeedBackWCSTaskCompleted + FeedBackWCSTaskCompleted, + /// <summary> + /// 鍗氭�濋�氶噰璐叆搴撲笂浼� + /// </summary> + [Description("鍗氭�濋�氶噰璐叆搴撲笂浼�")] + BSTPurchaseUp, } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/MaterielEnum/MaterialMenu.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/MaterielEnum/MaterialMenu.cs" new file mode 100644 index 0000000..720d277 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/MaterielEnum/MaterialMenu.cs" @@ -0,0 +1,81 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_Common.MaterielEnum +{ + /// <summary> + /// 搴撳瓨缁勭粐 + /// </summary> + public enum MaterielInvOrgEnum + { + /// <summary> + /// 鑰佸巶 + /// </summary> + [Description("鑰佸巶")] + 鑰佸巶 = 1, + + /// <summary> + /// 鏂板巶 + /// </summary> + [Description("鏂板巶")] + 鏂板巶 = 2, + } + + /// <summary> + /// 鐗╂枡鍩烘湰鍒嗙被 + /// </summary> + public enum MaterielTypeEnum + { + /// <summary> + /// 鎴愬搧 + /// </summary> + [Description("鎴愬搧")] + 鎴愬搧 = 1, + + /// <summary> + /// 鍗婃垚鍝� + /// </summary> + [Description("鍗婃垚鍝�")] + 鍗婃垚鍝� = 2, + + /// <summary> + /// 鍘熸潗鏂� + /// </summary> + [Description("鍘熸潗鏂�")] + 鍘熸潗鏂� = 3, + + /// <summary> + /// 杈呮枡澶囦欢 + /// </summary> + [Description("杈呮枡澶囦欢")] + 杈呮枡澶囦欢 = 4 + } + + /// <summary> + /// 鐗╂枡鍗曚綅鍒嗙被 + /// </summary> + public enum MaterielUnitEnum + { + /// <summary> + /// 鍗冨厠 + /// </summary> + [Description("鍗冨厠")] + Kg = 1, + + /// <summary> + /// 绫� + /// </summary> + [Description("绫�")] + M = 2, + + /// <summary> + /// 涓� + /// </summary> + [Description("涓�")] + Pcs = 3 + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/MaterielEnum/MaterielInvOrgEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/MaterielEnum/MaterielInvOrgEnum.cs" deleted file mode 100644 index 0191035..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/MaterielEnum/MaterielInvOrgEnum.cs" +++ /dev/null @@ -1,27 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace WIDESEA_Common.MaterielEnum -{ - /// <summary> - /// 搴撳瓨缁勭粐 - /// </summary> - public enum MaterielInvOrgEnum - { - /// <summary> - /// 鑰佸巶 - /// </summary> - [Description("鑰佸巶")] - 鑰佸巶 = 1, - - /// <summary> - /// 鏂板巶 - /// </summary> - [Description("鏂板巶")] - 鏂板巶 = 2, - } -} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/MaterielEnum/MaterielTypeEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/MaterielEnum/MaterielTypeEnum.cs" deleted file mode 100644 index e1dbbd4..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/MaterielEnum/MaterielTypeEnum.cs" +++ /dev/null @@ -1,39 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace WIDESEA_Common.MaterielEnum -{ - /// <summary> - /// 鐗╂枡鍩烘湰鍒嗙被 - /// </summary> - public enum MaterielTypeEnum - { - /// <summary> - /// 鎴愬搧 - /// </summary> - [Description("鎴愬搧")] - 鎴愬搧 = 1, - - /// <summary> - /// 鍗婃垚鍝� - /// </summary> - [Description("鍗婃垚鍝�")] - 鍗婃垚鍝� = 2, - - /// <summary> - /// 鍘熸潗鏂� - /// </summary> - [Description("鍘熸潗鏂�")] - 鍘熸潗鏂� = 3, - - /// <summary> - /// 杈呮枡澶囦欢 - /// </summary> - [Description("杈呮枡澶囦欢")] - 杈呮枡澶囦欢 = 4 - } -} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/OrderEnum/OutboundOrderMenu.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/OrderEnum/OutboundOrderMenu.cs" index ea1b688..5f84423 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/OrderEnum/OutboundOrderMenu.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/OrderEnum/OutboundOrderMenu.cs" @@ -10,8 +10,8 @@ /// <summary> /// 鍑哄簱鍗曟嵁鐘舵��<br/> /// 0锛氭湭寮�濮�<br/> - /// 1锛氬叆搴撲腑<br/> - /// 2锛氬叆搴撳畬鎴�<br/> + /// 1锛氬嚭搴撲腑<br/> + /// 2锛氬嚭搴撳畬鎴�<br/> /// 99锛氬叧闂�<br/> public enum OutOrderStatusEnum { diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs" index 7ff2d02..0b0b7cc 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs" @@ -24,6 +24,11 @@ /// </summary> [Description("鎴愬搧搴�")] LLDCP=2, - + /// <summary> + /// 杈呮枡搴� + /// </summary> + [Description("杈呮枡搴�")] + LLDFL = 3 + } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/PageDataOptions.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/PageDataOptions.cs" index 1fff57b..8838eeb 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/PageDataOptions.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/BaseModels/PageDataOptions.cs" @@ -79,11 +79,11 @@ } else if (expressionType == LinqExpressionType.ThanOrEqual) { - where += $"{searchParametersList[i].Name} {HtmlElementType.ThanOrEqual} '{searchParametersList[i].Value}'"; + where += $"{searchParametersList[i].Name} {HtmlElementType.thanorequal} '{searchParametersList[i].Value}'"; } else if (expressionType == LinqExpressionType.LessThanOrEqual) { - where += $"{searchParametersList[i].Name} {HtmlElementType.LessOrequal} '{searchParametersList[i].Value}'"; + where += $"{searchParametersList[i].Name} {HtmlElementType.lessOrequal} '{searchParametersList[i].Value}'"; } else if (expressionType == LinqExpressionType.GreaterThan) { diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/CodeConfigEnum/RuleCodeEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/CodeConfigEnum/RuleCodeEnum.cs" index 1af5034..3579163 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/CodeConfigEnum/RuleCodeEnum.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/CodeConfigEnum/RuleCodeEnum.cs" @@ -17,44 +17,21 @@ /// </summary> [Description("鍏ュ簱鍗曞彿缂栫爜瑙勫垯缂栧彿")] InboundOrderRule, - /// <summary> /// 鍑哄簱鍗曞彿缂栫爜瑙勫垯缂栧彿 /// </summary> [Description("鍑哄簱鍗曞彿缂栫爜瑙勫垯缂栧彿")] OutboundOrderRule, - - /// <summary> - /// 鏀惰揣鍗曞彿缂栫爜瑙勫垯缂栧彿 - /// </summary> - [Description("鏀惰揣鍗曞彿缂栫爜瑙勫垯缂栧彿")] - ReceiveOrderRule, - - /// <summary> - /// 璐ㄦ鍗曞彿缂栫爜瑙勫垯 - /// </summary> - [Description("璐ㄦ鍗曞彿缂栫爜瑙勫垯")] - CheckOrderRule, - /// <summary> - /// 鍙戞枡鍗曞彿缂栫爜瑙勫垯 - /// </summary> - [Description("鍙戞枡鍗曞彿缂栫爜瑙勫垯")] - FLCodeRule, - /// <summary> - /// 鍏ユ枡鍗曞彿缂栫爜瑙勫垯 - /// </summary> - [Description("鍏ユ枡鍗曞彿缂栫爜瑙勫垯")] - RLCodeRule, - /// <summary> - /// 閫�鏂欏崟鍙风紪鐮佽鍒� - /// </summary> - [Description("閫�鏂欏崟鍙风紪鐮佽鍒�")] - TLCodeRule, /// <summary> /// 鐩樼偣鍗曞彿缂栫爜瑙勫垯 /// </summary> [Description("鐩樼偣鍗曞彿缂栫爜瑙勫垯")] PDCodeRule, + /// <summary> + /// 閫�鏂欏崟鍙风紪鐮佽鍒� + /// </summary> + [Description("閫�鏂欏崟鍙风紪鐮佽鍒�")] + TLCodeRule, /// <summary> /// 鎴愬搧鍏ュ簱鍗曞彿缂栫爜瑙勫垯 /// </summary> @@ -64,6 +41,6 @@ /// 鎴愬搧鍑哄簱鍗曞彿缂栫爜瑙勫垯 /// </summary> [Description("鎴愬搧鍑哄簱鍗曞彿缂栫爜瑙勫垯")] - ProOutCOdeRule + ProOutCodeRule } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Const/HtmlElementType.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Const/HtmlElementType.cs" index 735718d..9d19bfb 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Const/HtmlElementType.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Const/HtmlElementType.cs" @@ -24,8 +24,8 @@ public const string LT = "<"; public const string like = "like"; - public const string ThanOrEqual = ">="; - public const string LessOrequal = "<="; + public const string thanOrEqual = ">="; + public const string lessOrequal = "<="; public const string Contains = "in"; public const string Equal = "="; } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/UtilConvert.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/UtilConvert.cs" index d9c8538..856f823 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/UtilConvert.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Core/Helper/UtilConvert.cs" @@ -958,10 +958,10 @@ case HtmlElementType.Contains: linqExpression = LinqExpressionType.In; break; - case HtmlElementType.ThanOrEqual: + case HtmlElementType.thanOrEqual: linqExpression = LinqExpressionType.ThanOrEqual; break; - case HtmlElementType.LessOrequal: + case HtmlElementType.lessOrequal: linqExpression = LinqExpressionType.LessThanOrEqual; break; case HtmlElementType.GT: diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/BSTMaterialDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/BSTMaterialDTO.cs" index 810340c..dd58b5f 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/BSTMaterialDTO.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Basic/BSTMaterialDTO.cs" @@ -78,7 +78,7 @@ /// 鐘舵�� /// </summary> [PropertyValidate("鐘舵��", NotNullAndEmpty = true)] - public int State { get; set; } + public int Status { get; set; } /// <summary> /// 搴撳瓨缁勭粐 diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTOutOrderDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTOutOrderDTO.cs" new file mode 100644 index 0000000..5c18821 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/ERP/BSTOutOrderDTO.cs" @@ -0,0 +1,94 @@ +锘縰sing SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.Attributes; + +namespace WIDESEA_DTO.Basic +{ + /// <summary> + /// 鍗氭�濋�氶噰璐叆搴撳崟鎺ユ敹瀹炰綋 + /// </summary> + [ModelValidate] + public class BSTOutOrderDTO + { + /// <summary> + /// 鏁版嵁鑾峰彇鏂瑰紡鏍囪瘑(1:鏂板 2:淇敼 3:鍒犻櫎) + /// </summary> + [PropertyValidate("鏁版嵁鑾峰彇鏂瑰紡鏍囪瘑(1:鏂板 2:淇敼 3:鍒犻櫎)", NotNullAndEmpty = true)] + public int Way { get; set; } + + /// <summary> + /// 绾告澘涓荤敓浜ц鍒扞D + /// </summary> + [PropertyValidate("绾告澘涓荤敓浜ц鍒扞D", NotNullAndEmpty = true)] + public int BoardMpsId { get; set; } + + /// <summary> + /// 璁″垝缂栧彿 + /// </summary> + [PropertyValidate("璁″垝缂栧彿", NotNullAndEmpty = true)] + public string BoardMpsNo { get; set; } + + /// <summary> + /// 鐢熶骇鏃ユ湡 + /// </summary> + [PropertyValidate("鐢熶骇鏃ユ湡", NotNullAndEmpty = true)] + public long ProductionDate { get; set; } + + /// <summary> + /// 绾歌川鍑哄簱鍗曟槑缁嗗垪琛� + /// </summary> + [PropertyValidate("绾歌川鍑哄簱鍗曟槑缁嗗垪琛�", NotNullAndEmpty = true)] + public List<BstBoardMpsDetailItem> BstBoardMpsDetails { get; set; } + } + /// <summary> + /// 閲囪喘鏀惰揣鏄庣粏 + /// </summary> + public class BstBoardMpsDetailItem + { + /// <summary> + /// 鍏宠仈鐨勪富琛↖D + /// </summary> + [PropertyValidate("鍏宠仈鐨勪富琛↖D", NotNullAndEmpty = true)] + public int BoardMpsId { get; set; } + + /// <summary> + /// 骞呭 + /// </summary> + [PropertyValidate("骞呭", NotNullAndEmpty = true)] + public decimal Width { get; set; } + + /// <summary> + /// 闇�姹傞暱搴� + /// </summary> + [PropertyValidate("闇�姹傞暱搴�", NotNullAndEmpty = true)] + public decimal XqLen { get; set; } + + /// <summary> + /// 鎬荤敤閲� + /// </summary> + [PropertyValidate("鎬荤敤閲�", NotNullAndEmpty = true)] + public decimal TotalUsage { get; set; } + + /// <summary> + /// 鐗╂枡鏉ユ簮ID(涓婃父) + /// </summary> + [PropertyValidate("鐗╂枡ID", NotNullAndEmpty = true)] + public int MaterialId { get; set; } + + /// <summary> + /// 鐗╂枡缂栧彿 + /// </summary> + [PropertyValidate("鐗╂枡缂栧彿", NotNullAndEmpty = true)] + public string MaterialNo { get; set; } + + /// <summary> + /// 閲囪喘闀垮害 + /// </summary> + [PropertyValidate("閲囪喘闀垮害", NotNullAndEmpty = true)] + public decimal ProcurementLength { get; set; } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Stock/ProStockViewDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Stock/ProStockViewDTO.cs" index 412d4ff..d794fa4 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Stock/ProStockViewDTO.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_DTO/Stock/ProStockViewDTO.cs" @@ -73,49 +73,47 @@ [ExporterHeader(DisplayName = "鍑鸿揣鍗曞彿")] public string ShipmentOrder { get; set; } /// <summary> - /// 鑳舵鍙� + /// 鎵樼洏鍙� /// </summary> - [ExporterHeader(DisplayName = "鑳舵鍙�")] + [ExporterHeader(DisplayName = "鎵樼洏鍙�")] public string PalletCode { get; set; } /// <summary> - /// 浜у搧缂栫爜 + /// 鐗╂枡缂栫爜 /// </summary> - [ExporterHeader(DisplayName = "浜у搧缂栫爜")] + [ExporterHeader(DisplayName = "鐗╂枡缂栫爜")] public string ProductCode { get; set; } /// <summary> - /// 鐗堟湰 + /// 鐗╂枡鍚嶇О /// </summary> - [ExporterHeader(DisplayName = "鐗堟湰")] - public string ProductVersion { get; set; } - /// <summary> - /// 鐗堟湰 - /// </summary> - [ExporterHeader(DisplayName = "鐗堟湰")] - public string SpecifyVer { get; set; } + [ExporterHeader(DisplayName = "鐗╂枡鍚嶇О")] + public string? ProductName { get; set; } /// <summary> - /// 浜у搧鍛ㄦ湡 + /// 瑙勬牸 /// </summary> - [ExporterHeader(DisplayName = "浜у搧鍛ㄦ湡")] - public string DateCode { get; set; } + [ExporterHeader(DisplayName = "瑙勬牸")] + public string ProductSpec { get; set; } + + /// <summary> + /// 鍗曚綅 + /// </summary> + [ExporterHeader(DisplayName = "鍗曚綅")] + public string ProductUnit { get; set; } /// <summary> /// 浜у搧鎵瑰彿 /// </summary> [ExporterHeader(DisplayName = "浜у搧鎵瑰彿")] public string LotNumber { get; set; } + /// <summary> /// ERP宸ュ崟 /// </summary> [ExporterHeader(DisplayName = "ERP宸ュ崟")] public string ERPOrder { get; set; } - /// <summary> - /// 鍒堕�犲伐鍗� - /// </summary> - [ExporterHeader(DisplayName = "鍒堕�犲伐鍗�")] - public string MoNumber { get; set; } + /// <summary> /// 閿�鍞鍗� /// </summary> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs" index e787b9f..1437228 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs" @@ -28,5 +28,16 @@ { ContractResolver = new CamelCasePropertyNamesContractResolver() }; + + public string BSTPurchaseUp(BSTPurchaseUpModel bSTPurchaseUpModel) + { + Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x=>x.ApiCode==APIEnum.BSTPurchaseUp.ToString()); + + string request = JsonConvert.SerializeObject(bSTPurchaseUpModel, settings); + + string response = HttpHelper.Post(apiInfo.ApiAddress, request); + + return response; + } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/IERPService/IInvokeERPService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/IERPService/IInvokeERPService.cs" index 0a64657..7b7e50d 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/IERPService/IInvokeERPService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/IERPService/IInvokeERPService.cs" @@ -13,6 +13,6 @@ /// </summary> public interface IInvokeERPService : IDependency { - + public string BSTPurchaseUp(BSTPurchaseUpModel bSTPurchaseUpModel); } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/BSTPurchaseUpModel.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/BSTPurchaseUpModel.cs" new file mode 100644 index 0000000..988c272 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/BSTPurchaseUpModel.cs" @@ -0,0 +1,18 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_External.Model +{ + /// <summary> + /// 閲囪喘涓婁紶 + /// </summary> + public class BSTPurchaseUpModel + { + public string Barcode { get; set; } + public int BarcodeQty { get; set;} + public string Rfid { get; set; } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/BSTResponse.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/BSTResponse.cs" new file mode 100644 index 0000000..1b0200a --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/Model/BSTResponse.cs" @@ -0,0 +1,23 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_External.Model +{ + /// <summary> + /// 鍗氭�濋�氳繑鍥� + /// </summary> + public class BSTResponse + { + /// <summary> + /// 杩斿洖淇℃伅 + /// </summary> + public string Msg { get; set; } + /// <summary> + /// 杩斿洖鐮� + /// </summary> + public int Code { get; set; } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IBasicRepository/IBasicRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IBasicRepository/IBasicRepository.cs" index 5be3300..9bfa05c 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IBasicRepository/IBasicRepository.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IBasicRepository/IBasicRepository.cs" @@ -18,5 +18,7 @@ IPalletTypeInfoRepository PalletTypeInfoRepository { get; } + ISupplierInfoRepository SupplierInfoRepository { get; } + } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutBSTOrderDetailRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutBSTOrderDetailRepository.cs" new file mode 100644 index 0000000..29f12a6 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutBSTOrderDetailRepository.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_Model.Models; + +namespace WIDESEA_IOutboundRepository +{ + /// <summary> + /// 鍑哄簱鍗曟槑缁嗕粨鍌ㄦ帴鍙e眰 + /// </summary> + public interface IOutBSTOrderDetailRepository : IRepository<Dt_OutBSTOrderDetail> + { + + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutBSTOrderRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutBSTOrderRepository.cs" new file mode 100644 index 0000000..446d90e --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutBSTOrderRepository.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_Model.Models; + +namespace WIDESEA_IOutboundRepository +{ + /// <summary> + /// 鍑哄簱鍗曚粨鍌ㄦ帴鍙e眰 + /// </summary> + public interface IOutBSTOrderRepository : IRepository<Dt_OutBSTOrder> + { + + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutStockLockInfoRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutStockLockInfoRepository.cs" new file mode 100644 index 0000000..644b08d --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundRepository/IOutStockLockInfoRepository.cs" @@ -0,0 +1,17 @@ +锘縰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 +{ + /// <summary> + /// 鍑哄簱璇︽儏淇℃伅浠撳偍鎺ュ彛灞� + /// </summary> + public interface IOutStockLockInfoRepository : IRepository<Dt_OutStockLockInfo> + { + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutBSTOrderDetailService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutBSTOrderDetailService.cs" new file mode 100644 index 0000000..da7ec84 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutBSTOrderDetailService.cs" @@ -0,0 +1,30 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Common.LocationEnum; +using WIDESEA_Core; +using WIDESEA_Core.BaseServices; +using WIDESEA_Core.Enums; +using WIDESEA_DTO.Stock; +using WIDESEA_IOutboundRepository; +using WIDESEA_Model.Models; + +namespace WIDESEA_IOutboundService +{ + public interface IOutBSTOrderDetailService : IService<Dt_OutBSTOrderDetail> + { + IOutBSTOrderDetailRepository Repository { get; } + /// <summary> + /// 鍒嗛厤搴撳瓨 + /// </summary> + (List<Dt_StockInfo>, List<Dt_OutBSTOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(List<Dt_OutBSTOrderDetail> outboundOrderDetails); + + /// <summary> + /// 鍑哄簱搴撳瓨鍒嗛厤鍚庯紝鏇存柊鏁版嵁搴撴暟鎹� + /// </summary> + WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutBSTOrderDetail> outboundOrderDetails, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null); + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutBSTOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutBSTOrderService.cs" new file mode 100644 index 0000000..17ce972 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutBSTOrderService.cs" @@ -0,0 +1,24 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core; +using WIDESEA_Core.BaseServices; +using WIDESEA_DTO.Basic; +using WIDESEA_DTO.ERP; +using WIDESEA_DTO.Inbound; +using WIDESEA_IOutboundRepository; +using WIDESEA_Model.Models; + +namespace WIDESEA_IOutboundService +{ + public interface IOutBSTOrderService : IService<Dt_OutBSTOrder> + { + IOutBSTOrderRepository Repository { get; } + /// <summary> + /// 娣诲姞鍑哄簱鎺掔▼淇℃伅 + /// </summary> + WebResponseContent AddOutBSTOrder(List<BSTOutOrderDTO> bSTOutOrderDTOs); + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" new file mode 100644 index 0000000..a66209d --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" @@ -0,0 +1,29 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Common.StockEnum; +using WIDESEA_Core; +using WIDESEA_Core.BaseServices; +using WIDESEA_Core.Enums; +using WIDESEA_IOutboundRepository; +using WIDESEA_Model.Models; + +namespace WIDESEA_IOutboundService +{ + public interface IOutStockLockInfoService : IService<Dt_OutStockLockInfo> + { + /// <summary> + /// + /// </summary> + IOutStockLockInfoRepository Repository { get; } + + List<Dt_OutStockLockInfo> GetByOrderDetailId(string orderNo,int orderDetailId, OutLockStockStatusEnum? outStockStatus); + + /// <summary> + /// 鐢熸垚鍑哄簱璇︽儏 + /// </summary> + Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutBSTOrder outBSTOrder, Dt_OutBSTOrderDetail outboundOrderDetail, Dt_StockInfo outStock, decimal assignQuantity, int? taskNum = null); + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockRepository/IStockInfoRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockRepository/IStockInfoRepository.cs" index d0f4da4..e1800a6 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockRepository/IStockInfoRepository.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockRepository/IStockInfoRepository.cs" @@ -15,7 +15,7 @@ List<Dt_StockInfo> GetStockInfos(string materielCode); - List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, List<string> locationCodes); + List<Dt_StockInfo> GetStockInfos(int materielId,decimal width, List<string> locationCodes); List<Dt_StockInfo> GetStockInfosByIds(List<int> ids); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IStockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IStockInfoService.cs" index 20766b3..8ee3bff 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IStockInfoService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_IStockService/IStockInfoService.cs" @@ -15,6 +15,17 @@ { IStockInfoRepository Repository { get; } WebResponseContent StockQueryData(SaveModel saveModel); + /// <summary> + /// 鎵嬪姩缁勭洏 + /// </summary> WebResponseContent ManualMaterielGroup(SaveModel saveModel); + /// <summary> + /// 鑾峰彇鍙娇鐢ㄥ簱瀛� + /// </summary> + List<Dt_StockInfo> GetUseableStocks(int materielId,decimal width, int warehoseId); + /// <summary> + /// 鍒嗛厤瀹為檯搴撳瓨 + /// </summary> + List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, decimal needQuantity); } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs" index 2a8bd1b..de91dfc 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs" @@ -65,10 +65,17 @@ WebResponseContent DeviceRequestInboundTaskSimple(string stationCode, string palletCode); /// <summary> - /// 鍏ュ簱浠诲姟璇锋眰 + /// 鍘熸枡鍏ュ簱浠诲姟璇锋眰 /// </summary> /// <returns></returns> WebResponseContent RequestYLWMSTaskSimple(string stationCode, string palletCode); + + /// <summary> + /// 鍘熸枡鍏ュ簱鐢宠 + /// </summary> + /// <param name="palletCode"></param> + /// <returns></returns> + WebResponseContent YLPurchaseBoxing(string palletCode); /// <summary> /// 鍒嗛厤鍘熸枡宸烽亾 @@ -159,7 +166,7 @@ /// 杈呮枡鍏ュ簱 /// </summary> /// <returns></returns> - WebResponseContent InboundFLTask(string barCode, string startPoint, string matCode, int matCount); + WebResponseContent InboundFLOrCPTask(string barCode, string startPoint, string matCode, int matCount); /// <summary> /// 鎴愬搧鍑哄簱 @@ -215,5 +222,11 @@ /// <param name="saveModel"></param> /// <returns></returns> WebResponseContent PrintInbound(SaveModel saveModel); + /// <summary> + /// 鍒涘缓鍘熺焊鐢熶骇鎺掔▼鍑哄簱浠诲姟 + /// </summary> + /// <param name="keys"></param> + /// <returns></returns> + WebResponseContent CreateBSTOutboundTasks(int[] keys); } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/PurchaseBSTOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/PurchaseBSTOrderService.cs" index 9d625d1..0c37854 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/PurchaseBSTOrderService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_InboundService/PurchaseBSTOrderService.cs" @@ -6,7 +6,9 @@ using System.Text; using System.Threading.Tasks; using WIDESEA_BasicRepository; +using WIDESEA_Common.MaterielEnum; using WIDESEA_Common.OrderEnum; +using WIDESEA_Common.WareHouseEnum; using WIDESEA_Core; using WIDESEA_Core.BaseRepository; using WIDESEA_Core.BaseServices; @@ -57,21 +59,47 @@ List<BSTPurchaseOrderDTO> bSTPurchaseOrderDTOsUpdate = bSTPurchaseOrderDTOs.Where(x => x.Way == 2).ToList(); //鍒犻櫎 List<BSTPurchaseOrderDTO> bSTPurchaseOrderDTOsDel = bSTPurchaseOrderDTOs.Where(x => x.Way == 3).ToList(); - + //鑾峰彇鎵�鏈夌墿鏂� + List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt() && x.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt() && x.MaterialSourceId != 0); + //鑾峰彇鎵�鏈変緵搴斿晢 + List<Dt_SupplierInfo> supplierInfos = _basicRepository.SupplierInfoRepository.QueryData(x => x.InvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt()); + List<Dt_PurchaseBSTOrder> purchaseAddBSTOrders = new List<Dt_PurchaseBSTOrder>(); List<Dt_PurchaseBSTOrder> purchaseUpdateBSTOrders = new List<Dt_PurchaseBSTOrder>(); List<Dt_PurchaseBSTOrder> purchaseDeleteBSTOrders = new List<Dt_PurchaseBSTOrder>(); if (bSTPurchaseOrderDTOsAdd.Count>0) { - //鍒ゆ柇閲嶅鎻掑叆 + //鍒ゆ柇渚涘簲鍟� + BSTPurchaseOrderDTO? bSTPurchaseOrderDTO = bSTPurchaseOrderDTOsAdd.FirstOrDefault(x => !supplierInfos.Select(x=>x.SupplierCode).Contains(x.VendNo)); + if (bSTPurchaseOrderDTO != null) + { + return content.Error($"閲囪喘{nameof(BSTPurchaseOrderDTO.PaperReceiptNo)}:{bSTPurchaseOrderDTO.PaperReceiptNo}渚涘簲鍟�:{bSTPurchaseOrderDTO.VendNo}涓嶅瓨鍦�"); + } + //鍒ゆ柇鍗曟嵁 Dt_PurchaseBSTOrder? ExistAddPurchase = OldpurchaseBSTOrders.FirstOrDefault(x => bSTPurchaseOrderDTOsAdd.Select(x => x.PaperReceiptId).Contains(x.PaperReceiptId)); if (ExistAddPurchase != null) { return content.Error($"閲囪喘鏀惰揣Id{nameof(BSTPurchaseOrderDTO.PaperReceiptId)}:{ExistAddPurchase.PaperReceiptId}宸插瓨鍦�"); } + //楠岃瘉鏉$爜閲嶅 + List<Dt_PurchaseBSTOrderDetail> purchaseBSTOrderDetails = OldpurchaseBSTOrders.SelectMany(x => x.Details).ToList(); + List<PaperReceiptDetailsItem> paperReceiptDetailsItems = bSTPurchaseOrderDTOsAdd.SelectMany(x => x.PaperReceiptDetails).ToList(); + var ExistDetail = purchaseBSTOrderDetails.FirstOrDefault(x => paperReceiptDetailsItems.Select(x => x.Barcode).Contains(x.Barcode)); + if (ExistDetail!=null) + { + return content.Error($"閲囪喘鏉$爜{nameof(ExistDetail.Barcode)}:{ExistDetail.Barcode}宸插瓨鍦�"); + } + //鍒ゆ柇鏄惁瀛樺湪鐗╂枡 + PaperReceiptDetailsItem? paperReceiptDetailsItem = paperReceiptDetailsItems.FirstOrDefault(x => !materielInfos.Select(x => x.MaterialSourceId).Contains(x.MaterialId)); + if (paperReceiptDetailsItem!=null) + { + return content.Error($"閲囪喘鏉$爜{nameof(ExistDetail.Barcode)}:{ExistDetail.Barcode}鐗╂枡Id:{paperReceiptDetailsItem.MaterialId}涓嶅瓨鍦�"); + } foreach (var item in bSTPurchaseOrderDTOsAdd) { + List<Dt_PurchaseBSTOrderDetail> bSTOrderDetails = item.PaperReceiptDetails.Select(x=>_mapper.Map<Dt_PurchaseBSTOrderDetail>(x)).ToList(); Dt_PurchaseBSTOrder purchaseBSTOrder = _mapper.Map<Dt_PurchaseBSTOrder>(item); + purchaseBSTOrder.Details = bSTOrderDetails; purchaseAddBSTOrders.Add(purchaseBSTOrder); } } @@ -90,10 +118,28 @@ return content.Error($"鏈壘鍒版寚瀹氶噰璐敹璐у崟{nameof(BSTPurchaseOrderDTO.PaperReceiptId)}:{bSTPurchaseOrderDTO?.PaperReceiptId}"); } } + if (bSTPurchaseOrderDTOsDel.Count>0) + { + List<Dt_PurchaseBSTOrder>? ExistDelPurchase = OldpurchaseBSTOrders.Where(x => bSTPurchaseOrderDTOsDel.Select(x => x.PaperReceiptId).Contains(x.PaperReceiptId)).ToList(); + //鏇存柊鐨勫崟鎹槸鍚﹀瓨鍦� + if (ExistDelPurchase.Count == bSTPurchaseOrderDTOsDel.Count) + { + + } + else + { + BSTPurchaseOrderDTO? bSTPurchaseOrderDTO = bSTPurchaseOrderDTOsDel.FirstOrDefault(x => !ExistDelPurchase.Select(x => x.PaperReceiptId).Contains(x.PaperReceiptId)); + return content.Error($"鏈壘鍒版寚瀹氶噰璐敹璐у崟{nameof(BSTPurchaseOrderDTO.PaperReceiptId)}:{bSTPurchaseOrderDTO?.PaperReceiptId}"); + } + } + _unitOfWorkManage.BeginTran(); + BaseDal.Db.InsertNav(purchaseAddBSTOrders).Include(x => x.Details).ExecuteCommand(); + _unitOfWorkManage.CommitTran(); content.OK("鎺ユ敹鎴愬姛"); } catch (Exception ex) { + _unitOfWorkManage.RollbackTran(); content.Error(ex.Message); } return content; diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutBSTOrder.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutBSTOrder.cs" new file mode 100644 index 0000000..b91341d --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutBSTOrder.cs" @@ -0,0 +1,74 @@ +锘縰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> + /// BST鍑哄簱鎺掔▼鍗� + /// </summary> + [SugarTable(nameof(Dt_OutBSTOrder), "BST鍑哄簱鎺掔▼鍗�"), ModelValidate] + public class Dt_OutBSTOrder : 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> + /// 鍑哄簱鏉ユ簮ID + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鏉ユ簮ID")] + public int BoardMpsId { get; set; } + + /// <summary> + /// WMS鍗曟嵁缂栧彿 + /// </summary> + [CodeRule(RuleCodeEnum.OutboundOrderRule)] + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "WMS鍗曟嵁缂栧彿", IsOnlyIgnoreUpdate = true)] + public string OutBSTOrderNo { get; set; } + + /// <summary> + /// 鍑哄簱缂栧彿(涓婃父) + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍑哄簱缂栧彿(涓婃父)")] + public string BoardMpsNo { get; set; } + + /// <summary> + /// 鍑哄簱鍗曠姸鎬� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鍗曠姸鎬�")] + public int OutBSTOrderStatus { get; set; } + + /// <summary> + /// 鍑哄簱璁″垝鏃堕棿 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍑哄簱璁″垝鏃堕棿")] + public DateTime ProductionDate { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "澶囨敞")] + public string Remark { get; set; } + + /// <summary> + /// 閲囪喘鍒楄〃 + /// </summary> + [Navigate(NavigateType.OneToMany, nameof(Dt_OutBSTOrderDetail.OutBSTOrderId), nameof(Id))] + public List<Dt_OutBSTOrderDetail> Details { get; set; } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutBSTOrderDetail.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutBSTOrderDetail.cs" new file mode 100644 index 0000000..4251cc5 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutBSTOrderDetail.cs" @@ -0,0 +1,96 @@ +锘縰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.DB.Models; + +namespace WIDESEA_Model.Models +{ + /// <summary> + /// BST鍑哄簱鎺掔▼鏄庣粏 + /// </summary> + [SugarTable(nameof(Dt_OutBSTOrderDetail), "BST鍑哄簱鎺掔▼鏄庣粏"), ModelValidate] + public class Dt_OutBSTOrderDetail : BaseEntity + { + /// <summary> + /// 涓婚敭 + /// </summary> + [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")] + public int Id { get; set; } + + /// <summary> + /// 鍑哄簱涓昏〃ID + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱涓昏〃ID")] + public int OutBSTOrderId { get; set; } + + /// <summary> + /// 鍏宠仈鐨勪富琛↖D(涓婃父) + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍏宠仈鐨勪富琛↖D(涓婃父)")] + public int BoardMpsId { get; set; } + + /// <summary> + /// 骞呭 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "骞呭")] + public decimal Width { get; set; } + + /// <summary> + /// 闇�姹傞暱搴� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "闇�姹傞暱搴�")] + public decimal XqLen { get; set; } + + /// <summary> + /// 鎬荤敤閲� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鎬荤敤閲�")] + public decimal TotalUsage { get; set; } + + /// <summary> + /// 鐗╂枡鏉ユ簮ID(涓婃父) + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鐗╂枡鏉ユ簮ID(涓婃父)")] + public int MaterialId { get; set; } + + /// <summary> + /// 鐗╂枡缂栧彿 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鐗╂枡缂栧彿")] + public string MaterialNo { get; set; } + + /// <summary> + /// 閲囪喘闀垮害 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "閲囪喘闀垮害")] + public decimal ProcurementLength { get; set; } + + /// <summary> + /// 宸插垎閰嶇敤閲� + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "宸插垎閰嶇敤閲�")] + public decimal AssignTotalUsage { get; set; } + + /// <summary> + /// 宸插嚭鐢ㄩ噺 + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "宸插嚭鐢ㄩ噺")] + public decimal OutTotalUsage { get; set; } + + /// <summary> + /// 鐗╂枡鍚嶇О + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡鍚嶇О")] + public string MaterialName { get; set; } + + /// <summary> + /// 鍑哄簱鍗曟槑缁嗙姸鎬� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍑哄簱鍗曟槑缁嗙姸鎬�")] + public int OutBSTOrderDetailStatus { get; set; } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs" new file mode 100644 index 0000000..57c59ef --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs" @@ -0,0 +1,112 @@ +锘縰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.DB.Models; + +namespace WIDESEA_Model.Models +{ + /// <summary> + /// 鍑哄簱璇︽儏 + /// </summary> + [SugarTable(nameof(Dt_OutStockLockInfo), "鍑哄簱璇︽儏")] + public class Dt_OutStockLockInfo : BaseEntity + { + /// <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 = false, ColumnDescription = "鍗曟嵁鏄庣粏涓婚敭")] + public int OrderDetailId { get; set; } + + /// <summary> + /// 鐗╂枡Id + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鐗╂枡Id")] + public int MaterielId { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵规鍙�")] + public string BatchNo { 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, ColumnDescription = "搴撳瓨涓婚敭")] + public int StockId { get; set; } + + /// <summary> + /// 鍗曟嵁鏁伴噺 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鏁伴噺")] + public decimal OrderQuantity { get; set; } + + /// <summary> + /// 鍘熷搴撳瓨閲� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍘熷搴撳瓨閲�")] + public decimal OriginalQuantity { get; set; } + + /// <summary> + /// 鍒嗛厤鍑哄簱閲� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鍒嗛厤鍑哄簱閲�")] + public decimal AssignQuantity { get; set; } + + /// <summary> + /// 璐т綅缂栧彿 + /// </summary> + [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "璐т綅缂栧彿")] + public string LocationCode { get; set; } + + /// <summary> + /// 鎵樼洏缂栧彿 + /// </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> + [SugarColumn(IsNullable = true, ColumnDescription = "浠诲姟鍙�")] + public int? TaskNum { get; set; } + + /// <summary> + /// 鐘舵�� + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鐘舵��")] + public int Status { get; set; } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs" index 5f708fc..7da79a9 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_ProStockInfoDetail.cs" @@ -32,6 +32,26 @@ public string ProductCode { get; set; } /// <summary> + /// 鐗╂枡鍚嶇О + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡鍚嶇О")] + public string ProductName { get; set; } + + /// <summary> + /// 瑙勬牸 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "瑙勬牸")] + public string ProductSpec { get; set; } + + /// <summary> + /// 鍗曚綅 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曚綅")] + public string ProductUnit { get; set; } + + + + /// <summary> /// 搴撳瓨鏁� /// </summary> [SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨鏁�")] diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs" index 301ec0f..979e729 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs" @@ -64,6 +64,12 @@ public int StockStatus { get; set; } /// <summary> + /// 鐗╂枡Id + /// </summary> + [SugarColumn(IsNullable = true, ColumnDescription = "鐗╂枡Id")] + public int MaterielId { get; set; } + + /// <summary> /// 鐗╂枡缂栧彿 /// </summary> [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")] @@ -97,7 +103,7 @@ /// 搴撳瓨鐗╂枡鎬婚暱(m) /// </summary> [SugarColumn(IsNullable = true, ColumnDescription = "搴撳瓨鐗╂枡鎬婚暱(m)")] - public int StockLength { get; set; } + public decimal StockLength { get; set; } /// <summary> /// 鐗╂枡閲嶉噺 diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs" index 98c26f7..4b901cb 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs" @@ -168,6 +168,6 @@ [ImporterHeader(Name = "鐗╂枡鏁伴噺")] [ExporterHeader(DisplayName = "鐗╂枡鏁伴噺")] [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "鐗╂枡鏁伴噺")] - public float Quantity { get; set; } + public decimal Quantity { get; set; } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/WIDESEA_Model.csproj" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/WIDESEA_Model.csproj" index 139965f..80b70f5 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/WIDESEA_Model.csproj" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/WIDESEA_Model.csproj" @@ -18,7 +18,6 @@ <ItemGroup> <Folder Include="Models\Check\" /> - <Folder Include="Models\Outbound\" /> </ItemGroup> </Project> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutBSTOrderDetailRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutBSTOrderDetailRepository.cs" new file mode 100644 index 0000000..7e97db6 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutBSTOrderDetailRepository.cs" @@ -0,0 +1,21 @@ +锘縰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 +{ + /// <summary> + /// 閲囪喘鍗曚粨鍌ㄥ疄鐜板眰 + /// </summary> + public class OutBSTOrderDetailRepository : RepositoryBase<Dt_OutBSTOrderDetail>, IOutBSTOrderDetailRepository + { + public OutBSTOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + { + } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutBSTOrderRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutBSTOrderRepository.cs" new file mode 100644 index 0000000..0066818 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutBSTOrderRepository.cs" @@ -0,0 +1,21 @@ +锘縰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 +{ + /// <summary> + /// BST鍑哄簱鍗曚粨鍌ㄥ疄鐜板眰 + /// </summary> + public class OutBSTOrderRepository : RepositoryBase<Dt_OutBSTOrder>, IOutBSTOrderRepository + { + public OutBSTOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + { + } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutStockLockInfoRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutStockLockInfoRepository.cs" new file mode 100644 index 0000000..dadc43c --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundRepository/OutStockLockInfoRepository.cs" @@ -0,0 +1,20 @@ +锘縰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 +{ + /// <summary> + /// 鍑哄簱璇︽儏淇℃伅浠撳偍瀹炵幇灞� + /// </summary> + public class OutStockLockInfoRepository : RepositoryBase<Dt_OutStockLockInfo>, IOutStockLockInfoRepository + { + public OutStockLockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + { + } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderDetailService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderDetailService.cs" new file mode 100644 index 0000000..1e12beb --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderDetailService.cs" @@ -0,0 +1,166 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Common.LocationEnum; +using WIDESEA_Common.WareHouseEnum; +using WIDESEA_Core; +using WIDESEA_Core.BaseServices; +using WIDESEA_IBasicRepository; +using WIDESEA_IBasicService; +using WIDESEA_IOutboundRepository; +using WIDESEA_IOutboundService; +using WIDESEA_IRecordService; +using WIDESEA_IStockService; +using WIDESEA_Model.Models; +using WIDESEA_OutboundRepository; + +namespace WIDESEA_OutboundService +{ + public class OutBSTOrderDetailService : ServiceBase<Dt_OutBSTOrderDetail, IOutBSTOrderDetailRepository>, IOutBSTOrderDetailService + { + public IOutBSTOrderDetailRepository Repository => BaseDal; + private IOutBSTOrderRepository _outBSTOrderRepository; + private IBasicRepository _basicRepository; + private IStockService _stockService; + private IOutStockLockInfoService _outStockLockInfoService; + private IBasicService _basicService; + private ILocationStatusChangeRecordService _locationStatusChangeRecordService; + + public OutBSTOrderDetailService(IOutBSTOrderDetailRepository BaseDal, IOutBSTOrderRepository outBSTOrderRepository,IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService,IBasicService basicService, ILocationStatusChangeRecordService locationStatusChangeRecordService) : base(BaseDal) + { + _outBSTOrderRepository = outBSTOrderRepository; + _basicRepository = basicRepository; + _stockService = stockService; + _outStockLockInfoService = outStockLockInfoService; + _basicService = basicService; + _locationStatusChangeRecordService=locationStatusChangeRecordService; + } + /// <summary> + /// 鍒嗛厤搴撳瓨 + /// </summary> + public (List<Dt_StockInfo>, List<Dt_OutBSTOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(List<Dt_OutBSTOrderDetail> outboundOrderDetails) + { + if (!outboundOrderDetails.Any()) + { + throw new Exception($"鏈壘鍒板嚭搴撳崟鏄庣粏淇℃伅"); + } + + if (outboundOrderDetails.GroupBy(x => x.OutBSTOrderId).Count() > 1) + { + throw new Exception($"璇峰嬁鍚屾椂鎿嶄綔澶氫釜鍗曟嵁鏄庣粏"); + } + //鑾峰彇鎺掔▼涓昏〃 + Dt_OutBSTOrder outBSTOrder = _outBSTOrderRepository.QueryFirst(x => x.Id == outboundOrderDetails.FirstOrDefault().OutBSTOrderId); + List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>(); + //瀵瑰嚭搴撶墿鏂欒繘琛屽垎缁� + List<Dt_OutBSTOrderDetail> groupDetails = outboundOrderDetails.GroupBy(x => new { x.MaterialId,x.Width }).Select(x => + new Dt_OutBSTOrderDetail { + XqLen = x.Sum(v => v.XqLen), + MaterialId = x.Key.MaterialId, + Width=x.Key.Width + } + ).ToList(); + Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == outBSTOrder.WarehouseId); + //鍑哄簱璇︽儏 + List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); + //璐т綅瀛樺偍 + List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); + + foreach (var item in groupDetails) + { + decimal needQuantity = item.XqLen; + //鑾峰彇鍙敤搴撳瓨 + List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(item.MaterialId,item.Width, outBSTOrder.WarehouseId); + if (!stockInfos.Any()) + { + throw new Exception($"鏈壘鍒板彲鍒嗛厤搴撳瓨"); + } + //鍒嗛厤瀹為檯搴撳瓨 + List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, needQuantity).OrderBy(x => x.StockLength - x.StockOutLength).ToList(); + //娣诲姞搴撳瓨鍒嗛厤 + outStocks.AddRange(autoAssignStocks); + //鑾峰彇鎵�鏈夎鐗╂枡鍗曟嵁 + List<Dt_OutBSTOrderDetail> details = outboundOrderDetails.Where(x => x.MaterialId == item.MaterialId).ToList(); + + for (int i = 0; i < details.Count; i++) + { + //璁㈠崟鏁伴噺 + decimal orderQuantity = details[i].XqLen; + + for (int j = 0; j < autoAssignStocks.Count; j++) + { + //鍑哄簱璁㈠崟鏄庣粏宸插垎閰嶆暟閲� + decimal detailAssignQuantity = outStockLockInfos.Where(x => x.OrderDetailId == details[i].Id).Sum(x => x.AssignQuantity); + + decimal orderDetailNeedQuantity = details[i].XqLen - detailAssignQuantity; + + decimal useStockLength = autoAssignStocks[j].StockLength; + + if (orderDetailNeedQuantity > useStockLength) + { + //鐢熸垚璇︽儏 + Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(outBSTOrder, details[i], autoAssignStocks[j], useStockLength); + outStockLockInfos.Add(outStockLockInfo); + details[i].AssignTotalUsage += useStockLength; + + } + else + { + //鐢熸垚璇︽儏 + Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(outBSTOrder, details[i], autoAssignStocks[j], orderDetailNeedQuantity); + outStockLockInfos.Add(outStockLockInfo); + details[i].AssignTotalUsage = orderQuantity; + break; + } + } + } + + locationInfos.AddRange(_basicRepository.LocationInfoRepository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList())); + } + + return (outStocks, outboundOrderDetails, outStockLockInfos, locationInfos); + } + /// <summary> + /// 鍑哄簱搴撳瓨鍒嗛厤鍚庯紝鏇存柊鏁版嵁搴撴暟鎹� + /// </summary> + public WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutBSTOrderDetail> outboundOrderDetails, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null) + { + try + { + _stockService.StockInfoService.Repository.UpdateData(stockInfos); + BaseDal.UpdateData(outboundOrderDetails); + + List<Dt_OutStockLockInfo> addOutStockLockInfos = outStockLockInfos.Where(x => x.Id == 0).ToList(); + if (addOutStockLockInfos != null && addOutStockLockInfos.Any()) + { + if (tasks != null) + { + addOutStockLockInfos.ForEach(x => + { + x.TaskNum = tasks.FirstOrDefault(v => v.PalletCode == x.PalletCode)?.TaskNum; + }); + } + + _outStockLockInfoService.Repository.AddData(addOutStockLockInfos); + } + List<Dt_OutStockLockInfo> updateOutStockLockInfos = outStockLockInfos.Where(x => x.Id > 0).ToList(); + if (updateOutStockLockInfos != null && updateOutStockLockInfos.Any()) + { + _outStockLockInfoService.Repository.UpdateData(updateOutStockLockInfos); + } + //娣诲姞璐т綅鐘舵�� + _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfos, locationStatus, LocationChangeType.OutboundAssignLocation, "", tasks?.Select(x => x.TaskNum).ToList()); + //鎵归噺鏇存柊璐т綅鐘舵�� + _basicService.LocationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus); + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + return WebResponseContent.Instance.Error(ex.Message); + } + } + + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderService.cs" new file mode 100644 index 0000000..4f27480 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutBSTOrderService.cs" @@ -0,0 +1,123 @@ +锘縰sing AutoMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Common.MaterielEnum; +using WIDESEA_Common.WareHouseEnum; +using WIDESEA_Core; +using WIDESEA_Core.BaseRepository; +using WIDESEA_Core.BaseServices; +using WIDESEA_Core.Helper; +using WIDESEA_DTO.Basic; +using WIDESEA_IBasicRepository; +using WIDESEA_IOutboundRepository; +using WIDESEA_IOutboundService; +using WIDESEA_Model.Models; + +namespace WIDESEA_OutboundService +{ + public class OutBSTOrderService : ServiceBase<Dt_OutBSTOrder, IOutBSTOrderRepository>, IOutBSTOrderService + { + public IOutBSTOrderRepository Repository => BaseDal; + private readonly IBasicRepository _basicRepository; + private readonly IMapper _mapper; + private readonly IUnitOfWorkManage _unitOfWorkManage; + + public OutBSTOrderService(IOutBSTOrderRepository BaseDal,IBasicRepository basicRepository,IMapper mapper,IUnitOfWorkManage unitOfWorkManage) : base(BaseDal) + { + _basicRepository = basicRepository; + _mapper = mapper; + _unitOfWorkManage = unitOfWorkManage; + } + /// <summary> + /// 娣诲姞鍑哄簱鎺掔▼淇℃伅 + /// </summary> + public WebResponseContent AddOutBSTOrder(List<BSTOutOrderDTO> bSTOutOrderDTOs) + { + WebResponseContent content = new WebResponseContent(); + try + { + //鑾峰彇鎵�鏈夊嚭搴撳崟 + List<Dt_OutBSTOrder> OldoutBSTOrders = BaseDal.Db.Queryable<Dt_OutBSTOrder>().Includes(x => x.Details).ToList(); + //鏂板 + List<BSTOutOrderDTO> outOrderDTOsAdd = bSTOutOrderDTOs.Where(x => x.Way == 1).ToList(); + //淇敼 + List<BSTOutOrderDTO> outOrderDTOsUpdate = bSTOutOrderDTOs.Where(x => x.Way == 2).ToList(); + //鍒犻櫎 + List<BSTOutOrderDTO> outOrderDTOsDel = bSTOutOrderDTOs.Where(x => x.Way == 3).ToList(); + //鑾峰彇鎵�鏈夌墿鏂� + List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt() && x.MaterielInvOrgId == MaterielInvOrgEnum.鑰佸巶.ObjToInt() && x.MaterialSourceId != 0); + + List<Dt_OutBSTOrder> outBSTAddOrders = new List<Dt_OutBSTOrder>(); + List<Dt_OutBSTOrder> outBSTUpOrders = new List<Dt_OutBSTOrder>(); + List<Dt_OutBSTOrder> outBSTDelOrders = new List<Dt_OutBSTOrder>(); + //鏂板 + if (outOrderDTOsAdd.Count>0) + { + //鍒ゆ柇鍗曟嵁 + Dt_OutBSTOrder? ExistAddOutOrder = OldoutBSTOrders.FirstOrDefault(x => outOrderDTOsAdd.Select(x => x.BoardMpsId).Contains(x.BoardMpsId)); + if (ExistAddOutOrder != null) + { + return content.Error($"鍑哄簱鎺掔▼Id{nameof(BSTOutOrderDTO.BoardMpsId)}:{ExistAddOutOrder.BoardMpsId}宸插瓨鍦�"); + } + List<BstBoardMpsDetailItem> bstBoardMpsDetailItems = outOrderDTOsAdd.SelectMany(x => x.BstBoardMpsDetails).ToList(); + //鍒ゆ柇鏄惁瀛樺湪鐗╂枡 + BstBoardMpsDetailItem? bstBoardMpsDetailItem = bstBoardMpsDetailItems.FirstOrDefault(x => !materielInfos.Select(x => x.MaterialSourceId).Contains(x.MaterialId)); + if (bstBoardMpsDetailItem != null) + { + return content.Error($"鐢熶骇鎺掔▼{nameof(bstBoardMpsDetailItem.BoardMpsId)}鐗╂枡Id:{bstBoardMpsDetailItem.MaterialId}涓嶅瓨鍦�"); + } + foreach (var item in outOrderDTOsAdd) + { + List<Dt_OutBSTOrderDetail> bSTOrderDetails = item.BstBoardMpsDetails.Select(x => _mapper.Map<Dt_OutBSTOrderDetail>(x)).ToList(); + Dt_OutBSTOrder outBSTOrder = _mapper.Map<Dt_OutBSTOrder>(item); + outBSTOrder.Details=bSTOrderDetails; + outBSTAddOrders.Add(outBSTOrder); + } + } + //淇敼 + if (outOrderDTOsUpdate.Count > 0) + { + List<Dt_OutBSTOrder>? ExistUpdateoutBSTOrders = OldoutBSTOrders.Where(x => outOrderDTOsUpdate.Select(x => x.BoardMpsId).Contains(x.BoardMpsId)).ToList(); + //鏇存柊鐨勫崟鎹槸鍚﹀瓨鍦� + if (ExistUpdateoutBSTOrders.Count == outOrderDTOsUpdate.Count) + { + + } + else + { + BSTOutOrderDTO? bSTOutOrderDTO = outOrderDTOsUpdate.FirstOrDefault(x => !ExistUpdateoutBSTOrders.Select(x => x.BoardMpsId).Contains(x.BoardMpsId)); + return content.Error($"鏈壘鍒版寚瀹氱敓浜ф帓绋嬪崟Id{nameof(BSTOutOrderDTO.BoardMpsId)}:{bSTOutOrderDTO?.BoardMpsId}"); + } + } + //鍒犻櫎 + if (outOrderDTOsDel.Count > 0) + { + List<Dt_OutBSTOrder>? ExistDeloutBSTOrders = OldoutBSTOrders.Where(x => outOrderDTOsDel.Select(x => x.BoardMpsId).Contains(x.BoardMpsId)).ToList(); + //鏇存柊鐨勫崟鎹槸鍚﹀瓨鍦� + if (ExistDeloutBSTOrders.Count == outOrderDTOsDel.Count) + { + + } + else + { + BSTOutOrderDTO? bSTOutOrderDTO = outOrderDTOsDel.FirstOrDefault(x => !ExistDeloutBSTOrders.Select(x => x.BoardMpsId).Contains(x.BoardMpsId)); + return content.Error($"鏈壘鍒版寚瀹氱敓浜ф帓绋嬪崟Id{nameof(BSTOutOrderDTO.BoardMpsId)}:{bSTOutOrderDTO?.BoardMpsId}"); + } + } + _unitOfWorkManage.BeginTran(); + BaseDal.Db.InsertNav(outBSTAddOrders).Include(x => x.Details).ExecuteCommand(); + _unitOfWorkManage.CommitTran(); + content.OK("鎺ユ敹鎴愬姛"); + } + catch (Exception ex) + { + _unitOfWorkManage.RollbackTran(); + content.Error(ex.Message); + } + return content; + } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs" new file mode 100644 index 0000000..703abd3 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutStockLockInfoService.cs" @@ -0,0 +1,68 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Common.StockEnum; +using WIDESEA_Core; +using WIDESEA_Core.BaseRepository; +using WIDESEA_Core.BaseServices; +using WIDESEA_Core.Enums; +using WIDESEA_Core.Helper; +using WIDESEA_IOutboundRepository; +using WIDESEA_IRecordService; +using WIDESEA_IStockService; +using WIDESEA_Model.Models; + +namespace WIDESEA_IOutboundService +{ + public partial class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService + { + + private readonly IStockService _stockService; + private readonly IRecordService _recordService; + + public IOutStockLockInfoRepository Repository => BaseDal; + public IUnitOfWorkManage _unitOfWorkManage; + + public OutStockLockInfoService(IOutStockLockInfoRepository BaseDal, IStockService stockService, IRecordService recordService, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal) + { + _recordService = recordService; + _stockService = stockService; + _unitOfWorkManage = unitOfWorkManage; + } + + + public List<Dt_OutStockLockInfo> GetByOrderDetailId(string orderNo, int orderDetailId, OutLockStockStatusEnum? outStockStatus) + { + return BaseDal.QueryData(x =>x.OrderNo== orderNo && x.OrderDetailId == orderDetailId && outStockStatus == null ? true : x.Status == outStockStatus.ObjToInt()); + } + + /// <summary> + /// 鐢熸垚鍑哄簱璇︽儏 + /// </summary> + public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutBSTOrder outBSTOrder, Dt_OutBSTOrderDetail outboundOrderDetail, Dt_StockInfo outStock, decimal assignQuantity, int? taskNum = null) + { + Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo() + { + PalletCode = outStock.PalletCode, + AssignQuantity = assignQuantity, + MaterielCode = outboundOrderDetail.MaterialNo, + BatchNo = "", + LocationCode = outStock.LocationCode, + MaterielName = outStock.MaterielName, + OrderDetailId = outboundOrderDetail.Id, + OrderNo = outBSTOrder.OutBSTOrderNo, + MaterielId = outStock.MaterielId, + OriginalQuantity = outStock.StockLength, + Status = taskNum == null ? OutLockStockStatusEnum.宸插垎閰�.ObjToInt() : OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(), + StockId = outStock.Id, + TaskNum = taskNum, + OrderQuantity = outboundOrderDetail.XqLen, + Unit = outStock.Unit + }; + + return outStockLockInfo; + } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/StockInfoRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/StockInfoRepository.cs" index 46200a8..0ed53b1 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/StockInfoRepository.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/StockInfoRepository.cs" @@ -32,18 +32,9 @@ return Db.Queryable<Dt_StockInfo>().Where(x => x.MaterielCode == materielCode).ToList(); } - public List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, List<string> locationCodes) + public List<Dt_StockInfo> GetStockInfos(int materielId,decimal width, List<string> locationCodes) { - List<Dt_StockInfo> stockInfos = null; - if (!string.IsNullOrEmpty(lotNo)) - { - var stockSort = Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode) && x.MaterielCode == materielCode && x.BatchNo == lotNo).ToList(); - } - else - { - var stockSort = Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode) && x.MaterielCode == materielCode).ToList(); - } - + List<Dt_StockInfo> stockInfos = Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode) && x.MaterielId == materielId && x.MaterielWide==width && x.StockOutLength<=0).OrderBy(x=>x.CreateDate).ToList(); return stockInfos; } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockViewService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockViewService.cs" index a98b78c..963efed 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockViewService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/ProStockViewService.cs" @@ -127,6 +127,9 @@ stockViewDTOs.ForEach(x => { x.ProductCode = string.Join(",", x.Details.Select(x => x.ProductCode).Distinct()); + x.ProductName = x.Details.FirstOrDefault()?.ProductName ?? ""; + x.ProductSpec = x.Details.FirstOrDefault()?.ProductSpec ?? ""; + x.ProductUnit = x.Details.FirstOrDefault()?.ProductUnit ?? ""; } ); return new PageGridData<ProStockViewDTO>(totalCount + pktotalCount, stockViewDTOs.OrderByDescending(x=>x.CreateDate).ToList()); @@ -259,7 +262,9 @@ stockViewDTOs.ForEach(x => { x.ProductCode = string.Join(",", x.Details.Select(x => x.ProductCode).Distinct()); - x.StockRemark = warehouses.FirstOrDefault(v => v.WarehouseId == x.WarehouseId).WarehouseName; + x.ProductName = x.Details.FirstOrDefault()?.ProductName ?? ""; + x.ProductSpec = x.Details.FirstOrDefault()?.ProductSpec ?? ""; + x.ProductUnit = x.Details.FirstOrDefault()?.ProductUnit ?? ""; } ); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs" index 15b7a83..296426f 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs" @@ -114,21 +114,48 @@ return content; } - public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, int warehoseId) + public List<Dt_StockInfo> GetUseableStocks(int materielId,decimal width, int warehoseId) { List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(warehoseId); - return BaseDal.GetStockInfos(materielCode, batchNo, locationCodes); + return BaseDal.GetStockInfos(materielId,width, locationCodes); } - public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, string palletcode, int warehoseId) + /// <summary> + /// 鍒嗛厤瀹為檯搴撳瓨 + /// </summary> + /// <returns></returns> + public List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, decimal needQuantity) { - Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletcode && x.WarehouseId == warehoseId).First(); - - List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(stockInfo.LocationCode); - - return BaseDal.GetStockInfos(materielCode, batchNo, locationCodes); + List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>(); + //鑾峰彇搴撳瓨鍙敤鏁伴噺 + decimal stockTotalQuantity = stockInfos.Sum(x => x.StockLength-x.StockOutLength); + if (stockTotalQuantity >= needQuantity)//搴撳瓨澶� + { + int index = 0; + while (needQuantity > 0) + { + Dt_StockInfo stockInfo = stockInfos[index]; + decimal useableStockQuantity = stockInfo.StockLength-stockInfo.StockOutLength; + if (useableStockQuantity < needQuantity && useableStockQuantity > 0) + { + stockInfo.StockOutLength=stockInfo.StockLength; + needQuantity -= useableStockQuantity; + } + else + { + stockInfo.StockOutLength += needQuantity; + needQuantity = 0; + } + outStocks.Add(stockInfo); + index++; + } + } + else + { + throw new Exception("搴撳瓨涓嶈冻"); + } + return outStocks; } - } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_SystemService/Sys_DictionaryService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_SystemService/Sys_DictionaryService.cs" index 25e77a2..9bb8716 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_SystemService/Sys_DictionaryService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_SystemService/Sys_DictionaryService.cs" @@ -109,22 +109,6 @@ } vueDictionaryDTOs.AddRange(selectDics); } - - //object GetSourceData(string dicNo, string dbSql, object data) - //{ - // if (string.IsNullOrEmpty(dbSql)) - // { - // return data; - // } - // return BaseDal.QueryObjectDataBySql(dbSql, null); - //} - //List<VueDictionaryDTO> vueDictionaryDTOs = dicConfig.Select(item => new VueDictionaryDTO - //{ - // DicNo = item.dicNo, - // Config = item.config, - // Data = GetSourceData(item.dicNo, item.dbSql, item.list) - //}).ToList(); - try { List<string> dicList = dicNos.ToList(); @@ -427,26 +411,6 @@ { List<object> data = new List<object>(); - //{ - // Type type = typeof(TaskTypeEnum); - // List<int> enums = Enum.GetValues(typeof(TaskTypeEnum)).Cast<int>().ToList(); - // int index = 0; - // foreach (var item in enums) - // { - // FieldInfo? fieldInfo = typeof(TaskTypeEnum).GetField(((TaskTypeEnum)item).ToString()); - // DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); - // if (description != null) - // { - // data.Add(new { key = item.ToString(), value = description.Description }); - // } - // else - // { - // data.Add(new { key = item.ToString(), value = item.ToString() }); - // } - // index++; - // } - //} - result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; } break; @@ -474,25 +438,6 @@ } } - //{ - // Type type = typeof(TaskStatusEnum); - // List<int> enums = Enum.GetValues(typeof(TaskStatusEnum)).Cast<int>().ToList(); - // int index = 0; - // foreach (var item in enums) - // { - // FieldInfo? fieldInfo = typeof(TaskStatusEnum).GetField(((TaskStatusEnum)item).ToString()); - // DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); - // if (description != null) - // { - // data.Add(new { key = item.ToString(), value = description.Description }); - // } - // else - // { - // data.Add(new { key = item.ToString(), value = item.ToString() }); - // } - // index++; - // } - //} result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; } break; @@ -690,6 +635,33 @@ result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; } break; + case "materielUnitEnum": + { + List<object> data = new List<object>(); + + { + Type type = typeof(MaterielUnitEnum); + List<string> enumNames = Enum.GetNames(typeof(MaterielUnitEnum)).ToList(); + int index = 0; + foreach (var item in enumNames) + { + FieldInfo? fieldInfo = typeof(MaterielUnitEnum).GetField((item).ToString()); + DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); + if (description != null) + { + data.Add(new { key = item.ToString(), value = description.Description }); + } + else + { + data.Add(new { key = item.ToString(), value = item.ToString() }); + } + index++; + } + } + + result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; + } + break; case "agvStationAreaEnum": { List<object> data = new List<object>(); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs" index ac1956f..05becf4 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs" @@ -40,6 +40,10 @@ using WIDESEA_External.Model; using WIDESEA_IBasicRepository; using WIDESEA_IBasicService; +using WIDESEA_IInboundRepository; +using WIDESEA_InboundRepository; +using WIDESEA_IOutboundRepository; +using WIDESEA_IOutboundService; using WIDESEA_IRecordService; using WIDESEA_IStockRepository; using WIDESEA_IStockService; @@ -63,6 +67,11 @@ private readonly IInvokeERPService _invokeERPService; private readonly IPalletTypeInfoRepository _palletTypeInfoRepository; private readonly IAGVStationInfoRepository _agvStationInfoRepository; + private readonly IPurchaseBSTOrderRepository _purchaseBSTOrderRepository; + private readonly IPurchaseBSTOrderDetailRepository _purchaseBSTOrderDetailRepository; + private readonly IOutBSTOrderDetailRepository _outBSTOrderDetailRepository; + private readonly IOutBSTOrderRepository _outBSTOrderRepository; + private readonly IOutBSTOrderDetailService _outBSTOrderDetailService; public ITaskRepository Repository => BaseDal; private Dictionary<string, OrderByType> _taskOrderBy = new() @@ -75,7 +84,7 @@ public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 100 && x < 500).ToList(); - public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService, IPalletTypeInfoRepository palletTypeInfoRepository, IAGVStationInfoRepository agvStationInfoRepository) : base(BaseDal) + public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService, IPalletTypeInfoRepository palletTypeInfoRepository, IAGVStationInfoRepository agvStationInfoRepository, IPurchaseBSTOrderRepository purchaseBSTOrderRepository, IPurchaseBSTOrderDetailRepository purchaseBSTOrderDetailRepository, IOutBSTOrderDetailRepository outBSTOrderDetailRepository, IOutBSTOrderRepository outBSTOrderRepository,IOutBSTOrderDetailService outBSTOrderDetailService) : base(BaseDal) { _mapper = mapper; _unitOfWorkManage = unitOfWorkManage; @@ -88,6 +97,11 @@ _invokeERPService = invokeERPService; _palletTypeInfoRepository = palletTypeInfoRepository; _agvStationInfoRepository = agvStationInfoRepository; + _purchaseBSTOrderRepository = purchaseBSTOrderRepository; + _purchaseBSTOrderDetailRepository = purchaseBSTOrderDetailRepository; + _outBSTOrderRepository= outBSTOrderRepository; + _outBSTOrderDetailRepository= outBSTOrderDetailRepository; + _outBSTOrderDetailService= outBSTOrderDetailService; } /// <summary> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs" index 5692ab7..4c3a92f 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs" @@ -20,6 +20,7 @@ using WIDESEA_DTO; using WIDESEA_DTO.Basic; using WIDESEA_DTO.Task; +using WIDESEA_External.Model; using WIDESEA_Model.Models; namespace WIDESEA_TaskInfoService @@ -131,7 +132,7 @@ { return content.Error($"鏈壘鍒扮粍鐩樹俊鎭�"); } - if (stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt()) + if (stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt()) { return content.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱"); } @@ -159,6 +160,10 @@ { stockInfo.StockStatus = StockStatusEmun.鎵嬪姩缁勭洏鍏ュ簱纭.ObjToInt(); } + else + { + stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(); + } _unitOfWorkManage.BeginTran(); int taskId = BaseDal.AddData(newTask); newTask.TaskId = taskId; @@ -174,6 +179,86 @@ content.Error(ex.Message); } return content; + } + /// <summary> + /// 鍘熸枡璇锋眰缁勭洏 + /// </summary> + /// <returns></returns> + public WebResponseContent YLPurchaseBoxing(string palletCode) + { + WebResponseContent content = new WebResponseContent(); + try + { + Dt_StockInfo stockInfoOld = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == palletCode); + if (stockInfoOld != null && stockInfoOld.MaterielInvOrgId==MaterielInvOrgEnum.鏂板巶.ObjToInt()) + { + return content.OK($"鏂板巶涓存椂鍏ュ簱{stockInfoOld.PalletCode}"); + } + else if (stockInfoOld != null) + { + return content.Error($"鏉$爜{stockInfoOld.PalletCode}淇℃伅宸插瓨鍦�"); + } + //鑾峰彇閲囪喘淇℃伅 + Dt_PurchaseBSTOrderDetail purchaseBSTOrderDetail = _purchaseBSTOrderDetailRepository.QueryFirst(x=>x.Barcode== palletCode); + if (purchaseBSTOrderDetail == null) + { + return content.Error($"鏈壘鍒版潯鐮亄palletCode}閲囪喘淇℃伅"); + } + if (purchaseBSTOrderDetail.PurchaseBSTOrderDetailStatus!=InOrderStatusEnum.鏈紑濮�.ObjToInt()) + { + return content.Error($"閲囪喘{purchaseBSTOrderDetail.Barcode}淇℃伅宸插叆搴撴垨鍏ュ簱涓�"); + } + else + { + purchaseBSTOrderDetail.PurchaseBSTOrderDetailStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt(); + } + //鑾峰彇閲囪喘涓诲崟 + Dt_PurchaseBSTOrder purchaseBSTOrder = _purchaseBSTOrderRepository.QueryFirst(x=>x.Id==purchaseBSTOrderDetail.PurchaseBSTOrderId); + //鑾峰彇鐗╂枡 + Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterialSourceId == purchaseBSTOrderDetail.MaterialId); + //鐢熸垚搴撳瓨缁勭洏淇℃伅 + Dt_StockInfo stockInfo = new Dt_StockInfo() + { + MaterielInvOrgId = materielInfo.MaterielInvOrgId, + PalletCode = purchaseBSTOrderDetail.Barcode, + LocationCode = "", + PalletType = 1, + WarehouseId = materielInfo.WarehouseId, + StockAttribute = materielInfo.MaterielSourceType, + StockStatus = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(), + MaterielSpec = materielInfo.MaterielSpec, + Unit = materielInfo.MaterielUnit, + MaterielThickness = purchaseBSTOrderDetail.MaterialThick, + MaterielWide = purchaseBSTOrderDetail.MaterialWide, + MaterielWeight = purchaseBSTOrderDetail.DeliveryQty, + MaterielCode = materielInfo.MaterielCode, + MaterielName = materielInfo.MaterielName, + StockLength= purchaseBSTOrderDetail.ProcurementLength, + MaterielId= purchaseBSTOrderDetail.MaterialId + }; + if (purchaseBSTOrderDetail.MaterialWide > 1200) + { + stockInfo.PalletType = 2; + } + _unitOfWorkManage.BeginTran(); + //鏂板缁勭洏淇℃伅 + _stockRepository.StockInfoRepository.AddData(stockInfo); + if (purchaseBSTOrder.PurchaseOrderStatus==InOrderStatusEnum.鏈紑濮�.ObjToInt()) + { + purchaseBSTOrder.PurchaseOrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt(); + _purchaseBSTOrderRepository.UpdateData(purchaseBSTOrder); + } + _purchaseBSTOrderDetailRepository.UpdateData(purchaseBSTOrderDetail); + _unitOfWorkManage.CommitTran(); + content.OK("璇锋眰鎴愬姛"); + } + catch (Exception ex) + { + _unitOfWorkManage.RollbackTran(); + content.Error(ex.Message); + } + return content; + } public string AssignYLRoadwayNo(string palletCode) { @@ -192,15 +277,27 @@ } string roadwayNo = ""; + //闄愬埗鐩村緞 if (stockInfo.MaterielThickness > 800) { + //鑾峰彇鍒嗛厤 List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.RoadwayNo.Contains("YL")).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList(); - roadwayNo = locationCounts.OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? ""; if (stockInfo.MaterielWide > 2200) { locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.RoadwayNo=="SC02_YL").GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList(); - roadwayNo = locationCounts.OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? ""; } + List<LocationCount> useLocationCounts = Db.Queryable<Dt_Task>().Where(x => x.WarehouseId == warehouse.WarehouseId + && locationCounts.Select(j => j.RoadwayNo).Contains(x.Roadway) + && TaskInboundTypes.Contains(x.TaskType)).GroupBy(x => x.Roadway).Select(x => new LocationCount { RoadwayNo = x.Roadway, Count = SqlFunc.AggregateCount(x) }).ToList(); + foreach (var item in locationCounts) + { + LocationCount? count = useLocationCounts.FirstOrDefault(x => x.RoadwayNo == item.RoadwayNo); + if (count != null) + { + item.Count -= count.Count; + } + } + roadwayNo = locationCounts.OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? ""; } return !string.IsNullOrEmpty(roadwayNo) ? (roadwayNo) : throw new Exception("鏈壘鍒板彲鍒嗛厤宸烽亾"); } @@ -215,6 +312,7 @@ /// </summary> public WebResponseContent InboundTaskCompleted(Dt_Task task) { + WebResponseContent content = new WebResponseContent(); try { Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == task.WarehouseId); @@ -223,7 +321,7 @@ Dt_LocationInfo locationInfoEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress); if (locationInfoEnd == null) { - return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑缁堢偣璐т綅淇℃伅"); + return content.Error($"鏈壘鍒板搴旂殑缁堢偣璐т綅淇℃伅"); } Dt_AGVStationInfo agvstation = _agvStationInfoRepository.QueryFirst(x => x.AGVStationCode == task.SourceAddress && ( x.StationArea == AGVStationAreaEnum.AreaA.ObjToInt() || x.StationArea == AGVStationAreaEnum.AreaC.ObjToInt())); if (agvstation != null) @@ -268,22 +366,24 @@ } else { - return WebResponseContent.Instance.Error($"鏈壘鍒板搴斿簱瀛樹俊鎭�"); + return content.Error($"鏈壘鍒板搴斿簱瀛樹俊鎭�"); } } else//鍘熸枡搴撳畬鎴� { + //鑾峰彇搴撳瓨 Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == task.PalletCode); if (stockInfo == null) { - return WebResponseContent.Instance.Error($"鏈壘鍒板搴斿簱瀛樹俊鎭�"); + return content.Error($"鏈壘鍒板搴斿簱瀛樹俊鎭�"); } + //鑾峰彇璐т綅淇℃伅 Dt_LocationInfo locationInfoEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress); if (locationInfoEnd == null) { - return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑缁堢偣璐т綅淇℃伅"); + return content.Error($"鏈壘鍒板搴旂殑缁堢偣璐т綅淇℃伅"); } - + //鏇存柊鐘舵�� task.TaskStatus = TaskStatusEnum.Finish.ObjToInt(); _unitOfWorkManage.BeginTran(); if (task.TaskType == TaskTypeEnum.InPick.ObjToInt()) @@ -296,15 +396,31 @@ _stockService.StockInfoService.Repository.UpdateData(stockInfo); _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.鑷姩瀹屾垚); + //if (stockInfo.MaterielInvOrgId==MaterielInvOrgEnum.鑰佸巶.ObjToInt()) + //{ + // int Qty = Convert.ToInt32(stockInfo.MaterielWeight); + // BSTPurchaseUpModel bSTPurchaseUpModel = new BSTPurchaseUpModel() + // { + // Barcode = stockInfo.PalletCode, + // BarcodeQty = Qty, + // Rfid = stockInfo.PalletCode + // }; + // BSTResponse bSTResponse = _invokeERPService.BSTPurchaseUp(bSTPurchaseUpModel).DeserializeObject<BSTResponse>(); + // if (bSTResponse.Code==500) + // { + // throw new Exception($"BST涓�鏈烢RP鍚屾鍏ュ簱淇℃伅澶辫触,閿欒淇℃伅{bSTResponse.Msg}"); + // } + //} _unitOfWorkManage.CommitTran(); } - return WebResponseContent.Instance.OK(); + return content.OK(); } catch (Exception ex) { _unitOfWorkManage.RollbackTran(); - return WebResponseContent.Instance.Error(ex.Message); + content.Error(ex.Message); } + return content; } /// <summary> /// 鍒嗛厤鎴愬搧宸烽亾 @@ -526,14 +642,14 @@ } return content; } - private readonly static object _lockerFL = new object(); + private readonly static object _lockerFLorCP = new object(); /// <summary> - /// 杈呮枡鍏ュ簱 + /// 杈呮枡鎴愬搧鍏ュ簱 /// </summary> /// <returns></returns> - public WebResponseContent InboundFLTask(string barCode, string startPoint,string matCode,int matCount) + public WebResponseContent InboundFLOrCPTask(string barCode, string startPoint,string matCode,int matCount) { - lock (_lockerFL) + lock (_lockerFLorCP) { WebResponseContent content = new WebResponseContent(); try @@ -544,7 +660,7 @@ //{ // return content.Error($"妗嗙爜鏍煎紡閿欒{barCode}"); //} - Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == matCode && x.MaterielInvOrgId == MaterielInvOrgEnum.鏂板巶.ObjToInt() && x.MaterielSourceType == MaterielTypeEnum.杈呮枡澶囦欢.ObjToInt()); + Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == matCode && x.MaterielInvOrgId == MaterielInvOrgEnum.鏂板巶.ObjToInt() && x.WarehouseId==WarehouseEnum.LLDCP.ObjToInt()); if (materielInfo == null) { return content.Error($"鏈壘鍒扮墿鏂欎俊鎭瘂matCode}"); @@ -577,14 +693,17 @@ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.LLDCP.ToString()); Dt_ProStockInfoDetail proStockInfoDetail = new Dt_ProStockInfoDetail() { - ProductCode = matCode, + ProductCode = materielInfo.MaterielCode, + ProductName= materielInfo.MaterielName, + ProductSpec=materielInfo.MaterielSpec, + ProductUnit=materielInfo.MaterielUnit, StockQty = matCount, ProStockDetailStatus = StockStatusEmun.鎵嬪姩缁勭洏鍏ュ簱纭.ObjToInt() }; Dt_ProStockInfo proStockInfo = new Dt_ProStockInfo() { PalletCode = barCode, - ProStockAttribute = ProStockAttributeEnum.杈呮枡澶囦欢.ObjToInt(), + ProStockAttribute = materielInfo.MaterielSourceType, PalletType = 1, LocationCode = "", WarehouseId = warehouse.WarehouseId, diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs" index 107c5fa..3c00276 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs" @@ -94,13 +94,17 @@ { return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑璧风偣璐т綅淇℃伅"); } - Dt_ProStockInfo proStockInfo = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == task.PalletCode); + Dt_ProStockInfo proStockInfo = _stockRepository.ProStockInfoRepository.Db.Queryable<Dt_ProStockInfo>().Where(x => x.PalletCode == task.PalletCode).Includes(x=>x.proStockInfoDetails).First(); if (proStockInfo != null && proStockInfo.StockStatus==StockStatusEmun.鍑哄簱閿佸畾.ObjToInt()) { task.TaskStatus = TaskStatusEnum.Finish.ObjToInt(); _unitOfWorkManage.BeginTran(); - proStockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(); + proStockInfo.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt(); _stockRepository.ProStockInfoRepository.DeleteAndMoveIntoHty(proStockInfo,App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚); + if (proStockInfo.proStockInfoDetails!=null && proStockInfo.proStockInfoDetails.Count>0) + { + _stockRepository.ProStockInfoDetailRepository.DeleteAndMoveIntoHty(proStockInfo.proStockInfoDetails, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚); + } _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, proStockInfo.PalletType, LocationStatusEnum.Free, proStockInfo.WarehouseId); BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚); _unitOfWorkManage.CommitTran(); @@ -173,7 +177,7 @@ PalletType = stockInfo.PalletType, WarehouseId = stockInfo.WarehouseId, MaterielCode = stockInfo.MaterielCode, - Quantity = 0, + Quantity = stockInfo.StockLength, }; if (stockInfo.MaterielWide>0) { @@ -234,7 +238,7 @@ { return content.Error($"鍙敤缂撳瓨鏁颁笉瓒�"); } - List<Dt_ProStockInfo> stockInfos = _stockRepository.ProStockInfoRepository.QueryData(x => x.ProStockAttribute == ProStockAttributeEnum.绌烘墭.ObjToInt() && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt()).OrderBy(x=>x.CreateDate).Take(Count).ToList(); + List<Dt_ProStockInfo> stockInfos = _stockRepository.ProStockInfoRepository.QueryData(x => x.ProStockAttribute == ProStockAttributeEnum.鎴愬搧.ObjToInt() && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt()).OrderBy(x=>x.CreateDate).Take(Count).ToList(); List<Dt_LocationInfo> locationInfos = _basicRepository.LocationInfoRepository.QueryData(x => stockInfos.Select(x => x.LocationCode).Contains(x.LocationCode)); if (stockInfos.Count < Count) { @@ -298,7 +302,7 @@ { return content.Error($"鍙敤缂撳瓨鏁颁笉瓒�"); } - List<Dt_ProStockInfo> stockInfos = _stockRepository.ProStockInfoRepository.QueryData(x => x.ProStockAttribute == ProStockAttributeEnum.绌烘墭.ObjToInt() && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt()).OrderBy(x => x.CreateDate).Take(Count).ToList(); + List<Dt_ProStockInfo> stockInfos = _stockRepository.ProStockInfoRepository.QueryData(x => x.ProStockAttribute == ProStockAttributeEnum.杈呮枡澶囦欢.ObjToInt() && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt()).OrderBy(x => x.CreateDate).Take(Count).ToList(); List<Dt_LocationInfo> locationInfos = _basicRepository.LocationInfoRepository.QueryData(x => stockInfos.Select(x => x.LocationCode).Contains(x.LocationCode)); if (stockInfos.Count < Count) { @@ -359,25 +363,23 @@ WebResponseContent content = new WebResponseContent(); try { + + //鑾峰彇璐т綅 + List<Dt_LocationInfo> locationInfos = _basicRepository.LocationInfoRepository.QueryData(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt()); //鑾峰彇瀵瑰簲搴撳瓨 - List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.QueryData(x=>x.MaterielCode==materielCode && x.MaterielWide== materielWide && x.StockStatus==StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt()).OrderBy(x=>x.CreateDate).Take(Count).ToList(); - + List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.QueryData(x=> locationInfos.Select(x=>x.LocationCode).Contains(x.LocationCode) && x.MaterielCode==materielCode && x.MaterielWide== materielWide && x.StockStatus==StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt()).OrderBy(x=>x.CreateDate).Take(Count).ToList(); if (stockInfos.Count< Count) { return content.Error($"搴撳瓨{materielCode}鏁伴噺涓嶈冻"); } - //鑾峰彇璐т綅 - List<Dt_LocationInfo> locationInfos = _basicRepository.LocationInfoRepository.QueryData(x => stockInfos.Select(x => x.LocationCode).Contains(x.LocationCode)); + List<Dt_LocationInfo> AssignLocations =new List<Dt_LocationInfo>(); foreach (var item in stockInfos) { Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x=>x.LocationCode==item.LocationCode); - if (locationInfo!=null && (locationInfo.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || locationInfo.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && locationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt()) + if (locationInfo!=null) { + AssignLocations.Add(locationInfo); item.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt(); - } - else - { - return content.Error($"璐т綅鐘舵�佷笉姝g‘"); } } TaskTypeEnum taskTypeEnum = new(); @@ -406,10 +408,9 @@ //鏇存柊搴撳瓨鐘舵�� _stockRepository.StockInfoRepository.UpdateData(stockInfos); //鏇存柊璐т綅鐘舵�� - _basicRepository.LocationInfoRepository.UpdateLocationStatus(locationInfos, LocationStatusEnum.Lock); + _basicRepository.LocationInfoRepository.UpdateLocationStatus(AssignLocations, LocationStatusEnum.Lock); //鍔犲叆璐т綅鍙樺姩璁板綍 - _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, LocationStatusEnum.Lock, LocationChangeType.OutboundAssignLocation,taskNums:tasks.Select(x=>x.TaskNum).ToList()); - + _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(AssignLocations, LocationStatusEnum.Lock, LocationChangeType.OutboundAssignLocation,taskNums:tasks.Select(x=>x.TaskNum).ToList()); //鏂板缓浠诲姟 BaseDal.AddData(tasks); _unitOfWorkManage.CommitTran(); @@ -422,5 +423,156 @@ } return content; } + /// <summary> + /// 鍒涘缓鍘熺焊鐢熶骇鎺掔▼鍑哄簱浠诲姟 + /// </summary> + /// <param name="keys"></param> + /// <returns></returns> + public WebResponseContent CreateBSTOutboundTasks(int[] keys) + { + WebResponseContent content=new WebResponseContent(); + try + { + List<Dt_Task> tasks = new List<Dt_Task>(); + List<Dt_StockInfo> stockInfos = new List<Dt_StockInfo>(); + List<Dt_OutBSTOrderDetail> outBSTOrderDetails = new List<Dt_OutBSTOrderDetail>(); + List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); + List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); + + (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutBSTOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutboundTaskDataHandle(keys); + if (result.Item2 != null && result.Item2.Count > 0) + { + stockInfos.AddRange(result.Item2); + } + if (result.Item3 != null && result.Item3.Count > 0) + { + outBSTOrderDetails.AddRange(result.Item3); + } + if (result.Item4 != null && result.Item4.Count > 0) + { + outStockLockInfos.AddRange(result.Item4); + } + if (result.Item5 != null && result.Item5.Count > 0) + { + locationInfos.AddRange(result.Item5); + } + if (result.Item1 != null && result.Item1.Count > 0) + { + tasks.AddRange(result.Item1); + } + + return GenerateOutboundTaskDataUpdate(tasks, stockInfos, outBSTOrderDetails, outStockLockInfos, locationInfos); + } + catch (Exception ex) + { + _unitOfWorkManage.RollbackTran(); + content.Error(ex.Message); + } + return content; + } + + /// <summary> + /// 鍑哄簱浠诲姟鏁版嵁澶勭悊 + /// </summary> + /// <param name="orderDetailId"></param> + /// <param name="stockSelectViews"></param> + /// <returns></returns> + /// <exception cref="Exception"></exception> + public (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutBSTOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) OutboundTaskDataHandle(int[] keys) + { + List<Dt_Task> tasks = new List<Dt_Task>(); + List<Dt_OutBSTOrderDetail> outboundOrderDetails = _outBSTOrderDetailRepository.QueryData(x => keys.Contains(x.Id)); + + if (outboundOrderDetails == null || outboundOrderDetails.Count == 0) + { + throw new Exception("鏈壘鍒板嚭搴撳崟鏄庣粏淇℃伅"); + } + Dt_OutBSTOrderDetail? outBSTOrderDetail = outboundOrderDetails.FirstOrDefault(x => x.OutBSTOrderDetailStatus != OutOrderStatusEnum.鏈紑濮�.ObjToInt()); + if (outBSTOrderDetail!=null) + { + throw new Exception($"鍑哄簱鏄庣粏鐗╂枡{outBSTOrderDetail.MaterialNo},鍑哄簱涓垨宸插畬鎴�"); + } + List<Dt_StockInfo>? stockInfos = null; + List<Dt_OutBSTOrderDetail>? orderDetails = null; + List<Dt_OutStockLockInfo>? outStockLockInfos = null; + List<Dt_LocationInfo>? locationInfos = null; + + //鍒嗛厤搴撳瓨 + (List<Dt_StockInfo>, List<Dt_OutBSTOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outBSTOrderDetailService.AssignStockOutbound(outboundOrderDetails); + if (result.Item1 != null && result.Item1.Count > 0) + { + Dt_OutBSTOrder outBSTOrder = _outBSTOrderRepository.QueryFirst(x => x.Id == outboundOrderDetails.FirstOrDefault().OutBSTOrderId); + //鑾峰彇浠诲姟 + tasks = GetTasks(result.Item1, TaskTypeEnum.OldYLOutbound); + tasks.ForEach(x => + { + x.OrderNo = outBSTOrder.BoardMpsNo; + }); + result.Item2.ForEach(x => + { + x.OutBSTOrderDetailStatus = OutOrderStatusEnum.鍑哄簱涓�.ObjToInt(); + }); + result.Item3.ForEach(x => + { + x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt(); + }); + + stockInfos = result.Item1; + orderDetails = result.Item2; + outStockLockInfos = result.Item3; + locationInfos = result.Item4; + } + else + { + throw new Exception("鏃犲簱瀛�"); + } + + return (tasks, stockInfos, orderDetails, outStockLockInfos, locationInfos); + } + + /// <summary> + /// 鐢熸垚鍑哄簱浠诲姟鍚庢暟鎹洿鏂板埌鏁版嵁搴� + /// </summary> + public WebResponseContent GenerateOutboundTaskDataUpdate(List<Dt_Task> tasks, List<Dt_StockInfo>? stockInfos = null, List<Dt_OutBSTOrderDetail>? outboundOrderDetails = null, List<Dt_OutStockLockInfo>? outStockLockInfos = null, List<Dt_LocationInfo>? locationInfos = null) + { + try + { + _unitOfWorkManage.BeginTran(); + + BaseDal.AddData(tasks); + if (stockInfos != null && stockInfos.Count > 0 && outboundOrderDetails != null && outboundOrderDetails.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0) + { + stockInfos.ForEach(x => + { + x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt(); + }); + outboundOrderDetails.ForEach(x => + { + x.OutBSTOrderDetailStatus = OutOrderStatusEnum.鍑哄簱涓�.ObjToInt(); + }); + Dt_OutBSTOrder outBSTOrder = _outBSTOrderRepository.QueryFirst(x => x.Id == outboundOrderDetails.FirstOrDefault().OutBSTOrderId); + if (outBSTOrder.OutBSTOrderStatus == OutOrderStatusEnum.鏈紑濮�.ObjToInt()) + { + outBSTOrder.OutBSTOrderStatus = OutOrderStatusEnum.鍑哄簱涓�.ObjToInt(); + _outBSTOrderRepository.UpdateData(outBSTOrder); + } + WebResponseContent content = _outBSTOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks); + if (!content.Status) + { + _unitOfWorkManage.RollbackTran(); + return content; + } + } + _unitOfWorkManage.CommitTran(); + PushTasksToWCS(tasks); + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + _unitOfWorkManage.RollbackTran(); + return WebResponseContent.Instance.Error(ex.Message); + } + + } } } \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs" index 730dbd0..a723b67 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpBSTController.cs" @@ -16,6 +16,7 @@ using WIDESEA_IBasicRepository; using WIDESEA_IBasicService; using WIDESEA_IInboundService; +using WIDESEA_IOutboundService; using WIDESEA_Model.Models; using static WIDESEA_DTO.ErpResponseContent; @@ -31,12 +32,14 @@ private readonly IBasicService _basicService; private readonly IInvokeERPService _invokeERPService; private readonly IPurchaseBSTOrderService _purchaseBSTOrderService; + private readonly IOutBSTOrderService _outBSTOrderService; - public ErpBSTController(IBasicService basicService, IInvokeERPService invokeERPService,IPurchaseBSTOrderService purchaseBSTOrderService) + public ErpBSTController(IBasicService basicService, IInvokeERPService invokeERPService,IPurchaseBSTOrderService purchaseBSTOrderService,IOutBSTOrderService outBSTOrderService) { _basicService = basicService; _invokeERPService = invokeERPService; _purchaseBSTOrderService = purchaseBSTOrderService; + _outBSTOrderService = outBSTOrderService; } /// <summary> /// 娣诲姞鑰佸巶鐗╂枡 @@ -69,5 +72,15 @@ { return _purchaseBSTOrderService.AddPurchaseBSTOrder(bSTPurchaseOrderDTOs); } + + /// <summary> + /// 娣诲姞鍑哄簱鎺掔▼淇℃伅 + /// </summary> + /// <returns></returns> + [HttpPost, HttpGet, Route("ReceiveOutOrder"), AllowAnonymous] + public WebResponseContent AddOutBSTOrder([FromBody] List<BSTOutOrderDTO> bSTOutOrderDTOs) + { + return _outBSTOrderService.AddOutBSTOrder(bSTOutOrderDTOs); + } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutBSTOrderController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutBSTOrderController.cs" new file mode 100644 index 0000000..fb70e74 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutBSTOrderController.cs" @@ -0,0 +1,20 @@ +锘縰sing Microsoft.AspNetCore.Mvc; +using WIDESEA_Core.BaseController; +using WIDESEA_IInboundService; +using WIDESEA_IOutboundService; +using WIDESEA_Model.Models; + +namespace WIDESEA_WMSServer.Controllers.Outbound +{ + /// <summary> + /// BST鐢熶骇鎺掔▼鍗� + /// </summary> + [Route("api/OutBSTOrder")] + [ApiController] + public class OutBSTOrderController : ApiBaseController<IOutBSTOrderService, Dt_OutBSTOrder> + { + public OutBSTOrderController(IOutBSTOrderService service) : base(service) + { + } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutBSTOrderDetailController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutBSTOrderDetailController.cs" new file mode 100644 index 0000000..4227b8d --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutBSTOrderDetailController.cs" @@ -0,0 +1,19 @@ +锘縰sing Microsoft.AspNetCore.Mvc; +using WIDESEA_Core.BaseController; +using WIDESEA_IOutboundService; +using WIDESEA_Model.Models; + +namespace WIDESEA_WMSServer.Controllers.Outbound +{ + /// <summary> + /// BST鐢熶骇鎺掔▼鏄庣粏 + /// </summary> + [Route("api/OutBSTOrderDetail")] + [ApiController] + public class OutBSTOrderDetailController : ApiBaseController<IOutBSTOrderDetailService, Dt_OutBSTOrderDetail> + { + public OutBSTOrderDetailController(IOutBSTOrderDetailService service) : base(service) + { + } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" new file mode 100644 index 0000000..6936e6e --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" @@ -0,0 +1,30 @@ +锘縰sing Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using WIDESEA_Core; +using WIDESEA_Core.BaseController; +using WIDESEA_IOutboundService; +using WIDESEA_Model.Models; + +namespace WIDESEA_WMSServer.Controllers.Outbound +{ + /// <summary> + /// 鍑哄簱璇︽儏 + /// </summary> + [Route("api/OutStockLockInfo")] + [ApiController] + public class OutStockLockInfoController : ApiBaseController<IOutStockLockInfoService, Dt_OutStockLockInfo> + { + public OutStockLockInfoController(IOutStockLockInfoService service) : base(service) + { + } + /// <summary> + /// 鑾峰彇鍑哄簱璇︽儏 + /// </summary> + [HttpPost, HttpGet, Route("GetByOrderDetailId"), AllowAnonymous] + public List<Dt_OutStockLockInfo> GetByOrderDetailId(string orderNo,int orderDetailId) + { + return Service.GetByOrderDetailId(orderNo,orderDetailId, null); + } + } +} diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" index 342f455..f6446dc 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" @@ -75,9 +75,9 @@ /// </summary> /// <returns></returns> [HttpPost, HttpGet, Route("InboundFLTask"), AllowAnonymous] - public WebResponseContent InboundFLTask(string barCode, string startPoint, string matCode, int matCount) + public WebResponseContent InboundFLOrCPTask(string barCode, string startPoint, string matCode, int matCount) { - return Service.InboundFLTask(barCode, startPoint, matCode, matCount); + return Service.InboundFLOrCPTask(barCode, startPoint, matCode, matCount); } /// <summary> @@ -183,6 +183,16 @@ return Service.RequestYLWMSTaskSimple(stationCode,palletCode); } /// <summary> + /// 鍘熸枡鍏ュ簱鐢宠 + /// </summary> + /// <param name="palletCode">鏉$爜</param> + /// <returns></returns> + [HttpPost, HttpGet, Route("YLPurchaseBoxing"), AllowAnonymous] + public WebResponseContent YLPurchaseBoxing(string palletCode) + { + return Service.YLPurchaseBoxing(palletCode); + } + /// <summary> /// 鍒嗛厤鍘熸枡鍏ュ簱宸烽亾 /// </summary> /// <param name="palletCode"></param> @@ -223,7 +233,6 @@ /// </summary> /// <param name="materielCode">鐗╂枡浠g爜</param> /// <param name="materielWide">鐗╂枡骞呭</param> - /// <param name="Count">鍗锋暟</param> /// <returns></returns> [HttpPost, HttpGet, Route("RequestYLWMSTaskOut"), AllowAnonymous] public WebResponseContent RequestYLWMSTaskOut(string materielCode,int materielWide, int count,string address="") @@ -280,5 +289,15 @@ { return Service.PrintInbound(saveModel); } + /// <summary> + /// 鍒涘缓鍘熺焊鐢熶骇鎺掔▼鍑哄簱浠诲姟 + /// </summary> + /// <param name="saveModel"></param> + /// <returns></returns> + [HttpPost, HttpGet, Route("CreateBSTOutboundTasks"), AllowAnonymous] + public WebResponseContent CreateBSTOutboundTasks([FromBody] int[] keys) + { + return Service.CreateBSTOutboundTasks(keys); + } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs" index 4e355f0..2f6f175 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs" @@ -31,11 +31,15 @@ CreateMap<Sys_Menu, MenuDTO>(); CreateMap<Dt_Task, WMSTaskDTO>(); //鐗╂枡瀹炰綋BST杞崲 - CreateMap<BSTMaterialDTO, Dt_MaterielInfo>().ForMember(x => x.MaterialSourceId, b => b.MapFrom(b => b.MaterialId)).ForMember(x => x.WarehouseId, b => b.MapFrom(b => WarehouseEnum.LLDYL.ObjToInt())).ForMember(x => x.MaterielCode, b => b.MapFrom(b => b.MaterialNo)).ForMember(x => x.MaterielName, b => b.MapFrom(b => b.Name)).ForMember(x => x.MaterielSourceType, b => b.MapFrom(b => b.MaterielType)).ForMember(x => x.MaterielInvOrgId, b => b.MapFrom(b => b.InvOrgId)).ForMember(x => x.MaterielUnit, b => b.MapFrom(b => b.Unit)).ForMember(x => x.MaterielUnit, b => b.MapFrom(b => b.Unit)).ForMember(x => x.MaterielState, b => b.MapFrom(b => b.State)).ForMember(x => x.IsCheck, b => b.MapFrom(b => WhetherEnum.True.ObjToInt())).ForMember(x => x.MaterielSpec, b => b.MapFrom(b => b.Spec)).ForMember(x => x.MaterielWeight, b => b.MapFrom(b => b.Weight)); + CreateMap<BSTMaterialDTO, Dt_MaterielInfo>().ForMember(x => x.MaterialSourceId, b => b.MapFrom(b => b.MaterialId)).ForMember(x => x.WarehouseId, b => b.MapFrom(b => WarehouseEnum.LLDYL.ObjToInt())).ForMember(x => x.MaterielCode, b => b.MapFrom(b => b.MaterialNo)).ForMember(x => x.MaterielName, b => b.MapFrom(b => b.Name)).ForMember(x => x.MaterielSourceType, b => b.MapFrom(b => b.MaterielType)).ForMember(x => x.MaterielInvOrgId, b => b.MapFrom(b => b.InvOrgId)).ForMember(x => x.MaterielUnit, b => b.MapFrom(b => b.Unit)).ForMember(x => x.MaterielUnit, b => b.MapFrom(b => b.Unit)).ForMember(x => x.MaterielState, b => b.MapFrom(b => b.Status)).ForMember(x => x.IsCheck, b => b.MapFrom(b => WhetherEnum.False.ObjToInt())).ForMember(x => x.MaterielSpec, b => b.MapFrom(b => b.Spec)).ForMember(x => x.MaterielWeight, b => b.MapFrom(b => b.Weight)); //鐗╂枡瀹炰綋杞崲 CreateMap<BSTSupplierDTO, Dt_SupplierInfo>().ForMember(x => x.SupplierSourceId, b => b.MapFrom(b => b.VendId)).ForMember(x => x.SupplierCode, b => b.MapFrom(b => b.VendNo)).ForMember(x => x.SupplierName, b => b.MapFrom(b => b.ShortName)).ForMember(x => x.SupplierShortName, b => b.MapFrom(b => b.ShortName)).ForMember(x => x.Contacts, b => b.MapFrom(b => b.BusinessContact)).ForMember(x => x.ContactNumber, b => b.MapFrom(b => b.Tel)).ForMember(x => x.ContactAddress, b => b.MapFrom(b => b.Address)).ForMember(x => x.InvOrgId, b => b.MapFrom(b => MaterielInvOrgEnum.鑰佸巶.ObjToInt())); //閲囪喘瀹炰綋杞崲 CreateMap<BSTPurchaseOrderDTO, Dt_PurchaseBSTOrder>().ForMember(x => x.ReceiptDate, b => b.MapFrom(b => DateTimeOffset.FromUnixTimeMilliseconds(b.ReceiptDate).DateTime)); + CreateMap<PaperReceiptDetailsItem, Dt_PurchaseBSTOrderDetail>().ForMember(x => x.MaterialWide, b => b.MapFrom(b => b.W)).ForMember(x => x.MaterialThick, b => b.MapFrom(b => b.Thick)).ForMember(x => x.PurchaseBSTOrderDetailStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt())); + //BST鍑哄簱鎺掔▼瀹炰綋杞崲 + CreateMap<BSTOutOrderDTO, Dt_OutBSTOrder>().ForMember(x => x.OutBSTOrderStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.ProductionDate, b => b.MapFrom(b => DateTimeOffset.FromUnixTimeMilliseconds(b.ProductionDate).DateTime)).ForMember(x => x.WarehouseId, b => b.MapFrom(b => WarehouseEnum.LLDYL.ObjToInt())); + CreateMap<BstBoardMpsDetailItem, Dt_OutBSTOrderDetail>().ForMember(x => x.OutBSTOrderDetailStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt())); } } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Program.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Program.cs" index 1c5ae11..2a5b7f2 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Program.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Program.cs" @@ -44,7 +44,7 @@ builder.Services.AddWebSocketSetup(); builder.Services.AddSqlsugarSetup();//SqlSugar 启动服务 builder.Services.AddDbSetup();//Db 启动服务 -builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入 +//builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入 builder.Services.AddHostedService<PermissionDataHostService>();//应用初始化服务注入 builder.Services.AddAutoMapperSetup(); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj" index 2c4c6f3..7904fd2 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj" @@ -93,7 +93,6 @@ <ItemGroup> <Folder Include="Controllers\Check\" /> - <Folder Include="Controllers\Outbound\" /> <Folder Include="Log\" /> </ItemGroup> </Project> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/appsettings.json" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/appsettings.json" index 4c54b53..71ec0b9 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/appsettings.json" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/appsettings.json" @@ -6,7 +6,7 @@ "Microsoft.AspNetCore": "Warning" } }, - "dics": "materielInvOrgEnum,agvStationAreaEnum,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,returnStatus,returnType,outLockStockStatusEnum,checkOrderStatusEnum,checkUploadEnum,checkAcceptEnum,proStockAttributeEnum,materielSourceTypeEnum,materielTypeEnum", + "dics": "materielInvOrgEnum,agvStationAreaEnum,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,returnStatus,returnType,outLockStockStatusEnum,checkOrderStatusEnum,checkUploadEnum,checkAcceptEnum,proStockAttributeEnum,materielSourceTypeEnum,materielTypeEnum,materielUnitEnum", "AllowedHosts": "*", "ConnectionStringsEncryption": false, "MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/MES.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/MES.xlsx" deleted file mode 100644 index d537c49..0000000 --- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/MES.xlsx" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\344\270\200\346\234\237BSTERP\351\234\200\346\261\202\345\255\227\346\256\265.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\344\270\200\346\234\237BSTERP\351\234\200\346\261\202\345\255\227\346\256\265.xlsx" deleted file mode 100644 index 9b75a8f..0000000 --- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\344\270\200\346\234\237BSTERP\351\234\200\346\261\202\345\255\227\346\256\265.xlsx" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\200\235\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\200\235\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.xlsx" index 3252a5d..ddfeacf 100644 --- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\200\235\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.xlsx" +++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\200\235\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.xlsx" Binary files differ diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\256\211\345\205\250\347\224\263\350\257\267RCS-WCS-20250729.docx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\256\211\345\205\250\347\224\263\350\257\267RCS-WCS-20250729.docx" index 867979b..726cb5b 100644 --- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\256\211\345\205\250\347\224\263\350\257\267RCS-WCS-20250729.docx" +++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\256\211\345\205\250\347\224\263\350\257\267RCS-WCS-20250729.docx" Binary files differ diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227-MES\343\200\201ERP\343\200\201WMS\346\216\245\345\217\243\346\270\205\345\215\225.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227-MES\343\200\201ERP\343\200\201WMS\346\216\245\345\217\243\346\270\205\345\215\225.xlsx" new file mode 100644 index 0000000..4a09b47 --- /dev/null +++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227-MES\343\200\201ERP\343\200\201WMS\346\216\245\345\217\243\346\270\205\345\215\225.xlsx" Binary files differ diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227ERP&WMS\346\216\245\345\217\243\346\270\205\345\215\225.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227ERP&WMS\346\216\245\345\217\243\346\270\205\345\215\225.xlsx" new file mode 100644 index 0000000..8e96784 --- /dev/null +++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227ERP&WMS\346\216\245\345\217\243\346\270\205\345\215\225.xlsx" Binary files differ diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227MES\346\216\245\345\217\243.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227MES\346\216\245\345\217\243.xlsx" new file mode 100644 index 0000000..4c70f37 --- /dev/null +++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227MES\346\216\245\345\217\243.xlsx" Binary files differ diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\272\223\344\275\215\346\225\260\346\215\256.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\216\237\347\272\270\346\256\213\345\215\267\345\267\267\351\201\223\345\272\223\344\275\215\346\225\260\346\215\256.xlsx" similarity index 100% rename from "\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\272\223\344\275\215\346\225\260\346\215\256.xlsx" rename to "\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\345\216\237\347\272\270\346\256\213\345\215\267\345\267\267\351\201\223\345\272\223\344\275\215\346\225\260\346\215\256.xlsx" Binary files differ diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227\350\275\257\344\273\266\350\256\241\345\210\222\350\241\250.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227\350\275\257\344\273\266\350\256\241\345\210\222\350\241\250.xlsx" index 4a86236..0684415 100644 --- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227\350\275\257\344\273\266\350\256\241\345\210\222\350\241\250.xlsx" +++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\351\200\232\344\277\241\345\215\217\350\256\256/\351\276\231\345\210\251\345\276\227\350\275\257\344\273\266\350\256\241\345\210\222\350\241\250.xlsx" Binary files differ -- Gitblit v1.9.3