数据库czks 改 cmt

0927cmt
zhaoyu 2024-03-13 19:23:45 +08:00
parent c0245bdf3c
commit c9ac2204df
8 changed files with 69 additions and 69 deletions

View File

@ -384,17 +384,17 @@
FROM FROM
bus_hotwork_cfd f bus_hotwork_cfd f
LEFT JOIN sys_user u1 ON u1.USER_ID = f.CONFIRM_USER_ID LEFT JOIN sys_user u1 ON u1.USER_ID = f.CONFIRM_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu1 ON qu1.USER_ID = f.CONFIRM_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu1 ON qu1.USER_ID = f.CONFIRM_USER_ID
LEFT JOIN sys_user u2 ON u2.USER_ID = f.LEADER_USER_ID LEFT JOIN sys_user u2 ON u2.USER_ID = f.LEADER_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu2 ON qu2.USER_ID = f.LEADER_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu2 ON qu2.USER_ID = f.LEADER_USER_ID
LEFT JOIN sys_user u3 ON u3.USER_ID = f.AUDIT_USER_ID LEFT JOIN sys_user u3 ON u3.USER_ID = f.AUDIT_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu3 ON qu3.USER_ID = f.AUDIT_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu3 ON qu3.USER_ID = f.AUDIT_USER_ID
LEFT JOIN sys_user u4 ON u4.USER_ID = f.APPROVE_USER_ID LEFT JOIN sys_user u4 ON u4.USER_ID = f.APPROVE_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu4 ON qu4.USER_ID = f.APPROVE_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu4 ON qu4.USER_ID = f.APPROVE_USER_ID
LEFT JOIN sys_user u5 ON u5.USER_ID = f.MONITOR_USER_ID LEFT JOIN sys_user u5 ON u5.USER_ID = f.MONITOR_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu5 ON qu5.USER_ID = f.MONITOR_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu5 ON qu5.USER_ID = f.MONITOR_USER_ID
LEFT JOIN sys_user u6 ON u6.USER_ID = f.ACCEPT_USER_ID LEFT JOIN sys_user u6 ON u6.USER_ID = f.ACCEPT_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu6 ON qu6.USER_ID = f.ACCEPT_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu6 ON qu6.USER_ID = f.ACCEPT_USER_ID
WHERE WHERE
f.ISDELETE = '0' f.ISDELETE = '0'
AND f.APPLY_STATUS >= 0 AND f.APPLY_STATUS >= 0

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.gatemachine.CzksGateCarIOMapper"> <mapper namespace="com.zcloud.mapper.datasource.gatemachine.CzksGateCarIOMapper">
<insert id="saveMineral"> <insert id="saveMineral">
INSERT INTO `qa-czks-prevention`.`work_mineral_io_record` INSERT INTO `qa-cmt-prevention`.`work_mineral_io_record`
(MINERAL_RECORD_ID, (MINERAL_RECORD_ID,
TRUCK_NO, TRUCK_NO,
CAR_TEAM_NAME, CAR_TEAM_NAME,
@ -33,7 +33,7 @@
#{OPERATTIME}) #{OPERATTIME})
</insert> </insert>
<insert id="saveGrocery"> <insert id="saveGrocery">
INSERT INTO `qa-czks-prevention`.`work_grocery_io_record` INSERT INTO `qa-cmt-prevention`.`work_grocery_io_record`
(GROCERY_RECORD_ID, (GROCERY_RECORD_ID,
TRUCK_NO, TRUCK_NO,
CAR_TEAM_NAME, CAR_TEAM_NAME,
@ -65,7 +65,7 @@
</insert> </insert>
<select id="getGroceryIORecords" resultType="com.zcloud.entity.PageData" parameterType="pd"> <select id="getGroceryIORecords" resultType="com.zcloud.entity.PageData" parameterType="pd">
select * from select * from
`qa-czks-prevention`.`work_grocery_io_record` f `qa-cmt-prevention`.`work_grocery_io_record` f
where 1=1 where 1=1
<if test="pd.JGSJ != null and pd.JGSJ != ''"> <if test="pd.JGSJ != null and pd.JGSJ != ''">
and f.JGSJ = #{JGSJ} and f.JGSJ = #{JGSJ}
@ -80,7 +80,7 @@
</select> </select>
<select id="getMineralIORecords" resultType="com.zcloud.entity.PageData" parameterType="pd"> <select id="getMineralIORecords" resultType="com.zcloud.entity.PageData" parameterType="pd">
select * from select * from
`qa-czks-prevention`.`work_mineral_io_record` f `qa-cmt-prevention`.`work_mineral_io_record` f
where 1=1 where 1=1
<if test="pd.JGSJ != null and pd.JGSJ != ''"> <if test="pd.JGSJ != null and pd.JGSJ != ''">
and f.JGSJ = #{JGSJ} and f.JGSJ = #{JGSJ}
@ -95,7 +95,7 @@
</select> </select>
<update id="editGrocery" parameterType="com.zcloud.entity.PageData"> <update id="editGrocery" parameterType="com.zcloud.entity.PageData">
update update
`qa-czks-prevention`.`work_grocery_io_record` `qa-cmt-prevention`.`work_grocery_io_record`
set TRUCK_NO=#{TRUCK_NO}, set TRUCK_NO=#{TRUCK_NO},
CAR_TEAM_NAME=#{CAR_TEAM_NAME}, CAR_TEAM_NAME=#{CAR_TEAM_NAME},
LRSJ=#{LRSJ}, LRSJ=#{LRSJ},
@ -112,7 +112,7 @@
</update> </update>
<update id="editMineral" parameterType="com.zcloud.entity.PageData"> <update id="editMineral" parameterType="com.zcloud.entity.PageData">
update update
`qa-czks-prevention`.`work_mineral_io_record` `qa-cmt-prevention`.`work_mineral_io_record`
set TRUCK_NO=#{TRUCK_NO}, set TRUCK_NO=#{TRUCK_NO},
CAR_TEAM_NAME=#{CAR_TEAM_NAME}, CAR_TEAM_NAME=#{CAR_TEAM_NAME},
LRSJ=#{LRSJ}, LRSJ=#{LRSJ},
@ -129,7 +129,7 @@
</update> </update>
<update id="removeGroceryRecordByIds" parameterType="com.zcloud.entity.PageData"> <update id="removeGroceryRecordByIds" parameterType="com.zcloud.entity.PageData">
update update
`qa-czks-prevention`.`work_grocery_io_record` `qa-cmt-prevention`.`work_grocery_io_record`
set ISDELETE = #{ISDELETE ,jdbcType=INTEGER} set ISDELETE = #{ISDELETE ,jdbcType=INTEGER}
where 1 = 1 where 1 = 1
and GROCERY_RECORD_ID = #{GROCERY_RECORD_ID ,jdbcType=VARCHAR} and GROCERY_RECORD_ID = #{GROCERY_RECORD_ID ,jdbcType=VARCHAR}
@ -137,7 +137,7 @@
<update id="removeMineralRecordByIds" parameterType="com.zcloud.entity.PageData"> <update id="removeMineralRecordByIds" parameterType="com.zcloud.entity.PageData">
update update
`qa-czks-prevention`.`work_mineral_io_record` `qa-cmt-prevention`.`work_mineral_io_record`
set ISDELETE = #{ISDELETE ,jdbcType=INTEGER} set ISDELETE = #{ISDELETE ,jdbcType=INTEGER}
where 1 = 1 where 1 = 1
and MINERAL_RECORD_ID = #{MINERAL_RECORD_ID ,jdbcType=VARCHAR} and MINERAL_RECORD_ID = #{MINERAL_RECORD_ID ,jdbcType=VARCHAR}
@ -147,7 +147,7 @@
count(case when g.PASS_TYPE = '0' then 0 end) as `entered`, count(case when g.PASS_TYPE = '0' then 0 end) as `entered`,
count(case when g.PASS_TYPE = '1' then 1 end) as `quited` count(case when g.PASS_TYPE = '1' then 1 end) as `quited`
from from
`qa-czks-prevention`.`work_grocery_io_record` g `qa-cmt-prevention`.`work_grocery_io_record` g
where where
g.ISDELETE = 0 g.ISDELETE = 0
and day(g.CREATTIME) = day(NOW()) and day(g.CREATTIME) = day(NOW())
@ -157,7 +157,7 @@
count(case when m.PASS_TYPE = '0' then 0 end) as `entered`, count(case when m.PASS_TYPE = '0' then 0 end) as `entered`,
count(case when m.PASS_TYPE = '1' then 1 end) as `quited` count(case when m.PASS_TYPE = '1' then 1 end) as `quited`
from from
`qa-czks-prevention`.`work_mineral_io_record` m `qa-cmt-prevention`.`work_mineral_io_record` m
where where
m.ISDELETE = 0 m.ISDELETE = 0
and day(m.CREATTIME) = day(NOW()) and day(m.CREATTIME) = day(NOW())
@ -168,7 +168,7 @@
count(case when g.PASS_TYPE = '1' then 1 end) as `quited`, count(case when g.PASS_TYPE = '1' then 1 end) as `quited`,
count(case when g.PASS_TYPE = '0' then 0 end) - count(case when g.PASS_TYPE = '1' then 1 end) as present count(case when g.PASS_TYPE = '0' then 0 end) - count(case when g.PASS_TYPE = '1' then 1 end) as present
from from
`qa-czks-prevention`.`work_grocery_io_record` g `qa-cmt-prevention`.`work_grocery_io_record` g
where where
g.ISDELETE = 0 g.ISDELETE = 0
</select> </select>
@ -178,14 +178,14 @@
count(case when m.PASS_TYPE = '1' then 1 end) as `quited`, count(case when m.PASS_TYPE = '1' then 1 end) as `quited`,
count(case when m.PASS_TYPE = '0' then 0 end) - count(case when m.PASS_TYPE = '1' then 1 end) as present count(case when m.PASS_TYPE = '0' then 0 end) - count(case when m.PASS_TYPE = '1' then 1 end) as present
from from
`qa-czks-prevention`.`work_mineral_io_record` m `qa-cmt-prevention`.`work_mineral_io_record` m
where where
m.ISDELETE = 0 m.ISDELETE = 0
</select> </select>
<select id="getMineralDatalistPage" resultType="pd" parameterType="com.zcloud.entity.Page"> <select id="getMineralDatalistPage" resultType="pd" parameterType="com.zcloud.entity.Page">
select * select *
from `qa-czks-prevention`.`work_mineral_io_record` f from `qa-cmt-prevention`.`work_mineral_io_record` f
where f.ISDELETE = 0 where f.ISDELETE = 0
<if test="pd.GATE_MACHINE_ID!=null and pd.GATE_MACHINE_ID!='' "> <if test="pd.GATE_MACHINE_ID!=null and pd.GATE_MACHINE_ID!='' ">
and f.GATE_MACHINE_ID = #{pd.GATE_MACHINE_ID ,jdbcType=VARCHAR} and f.GATE_MACHINE_ID = #{pd.GATE_MACHINE_ID ,jdbcType=VARCHAR}
@ -217,7 +217,7 @@
</select> </select>
<select id="getGroceryDatalistPage" resultType="pd" parameterType="com.zcloud.entity.Page"> <select id="getGroceryDatalistPage" resultType="pd" parameterType="com.zcloud.entity.Page">
select * select *
from `qa-czks-prevention`.`work_grocery_io_record` f from `qa-cmt-prevention`.`work_grocery_io_record` f
where f.ISDELETE = 0 where f.ISDELETE = 0
<if test="pd.GATE_MACHINE_ID!=null and pd.GATE_MACHINE_ID!='' "> <if test="pd.GATE_MACHINE_ID!=null and pd.GATE_MACHINE_ID!='' ">
and f.GATE_MACHINE_ID = #{pd.GATE_MACHINE_ID ,jdbcType=VARCHAR} and f.GATE_MACHINE_ID = #{pd.GATE_MACHINE_ID ,jdbcType=VARCHAR}

View File

@ -159,7 +159,7 @@
pv.INDEXCODE pv.INDEXCODE
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
left join `qa-czks-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID left join `qa-cmt-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID
where f.ISDELETE = '0' where f.ISDELETE = '0'
<if test="pd.GATE_AREA_ID != null and pd.GATE_AREA_ID != ''"><!-- 关键词检索 --> <if test="pd.GATE_AREA_ID != null and pd.GATE_AREA_ID != ''"><!-- 关键词检索 -->
and f.GATE_AREA_ID=#{pd.GATE_AREA_ID} and f.GATE_AREA_ID=#{pd.GATE_AREA_ID}
@ -198,7 +198,7 @@
pv.INDEXCODE pv.INDEXCODE
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
left join `qa-czks-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID left join `qa-cmt-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID
where f.ISDELETE = '0' where f.ISDELETE = '0'
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 --> <if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID=#{CORPINFO_ID} and f.CORPINFO_ID=#{CORPINFO_ID}

View File

@ -137,8 +137,8 @@
sd.NAME as NAME, sd.NAME as NAME,
m.EQUIPMENTNAME m.EQUIPMENTNAME
FROM FROM
`qa-czks-regulatory`.BUS_METEOROLOGICALINFO f `qa-cmt-regulatory`.BUS_METEOROLOGICALINFO f
LEFT JOIN `qa-czks-regulatory`.bus_meteorological m ON m.CODE = f.CODE LEFT JOIN `qa-cmt-regulatory`.bus_meteorological m ON m.CODE = f.CODE
LEFT JOIN sys_dictionaries sd on sd.DICTIONARIES_ID = m.EQUIPMENTTYPE LEFT JOIN sys_dictionaries sd on sd.DICTIONARIES_ID = m.EQUIPMENTTYPE
WHERE 1=1 WHERE 1=1
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 --> <if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->

View File

@ -77,7 +77,7 @@
<select id="getSupeUser" parameterType="pd" resultType="Integer"> <select id="getSupeUser" parameterType="pd" resultType="Integer">
SELECT count(*) as count SELECT count(*) as count
FROM FROM
`qa-czks-regulatory`.sys_user `qa-cmt-regulatory`.sys_user
where USERNAME != 'admin' and ISDELETE = '0' where USERNAME != 'admin' and ISDELETE = '0'
</select> </select>
<select id="getCorpUserCountTop10" parameterType="pd" resultType="pd"> <select id="getCorpUserCountTop10" parameterType="pd" resultType="pd">
@ -294,8 +294,8 @@
cop.CORPINFO_ID AS corpId, cop.CORPINFO_ID AS corpId,
count(*) as count count(*) as count
FROM FROM
`qa-czks-prevention`.BUS_HIDDEN h `qa-cmt-prevention`.BUS_HIDDEN h
LEFT JOIN `qa-czks-prevention`.bus_corp_info cop LEFT JOIN `qa-cmt-prevention`.bus_corp_info cop
ON cop.CORPINFO_ID = h.CORPINFO_ID ON cop.CORPINFO_ID = h.CORPINFO_ID
WHERE WHERE
1 = 1 1 = 1
@ -392,7 +392,7 @@ WHERE
u.PHONE, u.PHONE,
r.ROLE_ID, r.ROLE_ID,
r.ROLE_NAME r.ROLE_NAME
from `qa-czks-regulatory`.sys_user u, `qa-czks-regulatory`.sys_role r from `qa-cmt-regulatory`.sys_user u, `qa-cmt-regulatory`.sys_role r
where u.ROLE_ID = r.ROLE_ID where u.ROLE_ID = r.ROLE_ID
and u.USERNAME != 'admin' and u.USERNAME != 'admin'
and r.PARENT_ID = '1' and r.PARENT_ID = '1'
@ -476,8 +476,8 @@ WHERE
s.NAME as STATUS_NAME s.NAME as STATUS_NAME
from from
BUS_CORP_INFO f BUS_CORP_INFO f
left join `qa-czks-prevention`.sys_dictionaries t on t.DICTIONARIES_ID = f.CORP_OF_TYPE left join `qa-cmt-prevention`.sys_dictionaries t on t.DICTIONARIES_ID = f.CORP_OF_TYPE
left join `qa-czks-prevention`.sys_dictionaries s on s.DICTIONARIES_ID = f.CORP_STATE left join `qa-cmt-prevention`.sys_dictionaries s on s.DICTIONARIES_ID = f.CORP_STATE
where f.ISDELETE='0' where f.ISDELETE='0'
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 --> <if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
and f.CORP_NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%') and f.CORP_NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
@ -495,7 +495,7 @@ WHERE
and f.VILLAGE = #{DEPT_VILLAGE} and f.VILLAGE = #{DEPT_VILLAGE}
</if> </if>
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''"> <if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''">
and f.CORP_OF_TYPE in (select CORPTYPE_ID from `qa-czks-regulatory`.BUS_CORPTYPETODEPT ctod where ctod.DEPARTMENT_ID=#{DEPARTMENT_ID}) and f.CORP_OF_TYPE in (select CORPTYPE_ID from `qa-cmt-regulatory`.BUS_CORPTYPETODEPT ctod where ctod.DEPARTMENT_ID=#{DEPARTMENT_ID})
</if> </if>
<if test="CORP_NAME != null and CORP_NAME != ''"> <if test="CORP_NAME != null and CORP_NAME != ''">
and f.CORP_NAME = #{CORP_NAME} and f.CORP_NAME = #{CORP_NAME}
@ -523,7 +523,7 @@ WHERE
</if> </if>
<if test="DANGER_GIS != null and DANGER_GIS != ''"> <if test="DANGER_GIS != null and DANGER_GIS != ''">
and (select count(1) from `qa-czks-regulatory`.BUS_MAJORINFORMATION m where m.CORP_INFO_ID = f.CORPINFO_ID and m.ISDELETE='0')>0 and (select count(1) from `qa-cmt-regulatory`.BUS_MAJORINFORMATION m where m.CORP_INFO_ID = f.CORPINFO_ID and m.ISDELETE='0')>0
</if> </if>
</select> </select>
<select id="getHiddenCountByHiddenType" resultType="com.zcloud.entity.PageData"> <select id="getHiddenCountByHiddenType" resultType="com.zcloud.entity.PageData">

View File

@ -157,7 +157,7 @@
pv.INDEXCODE pv.INDEXCODE
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
left join `qa-czks-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID left join `qa-cmt-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID
where f.ISDELETE = '0' where f.ISDELETE = '0'
<if test="pd.GATE_AREA_ID != null and pd.GATE_AREA_ID != ''"><!-- 关键词检索 --> <if test="pd.GATE_AREA_ID != null and pd.GATE_AREA_ID != ''"><!-- 关键词检索 -->
and f.GATE_AREA_ID=#{pd.GATE_AREA_ID} and f.GATE_AREA_ID=#{pd.GATE_AREA_ID}
@ -196,7 +196,7 @@
pv.INDEXCODE pv.INDEXCODE
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
left join `qa-czks-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID left join `qa-cmt-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID
where f.ISDELETE = '0' where f.ISDELETE = '0'
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 --> <if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID=#{CORPINFO_ID} and f.CORPINFO_ID=#{CORPINFO_ID}

View File

@ -479,17 +479,17 @@
FROM FROM
bus_hotwork_cfd f bus_hotwork_cfd f
LEFT JOIN sys_user u1 ON u1.USER_ID = f.CONFIRM_USER_ID LEFT JOIN sys_user u1 ON u1.USER_ID = f.CONFIRM_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu1 ON qu1.USER_ID = f.CONFIRM_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu1 ON qu1.USER_ID = f.CONFIRM_USER_ID
LEFT JOIN sys_user u2 ON u2.USER_ID = f.LEADER_USER_ID LEFT JOIN sys_user u2 ON u2.USER_ID = f.LEADER_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu2 ON qu2.USER_ID = f.LEADER_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu2 ON qu2.USER_ID = f.LEADER_USER_ID
LEFT JOIN sys_user u3 ON u3.USER_ID = f.AUDIT_USER_ID LEFT JOIN sys_user u3 ON u3.USER_ID = f.AUDIT_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu3 ON qu3.USER_ID = f.AUDIT_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu3 ON qu3.USER_ID = f.AUDIT_USER_ID
LEFT JOIN sys_user u4 ON u4.USER_ID = f.APPROVE_USER_ID LEFT JOIN sys_user u4 ON u4.USER_ID = f.APPROVE_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu4 ON qu4.USER_ID = f.APPROVE_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu4 ON qu4.USER_ID = f.APPROVE_USER_ID
LEFT JOIN sys_user u5 ON u5.USER_ID = f.MONITOR_USER_ID LEFT JOIN sys_user u5 ON u5.USER_ID = f.MONITOR_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu5 ON qu5.USER_ID = f.MONITOR_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu5 ON qu5.USER_ID = f.MONITOR_USER_ID
LEFT JOIN sys_user u6 ON u6.USER_ID = f.ACCEPT_USER_ID LEFT JOIN sys_user u6 ON u6.USER_ID = f.ACCEPT_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu6 ON qu6.USER_ID = f.ACCEPT_USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu6 ON qu6.USER_ID = f.ACCEPT_USER_ID
WHERE WHERE
f.ISDELETE = '0' f.ISDELETE = '0'
AND f.APPLY_STATUS >= 0 AND f.APPLY_STATUS >= 0
@ -1000,8 +1000,8 @@
left join SYS_USER u on u.USER_ID = f.USER_ID left join SYS_USER u on u.USER_ID = f.USER_ID
left join bus_specialuser su on su.SPECIALUSER_ID = f.USER_ID left join bus_specialuser su on su.SPECIALUSER_ID = f.USER_ID
left join oa_department dept on dept.DEPARTMENT_ID = u.DEPARTMENT_ID left join oa_department dept on dept.DEPARTMENT_ID = u.DEPARTMENT_ID
left join `qa-czks-regulatory`.SYS_USER reuser on reuser.USER_ID = f.USER_ID and reuser.USERNAME != 'admin' left join `qa-cmt-regulatory`.SYS_USER reuser on reuser.USER_ID = f.USER_ID and reuser.USERNAME != 'admin'
left join `qa-czks-regulatory`.SYS_DEPARTMENT redept on redept.DEPARTMENT_ID = reuser.DEPARTMENT_ID left join `qa-cmt-regulatory`.SYS_DEPARTMENT redept on redept.DEPARTMENT_ID = reuser.DEPARTMENT_ID
WHERE WHERE
f.ISDELETE = '0' f.ISDELETE = '0'
and f.FOREIGN_KEY= #{HOTWORKAPPLICATION_ID} and f.FOREIGN_KEY= #{HOTWORKAPPLICATION_ID}
@ -2114,7 +2114,7 @@
LEFT JOIN bus_hotworkapplicationuser hu ON hu.FOREIGN_KEY = f.HOTWORKAPPLICATION_ID AND hu.STATE = f.STATE LEFT JOIN bus_hotworkapplicationuser hu ON hu.FOREIGN_KEY = f.HOTWORKAPPLICATION_ID AND hu.STATE = f.STATE
LEFT JOIN sys_user u ON u.USER_ID = hu.USER_ID LEFT JOIN sys_user u ON u.USER_ID = hu.USER_ID
LEFT JOIN oa_department od ON od.DEPARTMENT_ID = hu.USER_ID LEFT JOIN oa_department od ON od.DEPARTMENT_ID = hu.USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu on qu.USER_ID = hu.USER_ID LEFT JOIN `qa-cmt-regulatory`.sys_user qu on qu.USER_ID = hu.USER_ID
WHERE f.ISDELETE = '0' AND f.STATE >= 0 and f.STATE != 11 WHERE f.ISDELETE = '0' AND f.STATE >= 0 and f.STATE != 11
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''"> <if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.CORPINFO_ID = #{pd.CORPINFO_ID}

View File

@ -12,7 +12,7 @@
SUM( PUNISH_COUNT ) PUNISH_COUNT, SUM( PUNISH_COUNT ) PUNISH_COUNT,
SUM( AMOUT_SUM ) AMOUT_SUM SUM( AMOUT_SUM ) AMOUT_SUM
FROM FROM
`qa-czks-regulatory`.vi_keyproj_count `qa-cmt-regulatory`.vi_keyproj_count
where 1=1 where 1=1
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''"> <if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
and CORPINFO_ID = #{CORPINFO_ID} and CORPINFO_ID = #{CORPINFO_ID}
@ -56,8 +56,8 @@
u.CORPINFO_ID, u.CORPINFO_ID,
o.OUTSOURCED_NAME as MAP_POINT_NAME o.OUTSOURCED_NAME as MAP_POINT_NAME
FROM FROM
`qa-czks-regulatory`.bus_outsourced o `qa-cmt-regulatory`.bus_outsourced o
LEFT JOIN `qa-czks-prevention`.vi_user_all u on o.CREATOR = u.USER_ID LEFT JOIN `qa-cmt-prevention`.vi_user_all u on o.CREATOR = u.USER_ID
WHERE WHERE
o.ISDELETE = '0' o.ISDELETE = '0'
AND o.STATE = '1' AND o.STATE = '1'
@ -86,9 +86,9 @@
u.CORPINFO_ID, u.CORPINFO_ID,
v.VIDEONAME as MAP_POINT_NAME v.VIDEONAME as MAP_POINT_NAME
FROM FROM
`qa-czks-regulatory`.bus_videomanager v `qa-cmt-regulatory`.bus_videomanager v
LEFT JOIN `qa-czks-regulatory`.bus_outsourced o on v.OUTSOURCED_ID = o.OUTSOURCED_ID LEFT JOIN `qa-cmt-regulatory`.bus_outsourced o on v.OUTSOURCED_ID = o.OUTSOURCED_ID
LEFT JOIN `qa-czks-prevention`.vi_user_all u on o.CREATOR = u.USER_ID LEFT JOIN `qa-cmt-prevention`.vi_user_all u on o.CREATOR = u.USER_ID
WHERE WHERE
v.ISDELETE = '0' v.ISDELETE = '0'
AND o.STATE = '1' AND o.STATE = '1'
@ -113,17 +113,17 @@
<select id="getProjectById" parameterType="pd" resultType="pd"> <select id="getProjectById" parameterType="pd" resultType="pd">
select select
f.*, f.*,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-czks-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-cmt-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-czks-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-cmt-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-czks-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-cmt-prevention`.vi_department_all t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.DEPARTMENT_ID ) ) AS DEPARTMENT_NAME,
(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
FROM FROM
`qa-czks-prevention`.OA_DEPARTMENT t `qa-cmt-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-czks-prevention`.bus_corp_info c ON c.CORPINFO_ID = t.CORPINFO_ID LEFT JOIN `qa-cmt-prevention`.bus_corp_info c ON c.CORPINFO_ID = t.CORPINFO_ID
) t where FIND_IN_SET(t.DEPARTMENT_ID, f.JURISDICTION_UNIT)) as JURISDICTION_UNIT_NAME, ) t where FIND_IN_SET(t.DEPARTMENT_ID, f.JURISDICTION_UNIT)) as JURISDICTION_UNIT_NAME,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-czks-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.MANAGE_NAME)) as MANAGE_CORPS_NAME, (select GROUP_CONCAT(t.CORP_NAME) from `qa-cmt-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.MANAGE_NAME)) as MANAGE_CORPS_NAME,
-- isd.NAME DEPARTMENT_NAME, -- isd.NAME DEPARTMENT_NAME,
isdd.NAME MANAGER_DEPARTMENT_NAME, isdd.NAME MANAGER_DEPARTMENT_NAME,
isu.NAME USER_NAME, isu.NAME USER_NAME,
@ -134,15 +134,15 @@
b.UNITS_NAME as UNITS_NAME, b.UNITS_NAME as UNITS_NAME,
p.`NAME` as UNITS_PIC_NAME p.`NAME` as UNITS_PIC_NAME
from from
`qa-czks-regulatory`.bus_outsourced f `qa-cmt-regulatory`.bus_outsourced f
-- LEFT JOIN `qa-czks-regulatory`.SYS_DEPARTMENT isd ON isd.DEPARTMENT_ID = f.DEPARTMENT_ID -- LEFT JOIN `qa-cmt-regulatory`.SYS_DEPARTMENT isd ON isd.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-czks-regulatory`.SYS_DEPARTMENT isdd ON isdd.DEPARTMENT_ID = f.MANAGER_DEPARTMENT_ID LEFT JOIN `qa-cmt-regulatory`.SYS_DEPARTMENT isdd ON isdd.DEPARTMENT_ID = f.MANAGER_DEPARTMENT_ID
LEFT JOIN `qa-czks-regulatory`.SYS_USER isu ON isu.USER_ID = f.CONTRACT_PIC LEFT JOIN `qa-cmt-regulatory`.SYS_USER isu ON isu.USER_ID = f.CONTRACT_PIC
LEFT JOIN `qa-czks-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID LEFT JOIN `qa-cmt-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-czks-prevention`.oa_department pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID LEFT JOIN `qa-cmt-prevention`.oa_department pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-czks-prevention`.oa_department pcijd ON pcijd.DEPARTMENT_ID = f.INVOLVING_CORPS_DEPART_ID LEFT JOIN `qa-cmt-prevention`.oa_department pcijd ON pcijd.DEPARTMENT_ID = f.INVOLVING_CORPS_DEPART_ID
left join `qa-czks-regulatory`.bus_units b using (UNITS_ID) left join `qa-cmt-regulatory`.bus_units b using (UNITS_ID)
left join `qa-czks-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC left join `qa-cmt-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
where where
f.OUTSOURCED_ID = #{id} f.OUTSOURCED_ID = #{id}
</select> </select>
@ -166,11 +166,11 @@
c.CORP_NAME, c.CORP_NAME,
pv.INDEXCODE pv.INDEXCODE
from from
`qa-czks-regulatory`.BUS_VIDEOMANAGER f `qa-cmt-regulatory`.BUS_VIDEOMANAGER f
LEFT JOIN `qa-czks-regulatory`.bus_outsourced o on o.OUTSOURCED_ID = f.OUTSOURCED_ID LEFT JOIN `qa-cmt-regulatory`.bus_outsourced o on o.OUTSOURCED_ID = f.OUTSOURCED_ID
LEFT JOIN `qa-czks-prevention`.vi_user_all u on o.CREATOR = u.USER_ID LEFT JOIN `qa-cmt-prevention`.vi_user_all u on o.CREATOR = u.USER_ID
LEFT JOIN `qa-czks-prevention`.bus_corp_info c on u.CORPINFO_ID=c.CORPINFO_ID LEFT JOIN `qa-cmt-prevention`.bus_corp_info c on u.CORPINFO_ID=c.CORPINFO_ID
left join `qa-czks-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID left join `qa-cmt-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID
where where
f.VIDEOMANAGER_ID = #{id} f.VIDEOMANAGER_ID = #{id}
</select> </select>