清单检查情况完善隐患排查清单

pull/4/head
dearlin 2024-02-04 08:51:48 +08:00
parent 05927c3048
commit c886521b5b
5 changed files with 1384 additions and 1202 deletions

View File

@ -9,6 +9,7 @@ import com.zcloud.logs.LogAnno;
import com.zcloud.service.check.*;
import com.zcloud.service.corp.CorpInfoService;
import com.zcloud.service.hidden.HiddenService;
import com.zcloud.service.hiddenDangerCheckStandard.CustomCheckRecordService;
import com.zcloud.service.offduty.OffDutyService;
import com.zcloud.service.sms.SMSLogService;
import com.zcloud.service.sms.SMSManagementService;
@ -69,6 +70,7 @@ public class CheckRecordController extends BaseController {
private ListDisableTimeService listDisableTimeService;
@Autowired
private SendMessageUtil sendMessageUtil;
/**
*
*
@ -277,6 +279,7 @@ public class CheckRecordController extends BaseController {
/**
*
*
* @param
* @throws Exception
*/
@ -443,11 +446,10 @@ public class CheckRecordController extends BaseController {
varList = checkrecordService.list(page); // 列出CheckRecord列表
}*/
page.setPd(pd);
List<PageData> varList = checkrecordService.list(page);
PageData ls = listmanagerService.findById(pd);
map.put("varList", varList);
// 风险管控清单
map.put("ls", listmanagerService.findById(pd));
map.put("varList", checkrecordService.list(page));
map.put("page", page);
map.put("ls", ls);
map.put("result", errInfo);
return map;
}
@ -1268,6 +1270,7 @@ public class CheckRecordController extends BaseController {
/**
*
* TODO
*
* @param
* @throws Exception
*/

View File

@ -491,7 +491,7 @@ public class CustomCheckRecordController extends BaseController {
pd = this.getPageData();
pd = customCheckRecordService.findById(pd); // 根据ID读取
PageData condition = new PageData();
condition.put("LISTMANAGER_ID",pd.getString("LISTMANAGER_ID"));
condition.put("CUSTOM_ID",pd.getString("CUSTOM_ID"));
PageData listManager = customService.findById(condition);
pd.put("BAO_BAO_TYPE",listManager.getString("BAO_BAO_TYPE"));
PageData users = checkuserService.getCheckUser(pd);

View File

@ -212,7 +212,8 @@
<select id="datalistPage" parameterType="page" resultType="pd">
select
f.LISTMANAGER_ID,
'1' LIST_TYPE,
f.LISTMANAGER_ID LIST_ID,
f.LIST_NAME,
f.CORPINFO_ID,
f.CREATOR,
@ -251,6 +252,12 @@
f.LISTMANAGER_ID = #{pd.LISTMANAGER_ID}
)
</if>
<if test="pd.CUSTOM_ID != null and pd.CUSTOM_ID != ''">
and
(
f.LISTMANAGER_ID = #{pd.CUSTOM_ID}
)
</if>
<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and
(
@ -366,8 +373,182 @@
</choose>
</otherwise>
</choose>
order by IFNULL( f.CHECK_TIME, f.PERIODEND ) desc
UNION
SELECT
'2' LIST_TYPE,
f.CUSTOM_ID LIST_ID,
l.NAME LIST_NAME,
f.CORPINFO_ID,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.ISDELETE,
f.LONGITUDE,
f.LATITUDE,
f.CHECKRECORD_ID,
f.CHECK_TIME,
f.DESCR,
f.FINISHED,
f.TYPE,
f.PERIODSTART DATESTART,
f.PERIODEND DATEEND,
u.NAME AS USER_NAME,
su.NAME AS PRINCIPALNAME,
(
SELECT
group_concat(
IFNULL( bh.USER_NAME, chr.NAME ))
FROM
BUS_CHECKUSER bh
LEFT JOIN sys_user chr ON chr.USER_ID = bh.USER_ID
WHERE
bh.CHECKRECORD_ID = f.CHECKRECORD_ID
) CHECK_USERS
FROM
bus_hiddendangercheckstandard_checkrecord f
LEFT JOIN SYS_USER u ON u.USERNAME = f.CREATOR
LEFT JOIN bus_hiddendangercheckstandard_custom l ON l.CUSTOM_ID = f.CUSTOM_ID
LEFT JOIN SYS_USER su ON su.USER_ID = l.USER_ID
WHERE
f.ISDELETE = '0'
and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.FINISHED='1'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">
and
(
f.LIST_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.CUSTOM_ID != null and pd.CUSTOM_ID != ''">
and
(
f.CUSTOM_ID = #{pd.CUSTOM_ID}
)
</if>
<if test="pd.LISTMANAGER_ID != null and pd.LISTMANAGER_ID != ''">
and
(
f.CUSTOM_ID = #{pd.LISTMANAGER_ID}
)
</if>
<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and
(
l.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
)
</if>
<!-- <if test="pd.STARTTIME != null and pd.STARTTIME != ''">
and DATE_FORMAT(f.CHECK_TIME,'%Y-%m-%d %H:%i:%s') &gt;= CONCAT(#{pd.STARTTIME},':00')
</if>
<if test="pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(f.CHECK_TIME,'%Y-%m-%d %H:%i:%s') &lt;= CONCAT(#{pd.ENDTIME},':59')
</if> -->
<choose>
<when test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(CONCAT(#{pd.STARTTIME},' 00:00:00'),'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.CREATTIME,'%Y-%m-%d %H:%i:%s')
and DATE_FORMAT(CONCAT(#{pd.ENDTIME},' 23:59:59'),'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.CREATTIME,'%Y-%m-%d %H:%i:%s')
</when>
<otherwise>
<if test="pd.STARTINSPECTTIME != null and pd.STARTINSPECTTIME != ''">
and DATE_FORMAT(CONCAT(#{pd.STARTINSPECTTIME},' 00:00:00'),'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.PERIODEND,'%Y-%m-%d %H:%i:%s')
</if>
<if test="pd.ENDINSPECTTIME != null and pd.ENDINSPECTTIME != ''">
and DATE_FORMAT(CONCAT(#{pd.ENDINSPECTTIME},' 23:59:59'),'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.PERIODSTART,'%Y-%m-%d %H:%i:%s')
</if>
</otherwise>
</choose>
<if test="pd.TYPE != null and pd.TYPE != ''">
and f.TYPE= #{pd.TYPE}
<!-- <choose>
<when test='pd.TYPE=="1"'>
order by IFNULL( f.CHECK_TIME, f.PERIODEND ) desc
</when>
<when test='pd.TYPE=="2"'>
order by IFNULL( f.CHECK_TIME, f.PERIODEND ) desc
</when>
</choose> -->
</if>
<choose>
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
u.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
</when>
<otherwise>
<choose>
<when test='pd.ISSUPERVISE != null and pd.ISSUPERVISE != "" and pd.ISSUPERVISE == "1"'>
<choose>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
and
EXISTS (
SELECT
1
FROM
BUS_CHECKUSER bh
LEFT JOIN SYS_USER chr ON chr.USER_ID = bh.USER_ID
WHERE
bh.CHECKRECORD_ID = f.CHECKRECORD_ID
AND ((chr.DEPARTMENT_ID IN ( SELECT SUB_DEPARTMENT_ID FROM oa_supervision_department
osd WHERE osd.SUP_DEPARTMENT_ID = #{pd.SELF_DEPARTMENT_ID} AND osd.ISDELETE = '0' AND
osd.CORPINFO_ID = #{pd.CORPINFO_ID} ) )
or (chr.DEPARTMENT_ID IN
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>) )
)
</when>
<otherwise>
and
EXISTS (
SELECT
1
FROM
BUS_CHECKUSER bh
LEFT JOIN SYS_USER chr ON chr.USER_ID = bh.USER_ID
WHERE
(bh.CHECKRECORD_ID = f.CHECKRECORD_ID
or chr.USER_ID = #{pd.USER_ID})
AND chr.DEPARTMENT_ID IN ( SELECT SUB_DEPARTMENT_ID FROM oa_supervision_department osd WHERE osd.SUP_DEPARTMENT_ID = #{pd.SELF_DEPARTMENT_ID} AND osd.ISDELETE = '0' AND osd.CORPINFO_ID = #{pd.CORPINFO_ID} ) )
</otherwise>
</choose>
</when>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
and
EXISTS (
SELECT
1
FROM
BUS_CHECKUSER bh
LEFT JOIN SYS_USER chr ON chr.USER_ID = bh.USER_ID
WHERE
bh.CHECKRECORD_ID = f.CHECKRECORD_ID
AND chr.DEPARTMENT_ID IN
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach> )
</when>
<when test="pd.SELF_DEPARTMENT_ID != null and pd.SELF_DEPARTMENT_ID != ''">
and l.DEPARTMENT_ID=#{pd.SELF_DEPARTMENT_ID}
and l.USER_ID = #{pd.USER_ID}
</when>
<otherwise>
</otherwise>
</choose>
</otherwise>
</choose>
ORDER BY IFNULL( CHECK_TIME,DATEEND) desc
</select>

View File

@ -157,8 +157,7 @@
select
<include refid="Field"></include>,
(select h.HIDDEN_ID from BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN h where h.RECORDITEM_ID=f.RECORDITEM_ID and h.CHECKRECORD_ID=f.CHECKRECORD_ID and h.ISDELETE= '0') as HIDDEN_ID,
( select count(1) from bus_imgfiles i where i.FOREIGN_KEY = f.RECORDITEM_ID and i.TYPE = '14' ) AS IMGCOUNT,
r.IDENTIFICATION_ID
( select count(1) from bus_imgfiles i where i.FOREIGN_KEY = f.RECORDITEM_ID and i.TYPE = '14' ) AS IMGCOUNT
from
<include refid="tableName"></include> f
where f.CHECKRECORD_ID=#{CHECKRECORD_ID}

View File

@ -210,7 +210,6 @@
order by IFNULL( f.CHECK_TIME, f.PERIODEND ) desc
</select>
<select id="datalistPage" parameterType="page" resultType="pd">
select
f.CUSTOM_ID,
f.CORPINFO_ID,
@ -247,7 +246,7 @@
<if test="pd.CUSTOM_ID != null and pd.CUSTOM_ID != ''">
and
(
f.CUSTOM_ID = #{CUSTOM_ID}
f.CUSTOM_ID = #{pd.CUSTOM_ID}
)
</if>
<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">