重点工程-企业端App处罚管理的未处理角标
parent
824967cc6f
commit
7b4f85a08c
|
@ -282,7 +282,9 @@
|
||||||
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.oa_department t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.INVOLVING_CORPS_DEPART_ID ) ) AS INVOLVING_CORPS_DEPART_NAME,
|
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.oa_department t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.INVOLVING_CORPS_DEPART_ID ) ) AS INVOLVING_CORPS_DEPART_NAME,
|
||||||
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.GROUP_UNIT)) as GROUP_UNIT_NAME,
|
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.GROUP_UNIT)) as GROUP_UNIT_NAME,
|
||||||
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.vi_department_all t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.DEPARTMENT_ID ) ) AS DEPARTMENT_NAME,
|
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.vi_department_all t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.DEPARTMENT_ID ) ) AS DEPARTMENT_NAME,
|
||||||
|
<if test="pd.UserId != null and pd.UserId != ''">
|
||||||
|
uncheck.UNCHECK_COUNT,
|
||||||
|
</if>
|
||||||
(select GROUP_CONCAT(t.NAME) from (
|
(select GROUP_CONCAT(t.NAME) from (
|
||||||
SELECT
|
SELECT
|
||||||
CONCAT( CONCAT( c.CORP_NAME, '-' ), t.NAME ) NAME ,t.DEPARTMENT_ID
|
CONCAT( CONCAT( c.CORP_NAME, '-' ), t.NAME ) NAME ,t.DEPARTMENT_ID
|
||||||
|
@ -314,6 +316,25 @@
|
||||||
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
|
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
|
||||||
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
|
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
|
||||||
LEFT JOIN ( select count(c.KEYPROJECTCHECK_ID) co, c.OUTSOURCED_ID from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.ISDELETE = '0' group by c.OUTSOURCED_ID ) cc on cc.OUTSOURCED_ID = f.OUTSOURCED_ID
|
LEFT JOIN ( select count(c.KEYPROJECTCHECK_ID) co, c.OUTSOURCED_ID from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.ISDELETE = '0' group by c.OUTSOURCED_ID ) cc on cc.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||||
|
<if test="pd.UserId != null and pd.UserId != ''">
|
||||||
|
left join (
|
||||||
|
SELECT COUNT(t.HIDDEN_ID) UNCHECK_COUNT,t.OUTSOURCED_ID,t.CREATOR CREATOR FROM (
|
||||||
|
SELECT
|
||||||
|
f.HIDDEN_ID,IFNULL(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) OUTSOURCED_ID,f.CREATOR CREATOR
|
||||||
|
FROM
|
||||||
|
`qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f
|
||||||
|
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
|
||||||
|
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
|
||||||
|
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
|
||||||
|
WHERE
|
||||||
|
f.ISDELETE = '0'
|
||||||
|
AND f.SOURCE IN ( '4', '5', '1' )
|
||||||
|
AND f.STATE = '2'
|
||||||
|
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
|
||||||
|
AND (bo.ISDELETE = '0' or boai.ISDELETE = '0')
|
||||||
|
) t group by t.OUTSOURCED_ID,t.CREATOR
|
||||||
|
) uncheck on uncheck.OUTSOURCED_ID = f.OUTSOURCED_ID and uncheck.CREATOR = #{pd.UserId}
|
||||||
|
</if>
|
||||||
left join ( SELECT t.OUTSOURCED_ID, COUNT( t.HIDDEN_ID ) HIDDEN_COUNT, t.SOURCE SOURCE, t.CREATOR CREATOR
|
left join ( SELECT t.OUTSOURCED_ID, COUNT( t.HIDDEN_ID ) HIDDEN_COUNT, t.SOURCE SOURCE, t.CREATOR CREATOR
|
||||||
FROM
|
FROM
|
||||||
( SELECT IFNULL( k.OUTSOURCED_ID, h.FOREIGN_ID ) OUTSOURCED_ID, h.* FROM `qa-gwj-prevention`.bus_keyproject_hidden h LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck k ON h.FOREIGN_ID = k.KEYPROJECTCHECK_ID and h.ISDELETE = '0') t GROUP BY t.OUTSOURCED_ID,t.CREATOR ) h on h.OUTSOURCED_ID = f.OUTSOURCED_ID
|
( SELECT IFNULL( k.OUTSOURCED_ID, h.FOREIGN_ID ) OUTSOURCED_ID, h.* FROM `qa-gwj-prevention`.bus_keyproject_hidden h LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck k ON h.FOREIGN_ID = k.KEYPROJECTCHECK_ID and h.ISDELETE = '0') t GROUP BY t.OUTSOURCED_ID,t.CREATOR ) h on h.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||||
|
@ -381,8 +402,11 @@
|
||||||
</if>
|
</if>
|
||||||
GROUP BY f.OUTSOURCED_ID
|
GROUP BY f.OUTSOURCED_ID
|
||||||
ORDER BY
|
ORDER BY
|
||||||
cc.co DESC,
|
<if test="pd.UserId != null and pd.UserId != ''">
|
||||||
f.OPERATTIME DESC
|
uncheck.UNCHECK_COUNT DESC,
|
||||||
|
</if>
|
||||||
|
cc.co DESC
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDeptId" resultType="string">
|
<select id="getDeptId" resultType="string">
|
||||||
|
|
Loading…
Reference in New Issue