|
|
|
@ -36,39 +36,33 @@
|
|
|
|
|
t2.id as knowledgeId,
|
|
|
|
|
t2.title as title,
|
|
|
|
|
t1.flow_type as flowType,
|
|
|
|
|
t4.sumitUserName as sumitUserName,
|
|
|
|
|
t4.submitDeptName as submitDeptName,
|
|
|
|
|
t2.knowledge_from as knowledgeFrom
|
|
|
|
|
t2.publish_dept_id as publishDeptId,
|
|
|
|
|
t2.submitted_dept_id as submittedDeptId,
|
|
|
|
|
t1.submit_user_id as submitUserId,
|
|
|
|
|
from ks_knowledge_flow_todo t1
|
|
|
|
|
left join ks_knowledge t2 on t1.knowledge_id = t2.id
|
|
|
|
|
left join ks_knowledge_info t3 on t2.info_id = t3.id
|
|
|
|
|
left join (select any_value(tt2.username) as sumitUserName,
|
|
|
|
|
any_value(tt3.dept_name) as submitDeptName,
|
|
|
|
|
flow_id
|
|
|
|
|
from ks_knowledge_flow_record tt1
|
|
|
|
|
left join ks_system_user tt2 on tt1.submit_user_id = tt2.username
|
|
|
|
|
left join ks_system_dept tt3 on tt1.submit_dept_id = tt3.dept_name
|
|
|
|
|
group by flow_id) t4 on t1.flow_id = t4.flow_id and t1.flow_id = t4.flow_id
|
|
|
|
|
<where>
|
|
|
|
|
t1.todo_user_id = #{userId}
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
where t2.title like #{title}
|
|
|
|
|
and t2.title like #{title}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="baseId != null and baseId != ''">
|
|
|
|
|
and t2.base_id = #{baseId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="publishDeptId != null and publishDeptId != ''">
|
|
|
|
|
and t2.publish_dept_id = #{publishDeptId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="submitted_dept_id != null and submitted_dept_id != ''">
|
|
|
|
|
and t2.submitted_dept_id = #{submittedDeptId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="publishDateBegin != null and publishDateBegin != ''">
|
|
|
|
|
and t3.publish_date <![CDATA[ >= ]]> #{publishDateBegin}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="publishDateEnd != null and publishDateEnd != ''">
|
|
|
|
|
and t3.publish_date <![CDATA[ <= ]]> #{publishDateEnd}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="flowType != null and flowType != ''">
|
|
|
|
|
and t1.flow_type = #{flowType}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
@ -81,39 +75,34 @@
|
|
|
|
|
t2.id as knowledgeId,
|
|
|
|
|
t2.title as title,
|
|
|
|
|
t1.flow_type as flowType,
|
|
|
|
|
t4.sumitUserName as sumitUserName,
|
|
|
|
|
t4.submitDeptName as submitDeptName,
|
|
|
|
|
t2.publish_dept_id as publishDeptId,
|
|
|
|
|
t1.submitted_dept_id as submittedDeptId,
|
|
|
|
|
t1.submit_user_id as submitUserId,
|
|
|
|
|
t2.knowledge_from as knowledgeFrom
|
|
|
|
|
from ks_knowledge_flow_record t1
|
|
|
|
|
left join ks_knowledge t2 on t1.knowledge_id = t2.id
|
|
|
|
|
left join ks_knowledge_info t3 on t2.info_id = t3.id
|
|
|
|
|
left join (select any_value(tt2.username) as sumitUserName,
|
|
|
|
|
any_value(tt3.dept_name) as submitDeptName,
|
|
|
|
|
flow_id
|
|
|
|
|
from ks_knowledge_flow_record tt1
|
|
|
|
|
left join ks_system_user tt2 on tt1.submit_user_id = tt2.username
|
|
|
|
|
left join ks_system_dept tt3 on tt1.submit_dept_id = tt3.dept_name
|
|
|
|
|
group by flow_id) t4 on t1.flow_id = t4.flow_id and t1.flow_id = t4.flow_id
|
|
|
|
|
<where>
|
|
|
|
|
t1.process_user_id = #{userId}
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
where t2.title like #{title}
|
|
|
|
|
and t2.title like #{title}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="baseId != null and baseId != ''">
|
|
|
|
|
and t2.base_id = #{baseId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="publishDeptId != null and publishDeptId != ''">
|
|
|
|
|
and t2.publish_dept_id = #{publishDeptId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="submittedDeptId != null and submittedDeptId != ''">
|
|
|
|
|
and t2.submitted_dept_id = #{submittedDeptId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="publishDateBegin != null and publishDateBegin != ''">
|
|
|
|
|
and t3.publish_date <![CDATA[ >= ]]> #{publishDateBegin}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="publishDateEnd != null and publishDateEnd != ''">
|
|
|
|
|
and t3.publish_date <![CDATA[ <= ]]> #{publishDateEnd}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="title != null and title != ''">
|
|
|
|
|
<if test="flowType != null and flowType != ''">
|
|
|
|
|
and t1.flow_type = #{flowType}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|