Browse Source

up

master
mahao 1 year ago
parent
commit
7037413455
  1. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs
  2. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs
  3. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs
  4. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SA.cs
  5. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeCompareDetailReport.cs
  6. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeCompareDiff.cs
  7. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareDetailReport.cs
  8. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareDiff.cs
  9. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs
  10. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs
  11. 20
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs
  12. 60
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs
  13. 20
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs

5
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs

@ -362,6 +362,11 @@ namespace SettleAccount.Bases
/// 匹配类型
/// </summary>
public EnumMappingType MappingType { get; set; }
/// <summary>
/// 工厂地点
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; }
}
public class SA_CAN_BASE : AuditedAggregateRoot<Guid>, ISA_BASE

7
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs

@ -83,13 +83,6 @@ namespace SettleAccount.Domain.BQ
/// </summary>
//[Display(Name = "生产码")]
//public string PN { get; set; } = null!;
/// <summary>
/// 选择工厂导入
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; } = null!;
/// <summary>
/// 对应字段Quantity
/// </summary>

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs

@ -97,12 +97,6 @@ namespace SettleAccount.Domain.BQ
//[Display(Name = "生产码")]
//public string PN { get; set; } = null!;
/// <summary>
/// 对应字段filename 区分 cn1、cn5
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; } = null!;
/// <summary>
/// 对应字段Qty
/// </summary>

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SA.cs

@ -83,12 +83,6 @@ namespace SettleAccount.Domain.BQ
//[Display(Name = "生产码")]
//public string PN { get; set; } = null!;
/// <summary>
///
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; } = null!;
/// <summary>
/// 对应字段Quantity
/// </summary>

10
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeCompareDetailReport.cs

@ -113,5 +113,15 @@ namespace Win.Sfs.SettleAccount.Reports
[ValueMapping("当期数据", true)]
[ValueMapping("", false)]
public bool IsCurrent { get; set; }
/// <summary>
/// 地点
/// </summary>
[Display(Name = "地点")]
public string Site { get; set; }
/// <summary>
/// 价格
/// </summary>
[Display(Name = "价格")]
public decimal Price { get; set; }
}
}

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

@ -126,6 +126,14 @@ namespace Win.Sfs.SettleAccount.Reports
/// 生产码类型
/// </summary>
public string CodeType { get; set; }
/// <summary>
/// 地点
/// </summary>
public string Site { get; set; }
/// <summary>
/// 价格
/// </summary>
public decimal Price { get; set; }
}
/// <summary>

10
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareDetailReport.cs

@ -180,5 +180,15 @@ namespace Win.Sfs.SettleAccount.Reports
[ValueMapping("当期数据", true)]
[ValueMapping("", false)]
public bool IsCurrent { get; set; }
/// <summary>
/// 地点
/// </summary>
[Display(Name = "地点")]
public string Site { get; set; }
/// <summary>
/// 价格
/// </summary>
[Display(Name = "价格")]
public decimal Price { get; set; }
}
}

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

@ -132,6 +132,14 @@ namespace Win.Sfs.SettleAccount.Reports
/// 是否更新匹配类型
/// </summary>
public bool IsUpdateMappingType { get; set; } = true;
/// <summary>
/// 地点
/// </summary>
public string Site { get; set; }
/// <summary>
/// 价格
/// </summary>
public decimal Price { get; set; }
}
/// <summary>

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

@ -143,6 +143,8 @@ namespace SettleAccount.Job.Services.Report
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price),
};
//发运
var seGroup = (from se in _settleAccountDbContext.Set<BBAC_SE_DETAIL>()
@ -212,7 +214,9 @@ namespace SettleAccount.Job.Services.Report
SaCustomerPartCode = sa.CustomerPartCodeNoSpace,
SaFactoryPartCode = sa.PartCode,
EdiCustomerPartCode = seEdi.EdiCustomerPartCode,
CustomerPartCode = sa.LU
CustomerPartCode = sa.LU,
Site = sa.Site,
Price = sa.Price
};
var saSeCompareRight = from seEdi in seEdiGroup
join sa in saGroup

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

@ -138,6 +138,8 @@ namespace SettleAccount.Job.Services.Report
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
//发运
var seGroup = (from se in _settleAccountDbContext.Set<HBPO_SE_DETAIL>()
@ -207,7 +209,9 @@ namespace SettleAccount.Job.Services.Report
SaCustomerPartCode = sa.CustomerPartCodeNoSpace,
SaFactoryPartCode = sa.PartCode,
EdiCustomerPartCode = seEdi.EdiCustomerPartCode,
CustomerPartCode = sa.LU
CustomerPartCode = sa.LU,
Site = sa.Site,
Price = sa.Price
};
var saSeCompareRight = from seEdi in seEdiGroup
join sa in saGroup

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

@ -155,7 +155,9 @@ namespace SettleAccount.Job.Services.Report
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode),
CodeType = groupItem.Max(t => t.ProductionCodeType)
CodeType = groupItem.Max(t => t.ProductionCodeType),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
var saGroupByMappingType = from sa in _settleAccountDbContext.Set<BBAC_SA_DETAIL>()
where sa.BusinessType == businessType && sa.MappingType == EnumMappingType.None
@ -169,7 +171,9 @@ namespace SettleAccount.Job.Services.Report
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode),
CodeType = groupItem.Max(t => t.ProductionCodeType)
CodeType = groupItem.Max(t => t.ProductionCodeType),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
var saGroupByVersion = from sa in _settleAccountDbContext.Set<BBAC_SA_DETAIL>()
where sa.BusinessType == businessType && sa.Version == version
@ -183,7 +187,9 @@ namespace SettleAccount.Job.Services.Report
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode),
CodeType = groupItem.Max(t => t.ProductionCodeType)
CodeType = groupItem.Max(t => t.ProductionCodeType),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
//发运
var seGroup = (from se in _settleAccountDbContext.Set<BBAC_SE_DETAIL>()
@ -219,7 +225,9 @@ namespace SettleAccount.Job.Services.Report
SaCustomerPartCode = sa.CustomerPartCodeNoSpace,
SaFactoryPartCode = sa.PartCode,
CustomerPartCode = sa.LU,
CodeType = sa.CodeType
CodeType = sa.CodeType,
Site = sa.Site,
Price = sa.Price
}).ToList();
//无结算有发运
var notHaveSaHaveSeList = (from se in seGroup
@ -262,7 +270,9 @@ namespace SettleAccount.Job.Services.Report
SaCustomerPartCode = sa.CustomerPartCodeNoSpace,
SaFactoryPartCode = sa.PartCode,
CustomerPartCode = sa.LU,
CodeType = sa.CodeType
CodeType = sa.CodeType,
Site = sa.Site,
Price = sa.Price
}).ToList();
return haveSaHaveSeList.Union(haveSaNotHaveSeList).Union(notHaveSaHaveSeList).ToList();
}

60
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

@ -193,7 +193,9 @@ namespace SettleAccount.Job.Services.Report
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
PartCode = groupItem.Max(t => t.PartCode),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
var saGroupByMappingType = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>()
where sa.BusinessType == businessType && sa.MappingType == EnumMappingType.None
@ -206,7 +208,9 @@ namespace SettleAccount.Job.Services.Report
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
PartCode = groupItem.Max(t => t.PartCode),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
var saGroupByVersion = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>()
where sa.BusinessType == businessType && sa.Version == version
@ -219,7 +223,9 @@ namespace SettleAccount.Job.Services.Report
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
PartCode = groupItem.Max(t => t.PartCode),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
//发运
var seGroup = (from se in _settleAccountDbContext.Set<PUB_SE_DETAIL>()
@ -253,7 +259,9 @@ namespace SettleAccount.Job.Services.Report
SAQty = sa.Qty,
SaCustomerPartCode = sa.CustomerPartCodeNoSpace,
SaFactoryPartCode = sa.PartCode,
CustomerPartCode = sa.LU
CustomerPartCode = sa.LU,
Site = sa.Site,
Price = sa.Price
}).ToList();
//无结算有发运
var notHaveSaHaveSeList = (from se in seGroup
@ -294,7 +302,9 @@ namespace SettleAccount.Job.Services.Report
SeFactoryPartCode = se.FactoryPartCode,
SaCustomerPartCode = sa.CustomerPartCodeNoSpace,
SaFactoryPartCode = sa.PartCode,
CustomerPartCode = sa.LU
CustomerPartCode = sa.LU,
Site = sa.Site,
Price = sa.Price
}).ToList();
return haveSaHaveSeList.Union(haveSaNotHaveSeList).Union(notHaveSaHaveSeList).ToList();
}
@ -318,7 +328,9 @@ namespace SettleAccount.Job.Services.Report
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
PartCode = groupItem.Max(t => t.PartCode),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
var saGroupByMappingType = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>()
where sa.BusinessType == EnumBusinessType.YinDuJian && sa.MappingType == EnumMappingType.None
@ -330,7 +342,9 @@ namespace SettleAccount.Job.Services.Report
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
PartCode = groupItem.Max(t => t.PartCode),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
var saGroupByVersion = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>()
where sa.BusinessType == EnumBusinessType.YinDuJian && sa.Version == version
@ -342,7 +356,9 @@ namespace SettleAccount.Job.Services.Report
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
PartCode = groupItem.Max(t => t.PartCode),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
//发运
var seGroup = (from se in _settleAccountDbContext.Set<PUB_SE_DETAIL>()
@ -374,7 +390,9 @@ namespace SettleAccount.Job.Services.Report
SAQty = sa.Qty,
SaCustomerPartCode = sa.CustomerPartCodeNoSpace,
SaFactoryPartCode = sa.PartCode,
CustomerPartCode = sa.LU
CustomerPartCode = sa.LU,
Site = sa.Site,
Price = sa.Price
}).ToList();
//无结算有发运
var notHaveSaHaveSeList = (from se in seGroup
@ -413,7 +431,9 @@ namespace SettleAccount.Job.Services.Report
SeFactoryPartCode = se.FactoryPartCode,
SaCustomerPartCode = sa.CustomerPartCodeNoSpace,
SaFactoryPartCode = sa.PartCode,
CustomerPartCode = sa.LU
CustomerPartCode = sa.LU,
Site = sa.Site,
Price = sa.Price
}).ToList();
return haveSaHaveSeList.Union(haveSaNotHaveSeList).Union(notHaveSaHaveSeList).ToList();
}
@ -435,7 +455,9 @@ namespace SettleAccount.Job.Services.Report
Qty = groupItem.Sum(t => t.Qty),
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate)
SettleDate = groupItem.Max(t => t.SettleDate),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
var saGroupByMappingType = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>()
@ -448,7 +470,9 @@ namespace SettleAccount.Job.Services.Report
Qty = groupItem.Sum(t => t.Qty),
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate)
SettleDate = groupItem.Max(t => t.SettleDate),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
var saGroupByVersion = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>()
where sa.BusinessType == businessType && sa.Version == version
@ -460,7 +484,9 @@ namespace SettleAccount.Job.Services.Report
Qty = groupItem.Sum(t => t.Qty),
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate)
SettleDate = groupItem.Max(t => t.SettleDate),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
//发运
@ -494,7 +520,9 @@ namespace SettleAccount.Job.Services.Report
SAQty = sa.Qty,
SaCustomerPartCode = sa.LU,
SaFactoryPartCode = sa.FactoryPartCode,
CustomerPartCode = sa.LU
CustomerPartCode = sa.LU,
Site = sa.Site,
Price = sa.Price
}).ToList();
//无结算有发运
var notHaveSaHaveSeList = (from se in seGroup
@ -535,7 +563,9 @@ namespace SettleAccount.Job.Services.Report
SeFactoryPartCode = se.FactoryPartCode,
SaCustomerPartCode = sa.LU,
SaFactoryPartCode = sa.FactoryPartCode,
CustomerPartCode = sa.LU
CustomerPartCode = sa.LU,
Site = sa.Site,
Price = sa.Price
}).ToList();
var saGroupByPnPartCodeLu = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>()

20
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs

@ -59,7 +59,9 @@ namespace SettleAccount.Job.Services.Report
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
PartCode = groupItem.Max(t => t.PartCode),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
var saGroupByMappingType = from sa in _settleAccountDbContext.Set<TSaDetail>()
where sa.BusinessType == businessType && sa.MappingType == EnumMappingType.None
@ -72,7 +74,9 @@ namespace SettleAccount.Job.Services.Report
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
PartCode = groupItem.Max(t => t.PartCode),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
var saGroupByVersion = from sa in _settleAccountDbContext.Set<TSaDetail>()
where sa.BusinessType == businessType && sa.Version == version
@ -85,7 +89,9 @@ namespace SettleAccount.Job.Services.Report
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
PartCode = groupItem.Max(t => t.PartCode),
Site = groupItem.Max(t => t.Site),
Price = groupItem.Max(t => t.Price)
};
//发运
var seGroup = (from se in _settleAccountDbContext.Set<TSeDetail>()
@ -119,7 +125,9 @@ namespace SettleAccount.Job.Services.Report
SAQty = sa.Qty,
SaCustomerPartCode = sa.CustomerPartCodeNoSpace,
SaFactoryPartCode = sa.PartCode,
CustomerPartCode = sa.LU
CustomerPartCode = sa.LU,
Site = sa.Site,
Price = sa.Price
}).ToList();
//无结算有发运
var notHaveSaHaveSeList = (from se in seGroup
@ -160,7 +168,9 @@ namespace SettleAccount.Job.Services.Report
SeFactoryPartCode = se.FactoryPartCode,
SaCustomerPartCode = sa.CustomerPartCodeNoSpace,
SaFactoryPartCode = sa.PartCode,
CustomerPartCode = sa.LU
CustomerPartCode = sa.LU,
Site = sa.Site,
Price = sa.Price
}).ToList();
return haveSaHaveSeList.Union(haveSaNotHaveSeList).Union(notHaveSaHaveSeList).ToList();
}

Loading…
Cancel
Save