| | |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | |
| | | Thread.sleep(500); |
| | | String plcFeedReq ="0"; |
| | | String plcFeedGlassid ="111"; |
| | | String plcFeedReq = "0"; |
| | | String plcFeedGlassid = "111"; |
| | | //Plc进片请求时 |
| | | if("1".equals(plcFeedReq)){ |
| | | BigStorageCageDetails bigStorageCageDetails=new BigStorageCageDetails(); |
| | | if ("1".equals(plcFeedReq)) { |
| | | BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails(); |
| | | //传入玻璃id |
| | | GlassInfo glassInfo=glassInfoService.getById(plcFeedGlassid); |
| | | GlassInfo glassInfo = glassInfoService.getById(plcFeedGlassid); |
| | | |
| | | BigStorageCageDetails SlotInfo=bigStorageCageService.FeedGlass(glassInfo,bigStorageCageDetails); |
| | | if(SlotInfo!=null){ |
| | | BigStorageCageDetails SlotInfo = bigStorageCageService.feedGlass(glassInfo, bigStorageCageDetails); |
| | | if (SlotInfo != null) { |
| | | //plc任务发送字 |
| | | } |
| | | } |
| | | |
| | | //出片请求 |
| | | String plcOutReq ="0"; |
| | | boolean result=false; |
| | | if("1".equals(plcOutReq)){ |
| | | String plcOutReq = "0"; |
| | | boolean result = false; |
| | | if ("1".equals(plcOutReq)) { |
| | | //获取钢化小片表未出笼信息 |
| | | List<TemperingGlassInfo> temperingGlassInfoList = temperingGlassInfoService.SelectTemperingGlassInfo(); |
| | | //没有可出的玻璃时 |
| | | if(temperingGlassInfoList!=null){ |
| | | //查询是否有小片全部到齐的钢化版图 |
| | | result = bigStorageCageDetailsService.getTemperingGlass(); |
| | | }else{ |
| | | //继续当前钢化版图的任务 |
| | | |
| | | temperingGlassInfoService.addOutTask(temperingGlassInfoList); |
| | | result=true; |
| | | } |
| | | if(result==true){ |
| | | |
| | | if (result == true) { |
| | | //plc任务发送字 |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } catch (Exception e) { |