备料计划转出库申请单-数量校验

This commit is contained in:
mzr 2024-12-30 19:33:34 +08:00
parent 30fa6ee4ef
commit 13b4d92f6f
1 changed files with 5 additions and 2 deletions

View File

@ -74,9 +74,12 @@ public class N_4455_WRITE extends AbstractCompiler2 {
// 通过备料计划的表体主键查询已申请数量 // 通过备料计划的表体主键查询已申请数量
String getApplyNumSql = "SELECT NVL(SUM(nassistnum),0) nassistnum " String getApplyNumSql = "SELECT NVL(SUM(nassistnum),0) nassistnum "
+ "FROM ic_sapply_b " + "FROM ic_sapply_b "
+ "WHERE NVL(dr,0) = 0 AND csourcebillbid = '[csourcebillbid]' and cgeneralbid != '[bid]'"; + "WHERE NVL(dr,0) = 0 AND csourcebillbid = '[csourcebillbid]'";
getApplyNumSql = getApplyNumSql.replace("[csourcebillbid]", csourcebillbid); getApplyNumSql = getApplyNumSql.replace("[csourcebillbid]", csourcebillbid);
getApplyNumSql = getApplyNumSql.replace("[bid]", bodyVO.getPrimaryKey()); // 修改的时候加上子表主键
if (null != outVOs[0] && null != outVOs[0].getHead() && null != outVOs[0].getHead().getCgeneralhid()) {
getApplyNumSql += " AND cgeneralbid != '" + bodyVO.getPrimaryKey() + "'";
}
Object nassistnum = getBaseDAO().executeQuery(getApplyNumSql, Object nassistnum = getBaseDAO().executeQuery(getApplyNumSql,
new ColumnProcessor("nassistnum")); new ColumnProcessor("nassistnum"));
UFDouble applyNum = new UFDouble(String.valueOf(nassistnum)); UFDouble applyNum = new UFDouble(String.valueOf(nassistnum));