Fancy
2024-06-21 f26131172d91045a502cb5f42c9da4dac6ffaf65
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java
@@ -1,8 +1,6 @@
package com.dy.pmsStation.workOrder;
import com.alibaba.excel.util.StringUtils;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.GlException;
import com.dy.pmsGlobal.daoBa.BaUserMapper;
import com.dy.pmsGlobal.daoOth.OthFileMapper;
import com.dy.pmsGlobal.daoPlt.PltStationMapper;
@@ -19,7 +17,6 @@
import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan;
import com.dy.pmsGlobal.pojoPr.PrWorkingInstruction;
import com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast;
import com.dy.pmsGlobal.util.UserUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -79,8 +76,6 @@
            throw new RuntimeException("员工编码:"+ userId +"不在系统中,请先维护员工信息");
        }else if(userInfo.getDisabled()){
            throw new RuntimeException("员工("+userInfo.getName()+")编码:"+ userId +"在系统已禁用,请先启用员工");
        }else if(userInfo.getDeleted()){
            throw new RuntimeException("员工("+userInfo.getName()+")编码:"+ userId +"在系统已删除,请先恢复员工信息");
        }
        return userInfo;
    }
@@ -96,11 +91,11 @@
        }else{
            stationId = Long.parseLong(id.toString());
        }
        PltStation record = new PltStation();
        record.setId(stationId);
        List<PltStation> stationInfo = pltStationDao.selectStationList(record);
        if(stationInfo.size() == 0){
        PltStation stationInfo = pltStationDao.selectByPrimaryKey(stationId);
        if(stationInfo == null){
            throw new RuntimeException("工站编码:"+ stationId +"不在系统中,请先维护工站信息");
        }else if(stationInfo.getDisabled()){
            throw new RuntimeException("工站("+stationInfo.getName()+")编码:"+ stationId +"在系统已禁用,请先启用工站");
        }
        //检查表中stationId是否已经存在
        StaAssemblyWorkLast param = new StaAssemblyWorkLast();
@@ -110,7 +105,7 @@
        if(userStationList.size() > 0){
            throw new RuntimeException("员工("+userStationList.get(0).getUserName()+")编码:"+ userStationList.get(0).getUserId() + "已经绑定该工站("+userStationList.get(0).getStationName()+")编码:" + userStationList.get(0).getStationId() + ".请先让其解绑");
        }
        return stationInfo.get(0);
        return stationInfo;
    }
    public String checkUserAndStation(QueryVo last){
        String message = "OK";