From a10b2f654ddf3664c7835711ae418513b20a7ed0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-5DIJMF9\\admin" <2388969634@qq.com> Date: Wed, 11 Dec 2024 10:50:42 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E8=B4=A7=E4=BD=8D=E6=96=B0=E5=A2=9EBug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=BA=93=E5=8C=BA?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=9D=A1=E5=BA=93=E4=BD=8D=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../products/mes/service/st/bs/StructAttrServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lxservice/com/noblelift/imp/products/mes/service/st/bs/StructAttrServiceImpl.java b/lxservice/com/noblelift/imp/products/mes/service/st/bs/StructAttrServiceImpl.java index 322f1f9..a1eb05d 100644 --- a/lxservice/com/noblelift/imp/products/mes/service/st/bs/StructAttrServiceImpl.java +++ b/lxservice/com/noblelift/imp/products/mes/service/st/bs/StructAttrServiceImpl.java @@ -44,7 +44,10 @@ public class StructAttrServiceImpl implements StructAttrService { map.put("flag", "3"); map.put("sect_uuid", form.optString("sect_uuid")); JSONObject job = WQL.getWO("ST_BS_STRUCTATTRQUERY_01").addParamMap(map).process().uniqueResult(0); - int total = job.optInt("order_no"); + int total = 0; + if(job != null){ + total = job.optInt("order_no"); + } //校验编码是否重复 String code = form.optString("struct_code"); JSONObject jo = WQLObject.getWQLObject(tableName).query("struct_code=? and SYSISDELETE=?", new String[] {code,"0"}, "").uniqueResult(0);