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 2cd7c85c..588d8740 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs @@ -313,7 +313,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts if (_count == 0) { var _version = new WmsHQFKanbanOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email); - + _version.Remark = !string.IsNullOrEmpty(_joblist.FirstOrDefault().Remark) ? _joblist.FirstOrDefault().Remark : string.Empty; await _wmsVersionRepository.InsertAsync(_version, true); } 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 b98d7efd..78bc6dd7 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs @@ -310,7 +310,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts if (_count == 0) { var _version = new WmsHQHKanbanOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email); - + _version.Remark = !string.IsNullOrEmpty(_joblist.FirstOrDefault().Remark) ? _joblist.FirstOrDefault().Remark : string.Empty; await _wmsVersionRepository.InsertAsync(_version, true); } @@ -514,6 +514,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts if (_count == 0) { var _version = new WmsHQHKanbanOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email); + await _wmsVersionRepository.InsertAsync(_version, true); } return ApplicationConsts.SuccessStr; 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 a2510079..e0dfeee1 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs @@ -315,6 +315,8 @@ into temp1 if (_count == 0) { var _version = new WmsHQHSharePartOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email); + _version.Remark= !string.IsNullOrEmpty(_joblist.FirstOrDefault().Remark) ? _joblist.FirstOrDefault().Remark : string.Empty; + await _wmsVersionRepository.InsertAsync(_version, true); } 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 eb845b1c..640e5993 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs @@ -408,6 +408,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts ,itm.Qty ,itm.Price ,Math.Round(itm.Qty*itm.Price,2) + ); _lsCopy.Add(_detail); } @@ -443,6 +444,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts if (_count == 0 && _wmslst.Count()>0) { var _version = new WmsJitOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email); + _version.Remark = !string.IsNullOrEmpty(_joblist.FirstOrDefault().Remark) ? _joblist.FirstOrDefault().Remark : string.Empty; //var _ls = new List(); //_ls.Add(_version); await _wmsVersionRepository.InsertAsync(_version, true); 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 083459ed..e3533e34 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs @@ -344,13 +344,14 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts foreach (var itm in _wmslst) { itm.BillNum = _billNum; + } await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 }); int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum); if (_count == 0 && _wmslst.Count()>0) { var _version = new WmsKanbanOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email); - + _version.Remark = !string.IsNullOrEmpty(_joblist.FirstOrDefault().Remark) ? _joblist.FirstOrDefault().Remark : string.Empty; await _wmsVersionRepository.InsertAsync(_version, true); } 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 ba736562..5cbbb5be 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs @@ -296,6 +296,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS if (_count == 0) { var _version = new WmsWithOutKanbanOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email); + await _wmsVersionRepository.InsertAsync(_version, true); } return ApplicationConsts.SuccessStr; ; 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 8e672e40..9c5481a8 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs @@ -404,6 +404,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts if (_wmslst.Count() > 0 && _count == 0) { var _version = new WmsSharePartOutPut(GuidGenerator.Create(), input.Version, _billNoNum, CurrentUser.Email); + _version.Remark= !string.IsNullOrEmpty(_joblist.FirstOrDefault().Remark) ? _joblist.FirstOrDefault().Remark : string.Empty; + + await _wmsVersionRepository.InsertAsync(_version, true); } foreach (var job in _joblist) @@ -486,6 +489,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts if (_wmslstBill.Count() > 0 && _count == 0) { var _version = new WmsSharePartOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email); + + _version.Remark= !string.IsNullOrEmpty(_joblist.FirstOrDefault().Remark) ? _joblist.FirstOrDefault().Remark : string.Empty; + await _wmsVersionRepository.InsertAsync(_version, true); } foreach (var job in _joblist) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs index a674317a..3d3889cf 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs @@ -268,7 +268,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS if (_count == 0) { var _version = new WmsHQCarOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email); - + _version.Remark = !string.IsNullOrEmpty(_joblist.FirstOrDefault().Remark) ? _joblist.FirstOrDefault().Remark : string.Empty; await _wmsVersionRepository.InsertAsync(_version, true); } diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs index 8c919fae..008ce474 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs @@ -152,9 +152,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " C.CustomerPartCode,\n" + " C.EstimateTypeDesc MaterialGroup,\n" + " ISNULL( B.Qty, 0 ) SettleQty,\n" + - " a.Qty,\n" + + " a.WMSDeliveryQty,\n" + " (\n" + - " a.Qty - ISNULL( b.Qty, 0 )) AS DiffQty \n" + + " a.WMSDeliveryQty - ISNULL( b.Qty, 0 )) AS DiffQty \n" + " FROM\n" + " Set_WMSKanBanSettle A\n" + " LEFT JOIN ( SELECT * FROM Set_KanBanSettle WHERE version = '{0}' ) B ON A.Kanban = B.Kanban \n" + diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs index df5edd16..c8e69f87 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs @@ -42,7 +42,7 @@ namespace SettleAccount.Job.Services.Report var materialGroup = p_list.Where(p => p.Name == "MaterialGroup").FirstOrDefault().Value; var sapCode = p_list.Where(p => p.Name == "SapCode").FirstOrDefault().Value; var _ls = _dapper.GetKanbanReportList(version, begin,end); - var _lst = _dapper.GetNoKanbanReportList(version, begin, end); + // var _lst = _dapper.GetNoKanbanReportList(version, begin, end); if (!string.IsNullOrEmpty(materialGroup)) { var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList(); @@ -72,7 +72,7 @@ namespace SettleAccount.Job.Services.Report var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList(); if (_groupList.Count() > 0) { - _lst = _lst.Where(p => _groupList.Contains(p.MaterialGroup)).ToList(); + _ls = _ls.Where(p => _groupList.Contains(p.MaterialGroup)).ToList(); } } //if (!string.IsNullOrEmpty(materialCode)) @@ -88,13 +88,12 @@ namespace SettleAccount.Job.Services.Report var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList(); if (_groupList.Count() > 0) { - _lst = _lst.Where(p => _groupList.Contains(p.SapCode)).ToList(); + _ls = _ls.Where(p => _groupList.Contains(p.SapCode)).ToList(); } } ExcelExporter _exporter = new ExcelExporter();//导出Excel var result = _exporter.Append(_ls.ToList(), "有看板号未结差异对比") - .SeparateBySheet() - .Append(_lst.ToList(), "无看板号未结差异对比") + .ExportAppendDataAsByteArray(); result.ShouldNotBeNull(); _fileContainer.SaveAsync(_filename, result.Result, true);