diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/set/service/impl/PdaBucketServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/set/service/impl/PdaBucketServiceImpl.java index bfc8810a..bfbe671b 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/set/service/impl/PdaBucketServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/set/service/impl/PdaBucketServiceImpl.java @@ -555,8 +555,10 @@ public class PdaBucketServiceImpl implements PdaBucketService { if (ObjectUtil.isEmpty(code_info)) { throw new BadRequestException("袋码内容为空!"); } - String[] splitArr = code_info.split("##"); + if (splitArr.length<1) { + throw new BadRequestException("袋码内容为空!"); + } // 截取桶码 String bucketunique_bag = splitArr[7]; // 截取袋码 @@ -576,6 +578,9 @@ public class PdaBucketServiceImpl implements PdaBucketService { } // 判断前端传过来的批次和桶码是否与二维码中的一致 String bucketunique = whereJson.getString("bucketunique"); + if (StringUtils.isEmpty(bucketunique)){ + throw new BadRequestException("桶码信息不能为空"); + } String pcsn = whereJson.getString("pcsn"); String material_code = whereJson.getString("material_code"); if (ObjectUtil.isNotEmpty(bucketunique)) { @@ -609,6 +614,7 @@ public class PdaBucketServiceImpl implements PdaBucketService { resultTwo.put("bucketunique",bucketunique_bag); resultTwo.put("material_code",jsonMater.getString("material_code")); resultTwo.put("pcsn",pcsn_bag); + resultTwo.put("bag_id",bag_id); // 桶信息参数 JSONObject resultOne = WQL.getWO("QPADSTSETSERVICE")