fix:使用的库不准确的问题

pull/14/head
dearlin 2023-12-28 21:34:59 +08:00
parent b2733dd3d1
commit 0e778fd1d9
12 changed files with 220 additions and 226 deletions

View File

@ -55,7 +55,7 @@ public class DockingAspect {
return parseProceed;
}
// 数据同步
dataSync(parseProceed, joinPoint);
proceed = dataSync(parseProceed, joinPoint);
return proceed;
} catch (Exception e) {
throw e;
@ -148,7 +148,7 @@ public class DockingAspect {
// return proceed;
}
private void dataSync(HashMap<String, String> proceed, ProceedingJoinPoint joinPoint) throws Exception {
private Object dataSync(HashMap<String, String> proceed, ProceedingJoinPoint joinPoint) throws Exception {
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
Method method = joinPoint.getTarget().getClass().getDeclaredMethod(signature.getName(), signature.getParameterTypes());
DockAnnotation annotation = method.getAnnotation(DockAnnotation.class);
@ -202,6 +202,7 @@ public class DockingAspect {
}
System.out.println("------------------------切面方法结束------------------------");
return proceed;
}
@PostConstruct

View File

@ -124,6 +124,7 @@ public class VideoResourcesController extends BaseController {
PageData pd = this.getPageData();
videoResourcesService.edit(pd);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
return map;
}

View File

@ -68,18 +68,11 @@ public class AppKeyprojectCheckController extends BaseController {
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("ISDELETE", 0); //是否删除
pd.put("SOURCE", 2); //企业2
PageData parm1 = new PageData();
ArrayList<PageData> parm2List = new ArrayList<>();
ArrayList<PageData> parm3List = new ArrayList<>();
// parm1.putAll(pd);
ArrayList<PageData> checkInfoDataList = new ArrayList<>();
keyprojectcheckService.save(pd);
KEYPROJECTCHECK.putAll(pd);
String currentTime = DateUtil.date2Str(new Date());
List<PageData> hiddenList = new ArrayList<PageData>();
if (Tools.notEmpty(pd.getString("SITUATIONJSON"))) {
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("SITUATIONJSON"));
String time = currentTime;
@ -94,15 +87,13 @@ public class AppKeyprojectCheckController extends BaseController {
situationPd.put("OPERATOR", pd.getString("OPERATOR")); //修改人
situationPd.put("OPERATTIME", time); //修改时间
keyprojectcheckInfoService.save(situationPd);
parm2List.add(situationPd);
checkInfoDataList.add(situationPd);
time = DateUtil.calculateDateSecond(time, 1);
}
pd.put("KEYPROJECTCHECKINFO",parm2List);
}
Boolean boo = false; // 增加开关控制
if (Tools.notEmpty(pd.getString("HIDDENJSON"))) {
boo = true;
List<PageData> hiddenList = new ArrayList<PageData>();
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("HIDDENJSON"));
String time = currentTime;
for (JSONObject json : list) {
@ -130,15 +121,11 @@ public class AppKeyprojectCheckController extends BaseController {
hidden.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //企业ID
hidden.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
hidden.put("POSITIONDESC",json.getString("POSITIONDESC"));// 隐患位置描述
keyprojectHiddenService.save(hidden);
// parm3List.add(hidden);
hiddenList.add(hidden);
time = DateUtil.calculateDateSecond(time, 1);
}
pd.put("HIDDEN", JSON.toJSONString(hiddenList));
}
try {
//这里发送短信 通知 先判断重点工程是否要求发短信, 不发直接过,发的话 找到对应人以及对应手机号 发送对应模板短信啊
@ -187,11 +174,16 @@ public class AppKeyprojectCheckController extends BaseController {
}
}
}
}catch (Exception e){
e.printStackTrace();
}finally {
map.put("pd",pd);
map.put("dockData", JSON.toJSONString(pd));
PageData dockData = new PageData();
dockData.putAll(pd);
dockData.put("checkInfoDataList", JSON.toJSONString(checkInfoDataList));
dockData.put("hiddenList", JSON.toJSONString(hiddenList));
map.put("dockData", JSON.toJSONString(dockData));
map.put("result", errInfo);
}
return map;
@ -266,8 +258,8 @@ public class AppKeyprojectCheckController extends BaseController {
List<PageData> situationList = keyprojectcheckInfoService.listAll(pd);
pd.put("FOREIGN_ID", pd.getString("KEYPROJECTCHECK_ID"));
pd.put("hiddenList", JSON.toJSONString(keyprojectHiddenService.listAllInspection(pd)));
pd.put("situationList", JSON.toJSONString(situationList));
pd.put("hiddenList", keyprojectHiddenService.listAllInspection(pd));
pd.put("situationList", situationList);
map.put("pd", pd);
map.put("result", errInfo);
return map;

View File

@ -940,17 +940,17 @@
FROM
bus_hotwork_cfd f
LEFT JOIN sys_user u1 ON u1.USER_ID = f.CONFIRM_USER_ID
LEFT JOIN `qa-gwj-regulatory`.sys_user qu1 ON qu1.USER_ID = f.CONFIRM_USER_ID
LEFT JOIN `qa-czks-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-gwj-regulatory`.sys_user qu2 ON qu2.USER_ID = f.LEADER_USER_ID
LEFT JOIN `qa-czks-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-gwj-regulatory`.sys_user qu3 ON qu3.USER_ID = f.AUDIT_USER_ID
LEFT JOIN `qa-czks-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-gwj-regulatory`.sys_user qu4 ON qu4.USER_ID = f.APPROVE_USER_ID
LEFT JOIN `qa-czks-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-gwj-regulatory`.sys_user qu5 ON qu5.USER_ID = f.MONITOR_USER_ID
LEFT JOIN `qa-czks-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-gwj-regulatory`.sys_user qu6 ON qu6.USER_ID = f.ACCEPT_USER_ID
LEFT JOIN `qa-czks-regulatory`.sys_user qu6 ON qu6.USER_ID = f.ACCEPT_USER_ID
WHERE
f.ISDELETE = '0'
AND f.APPLY_STATUS >= 0

View File

@ -148,9 +148,9 @@
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 dept1 on dept1.DEPARTMENT_ID = f.USER_ID
left join `qa-gwj-regulatory`.SYS_USER reuser on reuser.USER_ID = f.USER_ID and reuser.USERNAME != 'admin'
left join `qa-gwj-regulatory`.SYS_DEPARTMENT redept on redept.DEPARTMENT_ID = reuser.DEPARTMENT_ID
left join `qa-gwj-regulatory`.SYS_DEPARTMENT redept1 on redept1.DEPARTMENT_ID = f.USER_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-czks-regulatory`.SYS_DEPARTMENT redept1 on redept1.DEPARTMENT_ID = f.USER_ID
where f.ISDELETE = '0'
<if test="hotIds != null and hotIds.size>0"> <!-- 关键词检索 -->
and(f.FOREIGN_KEY in
@ -187,8 +187,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-gwj-regulatory`.SYS_USER reuser on reuser.USER_ID = f.USER_ID and reuser.USERNAME != 'admin'
left join `qa-gwj-regulatory`.SYS_DEPARTMENT redept on redept.DEPARTMENT_ID = reuser.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
where f.ISDELETE = '0'
<if test="hotIds != null and hotIds.size>0"><!-- 关键词检索 -->
and(f.FOREIGN_KEY in
@ -226,9 +226,9 @@
left join bus_hotworkapplicationstate s on s.STATE = f.STATE
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 `qa-gwj-regulatory`.SYS_USER reuser on reuser.USER_ID = f.USER_ID and reuser.USERNAME != 'admin'
left join `qa-czks-regulatory`.SYS_USER reuser on reuser.USER_ID = f.USER_ID and reuser.USERNAME != 'admin'
left join oa_department od on od.DEPARTMENT_ID = f.USER_ID
left join `qa-gwj-regulatory`.SYS_DEPARTMENT rd on rd.DEPARTMENT_ID = f.USER_ID
left join `qa-czks-regulatory`.SYS_DEPARTMENT rd on rd.DEPARTMENT_ID = f.USER_ID
WHERE
f.FOREIGN_KEY = #{FOREIGN_KEY}
AND f.ISDELETE = '0'
@ -340,8 +340,8 @@
left join SYS_USER u on u.DEPARTMENT_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-gwj-regulatory`.SYS_USER reuser on reuser.USER_ID = f.USER_ID and reuser.USERNAME != 'admin'
left join `qa-gwj-regulatory`.SYS_DEPARTMENT redept on redept.DEPARTMENT_ID = reuser.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
where f.ISDELETE = '0'
<if test="hotIds != null and hotIds.size>0"> <!-- 关键词检索 -->
and(f.FOREIGN_KEY in

View File

@ -9,7 +9,7 @@
<!--数据字典表名 -->
<sql id="dicTableName">
`qa-gwj-prevention`.sys_dictionaries
`qa-czks-prevention`.sys_dictionaries
</sql>
<!-- 字段 -->
<sql id="Field">
@ -295,14 +295,14 @@
p.NAME as RECTIFICATIONOR_NAME
from
<include refid="tableName"></include> f
left join `qa-gwj-prevention`.bus_hiddenregion hr on hr.HIDDENREGION_ID = f.HIDDENPART
left join `qa-czks-prevention`.bus_hiddenregion hr on hr.HIDDENREGION_ID = f.HIDDENPART
left join <include refid="dicTableName"></include> lv on f.HIDDENLEVEL = lv.BIANMA
left join <include refid="dicTableName"></include> ht on f.HIDDENTYPE = ht.BIANMA
left join <include refid="dicTableName"></include> ht2 on f.HIDDENTYPE2 = ht2.BIANMA and ht2.PARENT_ID = '18c0a9aea6e54feab9f4ab3f46e0bc86'
left join `qa-gwj-prevention`.oa_department crd on crd.DEPARTMENT_ID = f.HIDDENFINDDEPT
left join `qa-gwj-prevention`.vi_user_all cr on cr.USER_ID = f.CREATOR
left join `qa-gwj-regulatory`.BUS_UNITS u on u.UNITS_ID = f.RECTIFICATIONDEPT
left join `qa-gwj-regulatory`.BUS_PERSONNELMANAGEMENT p on p.PERSONNELMANAGEMENT_ID = f.RECTIFICATIONOR
left join `qa-czks-prevention`.oa_department crd on crd.DEPARTMENT_ID = f.HIDDENFINDDEPT
left join `qa-czks-prevention`.vi_user_all cr on cr.USER_ID = f.CREATOR
left join `qa-czks-regulatory`.BUS_UNITS u on u.UNITS_ID = f.RECTIFICATIONDEPT
left join `qa-czks-regulatory`.BUS_PERSONNELMANAGEMENT p on p.PERSONNELMANAGEMENT_ID = f.RECTIFICATIONOR
where
f.HIDDEN_ID = #{HIDDEN_ID}
</select>
@ -326,28 +326,28 @@
from
<include refid="tableName"></include> f
LEFT JOIN BUS_KEYPROJECTCHECK ch ON ch.OUTSOURCED_ID = f.FOREIGN_ID or f.FOREIGN_ID = ch.KEYPROJECTCHECK_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bo ON bo.OUTSOURCED_ID = ch.OUTSOURCED_ID <!-- 用于安全环保检查隐患的重点工程名称 -->
left join `qa-gwj-prevention`.bus_hiddenregion hr on hr.HIDDENREGION_ID = f.HIDDENPART
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED bo ON bo.OUTSOURCED_ID = ch.OUTSOURCED_ID <!-- 用于安全环保检查隐患的重点工程名称 -->
left join `qa-czks-prevention`.bus_hiddenregion hr on hr.HIDDENREGION_ID = f.HIDDENPART
left join <include refid="dicTableName"></include> lv on f.HIDDENLEVEL = lv.BIANMA
left join <include refid="dicTableName"></include> ht on f.HIDDENTYPE = ht.BIANMA
left join <include refid="dicTableName"></include> ht2 on f.HIDDENTYPE2 = ht2.BIANMA and ht2.PARENT_ID = '18c0a9aea6e54feab9f4ab3f46e0bc86'
left join `qa-gwj-prevention`.oa_department crd on crd.DEPARTMENT_ID = f.HIDDENFINDDEPT
left join `qa-gwj-prevention`.vi_user_all cr on cr.USER_ID = f.CREATOR
left join `qa-gwj-regulatory`.BUS_UNITS u on u.UNITS_ID = f.RECTIFICATIONDEPT
left join `qa-gwj-regulatory`.BUS_OUTSOURCED o on o.UNITS_ID = u.UNITS_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bod ON bod.OUTSOURCED_ID = f.FOREIGN_ID <!-- 用于AI隐患的重点工程名称 -->
left join `qa-gwj-regulatory`.BUS_PERSONNELMANAGEMENT p on p.PERSONNELMANAGEMENT_ID = f.RECTIFICATIONOR
left join `qa-czks-prevention`.oa_department crd on crd.DEPARTMENT_ID = f.HIDDENFINDDEPT
left join `qa-czks-prevention`.vi_user_all cr on cr.USER_ID = f.CREATOR
left join `qa-czks-regulatory`.BUS_UNITS u on u.UNITS_ID = f.RECTIFICATIONDEPT
left join `qa-czks-regulatory`.BUS_OUTSOURCED o on o.UNITS_ID = u.UNITS_ID
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED bod ON bod.OUTSOURCED_ID = f.FOREIGN_ID <!-- 用于AI隐患的重点工程名称 -->
left join `qa-czks-regulatory`.BUS_PERSONNELMANAGEMENT p on p.PERSONNELMANAGEMENT_ID = f.RECTIFICATIONOR
left join BUS_KEYPROJECTPUNISH pu on pu.HIDDEN_ID = f.HIDDEN_ID
<if test="pd.CREATOR != null and pd.CREATOR !=''" >
left join (
SELECT
f.HIDDEN_ID
FROM
`qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
LEFT JOIN `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH pu ON pu.HIDDEN_ID = f.HIDDEN_ID
`qa-czks-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-czks-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
LEFT JOIN `qa-czks-prevention`.BUS_KEYPROJECTPUNISH pu ON pu.HIDDEN_ID = f.HIDDEN_ID
WHERE
f.ISDELETE = '0'
AND f.SOURCE IN ( '4', '5', '1' )
@ -417,10 +417,10 @@
from
<include refid="tableName"></include> f
left join BUS_CORP_INFO c on c.CORPINFO_ID = f.CORPINFO_ID
left join `qa-gwj-regulatory`.BUS_CORPTYPE type on type.CORPTYPE_ID = c.CORP_OF_TYPE
left join `qa-gwj-prevention`.sys_dictionaries city on city.BIANMA = c.CITY
left join `qa-gwj-prevention`.sys_dictionaries country on country.BIANMA = c.COUNTRY
left join `qa-gwj-prevention`.sys_dictionaries village on village.BIANMA = c.VILLAGE
left join `qa-czks-regulatory`.BUS_CORPTYPE type on type.CORPTYPE_ID = c.CORP_OF_TYPE
left join `qa-czks-prevention`.sys_dictionaries city on city.BIANMA = c.CITY
left join `qa-czks-prevention`.sys_dictionaries country on country.BIANMA = c.COUNTRY
left join `qa-czks-prevention`.sys_dictionaries village on village.BIANMA = c.VILLAGE
left join sys_user cr on cr.USER_ID = f.CREATOR
left join sys_user re on re.USER_ID = f.RECTIFICATIONOR
@ -466,10 +466,10 @@
from
<include refid="tableName"></include> f
left join BUS_CORP_INFO c on c.CORPINFO_ID = f.CORPINFO_ID
left join `qa-gwj-regulatory`.BUS_CORPTYPE type on type.CORPTYPE_ID = c.CORP_OF_TYPE
left join `qa-gwj-prevention`.sys_dictionaries city on city.BIANMA = c.CITY
left join `qa-gwj-prevention`.sys_dictionaries country on country.BIANMA = c.COUNTRY
left join `qa-gwj-prevention`.sys_dictionaries village on village.BIANMA = c.VILLAGE
left join `qa-czks-regulatory`.BUS_CORPTYPE type on type.CORPTYPE_ID = c.CORP_OF_TYPE
left join `qa-czks-prevention`.sys_dictionaries city on city.BIANMA = c.CITY
left join `qa-czks-prevention`.sys_dictionaries country on country.BIANMA = c.COUNTRY
left join `qa-czks-prevention`.sys_dictionaries village on village.BIANMA = c.VILLAGE
left join sys_user cr on cr.USER_ID = f.CREATOR
left join sys_user re on re.USER_ID = f.RECTIFICATIONOR
@ -602,7 +602,7 @@
IFNULL( h.NUM1, 0 ) NUM1,
IFNULL( h.NUM2, 0 ) NUM2
FROM
`qa-gwj-prevention`.sys_dictionaries d
`qa-czks-prevention`.sys_dictionaries d
LEFT JOIN (
SELECT
COUNT( f.STATE = 4 OR NULL ) AS NUM1,
@ -646,10 +646,10 @@
from
<include refid="tableName"></include> f
left join BUS_CORP_INFO c on c.CORPINFO_ID = f.CORPINFO_ID
left join `qa-gwj-regulatory`.BUS_CORPTYPE type on type.CORPTYPE_ID = c.CORP_OF_TYPE
left join `qa-gwj-prevention`.sys_dictionaries city on city.BIANMA = c.CITY
left join `qa-gwj-prevention`.sys_dictionaries country on country.BIANMA = c.COUNTRY
left join `qa-gwj-prevention`.sys_dictionaries village on village.BIANMA = c.VILLAGE
left join `qa-czks-regulatory`.BUS_CORPTYPE type on type.CORPTYPE_ID = c.CORP_OF_TYPE
left join `qa-czks-prevention`.sys_dictionaries city on city.BIANMA = c.CITY
left join `qa-czks-prevention`.sys_dictionaries country on country.BIANMA = c.COUNTRY
left join `qa-czks-prevention`.sys_dictionaries village on village.BIANMA = c.VILLAGE
left join sys_user cr on cr.USER_ID = f.CREATOR
left join sys_user re on re.USER_ID = f.RECTIFICATIONOR
@ -967,11 +967,11 @@
count(CASE WHEN h.HIDDEN_ID != '' THEN 1 ELSE NULL END) as SBHD_NUM,
count(case when h.STATE=4 then 1 else null end) as ZGHD_NUM
<if test="DEPT_COUNTRY == null or DEPT_COUNTRY == ''">
from `qa-gwj-prevention`.sys_dictionaries country
from `qa-czks-prevention`.sys_dictionaries country
LEFT join bus_corp_info f on country.BIANMA = f.COUNTRY and f.ISDELETE='0'
</if>
<if test="DEPT_COUNTRY != null and DEPT_COUNTRY != ''">
from `qa-gwj-prevention`.sys_dictionaries village
from `qa-czks-prevention`.sys_dictionaries village
LEFT join bus_corp_info f on village.BIANMA = f.VILLAGE and f.ISDELETE='0'
</if>
<if test="DEPT_PROVINCE != null and DEPT_PROVINCE != ''">
@ -987,7 +987,7 @@
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-gwj-regulatory`.BUS_CORPTYPETODEPT ctod where ctod.DEPARTMENT_ID=#{DEPARTMENT_ID})
and f.CORP_OF_TYPE in (select CORPTYPE_ID from `qa-czks-regulatory`.BUS_CORPTYPETODEPT ctod where ctod.DEPARTMENT_ID=#{DEPARTMENT_ID})
</if>
left join BUS_HIDDEN h on f.CORPINFO_ID=h.CORPINFO_ID and h.ISDELETE='0'
@ -997,7 +997,7 @@
and country.PARENT_ID = #{CITY_CODE}
</if>
<if test="DEPT_COUNTRY != null and DEPT_COUNTRY != ''">
and village.PARENT_ID in (select DICTIONARIES_ID from `qa-gwj-prevention`.sys_dictionaries dic where dic.BIANMA=#{DEPT_COUNTRY})
and village.PARENT_ID in (select DICTIONARIES_ID from `qa-czks-prevention`.sys_dictionaries dic where dic.BIANMA=#{DEPT_COUNTRY})
</if>
<if test="DEPT_COUNTRY == null or DEPT_COUNTRY == ''">
@ -1132,15 +1132,15 @@
p.NAME as RECTIFICATIONOR_NAME
from
<include refid="tableName"></include> f
left join `qa-gwj-prevention`.bus_hiddenregion hr on hr.HIDDENREGION_ID = f.HIDDENPART
left join `qa-czks-prevention`.bus_hiddenregion hr on hr.HIDDENREGION_ID = f.HIDDENPART
left join <include refid="dicTableName"></include> lv on f.HIDDENLEVEL = lv.BIANMA
left join <include refid="dicTableName"></include> ht on f.HIDDENTYPE = ht.BIANMA
left join <include refid="dicTableName"></include> ht2 on f.HIDDENTYPE2 = ht2.BIANMA and ht2.PARENT_ID = '18c0a9aea6e54feab9f4ab3f46e0bc86'
left join `qa-gwj-prevention`.oa_department crd on crd.DEPARTMENT_ID = f.HIDDENFINDDEPT
left join `qa-gwj-prevention`.vi_user_all cr on cr.USER_ID = f.CREATOR
left join `qa-gwj-regulatory`.sys_user cre on cre.USER_ID = f.CREATOR
left join `qa-gwj-regulatory`.BUS_UNITS u on u.UNITS_ID = f.RECTIFICATIONDEPT
left join `qa-gwj-regulatory`.BUS_PERSONNELMANAGEMENT p on p.PERSONNELMANAGEMENT_ID = f.RECTIFICATIONOR
left join `qa-czks-prevention`.oa_department crd on crd.DEPARTMENT_ID = f.HIDDENFINDDEPT
left join `qa-czks-prevention`.vi_user_all cr on cr.USER_ID = f.CREATOR
left join `qa-czks-regulatory`.sys_user cre on cre.USER_ID = f.CREATOR
left join `qa-czks-regulatory`.BUS_UNITS u on u.UNITS_ID = f.RECTIFICATIONDEPT
left join `qa-czks-regulatory`.BUS_PERSONNELMANAGEMENT p on p.PERSONNELMANAGEMENT_ID = f.RECTIFICATIONOR
where f.ISDELETE = '0'
<if test="FOREIGN_ID != null and FOREIGN_ID !=''" >
and f.FOREIGN_ID = #{FOREIGN_ID}
@ -1525,10 +1525,10 @@
SELECT
f.HIDDEN_ID,ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) OUTSOURCED_ID
FROM
`qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
`qa-czks-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-czks-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
WHERE
f.ISDELETE = '0'
AND f.SOURCE IN ( '4', '5', '1' )
@ -1545,9 +1545,9 @@
f.HIDDEN_ID
FROM
BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
LEFT JOIN `qa-czks-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
LEFT JOIN BUS_KEYPROJECTPUNISH pu ON pu.HIDDEN_ID = f.HIDDEN_ID
WHERE
f.ISDELETE = '0'
@ -1564,19 +1564,19 @@ FROM
SELECT
b.OUTSOURCED_ID
FROM
`qa-gwj-regulatory`.BUS_OUTSOURCED b
`qa-czks-regulatory`.BUS_OUTSOURCED b
WHERE
b.ISDELETE = '0'
AND ( b.STATE = '-1' OR b.STATE = '-2' )
AND b.CREATOR = #{loginUserId}
) t) GC_COUNT
from `qa-gwj-regulatory`.bus_aiwarning f
from `qa-czks-regulatory`.bus_aiwarning f
where f.ISDELETE = '0'
and f.STATUS = 0
and VIDEOMANAGER_ID in (
select vi.VIDEOMANAGER_ID
from `qa-gwj-regulatory`.bus_aiwarning_people aip
left join `qa-gwj-regulatory`. bus_videomanager vi on vi.OUTSOURCED_ID = aip.OUTSOURCED_ID
from `qa-czks-regulatory`.bus_aiwarning_people aip
left join `qa-czks-regulatory`. bus_videomanager vi on vi.OUTSOURCED_ID = aip.OUTSOURCED_ID
where aip.AIWARNING_PEOPLE = #{loginUserId}
and aip.ISDELETE = 0
)
@ -1594,14 +1594,14 @@ FROM
vi.`NAME` as RECTIFICATIONOR_NAME,
h.*
FROM
`qa-gwj-prevention`.bus_keyproject_hidden h
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck c ON h.FOREIGN_ID = c.KEYPROJECTCHECK_ID
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectpunish p ON p.HIDDEN_ID = h.HIDDEN_ID
LEFT JOIN `qa-gwj-regulatory`.bus_units u ON h.RECTIFICATIONDEPT = u.UNITS_ID
LEFT JOIN `qa-gwj-regulatory`.bus_personnelmanagement per on per.PERSONNELMANAGEMENT_ID = p.PERSONNELMANAGEMENT_ID
LEFT JOIN `qa-gwj-prevention`.vi_user_all v ON v.USER_ID = p.CREATOR
LEFT JOIN `qa-gwj-prevention`.vi_user_all vv ON vv.USER_ID = h.PUNISH_PERSON
LEFT JOIN `qa-gwj-regulatory`.bus_personnelmanagement vi ON vi.PERSONNELMANAGEMENT_ID = h.RECTIFICATIONOR
`qa-czks-prevention`.bus_keyproject_hidden h
LEFT JOIN `qa-czks-prevention`.bus_keyprojectcheck c ON h.FOREIGN_ID = c.KEYPROJECTCHECK_ID
LEFT JOIN `qa-czks-prevention`.bus_keyprojectpunish p ON p.HIDDEN_ID = h.HIDDEN_ID
LEFT JOIN `qa-czks-regulatory`.bus_units u ON h.RECTIFICATIONDEPT = u.UNITS_ID
LEFT JOIN `qa-czks-regulatory`.bus_personnelmanagement per on per.PERSONNELMANAGEMENT_ID = p.PERSONNELMANAGEMENT_ID
LEFT JOIN `qa-czks-prevention`.vi_user_all v ON v.USER_ID = p.CREATOR
LEFT JOIN `qa-czks-prevention`.vi_user_all vv ON vv.USER_ID = h.PUNISH_PERSON
LEFT JOIN `qa-czks-regulatory`.bus_personnelmanagement vi ON vi.PERSONNELMANAGEMENT_ID = h.RECTIFICATIONOR
WHERE
h.ISDELETE = '0'
<if test="pd.HANDLED==1">
@ -1623,7 +1623,7 @@ FROM
</select>
<select id="getPUNISHTHEPERSON" parameterType="pd" resultType="string">
SELECT gc.PUNISH_THE_PERSON PUNISH_THE_PERSON FROM `qa-gwj-regulatory`.BUS_OUTSOURCED gc
SELECT gc.PUNISH_THE_PERSON PUNISH_THE_PERSON FROM `qa-czks-regulatory`.BUS_OUTSOURCED gc
WHERE gc.OUTSOURCED_ID=#{OUTSOURCED_ID}
AND gc.IS_SMS = '0'
</select>

View File

@ -46,7 +46,7 @@
<include refid="Field2"/>
from
<include refid="tableName"/> f
left join `qa-gwj-prevention`.vi_user_all vua on vua.USER_ID = #{USER_ID}
left join `qa-czks-prevention`.vi_user_all vua on vua.USER_ID = #{USER_ID}
where f.CORPINFO_ID = vua.CORPINFO_ID
</select>

View File

@ -580,7 +580,7 @@
name
</select>
<select id="listSubCorpDepartmentByParentId" parameterType="String" resultMap="departmentResultMap">
select * from `qa-gwj-regulatory`.SYS_DEPARTMENT
select * from `qa-czks-regulatory`.SYS_DEPARTMENT
where 1=1
<if test="_parameter != null and _parameter != ''"><!-- 关键词检索 -->
and PARENT_ID = #{parentId}
@ -588,7 +588,7 @@
order by DEP_ORDER asc, NAME
</select>
<select id="findByCorpDepartmentId" resultType="com.zcloud.entity.PageData">
select * from `qa-gwj-regulatory`.SYS_DEPARTMENT
select * from `qa-czks-regulatory`.SYS_DEPARTMENT
where DEPARTMENT_ID = #{DEPARTMENT_ID}
order by DEP_ORDER asc, NAME
</select>

View File

@ -343,8 +343,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select
oa.NAME as DEPTNAME,f.NAME,f.CORPINFO_ID
from
`qa-gwj-prevention`.sys_user f
left join `qa-gwj-prevention`.oa_department oa on oa.DEPARTMENT_ID = f.DEPARTMENT_ID
`qa-czks-prevention`.sys_user f
left join `qa-czks-prevention`.oa_department oa on oa.DEPARTMENT_ID = f.DEPARTMENT_ID
where
USER_ID = #{USER_ID}
@ -1124,7 +1124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select
*
from
`qa-gwj-regulatory`.SYS_USER
`qa-czks-regulatory`.SYS_USER
where USER_ID = #{USER_ID}
</select>
<select id="userlistAll" parameterType="pd" resultType="pd">
@ -1167,8 +1167,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
u.USER_ID,
u.USERNAME,
u.NAME
from `qa-gwj-regulatory`.sys_user u
left join `qa-gwj-regulatory`.SYS_ROLE r on u.ROLE_ID = r.ROLE_ID
from `qa-czks-regulatory`.sys_user u
left join `qa-czks-regulatory`.SYS_ROLE r on u.ROLE_ID = r.ROLE_ID
where u.USERNAME != 'admin' and u.ISDELETE = '0'
and r.PARENT_ID = '1'
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''"><!-- 用户部门 -->
@ -1179,7 +1179,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
u.USER_ID,
u.USERNAME,
u.NAME
from `qa-gwj-prevention`.sys_user u, `qa-gwj-prevention`.sys_role r
from `qa-czks-prevention`.sys_user u, `qa-czks-prevention`.sys_role r
where u.ROLE_ID = r.ROLE_ID
and u.USERNAME != 'admin' and u.ISDELETE = '0'
<!-- and r.PARENT_ID = '1' -->
@ -1282,7 +1282,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
PASSWORD,
DEPARTMENT_ID,
NAME
from `qa-gwj-prevention`.SYS_USER
from `qa-czks-prevention`.SYS_USER
where CORPINFO_ID = #{CORPINFO_ID}
and ISMAIN = '1'
and ISDELETE = '0'
@ -1294,8 +1294,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f.DEPARTMENT_ID,
f.USER_ID,
sd.name as punishname
from `qa-gwj-regulatory`.sys_user f
LEFT JOIN `qa-gwj-prevention`.vi_department_all sd ON sd.DEPARTMENT_ID = f.DEPARTMENT_ID
from `qa-czks-regulatory`.sys_user f
LEFT JOIN `qa-czks-prevention`.vi_department_all sd ON sd.DEPARTMENT_ID = f.DEPARTMENT_ID
<foreach item="item" index="index" collection="ids" open="WHERE" separator="or">
<if test=" item != null and item != ''">
USER_ID like CONCAT(CONCAT('%', #{item}),'%')
@ -1307,8 +1307,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
z.DEPARTMENT_ID,
z.USER_ID,
sd.name as punishname
from `qa-gwj-prevention`.sys_user z
LEFT JOIN `qa-gwj-prevention`.vi_department_all sd ON sd.DEPARTMENT_ID = z.DEPARTMENT_ID
from `qa-czks-prevention`.sys_user z
LEFT JOIN `qa-czks-prevention`.vi_department_all sd ON sd.DEPARTMENT_ID = z.DEPARTMENT_ID
<foreach item="item" index="index" collection="ids" open="WHERE" separator="or">
<if test=" item != null and item != ''">
USER_ID like CONCAT(CONCAT('%', #{item}),'%')
@ -1329,7 +1329,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</select>
<select id="getUsersInfo" resultType="com.zcloud.entity.PageData">
select * from `qa-gwj-regulatory`.SYS_USER where ISDELETE = '0'
select * from `qa-czks-regulatory`.SYS_USER where ISDELETE = '0'
<if test="USER_ID != null and USER_ID != ''">
and USER_ID = #{USER_ID}
</if>

View File

@ -476,8 +476,8 @@
,b.OPENING_TIME,b.VALIDITY_PERIOD_END,
(select f.JOBS_TYPE from `qa-prevention-xgf`.sys_special_user f where f.USER_ID = a.USER_ID order by f.CREATTIME limit 1) as JOBS_TYPE,
(select f.CERTIFICATE from `qa-prevention-xgf`.sys_special_user f where f.USER_ID = a.USER_ID order by f.CREATTIME limit 1) as CERTIFICATE
from `qa-gwj-regulatory`.bus_class_info a
left join `qa-gwj-regulatory`.bus_class_message b on a.CLASS_MESSAGE_ID = b.CLASS_MESSAGE_ID
from `qa-czks-regulatory`.bus_class_info a
left join `qa-czks-regulatory`.bus_class_message b on a.CLASS_MESSAGE_ID = b.CLASS_MESSAGE_ID
where a.ISDELETE = '0'
<if test="CLASS_MESSAGE_ID != null and CLASS_MESSAGE_ID != ''">
and a.CLASS_MESSAGE_ID = #{CLASS_MESSAGE_ID}

View File

@ -301,8 +301,8 @@
sdt.NAME as TRAINING_TYPE_NAME,
rcm.VALIDITY_PERIOD_START,
rcm.VALIDITY_PERIOD_END
from `qa-gwj-regulatory`.bus_class_info rf
left join `qa-gwj-regulatory`.bus_class_message rcm on rf.CLASS_MESSAGE_ID = rcm.CLASS_MESSAGE_ID
from `qa-czks-regulatory`.bus_class_info rf
left join `qa-czks-regulatory`.bus_class_message rcm on rf.CLASS_MESSAGE_ID = rcm.CLASS_MESSAGE_ID
left join sys_dictionaries sdp on sdp.DICTIONARIES_ID = rcm.PLACE
left join sys_dictionaries sdt on sdt.DICTIONARIES_ID = rcm.TRAINING_TYPE
where rf.USER_ID = #{USER_ID} and rf.ISDELETE = '0'

View File

@ -4,7 +4,7 @@
<!--表名 -->
<sql id="tableName">
`qa-gwj-regulatory`.BUS_OUTSOURCED
`qa-czks-regulatory`.BUS_OUTSOURCED
</sql>
<!--数据字典表名 -->
@ -237,17 +237,17 @@
<select id="findById" parameterType="pd" resultType="pd">
select
f.*,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_NAME,
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-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-gwj-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-gwj-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-gwj-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-czks-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_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-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-czks-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.MANAGE_NAME)) as MANAGE_CORPS_NAME,
(select GROUP_CONCAT(t.NAME) from (
SELECT
CONCAT( CONCAT( c.CORP_NAME, '-' ), t.NAME ) NAME ,t.DEPARTMENT_ID
FROM
`qa-gwj-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-gwj-prevention`.bus_corp_info c ON c.CORPINFO_ID = t.CORPINFO_ID
`qa-czks-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-czks-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,
-- isd.NAME DEPARTMENT_NAME,
isdd.NAME MANAGER_DEPARTMENT_NAME,
@ -260,14 +260,14 @@
p.`NAME` as UNITS_PIC_NAME
from
<include refid="tableName"></include> f
-- LEFT JOIN `qa-gwj-prevention`.vi_department_all isd ON isd.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-gwj-regulatory`.SYS_DEPARTMENT isdd ON isdd.DEPARTMENT_ID = f.MANAGER_DEPARTMENT_ID
LEFT JOIN `qa-gwj-prevention`.vi_user_all isu ON isu.USER_ID = f.CONTRACT_PIC
LEFT JOIN `qa-gwj-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-gwj-prevention`.oa_department pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-gwj-prevention`.oa_department pcijd ON pcijd.DEPARTMENT_ID = f.INVOLVING_CORPS_DEPART_ID
-- LEFT JOIN `qa-czks-prevention`.vi_department_all 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-prevention`.vi_user_all 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 bus_units b using (UNITS_ID)
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
left join `qa-czks-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
where
f.OUTSOURCED_ID = #{OUTSOURCED_ID}
and f.ISDELETE = '0'
@ -277,18 +277,18 @@
<select id="datalistPage" parameterType="page" resultType="pd">
select
f.*,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_NAME,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.MANAGE_NAME)) as MANAGE_CORPS_NAME,
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-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.CORP_NAME) from `qa-gwj-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-gwj-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-czks-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_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.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.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`.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-gwj-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-gwj-prevention`.bus_corp_info c ON c.CORPINFO_ID = t.CORPINFO_ID
`qa-czks-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-czks-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,
isdd.NAME MANAGER_DEPARTMENT_NAME,
isu.NAME USER_NAME,
@ -296,23 +296,23 @@
isu.NAME as AIWARNING_PEOPLE,
pci.NAME Q_COMPETENT_DEPT_NAME,
cc.co as CHECK_COUNT,
(select count(1) from `qa-gwj-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT,
(select count(1) from `qa-gwj-regulatory`.BUS_VIDEOMANAGER v where v.OUTSOURCED_ID = f.OUTSOURCED_ID and v.ISDELETE = '0') as VIDEO_COUNT,
(SELECT count( 1 ) FROM `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-gwj-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
(select count(1) from `qa-czks-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT,
(select count(1) from `qa-czks-regulatory`.BUS_VIDEOMANAGER v where v.OUTSOURCED_ID = f.OUTSOURCED_ID and v.ISDELETE = '0') as VIDEO_COUNT,
(SELECT count( 1 ) FROM `qa-czks-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-czks-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
vua.NAME OUTSOURCED_CREATOR_NAME,
ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME,
p.`NAME` as UNITS_PIC_NAME
from
<include refid="tableName"></include> f
left join bus_units b using (UNITS_ID)
LEFT JOIN `qa-gwj-regulatory`.SYS_DEPARTMENT isdd ON isdd.DEPARTMENT_ID = f.MANAGER_DEPARTMENT_ID
LEFT JOIN `qa-gwj-regulatory`.SYS_USER isu ON isu.USER_ID = f.CONTRACT_PIC
LEFT JOIN `qa-gwj-prevention`.oa_department pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-gwj-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-gwj-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
LEFT JOIN ( select count(c.KEYPROJECTCHECK_ID) co, c.OUTSOURCED_ID from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.ISDELETE = '0' group by c.OUTSOURCED_ID ) cc on cc.OUTSOURCED_ID = f.OUTSOURCED_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 pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-czks-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-czks-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
LEFT JOIN `qa-czks-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-czks-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
LEFT JOIN ( select count(c.KEYPROJECTCHECK_ID) co, c.OUTSOURCED_ID from `qa-czks-prevention`.BUS_KEYPROJECTCHECK c where c.ISDELETE = '0' group by c.OUTSOURCED_ID ) cc on cc.OUTSOURCED_ID = f.OUTSOURCED_ID
where f.ISDELETE = '0'
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and
@ -383,7 +383,7 @@
SELECT
DEPARTMENT_ID
FROM
`qa-gwj-prevention`.`sys_user`
`qa-czks-prevention`.`sys_user`
WHERE
ISMAIN = '0' and
`USER_ID` =#{userId}
@ -464,24 +464,24 @@
<select id="getPUNISHlistPage" parameterType="page" resultType="pd">
select
f.*,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_NAME,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.MANAGE_NAME)) as MANAGE_CORPS_NAME,
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-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-gwj-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-czks-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_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.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.NAME) from (
SELECT
CONCAT( CONCAT( c.CORP_NAME, '-' ), t.NAME ) NAME ,t.DEPARTMENT_ID
FROM
`qa-gwj-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-gwj-prevention`.bus_corp_info c ON c.CORPINFO_ID = t.CORPINFO_ID
`qa-czks-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-czks-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,
isdd.NAME MANAGER_DEPARTMENT_NAME,
isu.NAME USER_NAME,
b.UNITS_NAME as UNITS_NAME,
isu.NAME as AIWARNING_PEOPLE,
pci.NAME Q_COMPETENT_DEPT_NAME,
(select count(1) from `qa-gwj-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT,
(SELECT count( 1 ) FROM `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-gwj-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
(select count(1) from `qa-czks-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT,
(SELECT count( 1 ) FROM `qa-czks-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-czks-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
vua.NAME OUTSOURCED_CREATOR_NAME,
ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME,
p.`NAME` as UNITS_PIC_NAME
@ -489,21 +489,21 @@
from
<include refid="tableName"></include> f
left join bus_units b using (UNITS_ID)
LEFT JOIN `qa-gwj-regulatory`.SYS_DEPARTMENT isdd ON isdd.DEPARTMENT_ID = f.MANAGER_DEPARTMENT_ID
LEFT JOIN `qa-gwj-regulatory`.SYS_USER isu ON isu.USER_ID = f.CONTRACT_PIC
LEFT JOIN `qa-gwj-prevention`.oa_department pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-gwj-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-gwj-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
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 pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-czks-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-czks-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
LEFT JOIN `qa-czks-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-czks-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
left join (SELECT PUN.OUTSOURCED_ID,COUNT( distinct PUN.HIDDEN_ID) co FROM (
SELECT
f.HIDDEN_ID,ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) OUTSOURCED_ID
FROM
`qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
`qa-czks-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-czks-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
WHERE
f.ISDELETE = '0'
AND f.SOURCE IN ( '4', '5', '1' )
@ -541,14 +541,14 @@
IFNULL( FK.fk, 0 ) fk,
IFNULL( AI.ai, 0 ) ai
FROM
`qa-gwj-regulatory`.bus_outsourced o
`qa-czks-regulatory`.bus_outsourced o
<!-- 检查待确认 -->
LEFT JOIN (
SELECT
COUNT( 1 ) qr,
c.OUTSOURCED_ID
FROM
`qa-gwj-prevention`.bus_keyprojectcheck c
`qa-czks-prevention`.bus_keyprojectcheck c
WHERE
c.INSPECTION_STATUS = 0
AND c.ISDELETE = 0
@ -566,8 +566,8 @@
h.HIDDEN_ID,
IFNULL( c.OUTSOURCED_ID, h.FOREIGN_ID ) OUTSOURCED_ID
FROM
`qa-gwj-prevention`.bus_keyproject_hidden h
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck c ON h.FOREIGN_ID = c.KEYPROJECTCHECK_ID
`qa-czks-prevention`.bus_keyproject_hidden h
LEFT JOIN `qa-czks-prevention`.bus_keyprojectcheck c ON h.FOREIGN_ID = c.KEYPROJECTCHECK_ID
WHERE
h.STATE = 1
AND h.ISDELETE = 0
@ -586,8 +586,8 @@
f.HIDDEN_ID,
IFNULL( c.OUTSOURCED_ID, f.FOREIGN_ID ) OUTSOURCED_ID
FROM
`qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck c ON c.KEYPROJECTCHECK_ID = f.FOREIGN_ID
`qa-czks-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-czks-prevention`.bus_keyprojectcheck c ON c.KEYPROJECTCHECK_ID = f.FOREIGN_ID
WHERE
f.ISDELETE = '0'
AND f.SOURCE IN ( '4', '5', '1' )
@ -607,8 +607,8 @@
f.HIDDEN_ID,
IFNULL( c.OUTSOURCED_ID, f.FOREIGN_ID ) OUTSOURCED_ID
FROM
`qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck c ON c.KEYPROJECTCHECK_ID = f.FOREIGN_ID
`qa-czks-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-czks-prevention`.bus_keyprojectcheck c ON c.KEYPROJECTCHECK_ID = f.FOREIGN_ID
WHERE
f.ISDELETE = '0'
AND f.SOURCE IN ( '4', '5', '1' )
@ -628,9 +628,9 @@
p.HIDDEN_ID,
IFNULL( c.OUTSOURCED_ID, f.FOREIGN_ID ) OUTSOURCED_ID
FROM
`qa-gwj-prevention`.bus_keyprojectpunish p
LEFT JOIN `qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f on p.HIDDEN_ID = f.HIDDEN_ID
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck c ON c.KEYPROJECTCHECK_ID = f.FOREIGN_ID
`qa-czks-prevention`.bus_keyprojectpunish p
LEFT JOIN `qa-czks-prevention`.BUS_KEYPROJECT_HIDDEN f on p.HIDDEN_ID = f.HIDDEN_ID
LEFT JOIN `qa-czks-prevention`.bus_keyprojectcheck c ON c.KEYPROJECTCHECK_ID = f.FOREIGN_ID
WHERE
p.ISDELETE = '0'
AND p.HANDLED = '0'
@ -643,14 +643,14 @@
SELECT
count( 1 ) AS ai ,t.OUTSOURCED_ID
FROM
`qa-gwj-regulatory`.bus_aiwarning f
`qa-czks-regulatory`.bus_aiwarning f
LEFT JOIN (
SELECT DISTINCT
vi.VIDEOMANAGER_ID,
aip.OUTSOURCED_ID
FROM
`qa-gwj-regulatory`.bus_aiwarning_people aip
LEFT JOIN `qa-gwj-regulatory`.bus_videomanager vi ON vi.OUTSOURCED_ID = aip.OUTSOURCED_ID
`qa-czks-regulatory`.bus_aiwarning_people aip
LEFT JOIN `qa-czks-regulatory`.bus_videomanager vi ON vi.OUTSOURCED_ID = aip.OUTSOURCED_ID
WHERE
aip.ISDELETE = 0
AND vi.VIDEOMANAGER_ID IS NOT NULL
@ -680,28 +680,28 @@
<select id="hiddenOutsourcedlistPage" parameterType="page" resultType="pd">
select
f.*,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_NAME,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.MANAGE_NAME)) as MANAGE_CORPS_NAME,
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-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.CORP_NAME) from `qa-gwj-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-gwj-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-czks-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_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.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.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`.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-gwj-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-gwj-prevention`.bus_corp_info c ON c.CORPINFO_ID = t.CORPINFO_ID
`qa-czks-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-czks-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,
isdd.NAME MANAGER_DEPARTMENT_NAME,
isu.NAME USER_NAME,
b.UNITS_NAME as UNITS_NAME,
isu.NAME as AIWARNING_PEOPLE,
pci.NAME Q_COMPETENT_DEPT_NAME,
(select count(1) from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.OUTSOURCED_ID = f.OUTSOURCED_ID) as CHECK_COUNT,
(select count(1) from `qa-gwj-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT,
(select count(1) from `qa-gwj-regulatory`.BUS_VIDEOMANAGER v where v.OUTSOURCED_ID = f.OUTSOURCED_ID and v.ISDELETE = '0') as VIDEO_COUNT,
(SELECT count( 1 ) FROM `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-gwj-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
(select count(1) from `qa-czks-prevention`.BUS_KEYPROJECTCHECK c where c.OUTSOURCED_ID = f.OUTSOURCED_ID) as CHECK_COUNT,
(select count(1) from `qa-czks-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT,
(select count(1) from `qa-czks-regulatory`.BUS_VIDEOMANAGER v where v.OUTSOURCED_ID = f.OUTSOURCED_ID and v.ISDELETE = '0') as VIDEO_COUNT,
(SELECT count( 1 ) FROM `qa-czks-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-czks-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
vua.NAME OUTSOURCED_CREATOR_NAME,
ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME,
p.`NAME` as UNITS_PIC_NAME
@ -709,22 +709,22 @@
from
<include refid="tableName"></include> f
left join bus_units b using (UNITS_ID)
LEFT JOIN `qa-gwj-regulatory`.SYS_DEPARTMENT isdd ON isdd.DEPARTMENT_ID = f.MANAGER_DEPARTMENT_ID
LEFT JOIN `qa-gwj-regulatory`.SYS_USER isu ON isu.USER_ID = f.CONTRACT_PIC
LEFT JOIN `qa-gwj-prevention`.oa_department pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-gwj-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-gwj-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
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 pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-czks-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-czks-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
LEFT JOIN `qa-czks-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-czks-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
left join (SELECT t.OUTSOURCED_ID,COUNT( distinct t.HIDDEN_ID) co FROM (
SELECT
f.HIDDEN_ID,ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) OUTSOURCED_ID
FROM
`qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
LEFT JOIN `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH pu ON pu.HIDDEN_ID = f.HIDDEN_ID
`qa-czks-prevention`.BUS_KEYPROJECT_HIDDEN f
LEFT JOIN `qa-czks-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
LEFT JOIN `qa-czks-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
LEFT JOIN `qa-czks-prevention`.BUS_KEYPROJECTPUNISH pu ON pu.HIDDEN_ID = f.HIDDEN_ID
WHERE
f.ISDELETE = '0'
AND f.SOURCE IN ( '4', '5', '1' )
@ -802,40 +802,40 @@
<select id="outSouceslistPage" parameterType="page" resultType="pd">
select
f.*,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_NAME,
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.MANAGE_NAME)) as MANAGE_CORPS_NAME,
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-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.CORP_NAME) from `qa-gwj-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-gwj-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-czks-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.INVOLVING_CORPS)) as INVOLVING_CORPS_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.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.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`.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-gwj-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-gwj-prevention`.bus_corp_info c ON c.CORPINFO_ID = t.CORPINFO_ID
`qa-czks-prevention`.OA_DEPARTMENT t
LEFT JOIN `qa-czks-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,
isdd.NAME MANAGER_DEPARTMENT_NAME,
isu.NAME USER_NAME,
b.UNITS_NAME as UNITS_NAME,
isu.NAME as AIWARNING_PEOPLE,
pci.NAME Q_COMPETENT_DEPT_NAME,
(select count(1) from `qa-gwj-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT,
(select count(1) from `qa-gwj-regulatory`.BUS_VIDEOMANAGER v where v.OUTSOURCED_ID = f.OUTSOURCED_ID and v.ISDELETE = '0') as VIDEO_COUNT,
(SELECT count( 1 ) FROM `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-gwj-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
(select count(1) from `qa-czks-regulatory`.BUS_AIWARNING a left join bus_videomanager avid on avid.VIDEOMANAGER_ID = a.VIDEOMANAGER_ID where avid.OUTSOURCED_ID= f.OUTSOURCED_ID and a.ISDELETE = '0') as AI_COUNT,
(select count(1) from `qa-czks-regulatory`.BUS_VIDEOMANAGER v where v.OUTSOURCED_ID = f.OUTSOURCED_ID and v.ISDELETE = '0') as VIDEO_COUNT,
(SELECT count( 1 ) FROM `qa-czks-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-czks-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
vua.NAME OUTSOURCED_CREATOR_NAME,
ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME,
p.`NAME` as UNITS_PIC_NAME
from
<include refid="tableName"></include> f
left join bus_units b using (UNITS_ID)
LEFT JOIN `qa-gwj-regulatory`.SYS_DEPARTMENT isdd ON isdd.DEPARTMENT_ID = f.MANAGER_DEPARTMENT_ID
LEFT JOIN `qa-gwj-regulatory`.SYS_USER isu ON isu.USER_ID = f.CONTRACT_PIC
LEFT JOIN `qa-gwj-prevention`.oa_department pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-gwj-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-gwj-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
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 pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
LEFT JOIN `qa-czks-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
LEFT JOIN `qa-czks-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
LEFT JOIN `qa-czks-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-czks-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
where f.ISDELETE = '0'
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and