@ -123,10 +123,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
/// <param name="end"></param>
/// <param name="end"></param>
/// <param name="materialGroup"></param>
/// <param name="materialGroup"></param>
/// <returns></returns>
/// <returns></returns>
public virtual List < HQCarSettledDetailDiff > GetHQCarSettledDetailDiffSumReportList ( string version , string materialCode , string begin , string end , string materialGroup )
public virtual List < HQSum CarSettledDetailDiff > GetHQCarSettledDetailDiffSumReportList ( string version , string materialCode , string begin , string end , string materialGroup )
{
{
List < HQCarSettledDetailDiff > _l ist = new List < HQCarSettledDetailDiff > ( ) ;
List < HQSum CarSettledDetailDiff > _l ist = new List < HQSum CarSettledDetailDiff > ( ) ;
string condition = " " ;
string condition = " " ;
@ -153,37 +153,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" SELECT\n" +
" SELECT\n" +
" ISNULL( A.Qty, 0 ) 结算数量,\n" +
" ISNULL( A.Qty, 0 ) 结算数量,\n" +
" A.MaterialCode 结算物料号,\n" +
" A.MaterialCode 结算物料号,\n" +
" A.StorageLocation 收货仓库,\n" +
" A.StorageLocationDesc 收货仓库描述,\n" +
" C.EstimateTypeDesc 物料组,\n" +
" C.EstimateTypeDesc 物料组,\n" +
" C.MaterialCode Sap编码,\n" +
" C.MaterialCode Sap编码,\n" +
" C.MaterialDesc 物料描述,\n" +
" C.MaterialDesc 物料描述,\n" +
" a.[AcceptanceNo] AS 结算验收单号,\n" +
" CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" +
" 0 寄销库数量 \n" +
" 0 寄销库数量 \n" +
" FROM\n" +
" FROM\n" +
" (\n" +
" ( SELECT SUM ( Qty ) Qty, MaterialCode, Version FROM Set_BT_Car_Platform WHERE version = '{0}' AND StorageLocationDesc NOT LIKE '%备品%' GROUP BY MaterialCode, Version ) A\n" +
" SELECT SUM\n" +
" ( Qty ) Qty,\n" +
" MaterialCode,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Version,\n" +
" AcceptanceNo,\n" +
" AcceptanceDate \n" +
" FROM\n" +
" Set_BT_Car_Platform \n" +
" WHERE\n" +
" version = '{0}' \n" +
" AND StorageLocationDesc NOT LIKE '%备品%' \n" +
" GROUP BY\n" +
" MaterialCode,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Version,\n" +
" AcceptanceNo,\n" +
" AcceptanceDate \n" +
" ) A\n" +
" LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" ) temp1\n" +
" ) temp1\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) AS Expr1 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 ) AS Expr1 FROM Set_PriceList ) ) ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode\n" +
@ -207,7 +182,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//var _sql = string.Format(str, version, condition);
//var _sql = string.Format(str, version, condition);
var _ sql = string . Format ( str , version ) ;
var _ sql = string . Format ( str , version ) ;
var _ query = DbConnection . Query < HQCarSettledDetailDiff > ( _ sql , null , null , true , 1 2 0 0 , null ) ;
var _ query = DbConnection . Query < HQSum CarSettledDetailDiff > ( _ sql , null , null , true , 1 2 0 0 , null ) ;
_l ist = _ query . ToList ( ) ;
_l ist = _ query . ToList ( ) ;
return _l ist ;
return _l ist ;
@ -289,10 +264,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
/// <param name="end"></param>
/// <param name="end"></param>
/// <param name="materialGroup"></param>
/// <param name="materialGroup"></param>
/// <returns></returns>
/// <returns></returns>
public virtual List < HQCarSettledDetailDiff > GetBJHQCarSettledDetailDiffSumReportList ( string version , string materialCode , string begin , string end , string materialGroup )
public virtual List < HQSum CarSettledDetailDiff > GetBJHQCarSettledDetailDiffSumReportList ( string version , string materialCode , string begin , string end , string materialGroup )
{
{
List < HQCarSettledDetailDiff > _l ist = new List < HQCarSettledDetailDiff > ( ) ;
List < HQSum CarSettledDetailDiff > _l ist = new List < HQSum CarSettledDetailDiff > ( ) ;
string condition = " " ;
string condition = " " ;
@ -319,37 +294,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" SELECT\n" +
" SELECT\n" +
" ISNULL( A.Qty, 0 ) 结算数量,\n" +
" ISNULL( A.Qty, 0 ) 结算数量,\n" +
" A.MaterialCode 结算物料号,\n" +
" A.MaterialCode 结算物料号,\n" +
" A.StorageLocation 收货仓库,\n" +
" A.StorageLocationDesc 收货仓库描述,\n" +
" C.EstimateTypeDesc 物料组,\n" +
" C.EstimateTypeDesc 物料组,\n" +
" C.MaterialCode Sap编码,\n" +
" C.MaterialCode Sap编码,\n" +
" C.MaterialDesc 物料描述,\n" +
" C.MaterialDesc 物料描述,\n" +
" a.[AcceptanceNo] AS 结算验收单号,\n" +
" CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" +
" 0 寄销库数量 \n" +
" 0 寄销库数量 \n" +
" FROM\n" +
" FROM\n" +
" (\n" +
" ( SELECT SUM ( Qty ) Qty, MaterialCode, Version FROM Set_BT_Car_Platform WHERE version = '{0}' AND StorageLocationDesc LIKE '%备品%' GROUP BY MaterialCode, Version ) A\n" +
" SELECT SUM\n" +
" ( Qty ) Qty,\n" +
" MaterialCode,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Version,\n" +
" AcceptanceNo,\n" +
" AcceptanceDate \n" +
" FROM\n" +
" Set_BT_Car_Platform \n" +
" WHERE\n" +
" version = '{0}' \n" +
" AND StorageLocationDesc LIKE '%备品%' \n" +
" GROUP BY\n" +
" MaterialCode,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Version,\n" +
" AcceptanceNo,\n" +
" AcceptanceDate \n" +
" ) A\n" +
" LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" ) temp1\n" +
" ) temp1\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) AS Expr1 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 ) AS Expr1 FROM Set_PriceList ) ) ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode\n" +
@ -373,7 +323,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//var _sql = string.Format(str, version, condition);
//var _sql = string.Format(str, version, condition);
var _ sql = string . Format ( str , version ) ;
var _ sql = string . Format ( str , version ) ;
var _ query = DbConnection . Query < HQCarSettledDetailDiff > ( _ sql , null , null , true , 1 2 0 0 , null ) ;
var _ query = DbConnection . Query < HQSum CarSettledDetailDiff > ( _ sql , null , null , true , 1 2 0 0 , null ) ;
_l ist = _ query . ToList ( ) ;
_l ist = _ query . ToList ( ) ;
return _l ist ;
return _l ist ;
@ -424,24 +374,24 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[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 = "Sap编码")]
[ExporterHeader(DisplayName = "Sap编码")]
public string SAP编码 { set ; get ; }
public string SAP编码 { set ; get ; }
[ExporterHeader(DisplayName = "结算物料号")]
[ExporterHeader(DisplayName = "结算物料号")]
public string 结 算 物 料 号 { set ; get ; }
public string 结 算 物 料 号 { set ; get ; }
[ExporterHeader(DisplayName = "物料组")]
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 = "定价")]
[ExporterHeader(DisplayName = "定价")]
public decimal 定 价 { set ; get ; }
public decimal 定 价 { set ; get ; }
@ -463,38 +413,63 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
}
//public class HQCarSettledDetailDiff
public class HQSumCarSettledDetailDiff
//{
{
// [ExporterHeader(DisplayName = "收货仓库")]
public HQSumCarSettledDetailDiff ( )
// public string 收货仓库 { set; get; }
{
// [ExporterHeader(DisplayName = "收货仓库描述")]
}
// public string 收货仓库描述 { set; get; }
// [ExporterHeader(DisplayName = "结算物料号")]
// public string 结算物料号 { set; get; }
// [ExporterHeader(DisplayName = "结算物料描述")]
// public string 物料描述 { set; get; }
// [ExporterHeader(DisplayName = "结算数量")]
// public decimal 结算数量 { set; get; }
// [ExporterHeader(DisplayName = "结算单价")]
// public decimal 结算单价 { set; get; }
// [ExporterHeader(DisplayName = "结算金额")]
// public decimal 结算金额 { set; get; }
// [ExporterHeader(DisplayName = "Sap编码")]
// public string Sap编码 { set; get; }
// [ExporterHeader(DisplayName = "物料组(车型)")]
// public string 物料组 { set; get; }
// [ExporterHeader(DisplayName = "寄销库数量")]
public HQSumCarSettledDetailDiff ( string sapMaterialCode , string materialCode , string materialDesc , decimal price ,
// public decimal 寄销库数量 { set; get; }
decimal selprice , decimal diffprice , decimal sumprice , decimal settleprice , decimal qty ,
decimal sockQty , string metarialGroup )
{
SAP编码 = sapMaterialCode ;
物 料 描 述 = materialDesc ;
结 算 物 料 号 = materialCode ;
寄 销 库 数 量 = sockQty ;
结 算 单 价 = price ;
定 价 = selprice ;
价 格 差 异 = diffprice ;
差 异 总 金 额 = sumprice ;
结 算 数 量 = qty ;
结 算 金 额 = settleprice ;
物 料 组 = metarialGroup ;
}
[ExporterHeader(DisplayName = "物料组")]
public string 物 料 组 { set ; get ; }
// [ExporterHeader(DisplayName = "是否备件")]
[ExporterHeader(DisplayName = "Sap编码")]
// public string 是否备件 { set; get; }
public string SAP编码 { set ; get ; }
[ExporterHeader(DisplayName = "结算物料号")]
public string 结 算 物 料 号 { set ; get ; }
[ExporterHeader(DisplayName = "物料描述")]
public string 物 料 描 述 { set ; get ; }
[ExporterHeader(DisplayName = "定价")]
public decimal 定 价 { set ; get ; }
//}
[ExporterHeader(DisplayName = "结算单价")]
public decimal 结 算 单 价 { set ; get ; }
[ExporterHeader(DisplayName = "结算数量")]
public decimal 结 算 数 量 { set ; get ; }
[ExporterHeader(DisplayName = "结算金额")]
public decimal 结 算 金 额 { set ; get ; }
[ExporterHeader(DisplayName = "价格差异")]
public decimal 价 格 差 异 { set ; get ; }
[ExporterHeader(DisplayName = "差异总金额")]
public decimal 差 异 总 金 额 { set ; get ; }
[ExporterHeader(DisplayName = "寄销库数量")]
public decimal 寄 销 库 数 量 { set ; get ; }
}
public class HQCarSettleQtyDiff
public class HQCarSettleQtyDiff
{
{
public string 客 户 物 料 号 { set ; get ; }
public string 客 户 物 料 号 { set ; get ; }