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);