diff --git a/src/Modules/BaseService/BaseService.Application.Contracts/HbDtoExtensions.cs b/src/Modules/BaseService/BaseService.Application.Contracts/HbDtoExtensions.cs new file mode 100644 index 00000000..6313e9ce --- /dev/null +++ b/src/Modules/BaseService/BaseService.Application.Contracts/HbDtoExtensions.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Identity; +using Volo.Abp.ObjectExtending; +using Volo.Abp.Threading; + +namespace BaseService +{ + public static class HbDtoExtensions + { + private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); + + public static void Configure() + { + OneTimeRunner.Run(() => + { + /* You can add extension properties to DTOs + * defined in the depended modules. + * + * Example: + * + * ObjectExtensionManager.Instance + * .AddOrUpdateProperty("Title"); + * + * See the documentation for more: + * https://docs.abp.io/en/abp/latest/Object-Extensions + */ + ObjectExtensionManager.Instance + .AddOrUpdateProperty( + new[] + { + typeof(IdentityUserDto), + typeof(IdentityUserCreateDto), + typeof(IdentityUserUpdateDto), + typeof(UpdateProfileDto) + }, + "CodeNum" + ); + }); + } + } +} diff --git a/src/Modules/BaseService/BaseService.Application/BaseServiceApplicationAutoMapperProfile.cs b/src/Modules/BaseService/BaseService.Application/BaseServiceApplicationAutoMapperProfile.cs index 66ba4a2f..f22660de 100644 --- a/src/Modules/BaseService/BaseService.Application/BaseServiceApplicationAutoMapperProfile.cs +++ b/src/Modules/BaseService/BaseService.Application/BaseServiceApplicationAutoMapperProfile.cs @@ -9,6 +9,8 @@ using BaseService.BaseData.BranchManagement.Dto; using BaseService.BaseData.UserBranchRoleManagement.Dto; using BaseService.RelationData.Dto; +using Volo.Abp.Identity; + namespace BaseService { public class BaseServiceApplicationAutoMapperProfile : Profile @@ -24,6 +26,8 @@ namespace BaseService //分支--角色 CreateMap(); + + CreateMap().MapExtraProperties(); } } } diff --git a/src/Modules/BaseService/BaseService.Application/UserManagement/UserAppService.cs b/src/Modules/BaseService/BaseService.Application/UserManagement/UserAppService.cs index b70e6b1c..a2ffa872 100644 --- a/src/Modules/BaseService/BaseService.Application/UserManagement/UserAppService.cs +++ b/src/Modules/BaseService/BaseService.Application/UserManagement/UserAppService.cs @@ -22,6 +22,7 @@ using Volo.Abp.ObjectExtending; using Volo.Abp.PermissionManagement; using Volo.Abp.Users; using IdentityUser = Volo.Abp.Identity.IdentityUser; +using Volo.Abp.Data; namespace BaseService.Systems.UserManagement { @@ -122,6 +123,13 @@ namespace BaseService.Systems.UserManagement public async Task UpdateAsync(Guid id, IdentityUserUpdateDto input) { var user = await UserManager.GetByIdAsync(id); + // user.SetProperty("Title", "My custom title value!"); + //var gettitle= user.GetProperty("Title"); + // if(string.IsNullOrEmpty(gettitle)) + // { + // throw new BusinessException("用户标题不能为空"); + // } + user.ConcurrencyStamp = input.ConcurrencyStamp; (await UserManager.SetUserNameAsync(user, input.UserName)).CheckErrors(); @@ -138,6 +146,7 @@ namespace BaseService.Systems.UserManagement } var dto = ObjectMapper.Map(user); + await CurrentUnitOfWork.SaveChangesAsync(); diff --git a/src/Modules/BaseService/BaseService.Domain/Users/AppUser.cs b/src/Modules/BaseService/BaseService.Domain/Users/AppUser.cs index 625c0ff1..c176e663 100644 --- a/src/Modules/BaseService/BaseService.Domain/Users/AppUser.cs +++ b/src/Modules/BaseService/BaseService.Domain/Users/AppUser.cs @@ -32,7 +32,7 @@ namespace BaseService.Users #endregion - + public string CodeNum { get; set; } //public Guid BranchId { get; set; } //public bool Enable { get; set; } diff --git a/src/Modules/BaseService/BaseService.EntityFrameworkCore/EntityFrameworkCore/BaseEfCoreEntityExtensionMappings.cs b/src/Modules/BaseService/BaseService.EntityFrameworkCore/EntityFrameworkCore/BaseEfCoreEntityExtensionMappings.cs index 71aa980e..0b76ac1d 100644 --- a/src/Modules/BaseService/BaseService.EntityFrameworkCore/EntityFrameworkCore/BaseEfCoreEntityExtensionMappings.cs +++ b/src/Modules/BaseService/BaseService.EntityFrameworkCore/EntityFrameworkCore/BaseEfCoreEntityExtensionMappings.cs @@ -14,6 +14,15 @@ namespace BaseService.EntityFrameworkCore { BaseServiceModuleExtensionConfigurator.Configure(); + ObjectExtensionManager.Instance + .MapEfCoreProperty( + "CodeNum", + (entityBuilder, propertyBuilder) => + { + + } + ); + //OneTimeRunner.Run(() => //{ // ObjectExtensionManager.Instance diff --git a/src/Modules/BaseService/BaseService.Host/BaseService.Host.csproj b/src/Modules/BaseService/BaseService.Host/BaseService.Host.csproj index c6fe1a45..a37b3da0 100644 --- a/src/Modules/BaseService/BaseService.Host/BaseService.Host.csproj +++ b/src/Modules/BaseService/BaseService.Host/BaseService.Host.csproj @@ -30,7 +30,7 @@ - + diff --git a/src/Modules/BaseService/BaseService.Host/FileStorage/Migrations/BaseServiceMigrationDbContextModelSnapshot.cs b/src/Modules/BaseService/BaseService.Host/FileStorage/Migrations/BaseServiceMigrationDbContextModelSnapshot.cs index b5614c92..764ff34b 100644 --- a/src/Modules/BaseService/BaseService.Host/FileStorage/Migrations/BaseServiceMigrationDbContextModelSnapshot.cs +++ b/src/Modules/BaseService/BaseService.Host/FileStorage/Migrations/BaseServiceMigrationDbContextModelSnapshot.cs @@ -19,7 +19,7 @@ namespace FileStorage.Migrations .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("ProductVersion", "5.0.1"); + .HasAnnotation("ProductVersion", "5.0.7"); modelBuilder.Entity("BaseService.BaseData.Branch", b => { @@ -653,6 +653,9 @@ namespace FileStorage.Migrations .HasDefaultValue(0) .HasColumnName("AccessFailedCount"); + b.Property("CodeNum") + .HasColumnType("nvarchar(max)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs index d2045e8f..5cae35a9 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs @@ -103,15 +103,24 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H throw new BusinessException("导入模板数据不能为空!"); } - var entityList = ObjectMapper.Map, List>(result); + var entityList_org = ObjectMapper.Map, List>(result); + + var entityList= entityList_org.Where(p => !string.IsNullOrEmpty(p.MaterialCode)).ToList();//过滤掉物料号为空的数据 + + var gethqimportdata = entityList.Select(p => p.MaterialCode).Distinct().ToList(); + var getmaterial = _erpdapperRepository.GetMaterialListCustomerPartCode(); //和物料主数据中SAP物料号检验是否存在 - foreach (var itm in entityList) + var query = from itm in gethqimportdata + join itm1 in getmaterial on itm equals itm1.CustomerPartCode into temp1 + from tm1 in temp1.DefaultIfEmpty() + where tm1 == null + select itm; + + + foreach (var itm in query) { - if (!_erpdapperRepository.GetMaterialList().Any(p => p.CustomerPartCode == itm.MaterialCode)) - { - checkList.Add(new ErrorExportDto(version, "红旗结算导入", string.Empty, string.Empty, itm.MaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.MaterialCode), string.Empty)); - } + checkList.Add(new ErrorExportDto(version, "红旗结算导入", string.Empty, string.Empty, itm, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm), string.Empty)); } if (checkList.Count > 0) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs index c33ba1f8..0afee3d8 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs @@ -216,7 +216,8 @@ namespace Win.Sfs.SettleAccount.Entities.Prices var entityList = ObjectMapper.Map, List>(result); var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).OrderByDescending(p => p.BeginDate).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault()); - + //只过滤类型为10的即正常价格,类型为20的是备件价格 + _ls = _ls.Where(p => p.Type == 10).ToList(); foreach (var itm in _ls) { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs index 1c0cfe76..b0881d7a 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs @@ -170,17 +170,16 @@ namespace Win.Sfs.SettleAccount.Entities.Prices var entityList = ObjectMapper.Map, List>(result); var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).OrderByDescending(p => p.BeginDate).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault()); + + //只要类型为20的备件价格数据 + _ls = _ls.Where(p => p.Type == 20).ToList(); foreach (var itm in _ls) { itm.Update(GuidGenerator.Create(),version); } - _ls=_ls.Where(p => p.Type == 20).ToList(); - - - await _mng.ImportAsync(_ls.ToList(), version); return ApplicationConsts.SuccessStr; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs index f6516f4a..13bf1c2c 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs @@ -485,15 +485,36 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts var filteResult = result.Where(p =>!string.IsNullOrEmpty(p.SapMaterialCode));//过滤掉物料号为空的数据 - //和物料主数据中SAP物料号检验是否存在 - foreach (var itm in filteResult) + //不是汇总形式出库的不能导入,即导入的数据中如果SAP编号 即厂内零件号有重复不能导入 + var sapcodegroup = (from t in filteResult + group t by t.SapMaterialCode into m + where m.Count() >= 2 + select m).ToList(); + if (sapcodegroup != null && sapcodegroup.Count > 0) { - if (!_erpdapperRepository.GetMaterialList().Any(p => p.MaterialCode == itm.SapMaterialCode)) + foreach (var item in sapcodegroup) { - checkList.Add(new ErrorExportDto(version, "自定义出库单导入", string.Empty, string.Empty, itm.SapMaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.SapMaterialCode), string.Empty)); + checkList.Add(new ErrorExportDto(version, "自定义出库单导入", string.Empty, string.Empty, item.Key, string.Empty, string.Format("导入模板中SAP编码{0},有重复不是汇总出库请检查!", item.Key), string.Empty)); } } + //和物料主数据中SAP物料号检验是否存在 + var gethqimportdata = filteResult.Select(p => p.SapMaterialCode).Distinct().ToList(); + var getmaterial = _erpdapperRepository.GetMaterialList(); + + var queryCheck = from itm in gethqimportdata + join itm1 in getmaterial on itm equals itm1.MaterialCode into temp1 + from tm1 in temp1.DefaultIfEmpty() + where tm1 == null + select itm; + foreach (var itm in queryCheck) + { + //if (!_erpdapperRepository.GetMaterialList().Any(p => p.MaterialCode == itm.SapMaterialCode)) + //{ + checkList.Add(new ErrorExportDto(version, "自定义出库单导入", string.Empty, string.Empty, itm, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm), string.Empty)); + //} + } + //检验2:导入模板中的结算数据是否为0 foreach (var itm in filteResult) { @@ -548,23 +569,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts } } - //检验3:导入模板中物料号,不能重复 - var _isRepeatOfReportList = from arc in _lst - group arc by new { arc.Kanban, arc.SapMaterialCode, arc.Version } - into g - where g.Count() > 1 - select g; - foreach (var itm in _isRepeatOfReportList) - { - checkList.Add(new ErrorExportDto(version, "自定义出库单", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中物料号{0}有重复,请检查!", itm.Key.SapMaterialCode), string.Empty)); - } - if (checkList.Count > 0) - { - return await ExportErrorReportAsync(checkList); - } - - - var outPutDetail = await _wmsRepository.Where(p => p.Version == version && p.State != 4 ).ToListAsync(); 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 99eca55d..56ded856 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs @@ -505,7 +505,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts { WmsHQHKanbanOutPutDetial _detail = new WmsHQHKanbanOutPutDetial( GuidGenerator.Create(), - !string.IsNullOrEmpty(itm.WmsBillNum) ? itm.WmsBillNum : string.Empty, + !string.IsNullOrEmpty(itm.WmsBillNum) ? (itm.WmsBillNum.Length > 36 ? "PF" : itm.WmsBillNum) : string.Empty, itm.Kanban, itm.MaterialCode, itm.MaterialDesc, 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 81c5750b..9e06eef9 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs @@ -55,8 +55,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// /// wms出库 /// - //[Authorize(SettleAccountPermissions.WMSJIT.Default)] - [AllowAnonymous] + [Authorize(SettleAccountPermissions.WMSJIT.Default)] + //[AllowAnonymous] [Route("api/settleaccount/wmsjitoutput")] public class WMSJitAppService : 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 03d56af2..9dd49e7b 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs @@ -806,7 +806,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts { WmsKanbanOutPutDetial _detail = new WmsKanbanOutPutDetial( GuidGenerator.Create(), - !string.IsNullOrEmpty(itm.WmsBillNum) ? itm.WmsBillNum : string.Empty, + !string.IsNullOrEmpty(itm.WmsBillNum) ? (itm.WmsBillNum.Length > 36 ? "PF" : itm.WmsBillNum) : string.Empty, itm.Kanban, itm.MaterialCode, @@ -815,7 +815,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts string.Empty, string.Empty, 0, - !string.IsNullOrEmpty(itm.Extend1) ? itm.Extend1 : string.Empty, + !string.IsNullOrEmpty(itm.Extend1) ? itm.Extend1 : string.Empty,//客户物料号 !string.IsNullOrEmpty(itm.Extend2) ? itm.Extend2 : string.Empty, version, itm.MaterialCode, 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 79ac8e05..14afdc21 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs @@ -269,10 +269,10 @@ namespace Win.Sfs.SettleAccount.Entities.WMS string.Empty, string.Empty, 0, - !string.IsNullOrEmpty(p.Extend1) ? p.Extend1 : string.Empty, + !string.IsNullOrEmpty(p.Extend1) ? p.Extend1 : string.Empty,//客户物料号 string.Empty, p.Version, - p.MaterialCode, + p.ParentMaterialCode, _billNum, GuidGenerator.Create(), string.Empty, @@ -318,8 +318,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS string.Empty, string.Empty, 0, + !string.IsNullOrEmpty(p.Extend1) ? p.Extend1 : string.Empty, string.Empty, - string.Empty, input.Version, p.MaterialCode, _billNum, @@ -512,14 +512,14 @@ namespace Win.Sfs.SettleAccount.Entities.WMS } } - //和物料主数据中SAP物料号检验是否存在 - //foreach (var itm in filteResult) - //{ - // if (!_erpdapperRepository.GetMaterialList().Any(p => p.MaterialCode == itm.MaterialCode)) - // { - // checkList.Add(new ErrorExportDto(version, "大众备件出库单导入", string.Empty, string.Empty, itm.MaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.MaterialCode), string.Empty)); - // } - //} + + foreach (var itm in filteResult) + { + if (string.IsNullOrEmpty(itm.Extend1)) + { + checkList.Add(new ErrorExportDto(version, "大众备件出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("当前导入订单号{0}存在物料号为空情况,请检查!", itm.OrderBillNum), string.Empty)); + } + } if (checkList.Count > 0) { @@ -532,8 +532,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS { WmsSharePart90OutPutDetial _detail = new WmsSharePart90OutPutDetial( GuidGenerator.Create(), - //itm.WmsBillNum, - string.Empty, + //itm.WmsBillNum.Length > 36 ? "PF" : itm.WmsBillNum, + !string.IsNullOrEmpty(itm.WmsBillNum) ? (itm.WmsBillNum.Length > 36 ? "PF" : itm.WmsBillNum) : string.Empty, + //string.Empty, itm.OrderBillNum, itm.MaterialCode, @@ -542,7 +543,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS string.Empty, string.Empty, 0, - string.Empty, + !string.IsNullOrEmpty(itm.Extend1) ? itm.Extend1 : string.Empty,//客户物料号 string.Empty, version, itm.ParentMaterialCode, 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 cfd1c9e6..9721e8a4 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs @@ -681,14 +681,15 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts } //和物料主数据中SAP物料号检验是否存在 - foreach (var itm in result) - { - if (!_erpdapperRepository.GetMaterialList().Any(p => p.MaterialCode == itm.MaterialCode)) - { - checkList.Add(new ErrorExportDto(version, "大众备件出库单导入", string.Empty, string.Empty, itm.MaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.MaterialCode), string.Empty)); - } - } + //foreach (var itm in result) + //{ + // if (!_erpdapperRepository.GetMaterialList().Any(p => p.MaterialCode == itm.MaterialCode)) + // { + // checkList.Add(new ErrorExportDto(version, "大众备件出库单导入", string.Empty, string.Empty, itm.MaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.MaterialCode), string.Empty)); + // } + + //} if (checkList.Count > 0) { 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 fefbdb45..a7564caa 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs @@ -269,7 +269,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS throw new BusinessException("导入模板数据不能为空!"); } //物料号不能为空,直接过滤掉,模板的中看不到有空行的情况,但是通过个IE这个插件发现有空行数据导入 - var _list = _listOrgin.Where(p =>!string.IsNullOrEmpty(p.SapMaterialCode)); + var _list = _listOrgin.Where(p => !string.IsNullOrEmpty(p.SapMaterialCode)); foreach (var itm in _list) { @@ -278,23 +278,54 @@ namespace Win.Sfs.SettleAccount.Entities.WMS checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中SAP编码{0}的是否备件及客户号不能为空,影响出库请检查!", itm.SapMaterialCode), string.Empty)); } } - - foreach (var itm in _list) + + //不是汇总形式出库的不能导入,即导入的数据中如果SAP编号 即厂内零件号有重复不能导入 + var sapcodegroup = (from t in _list + group t by new { sapcode = t.SapMaterialCode, isbj = t.IsBack } into m + select new + { + 物料号 = m.Key.sapcode, + 是否备件 = m.Key.isbj, + rowcount = m.Count() + } into c + where c.rowcount >= 2 + select c).ToList(); + if (sapcodegroup != null && sapcodegroup.Count > 0) { - if (itm.IsBack != "是" && itm.IsBack != "否") + foreach (var item in sapcodegroup) { - checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中SAP编码{0}的是否备件请填写是或否,影响出库请检查!", itm.SapMaterialCode), string.Empty)); + checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, item.物料号, string.Empty, string.Format("导入模板中SAP编码{0}并且是否备件值为{1},有重复不是汇总出库请检查!", item.物料号, item.是否备件), string.Empty)); } } - //和物料主数据中SAP物料号检验是否存在 + foreach (var itm in _list) { - if (!_erpdapperRepository.GetMaterialList().Any(p => p.MaterialCode == itm.SapMaterialCode)) + if (itm.IsBack != "是" && itm.IsBack != "否") { - checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, itm.SapMaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.SapMaterialCode), string.Empty)); + checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, itm.SapMaterialCode, string.Empty, string.Format("导入模板中SAP编码{0}的是否备件请填写是或否,影响出库请检查!", itm.SapMaterialCode), string.Empty)); } - } + //和物料主数据中SAP物料号检验是否存在 + var gethqimportdata = _list.Select(p => p.SapMaterialCode).Distinct().ToList(); + var getmaterial = _erpdapperRepository.GetMaterialList(); + + var queryCheck = from itm in gethqimportdata + join itm1 in getmaterial on itm equals itm1.MaterialCode into temp1 + from tm1 in temp1.DefaultIfEmpty() + where tm1 == null + select itm; + foreach (var itm in queryCheck) + { + checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, itm, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm), string.Empty)); + } + //foreach (var itm in _list) + //{ + // if (!_erpdapperRepository.GetMaterialList().Any(p => p.MaterialCode == itm.SapMaterialCode)) + // { + // checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, itm.SapMaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.SapMaterialCode), string.Empty)); + // } + + //} if (checkList.Count > 0) { @@ -314,11 +345,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS } } var getbillName = "HQVSBT";//混合数据 - if(_list.FirstOrDefault().Extend== "100113") + if (_list.FirstOrDefault().Extend == "100113") { getbillName = "BT";//一轿 } - else if(_list.FirstOrDefault().Extend == "100053") + else if (_list.FirstOrDefault().Extend == "100053") { getbillName = "HQKB";//红旗 } @@ -346,14 +377,14 @@ namespace Win.Sfs.SettleAccount.Entities.WMS 0, 0, itm.Price, - Math.Round((itm.Price * itm.Qty),2) + Math.Round((itm.Price * itm.Qty), 2) ); await _wmsRepository.GetDbContext().BulkInsertAsync(query.ToList(), new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 }); int _count = _wmsVersionRepository.Count(p => p.Version == version && p.BillNum == _billNum); if (_count == 0) { - var _version = new WmsHQWithOutKanbanOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email,string.Empty); + var _version = new WmsHQWithOutKanbanOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email, string.Empty); await _wmsVersionRepository.InsertAsync(_version, true); } return ApplicationConsts.SuccessStr; ; diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs index 29e2440e..3ab0e5c5 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs @@ -233,15 +233,40 @@ namespace Win.Sfs.SettleAccount.Entities.WMS checkList.Add(new ErrorExportDto(version, "一次性寄售销售导入", string.Empty, string.Empty, string.Empty, string.Empty, "导入模板中第一页签没有数据,请检查!", string.Empty)); } - //和物料主数据中SAP物料号检验是否存在 - foreach (var itm in _list) + //不是汇总形式出库的不能导入,即导入的数据中如果SAP编号 即厂内零件号有重复不能导入 + var sapcodegroup = (from t in _list + group t by t.SapMaterialCode into m + where m.Count() >= 2 + select m).ToList(); + if (sapcodegroup != null && sapcodegroup.Count > 0) { - if (!_erpdapperRepository.GetMaterialList().Any(p => p.MaterialCode == itm.SapMaterialCode)) + foreach (var item in sapcodegroup) { - checkList.Add(new ErrorExportDto(version, "一次性寄售销售导入", string.Empty, string.Empty, itm.SapMaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.SapMaterialCode), string.Empty)); + checkList.Add(new ErrorExportDto(version, "一次性寄售销售导入", string.Empty, string.Empty, item.Key, string.Empty, string.Format("导入模板中SAP编码{0},有重复不是汇总出库请检查!", item.Key), string.Empty)); } + } + //和物料主数据中SAP物料号检验是否存在 + var gethqimportdata = _list.Select(p => p.SapMaterialCode).Distinct().ToList(); + var getmaterial = _erpdapperRepository.GetMaterialList(); + + var queryCheck = from itm in gethqimportdata + join itm1 in getmaterial on itm equals itm1.MaterialCode into temp1 + from tm1 in temp1.DefaultIfEmpty() + where tm1 == null + select itm; + foreach (var itm in queryCheck) + { + checkList.Add(new ErrorExportDto(version, "一次性寄售销售导入", string.Empty, string.Empty, itm, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm), string.Empty)); } + //foreach (var itm in _list) + //{ + // if (!_erpdapperRepository.GetMaterialList().Any(p => p.MaterialCode == itm.SapMaterialCode)) + // { + // checkList.Add(new ErrorExportDto(version, "一次性寄售销售导入", string.Empty, string.Empty, itm.SapMaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.SapMaterialCode), string.Empty)); + // } + + //} if (checkList.Count > 0) { return await ExportErrorReportAsync(checkList); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs index 003806c1..042a9dde 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs @@ -306,13 +306,13 @@ namespace Win.Sfs.SettleAccount.Entities.WMS var en1= entities.Where(p => p.OutputQty == 0).ToList(); foreach(var itm in en1) { - checkList.Add(new ErrorExportDto() { Message = string.Format("结算号:{0}物料号:{1}实际出库数量为0不能同步Sap", itm.BillNum, itm.MaterialCode) }); + checkList.Add(new ErrorExportDto() { Version = input.Version, ItemCode = itm.MaterialCode, Model = "结算出库SAP接口", Message = string.Format("结算号:{0}物料号:{1}实际出库数量为0不能同步Sap", itm.BillNum, itm.MaterialCode) }); } var en2=entities.Where(p => p.OutputQty != p.Qty && p.OutputQty>0).ToList(); foreach (var itm in en2) { - checkList.Add(new ErrorExportDto() { Message = string.Format("结算号:{0}物料号:{1}实际出库数量不等于结算数量不能同步Sap", itm.BillNum, itm.MaterialCode) }); + checkList.Add(new ErrorExportDto() { Version = input.Version, ItemCode = itm.MaterialCode, Model = "结算出库SAP接口", Message = string.Format("结算号:{0}物料号:{1}实际出库数量不等于结算数量不能同步Sap", itm.BillNum, itm.MaterialCode) }); } var _count = entities.Count(p => p.State==2); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs index 257098e2..390c46b4 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs @@ -10,6 +10,7 @@ using Volo.Abp.Dapper; using Win.Abp.Snowflakes; using Volo.Abp.EventBus.RabbitMq; using Volo.Abp.RabbitMQ; +using Volo.Abp.EntityFrameworkCore; namespace Win.Sfs.SettleAccount { @@ -22,6 +23,7 @@ namespace Win.Sfs.SettleAccount typeof(AbpIdentityHttpApiClientModule), typeof(AbpAutoMapperModule), typeof(AbpAspNetCoreMvcModule), + typeof(AbpEntityFrameworkCoreModule), typeof(AbpDapperModule) //typeof(AbpEventBusRabbitMqModule) diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs index c6433314..f0dd9242 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs @@ -57,6 +57,16 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report } + /// + /// 获取客户物料号 + /// + /// + public virtual List GetMaterialListCustomerPartCode() + { + return DbConnection.Query("select max(Id) ID,'' Factory,CustomerPartCode,MaterialDesc,EstimateTypeDesc,EstimateType from Set_material where CustomerPartCode is not null group by CustomerPartCode, MaterialDesc, EstimateTypeDesc, EstimateType ").ToList(); + + } + public virtual List GetErrorBillList() { diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs index 07245ff9..52d9267e 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs @@ -23,6 +23,21 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report /// /// 主数据Dapper表 /// + //public class FisUpdateDapperRepository : DapperRepository, ITransientDependency + //{ + // public FisUpdateDapperRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + // { + + // } + // [UnitOfWork(isTransactional: false)] + // public virtual void UpdateFisSettle() + // { + + // DbConnection.Execute("EXEC sp_settle_fis_update", null, null, 1200, null); + + // } + //} + public class FisUpdateDapperRepository : DapperRepository, ITransientDependency { public FisUpdateDapperRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) @@ -30,15 +45,15 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report } [UnitOfWork(isTransactional: false)] - public virtual void UpdateFisSettle() + public virtual void UpdateFisSettle(string version) { - - DbConnection.Execute("EXEC sp_settle_fis_update", null, null, 1200, null); + + DbConnection.Execute(string.Format("EXEC sp_settle_fis_update N'{0}'", version), null, null, 1200, null); } - - } + + } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs index 711dba91..f6e28268 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs @@ -1845,7 +1845,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " ) A\n" + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " ) temp1\n" + - " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE Version = '202110' ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode"; + " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceListBJ WHERE Version = '202110' and Type=20 ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode"; var _sql = string.Format(str, version); @@ -1919,7 +1919,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " ) A\n" + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " ) temp1\n" + - " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE Version = '202110' ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode\n" + + " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceListBJ WHERE Version = '202110' and Type=20 ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode\n" + " LEFT JOIN (\n" + " SELECT SUM\n" + " ( Amt ) / SUM ( Qty ) AS Price,\n" + diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQMSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQMSettledDetailDapperRepository.cs index 2b402a17..5653d38f 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQMSettledDetailDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQMSettledDetailDapperRepository.cs @@ -114,7 +114,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " ( a.HQMKanBan <> 'BJ' ) \n" + " AND a.Version= '{0}' {1} \n" + " ) AS temp1\n" + - " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode"; + " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) and Type=10) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode"; var _sql = string.Format(str, version, condition); var _query = DbConnection.Query(_sql, null, null, true, 1200, null); @@ -206,7 +206,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " ) A\n" + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " ) temp1\n" + - " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) AS Expr1 FROM Set_PriceList ) ) ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode"; + " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceListBJ WHERE ( Version = ( SELECT MAX ( Version ) AS Expr1 FROM Set_PriceList ) ) and Type=20 ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode"; var _sql = string.Format(str, version, condition); var _query = DbConnection.Query(_sql, null, null, true, 1200, null); diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs index 61401990..d14e2961 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs @@ -1332,7 +1332,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " ) AS temp1\n" + " LEFT JOIN ( SELECT * FROM set_backQty ) temp3 ON temp1.采购订单号 = temp3.Code \n" + " AND temp1.SAP编码= temp3.MaterialCode\n" + -" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE Version = '202110' ) AS TEMP2 ON temp1.SAP编码 = TEMP2.MaterialCode \n" + +" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceListBJ WHERE Version = '202110' and Type=20 ) AS TEMP2 ON temp1.SAP编码 = TEMP2.MaterialCode \n" + " ) unint1 UNION ALL\n" + "SELECT\n" + " * \n" + @@ -1389,7 +1389,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " ) AS temp1\n" + " LEFT JOIN ( SELECT * FROM set_backQty ) temp3 ON temp1.采购订单号 = temp3.Code \n" + " AND temp1.SAP编码= temp3.MaterialCode\n" + -" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE Version = '202110' ) AS TEMP2 ON temp1.SAP编码 = TEMP2.MaterialCode \n" + +" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceListBJ WHERE Version = '202110' and Type=20 ) AS TEMP2 ON temp1.SAP编码 = TEMP2.MaterialCode \n" + " ) unint2;"; diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/FisUpdateExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/FisUpdateExportService.cs index de28ddc2..3e59b89d 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/FisUpdateExportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/FisUpdateExportService.cs @@ -11,6 +11,27 @@ using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report; namespace SettleAccount.Job.Services.Report { + //public class FisUpdateExportService : ITransientDependency, IExportJob + //{ + // private readonly FisUpdateDapperRepository _dapperRepository; + + + // public FisUpdateExportService( + + // FisUpdateDapperRepository dapperRepository + + // ) + // { + // _dapperRepository = dapperRepository; + // } + // [UnitOfWork(isTransactional: false)] + // public string ExportFile(Guid id, List exportName, List property) + // { + // _dapperRepository.UpdateFisSettle(); + // return id.ToString(); + // } + //} + public class FisUpdateExportService : ITransientDependency, IExportJob { private readonly FisUpdateDapperRepository _dapperRepository; @@ -19,15 +40,17 @@ namespace SettleAccount.Job.Services.Report public FisUpdateExportService( FisUpdateDapperRepository dapperRepository - + ) { _dapperRepository = dapperRepository; } [UnitOfWork(isTransactional: false)] - public string ExportFile(Guid id, List exportName, List property) + public string ExportFile(Guid id, List exportName, List p_list) { - _dapperRepository.UpdateFisSettle(); + var version = p_list.Where(p => p.Name == "Version").FirstOrDefault().Value; + + _dapperRepository.UpdateFisSettle(version); return id.ToString(); } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs index a6d6f80d..2624afbd 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs @@ -54,7 +54,7 @@ namespace SettleAccount.Job.Services private readonly ErpPartDapperRepository _erpdapperRepository; private readonly IBlobContainer _fileContainer; - private readonly ISettleAccountBranchEfCoreRepository _errorListRepository; + //private readonly ISettleAccountBranchEfCoreRepository _errorListRepository; private readonly OutputService _outputService; private readonly InputService _inputService; @@ -65,9 +65,9 @@ namespace SettleAccount.Job.Services InvoiceSettledDetailDiffDapperRepository dapperRepository1, OutputService outputService, InputService inputService, - UnSettledDetailDapperRepository dapperRepository2, + UnSettledDetailDapperRepository dapperRepository2 - ISettleAccountBranchEfCoreRepository errorListRepository + //ISettleAccountBranchEfCoreRepository errorListRepository ) { _fileContainer = fileContainer; @@ -79,7 +79,7 @@ namespace SettleAccount.Job.Services _dapperRepository =dapperRepository; _dapperRepository1 = dapperRepository1; _dapperRepository2 = dapperRepository2; - _errorListRepository = errorListRepository; + // _errorListRepository = errorListRepository; } public string ExportFile(Guid id, List exportName, List p_list) @@ -347,7 +347,9 @@ equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.MaterialCode, Wms } - var _checkList = _errorListRepository.ToList(); + //var _checkList = _errorListRepository.ToList(); + //应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629 + var _checkList = _erpdapperRepository.GetErrorBillList(); var query = from itm in _ls join itm1 in _checkList on new { ChassisNumber = itm.ChassisNumber, MaterialCode = itm.MaterialCode, WmsBillNum = itm.WmsBillNum } @@ -427,8 +429,10 @@ equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.MaterialCode, Wms _list = _list.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList(); } } - - var _checkList = _errorListRepository.ToList(); + + //var _checkList = _errorListRepository.ToList(); + //应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629 + var _checkList = _erpdapperRepository.GetErrorBillList(); var query = from itm in _list join itm1 in _checkList on new { ChassisNumber = itm.ChassisNumber, MaterialCode = itm.MaterialCode, WmsBillNum = itm.WmsBillNum }