Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
c642cba072
  1. 6
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettle/UnSettleDetailReport.cs
  2. 4
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpSumOutputDapperRepository.cs
  3. 10
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs
  4. 9
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs
  5. 26
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs
  6. 93
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs

6
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettle/UnSettleDetailReport.cs

@ -50,8 +50,13 @@ namespace Win.Sfs.SettleAccount.Entities.UnSettle
public decimal UnSettleQty { set; get; } public decimal UnSettleQty { set; get; }
[ExporterHeader(DisplayName = "差异金额")] [ExporterHeader(DisplayName = "差异金额")]
public decimal DiffAMT { set; get; } public decimal DiffAMT { set; get; }
[ExporterHeader(DisplayName = "退货数量")]
public decimal ReturnQty { set; get; }
[ExporterHeader(DisplayName = "差异数量")] [ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; } public decimal DiffQty { set; get; }
[ExporterHeader(DisplayName = "漏结标识 ")] [ExporterHeader(DisplayName = "漏结标识 ")]
public string Flag { set; get; } public string Flag { set; get; }
[ExporterHeader(DisplayName = "漏结期间 ")] [ExporterHeader(DisplayName = "漏结期间 ")]
@ -59,5 +64,6 @@ namespace Win.Sfs.SettleAccount.Entities.UnSettle
[ExporterHeader(DisplayName = "说明 ")] [ExporterHeader(DisplayName = "说明 ")]
public string Remark { set; get; } public string Remark { set; get; }
} }
} }

4
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpSumOutputDapperRepository.cs

@ -226,7 +226,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
taskid, taskid,
itm., itm.,
itm., itm.,
"ZOR1", "ZKE1",
"1001", "1001",
"00", "00",
itm., itm.,
@ -235,7 +235,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
itm., itm.,
itm., itm.,
"1000", "1000",
itm., string.Empty,
itm., itm.,
itm., itm.,

10
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs

@ -852,9 +852,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.结算金额,\n" + " temp1.结算金额,\n" +
" isnull( TEMP2.Price, 0 ) AS 发货定价,\n" + " isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
" isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" + " isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" +
" 0 AS 数量差异,\n" + " isnull( tt.Qty, 0 ) 退货数量,\n" +
" temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" + "isnull( temp1.发货数量, 0 )-isnull( tt.Qty, 0 ) AS 数量差异,\n" +
" ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * temp1.发货数量 AS 差异总金额 \n" + "temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
"(temp1.结算单价 - ISNULL( TEMP2.Price, 0 )) * (isnull( temp1.发货数量, 0 )-isnull( tt.Qty, 0 )) AS 差异总金额 \n" +
"FROM\n" + "FROM\n" +
" (\n" + " (\n" +
" SELECT\n" + " SELECT\n" +
@ -884,7 +885,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" b.HQHKanBan IS NULL \n" + " b.HQHKanBan IS NULL \n" +
" 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"; " 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 set_backQty tt on temp1.Sap编码 = tt.MaterialCode and temp1.订货看板编号 = tt.Code ";
var _sql = string.Format(str, condition); var _sql = string.Format(str, condition);
var _query = DbConnection.Query<HQHUnSettledDetailDiff>(_sql, null, null, true, 1200, null); var _query = DbConnection.Query<HQHUnSettledDetailDiff>(_sql, null, null, true, 1200, null);

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

@ -79,8 +79,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public decimal SettleQty { set; get; } public decimal SettleQty { set; get; }
[ExporterHeader(DisplayName = "发货数量")] [ExporterHeader(DisplayName = "发货数量")]
public decimal WMSDeliveryQty { set; get; } public decimal WMSDeliveryQty { set; get; }
[ExporterHeader(DisplayName = "退货数量")]
public decimal BackQty { set; get; }
[ExporterHeader(DisplayName = "量差")] [ExporterHeader(DisplayName = "量差")]
public decimal DiffQty { set; get; } public decimal DiffQty { set; get; }
[ExporterHeader(DisplayName = "单价")] [ExporterHeader(DisplayName = "单价")]
public decimal Price { set; get; } public decimal Price { set; get; }
[ExporterHeader(DisplayName = "差异金额")] [ExporterHeader(DisplayName = "差异金额")]
@ -153,12 +157,15 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" C.EstimateTypeDesc MaterialGroup,\n" + " C.EstimateTypeDesc MaterialGroup,\n" +
" ISNULL( B.Qty, 0 ) SettleQty,\n" + " ISNULL( B.Qty, 0 ) SettleQty,\n" +
" ISNULL( a.WMSDeliveryQty, 0 ) WMSDeliveryQty,\n" + " ISNULL( a.WMSDeliveryQty, 0 ) WMSDeliveryQty,\n" +
" ( ISNULL( a.WMSDeliveryQty, 0 ) - ISNULL( b.Qty, 0 ) ) AS DiffQty \n" + " isnull(tt.qty, 0) BackQty, \n"+
" ( ISNULL( a.WMSDeliveryQty, 0 ) - ISNULL( b.Qty, 0 )-isnull(tt.qty, 0) ) AS DiffQty \n" +
" FROM\n" + " FROM\n" +
" Set_WMSKanBanSettle A\n" + " Set_WMSKanBanSettle A\n" +
" LEFT JOIN ( SELECT * FROM Set_KanBanSettle ) B ON A.Kanban = B.Kanban \n" + " LEFT JOIN ( SELECT * FROM Set_KanBanSettle ) B ON A.Kanban = B.Kanban \n" +
" AND A.MaterialCode = B.MaterialCode\n" + " AND A.MaterialCode = B.MaterialCode\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" +
" left join set_backQty as tt on a.Kanban = tt.Code and a.MaterialCode = b.MaterialCode \n"+
" WHERE\n" + " WHERE\n" +
" B.Kanban IS NULL \n" + " B.Kanban IS NULL \n" +
" AND B.MaterialCode IS NULL {0}\n" + " AND B.MaterialCode IS NULL {0}\n" +

26
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs

@ -58,7 +58,27 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//} //}
var sqlString = var sqlString =
" SELECT\n" + " SELECT\n" +
" temp1.*,\n" +
" temp1.WMSState,\n" +
" temp1.WMSBillNum ,\n" +
" temp1.UnSettleVersion ,\n" +
" temp1.CP5Time ,\n" +
" temp1.MaterialCode ,\n" +
" temp1.ChassisNumber ,\n" +
" temp1.KENNCode ,\n" +
" temp1.chassisNumber2 ,\n" +
" temp1.KENNCode2 ,\n" +
" temp1.QTY ,\n" +
" temp1.ParentSapMaterialCode ,\n" +
" temp1.FLAG ,\n" +
" temp1.UnSettleQty ,\n" +
" temp1.MaterialGroup ,\n" +
" temp1.MaterialDesc ,\n" +
" temp1.ParentMaterialDesc ,\n" +
" temp1.SapMaterialCode ,\n" +
" temp1.DiffQty-isnull(tt.Qty ,0) DiffQty,\n" +
" isnull(tt.Qty ,0) ReturnQty,\n" +
" temp2.Price,\n" + " temp2.Price,\n" +
" ISNULL( temp1.QTY, 0 )* ISNULL( temp2.Price, 0 ) AMT, \n" + " ISNULL( temp1.QTY, 0 )* ISNULL( temp2.Price, 0 ) AMT, \n" +
" Round(ISNULL( temp1.DiffQty, 0 )* ISNULL( temp2.Price, 0 ),2) DiffAMT \n" + " Round(ISNULL( temp1.DiffQty, 0 )* ISNULL( temp2.Price, 0 ),2) DiffAMT \n" +
@ -120,8 +140,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" LEFT JOIN Set_material B ON a.MaterialCode = b.CustomerPartCode \n" + " LEFT JOIN Set_material B ON a.MaterialCode = b.CustomerPartCode \n" +
" LEFT JOIN (select max(Id) Id,MaterialCode,MaterialDesc from Set_material group by MaterialCode,MaterialDesc) d ON a.ParentSapMaterialCode = d.MaterialCode \n" + " LEFT JOIN (select max(Id) Id,MaterialCode,MaterialDesc from Set_material group by MaterialCode,MaterialDesc) d ON a.ParentSapMaterialCode = d.MaterialCode \n" +
" ) temp1\n" + " ) temp1\n" +
" LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE version = ( SELECT Max( Version ) FROM Set_PriceList ) ) temp2 ON temp1.SapMaterialCode = temp2.MaterialCode"; " LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE version = ( SELECT Max( Version ) FROM Set_PriceList ) ) temp2 ON temp1.SapMaterialCode = temp2.MaterialCode \n"+
" left join set_backQty tt on temp1.SapMaterialCode = tt.MaterialCode and temp1.ChassisNumber = tt.Code ";
//var _materialList = DbConnection.Query<Material>("select * from set_material").ToList(); //var _materialList = DbConnection.Query<Material>("select * from set_material").ToList();
//var _priceList = DbConnection.Query<PriceList>("select MaterialCode,Price from Set_PriceList where version=(select max(version) from set_Set_PriceListVersion)").ToList(); //var _priceList = DbConnection.Query<PriceList>("select MaterialCode,Price from Set_PriceList where version=(select max(version) from set_Set_PriceListVersion)").ToList();

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

@ -12,6 +12,75 @@ using Volo.Abp.EntityFrameworkCore;
namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{ {
public class WmsOutputSumReport2
{
[ImporterHeader(Name = "行号")]
[ExporterHeader(DisplayName = "行号")]
public string { set; get; }
[ImporterHeader(Name = "客户")]
[ExporterHeader(DisplayName = "客户")]
public string { set; get; }
[ImporterHeader(Name = "出库类型")]
[ExporterHeader(DisplayName = "出库类型")]
public string { set; get; }
//[ImporterHeader(Name = "结算编码")]
//[ExporterHeader(DisplayName = "结算编码")]
//public string 结算编码 { set; get; }
//[ImporterHeader(Name = "销售渠道")]
//[ExporterHeader(DisplayName = "销售渠道")]
//public string 销售渠道 { set; get; }
//[ImporterHeader(Name = "客户代码")]
//[ExporterHeader(DisplayName = "客户代码")]
public string { set; get; }
[ImporterHeader(Name = "结算单")]
[ExporterHeader(DisplayName = "结算单")]
public string { set; get; }
[ImporterHeader(Name = "物料号")]
[ExporterHeader(DisplayName = "物料号")]
public string { set; get; }
[ImporterHeader(Name = "条码号")]
[ExporterHeader(DisplayName = "条码号")]
public string { set; get; }
//[ImporterHeader(Name = "寄售类别")]
//[ExporterHeader(DisplayName = "寄售类别")]
//public string 寄售类别 { set; get; }
[ImporterHeader(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal { set; get; }
[ImporterHeader(Name = "实际出库数量")]
[ExporterHeader(DisplayName = "实际出库数量")]
public decimal { set; get; }
[ImporterHeader(Name = "差异数量")]
[ExporterHeader(DisplayName = "差异数量")]
public decimal { set; get; }
[ImporterHeader(Name = "开票单价")]
[ExporterHeader(DisplayName = "开票单价")]
public decimal { set; get; }
[ImporterHeader(Name = "结算金额")]
[ExporterHeader(DisplayName = "结算金额")]
public decimal { set; get; }
[ImporterHeader(Name = "已出库金额")]
[ExporterHeader(DisplayName = "已出库金额")]
public decimal { set; get; }
[ImporterHeader(Name = "WMS待出库金额")]
[ExporterHeader(DisplayName = "WMS待出库金额")]
public decimal WMS待出库金额 { set; get; }
[ImporterHeader(Name = "物料组编码")]
[ExporterHeader(DisplayName = "物料组编码")]
public string { set; get; }
[ImporterHeader(Name = "物料组车型")]
[ExporterHeader(DisplayName = "物料组车型")]
public string { set; get; }
[ImporterHeader(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string { set; get; }
[ImporterHeader(Name = "备注")]
[ExporterHeader(DisplayName = "备注")]
public string { set; get; }
}
public class WmsOutputSumReport public class WmsOutputSumReport
{ {
[ImporterHeader(Name = "行号")] [ImporterHeader(Name = "行号")]
@ -38,12 +107,12 @@ 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 = "通用代码号")] [ImporterHeader(Name = "码号")]
[ExporterHeader(DisplayName = "通用代码号")] [ExporterHeader(DisplayName = "码号")]
public string { set; get; } public string { set; get; }
[ImporterHeader(Name = "寄售类别")] //[ImporterHeader(Name = "寄售类别")]
[ExporterHeader(DisplayName = "寄售类别")] //[ExporterHeader(DisplayName = "寄售类别")]
public string { set; get; } //public string 寄售类别 { set; get; }
[ImporterHeader(Name = "结算数量")] [ImporterHeader(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")] [ExporterHeader(DisplayName = "结算数量")]
public decimal { set; get; } public decimal { set; get; }
@ -640,7 +709,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public virtual List<WmsOutputSumReport> GetWmsSumReportList(string version,string state) public virtual List<WmsOutputSumReport2> GetWmsSumReportList(string version, string state)
{ {
@ -658,10 +727,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.Price 开票单价,\n" + " temp1.Price 开票单价,\n" +
" Round( Isnull( temp1.Qty, 0 )* temp1.Price, 2 ) 结算金额,\n" + " Round( Isnull( temp1.Qty, 0 )* temp1.Price, 2 ) 结算金额,\n" +
" Round(( Isnull( temp1.Qty, 0 )- Isnull( temp1.OutputQty, 0 ))* temp1.Price, 2 ) WMS待出库金额, \n" + " Round(( Isnull( temp1.Qty, 0 )- Isnull( temp1.OutputQty, 0 ))* temp1.Price, 2 ) WMS待出库金额, \n" +
" temp2.EstimateType 物料组编码, \n" + " temp2.EstimateType 物料组编码, \n" +
" temp2.EstimateTypeDesc 物料组车型, \n" + " temp2.EstimateTypeDesc 物料组车型, \n" +
" temp2.MaterialDesc 物料描述, \n" + " temp2.MaterialDesc 物料描述, \n" +
" temp1.remark 备注 \n" + " temp1.remark 备注 \n" +
"FROM\n" + "FROM\n" +
" (\n" + " (\n" +
" SELECT\n" + " SELECT\n" +
@ -798,9 +867,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" LEFT JOIN(SELECT max(Id) Id, MaterialCode, MaterialDesc, EstimateType, EstimateTypeDesc FROM Set_material GROUP BY MaterialCode, MaterialDesc, EstimateTypeDesc, EstimateType) temp2 ON temp1.MaterialCode = temp2.MaterialCode "; " LEFT JOIN(SELECT max(Id) Id, MaterialCode, MaterialDesc, EstimateType, EstimateTypeDesc FROM Set_material GROUP BY MaterialCode, MaterialDesc, EstimateTypeDesc, EstimateType) temp2 ON temp1.MaterialCode = temp2.MaterialCode ";
_sql = string.Format(_sql, version,state); _sql = string.Format(_sql, version, state);
var _query = DbConnection.Query<WmsOutputSumReport>(_sql,null,null,true,1200,null); var _query = DbConnection.Query<WmsOutputSumReport2>(_sql, null, null, true, 1200, null);

Loading…
Cancel
Save