|  |  | 
 |  |  | import com.baomidou.mybatisplus.service.impl.ServiceImpl; | 
 |  |  | import com.core.exception.CoolException; | 
 |  |  | import com.zy.asrs.entity.BasDevp; | 
 |  |  | import com.zy.asrs.entity.WrkMast; | 
 |  |  | import com.zy.asrs.mapper.BasDevpMapper; | 
 |  |  | import com.zy.asrs.service.BasDevpService; | 
 |  |  | import com.zy.asrs.service.WrkMastService; | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public BasDevp checkSiteStatus(Integer devpNo, boolean put) { | 
 |  |  |     public BasDevp checkSiteStatus(Integer devpNo, boolean pakin) { | 
 |  |  |         BasDevp station = selectById(devpNo); | 
 |  |  |         if (station == null){ | 
 |  |  |             throw new CoolException(devpNo+"站点不存在"); | 
 |  |  |         } | 
 |  |  |         if (put) { | 
 |  |  |         if (pakin) { | 
 |  |  |             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+"站点已有工作号"); | 
 |  |  |                 WrkMast wrkMast = wrkMastService.selectById(station.getWrkNo()); | 
 |  |  |                 if (wrkMast!=null && wrkMast.getIoType() != 103 && wrkMast.getIoType() != 104 && wrkMast.getIoType() != 107) { | 
 |  |  |                     throw new CoolException(devpNo+"站点已有工作号"); | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |             } | 
 |  |  | //            if(!station.getInEnable().equals("Y")) { | 
 |  |  | //                throw new CoolException(devpNo+"站点不是可入状态"); | 
 |  |  | //            } | 
 |  |  |             if(wrkMastService.getWorkingMast(devpNo)>0){ | 
 |  |  |                 throw new CoolException(devpNo+"站点不能同时生成两笔入库工作档"); | 
 |  |  |             } | 
 |  |  | //            if(wrkMastService.getWorkingMast(devpNo)>0){ | 
 |  |  | //                throw new CoolException(devpNo+"站点不能同时生成两笔入库工作档"); | 
 |  |  | //            } | 
 |  |  |         } | 
 |  |  |         return station; | 
 |  |  |     } |