yuanchao 2 сар өмнө
parent
commit
6b1093df3e
18 өөрчлөгдсөн 119 нэмэгдсэн , 18 устгасан
  1. 29 5
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplate/IotModelTemplateController.java
  2. 1 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplate/vo/IotModelTemplatePageReqVO.java
  3. 3 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplate/vo/IotModelTemplateSaveReqVO.java
  4. 3 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplateattrs/vo/IotModelTemplateAttrsPageReqVO.java
  5. 4 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplateattrs/vo/IotModelTemplateAttrsRespVO.java
  6. 3 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplateattrs/vo/IotModelTemplateAttrsSaveReqVO.java
  7. 10 5
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotopeationfill/IotOpeationFillController.java
  8. 1 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/iotmodeltemplate/IotModelTemplateDO.java
  9. 2 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/iotmodeltemplateattrs/IotModelTemplateAttrsDO.java
  10. 7 2
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/iotmodeltemplate/IotModelTemplateMapper.java
  11. 1 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/iotmodeltemplateattrs/IotModelTemplateAttrsMapper.java
  12. 2 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/iotopeationfill/IotOpeationFillMapper.java
  13. 4 1
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotmodeltemplate/IotModelTemplateService.java
  14. 8 2
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotmodeltemplate/IotModelTemplateServiceImpl.java
  15. 3 1
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotopeationfill/IotOpeationFillService.java
  16. 11 1
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotopeationfill/IotOpeationFillServiceImpl.java
  17. 11 0
      yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/IotModelTemplateMapper.xml
  18. 16 1
      yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/IotOpeationFillMapper.xml

+ 29 - 5
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplate/IotModelTemplateController.java

@@ -16,9 +16,11 @@ import cn.iocoder.yudao.module.pms.convert.iotmodeltemplate.IotModelTemplateConv
 import cn.iocoder.yudao.module.pms.dal.dataobject.IotProductClassifyDO;
 import cn.iocoder.yudao.module.pms.dal.dataobject.iotdevicetemplate.IotDeviceTemplateDO;
 import cn.iocoder.yudao.module.pms.dal.dataobject.iotmodeltemplate.IotModelTemplateDO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.iotopeationfill.IotOpeationFillDO;
 import cn.iocoder.yudao.module.pms.service.IotProductClassifyService;
 import cn.iocoder.yudao.module.pms.service.iotdevicetemplate.IotDeviceTemplateService;
 import cn.iocoder.yudao.module.pms.service.iotmodeltemplate.IotModelTemplateService;
+import cn.iocoder.yudao.module.pms.service.iotopeationfill.IotOpeationFillService;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -30,8 +32,8 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.io.IOException;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.stream.Collectors;
 
 import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@@ -47,6 +49,9 @@ public class IotModelTemplateController {
     private IotModelTemplateService iotDeviceTemplateService;
     @Resource
     private IotProductClassifyService iotProductClassifyService;
+    @Resource
+    private IotOpeationFillService iotOpeationFillService;
+
 
     @PostMapping("/create")
     @Operation(summary = "创建PMS 功能优化 设备模板")
@@ -93,7 +98,14 @@ public class IotModelTemplateController {
     @Operation(summary = "获得PMS 功能优化 设备模板分页")
     @PreAuthorize("@ss.hasPermission('rq:iot-model-template:query')")
     public CommonResult<PageResult<IotModelTemplateRespVO>> getIotDeviceTemplatePage(@Valid IotModelTemplatePageReqVO pageReqVO) {
-        PageResult<IotModelTemplateDO> pageResult = iotDeviceTemplateService.getIotDeviceTemplatePage(pageReqVO);
+
+        Set<Long> idList = new HashSet<>();
+        if(Objects.nonNull(pageReqVO.getDeviceCategoryId())){
+            idList=iotProductClassifyService.getChildIotProductClassifyList(pageReqVO.getDeviceCategoryId());
+            idList.add(pageReqVO.getDeviceCategoryId());
+        }
+
+        PageResult<IotModelTemplateDO> pageResult = iotDeviceTemplateService.getIotDeviceTemplatePage(pageReqVO,idList);
         if (CollUtil.isEmpty(pageResult.getList())) {
             return success(new PageResult<>(pageResult.getTotal()));
         }
@@ -104,6 +116,18 @@ public class IotModelTemplateController {
                 pageResult.getTotal()));
     }
 
+
+    @GetMapping("/isRelated")
+    @Operation(summary = "获得PMS 功能优化 设备模板分页")
+    @PreAuthorize("@ss.hasPermission('rq:iot-model-template:query')")
+    public CommonResult<List<IotModelTemplateRespVO>> getIsRlated(@RequestParam("deviceId") Long deviceId) {
+        IotModelTemplatePageReqVO reqVO = new IotModelTemplatePageReqVO();
+        reqVO.setDeviceCategoryId(deviceId);
+        List<IotModelTemplateDO> related = iotDeviceTemplateService.isRelated(reqVO);
+        return success(BeanUtils.toBean(related, IotModelTemplateRespVO.class));
+    }
+
+
     @GetMapping("/list-by-model-category-id")
     @Operation(summary = "根据设备分类id获取模板属性列表")
     @Parameter(name = "deviceCategoryId", description = "设备分类id", required = true, example = "1024")
@@ -113,7 +137,7 @@ public class IotModelTemplateController {
         return success(BeanUtils.toBean(deviceTemplate, IotModelTemplateRespVO.class));
     }
 
-    @GetMapping("/export-excel")
+    /*@GetMapping("/export-excel")
     @Operation(summary = "导出PMS 功能优化 设备模板 Excel")
     @PreAuthorize("@ss.hasPermission('rq:iot-model-template:export')")
     @ApiAccessLog(operateType = EXPORT)
@@ -124,6 +148,6 @@ public class IotModelTemplateController {
         // 导出 Excel
         ExcelUtils.write(response, "PMS 功能优化 设备模板.xls", "数据", IotModelTemplateRespVO.class,
                         BeanUtils.toBean(list, IotModelTemplateRespVO.class));
-    }
+    }*/
 
 }

+ 1 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplate/vo/IotModelTemplatePageReqVO.java

@@ -51,4 +51,5 @@ public class IotModelTemplatePageReqVO extends PageParam {
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime[] createTime;
 
+
 }

+ 3 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplate/vo/IotModelTemplateSaveReqVO.java

@@ -43,4 +43,7 @@ public class IotModelTemplateSaveReqVO {
     @Schema(description = "模板版本号")
     private Integer version;
 
+    @Schema(description = "公司id", example = "17048")
+    private Long deptId;
+
 }

+ 3 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplateattrs/vo/IotModelTemplateAttrsPageReqVO.java

@@ -69,6 +69,9 @@ public class IotModelTemplateAttrsPageReqVO extends PageParam {
     @Schema(description = "是否数采", example = "1")
     private Integer isCollection;
 
+    @Schema(description = "是否累计", example = "1")
+    private Integer isSum;
+
     @Schema(description = "物属性", example = "zyj")
     private String modelAttr;
 

+ 4 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplateattrs/vo/IotModelTemplateAttrsRespVO.java

@@ -89,6 +89,10 @@ public class IotModelTemplateAttrsRespVO {
     @Schema(description = "是否数采", example = "1")
     private Integer isCollection;
 
+
+    @Schema(description = "是否累计", example = "1")
+    private Integer isSum;
+
     @Schema(description = "物属性", example = "zyj")
     private String modelAttr;
 

+ 3 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotmodeltemplateattrs/vo/IotModelTemplateAttrsSaveReqVO.java

@@ -59,6 +59,9 @@ public class IotModelTemplateAttrsSaveReqVO {
     @Schema(description = "是否数采", example = "1")
     private Integer isCollection;
 
+    @Schema(description = "是否累计", example = "1")
+    private Integer isSum;
+
     @Schema(description = "物属性", example = "zyj")
     private String modelAttr;
 

+ 10 - 5
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotopeationfill/IotOpeationFillController.java

@@ -20,6 +20,7 @@ import cn.iocoder.yudao.module.pms.dal.dataobject.yanfan.YfDeviceDO;
 import cn.iocoder.yudao.module.pms.service.IDeviceService;
 import cn.iocoder.yudao.module.pms.service.iotopeationfill.IotOpeationFillService;
 import cn.iocoder.yudao.module.pms.service.yanfan.YfDeviceService;
+import cn.iocoder.yudao.module.system.service.dept.DeptService;
 import com.aliyun.tea.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -68,6 +69,8 @@ public class IotOpeationFillController {
     private IDeviceService iDeviceService;
     @Autowired
     private YfDeviceService yfDeviceService;
+    @Resource
+    private DeptService deptService;
 
     @PostMapping("/create")
     @Operation(summary = "创建运行记录填报")
@@ -215,10 +218,13 @@ public class IotOpeationFillController {
     @Operation(summary = "获得运行记录填报分页")
     @PreAuthorize("@ss.hasPermission('rq:iot-opeation-fill:query')")
     public CommonResult<PageResult<IotOpeationFillOrderDO>> getIotOpeationFillPage1(@Valid IotOpeationFillPageReqVO pageReqVO) {
-        IotOpeationFillDO fillDO = new IotOpeationFillDO();
-        fillDO.setId(pageReqVO.getDeptId());
-        List<IotOpeationFillDO> pdList = iotOpeationFillService.pdList1(fillDO);
-        List<Long> idList  = pdList.stream().map(o -> o.getId()).collect(Collectors.toList());
+
+        Set<Long> idList = new HashSet<>();
+        if(Objects.nonNull(pageReqVO.getDeptId())){
+            idList =  deptService.getChildDeptIdListFromCache(pageReqVO.getDeptId());
+            idList.add(pageReqVO.getDeptId());
+        }
+
         PageResult<IotOpeationFillOrderDO> fillList = new PageResult<>();
 
         fillList = iotOpeationFillService.fillList2(pageReqVO,idList);
@@ -342,7 +348,6 @@ public class IotOpeationFillController {
         }
 
 
-
         return success(BeanUtils.toBean(list,IotModelTemplateAttrsDO.class));
     }
 

+ 1 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/iotmodeltemplate/IotModelTemplateDO.java

@@ -73,4 +73,5 @@ public class IotModelTemplateDO extends BaseDO {
      */
     private Integer version;
 
+
 }

+ 2 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/iotmodeltemplateattrs/IotModelTemplateAttrsDO.java

@@ -101,6 +101,8 @@ public class IotModelTemplateAttrsDO extends BaseDO {
 
     private Integer isCollection;
 
+    private Integer isSum;
+
     private String modelAttr;
     private String fillContent;
     private BigDecimal totalRunTime;

+ 7 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/iotmodeltemplate/IotModelTemplateMapper.java

@@ -3,11 +3,14 @@ package cn.iocoder.yudao.module.pms.dal.mysql.iotmodeltemplate;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
 import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
 import cn.iocoder.yudao.module.pms.controller.admin.iotmodeltemplate.vo.IotModelTemplatePageReqVO;
 import cn.iocoder.yudao.module.pms.dal.dataobject.iotmodeltemplate.IotModelTemplateDO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.iotopeationfill.IotOpeationFillOrderDO;
 import org.apache.ibatis.annotations.Mapper;
 
 import javax.validation.constraints.Negative;
+import java.util.Collection;
 import java.util.List;
 
 /**
@@ -18,9 +21,9 @@ import java.util.List;
 @Mapper
 public interface IotModelTemplateMapper extends BaseMapperX<IotModelTemplateDO> {
 
-    default PageResult<IotModelTemplateDO> selectPage(IotModelTemplatePageReqVO reqVO) {
+    default PageResult<IotModelTemplateDO> selectPage(IotModelTemplatePageReqVO reqVO,Collection<Long> deptIds) {
         return selectPage(reqVO, new LambdaQueryWrapperX<IotModelTemplateDO>()
-                .eqIfPresent(IotModelTemplateDO::getDeviceCategoryId, reqVO.getDeviceCategoryId())
+                .inIfPresent(IotModelTemplateDO::getDeviceCategoryId, deptIds)
                 .likeIfPresent(IotModelTemplateDO::getName, reqVO.getName())
                 .eqIfPresent(IotModelTemplateDO::getCode, reqVO.getCode())
                 .eqIfPresent(IotModelTemplateDO::getAttrs, reqVO.getAttrs())
@@ -38,4 +41,6 @@ public interface IotModelTemplateMapper extends BaseMapperX<IotModelTemplateDO>
     };
 
     List<IotModelTemplateDO> modelList();
+    @TenantIgnore
+    List<IotModelTemplateDO> isRelated(IotModelTemplatePageReqVO reqVO);
 }

+ 1 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/iotmodeltemplateattrs/IotModelTemplateAttrsMapper.java

@@ -36,6 +36,7 @@ public interface IotModelTemplateAttrsMapper extends BaseMapperX<IotModelTemplat
                 .eqIfPresent(IotModelTemplateAttrsDO::getStatus, reqVO.getStatus())
                 .eqIfPresent(IotModelTemplateAttrsDO::getModelAttr, reqVO.getModelAttr())
                 .eqIfPresent(IotModelTemplateAttrsDO::getIsCollection, reqVO.getIsCollection())
+                .eqIfPresent(IotModelTemplateAttrsDO::getIsSum, reqVO.getIsSum())
                 .eqIfPresent(IotModelTemplateAttrsDO::getRemark, reqVO.getRemark())
                 .eqIfPresent(IotModelTemplateAttrsDO::getSort, reqVO.getSort())
                 .eqIfPresent(IotModelTemplateAttrsDO::getSelectOptions, reqVO.getSelectOptions())

+ 2 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/iotopeationfill/IotOpeationFillMapper.java

@@ -67,6 +67,8 @@ public interface IotOpeationFillMapper extends BaseMapperX<IotOpeationFillDO> {
     List<IotOpeationFillDO> rhList();
     @TenantIgnore
     List<IotOpeationFillDO> pdList1(IotOpeationFillDO vo);
+    @TenantIgnore
+    List<IotOpeationFillDO> flList(IotOpeationFillDO vo);
 
     @TenantIgnore
     List<IotOpeationFillDO> pdList();

+ 4 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotmodeltemplate/IotModelTemplateService.java

@@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.pms.controller.admin.iotmodeltemplate.vo.IotModel
 import cn.iocoder.yudao.module.pms.dal.dataobject.iotmodeltemplate.IotModelTemplateDO;
 
 import javax.validation.Valid;
+import java.util.Collection;
 import java.util.List;
 
 /**
@@ -51,7 +52,7 @@ public interface IotModelTemplateService {
      * @param pageReqVO 分页查询
      * @return PMS 功能优化 设备模板分页
      */
-    PageResult<IotModelTemplateDO> getIotDeviceTemplatePage(IotModelTemplatePageReqVO pageReqVO);
+    PageResult<IotModelTemplateDO> getIotDeviceTemplatePage(IotModelTemplatePageReqVO pageReqVO, Collection<Long> deptIds);
 
     /**
      * 根据设备分类id 获取设备模板(属性)
@@ -70,4 +71,6 @@ public interface IotModelTemplateService {
     void updateDeviceTemplateStatus(Long id, Integer status);
 
     List<IotModelTemplateDO> modelList();
+
+    List<IotModelTemplateDO> isRelated(IotModelTemplatePageReqVO reqVO);
 }

+ 8 - 2
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotmodeltemplate/IotModelTemplateServiceImpl.java

@@ -11,6 +11,7 @@ import org.springframework.validation.annotation.Validated;
 
 import javax.annotation.Resource;
 
+import java.util.Collection;
 import java.util.List;
 
 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
@@ -66,8 +67,8 @@ public class IotModelTemplateServiceImpl implements IotModelTemplateService {
     }
 
     @Override
-    public PageResult<IotModelTemplateDO> getIotDeviceTemplatePage(IotModelTemplatePageReqVO pageReqVO) {
-        return iotModelTemplateMapper.selectPage(pageReqVO);
+    public PageResult<IotModelTemplateDO> getIotDeviceTemplatePage(IotModelTemplatePageReqVO pageReqVO, Collection<Long> deptIds) {
+        return iotModelTemplateMapper.selectPage(pageReqVO,deptIds);
     }
 
     @Override
@@ -91,4 +92,9 @@ public class IotModelTemplateServiceImpl implements IotModelTemplateService {
         return iotModelTemplateMapper.modelList();
     }
 
+    @Override
+    public List<IotModelTemplateDO> isRelated(IotModelTemplatePageReqVO reqVO) {
+        return iotModelTemplateMapper.isRelated(reqVO);
+    }
+
 }

+ 3 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotopeationfill/IotOpeationFillService.java

@@ -74,7 +74,9 @@ public interface IotOpeationFillService {
 
     List<IotOpeationFillDO> pdList1(IotOpeationFillDO vo);
 
-    PageResult<IotOpeationFillOrderDO> fillList2(IotOpeationFillPageReqVO vo,List<Long> deptIds);
+    List<IotOpeationFillDO> flList(IotOpeationFillDO vo);
+
+    PageResult<IotOpeationFillOrderDO> fillList2(IotOpeationFillPageReqVO vo,Collection<Long> deptIds);
 
 
 

+ 11 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotopeationfill/IotOpeationFillServiceImpl.java

@@ -21,6 +21,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
 
 
+import java.util.Collection;
 import java.util.List;
 
 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
@@ -91,6 +92,10 @@ public class IotOpeationFillServiceImpl implements IotOpeationFillService {
 
     @Override
     public List<IotModelTemplateAttrsDO> getAttrsById(IotModelTemplateAttrsRespVO vo) {
+
+
+
+
         return iotOpeationFillMapper.getAttrsById(vo);
     }
 
@@ -130,7 +135,12 @@ public class IotOpeationFillServiceImpl implements IotOpeationFillService {
     }
 
     @Override
-    public PageResult<IotOpeationFillOrderDO> fillList2(IotOpeationFillPageReqVO vo,List<Long> deptIds) {
+    public List<IotOpeationFillDO> flList(IotOpeationFillDO vo) {
+        return iotOpeationFillMapper.flList(vo);
+    }
+
+    @Override
+    public PageResult<IotOpeationFillOrderDO> fillList2(IotOpeationFillPageReqVO vo, Collection<Long> deptIds) {
         return iotOpeationFillOrderMapper.selectPage1(vo,deptIds);
     }
 

+ 11 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/IotModelTemplateMapper.xml

@@ -9,5 +9,16 @@
     </select>
 
 
+    <select id="isRelated" parameterType="cn.iocoder.yudao.module.pms.controller.admin.iotmodeltemplate.vo.IotModelTemplatePageReqVO"
+            resultType="cn.iocoder.yudao.module.pms.dal.dataobject.iotmodeltemplate.IotModelTemplateDO">
+        select distinct a.* from rqiot.rq_iot_opeation_fill_order a,
+                                 rq_iot_opeation_fill b,
+                                 rq_iot_model_template c
+        where a.id =b.order_id
+          and
+            b.device_category_id = c.device_category_id
+          and
+            c.device_category_id = #{deviceCategoryId}
+    </select>
 
 </mapper>

+ 16 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/IotOpeationFillMapper.xml

@@ -214,6 +214,20 @@
         ORDER BY id;
     </select>
 
+    <select id="flList" parameterType="cn.iocoder.yudao.module.pms.dal.dataobject.iotopeationfill.IotOpeationFillDO"
+            resultType="cn.iocoder.yudao.module.pms.dal.dataobject.iotopeationfill.IotOpeationFillDO">
+        SELECT au.id, au.name, au.parent_id
+        FROM (SELECT * FROM rq_iot_product_classify WHERE parent_id IS NOT NULL) au,
+             (SELECT @parent_id := #{id}) pd
+        WHERE FIND_IN_SET(parent_id, @parent_id) > 0
+          AND @parent_id := concat(@parent_id, ',', id)
+        UNION
+        SELECT id, name, parent_id
+        FROM rqiot.rq_iot_product_classify
+        WHERE id = #{id}
+        ORDER BY id;
+    </select>
+
 
     <select id="pdList" resultType="cn.iocoder.yudao.module.pms.dal.dataobject.iotopeationfill.IotOpeationFillDO">
         select
@@ -244,7 +258,8 @@
         select
             name,
             type,
-            model_attr
+            model_attr,
+            is_sum
         from
             rqiot.rq_iot_model_template_attrs
         where