|
|
@ -802,34 +802,15 @@ namespace CK.SCP.GrupUniApi.Controller |
|
|
|
{ |
|
|
|
var _liii = _lii.ToList(); |
|
|
|
var _entity = _liii.First(); |
|
|
|
var _askdetail = wdb.TB_ASK_DETAIL.Count(p => p.PoBillNum == _entity.purDocNO && p.State > -1); |
|
|
|
if(_askdetail== _liii.Count()) |
|
|
|
{ |
|
|
|
var ask = wdb.TB_ASK.FirstOrDefault(p=>p.PoBillNum==_entity.purDocNO); |
|
|
|
ask.State = -1; |
|
|
|
ask.IsDeleted = true; |
|
|
|
wmsAskList.Add(ask); |
|
|
|
var askdetaill=wdb.TB_ASK_DETAIL.Where(p => p.PoBillNum == _entity.purDocNO).ToList(); |
|
|
|
// 根据 零件号作废
|
|
|
|
var askdetaill = wdb.TB_ASK_DETAIL.Where(p => p.PoBillNum == _entity.purDocNO && p.PartCode == _entity.mtlNO).ToList(); |
|
|
|
askdetaill.ForEach(p => |
|
|
|
{ |
|
|
|
p.State = -1; |
|
|
|
p.IsDeleted = true; |
|
|
|
wmsAskDetailList.Add(p); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var askdetaill = wdb.TB_ASK_DETAIL.Where(p => p.PoBillNum == _entity.purDocNO).ToList(); |
|
|
|
askdetaill.ForEach(p => |
|
|
|
{ |
|
|
|
p.State = -1; |
|
|
|
p.IsDeleted = true; |
|
|
|
wmsAskDetailList.Add(p); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
foreach (var qadPoNbr in Ilist) |
|
|
|
{ |
|
|
|
var qadDataList = wmsPoList.Count(p => p.PoBillNum == qadPoNbr.purDocNO); |
|
|
@ -897,6 +878,8 @@ namespace CK.SCP.GrupUniApi.Controller |
|
|
|
|
|
|
|
var qadASKList = wmsAskDetailList.Count(p => p.PoBillNum == qadPoNbr.purDocNO && p.PartCode == qadPoNbr.mtlNO); |
|
|
|
var wmsAskDetail1 = wdb.TB_ASK_DETAIL.Count(p => p.PoBillNum == qadPoNbr.purDocNO && p.PartCode == qadPoNbr.mtlNO); |
|
|
|
//
|
|
|
|
var tapart = wdb.TA_PART.Where(q => q.PartCode == qadPoNbr.mtlNO.Trim()).ToList(); |
|
|
|
if (qadASKList == 0 && wmsAskDetail1 == 0) |
|
|
|
{ |
|
|
|
String str = "k"; |
|
|
@ -914,7 +897,7 @@ namespace CK.SCP.GrupUniApi.Controller |
|
|
|
EndTime = qadPoNbr.itemDeliveryDate,//ÊÕ»õ½áÊøʱ¼ä
|
|
|
|
Price = 0, |
|
|
|
AskQty = qadPoNbr.quantity, |
|
|
|
DockCode = "YC", |
|
|
|
DockCode = tapart.Count()>0 ? tapart.FirstOrDefault().PartGroup:"YC", |
|
|
|
PoUnit = qadPoNbr.baseUnitMeasure, |
|
|
|
Currency = qadPoNbr.sizecoL, |
|
|
|
}; |
|
|
|