Merge remote-tracking branch 'origin/1212-八项作业迁移' into 1212-八项作业迁移
commit
c8e4eb4972
|
@ -6,6 +6,7 @@ import com.zcloud.entity.PageData;
|
|||
import com.zcloud.service.keyProjects.OutSourcedService;
|
||||
import com.zcloud.service.keyProjects.PersonnelManagementService;
|
||||
import com.zcloud.service.keyProjects.UnitsService;
|
||||
import com.zcloud.service.keyProjects.VideoManagerService;
|
||||
import com.zcloud.service.system.DictionariesService;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
|
@ -38,6 +39,9 @@ public class AppKeyProjectsController extends BaseController {
|
|||
@Autowired
|
||||
private PersonnelManagementService personnelmanagementService;
|
||||
|
||||
@Autowired
|
||||
private VideoManagerService videomanagerService;
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
|
@ -156,4 +160,127 @@ public class AppKeyProjectsController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
/** 隐患列表 查询进行中的重点工程以及排序
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/listHiddenOutsourced")
|
||||
@ResponseBody
|
||||
public Object listHiddenOutsourced(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
String UserId = pd.getString("UserId");
|
||||
if(!StringUtils.equals("1",UserId)){
|
||||
String CORPINFO_ID = pd.getString("CORPINFO_ID");
|
||||
// -- 河港机械 河港港工 河港检测
|
||||
if(!StringUtils.equals(CORPINFO_ID,"1e6dbbe16004402f8d2c0e52afd9a676")
|
||||
&&!StringUtils.equals(CORPINFO_ID,"3a854eefa7894e06aaa1a2611bca80f6")&&
|
||||
!StringUtils.equals(CORPINFO_ID,"020578a4c1f04bc692ee25145c2efbe5")
|
||||
&&!StringUtils.equals(CORPINFO_ID,"90966974de3c4b83aca6f8fd6432d5c2")){
|
||||
pd.put("DeptId",outsourcedService.getDeptId(UserId));
|
||||
pd.put("UserId",UserId);
|
||||
|
||||
}
|
||||
}
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = outsourcedService.listHiddenOutsourced(page); //列出OutSourced列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/videomanagerList")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = videomanagerService.listApp(page); //列出VideoManager列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
/**去修改页面获取数据
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/getOutsourced")
|
||||
@ResponseBody
|
||||
public Object getOutsourced() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = outsourcedService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/** 修改工程状态
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/updateState")
|
||||
@ResponseBody
|
||||
public Object updateState() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
outsourcedService.updateState(pd); //获取同时绑定的重点工程信息如果大于1表示还有其他重点工程
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/outSouceslistPage")
|
||||
@ResponseBody
|
||||
public Object outSouceslistPage(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
String UserId = pd.getString("UserId");
|
||||
if(!StringUtils.equals("1",UserId)){
|
||||
String CORPINFO_ID = pd.getString("CORPINFO_ID");
|
||||
// -- 河港机械 河港港工 河港检测
|
||||
if(!StringUtils.equals(CORPINFO_ID,"1e6dbbe16004402f8d2c0e52afd9a676")
|
||||
&&!StringUtils.equals(CORPINFO_ID,"3a854eefa7894e06aaa1a2611bca80f6")&&
|
||||
!StringUtils.equals(CORPINFO_ID,"020578a4c1f04bc692ee25145c2efbe5")
|
||||
&&!StringUtils.equals(CORPINFO_ID,"90966974de3c4b83aca6f8fd6432d5c2")){
|
||||
pd.put("DeptId",outsourcedService.getDeptId(UserId));
|
||||
pd.put("UserId",UserId);
|
||||
|
||||
}
|
||||
}
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = outsourcedService.outSouceslistPage(page); //列出OutSourced列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -75,5 +75,20 @@ public interface OutSourcedMapper{
|
|||
PageData jieshuOutSourced(PageData pd);
|
||||
|
||||
void updateState(PageData pd);
|
||||
|
||||
/** 重点工程隐患 列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> hiddenOutsourcedlistPage(Page page);
|
||||
|
||||
/**
|
||||
* 重点工程管理列表
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
List<PageData> outSouceslistPage(Page page);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -75,5 +75,7 @@ public interface VideoManagerMapper {
|
|||
void editByResourcesId(PageData pd);
|
||||
|
||||
void updateAiByOUTSOURCED_ID(PageData pd);
|
||||
|
||||
List<PageData> dataApplistPage(Page page);
|
||||
}
|
||||
|
||||
|
|
|
@ -76,5 +76,21 @@ public interface OutSourcedService{
|
|||
PageData jieshuOutSourced(PageData pd);
|
||||
|
||||
void updateState(PageData pd);
|
||||
|
||||
/** 查询隐患的重点工程列表 排序规则不一致
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listHiddenOutsourced(Page page)throws Exception;
|
||||
|
||||
/**
|
||||
* 重点工程管理列表APP
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> outSouceslistPage(Page page)throws Exception;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -73,5 +73,7 @@ public interface VideoManagerService {
|
|||
|
||||
|
||||
void updateAiByOUTSOURCED_ID(PageData pd);
|
||||
|
||||
List<PageData> listApp(Page page);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,5 +106,15 @@ public class OutSourcedServiceImpl implements OutSourcedService {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
outsourcedMapper.updateState(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listHiddenOutsourced(Page page) throws Exception {
|
||||
return outsourcedMapper.hiddenOutsourcedlistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> outSouceslistPage(Page page) throws Exception {
|
||||
return outsourcedMapper.outSouceslistPage(page);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -121,5 +121,10 @@ public class VideoManagerServiceImpl implements VideoManagerService {
|
|||
public void updateAiByOUTSOURCED_ID(PageData pd) {
|
||||
videomanagerMapper.updateAiByOUTSOURCED_ID(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listApp(Page page) {
|
||||
return videomanagerMapper.dataApplistPage(page);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1533,6 +1533,7 @@
|
|||
f.ISDELETE = '0'
|
||||
AND f.SOURCE IN ( '4', '5', '1' )
|
||||
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
|
||||
AND (bo.ISDELETE = '0' or boai.ISDELETE = '0')
|
||||
and f.ISPUNISH is null
|
||||
and (
|
||||
bo.PUNISH_THE_PERSON LIKE CONCAT( CONCAT( '%', #{loginUserId} ), '%' )
|
||||
|
@ -1554,7 +1555,21 @@
|
|||
AND f.STATE = '2'
|
||||
AND f.CREATOR = #{loginUserId}
|
||||
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
|
||||
) t)CF_COUNT
|
||||
AND (bo.ISDELETE = '0' or boai.ISDELETE = '0')
|
||||
) t)CF_COUNT,
|
||||
(SELECT
|
||||
COUNT( DISTINCT t.OUTSOURCED_ID )
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
b.OUTSOURCED_ID
|
||||
FROM
|
||||
`qa-gwj-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
|
||||
where f.ISDELETE = '0'
|
||||
and f.STATUS = 0
|
||||
|
|
|
@ -295,16 +295,13 @@
|
|||
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,
|
||||
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,
|
||||
vua.NAME OUTSOURCED_CREATOR_NAME,
|
||||
ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME,
|
||||
p.`NAME` as UNITS_PIC_NAME
|
||||
<if test="pd.UserId != null and pd.UserId !=''">
|
||||
,ifnull(dbsl.co,0) as co
|
||||
</if>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_units b using (UNITS_ID)
|
||||
|
@ -315,25 +312,7 @@
|
|||
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
|
||||
-- 这个判断是隐患管理排序以及隐患管理的角标
|
||||
<if test="pd.UserId != null and pd.UserId !=''">
|
||||
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
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND f.SOURCE IN ( '4', '5', '1' )
|
||||
AND f.STATE = '2'
|
||||
AND f.CREATOR = #{pd.UserId}
|
||||
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
|
||||
) t GROUP BY t.OUTSOURCED_ID ) dbsl on dbsl.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||
</if>
|
||||
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
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
|
@ -396,9 +375,7 @@
|
|||
)
|
||||
</if>
|
||||
ORDER BY
|
||||
<if test="pd.UserId != null and pd.UserId !=''">
|
||||
dbsl.co DESC,
|
||||
</if>
|
||||
cc.co DESC,
|
||||
f.OPERATTIME DESC
|
||||
</select>
|
||||
|
||||
|
@ -697,4 +674,231 @@
|
|||
where
|
||||
OUTSOURCED_ID = #{OUTSOURCED_ID}
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 列表 -->
|
||||
<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.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
|
||||
) 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,
|
||||
vua.NAME OUTSOURCED_CREATOR_NAME,
|
||||
ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME,
|
||||
p.`NAME` as UNITS_PIC_NAME
|
||||
,ifnull(dbsl.co,0) as co
|
||||
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 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
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND f.SOURCE IN ( '4', '5', '1' )
|
||||
AND f.STATE = '2'
|
||||
AND f.CREATOR = #{pd.UserId}
|
||||
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
|
||||
) t GROUP BY t.OUTSOURCED_ID ) dbsl on dbsl.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.CORPINFO_ID}),'%')
|
||||
or
|
||||
f.GROUP_UNIT LIKE CONCAT(CONCAT('%', #{pd.CORPINFO_ID}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
<!-- 根据需求自己加检索条件-->
|
||||
f.OUTSOURCED_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
b.UNITS_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
f.UNITS_PIC LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
pcij.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.OUTSOURCED_NAME != null and pd.OUTSOURCED_NAME !=''">
|
||||
and f.OUTSOURCED_NAME = #{pd.OUTSOURCED_NAME}
|
||||
</if>
|
||||
<if test="pd.UNITS_ID != null and pd.UNITS_ID !=''">
|
||||
and f.UNITS_ID = #{pd.UNITS_ID}
|
||||
</if>
|
||||
<if test="pd.INVOLVING_CORP != null and pd.INVOLVING_CORP !=''">
|
||||
and f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.INVOLVING_CORP}),'%')
|
||||
</if>
|
||||
<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID !=''">
|
||||
and f.DEPARTMENT_ID LIKE CONCAT(CONCAT('%', #{pd.DEPARTMENT_ID}),'%')
|
||||
</if>
|
||||
<if test="pd.COMPETENT_DEPT_ID != null and pd.COMPETENT_DEPT_ID !=''">
|
||||
and f.COMPETENT_DEPT_ID LIKE CONCAT(CONCAT('%', #{pd.COMPETENT_DEPT_ID}),'%')
|
||||
</if>
|
||||
<if test="pd.GROUP_UNIT != null and pd.GROUP_UNIT !=''">
|
||||
and f.GROUP_UNIT LIKE CONCAT(CONCAT('%', #{pd.GROUP_UNIT}),'%')
|
||||
</if>
|
||||
<if test="pd.CORP_NAME != null and pd.CORP_NAME !=''">
|
||||
and vac.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.CORP_NAME}),'%')
|
||||
</if>
|
||||
<if test="pd.STATE != null and pd.STATE !=''">
|
||||
and f.STATE = #{pd.STATE}
|
||||
</if>
|
||||
<if test="pd.CONTRACT_STIME != null and pd.CONTRACT_STIME !=''">
|
||||
and (f.CONTRACT_STIME between #{pd.CONTRACT_STIME} and #{pd.CONTRACT_ETIME}
|
||||
or f.CONTRACT_ETIME between #{pd.CONTRACT_STIME} and #{pd.CONTRACT_ETIME}
|
||||
or (f.CONTRACT_STIME < #{pd.CONTRACT_STIME} and f.CONTRACT_ETIME > #{pd.CONTRACT_ETIME}))
|
||||
</if>
|
||||
<if test="pd.DeptId != null and pd.DeptId !=''">
|
||||
and ( f.DEPARTMENT_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
|
||||
or f.COMPETENT_DEPT_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
|
||||
or f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
|
||||
or f.INVOLVING_CORPS_DEPART_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
|
||||
or f.JURISDICTION_UNIT LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
|
||||
or f.PUNISH_THE_PERSON LIKE CONCAT(CONCAT('%', #{pd.UserId}),'%')
|
||||
or f.CREATOR = #{pd.UserId}
|
||||
)
|
||||
</if>
|
||||
ORDER BY
|
||||
dbsl.co DESC,
|
||||
f.OPERATTIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<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.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
|
||||
) 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,
|
||||
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
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.CORPINFO_ID}),'%')
|
||||
or
|
||||
f.GROUP_UNIT LIKE CONCAT(CONCAT('%', #{pd.CORPINFO_ID}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
<!-- 根据需求自己加检索条件-->
|
||||
f.OUTSOURCED_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
b.UNITS_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
f.UNITS_PIC LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
pcij.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.OUTSOURCED_NAME != null and pd.OUTSOURCED_NAME !=''">
|
||||
and f.OUTSOURCED_NAME = #{pd.OUTSOURCED_NAME}
|
||||
</if>
|
||||
<if test="pd.UNITS_ID != null and pd.UNITS_ID !=''">
|
||||
and f.UNITS_ID = #{pd.UNITS_ID}
|
||||
</if>
|
||||
<if test="pd.INVOLVING_CORP != null and pd.INVOLVING_CORP !=''">
|
||||
and f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.INVOLVING_CORP}),'%')
|
||||
</if>
|
||||
<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID !=''">
|
||||
and f.DEPARTMENT_ID LIKE CONCAT(CONCAT('%', #{pd.DEPARTMENT_ID}),'%')
|
||||
</if>
|
||||
<if test="pd.COMPETENT_DEPT_ID != null and pd.COMPETENT_DEPT_ID !=''">
|
||||
and f.COMPETENT_DEPT_ID LIKE CONCAT(CONCAT('%', #{pd.COMPETENT_DEPT_ID}),'%')
|
||||
</if>
|
||||
<if test="pd.GROUP_UNIT != null and pd.GROUP_UNIT !=''">
|
||||
and f.GROUP_UNIT LIKE CONCAT(CONCAT('%', #{pd.GROUP_UNIT}),'%')
|
||||
</if>
|
||||
<if test="pd.CORP_NAME != null and pd.CORP_NAME !=''">
|
||||
and vac.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.CORP_NAME}),'%')
|
||||
</if>
|
||||
<if test="pd.STATE != null and pd.STATE !=''">
|
||||
and f.STATE = #{pd.STATE}
|
||||
</if>
|
||||
<if test="pd.CONTRACT_STIME != null and pd.CONTRACT_STIME !=''">
|
||||
and (f.CONTRACT_STIME between #{pd.CONTRACT_STIME} and #{pd.CONTRACT_ETIME}
|
||||
or f.CONTRACT_ETIME between #{pd.CONTRACT_STIME} and #{pd.CONTRACT_ETIME}
|
||||
or (f.CONTRACT_STIME < #{pd.CONTRACT_STIME} and f.CONTRACT_ETIME > #{pd.CONTRACT_ETIME}))
|
||||
</if>
|
||||
<if test="pd.DeptId != null and pd.DeptId !=''">
|
||||
and ( f.DEPARTMENT_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
|
||||
or f.COMPETENT_DEPT_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
|
||||
or f.INVOLVING_CORPS LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
|
||||
or f.INVOLVING_CORPS_DEPART_ID LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
|
||||
or f.JURISDICTION_UNIT LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
|
||||
or f.PUNISH_THE_PERSON LIKE CONCAT(CONCAT('%', #{pd.UserId}),'%')
|
||||
or f.CREATOR = #{pd.UserId}
|
||||
)
|
||||
</if>
|
||||
ORDER BY
|
||||
f.STATE,
|
||||
f.OPERATTIME DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -291,4 +291,23 @@
|
|||
where
|
||||
OUTSOURCED_ID = #{OUTSOURCED_ID}
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="dataApplistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.OUTSOURCED_ID != null and pd.OUTSOURCED_ID != ''"><!-- 关键词检索 -->
|
||||
and f.OUTSOURCED_ID=#{pd.OUTSOURCED_ID}
|
||||
</if>
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.VIDEONAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue