|
@ -156,13 +156,15 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
|
|
|
|
|
|
var sql2 = "SELECT\n" + |
|
|
var sql2 = "SELECT\n" + |
|
|
" a.WmsBillNum,\n" + |
|
|
" a.WmsBillNum,\n" + |
|
|
" a.MaterialCode,\n" + |
|
|
" t1.MaterialCode MaterialCode,\n" + |
|
|
" a.Kanban ,\n" + |
|
|
" a.Kanban ,\n" + |
|
|
" a.A.LastModificationTime WmsDate \n" + |
|
|
" A.LastModificationTime WmsDate \n" + |
|
|
"FROM\n" + |
|
|
"FROM\n" + |
|
|
" Set_HQ_H_Kanban A\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" + |
|
|
" 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"; |
|
|
" AND A.MaterialCode = B.MaterialCode " + |
|
|
|
|
|
" left join Set_material t1 on a.MaterialCode=t1.CustomerPartCode "; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -177,13 +179,15 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
|
|
|
|
|
|
var sql3 = "SELECT\n" + |
|
|
var sql3 = "SELECT\n" + |
|
|
" a.WmsBillNum,\n" + |
|
|
" a.WmsBillNum,\n" + |
|
|
" a.MaterialCode,\n" + |
|
|
" t1.MaterialCode MaterialCode,\n" + |
|
|
" a.Kanban,\n" + |
|
|
" a.Kanban,\n" + |
|
|
" A.LastModificationTime WmsDate \n" + |
|
|
" A.LastModificationTime WmsDate \n" + |
|
|
"FROM\n" + |
|
|
"FROM\n" + |
|
|
" Set_HQ_H_Kanban A\n" + |
|
|
" Set_HQ_H_Kanban A\n" + |
|
|
" LEFT JOIN ( SELECT MaterialCode, Kanban FROM Set_HQ_H_Kanban GROUP BY MaterialCode, Kanban HAVING COUNT(*)> 1 ) B ON A.Kanban = B.Kanban \n" + |
|
|
" LEFT 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" + |
|
|
" AND A.MaterialCode = B.MaterialCode \n" + |
|
|
|
|
|
" left join Set_material t1 on a.MaterialCode=t1.CustomerPartCode \n"+ |
|
|
|
|
|
|
|
|
"WHERE\n" + |
|
|
"WHERE\n" + |
|
|
" B.Kanban IS NULL"; |
|
|
" B.Kanban IS NULL"; |
|
|
|
|
|
|
|
|