Browse Source

加交货日期过滤条件

FoShanPG
44673626 3 years ago
parent
commit
974b33cb24
  1. 29
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs
  2. 19
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs

29
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs

@ -548,16 +548,19 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//发运数据中,查出看板号+物料号相同的重复数据
var sql2 = "SELECT\n" +
" a.WmsBillNum,\n" +
" t1.MaterialCode MaterialCode,\n" +
" a.Kanban ,\n" +
" A.LastModificationTime WmsDate \n" +
"FROM\n" +
" Set_HQ_H_Kanban A\n" +
" INNER JOIN ( SELECT MaterialCode, Kanban FROM Set_HQ_H_Kanban GROUP BY MaterialCode, Kanban HAVING COUNT(*)> 1 ) B ON A.Kanban = B.Kanban \n" +
" AND A.MaterialCode = B.MaterialCode " +
" left join Set_material t1 on a.MaterialCode=t1.CustomerPartCode ";
var listCompare = DbConnection.Query<CompareFactoryExtend>(sql2);
" a.WmsBillNum,\n" +
" t1.MaterialCode MaterialCode,\n" +
" a.Kanban ,\n" +
" A.LastModificationTime WmsDate \n" +
"FROM\n" +
" Set_HQ_H_Kanban A\n" +
" INNER JOIN ( SELECT MaterialCode, Kanban FROM Set_HQ_H_Kanban GROUP BY MaterialCode, Kanban HAVING COUNT ( * ) > 1 ) B ON A.Kanban = B.Kanban \n" +
" AND A.MaterialCode = B.MaterialCode\n" +
" LEFT JOIN Set_material t1 ON a.MaterialCode= t1.CustomerPartCode \n" +
"WHERE\n" +
" 1 = 1 {0}";
var _sql2=string.Format(sql2, condition);
var listCompare = DbConnection.Query<CompareFactoryExtend>(_sql2);
@ -575,9 +578,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" left join Set_material t1 on a.MaterialCode=t1.CustomerPartCode \n" +
"WHERE\n" +
" B.Kanban IS NULL";
var listCompare1 = DbConnection.Query<CompareFactoryExtend>(sql3);
" B.Kanban IS NULL {0} ";
var _sql3 = string.Format(sql2, condition);
var listCompare1 = DbConnection.Query<CompareFactoryExtend>(_sql3);

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

@ -714,13 +714,16 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" a.WmsBillNum,\n" +
" t1.MaterialCode MaterialCode,\n" +
" a.Kanban ,\n" +
" A.LastModificationTime WmsDate \n" +
" A.LastModificationTime WmsDate \n" +
"FROM\n" +
" Set_HQ_H_Kanban A\n" +
" INNER JOIN ( SELECT MaterialCode, Kanban FROM Set_HQ_H_Kanban GROUP BY MaterialCode, Kanban HAVING COUNT(*)> 1 ) B ON A.Kanban = B.Kanban \n" +
" AND A.MaterialCode = B.MaterialCode " +
" left join Set_material t1 on a.MaterialCode=t1.CustomerPartCode ";
var listCompare = DbConnection.Query<CompareExtend>(sql2);
" INNER JOIN ( SELECT MaterialCode, Kanban FROM Set_HQ_H_Kanban GROUP BY MaterialCode, Kanban HAVING COUNT ( * ) > 1 ) B ON A.Kanban = B.Kanban \n" +
" AND A.MaterialCode = B.MaterialCode\n" +
" LEFT JOIN Set_material t1 ON a.MaterialCode= t1.CustomerPartCode \n" +
"WHERE\n" +
" 1 = 1 {0} ";
var _sql2 = string.Format(str, condition);
var listCompare = DbConnection.Query<CompareExtend>(_sql2);
@ -738,9 +741,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" left join Set_material t1 on a.MaterialCode=t1.CustomerPartCode \n" +
"WHERE\n" +
" B.Kanban IS NULL";
" B.Kanban IS NULL {0}";
var listCompare1 = DbConnection.Query<CompareExtend>(sql3);
var _sql3 = string.Format(str, condition);
var listCompare1 = DbConnection.Query<CompareExtend>(_sql3);
string contionCompare = string.Empty;

Loading…
Cancel
Save