diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs index fd58c5ee..981d3533 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs @@ -355,7 +355,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS var sql = "DECLARE @return_value int\n" + "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + - " @type = 2,\n" + + " @type = 10,\n" + " @date = N'{1}'\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( @@ -389,7 +389,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS "EXEC @return_value = [dbo].[p_wms_output_cancel]\n" + " @Guids ='{0}', \n" + " @billnum = N'{1}',\n" + - " @type = 2,\n" + + " @type = 10,\n" + " @accountdate = N'{2}'\n" + "SELECT 'Return Value' = @return_value"; @@ -423,7 +423,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS var sql = "DECLARE @return_value int\n" + "EXEC @return_value = [dbo].[p_wms_output_cancel_all]\n" + " @billnum = N'{0}',\n" + - " @type = 2\n" + + " @type = 10\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( string.Format(sql, input.BillNum) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs index 96157c57..3973b4be 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs @@ -207,7 +207,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts _billNum, GuidGenerator.Create(), string.Empty, - p.Qty + p.Qty, + p.StockQty, + p.Qty )); _lst.AddRange(_list.ToArray()); } @@ -252,7 +254,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts _billNum, GuidGenerator.Create(), string.Empty, - p.Qty + p.Qty, + p.StockQty, + p.Qty )).ToList(); await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 }); int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum); @@ -326,6 +330,25 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts } return true; } + + + [HttpPost] + [Route("WmsSharePartOutPutModify")] + [DisableRequestSizeLimit] + public async Task WmsSharePartUpdate(WmsSharePartOutPutDetial detial) + { + var _entityList = _wmsRepository.Where(p => p.Id == detial.Id).ToList(); + if (_entityList.Count() > 0) + { + foreach (var itm in _entityList) + { + itm.OutPutQty = detial.OutPutQty; + await _wmsRepository.UpdateAsync(itm); + } + } + return true; + + } /// ///出库界面功能, 撤销核准出库 /// @@ -429,6 +452,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts GuidGenerator.Create() , string.Empty , itm.Qty + , 0 + , itm.Qty ); _lsCopy.Add(_detail); } 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 f43361bd..6b107b77 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs @@ -1386,7 +1386,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS { } - public WmsSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode, string billNum, Guid taskId, string remark, decimal qty) + public WmsSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode, string billNum, Guid taskId, string remark, decimal qty, decimal stockQty, decimal outputQty) { Id = id; WmsBillNum = wmsBillNum; @@ -1405,6 +1405,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS TaskId = taskId; Remark = remark; Qty = qty; + StockQty = stockQty; + OutPutQty = outputQty; } @@ -1466,6 +1468,12 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [ImporterHeader(Name = "任务代码", IsIgnore = true)] public Guid TaskId { set; get; } + [ImporterHeader(Name = "寄销库数量", IsIgnore = true)] + public decimal StockQty { set; get; } + + [ImporterHeader(Name = "出库数量", IsIgnore = true)] + public decimal OutPutQty { set; get; } + }