|
|
|
@ -765,7 +765,7 @@ namespace VOL.WMS.Services
|
|
|
|
|
|
|
|
|
|
repository.AddRange(dealedbodylist2[0]);
|
|
|
|
|
repository.UpdateRange(dealedbodylist2[1], x => new { x });
|
|
|
|
|
repository.SaveChangesAsync();
|
|
|
|
|
repository.SaveChanges();
|
|
|
|
|
|
|
|
|
|
OP_WMS_TRUCKINFOService.Instance.DealSaveDetailList(dealedbodylist2[0]);
|
|
|
|
|
OP_WMS_TRUCKINFOService.Instance.DealSaveDetailList(dealedbodylist2[1]);
|
|
|
|
@ -878,20 +878,67 @@ namespace VOL.WMS.Services
|
|
|
|
|
|
|
|
|
|
if (当前车辆信息List != null && 当前车辆信息List.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!AddDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != ""))
|
|
|
|
|
var trucknoList = new List<string>();
|
|
|
|
|
|
|
|
|
|
var currtrucknoList = 当前车辆信息List.Select(s => s.TRUCKNO).Distinct().ToList();
|
|
|
|
|
|
|
|
|
|
trucknoList.AddRange(currtrucknoList);
|
|
|
|
|
|
|
|
|
|
var truck_0 = trucknoList[0];
|
|
|
|
|
|
|
|
|
|
foreach (var item in AddDetailList)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in AddDetailList)
|
|
|
|
|
if (!trucknoList.Exists(x => x == item.TRUCKNO && item.TRUCKNO != null && item.TRUCKNO != ""))
|
|
|
|
|
{
|
|
|
|
|
item.TRUCKNO = 当前车辆信息List[0].TRUCKNO;
|
|
|
|
|
trucknoList.Add(item.TRUCKNO);
|
|
|
|
|
}
|
|
|
|
|
if (item.TRUCKNO == null || item.TRUCKNO == "")
|
|
|
|
|
{
|
|
|
|
|
item.TRUCKNO = truck_0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!UpdDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != ""))
|
|
|
|
|
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 (trucknoList != null && trucknoList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var truckno in trucknoList)
|
|
|
|
|
{
|
|
|
|
|
if (currtrucknoList.Exists(x => x == truckno)) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
var newrec = new OP_WMS_TRUCK();
|
|
|
|
|
newrec.TRUCKNO = truckno;
|
|
|
|
|
newrec.WMSPLANID = head.WMSPLANID;
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
item.TRUCKNO = 当前车辆信息List[0].TRUCKNO;
|
|
|
|
|
if (item.TRUCKNO == null || item.TRUCKNO == "")
|
|
|
|
|
{
|
|
|
|
|
item.TRUCKNO = trucknoList[0];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|