Junjie
2024-06-13 11da5829433e788d8f901ee5cd910d5923f0806a
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/OpenController.java
@@ -24,6 +24,8 @@
import com.zy.asrs.wcs.rcs.service.DeviceService;
import com.zy.asrs.wcs.rcs.thread.ShuttleThread;
import com.zy.asrs.wcs.system.controller.BaseController;
import com.zy.asrs.wcs.system.entity.Dict;
import com.zy.asrs.wcs.system.service.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -50,6 +52,8 @@
    private DeviceService deviceService;
    @Autowired
    private LocService locService;
    @Autowired
    private DictService dictService;
    //生成入库任务
    @PostMapping("/createInTask")
@@ -67,7 +71,14 @@
            return R.error("库位号不存在");
        }
        if (!loc.getLocStsFlag().equals("O")) {
        //获取严格模式参数
        boolean mapStrict = true;//默认严格模式
        Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>().eq(Dict::getFlag, "shuttleMapStrict"));
        if (dict != null) {
            mapStrict = Boolean.parseBoolean(dict.getValue());
        }
        if (mapStrict && !loc.getLocStsFlag().equals("O")) {
            return R.error("库位状态不满足入库条件");
        }
@@ -118,7 +129,14 @@
            return R.error("库位号不存在");
        }
        if (!loc.getLocStsFlag().equals("F")) {
        //获取严格模式参数
        boolean mapStrict = true;//默认严格模式
        Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>().eq(Dict::getFlag, "shuttleMapStrict"));
        if (dict != null) {
            mapStrict = Boolean.parseBoolean(dict.getValue());
        }
        if (mapStrict && !loc.getLocStsFlag().equals("F")) {
            return R.error("库位状态不满足出库条件");
        }