@ -200,7 +200,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
tm1 = = null ? 0 : tm1 . Qty ,
itm . OutPutQty ,
itm . Price ,
itm . Amt
itm . Amt ,
itm . RealityNumber
) ;
@ -246,7 +247,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
var fileList = _ joblist . Select ( p = > p . RealDownFileName ) . ToList ( ) ;
List < WmsSharePartOutPutDetial > _l st = new List < WmsSharePartOutPutDetial > ( ) ; //无订单
List < WmsSharePart90OutPutDetial > _l stBill = new List < WmsSharePart90OutPutDetial > ( ) ; //有订单
List < WmsSharePart90OutPutDetial > _l st90 Bill = new List < WmsSharePart90OutPutDetial > ( ) ; //有订单
foreach ( var filename in fileList )
{
string fileSavePath = Environment . CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename ;
@ -258,7 +259,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
//NoOrder用来标识采购订单号为空的数据
var _l ist = _l istSummary . Where ( p = > p . OrderBillNum = = "NoOrder" ) . ToList ( ) ; //没有采购订单号的集合
var _l istBill = _l ist90Summary . Where ( p = > ! string . IsNullOrEmpty ( p . OrderBillNum ) & & p . OrderBillNum ! = "NoOrder" ) . ToList ( ) ; //有采购订单号的集合
var _l ist90 Bill = _l ist90Summary . Where ( p = > ! string . IsNullOrEmpty ( p . OrderBillNum ) & & p . OrderBillNum ! = "NoOrder" ) . ToList ( ) ; //有采购订单号的集合
//var _list = _excelHelper.ExcelToList<WmsSharePartOutPutDetial>();
@ -288,15 +289,16 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
p . StockQty ,
p . Qty ,
p . Price ,
p . Amt
p . Amt ,
p . RealityNumber
) ) ;
_l st . AddRange ( _l ist . ToArray ( ) ) ;
}
if ( _l istBill ! = null & & _l istBill . Count ( ) > 0 )
if ( _l ist90 Bill ! = null & & _l ist90 Bill . Count ( ) > 0 )
{
var _l sAry = _l istBill . Select ( p = > new
WmsSharePartOutPutDetial (
var _l sAry = _l ist90 Bill . Select ( p = > new
WmsSharePart90 OutPutDetial (
GuidGenerator . Create ( ) ,
p . WmsBillNum ,
p . OrderBillNum ,
@ -320,7 +322,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
p . Price ,
p . Amt
) ) ;
_l stBill . AddRange ( _l istBill . ToArray ( ) ) ;
_l st90 Bill . AddRange ( _l ist90 Bill . ToArray ( ) ) ;
}
}
@ -371,7 +373,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
p . StockQty ,
p . Qty ,
p . Price ,
p . Amt
p . Amt , p . RealityNumber
) ) . ToList ( ) ;
await _ wmsRepository . GetDbContext ( ) . BulkInsertAsync ( _ wmslst , new BulkConfig ( ) { BulkCopyTimeout = 0 , BatchSize = 1 0 0 0 0 } ) ;
int _ count = _ wmsVersionRepository . Count ( p = > p . Version = = input . Version & & p . BillNum = = _ billNoNum ) ;
@ -409,13 +411,13 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
//有采购订单号
//往Set_WmsSharePart90OutPutDetial表中存储
if ( _l stBill ! = null & & _l stBill . Count > 0 )
if ( _l st90 Bill ! = null & & _l st90 Bill . Count > 0 )
{
//有采购订单号
var outPutDetailBill = await _ wmsRepository90 . Where ( p = > p . Version = = input . Version & & ! string . IsNullOrEmpty ( p . OrderBillNum ) ) . ToListAsync ( ) ;
var error = from itm1 in outPutDetailBill
join itm2 in _l stBill on
join itm2 in _l st90 Bill on
new { itm1 . MaterialCode , itm1 . OrderBillNum }
equals
new { itm2 . MaterialCode , itm2 . OrderBillNum }
@ -424,7 +426,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var errList = error . GroupBy ( p = > new { p . BillNum } ) . Select ( p = > new { BillNum = p . Key . BillNum , Number = p . Sum ( itm = > itm . Qty ) } ) ;
if ( errList . Count ( ) = = 0 )
{
var queryBill = from itm1 in _l stBill
var queryBill = from itm1 in _l st90 Bill
join itm2 in outPutDetailBill on
new { itm1 . MaterialCode , itm1 . OrderBillNum }
equals
@ -714,7 +716,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
, 0
, itm . Qty
, itm . Price
, itm . Amt
, itm . Amt , itm . RealityNumber
) ;
_l sCopy . Add ( _d etail ) ;
}