| | |
| | | import com.github.xingshuangs.iot.protocol.modbus.service.ModbusTcp; |
| | | import com.github.xingshuangs.iot.protocol.s7.serializer.S7Serializer; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | | import com.mes.alarm.entity.ProductAlarmInfo; |
| | | import com.mes.alarm.service.ProductAlarmInfoService; |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageTask; |
| | | import com.mes.bigstoragecagetask.entity.BigStorageTaskVO; |
| | | import com.mes.bigstoragecagetask.service.BigStorageCageTaskService; |
| | |
| | | |
| | | @Autowired(required = false) |
| | | MiloService miloService; |
| | | @Resource |
| | | ProductAlarmInfoService productAlarmInfoService; |
| | | |
| | | @Autowired |
| | | @Qualifier("s7SerializerZKDLPOne") |
| | |
| | | |
| | | @Resource |
| | | RedisUtil redisUtil; |
| | | |
| | | private static final String ALARM_MODULE = "中空"; |
| | | private static final String ALARM_TYPE = "中空大理片"; |
| | | private static final String ALARM_CODE = "sizeSame"; |
| | | |
| | | @Scheduled(fixedDelay = 5000) |
| | | public void hollowGlassTaskOne() { |
| | |
| | | Boolean inkageEntity = s7DataZKDLPOne.getMesControl(); |
| | | jsonObject.append("inkageEntity", inkageEntity); |
| | | //进片请求 |
| | | String requestEntity = s7DataZKDLPOne.getRequestMes().toString(); |
| | | Integer requestEntity = s7DataZKDLPOne.getRequestMes(); |
| | | jsonObject.append("requestEntity", requestEntity); |
| | | //启动命令 |
| | | String mesReplyEntity = s7DataZKDLPOne.getMesReply().toString(); |
| | | Integer mesReplyEntity = s7DataZKDLPOne.getMesReply(); |
| | | jsonObject.append("mesReplyEntity", mesReplyEntity); |
| | | //出片联机 |
| | | String outInkageEntity = s7DataZKDLPTwo.getMesControl().toString(); |
| | | Boolean outInkageEntity = s7DataZKDLPTwo.getMesControl(); |
| | | jsonObject.append("outInkageEntity", outInkageEntity); |
| | | //出片请求 |
| | | String outRequestEntity = s7DataZKDLPTwo.getRequestMes().toString(); |
| | | jsonObject.append("outInkageEntity", outInkageEntity); |
| | | Integer outRequestEntity = s7DataZKDLPTwo.getRequestMes(); |
| | | jsonObject.append("outRequestEntity", outRequestEntity); |
| | | //930空闲信号 |
| | | jsonObject.append("freeOneRequestEntity", CMJ1ModbusTcp.readUInt16(42027 - offset)); |
| | | //931空闲信号 |
| | |
| | | jsonObject.append("bigStorageCageUsageSummary", bigStorageCageUsageSummary); |
| | | |
| | | //缺片详情 |
| | | List<LackDetailsDTO> lackDetailsList = hollowGlassRelationInfoService.queryLackByFlowCard(); |
| | | List<LackDetailsDTO> lackDetailsList = hollowGlassRelationInfoService.queryAllLackByFlowCard(); |
| | | jsonObject.append("lackDetailsList", lackDetailsList); |
| | | |
| | | jsonObject.append("alarmInfo", productAlarmInfoService.list(new LambdaQueryWrapper<ProductAlarmInfo>() |
| | | .eq(ProductAlarmInfo::getState, Const.LOAD_RAW_GLASS_NEW) |
| | | .eq(ProductAlarmInfo::getAlarmModule, ALARM_MODULE) |
| | | .eq(ProductAlarmInfo::getAlarmType, ALARM_TYPE))); |
| | | } |
| | | |
| | | @Scheduled(fixedDelay = 1000) |