|
@@ -44,8 +44,12 @@
|
|
|
|
|
|
<select id="selectCenterdataTForestAnimalList" parameterType="CenterdataTForestAnimal"
|
|
|
resultMap="CenterdataTForestAnimalResult">
|
|
|
- <include refid="selectCenterdataTForestAnimalVo"/>
|
|
|
+ select a.id, a.create_by, a.create_time,a.create_name,a.update_name, a.update_by, a.update_time, a.data_status,
|
|
|
+ a.type, a.longitude, a.latitude, a.attach_id, a.dept_id, a.dept_name,
|
|
|
+ a.appear_time, d1.name typeLabel
|
|
|
+ from centerdata_t_forest_animal a
|
|
|
left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
|
|
|
+ LEFT JOIN centerdata_t_forest_dict d1 ON a.type = d1.id
|
|
|
<where>
|
|
|
<if test="dataStatus != null and dataStatus != ''">and a.data_status = #{dataStatus}</if>
|
|
|
<if test="type != null and type != ''">and a.type = #{type}</if>
|
|
@@ -72,13 +76,15 @@
|
|
|
a.create_name,
|
|
|
a.update_time,
|
|
|
a.update_name,
|
|
|
- a.type,
|
|
|
+ d1.name typeLabel,
|
|
|
a.dept_id,
|
|
|
a.dept_name,
|
|
|
a.longitude,
|
|
|
a.latitude,
|
|
|
- a.appear_time from centerdata_t_forest_animal a
|
|
|
+ a.appear_time
|
|
|
+ from centerdata_t_forest_animal a
|
|
|
left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
|
|
|
+ LEFT JOIN centerdata_t_forest_dict d1 ON a.type = d1.id
|
|
|
<where>
|
|
|
<if test="dataStatus != null and dataStatus != ''">and a.data_status = #{dataStatus}</if>
|
|
|
<if test="type != null and type != ''">and a.type = #{type}</if>
|
|
@@ -102,8 +108,9 @@
|
|
|
|
|
|
<select id="exportSelectCenterdataTForestAnimalCountList" parameterType="CenterdataTForestAnimal"
|
|
|
resultMap="CenterdataTForestAnimalCountResult">
|
|
|
- select a.type, a.dept_id, a.dept_name ,count(a.id) frequency from centerdata_t_forest_animal a
|
|
|
+ select d1.name typeLabel, a.dept_id, a.dept_name ,count(a.id) frequency from centerdata_t_forest_animal a
|
|
|
left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
|
|
|
+ LEFT JOIN centerdata_t_forest_dict d1 ON a.type = d1.id
|
|
|
<where>
|
|
|
<if test="dataStatus != null and dataStatus != ''">and a.data_status = #{dataStatus}</if>
|
|
|
<if test="type != null and type != ''">and a.type = #{type}</if>
|
|
@@ -111,7 +118,6 @@
|
|
|
<if test="latitude != null and latitude != ''">and a.latitude = #{latitude}</if>
|
|
|
<if test="attachId != null and attachId != ''">and a.attach_id = #{attachId}</if>
|
|
|
<if test="deptId != null ">and a.dept_id = #{deptId}</if>
|
|
|
- <if test="deptName != null and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
|
|
|
${params.dataScope}
|
|
|
</where>
|
|
|
group by a.type, a.dept_id
|
|
@@ -122,10 +128,11 @@
|
|
|
<select id="selectCenterdataTForestAnimalStandList" parameterType="CenterdataTForestAnimal"
|
|
|
resultMap="CenterdataTForestAnimalResult">
|
|
|
select a.id, a.create_by, c.camera_name as cameraName, a.create_time, a.update_by, a.update_time, a.data_status,
|
|
|
- a.type, a.longitude, a.latitude, a.attach_id, a.dept_id, a.dept_name,
|
|
|
+ a.type, a.longitude, a.latitude, a.attach_id, a.dept_id, a.dept_name,d1.name typeLabel,
|
|
|
a.appear_time from centerdata_t_forest_animal a
|
|
|
left join ${database_monitor}.centermonitor_t_camera c on a.create_by = c.id
|
|
|
left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
|
|
|
+ LEFT JOIN centerdata_t_forest_dict d1 ON a.type = d1.id
|
|
|
<where>
|
|
|
<if test="dataStatus != null and dataStatus != ''">and a.data_status like concat('%', #{dataStatus}, '%')
|
|
|
</if>
|
|
@@ -134,6 +141,7 @@
|
|
|
<if test="longitude != null and longitude != ''">and a.longitude like concat('%', #{longitude}, '%')</if>
|
|
|
<if test="latitude != null and latitude != ''">and a.latitude like concat('%', #{latitude}, '%')</if>
|
|
|
<if test="attachId != null and attachId != ''">and a.attach_id = #{attachId}</if>
|
|
|
+ <if test="appearTime != null ">and a.appear_time = #{appearTime}</if>
|
|
|
<if test="deptId != null">
|
|
|
<choose>
|
|
|
<when test="deptName != null and deptName == 0">
|
|
@@ -150,11 +158,12 @@
|
|
|
<!-- 统计-->
|
|
|
<select id="selectCenterdataTForestAnimalCountList" parameterType="CenterdataTForestAnimal"
|
|
|
resultMap="CenterdataTForestAnimalResult">
|
|
|
- SELECT a.type, a.dept_name, count(a.id) frequency from centerdata_t_forest_animal a
|
|
|
+ SELECT d1.name typeLabel, a.dept_name, count(a.id) frequency from centerdata_t_forest_animal a
|
|
|
left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
|
|
|
+ LEFT JOIN centerdata_t_forest_dict d1 ON a.type = d1.id
|
|
|
<where>
|
|
|
<if test="dataStatus != null and dataStatus != ''">and data_status = #{dataStatus}</if>
|
|
|
- <if test="type != null and type != ''">and type = #{type}</if>
|
|
|
+ <if test="type != null and type != ''">and a.type = #{type}</if>
|
|
|
<if test="longitude != null and longitude != ''">and longitude = #{longitude}</if>
|
|
|
<if test="latitude != null and latitude != ''">and latitude = #{latitude}</if>
|
|
|
<if test="attachId != null and attachId != ''">and attach_id = #{attachId}</if>
|