Administrator 3 years ago
parent
commit
98ca2ac64b
  1. 5
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs
  2. 23
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs

5
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs

@ -216,14 +216,13 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ) TEMP1\n" + " ) TEMP1\n" +
" LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE Version = '202110' ) TEMP2 ON TEMP1.SapCode = TEMP2.MaterialCode \n" + " LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE Version = '202110' ) TEMP2 ON TEMP1.SapCode = TEMP2.MaterialCode \n" +
" ) UNION1\n" + " ) UNION1\n" +
" LEFT JOIN temp_vwkanban UNION2 ON UNION1.Kanban= UNION2.[看板号] \n" + " LEFT JOIN temp_vwkanban UNION2 ON UNION1.Kanban= UNION2.[看板号] \n" +
" AND UNION1.CustomerPartCode= UNION2.[客户零件号] \n" + " AND UNION1.CustomerPartCode= UNION2.[客户零件号] \n" +
" WHERE\n" + " WHERE\n" +
" UNION2.[看板号] IS NULL \n" + " UNION2.[看板号] IS NULL \n" +
" AND UNION2.[客户零件号] IS NULL \n" + " AND UNION2.[客户零件号] IS NULL \n" +
" ) aaa \n" + " ) aaa \n" +
"WHERE\n" + " WHERE 1=1";
" aaa.CustomerPartCode NOT IN ( '30G839904A041', '80D867172KJ7' )";

23
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs

@ -211,6 +211,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ImporterHeader(Name = "行号")] [ImporterHeader(Name = "行号")]
[ExporterHeader(DisplayName = "行号")] [ExporterHeader(DisplayName = "行号")]
public string { set; get; } public string { set; get; }
[ImporterHeader(Name = "版本")]
[ExporterHeader(DisplayName = "版本")]
public string { set; get; }
[ImporterHeader(Name = "客户")] [ImporterHeader(Name = "客户")]
[ExporterHeader(DisplayName = "客户")] [ExporterHeader(DisplayName = "客户")]
public string { set; get; } public string { set; get; }
@ -244,10 +249,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//[ExporterHeader(DisplayName = "结算数量")] //[ExporterHeader(DisplayName = "结算数量")]
public decimal { set; get; } public decimal { set; get; }
[ImporterHeader(Name = "实际出库数量")] [ImporterHeader(Name = "实际出库数量")]
[ExporterHeader(DisplayName = "实际出库数量")] [ExporterHeader(DisplayName = "实际出库数量",IsIgnore =true)]
public decimal { set; get; } public decimal { set; get; }
[ImporterHeader(Name = "差异数量")] [ImporterHeader(Name = "差异数量")]
[ExporterHeader(DisplayName = "差异数量")] [ExporterHeader(DisplayName = "差异数量", IsIgnore = true)]
public decimal { set; get; } public decimal { set; get; }
[ImporterHeader(Name = "开票单价")] [ImporterHeader(Name = "开票单价")]
[ExporterHeader(DisplayName = "开票单价")] [ExporterHeader(DisplayName = "开票单价")]
@ -1165,7 +1170,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
getcnumber = getcnumber.TrimEnd(','); getcnumber = getcnumber.TrimEnd(',');
var _sql = "SELECT\n" + var _sql = "SELECT\n" +
" ROW_NUMBER ( ) OVER ( ORDER BY Type DESC ) 行号 ,\n" + " ROW_NUMBER ( ) OVER ( ORDER BY Type DESC ) 行号 ,temp1.Version 版本,\n" +
" temp1.Client 客户,\n" + " temp1.Client 客户,\n" +
" temp1.Type 出库类型,\n" + " temp1.Type 出库类型,\n" +
" temp1.BillNum 结算单,\n" + " temp1.BillNum 结算单,\n" +
@ -1184,7 +1189,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
"FROM\n" + "FROM\n" +
" (\n" + " (\n" +
" SELECT\n" + " SELECT\n" +
" '大众准时化出库' AS Type,\n" + " '大众准时化出库' AS Type,Version,\n" +
" '大众' Client,\n" + " '大众' Client,\n" +
" BillNum,\n" + " BillNum,\n" +
" MaterialCode,\n" + " MaterialCode,\n" +
@ -1200,7 +1205,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ChassisNumber IN ({0}) \n" + " ChassisNumber IN ({0}) \n" +
" AND State = 2 UNION ALL\n" + " AND State = 2 UNION ALL\n" +
" SELECT\n" + " SELECT\n" +
" '大众看板出库' AS Type,\n" + " '大众看板出库' AS Type,Version,\n" +
" '大众' Client,\n" + " '大众' Client,\n" +
" BillNum,\n" + " BillNum,\n" +
" MaterialCode,\n" + " MaterialCode,\n" +
@ -1216,7 +1221,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Kanban IN ({0}) \n" + " Kanban IN ({0}) \n" +
" AND State = 2 UNION ALL\n" + " AND State = 2 UNION ALL\n" +
" SELECT\n" + " SELECT\n" +
" '大众备件条码出库' AS Type,\n" + " '大众备件条码出库' AS Type,Version,\n" +
" '大众' Client,\n" + " '大众' Client,\n" +
" BillNum,\n" + " BillNum,\n" +
" MaterialCode,\n" + " MaterialCode,\n" +
@ -1232,7 +1237,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" OrderBillNum IN ({0}) \n" + " OrderBillNum IN ({0}) \n" +
" AND State = 2 UNION ALL\n" + " AND State = 2 UNION ALL\n" +
" SELECT\n" + " SELECT\n" +
" '红旗看板出库' AS Type,\n" + " '红旗看板出库' AS Type,Version,\n" +
" '红旗' Client,\n" + " '红旗' Client,\n" +
" BillNum,\n" + " BillNum,\n" +
" MaterialCode,\n" + " MaterialCode,\n" +
@ -1248,7 +1253,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Kanban IN ({0}) \n" + " Kanban IN ({0}) \n" +
" AND State = 2 \n" + " AND State = 2 \n" +
" UNION ALL SELECT\n" + " UNION ALL SELECT\n" +
" '自定义发货出库' AS Type,\n" + " '自定义发货出库' AS Type,Version,\n" +
" customercode Client,\n" + " customercode Client,\n" +
" BillNum,\n" + " BillNum,\n" +
" SapMaterialCode,\n" + " SapMaterialCode,\n" +
@ -1303,7 +1308,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
getcnumber = getcnumber.TrimEnd(','); getcnumber = getcnumber.TrimEnd(',');
} }
var _sql = "SELECT\n" + var _sql = "SELECT\n" +
" ROW_NUMBER ( ) OVER ( ORDER BY Type DESC ) 行号 ,\n" + " ROW_NUMBER ( ) OVER ( ORDER BY Type DESC ) 行号 \n" +
" temp1.Client 客户,\n" + " temp1.Client 客户,\n" +
" temp1.Type 出库类型,\n" + " temp1.Type 出库类型,\n" +
" temp1.BillNum 结算单,\n" + " temp1.BillNum 结算单,\n" +

Loading…
Cancel
Save