Browse Source

[179] JISBBAC三方比对汇总添加结算与发运量差

master
mahao 1 year ago
parent
commit
30ba166928
  1. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumPubSaSeCompareCategory.cs
  2. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeCompareDetailReportMaiDanJianBBAC.cs
  3. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeCompareDiff.cs
  4. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareSumReport.cs
  5. 23
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumPubSaSeCompareCategory.cs

@ -12,19 +12,16 @@ namespace Win.Sfs.SettleAccount.Enums
/// </summary> /// </summary>
[Display(Name = "未定义")] [Display(Name = "未定义")]
None = 0, None = 0,
/// <summary> /// <summary>
/// 有结算有发运 /// 有结算有发运
/// </summary> /// </summary>
[Display(Name = "有结算有发运")] [Display(Name = "有结算有发运")]
HaveSaHaveSe = 1, HaveSaHaveSe = 1,
/// <summary> /// <summary>
/// 有结算无发运 /// 有结算无发运
/// </summary> /// </summary>
[Display(Name = "有结算无发运")] [Display(Name = "有结算无发运")]
HaveSaNotHaveSe = 2, HaveSaNotHaveSe = 2,
/// <summary> /// <summary>
/// 无结算有发运 /// 无结算有发运
/// </summary> /// </summary>

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeCompareDetailReportMaiDanJianBBAC.cs

@ -22,5 +22,11 @@ namespace Win.Sfs.SettleAccount.Reports
[Display(Name = "生产码类型")] [Display(Name = "生产码类型")]
[ExporterHeader(DisplayName = "生产码类型")] [ExporterHeader(DisplayName = "生产码类型")]
public string CodeType { get; set; } public string CodeType { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
[ExporterHeader(DisplayName = "备注")]
public string Remark { get; set; }
} }
} }

4
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeCompareDiff.cs

@ -111,9 +111,9 @@ namespace Win.Sfs.SettleAccount.Reports
[Display(Name = "替换厂内物料号")] [Display(Name = "替换厂内物料号")]
public string ReplaceFactoryPartCode { get; set; } public string ReplaceFactoryPartCode { get; set; }
/// <summary> /// <summary>
/// 是否已经移除 /// 备注
/// </summary> /// </summary>
public bool IsRemove { get; set; } public string Remark { get; set; }
/// <summary> /// <summary>
/// 是否是当期 /// 是否是当期
/// </summary> /// </summary>

4
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareSumReport.cs

@ -43,7 +43,7 @@ namespace Win.Sfs.SettleAccount.Reports
/// <summary> /// <summary>
/// 结算与发运数量差 /// 结算与发运数量差
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "WMS发货与EDI数量差")] [ExporterHeader(DisplayName = "结算与WMS发货量差")]
public decimal SaSeQty => SAQty - SEQty; public decimal SaSeQty => SAQty - SEQty;
/// <summary> /// <summary>
/// 结算与EDI量差 /// 结算与EDI量差
@ -53,7 +53,7 @@ namespace Win.Sfs.SettleAccount.Reports
/// <summary> /// <summary>
/// WMS发货与EDI数量差 /// WMS发货与EDI数量差
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "WMS发货与EDI量差")] [ExporterHeader(DisplayName = "WMS发货与EDI量差")]
public decimal SeEdiQty => SEQty - EdiQty; public decimal SeEdiQty => SEQty - EdiQty;
} }
} }

23
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs

@ -101,6 +101,10 @@ namespace SettleAccount.Job.Services.Report
pubSaSeCompareDiffs = ThreeCompare(pubSaSeCompareDiffs); pubSaSeCompareDiffs = ThreeCompare(pubSaSeCompareDiffs);
#endregion #endregion
#region 对比Edi
pubSaSeCompareDiffs = EdiCompare(pubSaSeCompareDiffs);
#endregion
#region 结算数据处理 #region 结算数据处理
HandleSaDetails<BBAC_CAN_SA_DETAIL, BBAC_NOT_SA_DETAIL>(pubSaSeCompareDiffs, businessType, version); HandleSaDetails<BBAC_CAN_SA_DETAIL, BBAC_NOT_SA_DETAIL>(pubSaSeCompareDiffs, businessType, version);
HandleSaDetailsMain<BBAC_SA_DETAIL>(pubSaSeCompareDiffs, businessType, version); HandleSaDetailsMain<BBAC_SA_DETAIL>(pubSaSeCompareDiffs, businessType, version);
@ -353,5 +357,24 @@ namespace SettleAccount.Job.Services.Report
return saSeCompareDiffs; return saSeCompareDiffs;
} }
/// <summary>
/// 对比Edi
/// </summary>
/// <remarks>
/// *有结算无发运数据对比Edi
/// </remarks>
public List<SaSeCompareDiff> EdiCompare(List<SaSeCompareDiff> saSeCompareDiffs)
{
//有结算无发运
var haveSaNotHaveSes = saSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaNotHaveSe);
var keyCodes = haveSaNotHaveSes.Select(t => t.PN + t.CustomerPartCode).ToList();
var edis = _settleAccountDbContext.Set<BBAC_SE_EDI>().Where(t => keyCodes.Contains(t.KeyCode));
saSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaNotHaveSe).ForEach(saSeCompareDiff =>
{
saSeCompareDiff.Remark = "有Edi";
});
return null;
}
} }
} }

Loading…
Cancel
Save