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