自动化立体仓库 - WMS系统
pjb
昨天 2ded9514aa9a93ee440af0b1437d788fb052028b
src/main/java/com/zy/asrs/controller/OutController.java
@@ -5,11 +5,14 @@
import com.core.common.BaseRes;
import com.core.common.Cools;
import com.core.common.R;
import com.core.exception.CoolException;
import com.zy.asrs.entity.*;
import com.zy.asrs.service.*;
import com.zy.common.model.LocDto;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -46,6 +49,9 @@
    @Resource
    private OrderPakoutService orderPakOutService;
    @Resource
    private ConfigService configService;
    @PostMapping("/out/pakout/orderDetlIds/auth")
@@ -217,6 +223,16 @@
        // -----------------------------------------------------------------------------------------------
        for (TaskDto taskDto : taskDtos) {
            BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo());
            // 判断任务目标站点是否是出库模式
            if (staNo.getDevNo() == 1016 || staNo.getDevNo() == 1043) {
                Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "inOrOutBoundMode").eq("status", 1));
                if (config != null && !Cools.isEmpty(config.getValue())) {
                    int value = Integer.parseInt(config.getValue());
                    if (value != 2) {
                        throw new CoolException("目标站点" + staNo.getDevNo() + "不是出库模式,当前模式为:" + value);
                    }
                }
            }
            workService.stockOut(staNo, taskDto, getUserId());
        }
        return R.ok();