#
luxiaotao1123
2021-06-09 9512f15494e270f93013540e6862b7ea77a03865
src/main/java/com/zy/asrs/service/impl/BasDevpServiceImpl.java
@@ -1,6 +1,7 @@
package com.zy.asrs.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.common.Cools;
import com.core.exception.CoolException;
import com.zy.asrs.entity.BasDevp;
import com.zy.asrs.mapper.BasDevpMapper;
@@ -54,18 +55,25 @@
            throw new CoolException(devpNo+"站点不存在");
        }
        if (put) {
            if(station.getAutoing()==null || !station.getAutoing().equals("Y")) {
                throw new CoolException(devpNo+"站点不是自动状态");
            // 小车工作区
            if (!Cools.isEmpty(station.getFronting()) && station.getFronting().equals("Y")) {
            // 常规站点
            } else {
                if(station.getAutoing()==null || !station.getAutoing().equals("Y")) {
                    throw new CoolException(devpNo+"站点不是自动状态");
                }
                if(station.getLoading()==null || !station.getLoading().equals("Y")) {
                    throw new CoolException(devpNo+"站点无物");
                }
                if(station.getWrkNo()!=null && station.getWrkNo()>0 && station.getWrkNo() < 9990) {
                    throw new CoolException(devpNo+"站点已有工作号");
                }
                if(wrkMastService.getWorkingMast(devpNo)>0){
                    throw new CoolException(devpNo+"站点不能同时生成两笔入库工作档");
                }
            }
            if(station.getLoading()==null || !station.getLoading().equals("Y")) {
                throw new CoolException(devpNo+"站点无物");
            }
            if(station.getWrkNo()!=null && station.getWrkNo()>0 && station.getWrkNo() < 9990) {
                throw new CoolException(devpNo+"站点已有工作号");
            }
            if(wrkMastService.getWorkingMast(devpNo)>0){
                throw new CoolException(devpNo+"站点不能同时生成两笔入库工作档");
            }
        }
        return station;
    }