From 7a9deef40c60e1b0614acb7cd215a12829a8476d Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Fri, 08 Dec 2023 15:14:54 +0800
Subject: [PATCH] chore:测试提交
---
screen-api/src/main/resources/mapper/AllocationMapper.xml | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 51 insertions(+), 8 deletions(-)
diff --git a/screen-api/src/main/resources/mapper/AllocationMapper.xml b/screen-api/src/main/resources/mapper/AllocationMapper.xml
index 4b9159b..a51cb05 100644
--- a/screen-api/src/main/resources/mapper/AllocationMapper.xml
+++ b/screen-api/src/main/resources/mapper/AllocationMapper.xml
@@ -27,6 +27,7 @@
<result column="check_time" property="checkTime" />
<result column="state" property="state" />
<result column="invalid_reason" property="invalidReason" />
+ <result column="key_point" property="keyPoint" />
</resultMap>
<!-- ��������������������� -->
@@ -36,14 +37,18 @@
<!-- ��������������������� -->
<sql id="Allocation_Column_List">
- allocation.allocation_id, allocation.allocation_num, allocation.escalation_type, allocation.escalation_time, allocation.pollute_position, allocation.unit_id, allocation.pollute_type, allocation.change_type, allocation.change_day, allocation.escalation_unit_id, allocation.escalation_name, allocation.investigation_type, allocation.problem_describe, allocation.is_change, allocation.change_describe, allocation.change_name, allocation.change_time, allocation.check_score, allocation.check_describe, allocation.check_name, allocation.check_time, allocation.state, allocation.is_del, allocation.is_invalid, allocation.invalid_reason, allocation.create_id, allocation.create_name, allocation.create_time, allocation.update_id, allocation.update_name, allocation.update_time
+ allocation.allocation_id, allocation.allocation_num, allocation.escalation_type, allocation.escalation_time, allocation.pollute_position, allocation.unit_id, allocation.pollute_type, allocation.change_type, allocation.change_day, allocation.escalation_unit_id, allocation.escalation_name, allocation.investigation_type, allocation.problem_describe, allocation.is_change, allocation.change_describe, allocation.change_name, allocation.change_time, allocation.check_score, allocation.check_describe, allocation.check_name, allocation.check_time, allocation.state, allocation.is_del, allocation.is_invalid, allocation.invalid_reason, allocation.create_id, allocation.create_name, allocation.create_time, allocation.update_id, allocation.update_name, allocation.update_time,allocation.key_point
</sql>
<select id="extOne" resultType="com.moral.api.pojo.ext.allocation.AllocationExt">
SELECT
- <include refid="Allocation_Column_List"/>
+ <include refid="Allocation_Column_List"/>,t1.unit_name as unitName,t5.dataValue as polluteTypeName
FROM allocation allocation
+ left join responsibility_unit t1 on t1.unit_id = allocation.unit_id
+ left join (SELECT t3.dataKey,t3.dataValue FROM sys_dict_data t3
+ LEFT JOIN sys_dict_type t4 on t4.id = t3.dict_type_id
+ where t4.name = 'contaminate') t5 on t5.dataKey = allocation.pollute_type
where allocation.allocation_id = #{id} and allocation.is_del = 0
</select>
@@ -67,14 +72,23 @@
left join allocation_extension t1 on t1.allocation_id = allocation.allocation_id and t1.is_del =0 and t1.is_invalid = 0 and t1.state = 30
<where>
1 = 1 and allocation.is_del = 0
- <if test="allocation.unitId != null">
- and allocation.unit_id = #{allocation.unitId}
+ <if test="allocation.unitId != null and allocation.unitId.size != 0">
+ and allocation.unit_id in
+ <foreach collection="allocation.unitId" item="id" index="index" open="(" close=")" separator=",">
+ #{id}
+ </foreach>
</if>
- <if test="allocation.polluteType != null and allocation.polluteType != 0">
- and allocation.pollute_type = #{allocation.polluteType}
+ <if test="allocation.polluteType != null and allocation.polluteType.size != 0">
+ and allocation.pollute_type in
+ <foreach collection="allocation.polluteType" item="id" index="index" open="(" close=")" separator=",">
+ #{id}
+ </foreach>
</if>
- <if test="allocation.state != null and allocation.state != 0">
- and allocation.state = #{allocation.state}
+ <if test="allocation.state != null and allocation.state.size != 0">
+ and allocation.state in
+ <foreach collection="allocation.state" item="id" index="index" open="(" close=")" separator=",">
+ #{id}
+ </foreach>
</if>
<if test="allocation.investigationType != null and allocation.investigationType != 0">
and allocation.investigation_type = #{allocation.investigationType}
@@ -104,4 +118,33 @@
</where>
order by allocation.escalation_time desc,allocation.allocation_id desc
</select>
+
+ <select id="extAppPage" resultType="com.moral.api.pojo.ext.allocation.AllocationPageExt">
+ SELECT
+ <include refid="Allocation_Column_List"/>
+ FROM allocation allocation
+ <where>
+ 1 = 1 and allocation.is_del = 0
+ <if test="allocation.startTime != null and allocation.startTime != '' ">
+ and date(allocation.escalation_time) <![CDATA[>=]]> #{allocation.startTime}
+ </if>
+ <if test="allocation.endTime != null and allocation.endTime !='' ">
+ and date(allocation.escalation_time) <![CDATA[<=]]> #{allocation.endTime}
+ </if>
+ <if test="allocation.stateList != null and allocation.stateList.size !=0">
+ and allocation.state in
+ <foreach collection="allocation.stateList" item="id" index="index" open="(" close=")" separator=",">
+ #{id}
+ </foreach>
+
+ </if>
+ <if test="allocation.unitList != null and allocation.unitList.size !=0">
+ and allocation.unit_id in
+ <foreach collection="allocation.unitList" item="id" index="index" open="(" close=")" separator=",">
+ #{id}
+ </foreach>
+ </if>
+ </where>
+ order by allocation.escalation_time desc,allocation.allocation_id desc
+ </select>
</mapper>
--
Gitblit v1.8.0