| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.OpenOrderPakinParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.entity.Parameter; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.model.MesCombParam; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void comb(CombParam param, Long userId) { |
| | | public String comb(CombParam param, Long userId) { |
| | | if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | |
| | | } |
| | | }); |
| | | }else { |
| | | //关联组托 |
| | | Order order = orderService.selectByNo(param.getOrderNo()); |
| | | if (order.getSettle() > 2) { |
| | | throw new CoolException("单据编号已过期"); |
| | |
| | | orderService.updateSettle(order.getId(), 2L, userId); |
| | | } |
| | | |
| | | //关联组托 |
| | | if(StringUtils.isEmpty(param.getLocno())){ |
| | | return "组托成功"; |
| | | }else { |
| | | combBinding(param.getBarcode(),param.getLocno()); |
| | | return "组托成功,绑定站点成功"; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | EntityWrapper<AgvBasDevp> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("dev_no",stationCode); |
| | | AgvBasDevp agvBasDevp = agvBasDevpService.selectOne(wrapper); |
| | | if(agvBasDevp == null){ |
| | | throw new CoolException(stationCode + "站点信息错误"); |
| | | } |
| | | if(!"O".equals(agvBasDevp.getLocSts())){ |
| | | throw new CoolException(barcode + "该站点非空"); |
| | | throw new CoolException(stationCode + "该站点货位状态非空"); |
| | | } |
| | | |
| | | agvBasDevp.setBarcode(barcode); |
| | |
| | | agvBasDevpService.update(agvBasDevp,wrapper); |
| | | } |
| | | |
| | | public List<AgvBasDevp> getAgvBasDevpByFloor(int floor) { |
| | | EntityWrapper<AgvBasDevp> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("floor",floor).eq("cache_shelves","Y"); |
| | | return agvBasDevpService.selectList(wrapper); |
| | | } |
| | | |
| | | } |