|
@@ -4,41 +4,40 @@
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
<resultMap id="BaseResultMap" type="com.ims.eval.entity.OrganizationEvaluationInfo">
|
|
|
- <id column="id" property="id"/>
|
|
|
- <result column="organization_evaluation_id" property="organizationEvaluationId"/>
|
|
|
- <result column="indicator_id" property="indicatorId"/>
|
|
|
- <result column="indicator_dictionary_id" property="indicatorDictionaryId"/>
|
|
|
- <result column="option_code" property="optionCode"/>
|
|
|
- <result column="is_quantified" property="isQuantified"/>
|
|
|
- <result column="quantified_value" property="quantifiedValue"/>
|
|
|
- <result column="non_quantified_value" property="nonQuantifiedValue"/>
|
|
|
- <result column="create_time" property="createTime"/>
|
|
|
- <result column="create_by" property="createBy"/>
|
|
|
- <result column="update_time" property="updateTime"/>
|
|
|
- <result column="update_by" property="updateBy"/>
|
|
|
- <result column="remark" property="remark"/>
|
|
|
+ <id column="id" property="id" />
|
|
|
+ <result column="organization_evaluation_id" property="organizationEvaluationId" />
|
|
|
+ <result column="indicator_id" property="indicatorId" />
|
|
|
+ <result column="indicator_dictionary_id" property="indicatorDictionaryId" />
|
|
|
+ <result column="option_code" property="optionCode" />
|
|
|
+ <result column="is_quantified" property="isQuantified" />
|
|
|
+ <result column="quantified_value" property="quantifiedValue" />
|
|
|
+ <result column="non_quantified_value" property="nonQuantifiedValue" />
|
|
|
+ <result column="create_time" property="createTime" />
|
|
|
+ <result column="create_by" property="createBy" />
|
|
|
+ <result column="update_time" property="updateTime" />
|
|
|
+ <result column="update_by" property="updateBy" />
|
|
|
+ <result column="remark" property="remark" />
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
- id
|
|
|
- , organization_evaluation_id, indicator_id, indicator_dictionary_id, option_code, is_quantified, quantified_value, non_quantified_value, create_time, create_by, update_time, update_by, remark
|
|
|
+ id, organization_evaluation_id, indicator_id, indicator_dictionary_id, option_code, is_quantified, quantified_value, non_quantified_value, create_time, create_by, update_time, update_by, remark
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
- <!-- <update id="updateEvaluationInfo">-->
|
|
|
+<!-- <update id="updateEvaluationInfo">-->
|
|
|
|
|
|
- <!-- <foreach collection="evaluationInfos" item="item" index="index" separator=";">-->
|
|
|
- <!-- <trim suffixOverrides=",">-->
|
|
|
- <!-- UPDATE organization_evaluation_info-->
|
|
|
- <!-- SET quantified_Value = ${item.quantifiedValue},-->
|
|
|
- <!-- non_Quantified_Value = '${item.nonQuantifiedValue}'-->
|
|
|
- <!-- WHERE id = '${item.id}'-->
|
|
|
- <!-- </trim>-->
|
|
|
- <!-- </foreach>-->
|
|
|
+<!-- <foreach collection="evaluationInfos" item="item" index="index" separator=";">-->
|
|
|
+<!-- <trim suffixOverrides=",">-->
|
|
|
+<!-- UPDATE organization_evaluation_info-->
|
|
|
+<!-- SET quantified_Value = ${item.quantifiedValue},-->
|
|
|
+<!-- non_Quantified_Value = '${item.nonQuantifiedValue}'-->
|
|
|
+<!-- WHERE id = '${item.id}'-->
|
|
|
+<!-- </trim>-->
|
|
|
+<!-- </foreach>-->
|
|
|
|
|
|
|
|
|
- <!-- </update>-->
|
|
|
+<!-- </update>-->
|
|
|
|
|
|
<select id="selectListEvaluationInfoId"
|
|
|
resultType="com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO">
|
|
@@ -70,7 +69,7 @@
|
|
|
inner join organization_evaluation_rule oer on oer.id = ei.organization_evaluation_rule_id
|
|
|
inner join organization_evaluation oe on oe.id = ei.organization_evaluation_id
|
|
|
left join indicator i on ei.indicator_id = i.id
|
|
|
- left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
|
|
|
+ left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
|
|
|
left join bin_stage be on i.bin_stage = be.id
|
|
|
left join bin_section bn on i.bin_section = bn.id
|
|
|
left join indicator_type it on i.indicator_type_id = it.id
|
|
@@ -79,7 +78,7 @@
|
|
|
<where>
|
|
|
|
|
|
<if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
|
|
|
- and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
+ and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
</if>
|
|
|
|
|
|
<if test="optionCode !=null and optionCode !=''">
|
|
@@ -87,20 +86,17 @@
|
|
|
</if>
|
|
|
|
|
|
<if test="dept !=null and dept !=''">
|
|
|
- and dd.key_name = #{dept}
|
|
|
+ and dd.key_name = #{dept}
|
|
|
</if>
|
|
|
|
|
|
<if test="organizationId !=null and organizationId !=''">
|
|
|
- and oer.organization_id = #{organizationId}
|
|
|
+ and oer.organization_id = #{organizationId}
|
|
|
</if>
|
|
|
|
|
|
- and id.option_code not in
|
|
|
- ('CZ','CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','WCLDF','LRGXKHMAX','LRGXKHMIN')
|
|
|
+ and id.option_code not in ('CZ','CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','WCLDF','LRGXKHMAX','LRGXKHMIN')
|
|
|
</where>
|
|
|
|
|
|
- order by
|
|
|
- be.order_num,oer.organization_short_name,bn.order_num,ri.order_num,id.child_code,id.option_code,id.option_order
|
|
|
- asc
|
|
|
+ order by be.order_num,oer.organization_short_name,bn.order_num,ri.order_num,id.child_code,id.option_code,id.option_order asc
|
|
|
|
|
|
</select>
|
|
|
|
|
@@ -160,7 +156,7 @@
|
|
|
inner join organization_evaluation_rule oer on oer.id = ei.organization_evaluation_rule_id
|
|
|
inner join organization_evaluation oe on oe.id = ei.organization_evaluation_id
|
|
|
left join indicator i on ei.indicator_id = i.id
|
|
|
- left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
|
|
|
+ left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
|
|
|
left join bin_stage be on i.bin_stage = be.id
|
|
|
left join bin_section bn on i.bin_section = bn.id
|
|
|
left join indicator_type it on i.indicator_type_id = it.id
|
|
@@ -169,7 +165,7 @@
|
|
|
<where>
|
|
|
|
|
|
<if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
|
|
|
- and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
+ and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
</if>
|
|
|
|
|
|
<if test="optionCode !=null and optionCode !=''">
|
|
@@ -177,41 +173,37 @@
|
|
|
</if>
|
|
|
|
|
|
<if test="dept !=null and dept !=''">
|
|
|
- and dd.key_name like CONCAT('%',#{dept},'%')
|
|
|
+ and dd.key_name like CONCAT('%',#{dept},'%')
|
|
|
</if>
|
|
|
|
|
|
<if test="organizationShortName !=null and organizationShortName !=''">
|
|
|
- and oer.organization_short_name like CONCAT('%',#{organizationShortName},'%')
|
|
|
+ and oer.organization_short_name like CONCAT('%',#{organizationShortName},'%')
|
|
|
</if>
|
|
|
|
|
|
<if test="indicatorName !=null and indicatorName !=''">
|
|
|
- and i.indicator_name like CONCAT('%',#{indicatorName},'%')
|
|
|
+ and i.indicator_name like CONCAT('%',#{indicatorName},'%')
|
|
|
</if>
|
|
|
|
|
|
<if test="binSection !=null and binSection !=''">
|
|
|
- and bn.id = #{binSection}
|
|
|
+ and bn.id = #{binSection}
|
|
|
</if>
|
|
|
|
|
|
<if test="isQuantified !=null and isQuantified !=''">
|
|
|
- and ei.is_quantified = #{isQuantified}
|
|
|
+ and ei.is_quantified = #{isQuantified}
|
|
|
</if>
|
|
|
|
|
|
<if test="organizationId !=null and organizationId !=''">
|
|
|
- and oer.organization_id = #{organizationId}
|
|
|
+ and oer.organization_id = #{organizationId}
|
|
|
</if>
|
|
|
|
|
|
- and id.option_code not in
|
|
|
- ('DF','DF2','CZ','CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','WCLDF','LRGXKHMAX','LRGXKHMIN')
|
|
|
+ and id.option_code not in ('DF','DF2','CZ','CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','WCLDF','LRGXKHMAX','LRGXKHMIN')
|
|
|
and id.is_show = true
|
|
|
</where>
|
|
|
|
|
|
- order by
|
|
|
- oer.organization_short_name,be.order_num,oer.organization_short_name,bn.order_num,ri.order_num,id.option_order
|
|
|
- asc
|
|
|
+ order by oer.organization_short_name,be.order_num,oer.organization_short_name,bn.order_num,ri.order_num,id.option_order asc
|
|
|
|
|
|
</select>
|
|
|
- <select id="selectByIdAndEvaluationInfoId"
|
|
|
- resultType="com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO">
|
|
|
+ <select id="selectByIdAndEvaluationInfoId" resultType="com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO">
|
|
|
|
|
|
select
|
|
|
ei.id,
|
|
@@ -243,7 +235,7 @@
|
|
|
inner join organization_evaluation_rule oer on oer.id = ei.organization_evaluation_rule_id
|
|
|
inner join organization_evaluation oe on oe.id = ei.organization_evaluation_id
|
|
|
left join indicator i on ei.indicator_id = i.id
|
|
|
- left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
|
|
|
+ left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
|
|
|
left join bin_stage be on i.bin_stage = be.id
|
|
|
left join bin_section bn on i.bin_section = bn.id
|
|
|
left join indicator_type it on i.indicator_type_id = it.id
|
|
@@ -251,21 +243,21 @@
|
|
|
inner join data_dictionary dd on dd.data_key = i.dept_id
|
|
|
<where>
|
|
|
|
|
|
- <if test="id !=null and id !=''">
|
|
|
- and ei.id = #{id}
|
|
|
- </if>
|
|
|
+ <if test="id !=null and id !=''">
|
|
|
+ and ei.id = #{id}
|
|
|
+ </if>
|
|
|
|
|
|
- <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
|
|
|
- and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
- </if>
|
|
|
+ <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
|
|
|
+ and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
+ </if>
|
|
|
|
|
|
- <if test="optionCode !=null and optionCode !=''">
|
|
|
- and id.option_code = #{optionCode}
|
|
|
- </if>
|
|
|
+ <if test="optionCode !=null and optionCode !=''">
|
|
|
+ and id.option_code = #{optionCode}
|
|
|
+ </if>
|
|
|
|
|
|
- <if test="indicatorId !=null and indicatorId !=''">
|
|
|
- and i.id = #{indicatorId}
|
|
|
- </if>
|
|
|
+ <if test="indicatorId !=null and indicatorId !=''">
|
|
|
+ and i.id = #{indicatorId}
|
|
|
+ </if>
|
|
|
|
|
|
|
|
|
</where>
|
|
@@ -275,33 +267,32 @@
|
|
|
</select>
|
|
|
<select id="selectEvaluationIndicatorList" resultType="java.util.Map">
|
|
|
|
|
|
- select DISTINCT i.id,i.indicator_name,ri.order_num from organization_evaluation_info ei
|
|
|
+ select DISTINCT i.id,i.indicator_name,ri.order_num from organization_evaluation_info ei
|
|
|
LEFT JOIN evaluate_rule_info ri on ei.evaluate_rule_info_id = ri.id
|
|
|
LEFT JOIN evaluate_rule er on er.id = ri.evaluate_rule_id
|
|
|
INNER JOIN indicator i on i.id = ri.indicator_id
|
|
|
<where>
|
|
|
|
|
|
<if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
|
|
|
- and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
+ and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
</if>
|
|
|
|
|
|
<if test="binSection !=null and binSection !=''">
|
|
|
- and er.bin_section = #{binSection}
|
|
|
+ and er.bin_section = #{binSection}
|
|
|
</if>
|
|
|
|
|
|
<if test="binStage !=null and binStage !=''">
|
|
|
- and er.bin_stage = #{binStage}
|
|
|
+ and er.bin_stage = #{binStage}
|
|
|
</if>
|
|
|
|
|
|
</where>
|
|
|
|
|
|
- order by ri.order_num asc
|
|
|
+ order by ri.order_num asc
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
- <select id="selectEvaluationInfoList"
|
|
|
- resultType="com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO">
|
|
|
+ <select id="selectEvaluationInfoList" resultType="com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO">
|
|
|
|
|
|
select
|
|
|
ei.id,
|
|
@@ -336,7 +327,7 @@
|
|
|
inner join organization_evaluation_rule oer on oer.id = ei.organization_evaluation_rule_id
|
|
|
inner join organization_evaluation oe on oe.id = ei.organization_evaluation_id
|
|
|
left join indicator i on ei.indicator_id = i.id
|
|
|
- left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
|
|
|
+ left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
|
|
|
left join bin_stage be on i.bin_stage = be.id
|
|
|
left join bin_section bn on i.bin_section = bn.id
|
|
|
left join indicator_type it on i.indicator_type_id = it.id
|
|
@@ -345,12 +336,12 @@
|
|
|
<where>
|
|
|
|
|
|
<if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
|
|
|
- and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
+ and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
</if>
|
|
|
|
|
|
|
|
|
<if test="indicatorId !=null and indicatorId !=''">
|
|
|
- and ei.indicator_id = #{indicatorId}
|
|
|
+ and ei.indicator_id = #{indicatorId}
|
|
|
</if>
|
|
|
|
|
|
|
|
@@ -360,21 +351,22 @@
|
|
|
|
|
|
|
|
|
<if test="binStage !=null and binStage !=''">
|
|
|
- and be.id = #{binStage}
|
|
|
+ and be.id = #{binStage}
|
|
|
</if>
|
|
|
|
|
|
<if test="organizationId !=null and organizationId !=''">
|
|
|
- and oer.organization_id = #{organizationId}
|
|
|
+ and oer.organization_id = #{organizationId}
|
|
|
</if>
|
|
|
|
|
|
|
|
|
<if test="organizationShortName !=null and organizationShortName !=''">
|
|
|
- and oer.organization_short_name like CONCAT('%',#{organizationShortName},'%')
|
|
|
+ and oer.organization_short_name like CONCAT('%',#{organizationShortName},'%')
|
|
|
</if>
|
|
|
|
|
|
|
|
|
- and id.option_code not in
|
|
|
- ('CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','LRGXKHMAX','LRGXKHMIN')
|
|
|
+
|
|
|
+
|
|
|
+ and id.option_code not in ('CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','LRGXKHMAX','LRGXKHMIN')
|
|
|
</where>
|
|
|
|
|
|
order by oer.order_num asc
|
|
@@ -389,10 +381,10 @@
|
|
|
<where>
|
|
|
|
|
|
<if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
|
|
|
- and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
+ and ei.organization_evaluation_id = #{organizationEvaluationId}
|
|
|
</if>
|
|
|
<if test="deptId !=null and deptId !=''">
|
|
|
- and ei.dept_id = #{deptId}
|
|
|
+ and ei.dept_id = #{deptId}
|
|
|
</if>
|
|
|
<if test="state !=null">
|
|
|
AND ei.state in
|
|
@@ -417,4 +409,5 @@
|
|
|
order by oei.organization_id asc
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
</mapper>
|