|
|
@ -307,13 +307,13 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
|
{ |
|
|
|
_ls = await _wmsRepository.Where(p => p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync(); |
|
|
|
} |
|
|
|
_ls = _ls.Where(p => p.SockQty < p.OutputQty || p.Qty<p.OutputQty).ToList(); |
|
|
|
var _errorls = _ls.Where(p => p.SockQty < p.OutputQty || p.Qty<p.OutputQty).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
var checkList = new List<ErrorExportDto>(); |
|
|
|
|
|
|
|
|
|
|
|
foreach (var itm in _ls) |
|
|
|
foreach (var itm in _errorls) |
|
|
|
{ |
|
|
|
checkList.Add(new ErrorExportDto() { Message = string.Format("物料号:{0}出库数量大于结算数量或寄售库存数量!",itm.SapMaterialCode) }); |
|
|
|
} |
|
|
@ -333,10 +333,10 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
|
if (_ls.Count() > 0) |
|
|
|
{ |
|
|
|
var sql = "DECLARE @return_value int\n" + |
|
|
|
"EXEC @return_value = [dbo].[p_wms_output]\n" + |
|
|
|
" @billnum = N'{0}',\n" + |
|
|
|
" @type = 11,\n" + |
|
|
|
" @date = N'{1}'\n" + |
|
|
|
" EXEC @return_value = [dbo].[p_wms_output]\n" + |
|
|
|
" @billnum = N'{0}',\n" + |
|
|
|
" @type = 11,\n" + |
|
|
|
" @date = N'{1}'\n" + |
|
|
|
"SELECT 'Return Value' = @return_value"; |
|
|
|
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( |
|
|
|
string.Format(sql, input.BillNum, input.AccountDate.ToShortDateString())); |
|
|
|