| | |
| | | .eq("loc_no", dto.getLocNo())); |
| | | |
| | | short staNo = dto.getStaNo().shortValue(); |
| | | |
| | | int sourceStaNo = dto.getSourceStaNo(); |
| | | if (sourceStaNo == 1007) { |
| | | staNo = 2002; |
| | | } |
| | | |
| | | if (inSta.getStaNo() == 1002) { |
| | | staNo = 2002; |
| | | } |
| | |
| | | // } |
| | | |
| | | //堆垛机回原点任务中 |
| | | Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK); |
| | | Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK + crn.getId()); |
| | | if (object != null) { |
| | | continue; |
| | | } |
| | |
| | | continue; |
| | | } |
| | | |
| | | Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK); |
| | | Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK + crn.getId()); |
| | | if (object != null) { |
| | | continue; |
| | | } |
| | |
| | | continue; |
| | | } |
| | | |
| | | Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK); |
| | | Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK + crn.getId()); |
| | | if (object != null) { |
| | | continue; |
| | | } |
| | |
| | | // continue; |
| | | } |
| | | // 判断堆垛机出库站状态 |
| | | if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")) { |
| | | if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")) { |
| | | |
| | | //根据参数判断是否校验可出信号 |
| | | String crnOutVerifyOut = "Y"; |
| | |
| | | |
| | | if (crnOutVerifyOut.equals("Y")) { |
| | | if (!staProtocol.isOutEnable()) { |
| | | continue; |
| | | } |
| | | |
| | | if (staProtocol.isLoading()) { |
| | | continue; |
| | | } |
| | | |
| | |
| | | if (crnProtocol.getTaskNo() == 9999) { |
| | | // 堆垛机复位 |
| | | crnThread.setResetFlag(true); |
| | | redisUtil.set(RedisConstantType.CRN_MOVE_LOCK + crn.getId(), "lock", 8);//防止回原点后下发指令过快 |
| | | continue; |
| | | } |
| | | |
| | |
| | | // }catch (Exception e){ |
| | | // log.error("工作档案明细输入电视机失败1:异常信息==》"+e); |
| | | // } |
| | | wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto( |
| | | wrkDetl.getMatnr() |
| | | , wrkDetl.getMaktx() |
| | | , wrkDetl.getAnfme() |
| | | , wrkDetl.getWeight() |
| | | , wrkDetl.getStockNum() |
| | | , wrkDetl.getStockNum2() |
| | | , wrkDetl.getSpecs() |
| | | , wrkDetl.getSku() |
| | | , wrkDetl.getZpallet() |
| | | , wrkDetl.getModel() |
| | | , wrkDetl.getSupp() |
| | | , wrkDetl.getKpCstmrName() |
| | | , wrkDetl.getOrderNo() |
| | | , wrkDetl.getCstateid$() |
| | | ))); |
| | | |
| | | if (!wrkDetls.isEmpty()) { |
| | | WrkDetl wrkDetl = wrkDetls.get(0); |
| | | double anfme = 0D; |
| | | double weight = 0D; |
| | | for (WrkDetl detl : wrkDetls) { |
| | | anfme += detl.getAnfme(); |
| | | weight += detl.getWeight(); |
| | | wrkDetl.setAnfme(anfme); |
| | | wrkDetl.setWeight(weight); |
| | | } |
| | | |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | .eq("loc_no", wrkMast.getSourceLocNo())); |
| | | double totalAnfme = 0D; |
| | | double totalWeight = 0D; |
| | | for (LocDetl locDetl : locDetls) { |
| | | totalAnfme += locDetl.getAnfme(); |
| | | totalWeight += locDetl.getWeight(); |
| | | } |
| | | wrkDetl.setStockNum(totalAnfme); |
| | | wrkDetl.setStockNum2(totalWeight); |
| | | |
| | | ledCommand.getMatDtos().add(new MatDto( |
| | | wrkDetl.getMatnr() |
| | | , wrkDetl.getMaktx() |
| | | , wrkDetl.getAnfme() |
| | | , wrkDetl.getWeight() |
| | | , wrkDetl.getStockNum() |
| | | , wrkDetl.getStockNum2() |
| | | , wrkDetl.getSpecs() |
| | | , wrkDetl.getSku() |
| | | , wrkDetl.getZpallet() |
| | | , wrkDetl.getModel() |
| | | , wrkDetl.getSupp() |
| | | , wrkDetl.getKpCstmrName() |
| | | , wrkDetl.getOrderNo() |
| | | , wrkDetl.getCstateid$() |
| | | )); |
| | | |
| | | // wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto( |
| | | // wrkDetl.getMatnr() |
| | | // , wrkDetl.getMaktx() |
| | | // , wrkDetl.getAnfme() |
| | | // , wrkDetl.getWeight() |
| | | // , wrkDetl.getStockNum() |
| | | // , wrkDetl.getStockNum2() |
| | | // , wrkDetl.getSpecs() |
| | | // , wrkDetl.getSku() |
| | | // , wrkDetl.getZpallet() |
| | | // , wrkDetl.getModel() |
| | | // , wrkDetl.getSupp() |
| | | // , wrkDetl.getKpCstmrName() |
| | | // , wrkDetl.getOrderNo() |
| | | // , wrkDetl.getCstateid$() |
| | | // ))); |
| | | } |
| | | |
| | | } |
| | | commands.add(ledCommand); |
| | | } |