|  |  |  | 
|---|
|  |  |  | private WrkMastService wrkMastService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<Integer> getAvailableDevp() { | 
|---|
|  |  |  | return this.baseMapper.getAvailableDevp(); | 
|---|
|  |  |  | public List<Integer> getAvailableInSite() { | 
|---|
|  |  |  | return this.baseMapper.getAvailableInSite(1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<Integer> getAvailableEmptyInSite() { | 
|---|
|  |  |  | return this.baseMapper.getAvailableInSite(10); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<Integer> getAvailableOutSite(Integer typeNo) { | 
|---|
|  |  |  | return this.baseMapper.getAvailableOutSite(typeNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<Integer> getCrnAvailableOutSite(Integer typeNo) { | 
|---|
|  |  |  | return this.baseMapper.getCrnAvailableOutSite(typeNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<Integer> getShuttleAvailableOutSite(Integer typeNo) { | 
|---|
|  |  |  | return this.baseMapper.getShuttleAvailableOutSite(typeNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<Integer> getCtuAvailableOutSite(Integer typeNo) { | 
|---|
|  |  |  | return this.baseMapper.getCtuAvailableOutSite(typeNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<Integer> getAvailableEmptyOutSite() { | 
|---|
|  |  |  | return this.baseMapper.getAvailableOutSite(110); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<Integer> getCrnAvailableEmptyOutSite() { | 
|---|
|  |  |  | return this.baseMapper.getCrnAvailableOutSite(110); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<Integer> getShuttleAvailableEmptyOutSite() { | 
|---|
|  |  |  | return this.baseMapper.getShuttleAvailableOutSite(110); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<Integer> getCtuAvailableEmptyOutSite() { | 
|---|
|  |  |  | return this.baseMapper.getCtuAvailableOutSite(110); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public BasDevp checkSiteStatus(Integer devpNo) { | 
|---|
|  |  |  | return checkSiteStatus(devpNo, false); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public BasDevp checkSiteStatus(Integer devpNo, boolean pakin) { | 
|---|
|  |  |  | BasDevp station = selectById(devpNo); | 
|---|
|  |  |  | if (station == null){ | 
|---|
|  |  |  | throw new CoolException("站点不存在"); | 
|---|
|  |  |  | throw new CoolException(devpNo+"站点不存在"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(station.getAutoing()==null || !station.getAutoing().equals("Y")) { | 
|---|
|  |  |  | throw new CoolException("入库站点不是自动状态"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(station.getLoading()==null || !station.getLoading().equals("Y")) { | 
|---|
|  |  |  | throw new CoolException("入库站点无物"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(station.getWrkNo()!=null && station.getWrkNo()>0) { | 
|---|
|  |  |  | throw new CoolException("入库站点已有工作号"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(wrkMastService.getWorkingMast(devpNo)>0){ | 
|---|
|  |  |  | throw new CoolException("同一站点不能同时生成两笔入库工作档"); | 
|---|
|  |  |  | 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+"站点已有工作号"); | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //            if(!station.getInEnable().equals("Y")) { | 
|---|
|  |  |  | //                throw new CoolException(devpNo+"站点不是可入状态"); | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | if(wrkMastService.getWorkingMast(devpNo)>0){ | 
|---|
|  |  |  | throw new CoolException(devpNo+"站点不能同时生成两笔入库工作档"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return station; | 
|---|
|  |  |  | } | 
|---|