干燥机配套车间生产管理系统/云平台服务端
zhuguifei
昨天 4dbab0c9584c923f12c7478131f0996dbb3bb7fe
Merge branch 'master' of http://lanpucloud.cn:1111/r/herb
已修改6个文件
33 ■■■■■ 文件已修改
jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisPlusSaasConfig.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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/controller/DryEquipmentController.java 8 ●●●● 补丁 | 查看 | 原始文档 | 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/mybatis/MybatisPlusSaasConfig.java
@@ -78,6 +78,12 @@
        TENANT_TABLE.add("dry_herb_formula");
        TENANT_TABLE.add("dry_herb_formula_his");
        TENANT_TABLE.add("dry_fault_record");
        TENANT_TABLE.add("dry_fault_record");
        TENANT_TABLE.add("dry_maintenance_record");
        TENANT_TABLE.add("dry_repair_records");
        TENANT_TABLE.add("dry_spare_parts");
        TENANT_TABLE.add("dry_spare_stock_log");
    }
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/controller/DryEquipmentController.java
@@ -14,6 +14,7 @@
import cn.hutool.core.bean.BeanUtil;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.config.TenantContext;
import org.jeecg.common.constant.CommonCacheConstant;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.common.util.oConvertUtils;
@@ -38,6 +39,7 @@
import org.jeecg.common.system.base.controller.JeecgController;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@@ -154,8 +156,10 @@
    @ApiOperation(value="干燥机-添加", notes="干燥机-添加")
    @RequiresPermissions("dry:dry_equipment:add")
    @PostMapping(value = "/add")
    @CacheEvict(value = {CommonCacheConstant.DRY_CACHE_TENANT_EQUS_LIST,CommonCacheConstant.DRY_CACHE_TENANT_EQUS},allEntries=true)
    public Result<String> add(@RequestBody DryEquipment dryEquipment) {
        dryEquipmentService.save(dryEquipment);
        redisUtil.del(CacheConstants.RedisKeyEnum.EQP_MAP.getCode());
        return Result.OK("添加成功!");
    }
@@ -169,11 +173,11 @@
    @ApiOperation(value="干燥机-编辑", notes="干燥机-编辑")
    @RequiresPermissions("dry:dry_equipment:edit")
    @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
    @CacheEvict(value = {CommonCacheConstant.DRY_CACHE_TENANT_EQUS_LIST,CommonCacheConstant.DRY_CACHE_TENANT_EQUS},allEntries=true)
    public Result<String> edit(@RequestBody DryEquipment dryEquipment) {
        // 删除redis缓存
        redisUtil.del(CacheConstants.RedisKeyEnum.EQP_MAP.getCode());
        dryEquipmentService.updateById(dryEquipment);
        return Result.OK("编辑成功!");
    }
@@ -187,6 +191,7 @@
    @ApiOperation(value="干燥机-通过id删除", notes="干燥机-通过id删除")
    @RequiresPermissions("dry:dry_equipment:delete")
    @DeleteMapping(value = "/delete")
    @CacheEvict(value = {CommonCacheConstant.DRY_CACHE_TENANT_EQUS_LIST,CommonCacheConstant.DRY_CACHE_TENANT_EQUS},allEntries=true)
    public Result<String> delete(@RequestParam(name="id",required=true) String id) {
        redisUtil.del(CacheConstants.RedisKeyEnum.EQP_MAP.getCode());
        dryEquipmentService.removeById(id);
@@ -203,6 +208,7 @@
    @ApiOperation(value="干燥机-批量删除", notes="干燥机-批量删除")
    @RequiresPermissions("dry:dry_equipment:deleteBatch")
    @DeleteMapping(value = "/deleteBatch")
    @CacheEvict(value = {CommonCacheConstant.DRY_CACHE_TENANT_EQUS_LIST,CommonCacheConstant.DRY_CACHE_TENANT_EQUS},allEntries=true)
    public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
        redisUtil.del(CacheConstants.RedisKeyEnum.EQP_MAP.getCode());
        this.dryEquipmentService.removeByIds(Arrays.asList(ids.split(",")));
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
@@ -232,6 +232,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: