数据库czks 改 cmt
parent
c0245bdf3c
commit
c9ac2204df
|
@ -384,17 +384,17 @@
|
|||
FROM
|
||||
bus_hotwork_cfd f
|
||||
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 `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 `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 `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 `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 `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
|
||||
f.ISDELETE = '0'
|
||||
AND f.APPLY_STATUS >= 0
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!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">
|
||||
<insert id="saveMineral">
|
||||
INSERT INTO `qa-czks-prevention`.`work_mineral_io_record`
|
||||
INSERT INTO `qa-cmt-prevention`.`work_mineral_io_record`
|
||||
(MINERAL_RECORD_ID,
|
||||
TRUCK_NO,
|
||||
CAR_TEAM_NAME,
|
||||
|
@ -33,7 +33,7 @@
|
|||
#{OPERATTIME})
|
||||
</insert>
|
||||
<insert id="saveGrocery">
|
||||
INSERT INTO `qa-czks-prevention`.`work_grocery_io_record`
|
||||
INSERT INTO `qa-cmt-prevention`.`work_grocery_io_record`
|
||||
(GROCERY_RECORD_ID,
|
||||
TRUCK_NO,
|
||||
CAR_TEAM_NAME,
|
||||
|
@ -65,7 +65,7 @@
|
|||
</insert>
|
||||
<select id="getGroceryIORecords" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
||||
select * from
|
||||
`qa-czks-prevention`.`work_grocery_io_record` f
|
||||
`qa-cmt-prevention`.`work_grocery_io_record` f
|
||||
where 1=1
|
||||
<if test="pd.JGSJ != null and pd.JGSJ != ''">
|
||||
and f.JGSJ = #{JGSJ}
|
||||
|
@ -80,7 +80,7 @@
|
|||
</select>
|
||||
<select id="getMineralIORecords" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
||||
select * from
|
||||
`qa-czks-prevention`.`work_mineral_io_record` f
|
||||
`qa-cmt-prevention`.`work_mineral_io_record` f
|
||||
where 1=1
|
||||
<if test="pd.JGSJ != null and pd.JGSJ != ''">
|
||||
and f.JGSJ = #{JGSJ}
|
||||
|
@ -95,7 +95,7 @@
|
|||
</select>
|
||||
<update id="editGrocery" parameterType="com.zcloud.entity.PageData">
|
||||
update
|
||||
`qa-czks-prevention`.`work_grocery_io_record`
|
||||
`qa-cmt-prevention`.`work_grocery_io_record`
|
||||
set TRUCK_NO=#{TRUCK_NO},
|
||||
CAR_TEAM_NAME=#{CAR_TEAM_NAME},
|
||||
LRSJ=#{LRSJ},
|
||||
|
@ -112,7 +112,7 @@
|
|||
</update>
|
||||
<update id="editMineral" parameterType="com.zcloud.entity.PageData">
|
||||
update
|
||||
`qa-czks-prevention`.`work_mineral_io_record`
|
||||
`qa-cmt-prevention`.`work_mineral_io_record`
|
||||
set TRUCK_NO=#{TRUCK_NO},
|
||||
CAR_TEAM_NAME=#{CAR_TEAM_NAME},
|
||||
LRSJ=#{LRSJ},
|
||||
|
@ -129,7 +129,7 @@
|
|||
</update>
|
||||
<update id="removeGroceryRecordByIds" parameterType="com.zcloud.entity.PageData">
|
||||
update
|
||||
`qa-czks-prevention`.`work_grocery_io_record`
|
||||
`qa-cmt-prevention`.`work_grocery_io_record`
|
||||
set ISDELETE = #{ISDELETE ,jdbcType=INTEGER}
|
||||
where 1 = 1
|
||||
and GROCERY_RECORD_ID = #{GROCERY_RECORD_ID ,jdbcType=VARCHAR}
|
||||
|
@ -137,7 +137,7 @@
|
|||
|
||||
<update id="removeMineralRecordByIds" parameterType="com.zcloud.entity.PageData">
|
||||
update
|
||||
`qa-czks-prevention`.`work_mineral_io_record`
|
||||
`qa-cmt-prevention`.`work_mineral_io_record`
|
||||
set ISDELETE = #{ISDELETE ,jdbcType=INTEGER}
|
||||
where 1 = 1
|
||||
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 = '1' then 1 end) as `quited`
|
||||
from
|
||||
`qa-czks-prevention`.`work_grocery_io_record` g
|
||||
`qa-cmt-prevention`.`work_grocery_io_record` g
|
||||
where
|
||||
g.ISDELETE = 0
|
||||
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 = '1' then 1 end) as `quited`
|
||||
from
|
||||
`qa-czks-prevention`.`work_mineral_io_record` m
|
||||
`qa-cmt-prevention`.`work_mineral_io_record` m
|
||||
where
|
||||
m.ISDELETE = 0
|
||||
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 = '0' then 0 end) - count(case when g.PASS_TYPE = '1' then 1 end) as present
|
||||
from
|
||||
`qa-czks-prevention`.`work_grocery_io_record` g
|
||||
`qa-cmt-prevention`.`work_grocery_io_record` g
|
||||
where
|
||||
g.ISDELETE = 0
|
||||
</select>
|
||||
|
@ -178,14 +178,14 @@
|
|||
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
|
||||
from
|
||||
`qa-czks-prevention`.`work_mineral_io_record` m
|
||||
`qa-cmt-prevention`.`work_mineral_io_record` m
|
||||
where
|
||||
m.ISDELETE = 0
|
||||
</select>
|
||||
|
||||
<select id="getMineralDatalistPage" resultType="pd" parameterType="com.zcloud.entity.Page">
|
||||
select *
|
||||
from `qa-czks-prevention`.`work_mineral_io_record` f
|
||||
from `qa-cmt-prevention`.`work_mineral_io_record` f
|
||||
where f.ISDELETE = 0
|
||||
<if test="pd.GATE_MACHINE_ID!=null and pd.GATE_MACHINE_ID!='' ">
|
||||
and f.GATE_MACHINE_ID = #{pd.GATE_MACHINE_ID ,jdbcType=VARCHAR}
|
||||
|
@ -217,7 +217,7 @@
|
|||
</select>
|
||||
<select id="getGroceryDatalistPage" resultType="pd" parameterType="com.zcloud.entity.Page">
|
||||
select *
|
||||
from `qa-czks-prevention`.`work_grocery_io_record` f
|
||||
from `qa-cmt-prevention`.`work_grocery_io_record` f
|
||||
where f.ISDELETE = 0
|
||||
<if test="pd.GATE_MACHINE_ID!=null and pd.GATE_MACHINE_ID!='' ">
|
||||
and f.GATE_MACHINE_ID = #{pd.GATE_MACHINE_ID ,jdbcType=VARCHAR}
|
||||
|
|
|
@ -159,7 +159,7 @@
|
|||
pv.INDEXCODE
|
||||
from
|
||||
<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'
|
||||
<if test="pd.GATE_AREA_ID != null and pd.GATE_AREA_ID != ''"><!-- 关键词检索 -->
|
||||
and f.GATE_AREA_ID=#{pd.GATE_AREA_ID}
|
||||
|
@ -198,7 +198,7 @@
|
|||
pv.INDEXCODE
|
||||
from
|
||||
<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'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{CORPINFO_ID}
|
||||
|
|
|
@ -137,8 +137,8 @@
|
|||
sd.NAME as NAME,
|
||||
m.EQUIPMENTNAME
|
||||
FROM
|
||||
`qa-czks-regulatory`.BUS_METEOROLOGICALINFO f
|
||||
LEFT JOIN `qa-czks-regulatory`.bus_meteorological m ON m.CODE = f.CODE
|
||||
`qa-cmt-regulatory`.BUS_METEOROLOGICALINFO f
|
||||
LEFT JOIN `qa-cmt-regulatory`.bus_meteorological m ON m.CODE = f.CODE
|
||||
LEFT JOIN sys_dictionaries sd on sd.DICTIONARIES_ID = m.EQUIPMENTTYPE
|
||||
WHERE 1=1
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<select id="getSupeUser" parameterType="pd" resultType="Integer">
|
||||
SELECT count(*) as count
|
||||
FROM
|
||||
`qa-czks-regulatory`.sys_user
|
||||
`qa-cmt-regulatory`.sys_user
|
||||
where USERNAME != 'admin' and ISDELETE = '0'
|
||||
</select>
|
||||
<select id="getCorpUserCountTop10" parameterType="pd" resultType="pd">
|
||||
|
@ -294,8 +294,8 @@
|
|||
cop.CORPINFO_ID AS corpId,
|
||||
count(*) as count
|
||||
FROM
|
||||
`qa-czks-prevention`.BUS_HIDDEN h
|
||||
LEFT JOIN `qa-czks-prevention`.bus_corp_info cop
|
||||
`qa-cmt-prevention`.BUS_HIDDEN h
|
||||
LEFT JOIN `qa-cmt-prevention`.bus_corp_info cop
|
||||
ON cop.CORPINFO_ID = h.CORPINFO_ID
|
||||
WHERE
|
||||
1 = 1
|
||||
|
@ -392,7 +392,7 @@ WHERE
|
|||
u.PHONE,
|
||||
r.ROLE_ID,
|
||||
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
|
||||
and u.USERNAME != 'admin'
|
||||
and r.PARENT_ID = '1'
|
||||
|
@ -476,8 +476,8 @@ WHERE
|
|||
s.NAME as STATUS_NAME
|
||||
from
|
||||
BUS_CORP_INFO f
|
||||
left join `qa-czks-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 t on t.DICTIONARIES_ID = f.CORP_OF_TYPE
|
||||
left join `qa-cmt-prevention`.sys_dictionaries s on s.DICTIONARIES_ID = f.CORP_STATE
|
||||
where f.ISDELETE='0'
|
||||
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and f.CORP_NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
|
@ -495,7 +495,7 @@ WHERE
|
|||
and f.VILLAGE = #{DEPT_VILLAGE}
|
||||
</if>
|
||||
<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 test="CORP_NAME != null and CORP_NAME != ''">
|
||||
and f.CORP_NAME = #{CORP_NAME}
|
||||
|
@ -523,7 +523,7 @@ WHERE
|
|||
</if>
|
||||
|
||||
<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>
|
||||
</select>
|
||||
<select id="getHiddenCountByHiddenType" resultType="com.zcloud.entity.PageData">
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
pv.INDEXCODE
|
||||
from
|
||||
<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'
|
||||
<if test="pd.GATE_AREA_ID != null and pd.GATE_AREA_ID != ''"><!-- 关键词检索 -->
|
||||
and f.GATE_AREA_ID=#{pd.GATE_AREA_ID}
|
||||
|
@ -196,7 +196,7 @@
|
|||
pv.INDEXCODE
|
||||
from
|
||||
<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'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{CORPINFO_ID}
|
||||
|
|
|
@ -479,17 +479,17 @@
|
|||
FROM
|
||||
bus_hotwork_cfd f
|
||||
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 `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 `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 `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 `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 `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
|
||||
f.ISDELETE = '0'
|
||||
AND f.APPLY_STATUS >= 0
|
||||
|
@ -1000,8 +1000,8 @@
|
|||
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 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-czks-regulatory`.SYS_DEPARTMENT redept on redept.DEPARTMENT_ID = reuser.DEPARTMENT_ID
|
||||
left join `qa-cmt-regulatory`.SYS_USER reuser on reuser.USER_ID = f.USER_ID and reuser.USERNAME != 'admin'
|
||||
left join `qa-cmt-regulatory`.SYS_DEPARTMENT redept on redept.DEPARTMENT_ID = reuser.DEPARTMENT_ID
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
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 sys_user u ON u.USER_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
|
||||
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
SUM( PUNISH_COUNT ) PUNISH_COUNT,
|
||||
SUM( AMOUT_SUM ) AMOUT_SUM
|
||||
FROM
|
||||
`qa-czks-regulatory`.vi_keyproj_count
|
||||
`qa-cmt-regulatory`.vi_keyproj_count
|
||||
where 1=1
|
||||
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
|
@ -56,8 +56,8 @@
|
|||
u.CORPINFO_ID,
|
||||
o.OUTSOURCED_NAME as MAP_POINT_NAME
|
||||
FROM
|
||||
`qa-czks-regulatory`.bus_outsourced o
|
||||
LEFT JOIN `qa-czks-prevention`.vi_user_all u on o.CREATOR = u.USER_ID
|
||||
`qa-cmt-regulatory`.bus_outsourced o
|
||||
LEFT JOIN `qa-cmt-prevention`.vi_user_all u on o.CREATOR = u.USER_ID
|
||||
WHERE
|
||||
o.ISDELETE = '0'
|
||||
AND o.STATE = '1'
|
||||
|
@ -86,9 +86,9 @@
|
|||
u.CORPINFO_ID,
|
||||
v.VIDEONAME as MAP_POINT_NAME
|
||||
FROM
|
||||
`qa-czks-regulatory`.bus_videomanager v
|
||||
LEFT JOIN `qa-czks-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
|
||||
`qa-cmt-regulatory`.bus_videomanager v
|
||||
LEFT JOIN `qa-cmt-regulatory`.bus_outsourced o on v.OUTSOURCED_ID = o.OUTSOURCED_ID
|
||||
LEFT JOIN `qa-cmt-prevention`.vi_user_all u on o.CREATOR = u.USER_ID
|
||||
WHERE
|
||||
v.ISDELETE = '0'
|
||||
AND o.STATE = '1'
|
||||
|
@ -113,17 +113,17 @@
|
|||
<select id="getProjectById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
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.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-czks-prevention`.vi_department_all t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.DEPARTMENT_ID ) ) AS DEPARTMENT_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-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-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
|
||||
CONCAT( CONCAT( c.CORP_NAME, '-' ), t.NAME ) NAME ,t.DEPARTMENT_ID
|
||||
FROM
|
||||
`qa-czks-prevention`.OA_DEPARTMENT t
|
||||
LEFT JOIN `qa-czks-prevention`.bus_corp_info c ON c.CORPINFO_ID = t.CORPINFO_ID
|
||||
`qa-cmt-prevention`.OA_DEPARTMENT t
|
||||
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,
|
||||
(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,
|
||||
isdd.NAME MANAGER_DEPARTMENT_NAME,
|
||||
isu.NAME USER_NAME,
|
||||
|
@ -134,15 +134,15 @@
|
|||
b.UNITS_NAME as UNITS_NAME,
|
||||
p.`NAME` as UNITS_PIC_NAME
|
||||
from
|
||||
`qa-czks-regulatory`.bus_outsourced f
|
||||
-- LEFT JOIN `qa-czks-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-czks-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-czks-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-czks-regulatory`.bus_units b using (UNITS_ID)
|
||||
left join `qa-czks-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
|
||||
`qa-cmt-regulatory`.bus_outsourced f
|
||||
-- LEFT JOIN `qa-cmt-regulatory`.SYS_DEPARTMENT isd ON isd.DEPARTMENT_ID = f.DEPARTMENT_ID
|
||||
LEFT JOIN `qa-cmt-regulatory`.SYS_DEPARTMENT isdd ON isdd.DEPARTMENT_ID = f.MANAGER_DEPARTMENT_ID
|
||||
LEFT JOIN `qa-cmt-regulatory`.SYS_USER isu ON isu.USER_ID = f.CONTRACT_PIC
|
||||
LEFT JOIN `qa-cmt-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
|
||||
LEFT JOIN `qa-cmt-prevention`.oa_department pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
|
||||
LEFT JOIN `qa-cmt-prevention`.oa_department pcijd ON pcijd.DEPARTMENT_ID = f.INVOLVING_CORPS_DEPART_ID
|
||||
left join `qa-cmt-regulatory`.bus_units b using (UNITS_ID)
|
||||
left join `qa-cmt-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
|
||||
where
|
||||
f.OUTSOURCED_ID = #{id}
|
||||
</select>
|
||||
|
@ -166,11 +166,11 @@
|
|||
c.CORP_NAME,
|
||||
pv.INDEXCODE
|
||||
from
|
||||
`qa-czks-regulatory`.BUS_VIDEOMANAGER f
|
||||
LEFT JOIN `qa-czks-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-czks-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
|
||||
`qa-cmt-regulatory`.BUS_VIDEOMANAGER f
|
||||
LEFT JOIN `qa-cmt-regulatory`.bus_outsourced o on o.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||
LEFT JOIN `qa-cmt-prevention`.vi_user_all u on o.CREATOR = u.USER_ID
|
||||
LEFT JOIN `qa-cmt-prevention`.bus_corp_info c on u.CORPINFO_ID=c.CORPINFO_ID
|
||||
left join `qa-cmt-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID
|
||||
where
|
||||
f.VIDEOMANAGER_ID = #{id}
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue