50 lines
2.4 KiB
XML
50 lines
2.4 KiB
XML
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
|
<!DOCTYPE mapper
|
||
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
|
<mapper namespace="com.ruoyi.system.mapper.FlowBusinessKeyMapper">
|
||
|
|
|
||
|
|
<select id="selectAllFlowTaskByParams" parameterType="com.ruoyi.system.domain.FlowTaskEntity" resultType="com.ruoyi.system.domain.FlowTaskEntity">
|
||
|
|
SELECT
|
||
|
|
fa.procInsId,
|
||
|
|
fa.deployId,
|
||
|
|
fa.createTime,
|
||
|
|
fa.finishTime,
|
||
|
|
fa.duration,
|
||
|
|
fa.procDefKey,
|
||
|
|
fa.procDefName,
|
||
|
|
fa.procDefVersion,
|
||
|
|
fa.category,
|
||
|
|
fa.businessKey,
|
||
|
|
fa.businessDeptId,
|
||
|
|
fa.businessKeyName,
|
||
|
|
fa.startUserId,
|
||
|
|
fa.startUserName,
|
||
|
|
fa.startDeptName,
|
||
|
|
fa.taskId,
|
||
|
|
fa.taskName,
|
||
|
|
fa.assigneeId,
|
||
|
|
fa.assigneeName,
|
||
|
|
fa.assigneeDeptName
|
||
|
|
FROM
|
||
|
|
vw_flow_all fa
|
||
|
|
<where>
|
||
|
|
<if test="procDefName != null and procDefName != ''"> and fa.procDefName like concat('%', #{procDefName}, '%')</if>
|
||
|
|
<if test="businessKeyName != null and businessKeyName != ''"> and fa.businessKeyName like concat('%', #{businessKeyName}, '%')</if>
|
||
|
|
<if test="category != null and category != ''"> and fa.category = #{category}</if>
|
||
|
|
<if test="params.beginDate != null and params.beginDate != '' and params.endDate != null and params.endDate != ''"> and fa.createTime between #{params.beginDate} and #{params.endDate}</if>
|
||
|
|
<!-- 查询条件-项目部门 -->
|
||
|
|
<if test="projectDeptId != null "> and fa.businesDeptId = #{projectDeptId}</if>
|
||
|
|
<!--子部门数据-->
|
||
|
|
<if test='nowRole == "4"'> and fa.businesDeptId = #{nowDept}</if>
|
||
|
|
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||
|
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fa.businesDeptId = #{nowDept}</if>
|
||
|
|
<!--普通用户查询项目人员-->
|
||
|
|
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and fa.startUserId = #{nowUser}</if>
|
||
|
|
<if test='activeName == "await"'> and fa.finishTime is null</if>
|
||
|
|
<if test='activeName == "finished"'> and fa.finishTime is not null</if>
|
||
|
|
</where>
|
||
|
|
order by fa.createTime desc
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|