| | |
| | | import com.zy.asrs.service.BasDevpPositionService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.escalationParam.RgvTaskReportingParam; |
| | | import com.zy.asrs.utils.PostMesDataUtils; |
| | | import com.zy.asrs.utils.SortTheExecutionOfTheCarUtil; |
| | | import com.zy.asrs.utils.TimeCalculatorUtils; |
| | | import com.zy.common.CodeRes; |
| | |
| | | log.info("更新小车排序信息异常={}", rgvNo); |
| | | return; |
| | | } |
| | | List<BasCircularShuttle> basCircularShuttleList = basCircularShuttleService.selectList(new EntityWrapper<BasCircularShuttle>().orderBy("rgv_id", true)); |
| | | List<BasCircularShuttle> basCircularShuttleList = basCircularShuttleService.selectList(new EntityWrapper<BasCircularShuttle>().eq("status", 0).orderBy("rgv_id", true)); |
| | | if (basCircularShuttleList.get(0).getRgvNo().equals(rgvNo)) { |
| | | return; |
| | | } |
| | |
| | | Integer rgvNo = 0; |
| | | List<BasCircularShuttle> basCircularShuttleList = basCircularShuttleService.selectList(new EntityWrapper<BasCircularShuttle>().orderBy("rgv_id", true)); |
| | | for (BasCircularShuttle basCircularShuttle : basCircularShuttleList) { |
| | | if (basCircularShuttle.getStatus() != 0){ |
| | | sign = true; |
| | | continue; |
| | | } |
| | | RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, basCircularShuttle.getRgvNo()); |
| | | RgvProtocol rgvProtocol = rgvThread.getRgvProtocol(); |
| | | if (rgvProtocol == null) { |
| | |
| | | break runRgv; |
| | | } |
| | | BasCircularShuttle basCircularShuttle = basCircularShuttleService.selectOne(new EntityWrapper<BasCircularShuttle>().eq("rgv_id", rgvId)); |
| | | if (basCircularShuttle.getStatus() != 0){ |
| | | continue ; |
| | | } |
| | | RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, basCircularShuttle.getRgvNo()); |
| | | RgvProtocol rgvProtocol = rgvThread.getRgvProtocol(); |
| | | if (rgvProtocol == null) { |
| | |
| | | break; |
| | | } |
| | | wrkMast.setWrkSts(3L); |
| | | wrkMast.setAppeTime(new Date()); |
| | | Date now = new Date(); |
| | | wrkMast.setAppeTime(now); |
| | | try{ |
| | | try{ |
| | | RgvTaskReportingParam rgvTaskReportingParam = new RgvTaskReportingParam(wrkMast); |
| | | ReturnT<String> result = new PostMesDataUtils().postMesDataWcs("", "", rgvTaskReportingParam); |
| | | if (result.getCode()==200){ |
| | | wrkMast.setWrkSts(4L); |
| | | wrkMast.setAppeTime(now); |
| | | wrkMastService.updateById(wrkMast); |
| | | continue; |
| | | }else { |
| | | log.error("工作号"+wrkMast.getWrkNo()+"任务完成信息上传处理失败"); |
| | | } |
| | | } catch (Exception e){ |
| | | log.error("工作号"+wrkMast.getWrkNo()+"任务完成信息上传处理失败,异常信息:"+e); |
| | | } |
| | | } catch (Exception e){} |
| | | wrkMastService.updateById(wrkMast); |
| | | } |
| | | } |