Merge branch 'master' into docker_package

This commit is contained in:
DESKTOP-VA9NQUP\liwen 2022-10-21 10:15:45 +08:00
commit f897b698c4
1 changed files with 52 additions and 26 deletions

View File

@ -1757,39 +1757,54 @@
AND taa.resource_id = tdr.id
AND (tdr.type = '应用资源' OR tdr.type = '智能算法' OR tdr.type = '图层服务' OR tdr.type = '开发组件' OR
tdr.type = '业务组件')
<!--<choose>
<when test="approveStatus != null and approveStatus != ''">
AND taa.approve_status = #{approveStatus}
</when>
<otherwise>
AND taa.approve_status != '不通过'
</otherwise>
</choose> -->
<if test="approveStatus != null and approveStatus != ''">
AND taa.approve_status = #{approveStatus}
</if>
<if test="deptId != null and deptId != ''">
AND sd.id = #{deptId}
</if>
<if test="type != null and type != ''">
AND tdr.type = #{type}
</if>
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
AND SUBSTR(taa.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate}
</if>
GROUP BY
sd.id,
tdr.type
UNION
<if test="type == null or type == '' or type == '会议室'">
UNION
SELECT
COUNT( id ) AS 'count',
dept AS 'deptName',
NULL AS "dept_id",
99 AS "deptType",
NULL AS "district",
'hys' AS 'type'
FROM
t_meetingroom_book tmb
GROUP BY
deptName
SELECT
COUNT( id ) AS 'count',
dept AS 'deptName',
NULL AS "dept_id",
99 AS "deptType",
NULL AS "district",
'hys' AS 'type'
FROM
t_meetingroom_book tmb
where 1=1
<choose>
<when test="approveStatus != null and approveStatus == '通过'">
AND tmb.state=2
</when>
<when test="approveStatus != null and approveStatus == '不通过'">
AND tmb.state=3
</when>
<when test="approveStatus != null and approveStatus == '审核中'">
AND tmb.state not in (2, 3)
</when>
</choose>
<if test="deptId != null and deptId != ''">
AND tmb.dept = #{deptId}
</if>
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
AND SUBSTR(tmb.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate}
</if>
GROUP BY
deptName
</if>
</select>
<select id="selectDeptDetailTypeCountList" resultType="java.util.Map">
@ -1821,18 +1836,24 @@
tdr.type = '业务组件')
<choose>
<when test="approveStatus != null and approveStatus == '通过'">
AND tdr.del_flag = 0
AND tdr.del_flag in (0, 5)
</when>
<when test="approveStatus != null and approveStatus == '审核中'">
AND tdr.del_flag in (2, 3)
AND tdr.del_flag not in (0, 1, 5, 6)
</when>
<when test="approveStatus != null and approveStatus == '不通过'">
AND tdr.del_flag=6
</when>
<otherwise>
AND tdr.del_flag in (0, 2, 3)
AND tdr.del_flag != 1
</otherwise>
</choose>
<if test="deptId != null and deptId != ''">
AND sd.id = #{deptId}
</if>
<if test="type != null and type != ''">
AND tdr.type = #{type}
</if>
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
AND SUBSTR(tdr.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate}
</if>
@ -1938,9 +1959,8 @@
tm.`name` AS 'resourceName',
'青岛市大数据发展管理局' AS 'resourceDeptName',
'会议室' AS 'type',
tm.create_date AS 'createDate',
CASE tmb.state WHEN 1 THEN '审核中' WHEN 2 THEN '通过' WHEN 3 THEN '不通过' ELSE '审核中' END AS
'approveStatus',
tmb.create_date AS 'createDate',
CASE tmb.state WHEN 1 THEN '审核中' WHEN 2 THEN '通过' WHEN 3 THEN '不通过' ELSE '审核中' END AS 'approveStatus',
'' AS 'applyNumber'
FROM
t_meetingroom_book tmb,
@ -1958,6 +1978,12 @@
AND tmb.state not in (2, 3)
</when>
</choose>
<if test="deptId != null and deptId != ''">
AND tmb.dept = #{deptId}
</if>
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
AND SUBSTR(tmb.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate}
</if>
</if>
ORDER BY createDate DESC