diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs index bf7234a4..39f4b8be 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs @@ -149,6 +149,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ importBBACSaDetail.BusinessType = importBBACSaDetail.PN.Contains("R0") ? EnumBusinessType.MaiDanJianBBAC : EnumBusinessType.JisBBAC; }); + var jisSaDetails = importBBACSaDetails.FindAll(t => t.BusinessType == EnumBusinessType.JisBBAC); + var maiDanSaDetails = importBBACSaDetails.FindAll(t => t.BusinessType == EnumBusinessType.MaiDanJianBBAC); + + /* + * 买单件(External Call Number/PN)后2位为生产码类型 + * 买单件(External Call Number/PN)前7位为生产码 + */ + maiDanSaDetails.ForEach(maiDanSaDetail => + { + maiDanSaDetail.PartCode = maiDanSaDetail.PN[^2..]; + maiDanSaDetail.PN = maiDanSaDetail.PN[..7]; + }); + //数据校验 var checkList = new List(); //结算分组号 @@ -166,9 +179,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ if (!checkList.Any()) { //验证客户对应厂内零件号是否存在 - - var jisSaDetails = importBBACSaDetails.FindAll(t => t.BusinessType == EnumBusinessType.JisBBAC); - var maiDanSaDetails = importBBACSaDetails.FindAll(t => t.BusinessType == EnumBusinessType.MaiDanJianHBPO); if (jisSaDetails.Any()) { checkList.AddRange(await CheckAsync(jisSaDetails, EnumBusinessType.JisBBAC).ConfigureAwait(false)); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs index 4ae010f1..d580d9d8 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs @@ -5,7 +5,11 @@ using System.ComponentModel.DataAnnotations.Schema; namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs { +#if DEBUG [Table("TM_BJBMPT_JIS_RECORD")] +#else + [Table("EX_BJBMPT_JIS_RECORD")] +#endif public class TM_BJBMPT_JIS_RECORD { [Key] diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs index e164160c..8c6214a7 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs @@ -8,7 +8,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs /// /// Jis小件 /// +#if DEBUG [Table("TM_BJBMPT_JIT_RECORD")] +#else + [Table("EX_BJBMPT_JIT_RECORD")] +#endif public class TM_BJBMPT_JIT_RECORD { [Key] diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs index 36d9fd35..d8db4a4d 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs @@ -8,7 +8,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs /// /// Jit(非Jis) /// +#if DEBUG [Table("TM_BJBMPT_OTHER_RECORD")] +#else + [Table("EX_BJBMPT_JIS_RECORD")] +#endif public class TM_BJBMPT_OTHER_RECORD { [Key]