|  | @@ -3,157 +3,203 @@
 | 
	
		
			
				|  |  |          PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
	
		
			
				|  |  |          "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
	
		
			
				|  |  |  <mapper namespace="com.xunmei.core.safetyindex.mapper.CoreSafetyIndexCalculateRuleMapper">
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    <resultMap type="com.xunmei.common.core.domain.safetyindex.domain.CoreSafetyIndexCalculateRule" id="CoreSafetyIndexCalculateRuleResult">
 | 
	
		
			
				|  |  | -                <result property="id" column="id"/>
 | 
	
		
			
				|  |  | -                <result property="typeCode" column="type_code"/>
 | 
	
		
			
				|  |  | -                <result property="projectCode" column="project_code"/>
 | 
	
		
			
				|  |  | -                <result property="pointCode" column="point_code"/>
 | 
	
		
			
				|  |  | -                <result property="deductionType" column="deduction_type"/>
 | 
	
		
			
				|  |  | -                <result property="score" column="score"/>
 | 
	
		
			
				|  |  | -                <result property="formula" column="formula"/>
 | 
	
		
			
				|  |  | -                <result property="orgType" column="org_type"/>
 | 
	
		
			
				|  |  | -                <result property="deleted" column="deleted"/>
 | 
	
		
			
				|  |  | -                <result property="cycle" column="cycle"/>
 | 
	
		
			
				|  |  | +    <resultMap type="com.xunmei.common.core.domain.safetyindex.domain.CoreSafetyIndexCalculateRule"
 | 
	
		
			
				|  |  | +               id="CoreSafetyIndexCalculateRuleResult">
 | 
	
		
			
				|  |  | +        <result property="id" column="id"/>
 | 
	
		
			
				|  |  | +        <result property="typeCode" column="type_code"/>
 | 
	
		
			
				|  |  | +        <result property="projectCode" column="project_code"/>
 | 
	
		
			
				|  |  | +        <result property="pointCode" column="point_code"/>
 | 
	
		
			
				|  |  | +        <result property="deductionType" column="deduction_type"/>
 | 
	
		
			
				|  |  | +        <result property="score" column="score"/>
 | 
	
		
			
				|  |  | +        <result property="formula" column="formula"/>
 | 
	
		
			
				|  |  | +        <result property="orgType" column="org_type"/>
 | 
	
		
			
				|  |  | +        <result property="deleted" column="deleted"/>
 | 
	
		
			
				|  |  | +        <result property="cycle" column="cycle"/>
 | 
	
		
			
				|  |  |      </resultMap>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <sql id="selectCoreSafetyIndexCalculateRuleVo">
 | 
	
		
			
				|  |  | -        select id, type_code, project_code, point_code, deduction_type, score, formula, org_type, deleted, cycle, remark
 | 
	
		
			
				|  |  | +        select id,
 | 
	
		
			
				|  |  | +               type_code,
 | 
	
		
			
				|  |  | +               project_code,
 | 
	
		
			
				|  |  | +               point_code,
 | 
	
		
			
				|  |  | +               deduction_type,
 | 
	
		
			
				|  |  | +               score,
 | 
	
		
			
				|  |  | +               formula,
 | 
	
		
			
				|  |  | +               org_type,
 | 
	
		
			
				|  |  | +               deleted,
 | 
	
		
			
				|  |  | +               cycle,
 | 
	
		
			
				|  |  | +               remark
 | 
	
		
			
				|  |  |          from core_safety_index_calculate_rule
 | 
	
		
			
				|  |  |      </sql>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <select id="selectCoreSafetyIndexCalculateRuleList" parameterType="com.xunmei.common.core.domain.safetyindex.domain.CoreSafetyIndexCalculateRule"
 | 
	
		
			
				|  |  | +    <select id="selectCoreSafetyIndexCalculateRuleList"
 | 
	
		
			
				|  |  | +            parameterType="com.xunmei.common.core.domain.safetyindex.domain.CoreSafetyIndexCalculateRule"
 | 
	
		
			
				|  |  |              resultMap="CoreSafetyIndexCalculateRuleResult">
 | 
	
		
			
				|  |  |          <include refid="selectCoreSafetyIndexCalculateRuleVo"/>
 | 
	
		
			
				|  |  |          <where>
 | 
	
		
			
				|  |  | -                        <if test="typeCode != null  and typeCode != ''">
 | 
	
		
			
				|  |  | -                            and type_code = #{typeCode}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | -                        <if test="projectCode != null  and projectCode != ''">
 | 
	
		
			
				|  |  | -                            and project_code = #{projectCode}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | -                        <if test="pointCode != null  and pointCode != ''">
 | 
	
		
			
				|  |  | -                            and point_code = #{pointCode}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | -                        <if test="deductionType != null ">
 | 
	
		
			
				|  |  | -                            and deduction_type = #{deductionType}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | -                        <if test="score != null ">
 | 
	
		
			
				|  |  | -                            and score = #{score}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | -                        <if test="formula != null  and formula != ''">
 | 
	
		
			
				|  |  | -                            and formula = #{formula}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | -                        <if test="orgType != null ">
 | 
	
		
			
				|  |  | -                            and org_type = #{orgType}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | -                        <if test="deleted != null ">
 | 
	
		
			
				|  |  | -                            and deleted = #{deleted}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | -                        <if test="cycle != null ">
 | 
	
		
			
				|  |  | -                            and cycle = #{cycle}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | +            <if test="typeCode != null  and typeCode != ''">
 | 
	
		
			
				|  |  | +                and type_code = #{typeCode}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="projectCode != null  and projectCode != ''">
 | 
	
		
			
				|  |  | +                and project_code = #{projectCode}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="pointCode != null  and pointCode != ''">
 | 
	
		
			
				|  |  | +                and point_code = #{pointCode}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="deductionType != null ">
 | 
	
		
			
				|  |  | +                and deduction_type = #{deductionType}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="score != null ">
 | 
	
		
			
				|  |  | +                and score = #{score}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="formula != null  and formula != ''">
 | 
	
		
			
				|  |  | +                and formula = #{formula}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="orgType != null ">
 | 
	
		
			
				|  |  | +                and org_type = #{orgType}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="deleted != null ">
 | 
	
		
			
				|  |  | +                and deleted = #{deleted}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="cycle != null ">
 | 
	
		
			
				|  |  | +                and cycle = #{cycle}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |          </where>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectCoreSafetyIndexCalculateRuleById" parameterType="Long"
 | 
	
		
			
				|  |  |              resultMap="CoreSafetyIndexCalculateRuleResult">
 | 
	
		
			
				|  |  | -            <include refid="selectCoreSafetyIndexCalculateRuleVo"/>
 | 
	
		
			
				|  |  | -            where id = #{id}
 | 
	
		
			
				|  |  | +        <include refid="selectCoreSafetyIndexCalculateRuleVo"/>
 | 
	
		
			
				|  |  | +        where id = #{id}
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <insert id="insertCoreSafetyIndexCalculateRule" parameterType="com.xunmei.common.core.domain.safetyindex.domain.CoreSafetyIndexCalculateRule">
 | 
	
		
			
				|  |  | +    <insert id="insertCoreSafetyIndexCalculateRule"
 | 
	
		
			
				|  |  | +            parameterType="com.xunmei.common.core.domain.safetyindex.domain.CoreSafetyIndexCalculateRule">
 | 
	
		
			
				|  |  |          insert into core_safety_index_calculate_rule
 | 
	
		
			
				|  |  |          <trim prefix="(" suffix=")" suffixOverrides=",">
 | 
	
		
			
				|  |  | -                    <if test="id != null">id,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="typeCode != null">type_code,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="projectCode != null">project_code,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="pointCode != null">point_code,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="deductionType != null">deduction_type,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="score != null">score,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="formula != null">formula,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="orgType != null">org_type,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="deleted != null">deleted,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="cycle != null">cycle,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="remark != null">remark,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | +            <if test="id != null">
 | 
	
		
			
				|  |  | +                id,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="typeCode != null">
 | 
	
		
			
				|  |  | +                type_code,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="projectCode != null">
 | 
	
		
			
				|  |  | +                project_code,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="pointCode != null">
 | 
	
		
			
				|  |  | +                point_code,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="deductionType != null">
 | 
	
		
			
				|  |  | +                deduction_type,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="score != null">
 | 
	
		
			
				|  |  | +                score,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="formula != null">
 | 
	
		
			
				|  |  | +                formula,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="orgType != null">
 | 
	
		
			
				|  |  | +                org_type,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="deleted != null">
 | 
	
		
			
				|  |  | +                deleted,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="cycle != null">
 | 
	
		
			
				|  |  | +                cycle,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="remark != null">
 | 
	
		
			
				|  |  | +                remark,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |          </trim>
 | 
	
		
			
				|  |  |          <trim prefix="values (" suffix=")" suffixOverrides=",">
 | 
	
		
			
				|  |  | -                    <if test="id != null">#{id},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="typeCode != null">#{typeCode},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="projectCode != null">#{projectCode},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="pointCode != null">#{pointCode},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="deductionType != null">#{deductionType},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="score != null">#{score},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="formula != null">#{formula},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="orgType != null">#{orgType},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="deleted != null">#{deleted},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="cycle != null">#{cycle},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="remark != null">#{remark},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | +            <if test="id != null">
 | 
	
		
			
				|  |  | +                #{id},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="typeCode != null">
 | 
	
		
			
				|  |  | +                #{typeCode},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="projectCode != null">
 | 
	
		
			
				|  |  | +                #{projectCode},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="pointCode != null">
 | 
	
		
			
				|  |  | +                #{pointCode},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="deductionType != null">
 | 
	
		
			
				|  |  | +                #{deductionType},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="score != null">
 | 
	
		
			
				|  |  | +                #{score},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="formula != null">
 | 
	
		
			
				|  |  | +                #{formula},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="orgType != null">
 | 
	
		
			
				|  |  | +                #{orgType},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="deleted != null">
 | 
	
		
			
				|  |  | +                #{deleted},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="cycle != null">
 | 
	
		
			
				|  |  | +                #{cycle},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="remark != null">
 | 
	
		
			
				|  |  | +                #{remark},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |          </trim>
 | 
	
		
			
				|  |  |      </insert>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <update id="updateCoreSafetyIndexCalculateRule" parameterType="com.xunmei.common.core.domain.safetyindex.domain.CoreSafetyIndexCalculateRule">
 | 
	
		
			
				|  |  | +    <update id="updateCoreSafetyIndexCalculateRule"
 | 
	
		
			
				|  |  | +            parameterType="com.xunmei.common.core.domain.safetyindex.domain.CoreSafetyIndexCalculateRule">
 | 
	
		
			
				|  |  |          update core_safety_index_calculate_rule
 | 
	
		
			
				|  |  |          <trim prefix="SET" suffixOverrides=",">
 | 
	
		
			
				|  |  | -                    <if test="typeCode != null">type_code =
 | 
	
		
			
				|  |  | -                        #{typeCode},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="projectCode != null">project_code =
 | 
	
		
			
				|  |  | -                        #{projectCode},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="pointCode != null">point_code =
 | 
	
		
			
				|  |  | -                        #{pointCode},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="deductionType != null">deduction_type =
 | 
	
		
			
				|  |  | -                        #{deductionType},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="score != null">score =
 | 
	
		
			
				|  |  | -                        #{score},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="formula != null">formula =
 | 
	
		
			
				|  |  | -                        #{formula},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="orgType != null">org_type =
 | 
	
		
			
				|  |  | -                        #{orgType},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="deleted != null">deleted =
 | 
	
		
			
				|  |  | -                        #{deleted},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="cycle != null">cycle =
 | 
	
		
			
				|  |  | -                        #{cycle},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="remark != null">remark =
 | 
	
		
			
				|  |  | -                        #{remark},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | +            <if test="typeCode != null">
 | 
	
		
			
				|  |  | +                type_code =
 | 
	
		
			
				|  |  | +                #{typeCode},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="projectCode != null">
 | 
	
		
			
				|  |  | +                project_code =
 | 
	
		
			
				|  |  | +                #{projectCode},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="pointCode != null">
 | 
	
		
			
				|  |  | +                point_code =
 | 
	
		
			
				|  |  | +                #{pointCode},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="deductionType != null">
 | 
	
		
			
				|  |  | +                deduction_type =
 | 
	
		
			
				|  |  | +                #{deductionType},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="score != null">
 | 
	
		
			
				|  |  | +                score =
 | 
	
		
			
				|  |  | +                #{score},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="formula != null">
 | 
	
		
			
				|  |  | +                formula =
 | 
	
		
			
				|  |  | +                #{formula},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="orgType != null">
 | 
	
		
			
				|  |  | +                org_type =
 | 
	
		
			
				|  |  | +                #{orgType},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="deleted != null">
 | 
	
		
			
				|  |  | +                deleted =
 | 
	
		
			
				|  |  | +                #{deleted},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="cycle != null">
 | 
	
		
			
				|  |  | +                cycle =
 | 
	
		
			
				|  |  | +                #{cycle},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="remark != null">
 | 
	
		
			
				|  |  | +                remark =
 | 
	
		
			
				|  |  | +                #{remark},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |          </trim>
 | 
	
		
			
				|  |  |          where id = #{id}
 | 
	
		
			
				|  |  |      </update>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <delete id="deleteCoreSafetyIndexCalculateRuleById" parameterType="Long">
 | 
	
		
			
				|  |  |          delete
 | 
	
		
			
				|  |  | -        from core_safety_index_calculate_rule where id = #{id}
 | 
	
		
			
				|  |  | +        from core_safety_index_calculate_rule
 | 
	
		
			
				|  |  | +        where id = #{id}
 | 
	
		
			
				|  |  |      </delete>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <delete id="deleteCoreSafetyIndexCalculateRuleByIds" parameterType="String">
 | 
	
	
		
			
				|  | @@ -165,18 +211,25 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectPageData"
 | 
	
		
			
				|  |  |              resultType="com.xunmei.common.core.domain.safetyindex.vo.CoreSafetyIndexCalculateRulePageVo"
 | 
	
		
			
				|  |  | -    parameterType="com.xunmei.common.core.domain.safetyindex.dto.CoreSafetyIndexCalculateRulePageDto">
 | 
	
		
			
				|  |  | -        select t.id, t.org_type,t.type_code,t.project_code,t.point_code,t.deduction_type,t.score from core_safety_index_calculate_rule t
 | 
	
		
			
				|  |  | -        where  t.deleted=0
 | 
	
		
			
				|  |  | -            <if test="request.orgType !=null">
 | 
	
		
			
				|  |  | -                and t.org_type = #{request.orgType}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="request.projectCode !=null">
 | 
	
		
			
				|  |  | -                and t.project_code = #{request.pointCode}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="request.pointCode !=null">
 | 
	
		
			
				|  |  | -                and t.point_code = #{request.pointCode}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | +            parameterType="com.xunmei.common.core.domain.safetyindex.dto.CoreSafetyIndexCalculateRulePageDto">
 | 
	
		
			
				|  |  | +        select t.id, t.org_type,t.type_code,t.project_code,t.point_code,t.deduction_type,t.score from
 | 
	
		
			
				|  |  | +        core_safety_index_calculate_rule t
 | 
	
		
			
				|  |  | +        where t.deleted=0
 | 
	
		
			
				|  |  | +        <if test="request.orgType !=null">
 | 
	
		
			
				|  |  | +            and t.org_type = #{request.orgType}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="request.projectCode !=null">
 | 
	
		
			
				|  |  | +            and t.project_code = #{request.pointCode}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="request.pointCode !=null">
 | 
	
		
			
				|  |  | +            and t.point_code = #{request.pointCode}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    <select id="findSafeIndexRuleVoList" resultType="com.xunmei.common.core.domain.safetyindex.vo.SafeIndexRuleCountVo">
 | 
	
		
			
				|  |  | +        select a.*, b.*, b.id as itemId
 | 
	
		
			
				|  |  | +        from core_safety_index_calculate_rule a
 | 
	
		
			
				|  |  | +                 left join core_safety_index_calculate_rule_item b on a.id = b.rule_id
 | 
	
		
			
				|  |  | +        where a.deleted = 0
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  </mapper>
 |