Browse Source

更新版本

branch_ccpg_220107
Administrator 3 years ago
parent
commit
f88d320689
  1. 1081
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20211204.txt
  2. 11251
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20211206.txt
  3. 4
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json
  4. 4
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
  5. 119
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  6. 26
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  7. 21
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs
  8. 3
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleDoorPanelDapperRepository.cs
  9. 29
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs
  10. 16
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs
  11. 14
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleDoorPanelExportService.cs
  12. 6
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs
  13. 11
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnsettledDetailReport.cs
  14. BIN
      src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.assets.cache
  15. BIN
      src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.assets.cache
  16. BIN
      src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache
  17. BIN
      src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.assets.cache
  18. BIN
      src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.csproj.AssemblyReference.cache

1081
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20211204.txt

File diff suppressed because it is too large

11251
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20211206.txt

File diff suppressed because it is too large

4
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json

@ -7,8 +7,8 @@
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" // "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;"
//}, //},
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=192.168.0.140;Database=ABP;user id=sa;Password=Microsoft2008", "Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
"SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;Password=Microsoft2008;" "SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=1;"
}, },
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {

4
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json

@ -7,8 +7,8 @@
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" // "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;"
//}, //},
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=192.168.0.140;Database=ABP;user id=sa;Password=Microsoft2008", "Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
"SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;Password=Microsoft2008;" "SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=127.0.0.1;"
}, },
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {

119
src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

@ -96,22 +96,22 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
string cp7begin, string cp7begin,
string cp7end, string cp7end,
string kenncode, string kenncode,
string chassisNumber string chassisNumber,
string materialGroup
) )
{ {
List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(version) ? string.Empty : version }); customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(version) ? string.Empty : version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(materialCode) ? string.Empty : materialCode }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(materialCode) ? string.Empty : materialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(begin) ? string.Empty : materialCode }); customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(begin) ? string.Empty : begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(end) ? string.Empty : materialCode }); customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(end) ? string.Empty : end });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(cp7begin) ? string.Empty : cp7begin }); customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(cp7begin) ? string.Empty : cp7begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(cp7end) ? string.Empty : cp7end }); customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(cp7end) ? string.Empty : cp7end });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode }); customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber }); customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup });
var _taskid = await _service.ExportEnqueueAsync("大众准时化结算门板价格差异比对报表", ExportExtentsion.Excel, CurrentUser, typeof(SettleDoorPanelExportService), customConditionList, (rs) =>
var _taskid = await _service.ExportEnqueueAsync("大众准时化结算门板价格差异比对报表", ExportExtentsion.Excel, CurrentUser, typeof(SettleDoorPanelExportService), customConditionList, (rs) =>
{ {
}); });
return _taskid; return _taskid;
@ -365,7 +365,8 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
string cp7begin, string cp7begin,
string cp7end, string cp7end,
string kenncode, string kenncode,
string chassisNumber string chassisNumber,
string materialGroup
) )
{ {
@ -373,12 +374,15 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value =string.IsNullOrEmpty(version) ?string.Empty:version }); customConditionList.Add(new CustomCondition() { Name = "Version", Value =string.IsNullOrEmpty(version) ?string.Empty:version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(materialCode) ?string.Empty: materialCode }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(materialCode) ?string.Empty: materialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(begin) ? string.Empty : materialCode }); customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(begin) ? string.Empty : begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(end) ? string.Empty : materialCode }); customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(end) ? string.Empty : end });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(cp7begin) ? string.Empty : cp7begin }); customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(cp7begin) ? string.Empty : cp7begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(cp7end) ? string.Empty : cp7end }); customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(cp7end) ? string.Empty : cp7end });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode }); customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber }); customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup });
var _taskid = await _service.ExportEnqueueAsync("大众发票与结算核对明细表", ExportExtentsion.Excel, CurrentUser, typeof(InvoiceSettledDetailDiffExportService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("大众发票与结算核对明细表", ExportExtentsion.Excel, CurrentUser, typeof(InvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
{ {
}); });
@ -386,7 +390,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
} }
/// <summary> /// <summary>
/// 2.大众结算未发运核对明细 ///3.大众准时化结算数量差异比对
/// </summary> /// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> /// <returns></returns>
@ -429,22 +433,21 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// </summary> /// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] //[HttpGet]
[Route("SettleFisDiffExport-Make")] //[Route("SettleFisDiffExport-Make")]
[DisableRequestSizeLimit] //[DisableRequestSizeLimit]
//public async Task<string> SettleFisDiffExportMake( string version, string materialCode, string begin, string end)
public async Task<string> SettleFisDiffExportMake( string version, string materialCode, string begin, string end) //{
{ // List<CustomCondition> customConditionList = new List<CustomCondition>();
List<CustomCondition> customConditionList = new List<CustomCondition>(); // customConditionList.Add(new CustomCondition() { Name = "Version", Value = version });
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version }); // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = materialCode});
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = materialCode}); // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = begin });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = begin }); // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end }); // var _taskid = await _service.ExportEnqueueAsync("大众准时化结算数量差异比对表", ExportExtentsion.Excel, CurrentUser, typeof(SettleFisDiffExportService), customConditionList, (rs) =>
var _taskid = await _service.ExportEnqueueAsync("大众准时化结算数量差异比对表", ExportExtentsion.Excel, CurrentUser, typeof(SettleFisDiffExportService), customConditionList, (rs) => // {
{ // });
}); // return _taskid;
return _taskid; //}
}
/// <summary> /// <summary>
/// 7.大众准时化未结明细表(包含漏结,漏结要有标识) /// 7.大众准时化未结明细表(包含漏结,漏结要有标识)
@ -466,7 +469,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = !string.IsNullOrEmpty(materialCode)?materialCode:string.Empty }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = !string.IsNullOrEmpty(materialCode)?materialCode:string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Begin", Value = !string.IsNullOrEmpty(begin)?string.Empty: begin }); customConditionList.Add(new CustomCondition() { Name = "Begin", Value = !string.IsNullOrEmpty(begin)?string.Empty: begin });
customConditionList.Add(new CustomCondition() { Name = "End", Value = !string.IsNullOrEmpty(end)?string.Empty: end }); customConditionList.Add(new CustomCondition() { Name = "End", Value = !string.IsNullOrEmpty(end)?string.Empty: end });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = !string.IsNullOrEmpty(end) ? string.Empty : end });
//var _first = exportName.FirstOrDefault(); //var _first = exportName.FirstOrDefault();
@ -570,37 +573,37 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
} }
/// <summary> ///// <summary>
/// 结算总成和ERP总成价格对比 ///// 结算总成和ERP总成价格对比
/// </summary> ///// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> ///// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> ///// <returns></returns>
[HttpGet] //[HttpGet]
[Route("SecMatchBaseMake-Make")] //[Route("SecMatchBaseMake-Make")]
[DisableRequestSizeLimit] //[DisableRequestSizeLimit]
public async Task<string> SecMatchBaseMake(string version) //public async Task<string> SecMatchBaseMake(string version)
{ //{
if (!_relationshipRepository.Any(p => p.Version == version )) // if (!_relationshipRepository.Any(p => p.Version == version ))
{ // {
throw new BusinessException("8989", string.Format("不存总成与结算件零件关系{0}期间", version)); // throw new BusinessException("8989", string.Format("不存总成与结算件零件关系{0}期间", version));
} // }
//if (!_settlementPartVersionrepository.Any(p => p.Version == version && p.CustomerCode == customerCode)) // //if (!_settlementPartVersionrepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
//{ // //{
// throw new BusinessException("8989", string.Format("不存结算包价格{0}期间", version)); // // throw new BusinessException("8989", string.Format("不存结算包价格{0}期间", version));
//} // //}
List<CustomCondition> customConditionList = new List<CustomCondition>(); // List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "二配当月结算表" }); // customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "二配当月结算表" });
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
//customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode }); // //customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode });
var _taskid = await _service.ExportEnqueueAsync("二配当月结算表", ExportExtentsion.Excel, CurrentUser, typeof(SecMatchBaseExportService), customConditionList, (rs) => // var _taskid = await _service.ExportEnqueueAsync("二配当月结算表", ExportExtentsion.Excel, CurrentUser, typeof(SecMatchBaseExportService), customConditionList, (rs) =>
{ // {
}); // });
return _taskid; // return _taskid;
} //}

26
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -2646,7 +2646,7 @@
<param name="repository">仓储接口</param> <param name="repository">仓储接口</param>
<param name="cache">缓存</param> <param name="cache">缓存</param>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettleDoorPanel(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettleDoorPanel(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
<summary> <summary>
大众准时化结算门板价格差异比对报表 大众准时化结算门板价格差异比对报表
</summary> </summary>
@ -2735,7 +2735,7 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.InvoiceSettledDetailDiffMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.InvoiceSettledDetailDiffMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
<summary> <summary>
2.大众发票与结算核对明细表 2.大众发票与结算核对明细表
</summary> </summary>
@ -2743,18 +2743,11 @@
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnInvoiceSettledDetailDiffMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnInvoiceSettledDetailDiffMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
<summary> <summary>
2.大众结算未发运核对明细表
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettleFisDiffExportMake(System.String,System.String,System.String,System.String)">
<summary>
3.大众准时化结算数量差异比对表 3.大众准时化结算数量差异比对表
</summary> </summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnsettledDetailReportServiceMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnsettledDetailReportServiceMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
<summary> <summary>
@ -2777,13 +2770,6 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SecMatchBaseMake(System.String)">
<summary>
结算总成和ERP总成价格对比
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapHQ_H_Platform"> <member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapHQ_H_Platform">
<summary> <summary>
红旗H平台导入 红旗H平台导入

21
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs

@ -96,7 +96,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
: base(dbContextProvider) : base(dbContextProvider)
{ {
} }
public virtual List<InvoiceSettledDetailDiff> GetInvoiceSettledDetailDiffReportList(string version, string materialCode, string begin, string end ,string cp7begin,string cp7end,string kennCode,string chassisNumber) public virtual List<InvoiceSettledDetailDiff> GetInvoiceSettledDetailDiffReportList(string version, string materialCode, string begin, string end ,string cp7begin,string cp7end,string kennCode,string chassisNumber,string materialGroup)
{ {
List<InvoiceSettledDetailDiff> _list = new List<InvoiceSettledDetailDiff>(); List<InvoiceSettledDetailDiff> _list = new List<InvoiceSettledDetailDiff>();
@ -106,33 +106,36 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
if (!string.IsNullOrEmpty(materialCode)) if (!string.IsNullOrEmpty(materialCode))
{ {
condition += string.Format(" d.MaterialCode='{0}' ", materialCode); condition += string.Format(" and d.MaterialCode='{0}' ", materialCode);
} }
if (!string.IsNullOrEmpty(begin)) if (!string.IsNullOrEmpty(begin))
{ {
condition += string.Format(" a.BeginTime>='{0}' ", begin); condition += string.Format(" and a.BeginTime>='{0}' ", begin);
} }
if (!string.IsNullOrEmpty(end)) if (!string.IsNullOrEmpty(end))
{ {
condition += string.Format(" a.BeginTime<='{0}' ", end); condition += string.Format(" and a.BeginTime<='{0}' ", end);
} }
if (!string.IsNullOrEmpty(cp7begin)) if (!string.IsNullOrEmpty(cp7begin))
{ {
condition += string.Format(" B.cp7Time>='{0}' ", cp7begin); condition += string.Format(" and B.cp7>='{0}' ", cp7begin);
} }
if (!string.IsNullOrEmpty(cp7end)) if (!string.IsNullOrEmpty(cp7end))
{ {
condition += string.Format(" B.cp7Time<='{0}' ", cp7end); condition += string.Format(" and B.cp7<='{0}' ", cp7end);
} }
if (!string.IsNullOrEmpty(kennCode)) if (!string.IsNullOrEmpty(kennCode))
{ {
condition += string.Format(" B.kenncode='{0}' ", kennCode); condition += string.Format(" and B.kenncode='{0}' ", kennCode);
} }
if (!string.IsNullOrEmpty(chassisNumber)) if (!string.IsNullOrEmpty(chassisNumber))
{ {
condition += string.Format(" B.chassisNumber='{0}' ", chassisNumber); condition += string.Format(" and B.chassisNumber='{0}' ", chassisNumber);
} }
//if (!string.IsNullOrEmpty(materialGroup))
//{
// condition += string.Format(" B.chassisNumber='{0}' ", materialGroup);
//}
string str = string str =
"SELECT\n" + "SELECT\n" +
" temp1.*,\n" + " temp1.*,\n" +

3
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleDoorPanelDapperRepository.cs

@ -97,6 +97,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "单价差异")] [ExporterHeader(DisplayName = "单价差异")]
public decimal InvoiceDiffPrice { set; get; } public decimal InvoiceDiffPrice { set; get; }
} }
public class SettleDoorPanelSumExport public class SettleDoorPanelSumExport

29
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs

@ -30,7 +30,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public virtual List<UnSettleDetailReport> GetDiffReport(string year, string begin, string end, string customcode, string version, string materialCode, string materialGroup, string sapCode) public virtual List<UnSettleDetailReport> GetDiffReport(string year, string begin, string end, string customcode, string version, string materialCode, string materialGroup, string sapCode)
{ {
string str = string.Empty; string str = " ";
if (!string.IsNullOrEmpty(begin)) if (!string.IsNullOrEmpty(begin))
@ -45,10 +45,15 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{ {
str += string.Format(" and ItemCode='{0}' ", materialCode); str += string.Format(" and ItemCode='{0}' ", materialCode);
} }
if (!string.IsNullOrEmpty(materialGroup)) //string str2 = " ";
{ //if (!string.IsNullOrEmpty(sapCode))
str += string.Format(" and MaterialGroup='{0}' ", materialGroup); //{
} // str2 += string.Format(" and b.MaterialCode='{0}' ", sapCode);
//}
//if (!string.IsNullOrEmpty(materialGroup))
//{
// str += string.Format(" and MaterialGroup='{0}' ", materialGroup);
//}
//if (!string.IsNullOrEmpty(sapCode)) //if (!string.IsNullOrEmpty(sapCode))
//{ //{
// str += string.Format(" and SapCode='{0}' ", materialGroup); // str += string.Format(" and SapCode='{0}' ", materialGroup);
@ -75,14 +80,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" BeginTime CP5Time,\n" + " BeginTime CP5Time,\n" +
" ItemCode MaterialCode,\n" + " ItemCode MaterialCode,\n" +
" ChassisNumber,\n" + " ChassisNumber,\n" +
" OrderBillNum KENNCode,,\n" + " OrderBillNum KENNCode,\n" +
" QTY,\n" + " QTY,\n" +
" ErpMaterialCode ParentSapMaterialCode,\n" + " ErpMaterialCode ParentSapMaterialCode,\n" +
" '' FLAG \n" + " '' FLAG \n" +
" FROM\n" + " FROM\n" +
" Set_fis {0}\n" + " Set_fis where 1=1 {0}\n" +
" WHERE\n" + //" WHERE\n" +
" 1 = 1 \n" + //" 1 = 1 \n" +
" AND STATE = 0 UNION ALL\n" + " AND STATE = 0 UNION ALL\n" +
" SELECT\n" + " SELECT\n" +
" WMSState,\n" + " WMSState,\n" +
@ -96,12 +101,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ErpMaterialCode ParentSapMaterialCode,\n" + " ErpMaterialCode ParentSapMaterialCode,\n" +
" 'L' FLAG \n" + " 'L' FLAG \n" +
" FROM\n" + " FROM\n" +
" Set_fis {0}\n" + " Set_fis \n" +
" WHERE\n" + " WHERE\n" +
" 1 = 1 \n" + " 1 = 1 \n" +
" AND STATE = 4 \n" + " AND STATE = 4 {0}\n" +
" ) A\n" + " ) A\n" +
" LEFT JOIN Set_material B ON a.MaterialCode = b.CustomerPartCode\n" + " LEFT JOIN Set_material B ON a.MaterialCode = b.CustomerPartCode \n" +
" LEFT JOIN Set_material d ON a.ParentSapMaterialCode = d.MaterialCode \n" + " LEFT JOIN Set_material d ON a.ParentSapMaterialCode = d.MaterialCode \n" +
" ) temp1\n" + " ) temp1\n" +
" LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE version = ( SELECT Max( Version ) FROM Set_PriceList ) ) temp2 ON temp1.SapMaterialCode = temp2.MaterialCode"; " LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE version = ( SELECT Max( Version ) FROM Set_PriceList ) ) temp2 ON temp1.SapMaterialCode = temp2.MaterialCode";

16
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs

@ -51,7 +51,11 @@ namespace SettleAccount.Job.Services
var cp7end = p_list.Where(p => p.Name == "Cp7EndTime").FirstOrDefault().Value; var cp7end = p_list.Where(p => p.Name == "Cp7EndTime").FirstOrDefault().Value;
var kenncode = p_list.Where(p => p.Name == "KennCode").FirstOrDefault().Value; var kenncode = p_list.Where(p => p.Name == "KennCode").FirstOrDefault().Value;
var chassisNumber = p_list.Where(p => p.Name == "ChassisNumber").FirstOrDefault().Value; var chassisNumber = p_list.Where(p => p.Name == "ChassisNumber").FirstOrDefault().Value;
var _ls = _dapperRepository.GetInvoiceSettledDetailDiffReportList(version, materialCode, begin, end, cp7begin, cp7end, kenncode, chassisNumber);
var materialGroup = p_list.Where(p => p.Name == "MaterialGroup").FirstOrDefault().Value;
var _ls = _dapperRepository.GetInvoiceSettledDetailDiffReportList(version, materialCode, begin, end, cp7begin, cp7end, kenncode, chassisNumber,materialGroup);
var _list = _ls.Where(p=>p.ParentSapMaterialCode!=p.SapMaterialCode).GroupBy(p =>new { p.ParentSapMaterialCode,p.ChassisNumber,p.KENNCode }).Select(p => p.FirstOrDefault()).ToList(); var _list = _ls.Where(p=>p.ParentSapMaterialCode!=p.SapMaterialCode).GroupBy(p =>new { p.ParentSapMaterialCode,p.ChassisNumber,p.KENNCode }).Select(p => p.FirstOrDefault()).ToList();
var rangeList = _erpdapperRepository.GetSapList<InvoiceSettledDetailDiff>(_list,version,false); var rangeList = _erpdapperRepository.GetSapList<InvoiceSettledDetailDiff>(_list,version,false);
@ -76,10 +80,6 @@ namespace SettleAccount.Job.Services
}); });
foreach (var itm in diffList) foreach (var itm in diffList)
{ {
var _first= _ls.FirstOrDefault(p => p.MaterialCode == itm.MaterialCode); var _first= _ls.FirstOrDefault(p => p.MaterialCode == itm.MaterialCode);
@ -94,7 +94,11 @@ namespace SettleAccount.Job.Services
} }
_ls.AddRange(rangeList); _ls.AddRange(rangeList);
_ls=_ls.OrderBy(p => p.ChassisNumber).ThenBy(p=>p.KENNCode).ThenBy(p=>p.SapMaterialCode).ToList(); if (!string.IsNullOrEmpty(materialGroup))
{
_ls= _ls.Where(p => p.MaterialGroup == materialGroup).ToList();
}
_ls =_ls.OrderBy(p => p.ChassisNumber).ThenBy(p=>p.KENNCode).ThenBy(p=>p.SapMaterialCode).ToList();
_outputService.Export<InvoiceSettledDetailDiff>(id, string.Format("大众发票与结算核对明细表_{0}.xlsx", Guid.NewGuid().ToString()), _ls); _outputService.Export<InvoiceSettledDetailDiff>(id, string.Format("大众发票与结算核对明细表_{0}.xlsx", Guid.NewGuid().ToString()), _ls);
return id.ToString(); return id.ToString();

14
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleDoorPanelExportService.cs

@ -51,7 +51,8 @@ namespace SettleAccount.Job.Services.Report
var cp7end = p_list.Where(p => p.Name == "Cp7EndTime").FirstOrDefault().Value; var cp7end = p_list.Where(p => p.Name == "Cp7EndTime").FirstOrDefault().Value;
var kenncode = p_list.Where(p => p.Name == "KennCode").FirstOrDefault().Value; var kenncode = p_list.Where(p => p.Name == "KennCode").FirstOrDefault().Value;
var chassisNumber = p_list.Where(p => p.Name == "ChassisNumber").FirstOrDefault().Value; var chassisNumber = p_list.Where(p => p.Name == "ChassisNumber").FirstOrDefault().Value;
var _ls = _dapperRepository.GetInvoiceSettledDetailDiffReportList(version, materialCode, begin, end, cp7begin, cp7end, kenncode, chassisNumber); var materialGroup = p_list.Where(p => p.Name == "MaterialGroup").FirstOrDefault().Value;
var _ls = _dapperRepository.GetInvoiceSettledDetailDiffReportList(version, materialCode, begin, end, cp7begin, cp7end, kenncode, chassisNumber, materialGroup);
var _list = _ls.Where(p => p.ParentSapMaterialCode != p.SapMaterialCode).GroupBy(p => new { p.ParentSapMaterialCode, p.ChassisNumber, p.KENNCode }).Select(p => p.FirstOrDefault()).ToList(); var _list = _ls.Where(p => p.ParentSapMaterialCode != p.SapMaterialCode).GroupBy(p => new { p.ParentSapMaterialCode, p.ChassisNumber, p.KENNCode }).Select(p => p.FirstOrDefault()).ToList();
var rangeList = _erpdapperRepository.GetSapList<InvoiceSettledDetailDiff>(_list, version,true); var rangeList = _erpdapperRepository.GetSapList<InvoiceSettledDetailDiff>(_list, version,true);
@ -89,13 +90,16 @@ namespace SettleAccount.Job.Services.Report
} }
_ls.AddRange(rangeList); _ls.AddRange(rangeList);
_ls = _ls.Where(p=>p.DiffPrice!=0).OrderBy(p => p.SapMaterialCode).ToList(); _ls = _ls.Where(p=>p.DiffPrice!=0 ).OrderBy(p => p.SapMaterialCode).ToList();
var report1List = _ls.GroupBy(p => new { p.MaterialGroup, p.MaterialCode, p.MaterialDesc, p.Price, p.InvoicePrice, p.DiffPrice, p.SapMaterialCode })
.Select(t => new SettleDoorPanelExport{ MaterialGroup = t.FirstOrDefault().MaterialGroup, MaterialCode = t.FirstOrDefault().MaterialCode, MaterialDesc = t.FirstOrDefault().MaterialDesc, Price = t.FirstOrDefault().Price, InvoicePrice = t.FirstOrDefault().InvoicePrice, InvoiceDiffPrice = t.FirstOrDefault().DiffPrice, SAPCode = t.FirstOrDefault().SapMaterialCode });
var report1List = _ls.Where(p=>p.DiffPrice!=0).GroupBy(p => new { p.MaterialGroup, p.MaterialCode, p.MaterialDesc, p.Price, p.InvoicePrice, p.DiffPrice, p.SapMaterialCode })
.Select(t => new SettleDoorPanelExport{ MaterialGroup = t.FirstOrDefault().MaterialGroup, MaterialCode = t.FirstOrDefault().MaterialCode, MaterialDesc = t.FirstOrDefault().MaterialDesc, Price = t.FirstOrDefault().Price, InvoicePrice = t.FirstOrDefault().InvoicePrice, InvoiceDiffPrice = t.FirstOrDefault().DiffPrice, SAPCode = t.FirstOrDefault().SapMaterialCode, }).ToList();
var report2List = _ls.GroupBy(p => new {p.MaterialGroup }).Select(p=>new SettleDoorPanelSumExport { MaterialGroup= p.Key.MaterialGroup, InvoiceDiffPrice=p.Sum(itm=>itm.DiffPrice)*p.Sum(itm=>itm.Qty), Version="" }); var report2List = report1List.GroupBy(p => new {p.MaterialGroup }).Select(p=>new SettleDoorPanelSumExport { MaterialGroup= p.Key.MaterialGroup, InvoiceDiffPrice=p.Sum(itm=>itm.InvoiceDiffPrice), Version= version });
ExcelExporter _exporter = new ExcelExporter();//导出Excel ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(report1List.ToList(), "按物料价格差异明细表") var result = _exporter.Append(report1List.ToList(), "按物料价格差异明细表")
.SeparateBySheet() .SeparateBySheet()

6
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs

@ -88,7 +88,7 @@ namespace SettleAccount.Job.Services
} }
_ls=_ls.OrderBy(p => p.ChassisNumber).ThenBy(p=>p.KENNCode).ThenBy(p=>p.SapMaterialCode).ToList(); _ls=_ls.OrderBy(p => p.ChassisNumber).ThenBy(p=>p.KENNCode).ThenBy(p=>p.SapMaterialCode).ToList();
var _lsSum=_ls.GroupBy(p => new { p.MaterialCode, p.SapMaterialCode, p.MaterialGroup }).Select(p => new UnInvoiceSettledDetailSum var _lsSum=_ls.GroupBy(p => new { p.MaterialCode, p.SapMaterialCode, p.MaterialGroup,p.InvoicePrice }).Select(p => new UnInvoiceSettledDetailSum
{ {
MaterialCode = p.Key.MaterialCode, MaterialCode = p.Key.MaterialCode,
SapMaterailCode = p.Key.SapMaterialCode, SapMaterailCode = p.Key.SapMaterialCode,
@ -96,8 +96,8 @@ namespace SettleAccount.Job.Services
SettleQty = p.Sum(itm => itm.SettledQty), SettleQty = p.Sum(itm => itm.SettledQty),
FisQty=0, FisQty=0,
DiffQty=- p.Sum(itm => itm.SettledQty), DiffQty=- p.Sum(itm => itm.SettledQty),
Price=p.Sum(itm=>itm.InvoicePrice), Price=p.Key.InvoicePrice,
DiffAmt= p.Sum(itm => itm.SettledQty)* p.Sum(itm => itm.InvoicePrice) DiffAmt= p.Sum(itm => itm.SettledQty)* p.Key.InvoicePrice
}).ToList(); }).ToList();
var _sumTotal= new UnInvoiceSettledDetailSum() { var _sumTotal= new UnInvoiceSettledDetailSum() {

11
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnsettledDetailReport.cs

@ -54,8 +54,17 @@ namespace SettleAccount.Job.Services.Report
); );
_list.AddRange(_lst); _list.AddRange(_lst);
_list= _list.OrderBy(p => p.ChassisNumber).ThenBy(p => p.SapMaterialCode).ThenBy(p => p.Flag).ToList();
if (!string.IsNullOrEmpty(sapcode))
{
_list= _list.Where(p => p.SapMaterialCode == sapcode).ToList();
}
if (!string.IsNullOrEmpty(materialGroup))
{
_list= _list.Where(p => p.MaterialGroup == materialGroup).ToList();
}
_list = _list.OrderBy(p => p.ChassisNumber).ThenBy(p => p.SapMaterialCode).ThenBy(p => p.Flag).ToList();
_outputService.Export<UnSettleDetailReport>(id, _first, _list); _outputService.Export<UnSettleDetailReport>(id, _first, _list);
return id.ToString(); return id.ToString();

BIN
src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.assets.cache

Binary file not shown.

BIN
src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.assets.cache

Binary file not shown.

BIN
src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache

Binary file not shown.

BIN
src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.assets.cache

Binary file not shown.

BIN
src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.csproj.AssemblyReference.cache

Binary file not shown.
Loading…
Cancel
Save