| | |
| | | package com.zy.common.web; |
| | | |
| | | import com.alibaba.excel.util.StringUtils; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.mes.MesReturn; |
| | | import com.zy.asrs.entity.param.EmptyPlateOutParam; |
| | | import com.zy.asrs.entity.result.FindLocNoAttributeVo; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.service.impl.RcsServiceImpl; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.model.LocTypeDto; |
| | | import com.zy.common.model.StartupDto; |
| | |
| | | import com.zy.common.web.param.SearchLocParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | @Value("${mes.url}") |
| | | public String MES_URL; |
| | | |
| | | // TODO:称重、拍照上报存储,CTU料箱运转 |
| | | |
| | | @PostMapping("/pakin/loc/v1") |
| | |
| | | if (Cools.isEmpty(param.getSourceStaNo())) { |
| | | return R.error("源站编号不能为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getSourceStaNo())) { |
| | | return R.error("托盘不能为空或者托盘码不为八位"); |
| | | if (Cools.isEmpty(param.getBarcode()) || param.getBarcode().equals("00000000")) { |
| | | return R.error(".托盘码不能为空或者托盘码为0"); |
| | | } |
| | | if (param.getSourceStaNo() == 301 || param.getSourceStaNo() == 304){ |
| | | String url = "CameraPictureRecognition"; |
| | | |
| | | // return R.error("配盘不正确"); |
| | | // String URL = MES_URL + url; |
| | | // String URL = "172.26.160.74:8080/basicmodel/WmsFit/Api/CameraPictureRecognition"; |
| | | // try{ |
| | | // String response = RcsServiceImpl.sendPost(url, JSONObject.toJSONString(param)); |
| | | // if (!StringUtils.isEmpty(response) && response.contains("Success")) { |
| | | // MesReturn mesReturn = JSONObject.parseObject(response, MesReturn.class); |
| | | // if ("2".equals(mesReturn.getSuccess())) { |
| | | // return R.error("配盘不正确"); |
| | | // }else { |
| | | // log.info("配盘正确,允许入库"); |
| | | // } |
| | | // } |
| | | // } catch (Exception e) { |
| | | // return R.error("MES地址连接超时"); |
| | | // } |
| | | |
| | | } |
| | | List<WaitPakin> waitPakins = null; |
| | | if (param.getIoType() == 1) { |
| | |
| | | } |
| | | //查看是否有相关的AGV搬运任务存在 |
| | | List<Task> tasks = taskService.selectList(new EntityWrapper<Task>() |
| | | .eq("task_type", "AGV补空料架") |
| | | .andNew() |
| | | .in("sta_no", wrkMast.getStaNo(),wrkMast.getMemo()) |
| | | .or() |
| | | .in("source_sta_no", wrkMast.getStaNo(),wrkMast.getMemo())); |