Browse Source

[37]比对输出时,当期发票核对的数据需要打标识

master
mahao 1 year ago
parent
commit
fa926ad278
  1. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/MaterialRelationship/MaterialRelationshipDtoBase.cs
  2. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs
  3. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareDiff.cs
  4. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs
  5. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs

11
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/MaterialRelationship/MaterialRelationshipDtoBase.cs

@ -99,19 +99,16 @@ namespace Win.Sfs.SettleAccount.MaterialRelationships
/// </summary> /// </summary>
[ExporterHeaderAttribute(DisplayName = "厂内物料号")] [ExporterHeaderAttribute(DisplayName = "厂内物料号")]
public string ErpMaterialCode { get; set; } public string ErpMaterialCode { get; set; }
/// <summary> /// <summary>
/// 厂内物料描述 /// 厂内物料描述
/// </summary> /// </summary>
[ExporterHeaderAttribute(DisplayName = "厂内物料描述")] [ExporterHeaderAttribute(DisplayName = "厂内物料描述")]
public string MaterialDesc { get; set; } public string MaterialDesc { get; set; }
/// <summary> /// <summary>
/// 客户物料号 /// 客户物料号
/// </summary> /// </summary>
[ExporterHeaderAttribute(DisplayName = "客户物料号")] [ExporterHeaderAttribute(DisplayName = "客户物料号")]
public string SettleMaterialCode { get; set; } public string SettleMaterialCode { get; set; }
/// <summary> /// <summary>
/// 业务类别 /// 业务类别
/// </summary> /// </summary>
@ -157,14 +154,12 @@ namespace Win.Sfs.SettleAccount.MaterialRelationships
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")] [MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ErpMaterialCode { get; set; } public string ErpMaterialCode { get; set; }
/// <summary> /// <summary>
/// 厂内物料描述 /// 厂内物料描述
/// </summary> /// </summary>
[ImporterHeader(Name = "厂内物料描述")] [ImporterHeader(Name = "厂内物料描述")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")] [MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string MaterialDesc { get; set; } public string MaterialDesc { get; set; }
/// <summary> /// <summary>
/// 客户物料号 /// 客户物料号
/// </summary> /// </summary>
@ -172,6 +167,12 @@ namespace Win.Sfs.SettleAccount.MaterialRelationships
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")] [MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string SettleMaterialCode { get; set; } public string SettleMaterialCode { get; set; }
/// <summary>
/// 业务类别
/// </summary>
[ImporterHeader(Name = "业务类别")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumBusinessType BusinessType { get; set; }
} }
public class MaterialRelationshipDetailDto : EntityDto<Guid> public class MaterialRelationshipDetailDto : EntityDto<Guid>

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs

@ -71,6 +71,12 @@ public class MaterialRelationshipAppService : SettleAccountApplicationBase<Mater
if (entitys.Count > 0) if (entitys.Count > 0)
{ {
var checkBusinessType = entitys.FindAll(t => t.BusinessType != businessType);
foreach (var item in checkBusinessType)
{
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"客户物料号{item.SettleMaterialCode}业务类别导入错误", string.Empty));
}
var query = from arc in entitys var query = from arc in entitys
group arc by new { arc.SettleMaterialCode } group arc by new { arc.SettleMaterialCode }
into g into g

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareDiff.cs

@ -13,7 +13,7 @@ namespace Win.Sfs.SettleAccount.Reports
/// 期间 /// 期间
/// </summary> /// </summary>
[Display(Name = "期间")] [Display(Name = "期间")]
public int Version { get; set; } public string Version { get; set; }
/// <summary> /// <summary>
/// 类型 /// 类型
/// </summary> /// </summary>

5
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs

@ -104,7 +104,7 @@ namespace SettleAccount.Job.Services.Report
{ {
saSeEdiCompareDiffs = saSeEdiCompareDiffs.FindAll(p => p.PN == pn); saSeEdiCompareDiffs = saSeEdiCompareDiffs.FindAll(p => p.PN == pn);
} }
saSeEdiCompareDiffs.FindAll(t => t.Version == version).ForEach(t => t.IsCurrent = true); saSeEdiCompareDiffs.FindAll(t => t.Version == version.ToString()).ForEach(t => t.IsCurrent = true);
saSeEdiCompareDiffs = saSeEdiCompareDiffs.OrderBy(t => t.Category).ToList(); saSeEdiCompareDiffs = saSeEdiCompareDiffs.OrderBy(t => t.Category).ToList();
var excelExporter = new ExcelExporter(); var excelExporter = new ExcelExporter();
@ -192,7 +192,7 @@ namespace SettleAccount.Job.Services.Report
from seEdi in temp.DefaultIfEmpty() from seEdi in temp.DefaultIfEmpty()
select new SaSeEdiCompareDiff() select new SaSeEdiCompareDiff()
{ {
Version = sa.Version, Version = sa.Version.ToString(),
WmsBillNum = seEdi.WmsBillNum, WmsBillNum = seEdi.WmsBillNum,
ShippingDate = seEdi.ShippingDate, ShippingDate = seEdi.ShippingDate,
CustomerOfflineTime = sa.SettleDate, CustomerOfflineTime = sa.SettleDate,
@ -216,6 +216,7 @@ namespace SettleAccount.Job.Services.Report
from sa in temp.DefaultIfEmpty() from sa in temp.DefaultIfEmpty()
select new SaSeEdiCompareDiff() select new SaSeEdiCompareDiff()
{ {
Version = sa.Version.ToString(),
WmsBillNum = seEdi.WmsBillNum, WmsBillNum = seEdi.WmsBillNum,
ShippingDate = seEdi.ShippingDate, ShippingDate = seEdi.ShippingDate,
CustomerOfflineTime = sa.SettleDate, CustomerOfflineTime = sa.SettleDate,

5
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs

@ -103,7 +103,7 @@ namespace SettleAccount.Job.Services.Report
{ {
saSeEdiCompareDiffs = saSeEdiCompareDiffs.FindAll(p => p.PN == pn); saSeEdiCompareDiffs = saSeEdiCompareDiffs.FindAll(p => p.PN == pn);
} }
saSeEdiCompareDiffs.FindAll(t => t.Version == version).ForEach(t => t.IsCurrent = true); saSeEdiCompareDiffs.FindAll(t => t.Version == version.ToString()).ForEach(t => t.IsCurrent = true);
saSeEdiCompareDiffs = saSeEdiCompareDiffs.OrderBy(t => t.Category).ToList(); saSeEdiCompareDiffs = saSeEdiCompareDiffs.OrderBy(t => t.Category).ToList();
var excelExporter = new ExcelExporter(); var excelExporter = new ExcelExporter();
@ -191,7 +191,7 @@ namespace SettleAccount.Job.Services.Report
from seEdi in temp.DefaultIfEmpty() from seEdi in temp.DefaultIfEmpty()
select new SaSeEdiCompareDiff() select new SaSeEdiCompareDiff()
{ {
Version = sa.Version, Version = sa.Version.ToString(),
WmsBillNum = seEdi.WmsBillNum, WmsBillNum = seEdi.WmsBillNum,
ShippingDate = seEdi.ShippingDate, ShippingDate = seEdi.ShippingDate,
CustomerOfflineTime = sa.SettleDate, CustomerOfflineTime = sa.SettleDate,
@ -215,6 +215,7 @@ namespace SettleAccount.Job.Services.Report
from sa in temp.DefaultIfEmpty() from sa in temp.DefaultIfEmpty()
select new SaSeEdiCompareDiff() select new SaSeEdiCompareDiff()
{ {
Version = sa.Version.ToString(),
WmsBillNum = seEdi.WmsBillNum, WmsBillNum = seEdi.WmsBillNum,
ShippingDate = seEdi.ShippingDate, ShippingDate = seEdi.ShippingDate,
CustomerOfflineTime = sa.SettleDate, CustomerOfflineTime = sa.SettleDate,

Loading…
Cancel
Save