| | |
| | | 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; |
| | | |
| | | /** |
| | | * 组托 |
| | |
| | | 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; |