Browse Source

[CI SKIP] [170] 导入结算报错提示,需要具体是哪个类型缺少的零件关系

master
mahao 1 year ago
parent
commit
cf6d447c3c
  1. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs

@ -1,11 +1,13 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using EFCore.BulkExtensions; using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.OpenApi.Extensions;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
@ -221,6 +223,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
private async Task<List<ErrorExportDto>> CheckAsync(List<BBAC_SA_DETAIL> saDetails, EnumBusinessType businessType) private async Task<List<ErrorExportDto>> CheckAsync(List<BBAC_SA_DETAIL> saDetails, EnumBusinessType businessType)
{ {
#region 数据校验 #region 数据校验
var businessTypeDisplayName = businessType.GetAttributeOfType<DisplayAttribute>()?.Name ?? businessType.ToString();
//数据校验 //数据校验
var checkList = new List<ErrorExportDto>(); var checkList = new List<ErrorExportDto>();
@ -234,7 +237,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var noExistSettleMaterialCodes = saLus.Except(settleMaterialCodes); var noExistSettleMaterialCodes = saLus.Except(settleMaterialCodes);
noExistSettleMaterialCodes.ForEach(t => noExistSettleMaterialCodes.ForEach(t =>
{ {
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"客户零件号【{t}】对应厂内零件号系统中不存在", string.Empty)); checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"客户零件号【{t}】对应厂内零件号系统中不存在", $"{businessTypeDisplayName}业务"));
}); });
return checkList; return checkList;

Loading…
Cancel
Save