Browse Source

一次性寄售销售代码

FoShanPG
44673626 3 years ago
parent
commit
44a7f44baf
  1. 6
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs
  2. 6
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  3. 17
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
  4. 49
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  5. 280
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs
  6. 306
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs
  7. 26
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs
  8. 4
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSharePartSettledDetailDiffExportService.cs

6
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" + "EXEC @return_value = [dbo].[p_wms_ou" +
"tput]\n" + "tput]\n" +
" @billnum = N'{0}',\n" + " @billnum = N'{0}',\n" +
" @type = 21,\n" + " @type = 22,\n" +
" @date = N'{1}'\n" + " @date = N'{1}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
@ -347,7 +347,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
"EXEC @return_value = [dbo].[p_wms_output_cancel]\n" + "EXEC @return_value = [dbo].[p_wms_output_cancel]\n" +
" @Guids ='{0}', \n" + " @Guids ='{0}', \n" +
" @billnum = N'{1}',\n" + " @billnum = N'{1}',\n" +
" @type = 21,\n" + " @type = 22,\n" +
" @accountdate = N'{2}'\n" + " @accountdate = N'{2}'\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
@ -380,7 +380,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
var sql = "DECLARE @return_value int\n" + var sql = "DECLARE @return_value int\n" +
"EXEC @return_value = [dbo].[p_wms_output_cancel_all]\n" + "EXEC @return_value = [dbo].[p_wms_output_cancel_all]\n" +
" @billnum = N'{0}',\n" + " @billnum = N'{0}',\n" +
" @type = 21\n" + " @type = 22\n" +
"SELECT 'Return Value' = @return_value"; "SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum) string.Format(sql, input.BillNum)

6
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -257,6 +257,7 @@ namespace Win.Sfs.SettleAccount
CreateMapWmsSharePart90(); CreateMapWmsSharePart90();
CreateMapWmsHQWithOutKanban(); CreateMapWmsHQWithOutKanban();
CreateMapWmsHQCar(); CreateMapWmsHQCar();
CreateMapWmsOneTimeSale();
#endregion #endregion
@ -296,6 +297,11 @@ namespace Win.Sfs.SettleAccount
CreateMap<WmsHQWithOutKanbanOutPutDetial, WmsHQWithOutKanbanOutPutDetialDto>().ReverseMap(); CreateMap<WmsHQWithOutKanbanOutPutDetial, WmsHQWithOutKanbanOutPutDetialDto>().ReverseMap();
} }
private void CreateMapWmsOneTimeSale()
{
CreateMap<WmsOneTimeSaleOutPutDetial, WmsOneTimeSaleOutPutDetialDto>().ReverseMap();
}
private void CreateMapWmsHQCar() private void CreateMapWmsHQCar()
{ {
CreateMap<WmsHQCarOutPutDetial, WmsHQCarOutPutDetialDto>().ReverseMap(); CreateMap<WmsHQCarOutPutDetial, WmsHQCarOutPutDetialDto>().ReverseMap();

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

@ -767,6 +767,23 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[ExporterHeader(DisplayName = "开票金额")] [ExporterHeader(DisplayName = "开票金额")]
public decimal Amt { set; get; } 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; }
} }

49
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -368,6 +368,11 @@ namespace Win.Sfs.SettleAccount
builder.ConfigureWmsHQWithOutKanbanOutPutVersion(options); builder.ConfigureWmsHQWithOutKanbanOutPutVersion(options);
builder.ConfigureWmsHQWithOutKanbanOutPutDetail(options); builder.ConfigureWmsHQWithOutKanbanOutPutDetail(options);
//一次性寄售销售库
builder.ConfigureWmsOneTimeSaleOutPutVersion(options);
builder.ConfigureWmsOneTimeSaleOutPutDetial(options);
#endregion #endregion
@ -1671,6 +1676,50 @@ namespace Win.Sfs.SettleAccount
private static void ConfigureWmsOneTimeSaleOutPutVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsOneTimeSaleOutPut>(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<WmsOneTimeSaleOutPutDetial>(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 #endregion
#region 天合 #region 天合

280
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" + string str = "SELECT\n" +
" temp1.*,\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 ) ) 价格差异,\n" +
" ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" +
"FROM\n" + "FROM\n" +
" (\n" + " (\n" +
" SELECT\n" + " SELECT\n" +
" ISNULL( A.Price, 0 ) 结算单价,\n" + " A.StorageLocation 收货仓库,\n" +
" ISNULL( A.Qty, 0 ) 结算数量,\n" + " A.StorageLocationDesc 收货仓库描述,\n" +
" ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" + " C.MaterialCode Sap编码,\n" +
" a.MaterialCode 结算物料号,\n" + " A.MaterialCode 结算物料号,\n" +
" A.StorageLocation 收货仓库,\n" + " C.EstimateTypeDesc 物料组,\n" +
" A.StorageLocationDesc 收货仓库描述,\n" + " C.MaterialDesc 物料描述,\n" +
" C.EstimateTypeDesc 物料组,\n" + " CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" +
" C.MaterialCode Sap编码,\n" + " a.[AcceptanceNo] AS 结算验收单号,\n" +
" C.MaterialDesc 物料描述,\n" + " ISNULL( A.Price, 0 ) 结算单价,\n" +
" 0 寄销库数量 \n" + " ISNULL( A.Qty, 0 ) 结算数量,\n" +
" FROM\n" + " ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" +
" Set_BT_Car_Platform A\n" + " 0 寄销库数量 \n" +
" LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " FROM\n" +
" \n" + " Set_BT_Car_Platform A\n" +
" WHERE\n" + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" a.Version= '{0}' \n" + " WHERE\n" +
" AND a.StorageLocationDesc NOT LIKE '%备品%'\n" + " a.Version= '{0}' \n" +
" ) temp1\n" + " AND a.StorageLocationDesc NOT LIKE '%备品%' \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" +
" "; " 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" + string str = "SELECT\n" +
" temp1.*,\n" + " temp1.*,\n" +
" isnull( temp2.Price, 0 ) 定价,\n" + " isnull( temp2.Price, 0 ) 定价,\n" +
" ISNULL( temp3.Price, 0 ) 结算单价,\n" + " ISNULL( temp3.Price, 0 ) 结算单价,\n" +
" ( isnull( temp3.Price, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" + " ( isnull( temp3.Price, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" +
" ( temp3.Price * temp1.结算数量 ) 结算金额,\n" + " ( temp3.Price * temp1.结算数量 ) 结算金额,\n" +
" ( isnull( temp3.Price, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + " ( isnull( temp3.Price, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" +
"FROM\n" + "FROM\n" +
" (\n" + " (\n" +
" SELECT\n" + " SELECT\n" +
" ISNULL( A.Qty, 0 ) 结算数量,\n" + " ISNULL( A.Qty, 0 ) 结算数量,\n" +
" A.MaterialCode 结算物料号,\n" + " A.MaterialCode 结算物料号,\n" +
" A.StorageLocation 收货仓库,\n" + " A.StorageLocation 收货仓库,\n" +
" A.StorageLocationDesc 收货仓库描述,\n" + " A.StorageLocationDesc 收货仓库描述,\n" +
" C.EstimateTypeDesc 物料组,\n" + " C.EstimateTypeDesc 物料组,\n" +
" C.MaterialCode Sap编码,\n" + " C.MaterialCode Sap编码,\n" +
" C.MaterialDesc 物料描述,\n" + " C.MaterialDesc 物料描述,\n" +
" 0 寄销库数量 \n" + " a.[AcceptanceNo] AS 结算验收单号,\n" +
" FROM\n" + " CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" +
" (\n" + " 0 寄销库数量 \n" +
" SELECT SUM\n" + " FROM\n" +
" ( Qty ) Qty,\n" + " (\n" +
" MaterialCode,\n" + " SELECT SUM\n" +
" StorageLocation,\n" + " ( Qty ) Qty,\n" +
" StorageLocationDesc,\n" + " MaterialCode,\n" +
" Version \n" + " StorageLocation,\n" +
" FROM\n" + " StorageLocationDesc,\n" +
" Set_BT_Car_Platform \n" + " Version,\n" +
" WHERE\n" + " AcceptanceNo,\n" +
" version = '{0}' \n" + " AcceptanceDate \n" +
" AND StorageLocationDesc NOT LIKE '%备品%' \n" + " FROM\n" +
" GROUP BY\n" + " Set_BT_Car_Platform \n" +
" MaterialCode,\n" + " WHERE\n" +
" StorageLocation,\n" + " version = '{0}' \n" +
" StorageLocationDesc,\n" + " AND StorageLocationDesc NOT LIKE '%备品%' \n" +
" Version \n" + " GROUP BY\n" +
" ) A\n" + " MaterialCode,\n" +
" LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " StorageLocation,\n" +
" ) temp1\n" + " StorageLocationDesc,\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" + " Version,\n" +
" LEFT JOIN (\n" + " AcceptanceNo,\n" +
" SELECT SUM\n" + " AcceptanceDate \n" +
" ( Amt ) / SUM ( Qty ) AS Price,\n" + " ) A\n" +
" MaterialCode,\n" + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" Version \n" + " ) temp1\n" +
" FROM\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" +
" Set_BT_Car_Platform \n" + " LEFT JOIN (\n" +
" WHERE\n" + " SELECT SUM\n" +
" version = '{0}' \n" + " ( Amt ) / SUM ( Qty ) AS Price,\n" +
" AND StorageLocationDesc NOT LIKE '%备品%' \n" + " MaterialCode,\n" +
" GROUP BY\n" + " Version \n" +
" MaterialCode,\n" + " FROM\n" +
" Version \n" + " Set_BT_Car_Platform \n" +
" ) AS TEMP3 ON temp1.[结算物料号] = temp3.MaterialCode"; " 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" + string str = "SELECT\n" +
" temp1.*,\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 ) ) 价格差异,\n" +
" ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" +
"FROM\n" + "FROM\n" +
" (\n" + " (\n" +
" SELECT\n" + " SELECT\n" +
" ISNULL( A.Price, 0 ) 结算单价,\n" + " A.StorageLocation 收货仓库,\n" +
" ISNULL( A.Qty, 0 ) 结算数量,\n" + " A.StorageLocationDesc 收货仓库描述,\n" +
" ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" + " C.MaterialCode Sap编码,\n" +
" a.MaterialCode 结算物料号,\n" + " A.MaterialCode 结算物料号,\n" +
" A.StorageLocation 收货仓库,\n" + " C.EstimateTypeDesc 物料组,\n" +
" A.StorageLocationDesc 收货仓库描述,\n" + " C.MaterialDesc 物料描述,\n" +
" C.EstimateTypeDesc 物料组,\n" + " CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" +
" C.MaterialCode Sap编码,\n" + " a.[AcceptanceNo] AS 结算验收单号,\n" +
" C.MaterialDesc 物料描述,\n" + " ISNULL( A.Price, 0 ) 结算单价,\n" +
" 0 寄销库数量 \n" + " ISNULL( A.Qty, 0 ) 结算数量,\n" +
" FROM\n" + " ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" +
" Set_BT_Car_Platform A\n" + " 0 寄销库数量 \n" +
" LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " FROM\n" +
" \n" + " Set_BT_Car_Platform A\n" +
" WHERE\n" + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" a.Version= '{0}' \n" + " WHERE\n" +
" AND a.StorageLocationDesc LIKE '%备品%'\n" + " a.Version= '{0}' \n" +
" ) temp1\n" + " AND a.StorageLocationDesc LIKE '%备品%' \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" +
" "; " 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.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" + " (\n" +
@ -326,7 +334,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" MaterialCode,\n" + " MaterialCode,\n" +
" StorageLocation,\n" + " StorageLocation,\n" +
" StorageLocationDesc,\n" + " StorageLocationDesc,\n" +
" Version \n" + " Version,\n" +
" AcceptanceNo,\n" +
" AcceptanceDate \n" +
" FROM\n" + " FROM\n" +
" Set_BT_Car_Platform \n" + " Set_BT_Car_Platform \n" +
" WHERE\n" + " WHERE\n" +
@ -336,7 +346,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" MaterialCode,\n" + " MaterialCode,\n" +
" StorageLocation,\n" + " StorageLocation,\n" +
" StorageLocationDesc,\n" + " StorageLocationDesc,\n" +
" Version \n" + " Version,\n" +
" AcceptanceNo,\n" +
" AcceptanceDate \n" +
" ) A\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" +
@ -350,7 +362,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Set_BT_Car_Platform \n" + " Set_BT_Car_Platform \n" +
" WHERE\n" + " WHERE\n" +
" version = '{0}' \n" + " version = '{0}' \n" +
" AND StorageLocationDesc LIKE '%备品%' \n" + " AND StorageLocationDesc LIKE '%备品%' \n" +
" GROUP BY\n" + " GROUP BY\n" +
" MaterialCode,\n" + " MaterialCode,\n" +
" Version \n" + " Version \n" +
@ -379,7 +391,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public HQCarSettledDetailDiff(string sapMaterialCode, string materialCode, string materialDesc, decimal price, public HQCarSettledDetailDiff(string sapMaterialCode, string materialCode, string materialDesc, decimal price,
string storageLocation, string storageLocationDesc, decimal selprice, decimal diffprice, decimal sumprice, decimal settleprice, decimal qty, 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; SAP编码 = sapMaterialCode;
= materialDesc; = materialDesc;
@ -394,55 +406,53 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
= qty; = qty;
= settleprice; = settleprice;
= metarialGroup; = metarialGroup;
= acceptanceNo;
= acceptanceDate;
} }
[ExporterHeader(DisplayName = "交货日期",IsIgnore = true)]
[ExporterHeader(DisplayName = "交货日期")]
public string { set; get; } public string { set; get; }
[ExporterHeader(DisplayName = "手工或自动")] [ExporterHeader(DisplayName = "手工或自动", IsIgnore = true)]
public string { set; get; } public string { set; get; }
[ExporterHeader(DisplayName = "交货单号")] [ExporterHeader(DisplayName = "交货单号", IsIgnore = true)]
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 = "订货看板号")]
public string { set; get; } [ExporterHeader(DisplayName = "Sap编码")]
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 = "SAP编码")]
public string SAP编码 { 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 = "发货数量")]
public decimal { 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; }
[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 = "结算单价")] [ExporterHeader(DisplayName = "结算单价")]
public decimal { set; get; } public decimal { set; get; }
[ExporterHeader(DisplayName = "结算数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "结算金额")] [ExporterHeader(DisplayName = "结算金额")]
public decimal { set; get; } public decimal { set; get; }
[ExporterHeader(DisplayName = "数量差异")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "价格差异")] [ExporterHeader(DisplayName = "价格差异")]
public decimal { set; get; } public decimal { set; get; }
[ExporterHeader(DisplayName = "差异总金额")] [ExporterHeader(DisplayName = "差异总金额")]

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

@ -816,10 +816,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<HQHSettledDetailDiff> GetReverseSettledDetailDiffReportList(string version, string materialCode, string begin, string end, string materialGroup) public virtual List<HQHUnSettledDetailDiff> GetReverseSettledDetailDiffReportList(string version, string materialCode, string begin, string end, string materialGroup)
{ {
List<HQHSettledDetailDiff> _list = new List<HQHSettledDetailDiff>(); List<HQHUnSettledDetailDiff> _list = new List<HQHUnSettledDetailDiff>();
string condition = " "; string condition = " ";
@ -833,63 +833,61 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
} }
string str = "SELECT\n" + string str = "SELECT\n" +
" temp1.交货时间,\n" + " temp1.交货时间,\n" +
" isnull( temp1.手工或自动, '' ) 手工或自动,\n" + " isnull( temp1.手工或自动, '' ) 手工或自动,\n" +
" isnull( temp1.交货单号, '' ) 交货单号,\n" + " isnull( temp1.交货单号, '' ) 交货单号,\n" +
" temp1.收货仓库,\n" + " temp1.收货仓库,\n" +
" temp1.收货仓库描述,\n" + " temp1.收货仓库描述,\n" +
" temp1.订货看板编号,\n" + " temp1.订货看板编号,\n" +
" temp1.订货零件号,\n" + " temp1.订货零件号,\n" +
" temp1.Sap编码,\n" + " temp1.Sap编码,\n" +
" temp1.[客户物料号],\n" + " temp1.[客户物料号],\n" +
" temp1.发货零件号,\n" + " temp1.物料组,\n" +
" temp1.物料组,\n" + " temp1.零件中文名称,\n" +
" temp1.零件中文名称,\n" + " temp1.发货数量,\n" +
" temp1.发货数量,\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( 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" +
" 0 AS 数量差异,\n" + " temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
" temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" + " ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * temp1.发货数量 AS 差异总金额 \n" +
" ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + "FROM\n" +
"FROM\n" + " (\n" +
" (\n" + " SELECT\n" +
" SELECT\n" + " a.WmsBillNum AS 交货单号,\n" +
" a.WmsBillNum AS 交货单号,\n" + " CONVERT ( VARCHAR ( 100 ), a.LastModificationTime, 23 ) AS 交货时间 ,\n" +
" CONVERT ( VARCHAR ( 100 ), a.LastModificationTime, 23 ) AS 交货时间 ,\n" + " a.IsAuto AS 手工或自动,\n" +
" a.IsAuto AS 手工或自动,\n" + " b.StorageLocation AS 收货仓库,\n" +
" b.StorageLocation AS 收货仓库,\n" + " b.StorageLocationDesc AS 收货仓库描述,\n" +
" b.StorageLocationDesc AS 收货仓库描述,\n" + " a.Kanban AS 订货看板编号,\n" +
" a.Kanban AS 订货看板编号,\n" + " b.MaterialCode AS 订货零件号,\n" +
" b.MaterialCode AS 订货零件号,\n" + " c.MaterialCode Sap编码,\n" +
" c.MaterialCode Sap编码,\n" + " c.CustomerPartCode 客户物料号,\n" +
" c.CustomerPartCode 客户物料号,\n" + " c.MaterialDesc AS 零件中文名称,\n" +
" '' AS 发货零件号,\n" + " isnull( a.Qty, 0 ) AS 发货数量,\n" +
" c.MaterialDesc AS 零件中文名称,\n" + " isnull( a.State, 0 ) AS 发货状态,\n" +
" isnull( a.Qty, 0 ) AS 发货数量,\n" + " b.AcceptanceNo AS 结算验收单号,\n" +
" isnull( a.State, 0 ) AS 发货状态,\n" + " isnull( b.Qty, 0 ) AS 结算数量,\n" +
" b.AcceptanceNo AS 结算验收单号,\n" + " isnull( b.Price, 0 ) AS 结算单价,\n" +
" isnull( b.Qty, 0 ) AS 结算数量,\n" + " isnull( b.Amt, 0 ) AS 结算金额 ,\n" +
" isnull( b.Price, 0 ) AS 结算单价,\n" + " C.EstimateTypeDesc AS 物料组 \n" +
" isnull( b.Amt, 0 ) AS 结算金额 ,\n" + " FROM\n" +
" C.EstimateTypeDesc AS 物料组 \n" + " Set_HQ_H_Kanban AS a\n" +
" FROM\n" + " LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" +
" Set_HQ_H_Kanban AS a\n" + " AND a.MaterialCode = b.MaterialCode\n" +
" LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" + " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" AND a.MaterialCode = b.MaterialCode\n" + " WHERE\n" +
" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " b.HQHKanBan IS NULL \n" +
" WHERE\n" + " AND b.MaterialCode IS NULL {0}\n" +
" b.HQHKanBan IS NULL \n" + " ) AS temp1\n" +
" AND b.MaterialCode IS NULL {0} \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";
" ) 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 _sql = string.Format(str, condition);
var _query = DbConnection.Query<HQHSettledDetailDiff>(_sql, null, null, true, 1200, null); var _query = DbConnection.Query<HQHUnSettledDetailDiff>(_sql, null, null, true, 1200, null);
_list = _query.ToList(); _list = _query.ToList();
return _list; return _list;
@ -1061,9 +1059,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
// condition += string.Format(" and a.LastModificationTime<='{0}' ", end); // condition += string.Format(" and a.LastModificationTime<='{0}' ", end);
//} //}
string str = "SELECT\n" + string str = "SELECT\n" +
" temp1.*,\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 ) ) 价格差异,\n" +
" ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" + " ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" +
"FROM\n" + "FROM\n" +
@ -1075,20 +1074,27 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" A.MaterialCode 结算物料号,\n" + " A.MaterialCode 结算物料号,\n" +
" A.StorageLocation 收货仓库,\n" + " A.StorageLocation 收货仓库,\n" +
" A.StorageLocationDesc 收货仓库描述,\n" + " A.StorageLocationDesc 收货仓库描述,\n" +
" a.[AcceptanceNo] AS 结算验收单号,\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" +
" a.Factory AS 工厂,\n" +
" a.HQHKanBan AS 订货看板编号,\n" +
" a.AcceptanceDate 验收单日期,\n" +
" 0 寄销库数量 \n" + " 0 寄销库数量 \n" +
" FROM\n" + " FROM\n" +
" (\n" + " (\n" +
" SELECT\n" + " SELECT SUM\n" +
" Price,\n" + " ( Qty ) AS Qty,\n" +
" SUM ( Qty ) Qty,\n" +
" MaterialCode,\n" + " MaterialCode,\n" +
" Version,\n" +
" StorageLocation,\n" + " StorageLocation,\n" +
" StorageLocationDesc,\n" + " StorageLocationDesc,\n" +
" AcceptanceNo \n" + " Factory,\n" +
" AcceptanceNo,\n" +
" Price,\n" +
" HQHKanBan,\n" +
" CONVERT ( VARCHAR ( 100 ), AcceptanceDate, 23 ) AcceptanceDate \n" +
" FROM\n" + " FROM\n" +
" Set_HQ_H_Platform \n" + " Set_HQ_H_Platform \n" +
" WHERE\n" + " WHERE\n" +
@ -1096,14 +1102,63 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" AND HQHKanBan = 'BJ' \n" + " AND HQHKanBan = 'BJ' \n" +
" GROUP BY\n" + " GROUP BY\n" +
" MaterialCode,\n" + " MaterialCode,\n" +
" Version,\n" +
" StorageLocation,\n" + " StorageLocation,\n" +
" StorageLocationDesc,\n" + " StorageLocationDesc,\n" +
" price,\n" + " Factory,\n" +
" AcceptanceNo \n" + " AcceptanceNo,\n" +
" Price,\n" +
" HQHKanBan,\n" +
" AcceptanceDate \n" +
" ) A\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"; " 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, condition);
var _sql = string.Format(str, version); var _sql = string.Format(str, version);
@ -1142,7 +1197,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
string str = "SELECT\n" + string str = "SELECT\n" +
" temp1.*,\n" + " temp1.*,\n" +
" isnull( temp2.Price, 0 ) 销售单价,\n" + " isnull( temp2.Price, 0 ) 发货定价,\n" +
" isnull( temp3.Price, 0 ) 结算单价,\n" + " isnull( temp3.Price, 0 ) 结算单价,\n" +
" ( isnull( temp3.Price, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" + " ( isnull( temp3.Price, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" +
" (temp3.Price * temp1.结算数量) 结算金额,\n" + " (temp3.Price * temp1.结算数量) 结算金额,\n" +
@ -1219,52 +1274,72 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
decimal sockQty) decimal sockQty)
{ {
Sap编码 = sapMaterialCode; Sap编码 = sapMaterialCode;
= materialDesc; = materialDesc;
= materialCode; = materialCode;
= sockQty; = sockQty;
= price; = price;
= storageLocation; = storageLocation;
= storageLocationDesc; = storageLocationDesc;
= selprice; = selprice;
= diffprice; = diffprice;
= sumprice; = sumprice;
= qty; = qty;
= settleprice; = settleprice;
} }
[ExporterHeader(DisplayName = "工厂")]
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 = "订货看板编号")]
public string { set; get; }
[ExporterHeader(DisplayName = "Sap编码")]
public string Sap编码 { 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 = "零件中文名称")]
public string { set; get; }
[ExporterHeader(DisplayName = "验收单日期")]
public string { set; get; }
[ExporterHeader(DisplayName = "结算验收单号")]
public string { set; get; }
[ExporterHeader(DisplayName = "发货定价")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "结算数量")] [ExporterHeader(DisplayName = "结算数量")]
public decimal { set; get; } public decimal { set; get; }
[ExporterHeader(DisplayName = "结算单价")] [ExporterHeader(DisplayName = "结算单价")]
public decimal { set; get; } public decimal { set; get; }
[ExporterHeader(DisplayName = "销售单价")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "结算金额")] [ExporterHeader(DisplayName = "结算金额")]
public decimal { set; get; } public decimal { set; get; }
[ExporterHeader(DisplayName = "Sap编码")]
public string Sap编码 { set; get; } [ExporterHeader(DisplayName = "价格差异")]
[ExporterHeader(DisplayName = "物料组(车型)")] public decimal { set; get; }
public string { set; get; }
[ExporterHeader(DisplayName = "差异总金额")] [ExporterHeader(DisplayName = "差异总金额")]
public decimal { set; get; } public decimal { set; get; }
[ExporterHeader(DisplayName = "价格差异")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "寄销库数量")] [ExporterHeader(DisplayName = "寄销库数量")]
public decimal { set; get; } public decimal { set; get; }
} }
public class HQHSettledDetailDiff public class HQHSettledDetailDiff
{ {
@ -1288,12 +1363,13 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public string { set; get; } public string { set; get; }
[ExporterHeader(DisplayName = "Sap编码")] [ExporterHeader(DisplayName = "Sap编码")]
public string Sap编码 { set; get; } public string Sap编码 { 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 = "发货数量")] [ExporterHeader(DisplayName = "发货数量")]
public decimal { set; get; } public decimal { set; get; }
[ExporterHeader(DisplayName = "发货状态")] [ExporterHeader(DisplayName = "发货状态")]
@ -1333,6 +1409,72 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "验收单日期")] [ExporterHeader(DisplayName = "验收单日期")]
public string { set; get; } 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 class HQHSettleQtyDiff
{ {
public string { set; get; } public string { set; get; }

26
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs

@ -83,7 +83,9 @@ namespace SettleAccount.Job.Services.Report
itm., itm.,
itm., itm.,
tm1 == null ? 0 : tm1.Qty, tm1 == null ? 0 : tm1.Qty,
itm. itm.,
itm.,
itm.
); );
@ -108,7 +110,9 @@ namespace SettleAccount.Job.Services.Report
itm., itm.,
itm., itm.,
tm1 == null ? 0 : tm1.Qty, tm1 == null ? 0 : tm1.Qty,
itm. itm.,
itm.,
itm.
); );
//if (!string.IsNullOrEmpty(kanban)) //if (!string.IsNullOrEmpty(kanban))
@ -138,14 +142,16 @@ namespace SettleAccount.Job.Services.Report
_ls = _ls.Where(p => _groupList.Contains(p.)).ToList(); _ls = _ls.Where(p => _groupList.Contains(p.)).ToList();
} }
} }
//if (!string.IsNullOrEmpty(materialCode))
//{ if (!string.IsNullOrEmpty(materialCode))
// var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList(); {
// if (_groupList.Count() > 0) var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();
// { if (_groupList.Count() > 0)
// _ls = _ls.Where(p => _groupList.Contains(p.结算物料号)).ToList(); {
// } _ls = _ls.Where(p => _groupList.Contains(p.)).ToList();
//} }
}
if (!string.IsNullOrEmpty(sapCode)) if (!string.IsNullOrEmpty(sapCode))
{ {
var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList(); var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList();

4
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSharePartSettledDetailDiffExportService.cs

@ -72,11 +72,11 @@ namespace SettleAccount.Job.Services.Report
select new HQHSharePartSettledDetailDiff( select new HQHSharePartSettledDetailDiff(
itm.Sap编码, itm.Sap编码,
itm., itm.,
itm., itm.,
itm., itm.,
itm., itm.,
itm., itm.,
itm., itm.,
itm., itm.,
itm., itm.,
itm., itm.,

Loading…
Cancel
Save