| | |
| | | import java.util.Date; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/6/11 |
| | |
| | | //查询入库通知档 |
| | | List<AgvWaitPakin> agvWaitPakinList = agvWaitPakinService.selectByContainerCode(containerCode); |
| | | if(!Cools.isEmpty(agvWaitPakinList)){ |
| | | AtomicBoolean isCurrLev = new AtomicBoolean(false); |
| | | agvWaitPakinList.forEach(agvWaitPakin -> { |
| | | if (agvWaitPakin.getProcessSts() == 1) { |
| | | isCurrLev.set(true); |
| | | } |
| | | }); |
| | | if (isCurrLev.get()) { |
| | | agvLocMast = agvCommonService.getLocNo(locType,agvBasDevp.getFloor(),false,true); |
| | | } else { |
| | | agvLocMast = agvCommonService.getLocNo(locType,agvBasDevp.getFloor(),false,false); |
| | | } |
| | | |
| | | agvLocMast = agvCommonService.getLocNo(locType,agvBasDevp.getFloor(),false,false); |
| | | |
| | | |
| | | String devNo = agvBasDevp.getDevNo(); |
| | | String locNo = agvLocMast.getLocNo(); |
| | |
| | | AgvWrkMast wrkMast = createWrkMast(1,201L,devNo,locNo,containerCode,now,userId, containerType); |
| | | //生成工作档明细 |
| | | agvWaitPakinList.forEach(wp -> { |
| | | createWrkDetlReWrite(wp.getMatnr(),wrkMast.getWrkNo(),wp.getOrderNo(),wp.getBatch(),wp.getAnfme(),wp.getSuppCode(),now,userId,wp.getThreeCode(),wp.getDeadTime()); |
| | | createWrkDetlReWrite(wp.getMatnr(),wrkMast.getWrkNo(),wp.getOrderNo(),wp.getBatch(),wp.getAnfme(),wp.getSuppCode(),now,userId,wp.getThreeCode(),wp.getDeadTime(),wp.getProcessSts()); |
| | | }); |
| | | //修改入库通知档状态 |
| | | agvWaitPakinService.updateIoStatus(containerCode,"Y"); |
| | |
| | | /* |
| | | 生成工作档明细 |
| | | */ |
| | | private void createWrkDetlReWrite(String matnr, int wrkNo, String orderNo,String batch, double anfme, String zpallet, Date now, Long userId, String csocode, String isoseq){ |
| | | private void createWrkDetlReWrite(String matnr, int wrkNo, String orderNo,String batch, double anfme, String zpallet, Date now, Long userId, String csocode, String isoseq,Integer processSts){ |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(matnr + "商品维护失败"); |
| | |
| | | wrkDetl.setBatch(batch); |
| | | wrkDetl.setAnfme(anfme); // 数量 |
| | | wrkDetl.setSuppCode(zpallet); // 货架条码 |
| | | wrkDetl.setProcessSts(processSts); |
| | | wrkDetl.setAppeUser(userId); |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setModiUser(userId); |
| | | wrkDetl.setModiTime(now); |
| | | |
| | | wrkDetl.setThreeCode(csocode); |
| | | wrkDetl.setDeadTime(isoseq); |
| | | if (!agvWrkDetlService.insert(wrkDetl)) { |