出库计划车号逻辑修改

temp
dengyu 1 year ago
parent 9bf410ac19
commit 2bf95e77f0

@ -566,9 +566,12 @@ namespace VOL.WMS.Services
if (!AddDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != "")) 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); OP_WMS_TRUCKRepository.Instance.Add(newrec, true);
} }
foreach (var item in AddDetailList) //foreach (var item in AddDetailList)
{ //{
if (item.TRUCKNO == null || item.TRUCKNO == "") // if (item.TRUCKNO == null || item.TRUCKNO == "")
{ // {
item.TRUCKNO = trucknoList[0]; // 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(); var List = OP_WMS_TRUCKRepository.Instance.FindAsIQueryable(x => x.WMSPLANID == head.WMSPLANID).ToList();
if (List != null && List.Count > 0) if (List != null && List.Count > 0)
{ {
var trucknoList = new List<string>(); var trucknoList = new List<string>();
@ -894,22 +896,24 @@ namespace VOL.WMS.Services
{ {
trucknoList.Add(item.TRUCKNO); trucknoList.Add(item.TRUCKNO);
} }
if (item.TRUCKNO == null || item.TRUCKNO == "") //if (item.TRUCKNO == null || item.TRUCKNO == "")
{ //{
item.TRUCKNO = truck_0; // item.TRUCKNO = truck_0;
} //}
} }
foreach (var item in UpdDetailList) foreach (var item in UpdDetailList)
{ {
if (!trucknoList.Exists(x => x == item.TRUCKNO && item.TRUCKNO != null && item.TRUCKNO != "")) if (!trucknoList.Exists(x => x == item.TRUCKNO && item.TRUCKNO != null && item.TRUCKNO != ""))
{ {
trucknoList.Add(item.TRUCKNO); trucknoList.Add(item.TRUCKNO);
} }
if (item.TRUCKNO == null || item.TRUCKNO == "") //if (item.TRUCKNO == null || item.TRUCKNO == "")
{ //{
item.TRUCKNO = truck_0; // item.TRUCKNO = truck_0;
} //}
} }
if (trucknoList != null && trucknoList.Count > 0) if (trucknoList != null && trucknoList.Count > 0)
@ -925,19 +929,34 @@ namespace VOL.WMS.Services
OP_WMS_TRUCKRepository.Instance.Add(newrec, true); 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)
foreach (var item in UpdDetailList)
{
if (item.TRUCKNO == null || item.TRUCKNO == "")
{ {
item.TRUCKNO = trucknoList[0]; item.TRUCKNO = List[0].TRUCKNO;
} }
} }
} }
@ -974,21 +993,21 @@ namespace VOL.WMS.Services
OP_WMS_TRUCKRepository.Instance.Add(newrec,true); OP_WMS_TRUCKRepository.Instance.Add(newrec,true);
} }
foreach (var item in AddDetailList) //foreach (var item in AddDetailList)
{ //{
if (item.TRUCKNO == null || item.TRUCKNO == "") // if (item.TRUCKNO == null || item.TRUCKNO == "")
{ // {
item.TRUCKNO = trucknoList[0]; // item.TRUCKNO = trucknoList[0];
} // }
} //}
foreach (var item in UpdDetailList) //foreach (var item in UpdDetailList)
{ //{
if (item.TRUCKNO == null || item.TRUCKNO == "") // if (item.TRUCKNO == null || item.TRUCKNO == "")
{ // {
item.TRUCKNO = trucknoList[0]; // item.TRUCKNO = trucknoList[0];
} // }
} //}
} }
} }
@ -1669,9 +1688,13 @@ namespace VOL.WMS.Services
private WebResponseContent PushStatus_Single(Guid WMSPLANID, string execution, string reason) private WebResponseContent PushStatus_Single(Guid WMSPLANID, string execution, string reason)
{ {
//出库计划不使用BILLSTATUS管理 if (execution == "1") {
//推进值1 将委托单位的合同信息展示在出库计划的电子文档中
//而是使用 BSSTATUS = 1提交审核 0未提交 //寻找往来单位的合同
return _webResponse.OK();
}
var _r = new WebResponseContent(); var _r = new WebResponseContent();

Loading…
Cancel
Save