diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs index 9dac590d..fcf4db15 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs @@ -294,7 +294,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [HttpPost] [Route("WmsKanbanOutPut-Pass")] [UnitOfWork(false)] - public async Task WmsKanbanOutPutPass(WmsJitRequestDto input) + public async Task WmsKanbanOutPutPass(WmsJitRequestDto input) { if (input.Guids != null) { @@ -307,7 +307,29 @@ 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).ToList(); + _ls = _ls.Where(p => p.SockQty < p.OutputQty || p.Qty(); + + + foreach (var itm in _ls) + { + checkList.Add(new ErrorExportDto() { Message = string.Format("物料号:{0}出库数量大于结算数量或寄售库存数量!") }); + } + + + + if (checkList.Count > 0) + { + + return await ExportErrorReportAsync(checkList); + } + + + + + if (_ls.Count() > 0) { var sql = "DECLARE @return_value int\n" + @@ -321,7 +343,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS } } - return true; + return ApplicationConsts.SuccessStr; ; } /// ///出库界面功能, 撤销核准出库 diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs index 879c9934..8703267f 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs @@ -280,7 +280,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [HttpPost] [Route("WmsKanbanOutPut-Pass")] [UnitOfWork(false)] - public async Task WmsKanbanOutPutPass(WmsJitRequestDto input) + public async Task WmsKanbanOutPutPass(WmsJitRequestDto input) { if (input.Guids != null) { @@ -293,7 +293,19 @@ 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).ToList(); + _ls = _ls.Where(p => p.SockQty < p.OutputQty || p.Qty < p.OutputQty).ToList(); + var checkList = new List(); + + foreach (var itm in _ls) + { + checkList.Add(new ErrorExportDto() { Message = string.Format("物料号:{0}出库数量大于结算数量或寄售库存数量!") }); + } + if (checkList.Count > 0) + { + + return await ExportErrorReportAsync(checkList); + } + if (_ls.Count() > 0) { var sql = "DECLARE @return_value int\n" + @@ -308,7 +320,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS } } - return true; + return ApplicationConsts.SuccessStr; } /// ///出库界面功能, 撤销核准出库 diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs index 0a23290e..4e46dc76 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs @@ -504,7 +504,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS public string MaterialDesc { set; get; } [ImporterHeader(Name = "版本号")] public string Version { set; get; } - [ImporterHeader(Name = "是否备件")] + [ImporterHeader(Name = "是否备件", IsIgnore = true)] public string IsBack { set; get; } [ImporterHeader(Name = "结算数量")] public decimal Qty { set; get; }