|
@ -18,6 +18,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
public string 客户 { set; get; } |
|
|
public string 客户 { set; get; } |
|
|
[ExporterHeader(DisplayName = "出库类型")] |
|
|
[ExporterHeader(DisplayName = "出库类型")] |
|
|
public string 出库类型 { set; get; } |
|
|
public string 出库类型 { set; get; } |
|
|
|
|
|
[ExporterHeader(DisplayName = "结算编码")] |
|
|
|
|
|
public string 结算编码 { set; get; } |
|
|
|
|
|
[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 = "物料号")] |
|
@ -25,42 +31,27 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
[ExporterHeader(DisplayName = "通用代码号")] |
|
|
[ExporterHeader(DisplayName = "通用代码号")] |
|
|
public string 通用代码号 { set; get; } |
|
|
public string 通用代码号 { set; get; } |
|
|
[ExporterHeader(DisplayName = "结算数量")] |
|
|
[ExporterHeader(DisplayName = "结算数量")] |
|
|
public string 结算数量 { set; get; } |
|
|
public decimal 结算数量 { set; get; } |
|
|
[ExporterHeader(DisplayName = "实际出库数量")] |
|
|
[ExporterHeader(DisplayName = "实际出库数量")] |
|
|
public string 实际出库数量 { set; get; } |
|
|
public decimal 实际出库数量 { set; get; } |
|
|
[ExporterHeader(DisplayName = "差异数量")] |
|
|
[ExporterHeader(DisplayName = "差异数量")] |
|
|
public string 差异数量 { set; get; } |
|
|
public decimal 差异数量 { set; get; } |
|
|
[ExporterHeader(DisplayName = "开票单价")] |
|
|
[ExporterHeader(DisplayName = "开票单价")] |
|
|
public string 开票单价 { set; get; } |
|
|
public decimal 开票单价 { set; get; } |
|
|
[ExporterHeader(DisplayName = "结算金额")] |
|
|
[ExporterHeader(DisplayName = "结算金额")] |
|
|
public string 结算金额 { set; get; } |
|
|
public decimal 结算金额 { set; get; } |
|
|
[ExporterHeader(DisplayName = "已出库金额")] |
|
|
[ExporterHeader(DisplayName = "已出库金额")] |
|
|
public string 已出库金额 { set; get; } |
|
|
public decimal 已出库金额 { set; get; } |
|
|
[ExporterHeader(DisplayName = "WMS待出库金额")] |
|
|
[ExporterHeader(DisplayName = "WMS待出库金额")] |
|
|
public string WMS待出库金额 { set; get; } |
|
|
public decimal WMS待出库金额 { set; get; } |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "物料组编码")] |
|
|
[ExporterHeader(DisplayName = "物料组编码")] |
|
|
public string 物料组编码 { set; get; } |
|
|
public string 物料组编码 { set; get; } |
|
|
[ExporterHeader(DisplayName = "物料组车型")] |
|
|
[ExporterHeader(DisplayName = "物料组车型")] |
|
|
public string 物料组车型 { set; get; } |
|
|
public string 物料组车型 { set; get; } |
|
|
[ExporterHeader(DisplayName = "物料描述")] |
|
|
[ExporterHeader(DisplayName = "物料描述")] |
|
|
public string 物料描述 { set; get; } |
|
|
public string 物料描述 { set; get; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "备注")] |
|
|
[ExporterHeader(DisplayName = "备注")] |
|
|
public string 备注 { set; get; } |
|
|
public string 备注 { set; get; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public class WmsOutPutSumExtend |
|
|
public class WmsOutPutSumExtend |
|
@ -103,6 +94,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" Client 客户,\n" + |
|
|
" Client 客户,\n" + |
|
|
" Type 出库类型,\n" + |
|
|
" Type 出库类型,\n" + |
|
|
" BillNum 结算单,\n" + |
|
|
" BillNum 结算单,\n" + |
|
|
|
|
|
" CODE 结算编码,\n" + |
|
|
|
|
|
" SaleCode 销售渠道,\n" + |
|
|
|
|
|
" ClientCode 客户代码,\n" + |
|
|
" MaterialCode 物料号,\n" + |
|
|
" MaterialCode 物料号,\n" + |
|
|
" MaterialDesc 物料描述,\n" + |
|
|
" MaterialDesc 物料描述,\n" + |
|
|
" BillNum 结算单号,\n" + |
|
|
" BillNum 结算单号,\n" + |
|
@ -122,6 +116,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" (\n" + |
|
|
" (\n" + |
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" temp.Client,\n" + |
|
|
" temp.Client,\n" + |
|
|
|
|
|
" temp.CODE,\n" + |
|
|
|
|
|
" temp.SaleCode,\n" + |
|
|
|
|
|
" temp.ClientCode,\n" + |
|
|
" temp.Type,\n" + |
|
|
" temp.Type,\n" + |
|
|
" temp.BillNum,\n" + |
|
|
" temp.BillNum,\n" + |
|
|
" temp.MaterialCode,\n" + |
|
|
" temp.MaterialCode,\n" + |
|
@ -137,12 +134,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '大众准时化出库' AS Type,\n" + |
|
|
" '大众准时化出库' AS Type,\n" + |
|
|
" '大众' Client,\n" + |
|
|
" '大众' Client,\n" + |
|
|
|
|
|
" 'Z11' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '10001' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" ChassisNumber CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsJitOutPutDetial \n" + |
|
|
" Set_WmsJitOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -150,17 +149,18 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" Price,\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" ChassisNumber UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '大众看板出库' AS Type,\n" + |
|
|
" '大众看板出库' AS Type,\n" + |
|
|
" '大众' Client,\n" + |
|
|
" '大众' Client,\n" + |
|
|
|
|
|
" 'Z12' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '10001' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" Kanban CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsKanbanOutPutDetial \n" + |
|
|
" Set_WmsKanbanOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -168,17 +168,18 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" Price,\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" Kanban UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '大众无看板出库' AS Type,\n" + |
|
|
" '大众无看板出库' AS Type,\n" + |
|
|
" '大众' Client,\n" + |
|
|
" '大众' Client,\n" + |
|
|
|
|
|
" 'Z12' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '10001' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" SapMaterialCode MaterialCode,\n" + |
|
|
" SapMaterialCode MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" '' CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsWithOutKanbanOutPutDetial \n" + |
|
|
" Set_WmsWithOutKanbanOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -190,12 +191,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '大众备件汇总出库' AS Type,\n" + |
|
|
" '大众备件汇总出库' AS Type,\n" + |
|
|
" '大众' Client,\n" + |
|
|
" '大众' Client,\n" + |
|
|
|
|
|
" 'Z13' CODE,\n" + |
|
|
|
|
|
" '20' SaleCode,\n" + |
|
|
|
|
|
" '10001' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" 1 IsBack,\n" + |
|
|
" 1 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" '' CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsSharePartOutPutDetial \n" + |
|
|
" Set_WmsSharePartOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -207,12 +210,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '大众备件条码出库' AS Type,\n" + |
|
|
" '大众备件条码出库' AS Type,\n" + |
|
|
" '大众' Client,\n" + |
|
|
" '大众' Client,\n" + |
|
|
|
|
|
" 'Z13' CODE,\n" + |
|
|
|
|
|
" '20' SaleCode,\n" + |
|
|
|
|
|
" '10001' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" 1 IsBack,\n" + |
|
|
" 1 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" OrderBillNum CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsSharePart90OutPutDetial \n" + |
|
|
" Set_WmsSharePart90OutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -220,17 +225,18 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" Price,\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" OrderBillNum UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '红旗看板出库' AS Type,\n" + |
|
|
" '红旗看板出库' AS Type,\n" + |
|
|
" '红旗' Client,\n" + |
|
|
" '红旗' Client,\n" + |
|
|
|
|
|
" 'Z34' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '100113' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" Kanban CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsHQHKanbanOutPutDetial \n" + |
|
|
" Set_WmsHQHKanbanOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -238,41 +244,90 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" Price,\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" Kanban UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '红旗一轿手工出库' AS Type,\n" + |
|
|
" '一轿手工出库' AS Type,\n" + |
|
|
|
|
|
" '一轿' Client,\n" + |
|
|
|
|
|
" 'Z32' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '100113' ClientCode,\n" + |
|
|
|
|
|
" BillNum,\n" + |
|
|
|
|
|
" SapMaterialCode,\n" + |
|
|
|
|
|
" SUM( Qty ) Qty,\n" + |
|
|
|
|
|
" IsBack,\n" + |
|
|
|
|
|
" Price \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
|
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
|
|
|
" WHERE\n" + |
|
|
|
|
|
" IsBack = 0 \n" + |
|
|
|
|
|
" AND VERSION = '{0}' \n" + |
|
|
|
|
|
" AND Extend = '100113' \n" + |
|
|
|
|
|
" GROUP BY\n" + |
|
|
|
|
|
" BillNum,\n" + |
|
|
|
|
|
" SapMaterialCode,\n" + |
|
|
|
|
|
" IsBack,\n" + |
|
|
|
|
|
" Price UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
|
|
|
" '一轿手工出库(备件)' AS Type,\n" + |
|
|
|
|
|
" '一轿' Client,\n" + |
|
|
|
|
|
" 'Z33' CODE,\n" + |
|
|
|
|
|
" '20' SaleCode,\n" + |
|
|
|
|
|
" '100113' ClientCode,\n" + |
|
|
|
|
|
" BillNum,\n" + |
|
|
|
|
|
" SapMaterialCode,\n" + |
|
|
|
|
|
" SUM( Qty ) Qty,\n" + |
|
|
|
|
|
" IsBack,\n" + |
|
|
|
|
|
" Price \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
|
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
|
|
|
" WHERE\n" + |
|
|
|
|
|
" IsBack = 1 \n" + |
|
|
|
|
|
" AND VERSION = '{0}' \n" + |
|
|
|
|
|
" AND Extend = '100113' \n" + |
|
|
|
|
|
" GROUP BY\n" + |
|
|
|
|
|
" BillNum,\n" + |
|
|
|
|
|
" SapMaterialCode,\n" + |
|
|
|
|
|
" IsBack,\n" + |
|
|
|
|
|
" Price UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
|
|
|
" '红旗手工出库' AS Type,\n" + |
|
|
" '红旗' Client,\n" + |
|
|
" '红旗' Client,\n" + |
|
|
|
|
|
" 'Z34' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '100053' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" IsBack,\n" + |
|
|
" IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" '' CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
|
" IsBack = 0 \n" + |
|
|
" IsBack = 0 \n" + |
|
|
" AND VERSION = '{0}' \n" + |
|
|
" AND VERSION = '{0}' \n" + |
|
|
|
|
|
" AND Extend = '100053' \n" + |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" IsBack,\n" + |
|
|
" IsBack,\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '红旗一轿手工出库(备件)' AS Type,\n" + |
|
|
" '红旗手工出库(备件)' AS Type,\n" + |
|
|
" '红旗' Client,\n" + |
|
|
" '红旗' Client,\n" + |
|
|
|
|
|
" 'Z35' CODE,\n" + |
|
|
|
|
|
" '20' SaleCode,\n" + |
|
|
|
|
|
" '100053' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" IsBack,\n" + |
|
|
" IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" '' CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
|
" IsBack = 1 \n" + |
|
|
" IsBack = 1 \n" + |
|
|
" AND VERSION = '{0}' \n" + |
|
|
" AND VERSION = '{0}' \n" + |
|
|
|
|
|
" AND Extend = '100053' \n" + |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SapMaterialCode,\n" + |
|
@ -287,12 +342,15 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" (\n" + |
|
|
" (\n" + |
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" temp.Client,\n" + |
|
|
" temp.Client,\n" + |
|
|
|
|
|
" temp.CODE,\n" + |
|
|
|
|
|
" temp.SaleCode,\n" + |
|
|
|
|
|
" temp.ClientCode,\n" + |
|
|
" temp.Type,\n" + |
|
|
" temp.Type,\n" + |
|
|
" temp.BillNum,\n" + |
|
|
" temp.BillNum,\n" + |
|
|
" temp.MaterialCode,\n" + |
|
|
" temp.MaterialCode,\n" + |
|
|
" temp2.MaterialDesc,\n" + |
|
|
" temp2.MaterialDesc,\n" + |
|
|
" temp.Qty,\n" + |
|
|
" temp.Qty,\n" + |
|
|
" 0 STATE,\n" + |
|
|
" 2 STATE,\n" + |
|
|
" EstimateTypeDesc MaterialGroup,\n" + |
|
|
" EstimateTypeDesc MaterialGroup,\n" + |
|
|
" EstimateType,\n" + |
|
|
" EstimateType,\n" + |
|
|
" IsBack,\n" + |
|
|
" IsBack,\n" + |
|
@ -302,12 +360,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '大众准时化出库' AS Type,\n" + |
|
|
" '大众准时化出库' AS Type,\n" + |
|
|
" '大众' Client,\n" + |
|
|
" '大众' Client,\n" + |
|
|
|
|
|
" 'Z11' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '10001' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" ChassisNumber CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsJitOutPutDetial \n" + |
|
|
" Set_WmsJitOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -316,17 +376,18 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" Price,\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" ChassisNumber UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '大众看板出库' AS Type,\n" + |
|
|
" '大众看板出库' AS Type,\n" + |
|
|
" '大众' Client,\n" + |
|
|
" '大众' Client,\n" + |
|
|
|
|
|
" 'Z12' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '10001' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" Kanban CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsKanbanOutPutDetial \n" + |
|
|
" Set_WmsKanbanOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -335,17 +396,18 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" Price,\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" Kanban UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '大众无看板出库' AS Type,\n" + |
|
|
" '大众无看板出库' AS Type,\n" + |
|
|
" '大众' Client,\n" + |
|
|
" '大众' Client,\n" + |
|
|
|
|
|
" 'Z12' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '10001' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" SapMaterialCode MaterialCode,\n" + |
|
|
" SapMaterialCode MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( RealityNumber ) Qty,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" '' CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsWithOutKanbanOutPutDetial \n" + |
|
|
" Set_WmsWithOutKanbanOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -358,12 +420,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '大众备件汇总出库' AS Type,\n" + |
|
|
" '大众备件汇总出库' AS Type,\n" + |
|
|
" '大众' Client,\n" + |
|
|
" '大众' Client,\n" + |
|
|
|
|
|
" 'Z13' CODE,\n" + |
|
|
|
|
|
" '20' SaleCode,\n" + |
|
|
|
|
|
" '10001' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( RealityNumber ) Qty,\n" + |
|
|
" 1 IsBack,\n" + |
|
|
" 1 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" '' CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsSharePartOutPutDetial \n" + |
|
|
" Set_WmsSharePartOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -376,12 +440,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '大众备件条码出库' AS Type,\n" + |
|
|
" '大众备件条码出库' AS Type,\n" + |
|
|
" '大众' Client,\n" + |
|
|
" '大众' Client,\n" + |
|
|
|
|
|
" 'Z13' CODE,\n" + |
|
|
|
|
|
" '20' SaleCode,\n" + |
|
|
|
|
|
" '10001' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" 1 IsBack,\n" + |
|
|
" 1 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" OrderBillNum CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsSharePart90OutPutDetial \n" + |
|
|
" Set_WmsSharePart90OutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -390,17 +456,18 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" Price,\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" OrderBillNum UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '红旗看板出库' AS Type,\n" + |
|
|
" '红旗看板出库' AS Type,\n" + |
|
|
" '红旗' Client,\n" + |
|
|
" '红旗' Client,\n" + |
|
|
|
|
|
" 'Z34' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '100113' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" 0 IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" Kanban CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsHQHKanbanOutPutDetial \n" + |
|
|
" Set_WmsHQHKanbanOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
@ -409,43 +476,94 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" MaterialCode,\n" + |
|
|
" Price,\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" Kanban UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '红旗一轿手工出库' AS Type,\n" + |
|
|
" '一轿手工出库' AS Type,\n" + |
|
|
" '红旗' Client,\n" + |
|
|
" '一轿' Client,\n" + |
|
|
|
|
|
" 'Z32' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '100113' ClientCode,\n" + |
|
|
|
|
|
" BillNum,\n" + |
|
|
|
|
|
" SapMaterialCode,\n" + |
|
|
|
|
|
" SUM( RealityNumber ) Qty,\n" + |
|
|
|
|
|
" IsBack,\n" + |
|
|
|
|
|
" Price \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
|
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
|
|
|
" WHERE\n" + |
|
|
|
|
|
" IsBack = 0 \n" + |
|
|
|
|
|
" AND VERSION = '{0}' \n" + |
|
|
|
|
|
" AND State = 2 \n" + |
|
|
|
|
|
" AND Extend = '100113' \n" + |
|
|
|
|
|
" GROUP BY\n" + |
|
|
|
|
|
" BillNum,\n" + |
|
|
|
|
|
" SapMaterialCode,\n" + |
|
|
|
|
|
" IsBack,\n" + |
|
|
|
|
|
" Price UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
|
|
|
" '一轿手工出库(备件)' AS Type,\n" + |
|
|
|
|
|
" '一轿' Client,\n" + |
|
|
|
|
|
" 'Z33' CODE,\n" + |
|
|
|
|
|
" '20' SaleCode,\n" + |
|
|
|
|
|
" '100113' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" IsBack,\n" + |
|
|
" IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" '' CNumber \n" + |
|
|
" FROM\n" + |
|
|
|
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
|
|
|
" WHERE\n" + |
|
|
|
|
|
" IsBack = 1 \n" + |
|
|
|
|
|
" AND VERSION = '{0}' \n" + |
|
|
|
|
|
" AND State = 2 \n" + |
|
|
|
|
|
" AND Extend = '100113' \n" + |
|
|
|
|
|
" GROUP BY\n" + |
|
|
|
|
|
" BillNum,\n" + |
|
|
|
|
|
" SapMaterialCode,\n" + |
|
|
|
|
|
" IsBack,\n" + |
|
|
|
|
|
" Price UNION ALL\n" + |
|
|
|
|
|
" SELECT\n" + |
|
|
|
|
|
" '红旗手工出库' AS Type,\n" + |
|
|
|
|
|
" '红旗' Client,\n" + |
|
|
|
|
|
" 'Z34' CODE,\n" + |
|
|
|
|
|
" '10' SaleCode,\n" + |
|
|
|
|
|
" '100053' ClientCode,\n" + |
|
|
|
|
|
" BillNum,\n" + |
|
|
|
|
|
" SapMaterialCode,\n" + |
|
|
|
|
|
" SUM( RealityNumber ) Qty,\n" + |
|
|
|
|
|
" IsBack,\n" + |
|
|
|
|
|
" Price \n" + |
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
|
" IsBack = 0 \n" + |
|
|
" IsBack = 0 \n" + |
|
|
" AND VERSION = '{0}' \n" + |
|
|
" AND VERSION = '{0}' \n" + |
|
|
" AND State = 2 \n" + |
|
|
" AND State = 2 \n" + |
|
|
|
|
|
" AND Extend = '100053' \n" + |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" IsBack,\n" + |
|
|
" IsBack,\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" Price UNION ALL\n" + |
|
|
" SELECT\n" + |
|
|
" SELECT\n" + |
|
|
" '红旗一轿手工出库(备件)' AS Type,\n" + |
|
|
" '红旗手工出库(备件)' AS Type,\n" + |
|
|
" '红旗' Client,\n" + |
|
|
" '红旗' Client,\n" + |
|
|
|
|
|
" 'Z35' CODE,\n" + |
|
|
|
|
|
" '20' SaleCode,\n" + |
|
|
|
|
|
" '100053' ClientCode,\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SUM( Qty ) Qty,\n" + |
|
|
" SUM( RealityNumber ) Qty,\n" + |
|
|
" IsBack,\n" + |
|
|
" IsBack,\n" + |
|
|
" Price,\n" + |
|
|
" Price \n" + |
|
|
" '' CNumber \n" + |
|
|
|
|
|
" FROM\n" + |
|
|
" FROM\n" + |
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
" Set_WmsHQWithOutKanbanOutPutDetial \n" + |
|
|
" WHERE\n" + |
|
|
" WHERE\n" + |
|
|
" IsBack = 1 \n" + |
|
|
" IsBack = 1 \n" + |
|
|
" AND VERSION = '{0}' \n" + |
|
|
" AND VERSION = '{0}' \n" + |
|
|
" AND State = 2 \n" + |
|
|
" AND State = 2 \n" + |
|
|
|
|
|
" AND Extend = '100053' \n" + |
|
|
" GROUP BY\n" + |
|
|
" GROUP BY\n" + |
|
|
" BillNum,\n" + |
|
|
" BillNum,\n" + |
|
|
" SapMaterialCode,\n" + |
|
|
" SapMaterialCode,\n" + |
|
@ -456,7 +574,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
" ) t2 \n" + |
|
|
" ) t2 \n" + |
|
|
" ) TEMP PIVOT ( SUM( QTY ) FOR STATE IN ([ 0 ],[ 1 ],[ 2 ],[ 3 ]) ) A \n" + |
|
|
" ) TEMP PIVOT ( SUM( QTY ) FOR STATE IN ([ 0 ],[ 1 ],[ 2 ],[ 3 ]) ) A \n" + |
|
|
"ORDER BY\n" + |
|
|
"ORDER BY\n" + |
|
|
" 客户,出库类型,结算单"; |
|
|
" 客户,出库类型,结算单;"; |
|
|
|
|
|
|
|
|
_sql = string.Format(_sql, version); |
|
|
_sql = string.Format(_sql, version); |
|
|
var _query = DbConnection.Query<WmsOutputSum>(_sql, null, null, true, 1200, null); |
|
|
var _query = DbConnection.Query<WmsOutputSum>(_sql, null, null, true, 1200, null); |
|
|