From 7e1798da60950aa4171950b9f7f0d11ea59c887b Mon Sep 17 00:00:00 2001 From: mzr <1562242162@qq.com> Date: Thu, 14 Nov 2024 10:22:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E5=8D=95=E6=94=B6=E5=9B=9E?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=A0=A1=E9=AA=8C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/pu/dhjyd/dhjydmaster/DhjydMasterVOServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pu/src/private/nc/impl/pu/dhjyd/dhjydmaster/DhjydMasterVOServiceImpl.java b/pu/src/private/nc/impl/pu/dhjyd/dhjydmaster/DhjydMasterVOServiceImpl.java index 82e6bd3..11a522e 100644 --- a/pu/src/private/nc/impl/pu/dhjyd/dhjydmaster/DhjydMasterVOServiceImpl.java +++ b/pu/src/private/nc/impl/pu/dhjyd/dhjydmaster/DhjydMasterVOServiceImpl.java @@ -570,10 +570,13 @@ public class DhjydMasterVOServiceImpl extends ServiceSupport implements IDhjydMa errors += "单据号:[" + jydMasterVO.getAttributeValue("code") + "]收回失败,失败原因:到货检验单已审核通过,请勿收回。\n"; } } else { + String def1 = jydMasterVO.getAttributeValue("def1") + ""; // 到货检验单的校验 // 查询采购入库单是否存在该id - String countSql = "select count(1) from IC_PURCHASEIN_B where csourcebillhid = '[otherId]' and dr = 0;"; + String countSql = "select count(1) from IC_PURCHASEIN_B " + + "where csourcebillhid = '[otherId]' and csourcebillbid = '[def1]' and dr = 0;"; countSql = countSql.replace("[otherId]", otherId); + countSql = countSql.replace("[def1]", def1); Integer num = (Integer) getBaseDAO().executeQuery(countSql, new ColumnProcessor()); if (num > 0) { errors += "单据号:[" + jydMasterVO.getAttributeValue("code") + "]收回失败,失败原因:到货单已入库,请勿收回。\n";