待办中心-查询完善。
This commit is contained in:
+119
-106
@@ -19,81 +19,102 @@
|
|||||||
|
|
||||||
<sql id="BaseQuerySql">
|
<sql id="BaseQuerySql">
|
||||||
<where>
|
<where>
|
||||||
(
|
|
||||||
pi.id IN (
|
|
||||||
SELECT
|
|
||||||
pid.process_info_id
|
|
||||||
FROM
|
|
||||||
process_info_detail pid
|
|
||||||
<where>
|
|
||||||
pid.user_id = #{params.currentUserId}
|
|
||||||
<if test="params.taskStatus != null and params.taskStatus != ''">
|
|
||||||
and pid.status = #{params.taskStatus}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
)
|
|
||||||
)
|
|
||||||
<if test="params.projectName != null and params.projectName !=''">
|
<if test="params.projectName != null and params.projectName !=''">
|
||||||
and (
|
and (
|
||||||
pni.project_name like CONCAT(CONCAT('%',#{params.projectName}),'%')
|
temp.project_name like CONCAT(CONCAT('%',#{params.projectName}),'%')
|
||||||
or pyni.year_name like CONCAT(CONCAT('%',#{params.projectName}),'%')
|
or temp.year_name like CONCAT(CONCAT('%',#{params.projectName}),'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="params.serialNumber != null and params.serialNumber !=''">
|
<if test="params.standardInfo != null and params.standardInfo !=''">
|
||||||
and (
|
and temp.standard_info like CONCAT(CONCAT('%',#{params.standardInfo}),'%')
|
||||||
pli.serial_number like CONCAT(CONCAT('%',#{params.serialNumber}),'%')
|
|
||||||
)
|
|
||||||
</if>
|
</if>
|
||||||
<if test="params.flowType != null and params.flowType !=''">
|
<if test="params.flowType != null and params.flowType !=''">
|
||||||
and pi.flow_type = #{params.flowType}
|
and temp.flow_type = #{params.flowType}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.status != null and params.status !=''">
|
<if test="params.status != null and params.status !=''">
|
||||||
and pi.status = #{params.status}
|
and temp.status = #{params.status}
|
||||||
</if>
|
|
||||||
<if test="params.flowTypeList != null">
|
|
||||||
and pi.flow_type in
|
|
||||||
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="params.createBy != null and params.createBy != ''">
|
|
||||||
and pi.create_by = #{params.createBy}
|
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="queryProjectProcessPageList" resultType="com.jero.modules.todoCenter.vo.ProcessInfoVO">
|
<select id="queryProjectProcessPageList" resultType="com.jero.modules.todoCenter.vo.ProcessInfoVO">
|
||||||
SELECT
|
select temp.* from (
|
||||||
pi.id,
|
SELECT
|
||||||
pi.project_library_id,
|
pi.id,
|
||||||
pi.project_laws_inventory_id,
|
pi.project_library_id,
|
||||||
pi.buss_document_library_id,
|
pi.project_laws_inventory_id,
|
||||||
pi.acti_proc_inst_id,
|
pi.buss_document_library_id,
|
||||||
pni.project_name,
|
pi.acti_proc_inst_id,
|
||||||
pyni.year_name,
|
pni.project_name,
|
||||||
pli.serial_number,
|
pyni.year_name,
|
||||||
pli.title,
|
pli.serial_number,
|
||||||
plb.title_en,
|
pli.title,
|
||||||
pi.flow_type,
|
bdl.title_en,
|
||||||
createBy.username as "create_by",
|
<if test="params.cut == 'cn'">
|
||||||
pi.end_time,
|
concat(pli.serial_number,'、',pli.title) as standard_info,
|
||||||
(select detail.task_id from process_info_detail detail where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} order by submit_time desc limit 1) as task_id,
|
</if>
|
||||||
(select detail.task_definition_key from process_info_detail detail where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} order by submit_time desc limit 1) as task_definition_key,
|
<if test="params.cut == 'en'">
|
||||||
pi.status,
|
concat(pli.serial_number,'、',bdl.title_en) as standard_info,
|
||||||
pi.prc_num,
|
</if>
|
||||||
pi.prc_name,
|
pi.flow_type,
|
||||||
plb.project_name_id,
|
createBy.username as "create_by",
|
||||||
plb.target_market,
|
pi.end_time,
|
||||||
plb.studio_engineer
|
(
|
||||||
FROM
|
select
|
||||||
process_info pi
|
detail.task_id
|
||||||
left join project_library_base plb on plb.id = pi.project_library_id
|
from
|
||||||
left join project_name_info pni on pni.id = plb.project_name_id
|
process_info_detail detail
|
||||||
left join project_year_name_info pyni on pyni.id = plb.year_name_id
|
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} order by submit_time desc limit 1
|
||||||
left join project_laws_inventory pli on pi.project_laws_inventory_id = pli.id
|
) as task_id,
|
||||||
LEFT JOIN sys_user createBy on createBy.id = pi.create_by
|
(
|
||||||
|
select
|
||||||
|
detail.task_definition_key
|
||||||
|
from
|
||||||
|
process_info_detail detail
|
||||||
|
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} order by submit_time desc limit 1
|
||||||
|
) as task_definition_key,
|
||||||
|
pi.status,
|
||||||
|
pi.prc_num,
|
||||||
|
pi.prc_name,
|
||||||
|
plb.project_name_id,
|
||||||
|
plb.target_market,
|
||||||
|
plb.studio_engineer
|
||||||
|
FROM
|
||||||
|
process_info pi
|
||||||
|
left join project_library_base plb on plb.id = pi.project_library_id
|
||||||
|
left join project_name_info pni on pni.id = plb.project_name_id
|
||||||
|
left join project_year_name_info pyni on pyni.id = plb.year_name_id
|
||||||
|
left join project_laws_inventory pli on pi.project_laws_inventory_id = pli.id
|
||||||
|
LEFT JOIN sys_user createBy on createBy.id = pi.create_by
|
||||||
|
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
|
||||||
|
<where>
|
||||||
|
and pi.id IN (
|
||||||
|
SELECT
|
||||||
|
pid.process_info_id
|
||||||
|
FROM
|
||||||
|
process_info_detail pid
|
||||||
|
<where>
|
||||||
|
pid.user_id = #{params.currentUserId}
|
||||||
|
<if test="params.taskStatus != null and params.taskStatus != ''">
|
||||||
|
and pid.status = #{params.taskStatus}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
)
|
||||||
|
<if test="params.flowTypeList != null">
|
||||||
|
and pi.flow_type in
|
||||||
|
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="params.queryType == 'issuedProcess'">
|
||||||
|
<if test="params.createBy != null and params.createBy != ''">
|
||||||
|
and pi.create_by = #{params.createBy}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
) temp
|
||||||
<include refid="BaseQuerySql"/>
|
<include refid="BaseQuerySql"/>
|
||||||
order by pi.end_time desc
|
order by temp.end_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="queryProjectProcessTodoTaskListList" resultType="com.jero.modules.todoCenter.vo.ProcessInfoVO">
|
<select id="queryProjectProcessTodoTaskListList" resultType="com.jero.modules.todoCenter.vo.ProcessInfoVO">
|
||||||
select temp.* from (
|
select temp.* from (
|
||||||
@@ -107,12 +128,30 @@
|
|||||||
pyni.year_name,
|
pyni.year_name,
|
||||||
pli.serial_number,
|
pli.serial_number,
|
||||||
pli.title,
|
pli.title,
|
||||||
plb.title_en,
|
bdl.title_en,
|
||||||
|
<if test="params.cut == 'cn'">
|
||||||
|
concat(pli.serial_number,'、',pli.title) as standard_info,
|
||||||
|
</if>
|
||||||
|
<if test="params.cut == 'en'">
|
||||||
|
concat(pli.serial_number,'、',bdl.title_en) as standard_info,
|
||||||
|
</if>
|
||||||
pi.flow_type,
|
pi.flow_type,
|
||||||
createBy.username AS "create_by",
|
createBy.username AS "create_by",
|
||||||
pi.end_time,
|
pi.end_time,
|
||||||
(select detail.task_id from process_info_detail detail where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} and detail.`status` = 'NotDone' limit 1) as task_id,
|
(
|
||||||
(select detail.task_definition_key from process_info_detail detail where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} and detail.`status` = 'NotDone' limit 1) as task_definition_key,
|
select
|
||||||
|
detail.task_id
|
||||||
|
from
|
||||||
|
process_info_detail detail
|
||||||
|
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} and detail.`status` = 'NotDone' limit 1
|
||||||
|
) as task_id,
|
||||||
|
(
|
||||||
|
select
|
||||||
|
detail.task_definition_key
|
||||||
|
from
|
||||||
|
process_info_detail detail
|
||||||
|
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId} and detail.`status` = 'NotDone' limit 1
|
||||||
|
) as task_definition_key,
|
||||||
pi.STATUS,
|
pi.STATUS,
|
||||||
pi.prc_num,
|
pi.prc_num,
|
||||||
pi.prc_name,
|
pi.prc_name,
|
||||||
@@ -126,6 +165,7 @@
|
|||||||
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
|
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
|
||||||
LEFT JOIN project_laws_inventory pli ON pi.project_laws_inventory_id = pli.id
|
LEFT JOIN project_laws_inventory pli ON pi.project_laws_inventory_id = pli.id
|
||||||
LEFT JOIN sys_user createBy ON createBy.id = pi.create_by
|
LEFT JOIN sys_user createBy ON createBy.id = pi.create_by
|
||||||
|
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
|
||||||
where
|
where
|
||||||
(
|
(
|
||||||
pi.id IN (
|
pi.id IN (
|
||||||
@@ -133,8 +173,7 @@
|
|||||||
pid.process_info_id
|
pid.process_info_id
|
||||||
FROM
|
FROM
|
||||||
process_info_detail pid
|
process_info_detail pid
|
||||||
where
|
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
|
||||||
pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
AND pi.flow_type IN
|
AND pi.flow_type IN
|
||||||
@@ -151,11 +190,18 @@
|
|||||||
pni.project_name,
|
pni.project_name,
|
||||||
pyni.year_name,
|
pyni.year_name,
|
||||||
'--' as serial_number,
|
'--' as serial_number,
|
||||||
|
'--' as standard_info,
|
||||||
'' as title,
|
'' as title,
|
||||||
'' as title_en,
|
'' as title_en,
|
||||||
pi.flow_type,
|
pi.flow_type,
|
||||||
createBy.username AS "create_by",
|
createBy.username AS "create_by",
|
||||||
(select pid.end_time from process_info_detail pid where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' order by pid.end_time asc limit 1) as end_time,
|
(
|
||||||
|
select
|
||||||
|
pid.end_time
|
||||||
|
from
|
||||||
|
process_info_detail pid
|
||||||
|
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' order by pid.end_time asc limit 1
|
||||||
|
) as end_time,
|
||||||
'' as task_id,
|
'' as task_id,
|
||||||
'' as task_definition_key,
|
'' as task_definition_key,
|
||||||
pi.STATUS,
|
pi.STATUS,
|
||||||
@@ -178,34 +224,12 @@
|
|||||||
pid.process_info_id
|
pid.process_info_id
|
||||||
FROM
|
FROM
|
||||||
process_info_detail pid
|
process_info_detail pid
|
||||||
where
|
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
|
||||||
pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
AND pi.flow_type = #{params.qdqrFlowTypeValue}
|
AND pi.flow_type = #{params.qdqrFlowTypeValue}
|
||||||
)temp
|
)temp
|
||||||
<where>
|
<include refid="BaseQuerySql"/>
|
||||||
<if test="params.projectName != null and params.projectName !=''">
|
|
||||||
and (
|
|
||||||
temp.project_name like CONCAT(CONCAT('%',#{params.projectName}),'%')
|
|
||||||
or temp.year_name like CONCAT(CONCAT('%',#{params.projectName}),'%')
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
<if test="params.serialNumber != null and params.serialNumber !=''">
|
|
||||||
and (
|
|
||||||
temp.serial_number like CONCAT(CONCAT('%',#{params.serialNumber}),'%')
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
<if test="params.flowType != null and params.flowType !=''">
|
|
||||||
and temp.flow_type = #{params.flowType}
|
|
||||||
</if>
|
|
||||||
<if test="params.status != null and params.status !=''">
|
|
||||||
and temp.status = #{params.status}
|
|
||||||
</if>
|
|
||||||
<if test="params.createBy != null and params.createBy != ''">
|
|
||||||
and temp.create_by = #{params.createBy}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
order by temp.end_time asc
|
order by temp.end_time asc
|
||||||
</select>
|
</select>
|
||||||
<select id="queryLawsAssessPageList" resultType="com.jero.modules.todoCenter.vo.ProcessInfoVO">
|
<select id="queryLawsAssessPageList" resultType="com.jero.modules.todoCenter.vo.ProcessInfoVO">
|
||||||
@@ -232,8 +256,7 @@
|
|||||||
detail.task_id
|
detail.task_id
|
||||||
from
|
from
|
||||||
process_info_detail detail
|
process_info_detail detail
|
||||||
where detail.process_info_id = pi.id
|
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId}
|
||||||
and detail.user_id = #{params.currentUserId}
|
|
||||||
<if test="params.queryType == 'todoProcess'">
|
<if test="params.queryType == 'todoProcess'">
|
||||||
and detail.`status` = #{params.taskStatus}
|
and detail.`status` = #{params.taskStatus}
|
||||||
</if>
|
</if>
|
||||||
@@ -245,8 +268,7 @@
|
|||||||
detail.task_definition_key
|
detail.task_definition_key
|
||||||
from
|
from
|
||||||
process_info_detail detail
|
process_info_detail detail
|
||||||
where detail.process_info_id = pi.id
|
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId}
|
||||||
and detail.user_id = #{params.currentUserId}
|
|
||||||
<if test="params.queryType == 'todoProcess'">
|
<if test="params.queryType == 'todoProcess'">
|
||||||
and detail.`status` = #{params.taskStatus}
|
and detail.`status` = #{params.taskStatus}
|
||||||
</if>
|
</if>
|
||||||
@@ -275,22 +297,13 @@
|
|||||||
pid.process_info_id
|
pid.process_info_id
|
||||||
FROM
|
FROM
|
||||||
process_info_detail pid
|
process_info_detail pid
|
||||||
where
|
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
|
||||||
pid.user_id = #{params.currentUserId}
|
|
||||||
and pid.status = #{params.taskStatus}
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
) temp
|
) temp
|
||||||
<where>
|
<include refid="BaseQuerySql"/>
|
||||||
<if test="params.standardInfo != null and params.standardInfo != ''">
|
|
||||||
and temp.standard_info like CONCAT(CONCAT('%',#{params.standardInfo}),'%')
|
|
||||||
</if>
|
|
||||||
<if test="params.flowType != null and params.flowType !=''">
|
|
||||||
and temp.flow_type = #{params.flowType}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
<if test="params.queryType == 'todoProcess' ">
|
<if test="params.queryType == 'todoProcess' ">
|
||||||
order by temp.end_time asc
|
order by temp.end_time asc
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
+1
@@ -237,6 +237,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
|||||||
this.setFlowTypeList(flowTypeList);
|
this.setFlowTypeList(flowTypeList);
|
||||||
params.put("flowTypeList",flowTypeList);
|
params.put("flowTypeList",flowTypeList);
|
||||||
params.put("currentUserId",currentUser.getId());
|
params.put("currentUserId",currentUser.getId());
|
||||||
|
params.put("queryType","issuedProcess");
|
||||||
|
|
||||||
IPage page = new Page(pageNo, pageSize);
|
IPage page = new Page(pageNo, pageSize);
|
||||||
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessPageList(page,params);
|
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessPageList(page,params);
|
||||||
|
|||||||
Reference in New Issue
Block a user