干燥机配套车间生产管理系统/云平台服务端
baoshiwei
8 小时以前 a3ff160ff0e25bf0802aa5f14d651776b6652cdc
feat(dry): 更新干燥设备接口和实时数据处理

- 在 ShiroConfig 中添加干燥设备相关接口的匿名访问权限
- 在 DryEquipmentServiceImpl 中增加设备类型名称的查询和排序功能
- 在 DryRealTimeDataServiceImpl 中添加故障信息的处理
- 更新 nacos配置文件中的数据库连接信息
已修改4个文件
19 ■■■■■ 文件已修改
jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/service/impl/DryEquipmentServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/service/impl/DryRealTimeDataServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jeecg-server-cloud/jeecg-cloud-nacos/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
@@ -153,6 +153,8 @@
        // 干燥测试
        filterChainDefinitionMap.put("/dry/dryResult/**", "anon");
        filterChainDefinitionMap.put("/dry/real/**", "anon");
        filterChainDefinitionMap.put("/dry/dryEquipment/listAll", "anon");
        filterChainDefinitionMap.put("/dry/dryEqpFault/queryByOrderId", "anon");
        // 添加自己的过滤器并且取名为jwt
jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/service/impl/DryEquipmentServiceImpl.java
@@ -31,6 +31,8 @@
    @Autowired
    private RedisUtil redisUtil;
    @Autowired
    private DryEqpTypeServiceImpl dryEqpTypeServiceImpl;
    @Override
@@ -74,7 +76,11 @@
        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;
    }
}
jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/service/impl/DryRealTimeDataServiceImpl.java
@@ -230,6 +230,15 @@
            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);
jeecg-server-cloud/jeecg-cloud-nacos/src/main/resources/application.yml
@@ -12,7 +12,7 @@
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: