自动化立体仓库 - WMS系统
zhangc
2025-03-17 a12500e11babc4d2512013a56b0cb900f7f7e3a6
src/main/java/com/zy/asrs/controller/OutController.java
@@ -14,7 +14,6 @@
import com.zy.common.model.OrderMergeVo;
import com.zy.common.model.TaskDto;
import com.zy.common.web.BaseController;
import com.zy.system.entity.Config;
import com.zy.system.service.ConfigService;
import lombok.Synchronized;
import org.springframework.beans.factory.annotation.Autowired;
@@ -254,23 +253,29 @@
            List<String> staNoList = agvBasDevpService.selectCacheShelvesStationCodeByLocType(agvLocMast.getLocType1());
            Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "FOUR"));
            if (config != null) {
                if (config.getStatus().intValue() == 1) {
                    List<AgvWrkMast> agvWrkMasts = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("source_loc_no", locDto.getAgvStaNo()));
                    if (agvWrkMasts != null && !agvWrkMasts.isEmpty()) {
                        for (AgvWrkMast agvWrkMast : agvWrkMasts) {
                            if (agvWrkMast.getWrkSts() < 204) {
                                return R.error(locDto.getAgvStaNo() + "该站点已有任务,等任务完成或者货架搬走再叫料");
                            }
                        }
                    }
                }
            }
//            Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "FOUR"));
//            if (config != null) {
//                if (config.getStatus().intValue() == 1) {
//                    List<AgvWrkMast> agvWrkMasts = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("source_loc_no", locDto.getAgvStaNo()));
//                    if (agvWrkMasts != null && !agvWrkMasts.isEmpty()) {
//                        for (AgvWrkMast agvWrkMast : agvWrkMasts) {
//                            if (agvWrkMast.getWrkSts() < 204) {
//                                return R.error(locDto.getAgvStaNo() + "该站点已有任务,等任务完成或者货架搬走再叫料");
//                            }
//                        }
//                    }
//                }
//            }
            if (!staNoList.contains(locDto.getAgvStaNo())) {
                return R.error(locDto.getAgvStaNo() + "该站点已有出库任务,无法选择该站点出库");
                AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("loc_no", locDto.getAgvStaNo()));
                if (Cools.isEmpty(agvWrkMast.getPdcType())) {
                    return R.error(locDto.getAgvStaNo() + "该站点已有出库任务,工作号:" + agvWrkMast.getWrkNo() + ",物料库位号:" + agvWrkMast.getSourceLocNo() + ",任务状态:" + agvWrkMast.getWrkSts$());
                } else {
                    return R.error(locDto.getAgvStaNo() + "该站点已有出库任务,工作号:" + agvWrkMast.getWrkNo() + ",物料库位号:" + agvWrkMast.getSourceLocNo() + ",任务状态:" + agvWrkMast.getWrkSts$() + ",小车编号:" + agvWrkMast.getPdcType());
                }
            }
        }
        //如果所有库都没有库存,则返回