|
|
@ -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); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|