八项作业bug修复

2024年2月1日V1.0.53
zhaoyu 2024-01-30 18:00:19 +08:00
parent 48a42cd173
commit f9b2f057a5
3 changed files with 896 additions and 795 deletions

View File

@ -397,5 +397,45 @@ public interface MapEightMapper {
List<PageData> findByHOISTINGAcceptuserId(PageData pd);
List<PageData> findByHOISTINGAcceptuserIds(PageData pd);
/**
* @param pd
* @throws Exception
*/
PageData findByIdCONFINEDSPACEOrder(PageData pd);
/**
* @param pd
* @throws Exception
*/
List<PageData> listAllMeasuresCONFINEDSPACEOrder(PageData pd);
/**
*
* @param pd
* @return
*/
List<PageData> listAllCONFINEDSPACEOrder(PageData pd);
/**
*
* @param pd
* @return
*/
List<PageData> findByIdCONFINEDSPACEAcceptuser(PageData pd);
/**
*
* @param pd
* @return
*/
List<PageData> findByIdCONFINEDSPACEAcceptusers(PageData pd);
/**
*
* @param pd
* @return
*/
PageData findByIdCONFINEDSPACEGasWH(PageData pd);
}

View File

@ -3,6 +3,7 @@ package com.zcloud.service.map.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.map.MapEightMapper;
import com.zcloud.service.bus.CorpInfoService;
import com.zcloud.service.map.MapEightService;
import com.zcloud.util.Tools;
import org.apache.commons.lang.StringUtils;
@ -12,6 +13,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
*
@ -116,19 +118,19 @@ public class MapEightServiceImpl implements MapEightService {
r = mapEightMapper.getHOTWORKHighRiskWorkLocationCfd(pd);
//临时用电
}else if(StringUtils.equals(typeStr,"ELECTRICITY")){
r = mapEightMapper.getELECTRICITYHighRiskWorkLocation(pd);
r = mapEightMapper.getELECTRICITYHighRiskWorkLocationOrder(pd);
//盲板
}else if(StringUtils.equals(typeStr,"BLINDBOARD")){
r = mapEightMapper.getBLINDBOARDHighRiskWorkLocation(pd);
r = mapEightMapper.getBLINDBOARDHighRiskWorkLocationOrder(pd);
// 高处
}else if(StringUtils.equals(typeStr,"HIGHWORK")){
r = mapEightMapper.getHIGHWORKHighRiskWorkLocation(pd);
r = mapEightMapper.getHIGHWORKHighRiskWorkLocationOrder(pd);
//有限空间
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
r = mapEightMapper.getCONFINEDSPACEHighRiskWorkLocation(pd);
r = mapEightMapper.getCONFINEDSPACEHighRiskWorkLocationOrder(pd);
//吊装
}else if(StringUtils.equals(typeStr,"HOISTING")){
r = mapEightMapper.getHOISTINGHighRiskWorkLocation(pd);
r = mapEightMapper.getHOISTINGHighRiskWorkLocationOrder(pd);
}
return r;
}
@ -368,12 +370,13 @@ public class MapEightServiceImpl implements MapEightService {
map.put("imgList1",mapEightMapper.findByHIGHWORKAcceptuserId(pd));
map.put("imgList",mapEightMapper.findByHIGHWORKAcceptuserIds(pd));
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
//没有有限空间作业
//pd.put("CONFINEDSPACE_ID",idStr);
//pd = mapEightMapper.findByIdCONFINEDSPACE(pd);
pd = new PageData();
map.put("measuresList", null);
map.put("gasList", null);
pd.put("CONFINEDSPACE_ID",idStr);
pd = mapEightMapper.findByIdCONFINEDSPACEOrder(pd); //根据ID读取
map.put("measuresList", mapEightMapper.listAllMeasuresCONFINEDSPACEOrder(pd));
map.put("gasList", mapEightMapper.listAllCONFINEDSPACEOrder(pd));
map.put("gas", mapEightMapper.findByIdCONFINEDSPACEGasWH(pd));
map.put("imgList",mapEightMapper.findByIdCONFINEDSPACEAcceptusers(pd));
map.put("imgList1",mapEightMapper.findByIdCONFINEDSPACEAcceptuser(pd));
}else if(StringUtils.equals(typeStr,"HOISTING")){
pd.put("HOISTING_ID",idStr);
pd = mapEightMapper.findByIdHOISTINGOrder(pd);

View File

@ -72,19 +72,21 @@
</if>
GROUP BY
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) UNION ALL
SELECT
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) CREATTIME,
'0' AS cutroadCount,
'0' AS hotworkapplicationCount,
count( 1 ) blindboardCount,
'0' breakgroundCount,
'0' confinedspaceCount,
'0' highworkCount,
'0' hoistingCount,
'0' electricityCount
FROM
bus_blindboard
gf_blindboard
WHERE
DATE_SUB( CURDATE(), INTERVAL 4 DAY )&lt;= STR_TO_DATE( CREATTIME, '%Y-%m-%d' )
and ISDELETE = '0'
and APPLY_STATUS != '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and CORPINFO_ID = #{CORPINFO_ID}
</if>
@ -96,19 +98,21 @@
</if>
GROUP BY
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) UNION ALL
SELECT
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) CREATTIME,
'0' cutroadCount,
'0' blindboardCount,
count( 1 ) breakgroundCount,
count( 1 ) confinedspaceCount,
'0' highworkCount,
'0' hoistingCount,
'0' electricityCount
FROM
bus_confinedspace
gf_confinedspace
WHERE
DATE_SUB( CURDATE(), INTERVAL 4 DAY )&lt;= STR_TO_DATE( CREATTIME, '%Y-%m-%d' )
and ISDELETE = '0'
and APPLY_STATUS != '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and CORPINFO_ID = #{CORPINFO_ID}
</if>
@ -120,19 +124,21 @@
</if>
GROUP BY
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) UNION ALL
SELECT
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) CREATTIME,
'0' cutroadCount,
'0' hotworkapplicationCount,
'0' blindboardCount,
'0' breakgroundCount,
'0' confinedspaceCount,
count( 1 ) highworkCount,
'0' hoistingCount,
'0' electricityCount
FROM
bus_highwork
gf_highwork
WHERE
DATE_SUB( CURDATE(), INTERVAL 4 DAY )&lt;= STR_TO_DATE( CREATTIME, '%Y-%m-%d' )
and ISDELETE = '0'
and APPLY_STATUS != '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and CORPINFO_ID = #{CORPINFO_ID}
</if>
@ -144,19 +150,22 @@
</if>
GROUP BY
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) UNION ALL
SELECT
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) CREATTIME,
'0' cutroadCount,
'0' hotworkapplicationCount,
'0' blindboardCount,
'0' breakgroundCount,
'0' confinedspaceCount,
'0' highworkCount,
count( 1 ) hoistingCount,
'0' electricityCount
FROM
bus_hoisting
gf_hoisting
WHERE
DATE_SUB( CURDATE(), INTERVAL 4 DAY )&lt;= STR_TO_DATE( CREATTIME, '%Y-%m-%d' )
and ISDELETE = '0'
and APPLY_STATUS != '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and CORPINFO_ID = #{CORPINFO_ID}
</if>
@ -168,30 +177,34 @@
</if>
GROUP BY
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) UNION ALL
SELECT
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) CREATTIME,
'0' cutroadCount,
'0' hotworkapplicationCount,
'0' blindboardCount,
'0' breakgroundCount,
'0' confinedspaceCount,
'0' highworkCount,
'0' hoistingCount,
count( 1 ) electricityCount
FROM
bus_electricity
gf_electricity
WHERE
DATE_SUB( CURDATE(), INTERVAL 4 DAY )&lt;= STR_TO_DATE( CREATTIME, '%Y-%m-%d' )
and ISDELETE = '0'
and APPLY_STATUS != '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
<if test="array!= null and array.size>0">
AND CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
<foreach item="item" index="index" collection="array" open="(" separator="," close=")">
#{item}
</foreach>
</if>
GROUP BY
STR_TO_DATE( CREATTIME, '%Y-%m-%d' )
) s
GROUP BY
s.CREATTIME
@ -222,31 +235,10 @@
</if>
UNION ALL
SELECT
(
SELECT
count( 1 )
FROM
bus_electricity f
WHERE
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND (
f.APPLY_STATUS != '0' AND f.APPLY_STATUS NOT IN ('3','4')
AND date_format( now(), '%Y-%m-%d %H:%i' ) >= f.WORK_START_DATE
AND f.WORK_END_DATE >= date_format( now(), '%Y-%m-%d %H:%i' )
OR f.APPLY_STATUS IN ( '3', '4' )
)
) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS != '0' AND f.APPLY_STATUS NOT IN ('3','4') AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i') then f.ELECTRICITY_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS IN ('3','4') then f.ELECTRICITY_ID end) COUNTARCHIVE
FROM bus_electricity f WHERE f.ISDELETE = '0'
COUNT(case when f.APPLY_STATUS != '0' then f.ELECTRICITY_ID end) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS not in ('0','5') then f.ELECTRICITY_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS = '5' then f.ELECTRICITY_ID end) COUNTARCHIVE
FROM gf_electricity f WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
@ -258,34 +250,10 @@
</if>
UNION ALL
SELECT
(
SELECT
count( 1 )
FROM
bus_blindboard f
LEFT JOIN
bus_blindboardinfo bb ON bb.BLINDBOARD_ID = f.BLINDBOARD_ID
WHERE
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND (
f.APPLY_STATUS != '0' AND f.APPLY_STATUS != '3'
AND date_format( now(), '%Y-%m-%d %H:%i' ) >= bb.BOARD_INSTALL_TIME
AND bb.BOARD_DISASSEMBLE_TIME >= date_format( now(), '%Y-%m-%d %H:%i' )
OR f.APPLY_STATUS = '3'
)
) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS != '0' AND f.APPLY_STATUS != '3' AND date_format(now(),'%Y-%m-%d %H:%i') >= bb.BOARD_INSTALL_TIME AND bb.BOARD_DISASSEMBLE_TIME >= date_format(now(),'%Y-%m-%d %H:%i') then f.BLINDBOARD_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS = '3' then f.BLINDBOARD_ID end) COUNTARCHIVE
FROM bus_blindboard f
LEFT JOIN bus_blindboardinfo bb ON bb.BLINDBOARD_ID = f.BLINDBOARD_ID
COUNT(case when f.APPLY_STATUS != '0' then f.BLINDBOARD_ID end) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS not in ('0','6') then f.BLINDBOARD_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS = '6' then f.BLINDBOARD_ID end) COUNTARCHIVE
FROM gf_blindboard f
WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
@ -298,31 +266,10 @@
</if>
UNION ALL
SELECT
(
SELECT
count( 1 )
FROM
bus_highwork f
WHERE
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND (
f.APPLY_STATUS != '0' AND f.APPLY_STATUS NOT IN ('4','55','5','-5')
AND date_format( now(), '%Y-%m-%d %H:%i' ) >= f.WORK_START_DATE
AND f.WORK_END_DATE >= date_format( now(), '%Y-%m-%d %H:%i' )
OR f.APPLY_STATUS IN ( '4', '55', '5', '-5' )
)
) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS != '0' AND f.APPLY_STATUS NOT IN ('4','55','5','-5') AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i') then f.HIGHWORK_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS in ('4','55','5','-5') then f.HIGHWORK_ID end) COUNTARCHIVE
FROM bus_highwork f WHERE f.ISDELETE = '0'
COUNT(case when f.APPLY_STATUS != '0' then f.HIGHWORK_ID end) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS not in ('0','6') then f.HIGHWORK_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS = '6' then f.HIGHWORK_ID end) COUNTARCHIVE
FROM gf_highwork f WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
@ -334,31 +281,10 @@
</if>
UNION ALL
SELECT
(
SELECT
count(1)
FROM
bus_confinedspace f
WHERE
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND (
f.APPLY_STATUS != '0' and f.APPLY_STATUS != '7'
AND date_format( now(), '%Y-%m-%d %H:%i' ) >= f.WORK_START_DATE
AND f.WORK_END_DATE >= date_format( now(), '%Y-%m-%d %H:%i' )
OR f.APPLY_STATUS = '7'
)
) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS != '0' and f.APPLY_STATUS != '7' AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i') then f.CONFINEDSPACE_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS = '7' then f.CONFINEDSPACE_ID end) COUNTARCHIVE
FROM bus_confinedspace f WHERE f.ISDELETE = '0'
COUNT(case when f.APPLY_STATUS != '0' then f.CONFINEDSPACE_ID end) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS not in ('0','6') then f.CONFINEDSPACE_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS = '6' then f.CONFINEDSPACE_ID end) COUNTARCHIVE
FROM gf_confinedspace f WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
@ -370,31 +296,10 @@
</if>
UNION ALL
SELECT
(
SELECT
count( 1 )
FROM
bus_hoisting f
WHERE
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND (
f.APPLY_STATUS != '0' and f.APPLY_STATUS not in ('4','55','5','-5')
AND date_format( now(), '%Y-%m-%d %H:%i' ) >= f.JOB_START_TIME
AND f.JOB_END_TIME >= date_format( now(), '%Y-%m-%d %H:%i' )
OR f.APPLY_STATUS IN ( '4', '55', '5', '-5' )
)
) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS != '0' and f.APPLY_STATUS not in ('4','55','5','-5') AND date_format(now(),'%Y-%m-%d %H:%i') >= f.JOB_START_TIME AND f.JOB_END_TIME >= date_format(now(),'%Y-%m-%d %H:%i') then f.HOISTING_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS IN ('4','55','5','-5') then f.HOISTING_ID end) COUNTARCHIVE
FROM bus_hoisting f WHERE f.ISDELETE = '0'
COUNT(case when f.APPLY_STATUS != '0' then f.HOISTING_ID end) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS not in ('0','6') then f.HOISTING_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS = '6' then f.HOISTING_ID end) COUNTARCHIVE
FROM gf_hoisting f WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
@ -513,22 +418,29 @@
'临时用电作业' WORK_TYPE,
case f.APPLY_STATUS
when '0' then '待提交'
when '1' then '待确认'
when '2' then '待审批'
when '3' then '已归档'
when '4' then '已验收'
when '-1' then '已打回'
when '1' then '作业负责人待审核'
when '2' then '用电单位待审核'
when '3' then '配送电单位待审核'
when '4' then '待验收'
when '-2' then '已打回'
when '-3' then '已打回'
when '-4' then '已打回'
when '-5' then '已打回'
END STATUS_NAME,
case f.APPLY_STATUS
when '0' then f.APPLY_USER_ID
when '1' then f.ASSURE_USER_ID
when '2' then f.APPROVE_USER_ID
when '3' then f.ACCEPT_USER_ID
when '1' then f.CONFIRM_USER_ID
when '2' then f.AUDIT_USER_ID
when '3' then f.APPROVE_USER_ID
when '4' then f.ACCEPT_USER_ID
when '-1' then f.APPLY_USER_ID
when '-2' then f.APPLY_USER_ID
when '-3' then f.APPLY_USER_ID
when '-4' then f.APPLY_USER_ID
when '-5' then f.APPLY_USER_ID
END NEXT_USER_ID,
ifnull(f.OPERATTIME,f.CREATTIME) OPERATTIME
FROM bus_electricity f WHERE f.ISDELETE = '0' AND f.APPLY_STATUS NOT IN ('3','4')
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i')
FROM gf_electricity f WHERE f.ISDELETE = '0' AND f.APPLY_STATUS != '5'
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
@ -538,6 +450,7 @@
#{pd.ids[${index}]}
</foreach>
</if>
) f
LEFT JOIN sys_user u ON u.USER_ID = f.NEXT_USER_ID
UNION ALL
@ -548,22 +461,26 @@
f.CHECK_NO WORK_NUMBER,
'盲板作业' WORK_TYPE,
case f.APPLY_STATUS
when '1' then '待确认'
when '2' then '待审批'
when '3' then '已归档'
when '4' then '已打回'
when '0' then '待提交'
when '1' then '作业负责人待审核'
when '4' then '所在单位待审核'
when '5' then '待验收'
when '-2' then '已打回'
when '-5' then '已打回'
when '-6' then '已打回'
END STATUS_NAME,
case f.APPLY_STATUS
when '1' then bb.OPERATION_UNIT_PERSONCHARGE
when '2' then bb.CORPINFO_APPROVER
when '3' then f.APPLY_USER_ID
when '4' then f.APPLY_USER_ID
when '0' then f.APPLY_USER_ID
when '1' then f.CONSTRUCTION_USER_ID
when '4' then f.LEADER_USER_ID
when '5' then f.ACCEPT_USER_ID
when '-2' then APPLY_USER_ID
when '-5' then APPLY_USER_ID
when '-6' then APPLY_USER_ID
END NEXT_USER_ID,
ifnull(f.OPERATTIME,f.CREATTIME) OPERATTIME
FROM bus_blindboard f
LEFT JOIN bus_blindboardinfo bb ON bb.BLINDBOARD_ID = f.BLINDBOARD_ID
WHERE f.ISDELETE = '0' AND f.APPLY_STATUS NOT IN ('3','4')
AND date_format(now(),'%Y-%m-%d %H:%i') >= bb.BOARD_INSTALL_TIME AND bb.BOARD_DISASSEMBLE_TIME >= date_format(now(),'%Y-%m-%d %H:%i')
FROM gf_blindboard f
WHERE f.ISDELETE = '0' AND f.APPLY_STATUS != '6'
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
@ -573,6 +490,7 @@
#{pd.ids[${index}]}
</foreach>
</if>
) f
LEFT JOIN sys_user u ON u.USER_ID = f.NEXT_USER_ID
UNION ALL
@ -584,28 +502,32 @@
'高处作业' WORK_TYPE,
case f.APPLY_STATUS
when '0' then '待提交'
when '1' then '待确认'
when '2' then '待审核'
when '3' then '待审批'
when '4' then '已归档'
when '5' then '已验收'
when '-2' then '确认打回'
when '-3' then '审核打回'
when '-4' then '审批打回'
when '55' then '待验收'
when '1' then '作业负责人待审核'
when '2' then '所在单位待审核'
when '3' then '审核部门待审核'
when '4' then '审批部门待审核'
when '5' then '待验收'
when '-2' then '已打回'
when '-3' then '已打回'
when '-4' then '已打回'
when '-5' then '已打回'
when '-6' then '已打回'
END STATUS_NAME,
case f.APPLY_STATUS
when '0' then f.CREATOR
when '1' then f.CONSTRUCTION_USER_ID
when '2' then f.AUDIT_USER_ID
when '3' then f.APPROVE_USER_ID
when '2' then f.LEADER_USER_ID
when '3' then f.AUDIT_USER_ID
when '4' then f.APPROVE_USER_ID
when '5' then f.ACCEPT_USER_ID
when '-2' then f.CREATOR
when '-3' then f.CREATOR
when '-4' then f.CREATOR
when '55' then f.ACCEPT_USER_ID
when '-5' then f.CREATOR
when '-6' then f.CREATOR
END NEXT_USER_ID,
ifnull(f.OPERATTIME,f.CREATTIME) OPERATTIME
FROM bus_highwork f WHERE f.ISDELETE = '0' AND f.APPLY_STATUS NOT IN ('4','5','55','-5')
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i')
FROM gf_highwork f WHERE f.ISDELETE = '0' AND f.APPLY_STATUS !='6'
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
@ -615,6 +537,7 @@
#{pd.ids[${index}]}
</foreach>
</if>
) f
LEFT JOIN sys_user u ON u.USER_ID = f.NEXT_USER_ID
UNION ALL
@ -622,37 +545,26 @@
FROM
(SELECT
f.confinedspace_ID ID,
f.WORK_PERMIT_NUMBER WORK_NUMBER,
f.CHECK_NO WORK_NUMBER,
'有限空间作业' WORK_TYPE,
case f.APPLY_STATUS
when '1' then '待采样'
when '2' then '作业单位责任人确认'
when '3' then '作业现场责任人审核'
when '4' then '管理单位责任人审批'
when '5' then '作业单位责任人验收'
when '6' then '管理单位责任人验收'
when '-2' then '作业单位责任人确认打回'
when '-3' then '作业现场责任人审核打回'
when '-4' then '管理单位责任人审批打回'
when '-5' then '作业单位责任人验收打回'
when '-6' then '管理单位责任人验收打回'
when '1' then '作业负责人待审核'
when '4' then '所在单位待审核'
when '5' then '待验收'
when '-4' then '作业负责人审核打回'
when '-5' then '所在单位审核打回'
when '-6' then '验收打回'
END STATUS_NAME,
case f.APPLY_STATUS
when '1' then f.SAMPLING_ANALYST_ID
when '2' then f.WORK_UNIT_MANAGER_ID
when '3' then f.JOB_SITE_MANAGER_ID
when '4' then f.MANAGEMENT_UNIT_ID
when '5' then f.WORK_UNIT_MANAGER_ID
when '6' then f.MANAGEMENT_UNIT_ID
when '-2' then f.CREATOR
when '-3' then f.CREATOR
when '1' then f.CONFIRM_USER_ID
when '4' then f.APPROVE_USER_ID
when '5' then f.ACCEPT_USER_ID
when '-4' then f.CREATOR
when '-5' then f.CREATOR
when '-6' then f.CREATOR
END NEXT_USER_ID,
ifnull(f.OPERATTIME,f.CREATTIME) OPERATTIME
FROM bus_confinedspace f WHERE f.ISDELETE = '0' AND f.APPLY_STATUS != '7'
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i')
FROM gf_confinedspace f WHERE f.ISDELETE = '0' AND f.APPLY_STATUS != '6'
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
@ -669,33 +581,37 @@
FROM
(SELECT
f.hoisting_ID ID,
f.NUMBERING WORK_NUMBER,
f.CHECK_NO WORK_NUMBER,
'吊装作业' WORK_TYPE,
case f.APPLY_STATUS
when '0' then '待提交'
when '1' then '待确认'
when '2' then '待审核'
when '3' then '待审批'
when '4' then '已归档'
when '5' then '已验收'
when '-2' then '确认打回'
when '-3' then '审核打回'
when '-4' then '审批打回'
when '55' then '待验收'
when '1' then '作业指挥待审核'
when '2' then '所在单位待审核'
when '3' then '审核部门待审核'
when '4' then '审批部门待审核'
when '5' then '待验收'
when '-2' then '已打回'
when '-3' then '已打回'
when '-4' then '已打回'
when '-5' then '已打回'
when '-6' then '已打回'
END STATUS_NAME,
case f.APPLY_STATUS
when '1' then f.CONSTRUCTION_JOB_MANAGER_ID
when '2' then f.WORK_UNIT_MANAGER_ID
when '3' then f.BRANCH_APPROVER_ID
when '0' then f.CREATOR
when '1' then f.LEADER_USER_ID
when '2' then f.CONSTRUCTION_USER_ID
when '3' then f.AUDIT_USER_ID
when '4' then f.APPROVE_USER_ID
when '5' then f.ACCEPT_USER_ID
when '-2' then f.CREATOR
when '-3' then f.CREATOR
when '-4' then f.CREATOR
when '55' then f.ACCEPTOR_ID
when '-5' then f.CREATOR
when '-6' then f.CREATOR
END NEXT_USER_ID,
ifnull(f.OPERATTIME,f.CREATTIME) OPERATTIME
FROM bus_hoisting f
WHERE f.ISDELETE = '0' AND f.APPLY_STATUS NOT IN ('4','5','55','-5')
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.JOB_START_TIME AND f.JOB_END_TIME >= date_format(now(),'%Y-%m-%d %H:%i')
FROM gf_hoisting f
WHERE f.ISDELETE = '0' AND f.APPLY_STATUS !='6'
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
@ -814,57 +730,6 @@
</if>
</select>
<!--有限空间作业-->
<select id="getCONFINEDSPACEHighRiskWorkLocation" parameterType="pd" resultType="pd">
SELECT
'CONFINEDSPACE' TYPE,
f.CONFINEDSPACE_ID id,
CONCAT_WS("", '有限空间作业 编号:', f.WORK_PERMIT_NUMBER) NAME,
f.WORK_LONGITUDE LONGITUDE,
f.WORK_LATITUDE LATITUDE,
'./bi/images/map/confinedspace.png' IMAGE_FILE,
f.CORPINFO_ID,
f.WORK_PERMIT_NUMBER as MAP_POINT_NAME
FROM bus_confinedspace f WHERE f.ISDELETE = '0' AND f.WORK_LONGITUDE IS NOT NULL AND f.WORK_LATITUDE IS NOT NULL
AND f.APPLY_STATUS != '7'
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i')
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<!--吊装作业-->
<select id="getHOISTINGHighRiskWorkLocation" parameterType="pd" resultType="pd">
SELECT
'HOISTING' TYPE,
f.HOISTING_ID id,
CONCAT_WS("", '吊装作业 编号:', f.NUMBERING) NAME,
f.WORK_LONGITUDE LONGITUDE,
f.WORK_LATITUDE LATITUDE,
'./bi/images/map/hoisting.png' IMAGE_FILE,
f.CORPINFO_ID,
f.NUMBERING as MAP_POINT_NAME
FROM bus_hoisting f WHERE f.ISDELETE = '0' AND f.WORK_LONGITUDE IS NOT NULL AND f.WORK_LATITUDE IS NOT NULL
AND f.APPLY_STATUS NOT IN ('4','5','55','-5')
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.JOB_START_TIME AND f.JOB_END_TIME >= date_format(now(),'%Y-%m-%d %H:%i')
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<!--动火-->
<select id="findByIdHOTWORK" parameterType="pd" resultType="pd">
select
@ -1747,14 +1612,14 @@
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) CREATTIME,
'0' cutroadCount,
'0' blindboardCount,
count( 1 ) breakgroundCount,
count( 1 ) confinedspaceCount,
'0' highworkCount,
'0' hoistingCount,
'0' electricityCount,
'0' breakgroundCount,
'0' cutroadCount
FROM
bus_confinedspace
gf_confinedspace
WHERE
DATE_SUB( CURDATE(), INTERVAL 4 DAY )&lt;= STR_TO_DATE( CREATTIME, '%Y-%m-%d' )
and ISDELETE = '0'
@ -1990,29 +1855,10 @@
</if>
UNION ALL
SELECT
(SELECT
count(1)
FROM
bus_confinedspace f
WHERE
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
AND (
f.APPLY_STATUS != '0'
AND date_format( now(), '%Y-%m-%d %H:%i' ) >= f.WORK_START_DATE
AND f.WORK_END_DATE >= date_format( now(), '%Y-%m-%d %H:%i' )
OR f.APPLY_STATUS = '7'
)) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS not in ('0','7') AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i') then f.CONFINEDSPACE_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS = '7' then f.CONFINEDSPACE_ID end) COUNTARCHIVE
FROM bus_confinedspace f WHERE f.ISDELETE = '0'
COUNT(case when f.APPLY_STATUS != '0' then f.CONFINEDSPACE_ID end) COUNTAPPLY,
COUNT(case when f.APPLY_STATUS not in ('0','6') then f.CONFINEDSPACE_ID end) COUNTAPPROVE,
COUNT(case when f.APPLY_STATUS = '6' then f.CONFINEDSPACE_ID end) COUNTARCHIVE
FROM gf_confinedspace f WHERE f.ISDELETE = '0'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
@ -2263,37 +2109,26 @@
FROM
(SELECT
f.confinedspace_ID ID,
f.WORK_PERMIT_NUMBER WORK_NUMBER,
f.CHECK_NO WORK_NUMBER,
'有限空间作业' WORK_TYPE,
case f.APPLY_STATUS
when '1' then '待采样'
when '2' then '作业单位责任人确认'
when '3' then '作业现场责任人审核'
when '4' then '管理单位责任人审批'
when '5' then '作业单位责任人验收'
when '6' then '管理单位责任人验收'
when '-2' then '作业单位责任人确认打回'
when '-3' then '作业现场责任人审核打回'
when '-4' then '管理单位责任人审批打回'
when '-5' then '作业单位责任人验收打回'
when '-6' then '管理单位责任人验收打回'
when '1' then '作业负责人待审核'
when '4' then '所在单位待审核'
when '5' then '待验收'
when '-4' then '作业负责人审核打回'
when '-5' then '所在单位审核打回'
when '-6' then '验收打回'
END STATUS_NAME,
case f.APPLY_STATUS
when '1' then f.SAMPLING_ANALYST_ID
when '2' then f.WORK_UNIT_MANAGER_ID
when '3' then f.JOB_SITE_MANAGER_ID
when '4' then f.MANAGEMENT_UNIT_ID
when '5' then f.WORK_UNIT_MANAGER_ID
when '6' then f.MANAGEMENT_UNIT_ID
when '-2' then f.CREATOR
when '-3' then f.CREATOR
when '1' then f.CONFIRM_USER_ID
when '4' then f.APPROVE_USER_ID
when '5' then f.ACCEPT_USER_ID
when '-4' then f.CREATOR
when '-5' then f.CREATOR
when '-6' then f.CREATOR
END NEXT_USER_ID,
ifnull(f.OPERATTIME,f.CREATTIME) OPERATTIME
FROM bus_confinedspace f WHERE f.ISDELETE = '0' AND f.APPLY_STATUS != '7'
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i')
FROM gf_confinedspace f WHERE f.ISDELETE = '0' AND f.APPLY_STATUS != '6'
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
@ -2534,15 +2369,14 @@
SELECT
'CONFINEDSPACE' TYPE,
f.CONFINEDSPACE_ID id,
CONCAT_WS("", '有限空间作业 编号:', f.WORK_PERMIT_NUMBER) NAME,
CONCAT_WS("", '有限空间作业 编号:', f.CHECK_NO) NAME,
f.WORK_LONGITUDE LONGITUDE,
f.WORK_LATITUDE LATITUDE,
'./bi/images/map/confinedspace.png' IMAGE_FILE,
f.CORPINFO_ID,
f.WORK_PERMIT_NUMBER as MAP_POINT_NAME
FROM bus_confinedspace f WHERE f.ISDELETE = '0' AND f.WORK_LONGITUDE IS NOT NULL AND f.WORK_LATITUDE IS NOT NULL
AND f.APPLY_STATUS != '7'
AND date_format(now(),'%Y-%m-%d %H:%i') >= f.WORK_START_DATE AND f.WORK_END_DATE >= date_format(now(),'%Y-%m-%d %H:%i')
f.CHECK_NO as MAP_POINT_NAME
FROM gf_confinedspace f WHERE f.ISDELETE = '0' AND f.WORK_LONGITUDE IS NOT NULL AND f.WORK_LATITUDE IS NOT NULL
AND f.APPLY_STATUS != '6'
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
@ -3704,4 +3538,228 @@
f.HOISTING_ID = #{HOISTING_ID} and f.CORPINFO_ID = #{CORPINFO_ID} and f.ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID}
order by f.ACCEPT_CONFESS_USER_SIGNER_TIME asc
</select>
<select id="findByIdCONFINEDSPACEOrder" parameterType="pd" resultType="pd">
select
f.CORPINFO_ID,
f.ISDELETE,
f.CREATTIME,
f.CREATOR,
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.WORK_CONTENT,
replace(f.WORK_START_DATE,'-','/') as WORK_START_DATE,
replace(f.WORK_END_DATE,'-','/') as WORK_END_DATE,
f.CONFIRM_DEPARTMENT_ID,
f.CONFIRM_USER_ID,
f.CONFIRM_USER_SIGNER_PATH,
f.CONFIRM_USER_SIGNER_TIME,
f.AUDIT_DEPARTMENT_ID,
f.AUDIT_USER_ID,
f.AUDIT_USER_SIGNER_PATH,
f.AUDIT_USER_SIGNER_TIME,
f.APPROVE_DEPARTMENT_ID,
f.APPROVE_USER_ID,
f.APPROVE_USER_SIGNER_PATH,
f.APPROVE_USER_SIGNER_TIME,
f.APPLY_STATUS,
IFNULL(f.CONFIRM_CONTENT,'无') as CONFIRM_CONTENT,
IFNULL(f.AUDIT_CONTENT,'无') as AUDIT_CONTENT,
IFNULL(f.APPROVE_CONTENT,'无') as APPROVE_CONTENT,
f.OTHER_PROTECTIVE_MEASURES,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
IFNULL(f.ACCEPT_CONTENT,'无') as ACCEPT_CONTENT,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER_ID,
f.BELONG_CORP,
f.LIMITSPACE_ID,
f.WORK_USER,
IFNULL(f.SPECIAL_WORK,'无') as SPECIAL_WORK,
f.RISK_IDENTIFICATION,
f.MEDIUM_NAME,
f.EDUCATE_USER,
f.ANALYZE_DEPARTMENT_ID,
f.ANALYZE_USER_ID,
f.GUARDIAN_DEPARTMENT_ID,
f.GUARDIAN_USER_ID,
f.GUARDIAN_USER_SIGNER_PATH,
f.GUARDIAN_USER_SIGNER_TIME,
IFNULL(f.GUARDIAN_CONTENT,'无') as GUARDIAN_CONTENT,
f.CONFESS_USER,
f.ACCEPT_CONFESS_USER,
f.GUARDIAN_USER,
f.CONFINEDSPACE_ID,
f.CONFESS_DEPARTMENT_ID,
f.CONFESS_USER_ID,
f.CONFESS_USER_SIGNER_PATH,
f.CONFESS_USER_SIGNER_TIME,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.ACCEPT_CONFESS_USER_SIGNER_TIME,
f.WORK_LATITUDE,
f.WORK_LONGITUDE,
(SELECT replace(a.ANALYZE_TIME,'-','/') from GF_CONFINEDSPACEGAS a where a.ISDELETE = '0'
AND a.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID
ORDER BY
a.ANALYZE_TIME DESC LIMIT 1) as ANALYZE_TIME,
sp.NAME as LIMITSPACE_NAME,
ad.NAME as APPLY_DEPARTMENT_NAME,
au.NAME as APPLY_USER_NAME,
cd.NAME as CONFIRM_DEPARTMENT_NAME,
cu.NAME as CONFIRM_USER_NAME,
gd.NAME as GUARDIAN_DEPARTMENT_NAME,
gu.NAME as GUARDIAN_USER_NAME,
aud.NAME as AUDIT_DEPARTMENT_NAME,
auu.NAME as AUDIT_USER_NAME,
apd.NAME as APPROVE_DEPARTMENT_NAME,
apu.NAME as APPROVE_USER_NAME,
acd.NAME as ACCEPT_DEPARTMENT_NAME,
acu.NAME as ACCEPT_USER_NAME,
anad.NAME as ANALYZE_DEPARTMENT_NAME,
anau.NAME as ANALYZE_USER_NAME,
ac.NAME as CONFESS_DEPARTMENT_NAME,
accu.NAME as CONFESS_USER_NAME,
aac.NAME as ACCEPT_CONFESS_DEPARTMENT_NAME,
aacu.NAME as ACCEPT_CONFESS_USER_NAME
from
GF_CONFINEDSPACE f
left join GF_confinedspacegaswh b on b.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID
left join GF_LIMITSPACE sp on sp.LIMITSPACE_ID=f.LIMITSPACE_ID
left join OA_DEPARTMENT aac on aac.DEPARTMENT_ID = f.ACCEPT_CONFESS_DEPARTMENT_ID
left join SYS_USER aacu on aacu.USER_ID = f.ACCEPT_CONFESS_USER_ID
left join OA_DEPARTMENT ac on ac.DEPARTMENT_ID = f.CONFESS_DEPARTMENT_ID
left join SYS_USER accu on accu.USER_ID = f.CONFESS_USER_ID
left join OA_DEPARTMENT ad on ad.DEPARTMENT_ID = f.APPLY_DEPARTMENT_ID
left join SYS_USER au on au.USER_ID = f.APPLY_USER_ID
left join OA_DEPARTMENT cd on cd.DEPARTMENT_ID = f.CONFIRM_DEPARTMENT_ID
left join SYS_USER cu on cu.USER_ID = f.CONFIRM_USER_ID
left join OA_DEPARTMENT gd on gd.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID
left join SYS_USER gu on gu.USER_ID = f.GUARDIAN_USER_ID
left join OA_DEPARTMENT aud on aud.DEPARTMENT_ID = f.AUDIT_DEPARTMENT_ID
left join SYS_USER auu on auu.USER_ID = f.AUDIT_USER_ID
left join OA_DEPARTMENT apd on apd.DEPARTMENT_ID = f.APPROVE_DEPARTMENT_ID
left join SYS_USER apu on apu.USER_ID = f.APPROVE_USER_ID
left join OA_DEPARTMENT acd on acd.DEPARTMENT_ID = f.ACCEPT_DEPARTMENT_ID
left join SYS_USER acu on acu.USER_ID = f.ACCEPT_USER_ID
left join OA_DEPARTMENT anad on anad.DEPARTMENT_ID = f.ANALYZE_DEPARTMENT_ID
left join SYS_USER anau on anau.USER_ID = f.ANALYZE_USER_ID
where
f.CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}
</select>
<select id="listAllMeasuresCONFINEDSPACEOrder" parameterType="pd" resultType="pd">
select
f.*
,eo.CONFIRM_NAME as CONFIRM_NAME
,eo.STATUS,eo.ANSWER1,eo.ANSWER2,eo.ANSWER3
from
GF_CONFINEDSPACE_MEASURES f
left join GF_CONFINEDSPACETOMEASURES eo on eo.BUS_CONFINEDSPACE_MEASURES_ID = f.BUS_CONFINEDSPACE_MEASURES_ID
where f.ISDELETE = '0'
and eo.CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}
ORDER BY f.ORDER
</select>
<select id="listAllCONFINEDSPACEOrder" parameterType="pd" resultType="pd">
select
f.CONFINEDSPACE_ID,
f.ANALYZE_TIME,
f.ANALYZE_PLACE,
f.ANALYZE_USER,
f.HARMFUL_MATERIALS,
f.COMBUSTIBLE_GAS,
f.OXYGEN_CONTENT,
f.ISDELETE,
f.DATA1,
f.DATA2,
f.DATA3,
f.DATA4,
f.CONFINEDSPACEGAS_ID
from
GF_CONFINEDSPACEGAS f
where f.ISDELETE = '0' and f.CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}
ORDER BY f.ANALYZE_TIME desc
</select>
<!-- 通过ID获取数据 -->
<select id="findByIdCONFINEDSPACEAcceptuser" parameterType="pd" resultType="pd">
select
f.ACCEPT_CONFESS_ID,
f.CONFINEDSPACE_ID,
f.CORPINFO_ID,
f.ISDELETE,
f.OPERATTIME,
f.OPERATOR,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
f.ACCEPT_DEPARTMENT_ID
from
GF_CONFINEDSPACE_ACCEPTUSER f
where
f.CONFINEDSPACE_ID = #{CONFINEDSPACE_ID} and f.CORPINFO_ID = #{CORPINFO_ID} and f.ACCEPT_USER_ID = #{ACCEPT_USER_ID}
order by f.ACCEPT_USER_SIGNER_TIME ASC
</select>
<select id="findByIdCONFINEDSPACEAcceptusers" parameterType="pd" resultType="pd">
select
f.ACCEPT_CONFESS_ID,
f.CONFINEDSPACE_ID,
f.CORPINFO_ID,
f.ISDELETE,
f.OPERATTIME,
f.OPERATOR,
f.ACCEPT_CONFESS_DEPARTMENT_ID,
f.ACCEPT_CONFESS_USER_ID,
f.ACCEPT_CONFESS_USER_SIGNER_PATH,
f.ACCEPT_CONFESS_USER_SIGNER_TIME
from
GF_CONFINEDSPACE_ACCEPTUSER f
where
f.CONFINEDSPACE_ID = #{CONFINEDSPACE_ID} and f.CORPINFO_ID = #{CORPINFO_ID} and f.ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID}
order by f.ACCEPT_CONFESS_USER_SIGNER_TIME ASC
</select>
<!-- 通过ID获取气体检测数据 -->
<select id="findByIdCONFINEDSPACEGasWH" parameterType="pd" resultType="pd">
select
f.CONFINEDSPACE_ID,
f.GAS_NAME1,
f.GAS_STANDARD1,
f.GAS_NAME2,
f.GAS_STANDARD2,
f.GAS_NAME3,
f.GAS_STANDARD3,
f.GAS_NAME4,
f.GAS_STANDARD4,
f.CONFINEDSPACEGASWH_ID,
f.OPERATTIME
from
GF_CONFINEDSPACEGASWH f
where
f.CONFINEDSPACE_ID = #{CONFINEDSPACE_ID}
</select>
</mapper>