自动化立体仓库 - WMS系统
Junjie
2023-12-06 828b592b5f8e31204f93bcc2ea0c5866bdc0dcf0
src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java
@@ -100,8 +100,11 @@
                    .eq("station_code", stationCode)
                    .like("dev_no", "0" + i + "@");
            if("CS-305".equals(stationCode) || "CS-306".equals(stationCode) || "CS-307".equals(stationCode)){
                wrapper.orderBy("dev_no",false);
            List<String> list = this.selectCacheShelvesStationCodeByFloor(3);
            if(list.contains(stationCode)){
                if(Cools.eq(stationCode,"CS-305") || Cools.eq(stationCode,"CS-306") || Cools.eq(stationCode,"CS-307")){
                    wrapper.orderBy("dev_no",false);
                }
            }
            List<AgvBasDevp> agvBasDevpList = this.selectList(wrapper);
@@ -117,9 +120,20 @@
                    return agvBasDevpDto;
                }
                AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>()
                List<AgvWrkMast> agvWrkMasts = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                        .eq("loc_no", agvBasDevpDto.getDevNo())
                        .or().eq("source_loc_no",agvBasDevpDto.getDevNo()));
                AgvWrkMast agvWrkMast = null;
                for (AgvWrkMast wrkMast : agvWrkMasts){
                    if(Cools.isEmpty(agvWrkMast)){
                        agvWrkMast = wrkMast;
                    }else {
                        if(agvWrkMast.getWrkSts() < wrkMast.getWrkSts()){
                            agvWrkMast = wrkMast;
                        }
                    }
                }
                agvBasDevpDto.setAgvWrkMast(agvWrkMast);
@@ -206,4 +220,19 @@
        return this.selectList(new EntityWrapper<AgvBasDevp>().eq("cache_shelves","N"));
    }
    @Override
    public List<String> selectCacheShelvesStationCodeByFloor(int floor) {
        //Object o = this.selectList(new EntityWrapper<AgvBasDevp>().setSqlSelect("station_code").eq("floor",floor).eq("cache_shelves","Y").groupBy("station_code"));
        return this.baseMapper.selectCacheShelvesStationCodeByFloor(floor);
    }
    public List<Map<String,Object>> selectDevNoAndNumBystationCode(String stationCode){
        return this.baseMapper.selectDevNoAndNumBystationCode(stationCode);
    }
    @Override
    public List<String> selectAllStationCode() {
        return this.baseMapper.selectAllStationCode();
    }
}