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();