|
@ -145,18 +145,14 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum }); |
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum }); |
|
|
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount, |
|
|
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount, |
|
|
input.SkipCount, true); |
|
|
input.SkipCount, true); |
|
|
|
|
|
|
|
|
var totalCount = await GetCountAsync(input); |
|
|
var totalCount = await GetCountAsync(input); |
|
|
var stockList = _wmsDapper.GetSalesStock(); |
|
|
var stockList = _wmsDapper.GetSalesStock(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var query= from itm in entities |
|
|
var query= from itm in entities |
|
|
join itm1 in stockList on itm.MaterialCode equals itm1.SapCode |
|
|
join itm1 in stockList on itm.MaterialCode equals itm1.SapCode |
|
|
into temp1 |
|
|
into temp1 |
|
|
from tm1 in temp1.DefaultIfEmpty() |
|
|
from tm1 in temp1.DefaultIfEmpty() |
|
|
select new WmsHQHSharePartOutPutDetial(//少加个发货,由于零件有重复
|
|
|
select new WmsHQHSharePartOutPutDetial(//少加个发货,由于零件有重复
|
|
|
itm.Id, |
|
|
itm.Id, |
|
|
itm.WmsBillNum, |
|
|
itm.WmsBillNum, |
|
|
itm.OrderBillNum, |
|
|
itm.OrderBillNum, |
|
|
itm.MaterialCode, |
|
|
itm.MaterialCode, |
|
@ -173,7 +169,7 @@ into temp1 |
|
|
itm.TaskId, |
|
|
itm.TaskId, |
|
|
itm.Remark, |
|
|
itm.Remark, |
|
|
itm.Qty, |
|
|
itm.Qty, |
|
|
tm1 == null ? 0 : tm1.Qty |
|
|
tm1==null?0:tm1.Qty |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -319,9 +315,10 @@ into temp1 |
|
|
"EXEC @return_value = [dbo].[p_wms_output]\n" + |
|
|
"EXEC @return_value = [dbo].[p_wms_output]\n" + |
|
|
" @billnum = N'{0}',\n" + |
|
|
" @billnum = N'{0}',\n" + |
|
|
" @type = 4\n" + |
|
|
" @type = 4\n" + |
|
|
|
|
|
" @date = N'{1}',\n"+ |
|
|
"SELECT 'Return Value' = @return_value"; |
|
|
"SELECT 'Return Value' = @return_value"; |
|
|
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( |
|
|
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( |
|
|
string.Format(sql, input.BillNum)); |
|
|
string.Format(sql, input.BillNum,input.AccountDate)); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|