自动化立体仓库 - WMS系统
zyx
2024-03-25 7a2ce679e71f8ca970b48a65f08061412bbfe4a9
src/main/java/com/zy/common/web/WcsController.java
@@ -21,7 +21,6 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
@@ -591,8 +590,6 @@
        if(Cools.isEmpty(agvBasDevp) || !"O".equals(agvBasDevp.getLocSts())){
            throw new CoolException("当前站点不存在或者站点不为空");
        }
        AgvWaitPakin agvWaitPakin = agvWaitPakinService.selectByContainerCode(containerCode);
        AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", containerCode));
        //拣料、盘点完成任务
@@ -633,7 +630,8 @@
            currentContainerMap = new HashMap<>();
        }
        String containerCode = param.getContainerCode();
        String containerCode = param.getContainerCode().split(";")[0];
        if(Cools.isEmpty(containerCode)){
            throw new CoolException("料箱码为空");
        }
@@ -651,19 +649,22 @@
            //查询旧容器的工作档
            AgvWrkMast agvWrkMast = agvWrkMastService.selectByContainerCode(currentContainerCode);
            if(!Cools.isEmpty(agvWrkMast) && agvWrkMast.getIoType() == 101){
                //发送容器立场请求,完成工作档
                List<AgvWrkMast> agvWrkMastList = new ArrayList<>();
                agvWrkMastList.add(agvWrkMast);
                try {
                    int code = agvWrkMastService.containerMoveOut(agvWrkMastList);
                    if(code == 0){
                        //将工作党状态改为容器离场
                        agvWrkMast.setWrkSts(206L);
                        agvWrkMastService.updateById(agvWrkMast);
                    }
                } catch (IOException e) {
                    log.error(e.getMessage());
                }
                //将工作党状态改为容器离场
                agvWrkMast.setWrkSts(206L);
                agvWrkMastService.updateById(agvWrkMast);
//                //发送容器立场请求,完成工作档
//                List<AgvWrkMast> agvWrkMastList = new ArrayList<>();
//                agvWrkMastList.add(agvWrkMast);
//                try {
//                    int code = agvWrkMastService.containerMoveOut(agvWrkMastList);
//                    if(code == 0){
//                        //将工作党状态改为容器离场
//                        agvWrkMast.setWrkSts(206L);
//                        agvWrkMastService.updateById(agvWrkMast);
//                    }
//                } catch (IOException e) {
//                    log.error(e.getMessage());
//                }
            }
        }
@@ -717,6 +718,11 @@
            agvBasDevpDto.setAgvWaitPakins(agvWaitPakinList);
        }
        System.out.println("currentContainerMap: " + currentContainerMap);
        System.out.println("agvBasDevpDto: " + agvBasDevpDto);
        return R.ok(agvBasDevpDto);
    }