feat(dry): 更新干燥设备接口和实时数据处理
- 在 ShiroConfig 中添加干燥设备相关接口的匿名访问权限
- 在 DryEquipmentServiceImpl 中增加设备类型名称的查询和排序功能
- 在 DryRealTimeDataServiceImpl 中添加故障信息的处理
- 更新 nacos配置文件中的数据库连接信息
| | |
| | | // 干燥测试 |
| | | filterChainDefinitionMap.put("/dry/dryResult/**", "anon"); |
| | | filterChainDefinitionMap.put("/dry/real/**", "anon"); |
| | | filterChainDefinitionMap.put("/dry/dryEquipment/listAll", "anon"); |
| | | filterChainDefinitionMap.put("/dry/dryEqpFault/queryByOrderId", "anon"); |
| | | |
| | | |
| | | // 添加自己的过滤器并且取名为jwt |
| | |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | @Autowired |
| | | private DryEqpTypeServiceImpl dryEqpTypeServiceImpl; |
| | | |
| | | |
| | | @Override |
| | |
| | | if (dryEquipment.getEnable()!=null){ |
| | | queryWrapper.lambda().eq(DryEquipment::getEnable,dryEquipment.getEnable()); |
| | | } |
| | | queryWrapper.lambda().orderByAsc(DryEquipment::getCode); |
| | | List<DryEquipment> equipmentList = this.list(queryWrapper); |
| | | equipmentList.stream().forEach(item -> { |
| | | item.setType(dryEqpTypeServiceImpl.getById(item.getType()).getName()); |
| | | }); |
| | | return equipmentList; |
| | | } |
| | | } |
| | |
| | | orderVo.setTrendVo(trendVo); |
| | | orderVo.getBellowsTemp().put(realTimeDataVo.getTime3(), realTimeDataVo.getTemp2()); |
| | | |
| | | if (realTimeDataParentVo.getFault() != null) { |
| | | if (realTimeDataParentVo.getFault().getError() != null) { |
| | | orderVo.setFault(realTimeDataParentVo.getFault().getError()); |
| | | } |
| | | if (realTimeDataParentVo.getFault().getWarning() != null) { |
| | | orderVo.setWarning(realTimeDataParentVo.getFault().getWarning()); |
| | | } |
| | | } |
| | | |
| | | // 2.3 更新到redis缓存 |
| | | redisUtil.hset(CacheConstants.RedisKeyEnum.WORK_ORDER.getCode(), |
| | | realTimeDataVo.getTenantid() + "_" + realTimeDataVo.getMachineid(), orderVo, 60 * 60); |
| | |
| | | db: |
| | | num: 1 |
| | | password: |
| | | '0': ${MYSQL-PWD:123456} |
| | | '0': ${MYSQL-PWD:123456} # 同济堂mysql密码:Tjt123456! |
| | | url: |
| | | '0': jdbc:mysql://${MYSQL-HOST:localhost}:${MYSQL-PORT:3306}/${MYSQL-DB:nacos}?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true |
| | | user: |