Browse Source

红旗未结核对设置Key

FoShanPG
44673626 3 years ago
parent
commit
1b3088f4c6
  1. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  2. 30
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs
  3. 5
      src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

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

@ -745,7 +745,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban }); customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup }); customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode }); customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("红旗未结核对", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFactorySettledDetailDapperRepository), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("红旗未结核对", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFactoryUnSettledDetailDiffExportService), customConditionList, (rs) =>
{ {
}); });
return _taskid; return _taskid;

30
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs

@ -75,7 +75,25 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ISNULL( h.Qty, 0 ) AS UnHQQty,\n" + " ISNULL( h.Qty, 0 ) AS UnHQQty,\n" +
" ISNULL( h.Amt, 0 ) AS UnHQAmt \n" + " ISNULL( h.Amt, 0 ) AS UnHQAmt \n" +
" FROM\n" + " FROM\n" +
" Set_UnHQSettleAccount AS h\n" + " (\n" +
" SELECT SUM\n" +
" ( Qty ) Qty,\n" +
" Amt,\n" +
" HQHKanBan,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" AcceptanceNo,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_UnHQSettleAccount \n" +
" GROUP BY\n" +
" HQHKanBan,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" AcceptanceNo,\n" +
" Amt,\n" +
" MaterialCode \n" +
" ) AS h\n" +
" LEFT JOIN Set_material AS m ON h.MaterialCode = m.CustomerPartCode \n" + " LEFT JOIN Set_material AS m ON h.MaterialCode = m.CustomerPartCode \n" +
" ) AS unhq\n" + " ) AS unhq\n" +
" LEFT JOIN (\n" + " LEFT JOIN (\n" +
@ -89,7 +107,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" b.AcceptanceNo AS 结算验收单号,\n" + " b.AcceptanceNo AS 结算验收单号,\n" +
" C.EstimateTypeDesc AS 物料组 \n" + " C.EstimateTypeDesc AS 物料组 \n" +
" FROM\n" + " FROM\n" +
" Set_HQ_H_Kanban AS a\n" + " ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode ) AS a\n" +
" LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" + " LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" +
" AND a.MaterialCode = b.MaterialCode\n" + " AND a.MaterialCode = b.MaterialCode\n" +
" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
@ -167,7 +185,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" b.AcceptanceNo AS 结算验收单号,\n" + " b.AcceptanceNo AS 结算验收单号,\n" +
" C.EstimateTypeDesc AS 物料组 \n" + " C.EstimateTypeDesc AS 物料组 \n" +
" FROM\n" + " FROM\n" +
" Set_HQ_H_Kanban AS a\n" + " ( SELECT SUM ( Qty ) AS Qty, Kanban, MaterialCode, WmsBillNum, LastModificationTime FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode, WmsBillNum, LastModificationTime ) AS a\n" +
" LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" + " LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" +
" AND a.MaterialCode = b.MaterialCode\n" + " AND a.MaterialCode = b.MaterialCode\n" +
" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
@ -176,7 +194,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" AND b.MaterialCode IS NULL {0}\n" + " AND b.MaterialCode IS NULL {0}\n" +
" ) AS temp1\n" + " ) AS temp1\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" + " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" +
" LEFT JOIN ( SELECT Qty, HQHKanBan, MaterialCode FROM Set_UnHQSettleAccount ) temp3 ON temp1.[结算验收单号] = temp3.HQHKanBan \n" + " LEFT JOIN ( SELECT SUM(Qty) Qty, HQHKanBan, MaterialCode FROM Set_UnHQSettleAccount GROUP BY HQHKanBan, MaterialCode ) temp3 ON temp1.[订货看板编号] = temp3.HQHKanBan \n" +
" AND temp1.[客户物料号] = temp3.MaterialCode"; " AND temp1.[客户物料号] = temp3.MaterialCode";
var _sql = string.Format(str, condition); var _sql = string.Format(str, condition);
@ -189,6 +207,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public class HQFactoryUnSettledDetailDiff public class HQFactoryUnSettledDetailDiff
{ {
[ExporterHeader(DisplayName = "交货单号")]
public string { set; get; }
[ExporterHeader(DisplayName = "交货日期")]
public string { set; get; }
[ExporterHeader(DisplayName = "收货仓库")] [ExporterHeader(DisplayName = "收货仓库")]
public string { set; get; } public string { set; get; }
[ExporterHeader(DisplayName = "收货仓库描述")] [ExporterHeader(DisplayName = "收货仓库描述")]

5
src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

@ -179,6 +179,11 @@ namespace Win.Sfs.SettleAccount
{ {
return implementationFactory.GetService<HQHUnSettledDetailDiffExportService>(); return implementationFactory.GetService<HQHUnSettledDetailDiffExportService>();
} }
//红旗未结核对
if (key.Equals(typeof(HQFactoryUnSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQFactoryUnSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName)) if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName))
{ {
return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>(); return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>();

Loading…
Cancel
Save