From 44a7f44baf45812e6508d5a2113d45f846caec21 Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Wed, 2 Mar 2022 14:01:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E6=AC=A1=E6=80=A7=E5=AF=84=E5=94=AE?= =?UTF-8?q?=E9=94=80=E5=94=AE=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WMS/WmsOneTimeSaleOutputAppService.cs | 6 +- ...ttleAccountApplicationAutoMapperProfile.cs | 6 + .../Entities/WMS/TaskList.cs | 17 + ...AccountDbContextModelCreatingExtensions.cs | 49 +++ .../HQCarSettledDetailDapperRepository.cs | 284 ++++++++-------- .../HQHSettledDetailDapperRepository.cs | 306 +++++++++++++----- .../HQCarSettledDetailDiffExportService.cs | 26 +- ...SharePartSettledDetailDiffExportService.cs | 4 +- 8 files changed, 464 insertions(+), 234 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs index 3df9f30d..963be3db 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs @@ -313,7 +313,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS "EXEC @return_value = [dbo].[p_wms_ou" + "tput]\n" + " @billnum = N'{0}',\n" + - " @type = 21,\n" + + " @type = 22,\n" + " @date = N'{1}'\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( @@ -347,7 +347,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS "EXEC @return_value = [dbo].[p_wms_output_cancel]\n" + " @Guids ='{0}', \n" + " @billnum = N'{1}',\n" + - " @type = 21,\n" + + " @type = 22,\n" + " @accountdate = N'{2}'\n" + "SELECT 'Return Value' = @return_value"; @@ -380,7 +380,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS var sql = "DECLARE @return_value int\n" + "EXEC @return_value = [dbo].[p_wms_output_cancel_all]\n" + " @billnum = N'{0}',\n" + - " @type = 21\n" + + " @type = 22\n" + "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( string.Format(sql, input.BillNum) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs index 6ad9bdeb..5d0b9edc 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs @@ -257,6 +257,7 @@ namespace Win.Sfs.SettleAccount CreateMapWmsSharePart90(); CreateMapWmsHQWithOutKanban(); CreateMapWmsHQCar(); + CreateMapWmsOneTimeSale(); #endregion @@ -296,6 +297,11 @@ namespace Win.Sfs.SettleAccount CreateMap().ReverseMap(); } + private void CreateMapWmsOneTimeSale() + { + CreateMap().ReverseMap(); + } + private void CreateMapWmsHQCar() { CreateMap().ReverseMap(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs index e12cc9fb..4f2a429a 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs @@ -767,6 +767,23 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [ExporterHeader(DisplayName = "开票金额")] public decimal Amt { set; get; } + + [ImporterHeader(Name = "出库库位", IsIgnore = true)] + [ExporterHeader(DisplayName = "出库库位", IsIgnore = true)] + //出库库位 + public string OutPut { set; get; } + [ImporterHeader(Name = "入库库位", IsIgnore = true)] + [ExporterHeader(DisplayName = "入库库位", IsIgnore = true)] + //入库库位 + public string InPut { set; get; } + [ExporterHeader(DisplayName = "组件组物料", IsIgnore = true)] + public string ParentMaterialCode { set; get; } + [ExporterHeader(DisplayName = "交货单号", IsIgnore = true)] + public string WmsBillNum { set; get; } + [ExporterHeader(DisplayName = "订单号", IsIgnore = true)] + //KENN号 + public string OrderBillNum { set; get; } + } diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs index ec179dd1..ff835f4b 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs @@ -368,6 +368,11 @@ namespace Win.Sfs.SettleAccount builder.ConfigureWmsHQWithOutKanbanOutPutVersion(options); builder.ConfigureWmsHQWithOutKanbanOutPutDetail(options); + //一次性寄售销售库 + builder.ConfigureWmsOneTimeSaleOutPutVersion(options); + builder.ConfigureWmsOneTimeSaleOutPutDetial(options); + + #endregion @@ -1671,6 +1676,50 @@ namespace Win.Sfs.SettleAccount + + + + private static void ConfigureWmsOneTimeSaleOutPutVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + b.ToTable($"{options.TablePrefix}_WmsOneTimeSaleOutPut", options.Schema); + b.ConfigureByConvention(); + b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + + b.HasIndex(x => new { x.BillNum }); + }); + + } + + private static void ConfigureWmsOneTimeSaleOutPutDetial(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + b.ToTable($"{options.TablePrefix}_WmsOneTimeSaleOutPutDetial", options.Schema); + b.ConfigureByConvention(); + b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.WmsBillNum).HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.OutPut).HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.InPut).HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.OrderBillNum).HasMaxLength(CommonConsts.MaxCodeLength); + + b.Property(x => x.ParentMaterialCode).HasMaxLength(CommonConsts.MaxCodeLength); + //b.Property(x => x.Extend1).HasMaxLength(CommonConsts.MaxCodeLength); + //b.Property(x => x.Extend2).HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.SapMaterialCode).HasMaxLength(CommonConsts.MaxCodeLength); + b.HasIndex(x => new { x.BillNum }); + }); + + } + + + + #endregion #region 天合 diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs index bb6cda36..fa7a4aaf 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs @@ -75,33 +75,33 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report //} string str = "SELECT\n" + - " temp1.*,\n" + - " isnull( temp2.Price, 0 ) 定价,\n" + - " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" + - " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + - "FROM\n" + - " (\n" + - " SELECT\n" + - " ISNULL( A.Price, 0 ) 结算单价,\n" + - " ISNULL( A.Qty, 0 ) 结算数量,\n" + - " ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" + - " a.MaterialCode 结算物料号,\n" + - " A.StorageLocation 收货仓库,\n" + - " A.StorageLocationDesc 收货仓库描述,\n" + - " C.EstimateTypeDesc 物料组,\n" + - " C.MaterialCode Sap编码,\n" + - " C.MaterialDesc 物料描述,\n" + - " 0 寄销库数量 \n" + - " FROM\n" + - " Set_BT_Car_Platform A\n" + - " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + - " \n" + - " WHERE\n" + - " a.Version= '{0}' \n" + - " AND a.StorageLocationDesc NOT LIKE '%备品%'\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" + - " "; + " temp1.*,\n" + + " isnull( temp2.Price, 0 ) 定价,\n" + + " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" + + " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + + "FROM\n" + + " (\n" + + " SELECT\n" + + " A.StorageLocation 收货仓库,\n" + + " A.StorageLocationDesc 收货仓库描述,\n" + + " C.MaterialCode Sap编码,\n" + + " A.MaterialCode 结算物料号,\n" + + " C.EstimateTypeDesc 物料组,\n" + + " C.MaterialDesc 物料描述,\n" + + " CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" + + " a.[AcceptanceNo] AS 结算验收单号,\n" + + " ISNULL( A.Price, 0 ) 结算单价,\n" + + " ISNULL( A.Qty, 0 ) 结算数量,\n" + + " ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" + + " 0 寄销库数量 \n" + + " FROM\n" + + " Set_BT_Car_Platform A\n" + + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + + " WHERE\n" + + " a.Version= '{0}' \n" + + " AND a.StorageLocationDesc NOT LIKE '%备品%' \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"; @@ -142,59 +142,65 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report //} string str = "SELECT\n" + - " temp1.*,\n" + - " isnull( temp2.Price, 0 ) 定价,\n" + - " ISNULL( temp3.Price, 0 ) 结算单价,\n" + - " ( isnull( temp3.Price, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" + - " ( temp3.Price * temp1.结算数量 ) 结算金额,\n" + - " ( isnull( temp3.Price, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + - "FROM\n" + - " (\n" + - " SELECT\n" + - " ISNULL( A.Qty, 0 ) 结算数量,\n" + - " A.MaterialCode 结算物料号,\n" + - " A.StorageLocation 收货仓库,\n" + - " A.StorageLocationDesc 收货仓库描述,\n" + - " C.EstimateTypeDesc 物料组,\n" + - " C.MaterialCode Sap编码,\n" + - " C.MaterialDesc 物料描述,\n" + - " 0 寄销库数量 \n" + - " FROM\n" + - " (\n" + - " SELECT SUM\n" + - " ( Qty ) Qty,\n" + - " MaterialCode,\n" + - " StorageLocation,\n" + - " StorageLocationDesc,\n" + - " Version \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" + - " ) A\n" + - " LEFT 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\n" + - " LEFT JOIN (\n" + - " SELECT SUM\n" + - " ( Amt ) / SUM ( Qty ) AS Price,\n" + - " MaterialCode,\n" + - " Version \n" + - " FROM\n" + - " Set_BT_Car_Platform \n" + - " WHERE\n" + - " version = '{0}' \n" + - " AND StorageLocationDesc NOT LIKE '%备品%' \n" + - " GROUP BY\n" + - " MaterialCode,\n" + - " Version \n" + - " ) AS TEMP3 ON temp1.[结算物料号] = temp3.MaterialCode"; + " temp1.*,\n" + + " isnull( temp2.Price, 0 ) 定价,\n" + + " ISNULL( temp3.Price, 0 ) 结算单价,\n" + + " ( isnull( temp3.Price, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" + + " ( temp3.Price * temp1.结算数量 ) 结算金额,\n" + + " ( isnull( temp3.Price, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + + "FROM\n" + + " (\n" + + " SELECT\n" + + " ISNULL( A.Qty, 0 ) 结算数量,\n" + + " A.MaterialCode 结算物料号,\n" + + " A.StorageLocation 收货仓库,\n" + + " A.StorageLocationDesc 收货仓库描述,\n" + + " C.EstimateTypeDesc 物料组,\n" + + " C.MaterialCode Sap编码,\n" + + " C.MaterialDesc 物料描述,\n" + + " a.[AcceptanceNo] AS 结算验收单号,\n" + + " CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" + + " 0 寄销库数量 \n" + + " FROM\n" + + " (\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" + + " ) 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 JOIN (\n" + + " SELECT SUM\n" + + " ( Amt ) / SUM ( Qty ) AS Price,\n" + + " MaterialCode,\n" + + " Version \n" + + " FROM\n" + + " Set_BT_Car_Platform \n" + + " WHERE\n" + + " version = '{0}' \n" + + " AND StorageLocationDesc NOT LIKE '%备品%' \n" + + " GROUP BY\n" + + " MaterialCode,\n" + + " Version \n" + + " ) AS TEMP3 ON temp1.[结算物料号] = temp3.MaterialCode"; @@ -235,33 +241,33 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report //} string str = "SELECT\n" + - " temp1.*,\n" + - " isnull( temp2.Price, 0 ) 定价,\n" + - " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" + - " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + - "FROM\n" + - " (\n" + - " SELECT\n" + - " ISNULL( A.Price, 0 ) 结算单价,\n" + - " ISNULL( A.Qty, 0 ) 结算数量,\n" + - " ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" + - " a.MaterialCode 结算物料号,\n" + - " A.StorageLocation 收货仓库,\n" + - " A.StorageLocationDesc 收货仓库描述,\n" + - " C.EstimateTypeDesc 物料组,\n" + - " C.MaterialCode Sap编码,\n" + - " C.MaterialDesc 物料描述,\n" + - " 0 寄销库数量 \n" + - " FROM\n" + - " Set_BT_Car_Platform A\n" + - " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + - " \n" + - " WHERE\n" + - " a.Version= '{0}' \n" + - " AND a.StorageLocationDesc LIKE '%备品%'\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" + - " "; + " temp1.*,\n" + + " isnull( temp2.Price, 0 ) 定价,\n" + + " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" + + " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + + "FROM\n" + + " (\n" + + " SELECT\n" + + " A.StorageLocation 收货仓库,\n" + + " A.StorageLocationDesc 收货仓库描述,\n" + + " C.MaterialCode Sap编码,\n" + + " A.MaterialCode 结算物料号,\n" + + " C.EstimateTypeDesc 物料组,\n" + + " C.MaterialDesc 物料描述,\n" + + " CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" + + " a.[AcceptanceNo] AS 结算验收单号,\n" + + " ISNULL( A.Price, 0 ) 结算单价,\n" + + " ISNULL( A.Qty, 0 ) 结算数量,\n" + + " ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" + + " 0 寄销库数量 \n" + + " FROM\n" + + " Set_BT_Car_Platform A\n" + + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + + " WHERE\n" + + " a.Version= '{0}' \n" + + " AND a.StorageLocationDesc LIKE '%备品%' \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"; @@ -318,6 +324,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " C.EstimateTypeDesc 物料组,\n" + " C.MaterialCode Sap编码,\n" + " C.MaterialDesc 物料描述,\n" + + " a.[AcceptanceNo] AS 结算验收单号,\n" + + " CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" + " 0 寄销库数量 \n" + " FROM\n" + " (\n" + @@ -326,7 +334,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " MaterialCode,\n" + " StorageLocation,\n" + " StorageLocationDesc,\n" + - " Version \n" + + " Version,\n" + + " AcceptanceNo,\n" + + " AcceptanceDate \n" + " FROM\n" + " Set_BT_Car_Platform \n" + " WHERE\n" + @@ -336,7 +346,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " MaterialCode,\n" + " StorageLocation,\n" + " StorageLocationDesc,\n" + - " Version \n" + + " Version,\n" + + " AcceptanceNo,\n" + + " AcceptanceDate \n" + " ) A\n" + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " ) temp1\n" + @@ -350,7 +362,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " Set_BT_Car_Platform \n" + " WHERE\n" + " version = '{0}' \n" + - " AND StorageLocationDesc LIKE '%备品%' \n" + + " AND StorageLocationDesc LIKE '%备品%' \n" + " GROUP BY\n" + " MaterialCode,\n" + " Version \n" + @@ -379,7 +391,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report public HQCarSettledDetailDiff(string sapMaterialCode, string materialCode, string materialDesc, decimal price, string storageLocation, string storageLocationDesc, decimal selprice, decimal diffprice, decimal sumprice, decimal settleprice, decimal qty, - decimal sockQty,string metarialGroup) + decimal sockQty,string metarialGroup,string acceptanceNo,string acceptanceDate) { SAP编码 = sapMaterialCode; 物料描述 = materialDesc; @@ -394,55 +406,53 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report 结算数量 = qty; 结算金额 = settleprice; 物料组 = metarialGroup; + 结算验收单号 = acceptanceNo; + 验收单日期 = acceptanceDate; } - - - [ExporterHeader(DisplayName = "交货日期")] + + [ExporterHeader(DisplayName = "交货日期",IsIgnore = true)] public string 交货日期 { set; get; } - [ExporterHeader(DisplayName = "手工或自动")] + [ExporterHeader(DisplayName = "手工或自动", IsIgnore = true)] public string 手工或自动 { set; get; } - [ExporterHeader(DisplayName = "交货单号")] + [ExporterHeader(DisplayName = "交货单号", IsIgnore = true)] 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编码")] + public string SAP编码 { set; get; } + [ExporterHeader(DisplayName = "结算物料号")] public string 结算物料号 { set; get; } - [ExporterHeader(DisplayName = "订货零件号")] - public string 订货零件号 { set; get; } - [ExporterHeader(DisplayName = "SAP编码")] - 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 string 验收单日期 { set; get; } + + [ExporterHeader(DisplayName = "结算验收单号")] + public string 结算验收单号 { set; get; } + [ExporterHeader(DisplayName = "定价")] public decimal 定价 { set; get; } - [ExporterHeader(DisplayName = "发货总金额")] - public decimal 发货总金额 { 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 = "结算金额")] public decimal 结算金额 { set; get; } - [ExporterHeader(DisplayName = "数量差异")] - public decimal 数量差异 { set; get; } + [ExporterHeader(DisplayName = "价格差异")] public decimal 价格差异 { set; get; } [ExporterHeader(DisplayName = "差异总金额")] diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs index e8e3fef9..a99802df 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs @@ -816,10 +816,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report /// /// /// - public virtual List GetReverseSettledDetailDiffReportList(string version, string materialCode, string begin, string end, string materialGroup) + public virtual List GetReverseSettledDetailDiffReportList(string version, string materialCode, string begin, string end, string materialGroup) { - List _list = new List(); + List _list = new List(); string condition = " "; @@ -833,63 +833,61 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report } string str = "SELECT\n" + - " temp1.交货时间,\n" + - " isnull( temp1.手工或自动, '' ) 手工或自动,\n" + - " isnull( temp1.交货单号, '' ) 交货单号,\n" + - " temp1.收货仓库,\n" + - " temp1.收货仓库描述,\n" + - " temp1.订货看板编号,\n" + - " temp1.订货零件号,\n" + - " temp1.Sap编码,\n" + - " temp1.[客户物料号],\n" + - " temp1.发货零件号,\n" + - " temp1.物料组,\n" + - " temp1.零件中文名称,\n" + - " temp1.发货数量,\n" + - " temp1.发货状态,\n" + - " temp1.结算验收单号,\n" + - " temp1.结算数量,\n" + - " temp1.结算单价,\n" + - " temp1.结算金额,\n" + - " isnull( TEMP2.Price, 0 ) AS 发货定价,\n" + - " isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" + - " 0 AS 数量差异,\n" + - " temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" + - " ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + - "FROM\n" + - " (\n" + - " SELECT\n" + - " a.WmsBillNum AS 交货单号,\n" + - " CONVERT ( VARCHAR ( 100 ), a.LastModificationTime, 23 ) AS 交货时间 ,\n" + - " a.IsAuto AS 手工或自动,\n" + - " b.StorageLocation AS 收货仓库,\n" + - " b.StorageLocationDesc AS 收货仓库描述,\n" + - " a.Kanban AS 订货看板编号,\n" + - " b.MaterialCode AS 订货零件号,\n" + - " c.MaterialCode Sap编码,\n" + - " c.CustomerPartCode 客户物料号,\n" + - " '' AS 发货零件号,\n" + - " c.MaterialDesc AS 零件中文名称,\n" + - " isnull( a.Qty, 0 ) AS 发货数量,\n" + - " isnull( a.State, 0 ) AS 发货状态,\n" + - " b.AcceptanceNo AS 结算验收单号,\n" + - " isnull( b.Qty, 0 ) AS 结算数量,\n" + - " isnull( b.Price, 0 ) AS 结算单价,\n" + - " isnull( b.Amt, 0 ) AS 结算金额 ,\n" + - " C.EstimateTypeDesc AS 物料组 \n" + - " FROM\n" + - " Set_HQ_H_Kanban AS a\n" + - " LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" + - " AND a.MaterialCode = b.MaterialCode\n" + - " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + - " WHERE\n" + - " b.HQHKanBan IS NULL \n" + - " AND b.MaterialCode IS NULL {0} \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"; + " temp1.交货时间,\n" + + " isnull( temp1.手工或自动, '' ) 手工或自动,\n" + + " isnull( temp1.交货单号, '' ) 交货单号,\n" + + " temp1.收货仓库,\n" + + " temp1.收货仓库描述,\n" + + " temp1.订货看板编号,\n" + + " temp1.订货零件号,\n" + + " temp1.Sap编码,\n" + + " temp1.[客户物料号],\n" + + " temp1.物料组,\n" + + " temp1.零件中文名称,\n" + + " temp1.发货数量,\n" + + " temp1.发货状态,\n" + + " temp1.结算验收单号,\n" + + " temp1.结算数量,\n" + + " temp1.结算单价,\n" + + " temp1.结算金额,\n" + + " isnull( TEMP2.Price, 0 ) AS 发货定价,\n" + + " isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" + + " 0 AS 数量差异,\n" + + " temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" + + " ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * temp1.发货数量 AS 差异总金额 \n" + + "FROM\n" + + " (\n" + + " SELECT\n" + + " a.WmsBillNum AS 交货单号,\n" + + " CONVERT ( VARCHAR ( 100 ), a.LastModificationTime, 23 ) AS 交货时间 ,\n" + + " a.IsAuto AS 手工或自动,\n" + + " b.StorageLocation AS 收货仓库,\n" + + " b.StorageLocationDesc AS 收货仓库描述,\n" + + " a.Kanban AS 订货看板编号,\n" + + " b.MaterialCode AS 订货零件号,\n" + + " c.MaterialCode Sap编码,\n" + + " c.CustomerPartCode 客户物料号,\n" + + " c.MaterialDesc AS 零件中文名称,\n" + + " isnull( a.Qty, 0 ) AS 发货数量,\n" + + " isnull( a.State, 0 ) AS 发货状态,\n" + + " b.AcceptanceNo AS 结算验收单号,\n" + + " isnull( b.Qty, 0 ) AS 结算数量,\n" + + " isnull( b.Price, 0 ) AS 结算单价,\n" + + " isnull( b.Amt, 0 ) AS 结算金额 ,\n" + + " C.EstimateTypeDesc AS 物料组 \n" + + " FROM\n" + + " Set_HQ_H_Kanban AS a\n" + + " LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" + + " AND a.MaterialCode = b.MaterialCode\n" + + " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + + " WHERE\n" + + " b.HQHKanBan IS NULL \n" + + " AND b.MaterialCode IS NULL {0}\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"; var _sql = string.Format(str, condition); - var _query = DbConnection.Query(_sql, null, null, true, 1200, null); + var _query = DbConnection.Query(_sql, null, null, true, 1200, null); _list = _query.ToList(); return _list; @@ -1061,9 +1059,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report // condition += string.Format(" and a.LastModificationTime<='{0}' ", end); //} + string str = "SELECT\n" + " temp1.*,\n" + - " isnull( temp2.Price, 0 ) 销售单价,\n" + + " isnull( temp2.Price, 0 ) 发货定价,\n" + " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" + " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + "FROM\n" + @@ -1075,20 +1074,27 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " A.MaterialCode 结算物料号,\n" + " A.StorageLocation 收货仓库,\n" + " A.StorageLocationDesc 收货仓库描述,\n" + - " a.[AcceptanceNo] AS 结算验收单号,\n" + " C.EstimateTypeDesc 物料组,\n" + " C.MaterialCode Sap编码,\n" + - " C.MaterialDesc 物料描述,\n" + + " C.MaterialDesc 零件中文名称,\n" + + " a.[AcceptanceNo] AS 结算验收单号,\n" + + " a.Factory AS 工厂,\n" + + " a.HQHKanBan AS 订货看板编号,\n" + + " a.AcceptanceDate 验收单日期,\n" + " 0 寄销库数量 \n" + " FROM\n" + " (\n" + - " SELECT\n" + - " Price,\n" + - " SUM ( Qty ) Qty,\n" + + " SELECT SUM\n" + + " ( Qty ) AS Qty,\n" + " MaterialCode,\n" + + " Version,\n" + " StorageLocation,\n" + " StorageLocationDesc,\n" + - " AcceptanceNo \n" + + " Factory,\n" + + " AcceptanceNo,\n" + + " Price,\n" + + " HQHKanBan,\n" + + " CONVERT ( VARCHAR ( 100 ), AcceptanceDate, 23 ) AcceptanceDate \n" + " FROM\n" + " Set_HQ_H_Platform \n" + " WHERE\n" + @@ -1096,14 +1102,63 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " AND HQHKanBan = 'BJ' \n" + " GROUP BY\n" + " MaterialCode,\n" + + " Version,\n" + " StorageLocation,\n" + " StorageLocationDesc,\n" + - " price,\n" + - " AcceptanceNo \n" + + " Factory,\n" + + " AcceptanceNo,\n" + + " Price,\n" + + " HQHKanBan,\n" + + " AcceptanceDate \n" + " ) A\n" + " LEFT 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"; + + + //string str = "SELECT\n" + + //" temp1.*,\n" + + //" isnull( temp2.Price, 0 ) 销售单价,\n" + + //" ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" + + //" ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + + //"FROM\n" + + //" (\n" + + //" SELECT\n" + + //" ISNULL( A.Price, 0 ) 结算单价,\n" + + //" ISNULL( A.Qty, 0 ) 结算数量,\n" + + //" ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" + + //" A.MaterialCode 结算物料号,\n" + + //" A.StorageLocation 收货仓库,\n" + + //" A.StorageLocationDesc 收货仓库描述,\n" + + //" a.[AcceptanceNo] AS 结算验收单号,\n" + + //" C.EstimateTypeDesc 物料组,\n" + + //" C.MaterialCode Sap编码,\n" + + //" C.MaterialDesc 零件中文名称,\n" + + //" 0 寄销库数量 \n" + + //" FROM\n" + + //" (\n" + + //" SELECT\n" + + //" Price,\n" + + //" SUM ( Qty ) Qty,\n" + + //" MaterialCode,\n" + + //" StorageLocation,\n" + + //" StorageLocationDesc,\n" + + //" AcceptanceNo \n" + + //" FROM\n" + + //" Set_HQ_H_Platform \n" + + //" WHERE\n" + + //" version = '{0}' \n" + + //" AND HQHKanBan = 'BJ' \n" + + //" GROUP BY\n" + + //" MaterialCode,\n" + + //" StorageLocation,\n" + + //" StorageLocationDesc,\n" + + //" price,\n" + + //" AcceptanceNo \n" + + //" ) A\n" + + //" LEFT 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 _sql = string.Format(str, version); @@ -1142,7 +1197,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report string str = "SELECT\n" + " temp1.*,\n" + - " isnull( temp2.Price, 0 ) 销售单价,\n" + + " isnull( temp2.Price, 0 ) 发货定价,\n" + " isnull( temp3.Price, 0 ) 结算单价,\n" + " ( isnull( temp3.Price, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" + " (temp3.Price * temp1.结算数量) 结算金额,\n" + @@ -1219,51 +1274,71 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report decimal sockQty) { Sap编码 = sapMaterialCode; - 物料描述 = materialDesc; + 零件中文名称 = materialDesc; 结算物料号 = materialCode; 寄销库数量 = sockQty; 结算单价 = price; 收货仓库 = storageLocation; 收货仓库描述 = storageLocationDesc; - 销售单价 = selprice; + 发货定价 = selprice; 价格差异 = diffprice; 差异总金额 = sumprice; 结算数量 = qty; 结算金额 = settleprice; } - + [ExporterHeader(DisplayName = "工厂")] + 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编码")] + public string Sap编码 { set; get; } + [ExporterHeader(DisplayName = "结算物料号")] + 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 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 = "Sap编码")] - public string Sap编码 { 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; } + + } public class HQHSettledDetailDiff @@ -1288,12 +1363,13 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report public string 零件中文名称 { set; get; } [ExporterHeader(DisplayName = "Sap编码")] public string Sap编码 { 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 = "发货状态")] @@ -1333,6 +1409,72 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report [ExporterHeader(DisplayName = "验收单日期")] public string 验收单日期 { set; get; } } + + + public class HQHUnSettledDetailDiff + { + [ExporterHeader(DisplayName = "交货单号")] + 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 string 订货看板编号 { set; get; } + [ExporterHeader(DisplayName = "订货零件号",IsIgnore =true)] + public string 订货零件号 { set; get; } + [ExporterHeader(DisplayName = "发货零件号", IsIgnore = true)] + public string 发货零件号 { set; get; } + [ExporterHeader(DisplayName = "Sap编码")] + public string Sap编码 { set; get; } + [ExporterHeader(DisplayName = "客户物料号")] + 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 string 结算验收单号 { set; get; } + + [ExporterHeader(DisplayName = "发货数量")] + public decimal 发货数量 { set; get; } + [ExporterHeader(DisplayName = "发货状态", IsIgnore = true)] + 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; } + [ExporterHeader(DisplayName = "差异总金额")] + public decimal 差异总金额 { set; get; } + + [ExporterHeader(DisplayName = "工厂",IsIgnore =true)] + public string 工厂 { set; get; } + + [ExporterHeader(DisplayName = "看板编号")] + public string 看板编号 { set; get; } + + + } + public class HQHSettleQtyDiff { public string 客户物料号 { set; get; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs index ebc05d7c..25c3bc3b 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs @@ -83,7 +83,9 @@ namespace SettleAccount.Job.Services.Report itm.结算金额, itm.结算数量, tm1 == null ? 0 : tm1.Qty, - itm.物料组 + itm.物料组, + itm.结算验收单号, + itm.验收单日期 ); @@ -108,7 +110,9 @@ namespace SettleAccount.Job.Services.Report itm.结算金额, itm.结算数量, tm1 == null ? 0 : tm1.Qty, - itm.物料组 + itm.物料组, + itm.结算验收单号, + itm.验收单日期 ); //if (!string.IsNullOrEmpty(kanban)) @@ -138,14 +142,16 @@ namespace SettleAccount.Job.Services.Report _ls = _ls.Where(p => _groupList.Contains(p.物料组)).ToList(); } } - //if (!string.IsNullOrEmpty(materialCode)) - //{ - // var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList(); - // if (_groupList.Count() > 0) - // { - // _ls = _ls.Where(p => _groupList.Contains(p.结算物料号)).ToList(); - // } - //} + + if (!string.IsNullOrEmpty(materialCode)) + { + var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList(); + if (_groupList.Count() > 0) + { + _ls = _ls.Where(p => _groupList.Contains(p.结算物料号)).ToList(); + } + } + if (!string.IsNullOrEmpty(sapCode)) { var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSharePartSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSharePartSettledDetailDiffExportService.cs index 9509408e..ebd7acdb 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSharePartSettledDetailDiffExportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSharePartSettledDetailDiffExportService.cs @@ -72,11 +72,11 @@ namespace SettleAccount.Job.Services.Report select new HQHSharePartSettledDetailDiff( itm.Sap编码, itm.结算物料号, - itm.物料描述, + itm.零件中文名称, itm.结算单价, itm.收货仓库, itm.收货仓库描述, - itm.销售单价, + itm.发货定价, itm.价格差异, itm.差异总金额, itm.结算金额,