自动化立体仓库 - WMS系统
skyouc
3 天以前 e466acffabd3cba968bd5c6cbc89de8c5eedb38a
src/main/java/com/zy/asrs/controller/OpenController.java
@@ -13,6 +13,7 @@
import com.zy.asrs.service.WrkMastService;
import com.zy.common.model.DetlDto;
import com.zy.common.web.BaseController;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -47,8 +48,9 @@
    public Map<String, Object> agvPickupComplete(@RequestBody AgvTaskParam agvTaskParam, HttpServletRequest request) {
        //        DecimalFormat df = new DecimalFormat("0000");
        //        String wrkNo = "Ctu"+df.format(param.getWrkNo())+date.getTime()/1000;
        String wrkNo = agvTaskParam.getTaskCode().substring(3,7);
        Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", Integer.parseInt(wrkNo)));
//        String wrkNo = agvTaskParam.getTaskCode().substring(3,7);
//        Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", Integer.parseInt(wrkNo)));
        Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", agvTaskParam.getTaskCode()));
        if (Cools.isEmpty(task)) {
            log.error("未查询到任务号对应的数据");
        }
@@ -68,19 +70,17 @@
    @AppAuth(memo = "AGV放货完成接口")
    public Map<String, Object> agvTaskComplete(@RequestBody AgvTaskParam agvTaskParam,HttpServletRequest request) {
        HashMap<String, Object> map = new HashMap<>();
        String wrkNo = agvTaskParam.getTaskCode().substring(3,7);
        Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", Integer.parseInt(wrkNo)));
//        String wrkNo = agvTaskParam.getTaskCode().substring(3,7);
//        Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", Integer.parseInt(wrkNo)));
        Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", agvTaskParam.getTaskCode()));
        if (Cools.isEmpty(task)) {
            log.error("未查询到任务号对应的数据");
        }
        taskService.updateById(task);
        if (task.getIoType() < 100 ){
            task.setWrkSts(4L);
        }else {
            task.setWrkSts(14L);
        }
        taskService.updateById(task);
        map.put("code","0");
@@ -107,6 +107,17 @@
        return R.ok();
    }
    @PostMapping("/queryTask")
    @ApiOperation("任务执行信息查询")
    public synchronized R queryTaskInfo(@RequestBody TvQueryParam param) {
        if (Objects.isNull(param)) {
            return R.error("参数不能为空!!");
        }
        return  openService.queryTaskInfo(param);
    }
    @PostMapping("/order/matSync/default/v1")
//    @AppAuth(memo = "商品信息同步接口")
    public synchronized R syncMatInfo(@RequestHeader(required = false) String appkey,