| | |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | int matType = 0; |
| | | Integer matType = 0; |
| | | |
| | | // 无单组托 |
| | | if (Cools.isEmpty(param.getOrderNo())) { |
| | |
| | | waitPakin.setFrozen(param.getFrozen()); // 是否冻结 |
| | | waitPakin.setManu(detlDto.getCstmr()); |
| | | waitPakin.setMatType(mat.getMatType());//物料类型 |
| | | // if (Cools.isEmpty(mat.getMatType())){ |
| | | // throw new CoolException("物料类型异常"+mat.getMatnr()); |
| | | // }else { |
| | | // if (matType == 0){ |
| | | // matType = mat.getMatType(); |
| | | // }else if (matType!=mat.getMatType()){ |
| | | // throw new CoolException("请组托同一类型的物料"); |
| | | // } |
| | | // } |
| | | if (Cools.isEmpty(mat.getMatType())){ |
| | | throw new CoolException("物料类型异常"+mat.getMatnr()); |
| | | }else { |
| | | if (matType == 0){ |
| | | matType = mat.getMatType(); |
| | | }else if (!matType.equals(mat.getMatType())){ |
| | | throw new CoolException("请组托同一类型的物料"); |
| | | } |
| | | } |
| | | if (!waitPakinService.insert(waitPakin)) { |
| | | throw new CoolException("保存入库通知档失败"); |
| | | } |