优化出库单拉单备料计划时搜索功能

This commit is contained in:
lihao 2024-12-26 15:16:41 +08:00
parent e29c23d9fa
commit 1500287f94
1 changed files with 5 additions and 3 deletions

View File

@ -29,12 +29,14 @@ public class QueryFor4455BP1 extends Abstract422XRefQueryBP1 {
wholeSql.append(" ("); wholeSql.append(" (");
wholeSql.append(" SELECT cpickmid"); wholeSql.append(" SELECT cpickmid");
wholeSql.append(this.psor.getFinalFromWhere()); wholeSql.append(this.psor.getFinalFromWhere());
// wholeSql.append(" AND fbillstatus = 1"); 查询审核通过 todo // 查询审核通过
wholeSql.append(" AND fbillstatus = 1");
wholeSql.append(" AND APPROVERTIME > '2024-11-01'"); wholeSql.append(" AND APPROVERTIME > '2024-11-01'");
// NCCForUAPLogger.debug("finalFromWhere = " + this.psor.getFinalFromWhere()); // NCCForUAPLogger.debug("finalFromWhere = " + this.psor.getFinalFromWhere());
wholeSql.append(" ) a"); wholeSql.append(" ) a");
wholeSql.append(" INNER JOIN mm_pickm_b b ON b.cpickmid = a.cpickmid AND b.dr = 0"); wholeSql.append(" INNER JOIN mm_pickm_b b ON b.cpickmid = a.cpickmid AND b.dr = 0 ");
// 出库数量>0 todo // 出库数量>0
wholeSql.append(" AND ( COALESCE(b.nplanoutastnum, 0) - COALESCE(b.nshouldastnum, 0) - COALESCE(b.npscastnum, 0) - COALESCE(b.naccoutastnum, 0) ) >0 ");
NCCForUAPLogger.debug("wholeSql = " + wholeSql); NCCForUAPLogger.debug("wholeSql = " + wholeSql);
return wholeSql; return wholeSql;
} }