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. 111
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  6. 18
      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!@#;"
//},
"ConnectionStrings": {
"Default": "Server=192.168.0.140;Database=ABP;user id=sa;Password=Microsoft2008",
"SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;Password=Microsoft2008;"
"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=1;"
},
"Logging": {
"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!@#;"
//},
"ConnectionStrings": {
"Default": "Server=192.168.0.140;Database=ABP;user id=sa;Password=Microsoft2008",
"SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;Password=Microsoft2008;"
"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=127.0.0.1;"
},
"Logging": {
"LogLevel": {

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

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

18
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -2646,7 +2646,7 @@
<param name="repository">仓储接口</param>
<param name="cache">缓存</param>
</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>
@ -2735,7 +2735,7 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</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>
2.大众发票与结算核对明细表
</summary>
@ -2743,13 +2743,6 @@
<returns></returns>
</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)">
<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.大众准时化结算数量差异比对表
</summary>
@ -2777,13 +2770,6 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</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">
<summary>
红旗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)
{
}
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>();
@ -106,33 +106,36 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
if (!string.IsNullOrEmpty(materialCode))
{
condition += string.Format(" d.MaterialCode='{0}' ", materialCode);
condition += string.Format(" and d.MaterialCode='{0}' ", materialCode);
}
if (!string.IsNullOrEmpty(begin))
{
condition += string.Format(" a.BeginTime>='{0}' ", begin);
condition += string.Format(" and a.BeginTime>='{0}' ", begin);
}
if (!string.IsNullOrEmpty(end))
{
condition += string.Format(" a.BeginTime<='{0}' ", end);
condition += string.Format(" and a.BeginTime<='{0}' ", end);
}
if (!string.IsNullOrEmpty(cp7begin))
{
condition += string.Format(" B.cp7Time>='{0}' ", cp7begin);
condition += string.Format(" and B.cp7>='{0}' ", cp7begin);
}
if (!string.IsNullOrEmpty(cp7end))
{
condition += string.Format(" B.cp7Time<='{0}' ", cp7end);
condition += string.Format(" and B.cp7<='{0}' ", cp7end);
}
if (!string.IsNullOrEmpty(kennCode))
{
condition += string.Format(" B.kenncode='{0}' ", kennCode);
condition += string.Format(" and B.kenncode='{0}' ", kennCode);
}
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 =
"SELECT\n" +
" temp1.*,\n" +

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

@ -98,6 +98,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "单价差异")]
public decimal InvoiceDiffPrice { set; get; }
}
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)
{
string str = string.Empty;
string str = " ";
if (!string.IsNullOrEmpty(begin))
@ -45,10 +45,15 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
str += string.Format(" and ItemCode='{0}' ", materialCode);
}
if (!string.IsNullOrEmpty(materialGroup))
{
str += string.Format(" and MaterialGroup='{0}' ", materialGroup);
}
//string str2 = " ";
//if (!string.IsNullOrEmpty(sapCode))
//{
// str2 += string.Format(" and b.MaterialCode='{0}' ", sapCode);
//}
//if (!string.IsNullOrEmpty(materialGroup))
//{
// str += string.Format(" and MaterialGroup='{0}' ", materialGroup);
//}
//if (!string.IsNullOrEmpty(sapCode))
//{
// str += string.Format(" and SapCode='{0}' ", materialGroup);
@ -75,14 +80,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" BeginTime CP5Time,\n" +
" ItemCode MaterialCode,\n" +
" ChassisNumber,\n" +
" OrderBillNum KENNCode,,\n" +
" OrderBillNum KENNCode,\n" +
" QTY,\n" +
" ErpMaterialCode ParentSapMaterialCode,\n" +
" '' FLAG \n" +
" FROM\n" +
" Set_fis {0}\n" +
" WHERE\n" +
" 1 = 1 \n" +
" Set_fis where 1=1 {0}\n" +
//" WHERE\n" +
//" 1 = 1 \n" +
" AND STATE = 0 UNION ALL\n" +
" SELECT\n" +
" WMSState,\n" +
@ -96,12 +101,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ErpMaterialCode ParentSapMaterialCode,\n" +
" 'L' FLAG \n" +
" FROM\n" +
" Set_fis {0}\n" +
" Set_fis \n" +
" WHERE\n" +
" 1 = 1 \n" +
" AND STATE = 4 \n" +
" AND STATE = 4 {0}\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" +
" ) temp1\n" +
" 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 kenncode = p_list.Where(p => p.Name == "KennCode").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 rangeList = _erpdapperRepository.GetSapList<InvoiceSettledDetailDiff>(_list,version,false);
@ -76,10 +80,6 @@ namespace SettleAccount.Job.Services
});
foreach (var itm in diffList)
{
var _first= _ls.FirstOrDefault(p => p.MaterialCode == itm.MaterialCode);
@ -94,7 +94,11 @@ namespace SettleAccount.Job.Services
}
_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);
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 kenncode = p_list.Where(p => p.Name == "KennCode").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 rangeList = _erpdapperRepository.GetSapList<InvoiceSettledDetailDiff>(_list, version,true);
@ -89,13 +90,16 @@ namespace SettleAccount.Job.Services.Report
}
_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 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 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 = 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
var result = _exporter.Append(report1List.ToList(), "按物料价格差异明细表")
.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();
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,
SapMaterailCode = p.Key.SapMaterialCode,
@ -96,8 +96,8 @@ namespace SettleAccount.Job.Services
SettleQty = p.Sum(itm => itm.SettledQty),
FisQty=0,
DiffQty=- p.Sum(itm => itm.SettledQty),
Price=p.Sum(itm=>itm.InvoicePrice),
DiffAmt= p.Sum(itm => itm.SettledQty)* p.Sum(itm => itm.InvoicePrice)
Price=p.Key.InvoicePrice,
DiffAmt= p.Sum(itm => itm.SettledQty)* p.Key.InvoicePrice
}).ToList();
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= _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);
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