Browse Source

更行版本

FoShanPG
Administrator 3 years ago
parent
commit
9ce89afac5
  1. 12
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs

12
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs

@ -77,7 +77,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
await _wmsRepository.DeleteAsync(p => p.State == 0 && p.Version == version,true);
var _query1= _wmsRepository.Where(p => p.Version == version);
var _existLst = _query1.ToList();
var _maxLine = _existLst.Max(p => p.LineNumber);
var _diffls = from itm1 in _ls
join itm2 in _existLst
on new { BillNum=itm1., MaterialCode=itm1., Pric=itm1. }
@ -88,12 +88,12 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
List<WmsDetailReport> _lst = new List<WmsDetailReport>();
if (_difflst != null && _difflst.Count() > 0)
{
int line= _maxLine+1;
foreach (var itm in _difflst)
{
line = line++;
_lst.Add(new WmsDetailReport(Guid.NewGuid(),
line,
int.Parse(itm.),
itm.,
itm.,
itm.,
@ -299,10 +299,12 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
throw new BusinessException("8989", "记录中有已经完成记录!");
return false;
}
int lineNumber = 1;
foreach (var itm in entities)
{
itm.LineNumber = lineNumber;
itm.State = 2;
lineNumber++;
}
await _wmsRepository.GetDbContext().BulkUpdateAsync(entities);

Loading…
Cancel
Save