| | |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.mapper.BasCrnErrorMapper; |
| | | import com.zy.asrs.mapper.WrkChargeMapper; |
| | | import com.zy.asrs.mapper.WrkMastMapper; |
| | | import com.zy.asrs.mapper.*; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.LocTypeDto; |
| | |
| | | import com.zy.common.model.StartupDto; |
| | | import com.zy.common.model.enums.WrkChargeType; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.service.erp.ErpService; |
| | | import com.zy.common.utils.CollectionUtils; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.core.CrnThread; |
| | |
| | | private CommonService commonService; |
| | | @Autowired |
| | | private WrkChargeMapper wrkChargeMapper; |
| | | @Autowired |
| | | private ErpService erpService; |
| | | @Autowired |
| | | private OrderMapper orderMapper; |
| | | @Autowired |
| | | private OrderDetlMapper orderDetlMapper; |
| | | |
| | | /** |
| | | * 组托 |
| | |
| | | // log.error("{}站点查询无待入库数据 工作号={}", crnStn.getStaNo(), staProtocol.getWorkNo()); |
| | | continue; |
| | | } |
| | | |
| | | // 同库位组进行校验 |
| | | List<String> groupLocNo = Utils.getGroupLocNo(wrkMast.getLocNo()); |
| | | if (!Cools.isEmpty(groupLocNo)) { |
| | | if (null != wrkMastMapper.selectPakoutWorkingByGroupLoc(groupLocNo)) { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (wrkMast.getWrkSts() < 3) { |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0 && staProtocol.isInEnable() |
| | | && staDetl.getCanining()!=null && staDetl.getCanining().equals("Y")) { |
| | |
| | | if (!sourceSta.getLocSts().equals("R") &&!sourceSta.getLocSts().equals("P")) { |
| | | log.error("出库操作库位状态不符合--状态, 库位号={},库位状态={}", wrkMast.getLocNo(), sourceSta.getLocSts()); |
| | | continue; |
| | | } |
| | | |
| | | // 同库位组进行校验 |
| | | List<String> groupLocNo = Utils.getGroupLocNo(wrkMast.getSourceLocNo()); |
| | | if (!Cools.isEmpty(groupLocNo)) { |
| | | if (null != wrkMastMapper.selectPakinWorkingByGroupLoc(groupLocNo)) { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | // 判断是否有同库位组的出库任务,如果有,则暂停 |
| | |
| | | ledCommand.setStaNo(wrkMast.getStaNo()); |
| | | if (wrkMast.getIoType() != 110) { |
| | | List<WrkDetl> wrkDetls = wrkDetlService.findByWorkNo(wrkMast.getWrkNo()); |
| | | wrkDetls.forEach(wrkDetl -> { |
| | | if (wrkMast.getIoType() == 101) { |
| | | ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getBatch(), wrkDetl.getAnfme())); |
| | | try { |
| | | WrkDetl wrkDetl = wrkDetls.get(0); |
| | | if (!Cools.isEmpty(wrkDetl.getOrderNo())) { |
| | | OrderDetl orderDetl = orderDetlMapper.selectItemNoneOfBatch(wrkDetl.getOrderNo(), wrkDetl.getMatnr()); |
| | | ledCommand.getMatDtos().add(new MatDto(orderDetl)); |
| | | } |
| | | if (wrkMast.getIoType() == 103 && (null == wrkDetl.getInspect() || 0 == wrkDetl.getInspect())) { |
| | | ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getBatch(), wrkDetl.getAnfme())); |
| | | } |
| | | }); |
| | | } catch (Exception e) { |
| | | log.error("led execute fail", e); |
| | | } |
| | | } |
| | | commands.add(ledCommand); |
| | | } |
| | |
| | | } while (false); |
| | | |
| | | if (steCharge == null) { |
| | | log.warn("{}号小车【电量:{}】充电失败,原因:没有空闲充电桩。", ste.getId(), steProtocol.getCharge()); |
| | | // log.warn("{}号小车【电量:{}】充电失败,原因:没有空闲充电桩。", ste.getId(), steProtocol.getCharge()); |
| | | continue; |
| | | } |
| | | String chargeLocNo = steCharge.locNo; |