diff --git a/src/main/resources/mybatis/datasource/firemanager/FireCheckListMapper.xml b/src/main/resources/mybatis/datasource/firemanager/FireCheckListMapper.xml
index 8cc7722d..ea67ee21 100644
--- a/src/main/resources/mybatis/datasource/firemanager/FireCheckListMapper.xml
+++ b/src/main/resources/mybatis/datasource/firemanager/FireCheckListMapper.xml
@@ -25,9 +25,15 @@
UPDATE bus_fire_checklist
SET FIRE_CHECK_STANDARD_NAME = #{FIRE_CHECK_STANDARD_NAME},
- FIRE_CHECK_TYPE = #{FIRE_CHECK_TYPE},
- OPERATOR = #{OPERATOR},
- OPERATTIME = #{OPERATTIME}
+ FIRE_CHECK_TYPE = #{FIRE_CHECK_TYPE},
+ OPERATOR = #{OPERATOR},
+ OPERATTIME = #{OPERATTIME}
+
+ ,DEPARTMENT_ID = #{DEPARTMENT_ID}
+
+
+ ,USER_ID = #{USER_ID}
+
WHERE FIRE_CHECK_ID = #{FIRE_CHECK_ID}
@@ -64,14 +70,15 @@
cl.FIRE_CHECK_STANDARD_NAME,
cl.FIRE_CHECK_TYPE AS FIRE_CHECK_TYPE_ID,
IFNULL( FINISHED, 0 ) FINISHED,
- od.`NAME` AS DEPARTMENTNAME,
+ d.`NAME` AS DEPARTMENTNAME,
su.`NAME` AS USERNAME,
cl.STATE,
sys_dictionaries.`NAME` AS FIRE_CHECK_TYPE,
cl.FIRE_CHECK_ID,
ifnull(tt.CHECK_NUM,0) CHECK_NUM
FROM
- bus_fire_checklist as cl
+ bus_fire_checklist AS cl
+ left JOIN oa_department AS d ON cl.DEPARTMENT_ID = d.DEPARTMENT_ID
LEFT JOIN (
SELECT
FIRE_CHECK_ID,
@@ -85,8 +92,6 @@
AND CORPINFO_ID = #{pd.CORPINFO_ID}
GROUP BY FIRE_CHECK_ID,PERIODSTART,PERIODEND ) AS t ON cl.FIRE_CHECK_ID = t.FIRE_CHECK_ID
LEFT JOIN sys_user AS su ON cl.USER_ID = su.USER_ID
- left join oa_department od
- on od.DEPARTMENT_ID = su.DEPARTMENT_ID
LEFT JOIN sys_dictionaries ON cl.FIRE_CHECK_TYPE = sys_dictionaries.BIANMA
LEFT JOIN (SELECT FIRE_CHECK_ID, count(1) CHECK_NUM from bus_fire_record GROUP BY FIRE_CHECK_ID ) tt on cl.FIRE_CHECK_ID = tt.FIRE_CHECK_ID
where cl.ISDELETE = 0 and cl.STATE != 2
@@ -95,7 +100,7 @@
-
+
and cl.CORPINFO_ID = #{pd.CORPINFO_ID}
@@ -167,7 +172,7 @@
oa_department AS oa
ON
su.DEPARTMENT_ID = oa.DEPARTMENT_ID
- INNER JOIN
+ LEFT JOIN
sys_post AS sp
ON
su.POST_ID = sp.POST_ID
@@ -223,13 +228,19 @@
fd.FIRE_DEVICE_TYPE_ID = sys_dictionaries.BIANMA
WHERE
fp.ISDELETE = 0 AND
- fd.ISDELETE = 0
+ fd.ISDELETE = 0 AND fr.ISDELETE = 0
and fp.USER_ID = #{USER_ID}
and su.NAME like concat(#{USERNAME},'%')
+
+ and fp.DEPARTMENT_ID in
+
+ #{item}
+
+
and fp.DEPARTMENT_ID = #{DEPARTMENT_ID}
@@ -326,21 +337,26 @@
-
- and cl.DEPARTMENT_ID in (${supDeparIds})
-
+
+ and cl.DEPARTMENT_ID in (${supDeparIds})
+
AND cl.USER_ID = #{USER_ID}
@@ -459,7 +475,7 @@
WHERE cl.ISDELETE = 0
AND cl.STATE = 0
- and cl.USER_ID = #{USER_ID}
+ and cl.USER_ID = #{USER_ID}
AND cl.CORPINFO_ID = #{CORPINFO_ID,jdbcType=VARCHAR}
diff --git a/src/main/resources/mybatis/datasource/firemanager/FireRecordMapper.xml b/src/main/resources/mybatis/datasource/firemanager/FireRecordMapper.xml
index 6cf3beb4..1e2f53b3 100644
--- a/src/main/resources/mybatis/datasource/firemanager/FireRecordMapper.xml
+++ b/src/main/resources/mybatis/datasource/firemanager/FireRecordMapper.xml
@@ -54,7 +54,7 @@
INSERT INTO `qa-cmt-prevention`.`bus_fire_record`
(`FIRE_RECORD_ID`, `FIRE_CHECK_ID`, `CORPINFO_ID`, `CREATOR`, `CREATTIME`,REPEATCHECK,
- `OPERATOR`, `OPERATTIME`, `PERIODSTART`, `PERIODEND`) VALUES
+ `OPERATOR`, `OPERATTIME`, `PERIODSTART`, `PERIODEND`, `PHONE_REPEAT`) VALUES
(
#{item.FIRE_RECORD_ID},
@@ -66,7 +66,8 @@
#{item.OPERATOR},
#{item.OPERATTIME},
#{item.PERIODSTART},
- #{item.PERIODEND}
+ #{item.PERIODEND},
+ #{item.PHONE_REPEAT}
)
@@ -117,16 +118,16 @@
INSERT INTO bus_fire_record_point
(
- EQUIPMENT_POINT_ID,
- FIRE_CHECK_ID,
- FIRE_RECORD_ID,
- FIRE_POINT_ID,
- CORPINFO_ID,
- P_ISCHECKED,
- CREATOR,
- CREATTIME,
- OPERATOR,
- OPERATTIME) VALUES
+ EQUIPMENT_POINT_ID,
+ FIRE_CHECK_ID,
+ FIRE_RECORD_ID,
+ FIRE_POINT_ID,
+ CORPINFO_ID,
+ P_ISCHECKED,
+ CREATOR,
+ CREATTIME,
+ OPERATOR,
+ OPERATTIME) VALUES
(
#{item.EQUIPMENT_POINT_ID},
@@ -334,14 +335,14 @@
UPDATE bus_fire_record_point
SET `P_ISCHECKED` = 1,
- OPERATOR = #{OPERATOR},
- OPERATTIME = #{OPERATTIME}
+ OPERATOR = #{OPERATOR},
+ OPERATTIME = #{OPERATTIME}
WHERE
FIRE_RECORD_ID = #{FIRE_RECORD_ID}
- and FIRE_POINT_ID in
-
- #{item}
-
+ and FIRE_POINT_ID in
+
+ #{item}
+
UPDATE `qa-cmt-prevention`.`bus_fire_record_device`
@@ -379,7 +380,7 @@
INNER JOIN bus_fire_point AS bfp ON bfd.FIRE_POINT_ID = bfp.FIRE_POINT_ID
INNER JOIN sys_user AS su ON cl.USER_ID = su.USER_ID
INNER JOIN oa_department AS oa ON su.DEPARTMENT_ID = oa.DEPARTMENT_ID
- INNER JOIN sys_post AS sp ON su.POST_ID = sp.POST_ID
+ LEFT JOIN sys_post AS sp ON su.POST_ID = sp.POST_ID
INNER JOIN bus_fire_region AS bfr ON bfp.FIRE_REGION_ID = bfr.FIRE_REGION_ID
INNER JOIN bus_fire_record AS fr ON cl.FIRE_CHECK_ID = fr.FIRE_CHECK_ID
WHERE cl.ISDELETE = 0
@@ -569,38 +570,38 @@
and temp.FINISHED is not null
--- AND CONCAT( date_format( CURRENT_DATE ()- 1, '%Y-%m-%d' ), ' 00:00:00' ) BETWEEN fr.PERIODSTART AND fr.PERIODEND
+ -- AND CONCAT( date_format( CURRENT_DATE ()- 1, '%Y-%m-%d' ), ' 00:00:00' ) BETWEEN fr.PERIODSTART AND fr.PERIODEND
and fr.SUPPLEMENTARY = #{pd.OVERTIME}
and su.NAME like concat(#{pd.USERNAME},'%')
@@ -897,7 +899,7 @@
GROUP BY
FIRE_CHECK_ID
- order by temp.FINISHED,fr. CREATTIME
+ order by fr. CREATTIME
+
+