From 2bf95e77f06e49c07bd6e764633c7d5c6d2757fe Mon Sep 17 00:00:00 2001 From: dengyu Date: Thu, 3 Aug 2023 10:59:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93=E8=AE=A1=E5=88=92=E8=BD=A6?= =?UTF-8?q?=E5=8F=B7=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WMSOUT/Partial/OP_WMS_OUT_PLANService.cs | 115 +++++++++++------- 1 file changed, 69 insertions(+), 46 deletions(-) diff --git a/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_PLANService.cs b/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_PLANService.cs index 5ba3bcd3..8e61b6d2 100644 --- a/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_PLANService.cs +++ b/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_PLANService.cs @@ -566,9 +566,12 @@ namespace VOL.WMS.Services if (!AddDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != "")) { - foreach (var item in AddDetailList) + if (当前车辆信息List.Count == 1) { - item.TRUCKNO = 当前车辆信息List[0].TRUCKNO; + foreach (var item in AddDetailList) + { + item.TRUCKNO = 当前车辆信息List[0].TRUCKNO; + } } } @@ -599,13 +602,13 @@ namespace VOL.WMS.Services OP_WMS_TRUCKRepository.Instance.Add(newrec, true); } - foreach (var item in AddDetailList) - { - if (item.TRUCKNO == null || item.TRUCKNO == "") - { - item.TRUCKNO = trucknoList[0]; - } - } + //foreach (var item in AddDetailList) + //{ + // if (item.TRUCKNO == null || item.TRUCKNO == "") + // { + // item.TRUCKNO = trucknoList[0]; + // } + //} } @@ -877,8 +880,7 @@ namespace VOL.WMS.Services var 当前车辆信息List = OP_WMS_TRUCKRepository.Instance.FindAsIQueryable(x => x.WMSPLANID == head.WMSPLANID).ToList(); if (当前车辆信息List != null && 当前车辆信息List.Count > 0) - { - + { var trucknoList = new List(); @@ -894,22 +896,24 @@ namespace VOL.WMS.Services { trucknoList.Add(item.TRUCKNO); } - if (item.TRUCKNO == null || item.TRUCKNO == "") - { - item.TRUCKNO = truck_0; - } + //if (item.TRUCKNO == null || item.TRUCKNO == "") + //{ + // item.TRUCKNO = truck_0; + //} } + + foreach (var item in UpdDetailList) { if (!trucknoList.Exists(x => x == item.TRUCKNO && item.TRUCKNO != null && item.TRUCKNO != "")) { trucknoList.Add(item.TRUCKNO); } - if (item.TRUCKNO == null || item.TRUCKNO == "") - { - item.TRUCKNO = truck_0; - } + //if (item.TRUCKNO == null || item.TRUCKNO == "") + //{ + // item.TRUCKNO = truck_0; + //} } if (trucknoList != null && trucknoList.Count > 0) @@ -925,19 +929,34 @@ namespace VOL.WMS.Services OP_WMS_TRUCKRepository.Instance.Add(newrec, true); } - foreach (var item in AddDetailList) + //foreach (var item in AddDetailList) + //{ + // if (item.TRUCKNO == null || item.TRUCKNO == "") + // { + // item.TRUCKNO = trucknoList[0]; + // } + //} + + //foreach (var item in UpdDetailList) + //{ + // if (item.TRUCKNO == null || item.TRUCKNO == "") + // { + // item.TRUCKNO = trucknoList[0]; + // } + //} + } + + if (!AddDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != "") && !UpdDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != "")) + { + if (当前车辆信息List.Count == 1) { - if (item.TRUCKNO == null || item.TRUCKNO == "") + foreach (var item in AddDetailList) { - item.TRUCKNO = trucknoList[0]; + item.TRUCKNO = 当前车辆信息List[0].TRUCKNO; } - } - - foreach (var item in UpdDetailList) - { - if (item.TRUCKNO == null || item.TRUCKNO == "") + foreach (var item in UpdDetailList) { - item.TRUCKNO = trucknoList[0]; + item.TRUCKNO = 当前车辆信息List[0].TRUCKNO; } } } @@ -974,21 +993,21 @@ namespace VOL.WMS.Services OP_WMS_TRUCKRepository.Instance.Add(newrec,true); } - foreach (var item in AddDetailList) - { - if (item.TRUCKNO == null || item.TRUCKNO == "") - { - item.TRUCKNO = trucknoList[0]; - } - } - - foreach (var item in UpdDetailList) - { - if (item.TRUCKNO == null || item.TRUCKNO == "") - { - item.TRUCKNO = trucknoList[0]; - } - } + //foreach (var item in AddDetailList) + //{ + // if (item.TRUCKNO == null || item.TRUCKNO == "") + // { + // item.TRUCKNO = trucknoList[0]; + // } + //} + + //foreach (var item in UpdDetailList) + //{ + // if (item.TRUCKNO == null || item.TRUCKNO == "") + // { + // item.TRUCKNO = trucknoList[0]; + // } + //} } } @@ -1669,9 +1688,13 @@ namespace VOL.WMS.Services private WebResponseContent PushStatus_Single(Guid WMSPLANID, string execution, string reason) { - //出库计划不使用BILLSTATUS管理 - - //而是使用 BSSTATUS = 1提交审核 0未提交 + if (execution == "1") { + //推进值1 将委托单位的合同信息展示在出库计划的电子文档中 + //寻找往来单位的合同 + + return _webResponse.OK(); + } + var _r = new WebResponseContent();