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 0f221e6d..ba82bef8 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 @@ -156,13 +156,15 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report var sql2 = "SELECT\n" + " a.WmsBillNum,\n" + - " a.MaterialCode,\n" + + " t1.MaterialCode MaterialCode,\n" + " a.Kanban ,\n" + - " a.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"; + " 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" + " a.WmsBillNum,\n" + - " a.MaterialCode,\n" + + " t1.MaterialCode MaterialCode,\n" + " a.Kanban,\n" + " A.LastModificationTime WmsDate \n" + "FROM\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" + " AND A.MaterialCode = B.MaterialCode \n" + + " left join Set_material t1 on a.MaterialCode=t1.CustomerPartCode \n"+ + "WHERE\n" + " B.Kanban IS NULL";