Browse Source

风险查询和风险规则提交

zx 6 tháng trước cách đây
mục cha
commit
b2888287ec

+ 121 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/controller/PdmRiskRoleController.java

@@ -0,0 +1,121 @@
+package com.ruoyi.powerdistribution.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.powerdistribution.domain.PdmRiskRole;
+import com.ruoyi.powerdistribution.service.IPdmRiskRoleService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 风险规则Controller
+ *
+ * @author ruoyi
+ * @date 2024-12-04
+ */
+@RestController
+@RequestMapping("/power/riskRole")
+public class PdmRiskRoleController extends BaseController
+{
+    @Autowired
+    private IPdmRiskRoleService pdmRiskRoleService;
+
+    /**
+     * 查询风险规则列表
+     */
+    @ApiOperation(value = "查询风险规则列表分页")
+    @PreAuthorize("@ss.hasPermi('system:role:list')")
+    @GetMapping("/page")
+    public TableDataInfo page(PdmRiskRole pdmRiskRole)
+    {
+        startPage();
+        List<PdmRiskRole> list = pdmRiskRoleService.selectPdmRiskRoleList(pdmRiskRole);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询风险规则列表(不分页)
+     */
+    @ApiOperation(value = "查询风险规则列表(不分页)")
+    @GetMapping("/list")
+    public TableDataInfo list(PdmRiskRole pdmRiskRole)
+    {
+        startPage();
+        List<PdmRiskRole> list = pdmRiskRoleService.selectPdmRiskRoleList(pdmRiskRole);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出风险规则列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:export')")
+    @Log(title = "风险规则", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, PdmRiskRole pdmRiskRole)
+    {
+        List<PdmRiskRole> list = pdmRiskRoleService.selectPdmRiskRoleList(pdmRiskRole);
+        ExcelUtil<PdmRiskRole> util = new ExcelUtil<PdmRiskRole>(PdmRiskRole.class);
+        util.exportExcel(response, list, "风险规则数据");
+    }
+
+    /**
+     * 获取风险规则详细信息
+     */
+    @ApiOperation(value = "获取风险规则详细信息")
+    @PreAuthorize("@ss.hasPermi('system:role:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(pdmRiskRoleService.selectPdmRiskRoleById(id));
+    }
+
+    /**
+     * 新增风险规则
+     */
+    @ApiOperation(value = "新增风险规则")
+    @PreAuthorize("@ss.hasPermi('system:role:add')")
+    @Log(title = "风险规则", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    public AjaxResult add(@RequestBody PdmRiskRole pdmRiskRole)
+    {
+        return toAjax(pdmRiskRoleService.insertPdmRiskRole(pdmRiskRole));
+    }
+
+    /**
+     * 修改风险规则
+     */
+    @ApiOperation(value = "修改风险规则")
+    @PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "风险规则", businessType = BusinessType.UPDATE)
+    @PostMapping("update")
+    public AjaxResult edit(@RequestBody PdmRiskRole pdmRiskRole)
+    {
+        return toAjax(pdmRiskRoleService.updatePdmRiskRole(pdmRiskRole));
+    }
+
+    /**
+     * 删除风险规则
+     */
+    @ApiOperation(value = "删除风险规则")
+    @PreAuthorize("@ss.hasPermi('system:role:remove')")
+    @Log(title = "风险规则", businessType = BusinessType.DELETE)
+	@GetMapping("delete/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(pdmRiskRoleService.deletePdmRiskRoleByIds(ids));
+    }
+}

+ 83 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmRiskRole.java

@@ -0,0 +1,83 @@
+package com.ruoyi.powerdistribution.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 风险规则对象 pdm_risk_role
+ *
+ * @author ruoyi
+ * @date 2024-12-04
+ */
+public class PdmRiskRole extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 风险编码 */
+    @Excel(name = "风险编码")
+    private String roleCode;
+
+    /** 风险名称 */
+    @Excel(name = "风险名称")
+    private String roleName;
+
+    /** 风险匹配规则明细 */
+    @Excel(name = "风险匹配规则明细")
+    private String roleDes;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setRoleCode(String roleCode)
+    {
+        this.roleCode = roleCode;
+    }
+
+    public String getRoleCode()
+    {
+        return roleCode;
+    }
+    public void setRoleName(String roleName)
+    {
+        this.roleName = roleName;
+    }
+
+    public String getRoleName()
+    {
+        return roleName;
+    }
+    public void setRoleDes(String roleDes)
+    {
+        this.roleDes = roleDes;
+    }
+
+    public String getRoleDes()
+    {
+        return roleDes;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("roleCode", getRoleCode())
+            .append("roleName", getRoleName())
+            .append("roleDes", getRoleDes())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 10 - 2
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmWorkPlan.java

@@ -414,8 +414,8 @@ public class PdmWorkPlan extends BaseEntity
     @Excel(name = "临时计划原因 ")
     private String planReason;
 
-
-
+    /** 风险类型  */
+    private String riskType;
 
     public void setId(Long id)
     {
@@ -1298,6 +1298,14 @@ public class PdmWorkPlan extends BaseEntity
         this.planReason = planReason;
     }
 
+    public String getRiskType() {
+        return riskType;
+    }
+
+    public void setRiskType(String riskType) {
+        this.riskType = riskType;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 13 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/dto/PdmWorkPlanDTO.java

@@ -27,6 +27,11 @@ public class PdmWorkPlanDTO extends PdmWorkPlan {
      */
     private String dataFlag;
 
+    /**
+     * 是否风险 1:是
+     */
+    private String riskFlag;
+
     public String getStartDate() {
         return startDate;
     }
@@ -58,4 +63,12 @@ public class PdmWorkPlanDTO extends PdmWorkPlan {
     public void setDataFlag(String dataFlag) {
         this.dataFlag = dataFlag;
     }
+
+    public String getRiskFlag() {
+        return riskFlag;
+    }
+
+    public void setRiskFlag(String riskFlag) {
+        this.riskFlag = riskFlag;
+    }
 }

+ 61 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/mapper/PdmRiskRoleMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.powerdistribution.mapper;
+
+import java.util.List;
+import com.ruoyi.powerdistribution.domain.PdmRiskRole;
+
+/**
+ * 风险规则Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-12-04
+ */
+public interface PdmRiskRoleMapper
+{
+    /**
+     * 查询风险规则
+     *
+     * @param id 风险规则主键
+     * @return 风险规则
+     */
+    public PdmRiskRole selectPdmRiskRoleById(Long id);
+
+    /**
+     * 查询风险规则列表
+     *
+     * @param pdmRiskRole 风险规则
+     * @return 风险规则集合
+     */
+    public List<PdmRiskRole> selectPdmRiskRoleList(PdmRiskRole pdmRiskRole);
+
+    /**
+     * 新增风险规则
+     *
+     * @param pdmRiskRole 风险规则
+     * @return 结果
+     */
+    public int insertPdmRiskRole(PdmRiskRole pdmRiskRole);
+
+    /**
+     * 修改风险规则
+     *
+     * @param pdmRiskRole 风险规则
+     * @return 结果
+     */
+    public int updatePdmRiskRole(PdmRiskRole pdmRiskRole);
+
+    /**
+     * 删除风险规则
+     *
+     * @param id 风险规则主键
+     * @return 结果
+     */
+    public int deletePdmRiskRoleById(Long id);
+
+    /**
+     * 批量删除风险规则
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deletePdmRiskRoleByIds(Long[] ids);
+}

+ 61 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/IPdmRiskRoleService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.powerdistribution.service;
+
+import java.util.List;
+import com.ruoyi.powerdistribution.domain.PdmRiskRole;
+
+/**
+ * 风险规则Service接口
+ *
+ * @author ruoyi
+ * @date 2024-12-04
+ */
+public interface IPdmRiskRoleService
+{
+    /**
+     * 查询风险规则
+     *
+     * @param id 风险规则主键
+     * @return 风险规则
+     */
+    public PdmRiskRole selectPdmRiskRoleById(Long id);
+
+    /**
+     * 查询风险规则列表
+     *
+     * @param pdmRiskRole 风险规则
+     * @return 风险规则集合
+     */
+    public List<PdmRiskRole> selectPdmRiskRoleList(PdmRiskRole pdmRiskRole);
+
+    /**
+     * 新增风险规则
+     *
+     * @param pdmRiskRole 风险规则
+     * @return 结果
+     */
+    public int insertPdmRiskRole(PdmRiskRole pdmRiskRole);
+
+    /**
+     * 修改风险规则
+     *
+     * @param pdmRiskRole 风险规则
+     * @return 结果
+     */
+    public int updatePdmRiskRole(PdmRiskRole pdmRiskRole);
+
+    /**
+     * 批量删除风险规则
+     *
+     * @param ids 需要删除的风险规则主键集合
+     * @return 结果
+     */
+    public int deletePdmRiskRoleByIds(Long[] ids);
+
+    /**
+     * 删除风险规则信息
+     *
+     * @param id 风险规则主键
+     * @return 结果
+     */
+    public int deletePdmRiskRoleById(Long id);
+}

+ 96 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmRiskRoleServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.powerdistribution.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.powerdistribution.mapper.PdmRiskRoleMapper;
+import com.ruoyi.powerdistribution.domain.PdmRiskRole;
+import com.ruoyi.powerdistribution.service.IPdmRiskRoleService;
+
+/**
+ * 风险规则Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-12-04
+ */
+@Service
+public class PdmRiskRoleServiceImpl implements IPdmRiskRoleService
+{
+    @Autowired
+    private PdmRiskRoleMapper pdmRiskRoleMapper;
+
+    /**
+     * 查询风险规则
+     *
+     * @param id 风险规则主键
+     * @return 风险规则
+     */
+    @Override
+    public PdmRiskRole selectPdmRiskRoleById(Long id)
+    {
+        return pdmRiskRoleMapper.selectPdmRiskRoleById(id);
+    }
+
+    /**
+     * 查询风险规则列表
+     *
+     * @param pdmRiskRole 风险规则
+     * @return 风险规则
+     */
+    @Override
+    public List<PdmRiskRole> selectPdmRiskRoleList(PdmRiskRole pdmRiskRole)
+    {
+        return pdmRiskRoleMapper.selectPdmRiskRoleList(pdmRiskRole);
+    }
+
+    /**
+     * 新增风险规则
+     *
+     * @param pdmRiskRole 风险规则
+     * @return 结果
+     */
+    @Override
+    public int insertPdmRiskRole(PdmRiskRole pdmRiskRole)
+    {
+        pdmRiskRole.setCreateTime(DateUtils.getNowDate());
+        return pdmRiskRoleMapper.insertPdmRiskRole(pdmRiskRole);
+    }
+
+    /**
+     * 修改风险规则
+     *
+     * @param pdmRiskRole 风险规则
+     * @return 结果
+     */
+    @Override
+    public int updatePdmRiskRole(PdmRiskRole pdmRiskRole)
+    {
+        pdmRiskRole.setUpdateTime(DateUtils.getNowDate());
+        return pdmRiskRoleMapper.updatePdmRiskRole(pdmRiskRole);
+    }
+
+    /**
+     * 批量删除风险规则
+     *
+     * @param ids 需要删除的风险规则主键
+     * @return 结果
+     */
+    @Override
+    public int deletePdmRiskRoleByIds(Long[] ids)
+    {
+        return pdmRiskRoleMapper.deletePdmRiskRoleByIds(ids);
+    }
+
+    /**
+     * 删除风险规则信息
+     *
+     * @param id 风险规则主键
+     * @return 结果
+     */
+    @Override
+    public int deletePdmRiskRoleById(Long id)
+    {
+        return pdmRiskRoleMapper.deletePdmRiskRoleById(id);
+    }
+}

+ 82 - 0
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmRiskRoleMapper.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.powerdistribution.mapper.PdmRiskRoleMapper">
+
+    <resultMap type="PdmRiskRole" id="PdmRiskRoleResult">
+        <result property="id"    column="id"    />
+        <result property="roleCode"    column="role_code"    />
+        <result property="roleName"    column="role_name"    />
+        <result property="roleDes"    column="role_des"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectPdmRiskRoleVo">
+        select id, role_code, role_name, role_des, create_by, create_time, update_by, update_time from pdm_risk_role
+    </sql>
+
+    <select id="selectPdmRiskRoleList" parameterType="PdmRiskRole" resultMap="PdmRiskRoleResult">
+        <include refid="selectPdmRiskRoleVo"/>
+        <where>
+            <if test="roleCode != null  and roleCode != ''"> and role_code = #{roleCode}</if>
+            <if test="roleName != null  and roleName != ''"> and role_name like concat('%', #{roleName}, '%')</if>
+            <if test="roleDes != null  and roleDes != ''"> and role_des = #{roleDes}</if>
+        </where>
+    </select>
+
+    <select id="selectPdmRiskRoleById" parameterType="Long" resultMap="PdmRiskRoleResult">
+        <include refid="selectPdmRiskRoleVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertPdmRiskRole" parameterType="PdmRiskRole" useGeneratedKeys="true" keyProperty="id">
+        insert into pdm_risk_role
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="roleCode != null">role_code,</if>
+            <if test="roleName != null">role_name,</if>
+            <if test="roleDes != null">role_des,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="roleCode != null">#{roleCode},</if>
+            <if test="roleName != null">#{roleName},</if>
+            <if test="roleDes != null">#{roleDes},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updatePdmRiskRole" parameterType="PdmRiskRole">
+        update pdm_risk_role
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="roleCode != null">role_code = #{roleCode},</if>
+            <if test="roleName != null">role_name = #{roleName},</if>
+            <if test="roleDes != null">role_des = #{roleDes},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deletePdmRiskRoleById" parameterType="Long">
+        delete from pdm_risk_role where id = #{id}
+    </delete>
+
+    <delete id="deletePdmRiskRoleByIds" parameterType="String">
+        delete from pdm_risk_role where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 6 - 2
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmWorkPlanMapper.xml

@@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectPdmWorkPlanVo">
-        select id, uuid, week_plan_no, week_plan_id, proj_nm, proj_id, src_id, plan_nm, submit_org_nm, submit_org_id, org_sort, mgmt_org_nm, mgmt_org_id, blg_op_maint_city_org_id, blg_const_city_org_id, ovhaul_const_org_nm, ovhaul_const_org_id, op_maint_org_nm, op_maint_org_id, subs_or_line_nm, subs_or_line_id, op_risk_lvl_cd, op_risk_lvl_dsc, elecgd_risk_lvl_cd, elecgd_risk_lvl_dsc, volt_lvl_cd, volt_lvl_dsc, major_typ_cd, major_typ_dsc, op_typ_cd, op_typ_dsc, workticket_typ_cd, workticket_typ_dsc, poweroff_typ_cd, poweroff_typ_dsc, is_energized_op_cd, is_energized_op_dsc, plan_start_wk_tm, plan_end_tm, op_content, chg_scheme_dsc, op_addr, city_adm_addr, county_adm_addr, detl_pos, landmark_archit, work_team_nm, work_team_id, main_busi_org_op_num, outsourcing_org_op_num, industry_org_op_num, work_princip_nm, work_princip_id, work_princip_contact_mode, major_mgmt_dept, build_mgmt_org_nm, const_org_nm, const_org_id, const_org_cate_cd, const_org_cate_dsc, scntrct_org_nm, scntrct_org_id, scntrct_org_nature_cd, scntrct_org_nature_dsc, inspect_org_nm, inspect_org_id, poweroff_range, supervises_check, scene_supervises, scene_guardianship, release_st_cd, release_st_dsc, release_tm, release_pes, release_person_id, is_release_intime_cd, plan_exec_st_cd, is_chg_more_cd, is_chg_more_dsc, del_mark_cd, del_mark_dsc, bind_qt, is_wear_safetyhat, work_src, create_tm, more_new_tm, plan_typ_cd, plan_typ_dsc, std_org_no, std_org_nm, std_city_org_nm, data_dt, etl_tm, par_mon, std_city_org_no, plan_exec_st_dsc, create_by, create_time, update_by, update_time from pdm_work_plan
+        select id, uuid, week_plan_no, week_plan_id, proj_nm, proj_id, src_id, plan_nm, submit_org_nm, submit_org_id, org_sort, mgmt_org_nm, mgmt_org_id, blg_op_maint_city_org_id, blg_const_city_org_id, ovhaul_const_org_nm, ovhaul_const_org_id, op_maint_org_nm, op_maint_org_id, subs_or_line_nm, subs_or_line_id, op_risk_lvl_cd, op_risk_lvl_dsc, elecgd_risk_lvl_cd, elecgd_risk_lvl_dsc, volt_lvl_cd, volt_lvl_dsc, major_typ_cd, major_typ_dsc, op_typ_cd, op_typ_dsc, workticket_typ_cd, workticket_typ_dsc, poweroff_typ_cd, poweroff_typ_dsc, is_energized_op_cd, is_energized_op_dsc, plan_start_wk_tm, plan_end_tm, op_content, chg_scheme_dsc, op_addr, city_adm_addr, county_adm_addr, detl_pos, landmark_archit, work_team_nm, work_team_id, main_busi_org_op_num, outsourcing_org_op_num, industry_org_op_num, work_princip_nm, work_princip_id, work_princip_contact_mode, major_mgmt_dept, build_mgmt_org_nm, const_org_nm, const_org_id, const_org_cate_cd, const_org_cate_dsc, scntrct_org_nm, scntrct_org_id, scntrct_org_nature_cd, scntrct_org_nature_dsc, inspect_org_nm, inspect_org_id, poweroff_range, supervises_check, scene_supervises, scene_guardianship, release_st_cd, release_st_dsc, release_tm, release_pes, release_person_id, is_release_intime_cd, plan_exec_st_cd, is_chg_more_cd, is_chg_more_dsc, del_mark_cd, del_mark_dsc, bind_qt, is_wear_safetyhat, work_src, create_tm, more_new_tm, plan_typ_cd, plan_typ_dsc, std_org_no, std_org_nm, std_city_org_nm, data_dt, etl_tm, par_mon, std_city_org_no, plan_exec_st_dsc,plan_reason,cancel_reason,risk_type,create_by, create_time, update_by, update_time from pdm_work_plan
     </sql>
 
     <select id="selectPdmWorkPlanList" parameterType="com.ruoyi.powerdistribution.domain.dto.PdmWorkPlanDTO" resultMap="PdmWorkPlanResult">
@@ -211,6 +211,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="parMon != null  and parMon != ''"> and par_mon = #{parMon}</if>
             <if test="stdCityOrgNo != null  and stdCityOrgNo != ''"> and std_city_org_no = #{stdCityOrgNo}</if>
             <if test="planExecStDsc != null  and planExecStDsc != ''"> and plan_exec_st_dsc = #{planExecStDsc}</if>
+            <if test="riskType != null  and riskType != ''"> and risk_type = #{riskType}</if>
 
             <if test="startDate != null and startDate != ''">
              and date_format(plan_start_wk_tm,'%Y%m%d') &gt;= #{startDate}
@@ -225,7 +226,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and volt_lvl_cd not in ('2001008','2001009')
                 and not  (is_energized_op_cd = '2006001' and poweroff_typ_cd = '2005002' and workticket_typ_cd = '2008015')
             </if>
-
+            <if test="riskFlag != null and riskFlag == '1'">
+                and risk_type != '0'
+            </if>
         </where>
     </select>
 
@@ -539,6 +542,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="stdCityOrgNo != null">std_city_org_no = #{stdCityOrgNo},</if>
             <if test="planExecStDsc != null">plan_exec_st_dsc = #{planExecStDsc},</if>
             <if test="cancelReason != null">cancel_reason = #{cancelReason},</if>
+            <if test="riskType != null  and riskType != ''">risk_type = #{riskType}</if>
             <if test="planReason != null">plan_reason = #{planReason},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>