From e3cadd08e1303da010defccbf156b2db8e03e43c Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 12 Jan 2022 14:36:19 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettleAccounts/SettleAccountRepository.cs | 32 ++--- .../SettleAccountImportService.cs | 134 +++++++++--------- 2 files changed, 83 insertions(+), 83 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs index 5af42774..5f7f141f 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs @@ -106,24 +106,24 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount try { DbContext.Database.SetCommandTimeout(1200); - List _insertls = new List(); - if (list.Count > 0) - { - var _version = list.FirstOrDefault().Version; - var _ls= GetQueryable().Where(p => p.Version == _version).Select(p=>new { MaterialCode=p.MaterialCode, ChassisNumber=p.ChassisNumber }).ToList(); - var _query = from r1 in list join r2 in _ls on new { r1.ChassisNumber, r1.MaterialCode } equals new { r2.ChassisNumber, r2.MaterialCode } - into temp from t in temp.DefaultIfEmpty() - where t==null - select r1 ; - foreach (var s in _query.ToList()) - { - _insertls.Add(s); - } - } + //List _insertls = new List(); + //if (list.Count > 0) + //{ + // var _version = list.FirstOrDefault().Version; + // var _ls= GetQueryable().Where(p => p.Version == _version).Select(p=>new { MaterialCode=p.MaterialCode, ChassisNumber=p.ChassisNumber }).ToList(); + // var _query = from r1 in list join r2 in _ls on new { r1.ChassisNumber, r1.MaterialCode } equals new { r2.ChassisNumber, r2.MaterialCode } + // into temp from t in temp.DefaultIfEmpty() + // where t==null + // select r1 ; + // foreach (var s in _query.ToList()) + // { + // _insertls.Add(s); + // } + //} - BulkConfig cfg = new BulkConfig() { BulkCopyTimeout=0, BatchSize=2000}; - DbContext.BulkInsert(_insertls,cfg); + BulkConfig cfg = new BulkConfig() { BulkCopyTimeout=0, BatchSize=100000, }; + DbContext.BulkInsert(list,cfg); } catch (Exception e) { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs index e8faaf57..dc7876b4 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs @@ -59,73 +59,73 @@ namespace TaskJob.Services { var filePath = fileSavePath + itm;//获取到导入的excel var exten = Path.GetExtension(fileSavePath); - List _errorList = new List(); - var checkList = new List(); - //var _chList = await _relrepository.GetAllAsync(GuidGenerator.Create(), true); - //var _chls = _chList.Select(p => p.SettleMaterialCode).Distinct(); - List _precodeList = new List();// - if (exten.ToUpper() == ".TXT") - { - using (TextReader textReader = new StreamReader(filePath)) - { - int i = 0; - while (true) - { - string str = textReader.ReadLine(); - if (string.IsNullOrEmpty(str)) - { - break; - } - else - { - try - { - var _lst = str.Split(new char[] { '|' }).ToList(); - string _settleyear = _lst[1].Trim(); - string _kENNCode = _lst[2].Trim(); - string _chassisNumber = _lst[3].Trim(); - string _model = _lst[4].Trim(); - DateTime _cP5A = DateTime.Parse(_lst[5].Trim()); - DateTime _cP7 = DateTime.Parse(_lst[6].Trim()); - string _materialCode = _lst[7].Trim(); - decimal _qty = decimal.Parse(_lst[8].Trim()); - string _settlementID = _lst[9].Trim(); - string _settlementSupplier = _lst[10].Trim(); - _setls.Add(new Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount( - Guid.NewGuid(), - Guid.NewGuid(), - _settleyear, - _kENNCode, - _chassisNumber, - _model, - _cP5A, - _cP7, - _materialCode, - _qty, - _settlementID, - _settlementSupplier, - DateTime.Now.Year.ToString(), - DateTime.Now.Month.ToString(), - _id, - version, - DateTime.Now, - Guid.NewGuid() - )); - } - catch - { + //List _errorList = new List(); + //var checkList = new List(); + ////var _chList = await _relrepository.GetAllAsync(GuidGenerator.Create(), true); + ////var _chls = _chList.Select(p => p.SettleMaterialCode).Distinct(); + //List _precodeList = new List();// + //if (exten.ToUpper() == ".TXT") + //{ + // using (TextReader textReader = new StreamReader(filePath)) + // { + // int i = 0; + // while (true) + // { + // string str = textReader.ReadLine(); + // if (string.IsNullOrEmpty(str)) + // { + // break; + // } + // else + // { + // try + // { + // var _lst = str.Split(new char[] { '|' }).ToList(); + // string _settleyear = _lst[1].Trim(); + // string _kENNCode = _lst[2].Trim(); + // string _chassisNumber = _lst[3].Trim(); + // string _model = _lst[4].Trim(); + // DateTime _cP5A = DateTime.Parse(_lst[5].Trim()); + // DateTime _cP7 = DateTime.Parse(_lst[6].Trim()); + // string _materialCode = _lst[7].Trim(); + // decimal _qty = decimal.Parse(_lst[8].Trim()); + // string _settlementID = _lst[9].Trim(); + // string _settlementSupplier = _lst[10].Trim(); + // _setls.Add(new Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount( + // Guid.NewGuid(), + // Guid.NewGuid(), + // _settleyear, + // _kENNCode, + // _chassisNumber, + // _model, + // _cP5A, + // _cP7, + // _materialCode, + // _qty, + // _settlementID, + // _settlementSupplier, + // DateTime.Now.Year.ToString(), + // DateTime.Now.Month.ToString(), + // _id, + // version, + // DateTime.Now, + // Guid.NewGuid() + // )); + // } + // catch + // { - } - } - i++; - } - textReader.Close(); - } - } - else - { - // _setls= _inputService.Input(filePath); - var errorlist = new List(); + // } + // } + // i++; + // } + // textReader.Close(); + // } + //} + //else + //{ + // _setls= _inputService.Input(filePath); + var errorlist = new List(); var dtoList = _inputService.Input(filePath, null, errorlist); foreach (var dto in dtoList) { @@ -139,7 +139,7 @@ namespace TaskJob.Services DateTime.Now.Month.ToString(), dto.SettleYear, _id, version, DateTime.Now, Guid.NewGuid()); _setls.Add(_settleaccount); } - } + //} #region //var errorFileName = "错误文件.xlsx"; //checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}底盘号 {1}有重复", "11111111111", "22222222222"), string.Empty)); From 8c557ec55962d4c3050a8ab291d07ae216595cee Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 12 Jan 2022 16:58:47 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/WMS/WMSHQFSharePartAppService .cs | 7 +++++-- .../Entities/WMS/WMSHQHSharePartAppService.cs | 7 +++++-- .../Entities/WMS/WmsHQMSharePartAppService.cs | 6 +++++- .../Reports/ReportServices/ReportMakeService.cs | 4 ++-- .../Entities/WMS/TaskList.cs | 17 ++++++++++++++--- .../InvoiceSettledDetailDiffDapperRepository.cs | 4 ---- 6 files changed, 31 insertions(+), 14 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs index a72fb03e..7eae053b 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs @@ -169,7 +169,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts itm.TaskId, itm.Remark, itm.Qty, - tm1 == null ? 0 : tm1.Qty + tm1 == null ? 0 : tm1.Qty, + itm.OutPutQty ); return new PagedResultDto(totalCount, entities); } @@ -235,7 +236,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts GuidGenerator.Create(), string.Empty, p.Qty, - p.StockQty + p.StockQty, + p.Qty )); _lst.AddRange(_lsAry.ToArray()); } @@ -369,6 +371,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts , string.Empty , itm.Qty ,0 + ,itm.Qty ); _lsCopy.Add(_detail); } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs index b343e9b0..f38184b2 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs @@ -169,7 +169,8 @@ into temp1 itm.TaskId, itm.Remark, itm.Qty, - tm1==null?0:tm1.Qty + tm1==null?0:tm1.Qty, + itm.OutPutQty ); @@ -239,7 +240,8 @@ into temp1 GuidGenerator.Create(), string.Empty, p.Qty, - p.StockQty + p.StockQty, + p.Qty )); _lst.AddRange(_lsAry.ToArray()); } @@ -392,6 +394,7 @@ into temp1 , string.Empty , itm.Qty ,0 + ,itm.Qty ); _lsCopy.Add(_detail); } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs index 3469e029..58518e6d 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs @@ -150,6 +150,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS itm.Remark, itm.Qty, tm1 == null ? 0 : tm1.Qty + ,itm.OutPutQty ); @@ -219,7 +220,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS GuidGenerator.Create(), string.Empty, p.Qty, - p.StockQty + p.StockQty, + p.Qty + )); _lst.AddRange(_lsAry.ToArray()); } @@ -372,6 +375,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS , string.Empty , itm.Qty , 0 + ,itm.Qty ); _lsCopy.Add(_detail); } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs index 377cba79..1f2d2709 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs @@ -33,8 +33,8 @@ using Win.Sfs.SettleAccount.Reports.ReportRequestDto; namespace Win.Sfs.SettleAccount.Reports.ReportServices { [Authorize(SettleAccountPermissions.Reports.Default)] - //[AllowAnonymous] - [Route("api/settleaccount/ReportMakeService")] + [AllowAnonymous] + //[Route("api/settleaccount/ReportMakeService")] public class ReportService : ApplicationService { 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 957b78e9..b5ea8dac 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs @@ -470,7 +470,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS public WmsHQMSharePartOutPutDetial() { } - public WmsHQMSharePartOutPutDetial(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) + public WmsHQMSharePartOutPutDetial(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; @@ -490,6 +490,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS Remark = remark; Qty = qty; StockQty = stockQty; + OutPutQty = outputQty; } public void SetId(Guid id) { @@ -545,6 +546,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS public string BillNum { set; get; } [ImporterHeader(Name = "任务ID", IsIgnore = true)] public Guid TaskId { set; get; } + [ImporterHeader(Name = "出库数量", IsIgnore = true)] + public decimal OutPutQty { set; get; } } #endregion @@ -824,7 +827,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS public WmsHQFSharePartOutPutDetial() { } - public WmsHQFSharePartOutPutDetial(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) + public WmsHQFSharePartOutPutDetial(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; @@ -844,6 +847,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS Remark = remark; Qty = qty; StockQty = stockQty; + OutPutQty = outPutQty; + } public void SetId(Guid id) { @@ -899,6 +904,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS public string BillNum { set; get; } [ImporterHeader(Name = "任务ID", IsIgnore = true)] public Guid TaskId { set; get; } + + [ImporterHeader(Name = "出库数量", IsIgnore = true)] + public decimal OutPutQty { set; get; } } @@ -1054,7 +1062,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS public WmsHQHSharePartOutPutDetial() { } - public WmsHQHSharePartOutPutDetial(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) + public WmsHQHSharePartOutPutDetial(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; @@ -1074,6 +1082,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS Remark = remark; Qty = qty; StockQty = stockQty; + OutPutQty = outputQty; } public void SetId(Guid id) { @@ -1129,6 +1138,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS public string BillNum { set; get; } [ImporterHeader(Name = "任务ID", IsIgnore = true)] public Guid TaskId { set; get; } + [ImporterHeader(Name = "出库数量", IsIgnore = true)] + public decimal OutPutQty { set; get; } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs index 109c8236..058f503b 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs @@ -70,13 +70,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report public override decimal Price { set; get; } [ExporterHeader(DisplayName = "金额") ] public override decimal Amt { set; get; } - - //发运数量 [ExporterHeader(DisplayName = "M100数量")] public decimal Qty { set; get; } - - //结算数量 [ExporterHeader(DisplayName = "结算数量")] public decimal SettledQty { set; get; } From 5c0021946c88596aecaf32ed1d4168ddb14fdee0 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 13 Jan 2022 09:53:09 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/WMS/WMSHQFKanbanAppService.cs | 19 +++++++++---------- .../WMS/WMSHQFSharePartAppService .cs | 4 ++-- .../Entities/WMS/WMSHQHKanbanAppService.cs | 4 ++-- .../Entities/WMS/WMSHQHSharePartAppService.cs | 4 ++-- .../Entities/WMS/WMSJitAppService.cs | 4 ++-- .../Entities/WMS/WMSKanbanAppService.cs | 4 ++-- .../Entities/WMS/WMSSharePartAppService.cs | 4 ++-- .../Entities/WMS/WmsHQMKanbanAppService.cs | 4 ++-- .../Entities/WMS/WmsHQMSharePartAppService.cs | 4 ++-- 9 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs index 5cb2a675..d2231235 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs @@ -203,12 +203,12 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts // _lst.Add(_entity); // } - + // } - + // var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version && p.Kanban==string.Empty).ToListAsync(); - + // await _wmsRepository.GetDbContext().BulkInsertAsync(_lst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 }); // int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum); // if (_count == 0) @@ -224,7 +224,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts // await _job.UpdateAsync(job); // } // } - + // return ApplicationConsts.SuccessStr; ; //} @@ -253,18 +253,18 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts var _list = _excelHelper.ExcelToList(); foreach (var itm in _list) { - itm.SetData(GuidGenerator.Create(),string.Empty,!string.IsNullOrEmpty(itm.WmsBillNum)? itm.WmsBillNum:string.Empty,input.Version,GuidGenerator.Create()); + itm.SetData(GuidGenerator.Create(), string.Empty, !string.IsNullOrEmpty(itm.WmsBillNum) ? itm.WmsBillNum : string.Empty, input.Version, GuidGenerator.Create()); } _lst.AddRange(_list.ToArray()); } - + var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version).ToListAsync(); var error = from itm1 in outPutDetail join itm2 in _lst on - new { itm1.MaterialCode, itm1.Kanban,itm1.PoLine } + new { itm1.MaterialCode, itm1.Kanban, itm1.PoLine } equals - new { itm2.MaterialCode, itm2.Kanban,itm2.PoLine } + new { itm2.MaterialCode, itm2.Kanban, itm2.PoLine } select itm1; 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) @@ -318,7 +318,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts { _billNum = string.Empty; } - return ApplicationConsts.SuccessStr; ; + return ApplicationConsts.SuccessStr; ; } /// /// 出库界面功能,核准出库功能 @@ -379,7 +379,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( sql ); - } return true; diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs index 7eae053b..9955c8ff 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs @@ -297,7 +297,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( - string.Format(sql, input.BillNum,input.AccountDate)); + string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString())); } } @@ -330,7 +330,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts " @accountdate = N'{2}'\n" + "SELECT 'Return Value' = @return_value"; - sql = string.Format(sql, str, input.BillNum, input.AccountDate); + sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString()); await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( sql diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs index 3c2899db..f030eafd 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs @@ -338,7 +338,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts " @date = N'{1}'\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( - string.Format(sql, input.BillNum, input.AccountDate) + string.Format(sql, input.BillNum, input.AccountDate.ToShortDateString()) ); @@ -374,7 +374,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts " @accountdate = N'{2}'\n" + "SELECT 'Return Value' = @return_value"; - sql = string.Format(sql, str, input.BillNum, input.AccountDate); + sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString()); await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( sql diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs index f38184b2..63a83ebb 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs @@ -320,7 +320,7 @@ into temp1 " @date = N'{1}',\n"+ "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( - string.Format(sql, input.BillNum,input.AccountDate)); + string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString())); } } @@ -353,7 +353,7 @@ into temp1 " @accountdate = N'{2}'\n" + "SELECT 'Return Value' = @return_value"; - sql = string.Format(sql, str, input.BillNum, input.AccountDate); + sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString()); await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( sql diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs index 04e7ba18..883f4515 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs @@ -415,7 +415,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts " @date = N'{1}'\n"+ "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( - string.Format(sql,input.BillNum,input.AccountDate) + string.Format(sql,input.BillNum,input.AccountDate.ToShortDateString()) ); @@ -452,7 +452,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts " @accountdate = N'{2}'\n" + "SELECT 'Return Value' = @return_value"; - sql= string.Format(sql, str, input.BillNum, input.AccountDate); + sql= string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString()); await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( sql diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs index 90cf82d8..c740d0e6 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs @@ -394,7 +394,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts " @date = N'{1}'\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( - string.Format(sql, input.BillNum)); + string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString())); } } @@ -428,7 +428,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts " @accountdate = N'{2}'\n" + "SELECT 'Return Value' = @return_value"; - sql = string.Format(sql, str, input.BillNum, input.AccountDate); + sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString()); await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( sql 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 00bfbcd1..4d12f682 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs @@ -318,7 +318,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts " @date = N'{1}'\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( - string.Format(sql, input.BillNum)); + string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString())); } } @@ -352,7 +352,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts " @accountdate = N'{2}'\n" + "SELECT 'Return Value' = @return_value"; - sql = string.Format(sql, str, input.BillNum, input.AccountDate); + sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString()); await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( sql diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs index 5806d328..e25cbe58 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs @@ -256,7 +256,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS " @date = N'{1}'\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( - string.Format(sql, input.BillNum, input.AccountDate) + string.Format(sql, input.BillNum, input.AccountDate.ToShortDateString()) ); @@ -292,7 +292,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS " @accountdate = N'{2}'\n" + "SELECT 'Return Value' = @return_value"; - sql = string.Format(sql, str, input.BillNum, input.AccountDate); + sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString()); await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( sql diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs index 58518e6d..f5ca3113 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs @@ -301,7 +301,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS " @date = N'{1}',\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( - string.Format(sql, input.BillNum,input.AccountDate)); + string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString())); } } @@ -334,7 +334,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS " @accountdate = N'{2}'\n" + "SELECT 'Return Value' = @return_value"; - sql = string.Format(sql, str, input.BillNum, input.AccountDate); + sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString()); await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( sql From 0a0791aecb4f627b9410a17fc790844f7d267167 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 13 Jan 2022 10:02:58 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WMS/WMSHQFSharePartAppService .cs | 26 ++++++++++++++++ .../Entities/WMS/WMSHQHSharePartAppService.cs | 30 ++++++++++++++++++- .../Entities/WMS/WmsHQMSharePartAppService.cs | 26 ++++++++++++++++ 3 files changed, 81 insertions(+), 1 deletion(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs index 9955c8ff..f6e118ed 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs @@ -338,6 +338,32 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts } return true; } + + /// + /// 任务明细标记已确认 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + [HttpPost] + [Route("WmsSharePartOutPutModify")] + [DisableRequestSizeLimit] + + public async Task WmsSharePartUpdate(WmsHQHSharePartOutPutDetial 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; + + } + + [HttpPost] [Route("ExcelImport")] [DisableRequestSizeLimit] diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs index 63a83ebb..8f700bd6 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs @@ -198,6 +198,35 @@ into temp1 return true; } + + /// + /// 任务明细标记已确认 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + [HttpPost] + [Route("WmsSharePartOutPutModify")] + [DisableRequestSizeLimit] + + public async Task WmsSharePartUpdate(WmsHQHSharePartOutPutDetial 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; + + } + + + + + /// /// 选择任务,生成出库单,只包含已确认的单据 /// @@ -321,7 +350,6 @@ into temp1 "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString())); - } } return true; diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs index f5ca3113..46092ff8 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs @@ -307,6 +307,32 @@ namespace Win.Sfs.SettleAccount.Entities.WMS } return true; } + + /// + /// 任务明细标记已确认 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + [HttpPost] + [Route("WmsSharePartOutPutModify")] + [DisableRequestSizeLimit] + + public async Task WmsSharePartUpdate(WmsHQHSharePartOutPutDetial 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; + + } + + /// ///出库界面功能, 撤销核准出库 /// From 81d7ea79262dd75fbd1c921d4124e8e53e46e2c4 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 13 Jan 2022 10:05:52 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReportServices/ReportMakeService.cs | 4 ++-- .../SettleAccount.Application.xml | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs index 1f2d2709..a895191a 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs @@ -33,8 +33,8 @@ using Win.Sfs.SettleAccount.Reports.ReportRequestDto; namespace Win.Sfs.SettleAccount.Reports.ReportServices { [Authorize(SettleAccountPermissions.Reports.Default)] - [AllowAnonymous] - //[Route("api/settleaccount/ReportMakeService")] + + [Route("api/settleaccount/ReportMakeService")] public class ReportService : ApplicationService { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml index 10151a13..2f392385 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml @@ -1805,6 +1805,13 @@ + + + 任务明细标记已确认 + + 上传的文件(前端已经限制只能上传一个附件) + + wms出库 @@ -1901,6 +1908,13 @@ 上传的文件(前端已经限制只能上传一个附件) + + + 任务明细标记已确认 + + 上传的文件(前端已经限制只能上传一个附件) + + 选择任务,生成出库单,只包含已确认的单据 @@ -2851,6 +2865,13 @@ + + + 任务明细标记已确认 + + 上传的文件(前端已经限制只能上传一个附件) + + 出库界面功能, 撤销核准出库