Administrator 3 years ago
parent
commit
1c0c374edf
  1. 7
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
  2. 11
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs
  3. 6
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
  4. 131
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs

7
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs

@ -472,9 +472,10 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
WmsSharePartOutPutDetial _detail = new WmsSharePartOutPutDetial(
GuidGenerator.Create(),
itm.WmsBillNum,
itm.OrderBillNum,
//itm.WmsBillNum,
//itm.OrderBillNum,
string.Empty,
string.Empty,
itm.MaterialCode,
itm.MaterialDesc,
itm.MaterialGroup,

11
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs

@ -151,6 +151,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
itm.Remark,
itm.Qty,
tm1 == null ? 0 : tm1.Qty,
itm.OutPutQty,
itm.IsSparePart,
itm.Price,
itm.Amt
@ -207,7 +208,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
var _lsAry = _list.Select(p => new
WmsHQCarOutPutDetial(
GuidGenerator.Create(),
"",
string.Empty,
string.Empty,
p.MaterialCode,
p.MaterialDesc,
@ -224,7 +225,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
string.Empty,
p.Qty,
p.StockQty
,p.IsSparePart
,p.Qty
, p.IsSparePart
,p.Price
,p.Amt
));
@ -392,8 +394,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{
WmsHQCarOutPutDetial _detail = new WmsHQCarOutPutDetial(
GuidGenerator.Create(),
itm.WmsBillNum,
itm.OrderBillNum,
string.Empty,
string.Empty,
itm.MaterialCode,
itm.MaterialDesc,
itm.MaterialGroup,
@ -409,6 +411,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
, string.Empty
, itm.Qty
, 0
,itm.Qty
,itm.IsSparePart
,itm.Price
,itm.Amt

6
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs

@ -802,7 +802,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}
public WmsHQCarOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, string materialCode,
string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2,
string extend3, string parentMaterialCode, string billNum, Guid taskId, string remark, decimal qty, decimal stockQty,string issparepart,decimal price,decimal amt)
string extend3, string parentMaterialCode, string billNum, Guid taskId, string remark, decimal qty, decimal stockQty, decimal outputQty, string issparepart,decimal price,decimal amt)
{
Id = id;
WmsBillNum = wmsBillNum;
@ -822,6 +822,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
Remark = remark;
Qty = qty;
StockQty = stockQty;
OutPutQty = outputQty;
IsSparePart = issparepart;
Price = price;
Amt = amt;
@ -838,6 +839,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[ImporterHeader(Name = "寄销库数量", IsIgnore = true)]
public decimal StockQty { set; get; }
[ImporterHeader(Name = "出库数量", IsIgnore = true)]
public decimal OutPutQty { set; get; }
[ImporterHeader(Name = "组件组物料", IsIgnore = true)]
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "交货单号", IsIgnore = true)]

131
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs

@ -67,20 +67,38 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
string str = "SELECT\n" +
" temp1.*,\n" +
" temp1.交货日期,\n" +
" temp1.手工或自动,\n" +
" '' 订单日期,\n" +
" temp1.[收货仓库],\n" +
" temp1.[收货仓库描述],\n" +
" temp1.[订货看板号],\n" +
" temp1.[订货零件号],\n" +
" temp1.[SAP编码],\n" +
" temp1.[发货零件号],\n" +
" temp1.[物料组],\n" +
" temp1.[物料描述],\n" +
" temp1.[发货数量],\n" +
" ISNULL( TEMP2.Price, 0 ) AS 发货定价,\n" +
" temp1.[发货总金额],\n" +
" temp1.[发货状态],\n" +
" temp1.[结算验收单],\n" +
" temp1.[结算零件号],\n" +
" temp1.[结算数量],\n" +
" temp1.[结算单价],\n" +
" temp1.[结算金额],\n" +
" temp1.[发货数量] - temp1.[结算数量] AS 数量差异,\n" +
" temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异 ,\n" +
" ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 -- isnull( temp2.Price, 0 ) 销售单价,\n" +
"-- ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异\n" +
" \n" +
" ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" +
"FROM\n" +
" (\n" +
" SELECT NULL AS\n" +
" 交货日期,\n" +
" '手工看板' AS 手工或自动,\n" +
" '' AS 手工或自动,\n" +
" '' 交货单号,\n" +
" A.StorageLocation 收货仓库,\n" +
" A.StorageLocationDesc 收货仓库描述,\n" +
" A.AcceptanceNo 订货看板号,\n" +
" '' 收货仓库,\n" +
" '' 收货仓库描述,\n" +
" '' 订货看板号,\n" +
" '' 订货零件号,\n" +
" C.MaterialCode AS SAP编码,\n" +
" '' 发货零件号,\n" +
@ -91,37 +109,74 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" '' 发货状态,\n" +
" '' 结算验收单,\n" +
" '' 结算零件号,\n" +
" isnull(A.Qty,0) AS 结算数量,\n" +
" isnull(A.Price,0) AS 结算单价,\n" +
" isnull(A.Amt,0) AS 结算金额,\n" +
"--A.MaterialCode 物料号,\n" +
" isnull( A.Qty, 0 ) AS 结算数量,\n" +
" isnull( A.Price, 0 ) AS 结算单价,\n" +
" isnull( A.Price, 0 ) * isnull( A.Qty, 0 ) AS 结算金额,\n" +
" 0 寄销库数量 \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
" Price,\n" +
" SUM ( Qty ) Qty,\n" +
" MaterialCode,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" AcceptanceNo,\n" +
" Amt \n" +
" FROM\n" +
" Set_BT_Car_Platform \n" +
" WHERE\n" +
" version = '{0}' \n" +
" GROUP BY\n" +
" MaterialCode,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" price,\n" +
" AcceptanceNo,\n" +
" Amt \n" +
" ) A\n" +
" ( SELECT Price, SUM ( Qty ) Qty, MaterialCode, Version FROM Set_BT_Car_Platform GROUP BY MaterialCode, price, Version ) A\n" +
" INNER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" WHERE\n" +
" A.Version= '{0}' \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";
;
//string str = "SELECT\n" +
// " temp1.*,\n" +
// " temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异 ,\n" +
// " ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 -- isnull( temp2.Price, 0 ) 销售单价,\n" +
// "-- ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异\n" +
// " \n" +
// "FROM\n" +
// " (\n" +
// " SELECT NULL AS\n" +
// " 交货日期,\n" +
// " '手工看板' AS 手工或自动,\n" +
// " '' 交货单号,\n" +
// " A.StorageLocation 收货仓库,\n" +
// " A.StorageLocationDesc 收货仓库描述,\n" +
// " A.AcceptanceNo 订货看板号,\n" +
// " '' 订货零件号,\n" +
// " C.MaterialCode AS SAP编码,\n" +
// " '' 发货零件号,\n" +
// " C.EstimateTypeDesc 物料组,\n" +
// " C.MaterialDesc 物料描述,\n" +
// " 0 AS 发货数量,\n" +
// " 0 发货总金额,\n" +
// " '' 发货状态,\n" +
// " '' 结算验收单,\n" +
// " '' 结算零件号,\n" +
// " isnull(A.Qty,0) AS 结算数量,\n" +
// " isnull(A.Price,0) AS 结算单价,\n" +
// " isnull(A.Amt,0) AS 结算金额,\n" +
// "--A.MaterialCode 物料号,\n" +
// " 0 寄销库数量 \n" +
// " FROM\n" +
// " (\n" +
// " SELECT\n" +
// " Price,\n" +
// " SUM ( Qty ) Qty,\n" +
// " MaterialCode,\n" +
// " StorageLocation,\n" +
// " StorageLocationDesc,\n" +
// " AcceptanceNo,\n" +
// " Amt \n" +
// " FROM\n" +
// " Set_BT_Car_Platform \n" +
// " WHERE\n" +
// " version = '{0}' \n" +
// " GROUP BY\n" +
// " MaterialCode,\n" +
// " StorageLocation,\n" +
// " StorageLocationDesc,\n" +
// " price,\n" +
// " AcceptanceNo,\n" +
// " Amt \n" +
// " ) A\n" +
// " INNER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \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";
var _sql = string.Format(str, version, condition);
var _query = DbConnection.Query<HQCarSettledDetailDiff>(_sql, null, null, true, 1200, null);
@ -226,6 +281,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public string { set; get; }
[ExporterHeader(DisplayName = "发货数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "发货定价")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "发货总金额")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "发货状态")]
@ -240,12 +297,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
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; }
}

Loading…
Cancel
Save