Files
foton-wkflow-rest/src/main/resources/mapper/datas/BusProcessNameMapper.xml
T
2021-11-23 18:35:14 +08:00

55 lines
2.8 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.ydw.bat.wkflow.business_main.datas.mapper.BusProcessNameMapper">
<select id="findBusProcessNameForEnd"
resultType="com.ydw.bat.wkflow.business_main.datas.entity.BusProcessName" parameterType="String">
SELECT
BUS_PROCESS_NAME.ID,
BUS_PROCESS_NAME.PRC_ID,
BUS_PROCESS_NAME.PRC_MES,
BUS_PROCESS_NAME.OVER_TIME,
BUS_PROCESS_NAME.PRC_NUM,
BUS_PROCESS_NAME.CREAT_TIME,
BUS_PROCESS_NAME.CREAT_USER,
BUS_PROCESS_NAME.PRC_TYPE,
BUS_PROCESS_NEW.USER_ID AS CREATE_USER_NAME,
BUS_PROCESS_NAME.MES,
BUS_PROCESS_NAME.END_TIME
FROM
BUS_PROCESS_NEW
LEFT JOIN BUS_PROCESS_NAME ON BUS_PROCESS_NAME.PRC_ID = BUS_PROCESS_NEW.P_ID
WHERE
<if test="null = taskId or '' = taskId">
BUS_PROCESS_NAME.END_TIME IS NULL
AND BUS_PROCESS_NAME.OVER_TIME > now( )
AND date_add( now( ), INTERVAL 3 DAY ) > BUS_PROCESS_NAME.OVER_TIME
</if>
<if test="null != taskId and '' != taskId">
AND BUS_PROCESS_NEW.TASK_ID = #{taskId}
</if>
</select>
<select id="todoTask" resultType="com.ydw.bat.wkflow.business_main.datas.entity.BusProcessName">
SELECT DATE_FORMAT(bus_process_name.CREAT_TIME,'%Y-%m-%d %T') as creatTime,bus_process_name.CREAT_USER as creatUser
,bus_process_name.CREATE_USER_NAME as createUserName,DATE_FORMAT(bus_process_name.END_TIME,'%Y-%m-%d %T') as endTime
,bus_process_name.ID as id ,bus_process_name.MES as mes,DATE_FORMAT(bus_process_name.OVER_TIME,'%Y-%m-%d %T') as overTime
,bus_process_name.PRC_ID as prcId,bus_process_name.PRC_MES as prcMes, bus_process_new.PRC_NAME as prcName
,bus_process_name.PRC_NUM as prcNum,bus_process_name.PRC_TYPE as prcType,act_ru_task.ASSIGNEE_ as taskAssignee
,bus_process_new.TASK_ID as taskIds,bus_process_new.TASK_INFO as taskInfo
FROM act_ru_task
LEFT JOIN bus_process_name on bus_process_name.PRC_ID = act_ru_task.PROC_INST_ID_
LEFT JOIN bus_process_new on bus_process_new.TASK_ID =act_ru_task.ID_
WHERE act_ru_task.ASSIGNEE_ = #{task.userId}
<if test="null != task.prcName and '' !=task.prcName ">
and bus_process_new.PRC_NAME like concat(concat('%',#{task.prcName}),'%')
</if>
<if test="null != task.prcNum and '' !=task.prcNum ">
and bus_process_name.PRC_NUM like concat(concat('%',#{task.prcNum}),'%')
</if>
<if test="null != task.prcType and '' !=task.prcType ">
and bus_process_name.PRC_TYPE like concat(concat('%',#{task.prcNum}),'%')
</if>
</select>
</mapper>