| | |
| | | throw new CoolException("系统未检测到该包物料信息,请重新录入"); |
| | | } |
| | | |
| | | if(Cools.eq(GlobleParameter.PLA_STATUS_1,pla.getStatus())){ |
| | | throw new CoolException("该物料已入库"); |
| | | if(!pla.getStatus().equals(GlobleParameter.PLA_STATUS_0)){ |
| | | throw new CoolException("该物料状态不为待入库,无法入库"); |
| | | } |
| | | |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_1); |
| | | pla.setModifyTime(new Date()); |
| | | pla.setPakinTime(new Date()); |
| | |
| | | pla.setWeightAnfme(pla.getWeightAnfme() - anfme); |
| | | pla.setQtyAnfme(pla.getQtyAnfme() - anfme); |
| | | if(pla.getWeightAnfme() <= 0){ |
| | | pla.setStatus("全部出库"); |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_4); |
| | | }else { |
| | | pla.setStatus("部分出库"); |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_3); |
| | | } |
| | | plaService.updateById(pla); |
| | | SaasUtils.insertLog(1,locNo,batch+","+packageNo,anfme,null); |