Преглед на файлове

修改调阅计划需求

luowei преди 2 години
родител
ревизия
32007ec373

+ 1 - 1
project_data/sql/0.0.2/soc/soc.sql

@@ -2015,7 +2015,7 @@ UPDATE `sys_dict_data` SET `dict_sort` = 700 WHERE `dict_value` = '10' and `dict
 UPDATE `sys_dict_data` SET `dict_sort` = 500 WHERE `dict_value` = '8' and `dict_type` = 'sys_org_type';
 UPDATE `sys_dict_data` SET `dict_sort` = 400 WHERE `dict_value` = '7' and `dict_type` = 'sys_org_type';
 UPDATE `sys_dict_data` SET `dict_sort` = 1000 WHERE `dict_value` = '9' and `dict_type` = 'sys_org_type';
-update `sys_dict_data` SET dict_label='已逾期' WHERE dict_type='retrieval_task_status' AND dict_label='已超期'
+update `sys_dict_data` SET dict_label='已逾期' WHERE dict_type='retrieval_task_status' AND dict_label='已超期';
 -- 演练任务状态字典排序修改
 UPDATE sys_dict_data t SET t.dict_sort = 2 WHERE  t.dict_type = 'edu_training_do_status' and t.dict_value=1;
 UPDATE sys_dict_data t SET t.dict_sort = 1 WHERE  t.dict_type = 'edu_training_do_status' and t.dict_value=4;

+ 5 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/mapper/TMonitoringRetrievalPlanMapper.java

@@ -2,7 +2,11 @@ package com.xunmei.core.access.mapper;
 
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xunmei.core.access.domain.TMonitoringRetrievalPlan;
+import com.xunmei.core.access.vo.TMonitoringRetrievalPlanVO;
+import com.xunmei.core.evaluate.dto.EvaluateTaskDTO;
+import com.xunmei.core.evaluate.vo.CoreEvaluateTaskVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -23,7 +27,7 @@ public interface TMonitoringRetrievalPlanMapper extends BaseMapper<TMonitoringRe
      * @return 监控调阅计划
      */
      TMonitoringRetrievalPlan selectTMonitoringRetrievalPlanById(Long id);
-
+    Page<TMonitoringRetrievalPlanVO> selectPageList(@Param("page") Page<TMonitoringRetrievalPlanVO> page, @Param("request") TMonitoringRetrievalPlan request);
     /**
      * 查询监控调阅计划列表
      *

+ 7 - 6
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/service/impl/TMonitoringRetrievalPlanServiceImpl.java

@@ -72,7 +72,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
     public TableDataInfo selectPage(TMonitoringRetrievalPlan tMonitoringRetrievalPlan) {
         //未删除
         tMonitoringRetrievalPlan.setIsDeleted(ZERO.longValue());
-        Page<TMonitoringRetrievalPlan> page;
+        Page<TMonitoringRetrievalPlanVO> page;
         //分页
         if (tMonitoringRetrievalPlan.getPageNum() != null && tMonitoringRetrievalPlan.getPageSize() != null) {
             page = new Page<>(tMonitoringRetrievalPlan.getPageNum(), tMonitoringRetrievalPlan.getPageSize());
@@ -81,7 +81,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
         }
         //查询条件
         String planName = tMonitoringRetrievalPlan.getPlanName();
-        tMonitoringRetrievalPlan.setPlanName(null);
+       // tMonitoringRetrievalPlan.setPlanName(null);
 
         QueryWrapper<TMonitoringRetrievalPlan> query = new QueryWrapper<>(tMonitoringRetrievalPlan);
         //下穿
@@ -93,6 +93,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
             SysOrg sysOrg = remoteOrgService.selectSysOrgById(tMonitoringRetrievalPlan.getOrgId(), SecurityConstants.INNER);
             tMonitoringRetrievalPlan.setOrgId(null);
             query.lambda().likeRight(TMonitoringRetrievalPlan::getOrgPath, sysOrg.getPath());
+            tMonitoringRetrievalPlan.setOrgPath(sysOrg.getPath());
         }
         if (StringUtils.isNotEmpty(planName)) {
             query.like("plan_name", planName);
@@ -104,11 +105,11 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
         query.orderByAsc("parent_id");
         query.orderByDesc("create_time");
         //获取数据
-        // query.isNull(PARENT_ID);
-        page = tMonitoringRetrievalPlanMapper.selectPage(page, query);
-        List<TMonitoringRetrievalPlan> records = page.getRecords();
+
+        page = tMonitoringRetrievalPlanMapper.selectPageList(page, tMonitoringRetrievalPlan);
+       /* List<TMonitoringRetrievalPlan> records = page.getRecords();
         List<TMonitoringRetrievalPlanVO>tMonitoringRetrievalPlanVOS = null;
-        SysOrg sysOrg = remoteOrgService.selectSysOrgById(SecurityUtils.getLoginUser().getOrgId(), SecurityConstants.INNER);
+        SysOrg sysOrg = remoteOrgService.selectSysOrgById(SecurityUtils.getLoginUser().getOrgId(), SecurityConstants.INNER);*/
   /*      for (TMonitoringRetrievalPlan r:records){
             TMonitoringRetrievalPlanVO tMonitoringRetrievalPlanVO=new TMonitoringRetrievalPlanVO();
             BeanUtils.copyProperties(r,tMonitoringRetrievalPlanVO);

+ 32 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/access/TMonitoringRetrievalPlanMapper.xml

@@ -76,6 +76,38 @@
             <include refid="selectTMonitoringRetrievalPlanVo"/>
             where id = #{id}
     </select>
+    <select id="selectPageList" resultType="com.xunmei.core.access.vo.TMonitoringRetrievalPlanVO">
+        SELECT
+            *
+        FROM
+            core_monitoring_retrieval_plan
+        WHERE
+            is_deleted=0
+        <if test="request.planName != null  and request.planName != ''">
+            AND    plan_name like concat('%', #{request.planName}, '%')
+        </if>
+        <if test="request.orgId != null  and request.orgId != ''">
+            AND    org_id = #{request.orgId}
+        </if>
+
+        <if test="request.orgPath != null  and request.orgPath != ''">
+            and  org_path like concat( #{request.orgPath}, '%')
+        </if>
+        <if test="request.orgType != null  and request.orgType != ''">
+            AND    org_type = #{request.orgType}
+        </if>
+        <if test="request.roleId != null  and request.roleId != ''">
+            AND    role_id = #{request.roleId}
+        </if>
+        <if test="request.planCycle != null  and request.planCycle != ''">
+            AND    plan_cycle = #{request.planCycle}
+        </if>
+        <if test="request.planStatus != null  and request.planStatus != ''">
+            AND    plan_status = #{request.planStatus}
+        </if>
+        ORDER BY parent_id ASC,
+        create_time desc
+    </select>
 
     <insert id="insertTMonitoringRetrievalPlan" parameterType="com.xunmei.core.access.domain.TMonitoringRetrievalPlan">
         insert into t_monitoring_retrieval_plan