1049 lines
39 KiB
XML
1049 lines
39 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.rzyc.mapper.OATaskMapper">
|
||
|
|
<resultMap id="BaseResultMap" type="com.rzyc.model.OATask">
|
||
|
|
<id column="OATaskId" jdbcType="VARCHAR" property="oataskid" />
|
||
|
|
<result column="OATaskMgrId" jdbcType="VARCHAR" property="oataskmgrid" />
|
||
|
|
<result column="TaskType" jdbcType="VARCHAR" property="tasktype" />
|
||
|
|
<result column="TaskFlow" jdbcType="VARCHAR" property="taskflow" />
|
||
|
|
<result column="TaskDepart" jdbcType="VARCHAR" property="taskdepart" />
|
||
|
|
<result column="Tasklevel" jdbcType="VARCHAR" property="tasklevel" />
|
||
|
|
<result column="TaskPerson" jdbcType="VARCHAR" property="taskperson" />
|
||
|
|
<result column="TaskViewer" jdbcType="VARCHAR" property="taskviewer" />
|
||
|
|
<result column="SysPercent" jdbcType="INTEGER" property="syspercent" />
|
||
|
|
<result column="StartDate" jdbcType="TIMESTAMP" property="startdate" />
|
||
|
|
<result column="EndDate" jdbcType="TIMESTAMP" property="enddate" />
|
||
|
|
<result column="PlanEndDate" jdbcType="TIMESTAMP" property="planenddate" />
|
||
|
|
<result column="AppStatus" jdbcType="VARCHAR" property="appstatus" />
|
||
|
|
<result column="Subject" jdbcType="VARCHAR" property="subject" />
|
||
|
|
<result column="AttachmentFlag" jdbcType="INTEGER" property="attachmentflag" />
|
||
|
|
<result column="Frequency" jdbcType="BIGINT" property="frequency" />
|
||
|
|
<result column="Priority" jdbcType="VARCHAR" property="priority" />
|
||
|
|
<result column="IsFinish" jdbcType="VARCHAR" property="isfinish" />
|
||
|
|
<result column="OALabel" jdbcType="VARCHAR" property="oalabel" />
|
||
|
|
<result column="LinkedUrl" jdbcType="VARCHAR" property="linkedurl" />
|
||
|
|
<result column="ReadBack" jdbcType="VARCHAR" property="readback" />
|
||
|
|
<result column="OTCId" jdbcType="VARCHAR" property="otcid" />
|
||
|
|
<result column="OTCType" jdbcType="VARCHAR" property="otctype" />
|
||
|
|
<result column="RedAlert" jdbcType="VARCHAR" property="redAlert" />
|
||
|
|
<result column="YellowAlert" jdbcType="VARCHAR" property="yellowAlert" />
|
||
|
|
<result column="totalFrequency" jdbcType="BIGINT" property="totalFrequency" />
|
||
|
|
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
|
||
|
|
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
|
||
|
|
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
|
||
|
|
<result column="ModifiedBy" jdbcType="VARCHAR" property="modifiedby" />
|
||
|
|
</resultMap>
|
||
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.rzyc.model.OATask">
|
||
|
|
<result column="DocBody" jdbcType="LONGVARCHAR" property="docbody" />
|
||
|
|
</resultMap>
|
||
|
|
<sql id="Example_Where_Clause">
|
||
|
|
<where>
|
||
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||
|
|
<if test="criteria.valid">
|
||
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||
|
|
<foreach collection="criteria.criteria" item="criterion">
|
||
|
|
<choose>
|
||
|
|
<when test="criterion.noValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.singleValue">
|
||
|
|
and ${criterion.condition} #{criterion.value}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.betweenValue">
|
||
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.listValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||
|
|
#{listItem}
|
||
|
|
</foreach>
|
||
|
|
</when>
|
||
|
|
</choose>
|
||
|
|
</foreach>
|
||
|
|
</trim>
|
||
|
|
</if>
|
||
|
|
</foreach>
|
||
|
|
</where>
|
||
|
|
</sql>
|
||
|
|
<sql id="Update_By_Example_Where_Clause">
|
||
|
|
<where>
|
||
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||
|
|
<if test="criteria.valid">
|
||
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||
|
|
<foreach collection="criteria.criteria" item="criterion">
|
||
|
|
<choose>
|
||
|
|
<when test="criterion.noValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.singleValue">
|
||
|
|
and ${criterion.condition} #{criterion.value}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.betweenValue">
|
||
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.listValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||
|
|
#{listItem}
|
||
|
|
</foreach>
|
||
|
|
</when>
|
||
|
|
</choose>
|
||
|
|
</foreach>
|
||
|
|
</trim>
|
||
|
|
</if>
|
||
|
|
</foreach>
|
||
|
|
</where>
|
||
|
|
</sql>
|
||
|
|
<sql id="Base_Column_List">
|
||
|
|
OATaskId, OATaskMgrId, TaskType, TaskFlow, TaskDepart, Tasklevel, TaskPerson, TaskViewer,
|
||
|
|
SysPercent, StartDate, EndDate, PlanEndDate, AppStatus, Subject, AttachmentFlag,Frequency,
|
||
|
|
Priority, IsFinish, OALabel, LinkedUrl, ReadBack, OTCId, OTCType, CreatedOn, CreatedBy,
|
||
|
|
ModifiedOn, ModifiedBy
|
||
|
|
</sql>
|
||
|
|
<sql id="Blob_Column_List">
|
||
|
|
DocBody
|
||
|
|
</sql>
|
||
|
|
<select id="selectByExampleWithBLOBs" parameterType="com.rzyc.model.OATaskExample" resultMap="ResultMapWithBLOBs">
|
||
|
|
select
|
||
|
|
<if test="distinct">
|
||
|
|
distinct
|
||
|
|
</if>
|
||
|
|
<include refid="Base_Column_List" />
|
||
|
|
,
|
||
|
|
<include refid="Blob_Column_List" />
|
||
|
|
from OATask
|
||
|
|
<if test="_parameter != null">
|
||
|
|
<include refid="Example_Where_Clause" />
|
||
|
|
</if>
|
||
|
|
<if test="orderByClause != null">
|
||
|
|
order by ${orderByClause}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
<select id="selectByExample" parameterType="com.rzyc.model.OATaskExample" resultMap="BaseResultMap">
|
||
|
|
select
|
||
|
|
<if test="distinct">
|
||
|
|
distinct
|
||
|
|
</if>
|
||
|
|
<include refid="Base_Column_List" />
|
||
|
|
from OATask
|
||
|
|
<if test="_parameter != null">
|
||
|
|
<include refid="Example_Where_Clause" />
|
||
|
|
</if>
|
||
|
|
<if test="orderByClause != null">
|
||
|
|
order by ${orderByClause}
|
||
|
|
</if>
|
||
|
|
<if test="limit != null">
|
||
|
|
<if test="offset != null">
|
||
|
|
limit ${offset}, ${limit}
|
||
|
|
</if>
|
||
|
|
<if test="offset == null">
|
||
|
|
limit ${limit}
|
||
|
|
</if>
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||
|
|
select
|
||
|
|
<include refid="Base_Column_List" />
|
||
|
|
,
|
||
|
|
<include refid="Blob_Column_List" />
|
||
|
|
from OATask
|
||
|
|
where OATaskId = #{oataskid,jdbcType=VARCHAR}
|
||
|
|
</select>
|
||
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||
|
|
delete from OATask
|
||
|
|
where OATaskId = #{oataskid,jdbcType=VARCHAR}
|
||
|
|
</delete>
|
||
|
|
<delete id="deleteByExample" parameterType="com.rzyc.model.OATaskExample">
|
||
|
|
delete from OATask
|
||
|
|
<if test="_parameter != null">
|
||
|
|
<include refid="Example_Where_Clause" />
|
||
|
|
</if>
|
||
|
|
</delete>
|
||
|
|
<insert id="insert" parameterType="com.rzyc.model.OATask">
|
||
|
|
insert into OATask (OATaskId, OATaskMgrId, TaskType,
|
||
|
|
TaskFlow, TaskDepart, Tasklevel,
|
||
|
|
TaskPerson, TaskViewer, SysPercent,
|
||
|
|
StartDate, EndDate, PlanEndDate,
|
||
|
|
AppStatus, Subject, AttachmentFlag,Frequency,
|
||
|
|
Priority, IsFinish, OALabel,
|
||
|
|
LinkedUrl, ReadBack, OTCId,del_state,
|
||
|
|
OTCType, CreatedOn, CreatedBy,
|
||
|
|
ModifiedOn, ModifiedBy, DocBody
|
||
|
|
)
|
||
|
|
values (#{oataskid,jdbcType=VARCHAR}, #{oataskmgrid,jdbcType=VARCHAR}, #{tasktype,jdbcType=VARCHAR},
|
||
|
|
#{taskflow,jdbcType=VARCHAR}, #{taskdepart,jdbcType=VARCHAR}, #{tasklevel,jdbcType=VARCHAR},
|
||
|
|
#{taskperson,jdbcType=VARCHAR}, #{taskviewer,jdbcType=VARCHAR}, #{syspercent,jdbcType=INTEGER},
|
||
|
|
#{startdate,jdbcType=TIMESTAMP}, #{enddate,jdbcType=TIMESTAMP}, #{planenddate,jdbcType=TIMESTAMP},
|
||
|
|
#{appstatus,jdbcType=VARCHAR}, #{subject,jdbcType=VARCHAR},
|
||
|
|
#{attachmentflag,jdbcType=INTEGER},
|
||
|
|
#{frequency,jdbcType=BIGINT},
|
||
|
|
#{priority,jdbcType=VARCHAR}, #{isfinish,jdbcType=VARCHAR}, #{oalabel,jdbcType=VARCHAR},
|
||
|
|
#{linkedurl,jdbcType=VARCHAR}, #{readback,jdbcType=VARCHAR},
|
||
|
|
#{otcid,jdbcType=VARCHAR},
|
||
|
|
#{delState,jdbcType=VARCHAR},
|
||
|
|
#{otctype,jdbcType=VARCHAR}, #{createdon,jdbcType=TIMESTAMP}, #{createdby,jdbcType=VARCHAR},
|
||
|
|
#{modifiedon,jdbcType=TIMESTAMP}, #{modifiedby,jdbcType=VARCHAR}, #{docbody,jdbcType=LONGVARCHAR}
|
||
|
|
)
|
||
|
|
</insert>
|
||
|
|
<insert id="insertSelective" parameterType="com.rzyc.model.OATask">
|
||
|
|
insert into OATask
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="oataskid != null">
|
||
|
|
OATaskId,
|
||
|
|
</if>
|
||
|
|
<if test="oataskmgrid != null">
|
||
|
|
OATaskMgrId,
|
||
|
|
</if>
|
||
|
|
<if test="tasktype != null">
|
||
|
|
TaskType,
|
||
|
|
</if>
|
||
|
|
<if test="taskflow != null">
|
||
|
|
TaskFlow,
|
||
|
|
</if>
|
||
|
|
<if test="taskdepart != null">
|
||
|
|
TaskDepart,
|
||
|
|
</if>
|
||
|
|
<if test="tasklevel != null">
|
||
|
|
Tasklevel,
|
||
|
|
</if>
|
||
|
|
<if test="taskperson != null">
|
||
|
|
TaskPerson,
|
||
|
|
</if>
|
||
|
|
<if test="taskviewer != null">
|
||
|
|
TaskViewer,
|
||
|
|
</if>
|
||
|
|
<if test="syspercent != null">
|
||
|
|
SysPercent,
|
||
|
|
</if>
|
||
|
|
<if test="startdate != null">
|
||
|
|
StartDate,
|
||
|
|
</if>
|
||
|
|
<if test="enddate != null">
|
||
|
|
EndDate,
|
||
|
|
</if>
|
||
|
|
<if test="planenddate != null">
|
||
|
|
PlanEndDate,
|
||
|
|
</if>
|
||
|
|
<if test="appstatus != null">
|
||
|
|
AppStatus,
|
||
|
|
</if>
|
||
|
|
<if test="subject != null">
|
||
|
|
Subject,
|
||
|
|
</if>
|
||
|
|
<if test="attachmentflag != null">
|
||
|
|
AttachmentFlag,
|
||
|
|
</if>
|
||
|
|
<if test="frequency != null">
|
||
|
|
Frequency,
|
||
|
|
</if>
|
||
|
|
<if test="priority != null">
|
||
|
|
Priority,
|
||
|
|
</if>
|
||
|
|
<if test="isfinish != null">
|
||
|
|
IsFinish,
|
||
|
|
</if>
|
||
|
|
<if test="oalabel != null">
|
||
|
|
OALabel,
|
||
|
|
</if>
|
||
|
|
<if test="linkedurl != null">
|
||
|
|
LinkedUrl,
|
||
|
|
</if>
|
||
|
|
<if test="readback != null">
|
||
|
|
ReadBack,
|
||
|
|
</if>
|
||
|
|
<if test="otcid != null">
|
||
|
|
OTCId,
|
||
|
|
</if>
|
||
|
|
<if test="otctype != null">
|
||
|
|
OTCType,
|
||
|
|
</if>
|
||
|
|
<if test="createdon != null">
|
||
|
|
CreatedOn,
|
||
|
|
</if>
|
||
|
|
<if test="createdby != null">
|
||
|
|
CreatedBy,
|
||
|
|
</if>
|
||
|
|
<if test="modifiedon != null">
|
||
|
|
ModifiedOn,
|
||
|
|
</if>
|
||
|
|
<if test="modifiedby != null">
|
||
|
|
ModifiedBy,
|
||
|
|
</if>
|
||
|
|
<if test="docbody != null">
|
||
|
|
DocBody,
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="oataskid != null">
|
||
|
|
#{oataskid,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="oataskmgrid != null">
|
||
|
|
#{oataskmgrid,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="tasktype != null">
|
||
|
|
#{tasktype,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="taskflow != null">
|
||
|
|
#{taskflow,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="taskdepart != null">
|
||
|
|
#{taskdepart,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="tasklevel != null">
|
||
|
|
#{tasklevel,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="taskperson != null">
|
||
|
|
#{taskperson,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="taskviewer != null">
|
||
|
|
#{taskviewer,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="syspercent != null">
|
||
|
|
#{syspercent,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="startdate != null">
|
||
|
|
#{startdate,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="enddate != null">
|
||
|
|
#{enddate,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="planenddate != null">
|
||
|
|
#{planenddate,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="appstatus != null">
|
||
|
|
#{appstatus,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="subject != null">
|
||
|
|
#{subject,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="attachmentflag != null">
|
||
|
|
#{attachmentflag,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="frequency != null">
|
||
|
|
#{frequency,jdbcType=BIGINT},
|
||
|
|
</if>
|
||
|
|
<if test="priority != null">
|
||
|
|
#{priority,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="isfinish != null">
|
||
|
|
#{isfinish,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="oalabel != null">
|
||
|
|
#{oalabel,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="linkedurl != null">
|
||
|
|
#{linkedurl,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="readback != null">
|
||
|
|
#{readback,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="otcid != null">
|
||
|
|
#{otcid,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="otctype != null">
|
||
|
|
#{otctype,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="createdon != null">
|
||
|
|
#{createdon,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="createdby != null">
|
||
|
|
#{createdby,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="modifiedon != null">
|
||
|
|
#{modifiedon,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="modifiedby != null">
|
||
|
|
#{modifiedby,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="docbody != null">
|
||
|
|
#{docbody,jdbcType=LONGVARCHAR},
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
<select id="countByExample" parameterType="com.rzyc.model.OATaskExample" resultType="java.lang.Long">
|
||
|
|
select count(*) from OATask
|
||
|
|
<if test="_parameter != null">
|
||
|
|
<include refid="Example_Where_Clause" />
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
<update id="updateByExampleSelective" parameterType="map">
|
||
|
|
update OATask
|
||
|
|
<set>
|
||
|
|
<if test="record.oataskid != null">
|
||
|
|
OATaskId = #{record.oataskid,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.oataskmgrid != null">
|
||
|
|
OATaskMgrId = #{record.oataskmgrid,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.tasktype != null">
|
||
|
|
TaskType = #{record.tasktype,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.taskflow != null">
|
||
|
|
TaskFlow = #{record.taskflow,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.taskdepart != null">
|
||
|
|
TaskDepart = #{record.taskdepart,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.tasklevel != null">
|
||
|
|
Tasklevel = #{record.tasklevel,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.taskperson != null">
|
||
|
|
TaskPerson = #{record.taskperson,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.taskviewer != null">
|
||
|
|
TaskViewer = #{record.taskviewer,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.syspercent != null">
|
||
|
|
SysPercent = #{record.syspercent,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="record.startdate != null">
|
||
|
|
StartDate = #{record.startdate,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="record.enddate != null">
|
||
|
|
EndDate = #{record.enddate,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="record.planenddate != null">
|
||
|
|
PlanEndDate = #{record.planenddate,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="record.appstatus != null">
|
||
|
|
AppStatus = #{record.appstatus,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.subject != null">
|
||
|
|
Subject = #{record.subject,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.attachmentflag != null">
|
||
|
|
AttachmentFlag = #{record.attachmentflag,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="record.frequency != null">
|
||
|
|
Frequency = #{record.frequency,jdbcType=BIGINT},
|
||
|
|
</if>
|
||
|
|
<if test="record.priority != null">
|
||
|
|
Priority = #{record.priority,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.isfinish != null">
|
||
|
|
IsFinish = #{record.isfinish,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.oalabel != null">
|
||
|
|
OALabel = #{record.oalabel,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.linkedurl != null">
|
||
|
|
LinkedUrl = #{record.linkedurl,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.readback != null">
|
||
|
|
ReadBack = #{record.readback,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.otcid != null">
|
||
|
|
OTCId = #{record.otcid,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.otctype != null">
|
||
|
|
OTCType = #{record.otctype,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.createdon != null">
|
||
|
|
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="record.createdby != null">
|
||
|
|
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.modifiedon != null">
|
||
|
|
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="record.modifiedby != null">
|
||
|
|
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.docbody != null">
|
||
|
|
DocBody = #{record.docbody,jdbcType=LONGVARCHAR},
|
||
|
|
</if>
|
||
|
|
</set>
|
||
|
|
<if test="_parameter != null">
|
||
|
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
|
</if>
|
||
|
|
</update>
|
||
|
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||
|
|
update OATask
|
||
|
|
set OATaskId = #{record.oataskid,jdbcType=VARCHAR},
|
||
|
|
OATaskMgrId = #{record.oataskmgrid,jdbcType=VARCHAR},
|
||
|
|
TaskType = #{record.tasktype,jdbcType=VARCHAR},
|
||
|
|
TaskFlow = #{record.taskflow,jdbcType=VARCHAR},
|
||
|
|
TaskDepart = #{record.taskdepart,jdbcType=VARCHAR},
|
||
|
|
Tasklevel = #{record.tasklevel,jdbcType=VARCHAR},
|
||
|
|
TaskPerson = #{record.taskperson,jdbcType=VARCHAR},
|
||
|
|
TaskViewer = #{record.taskviewer,jdbcType=VARCHAR},
|
||
|
|
SysPercent = #{record.syspercent,jdbcType=INTEGER},
|
||
|
|
StartDate = #{record.startdate,jdbcType=TIMESTAMP},
|
||
|
|
EndDate = #{record.enddate,jdbcType=TIMESTAMP},
|
||
|
|
PlanEndDate = #{record.planenddate,jdbcType=TIMESTAMP},
|
||
|
|
AppStatus = #{record.appstatus,jdbcType=VARCHAR},
|
||
|
|
Subject = #{record.subject,jdbcType=VARCHAR},
|
||
|
|
AttachmentFlag = #{record.attachmentflag,jdbcType=INTEGER},
|
||
|
|
Frequency = #{record.frequency,jdbcType=BIGINT},
|
||
|
|
Priority = #{record.priority,jdbcType=VARCHAR},
|
||
|
|
IsFinish = #{record.isfinish,jdbcType=VARCHAR},
|
||
|
|
OALabel = #{record.oalabel,jdbcType=VARCHAR},
|
||
|
|
LinkedUrl = #{record.linkedurl,jdbcType=VARCHAR},
|
||
|
|
ReadBack = #{record.readback,jdbcType=VARCHAR},
|
||
|
|
OTCId = #{record.otcid,jdbcType=VARCHAR},
|
||
|
|
OTCType = #{record.otctype,jdbcType=VARCHAR},
|
||
|
|
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
|
||
|
|
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
|
||
|
|
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
|
||
|
|
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
|
||
|
|
DocBody = #{record.docbody,jdbcType=LONGVARCHAR}
|
||
|
|
<if test="_parameter != null">
|
||
|
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
|
</if>
|
||
|
|
</update>
|
||
|
|
<update id="updateByExample" parameterType="map">
|
||
|
|
update OATask
|
||
|
|
set OATaskId = #{record.oataskid,jdbcType=VARCHAR},
|
||
|
|
OATaskMgrId = #{record.oataskmgrid,jdbcType=VARCHAR},
|
||
|
|
TaskType = #{record.tasktype,jdbcType=VARCHAR},
|
||
|
|
TaskFlow = #{record.taskflow,jdbcType=VARCHAR},
|
||
|
|
TaskDepart = #{record.taskdepart,jdbcType=VARCHAR},
|
||
|
|
Tasklevel = #{record.tasklevel,jdbcType=VARCHAR},
|
||
|
|
TaskPerson = #{record.taskperson,jdbcType=VARCHAR},
|
||
|
|
TaskViewer = #{record.taskviewer,jdbcType=VARCHAR},
|
||
|
|
SysPercent = #{record.syspercent,jdbcType=INTEGER},
|
||
|
|
StartDate = #{record.startdate,jdbcType=TIMESTAMP},
|
||
|
|
EndDate = #{record.enddate,jdbcType=TIMESTAMP},
|
||
|
|
PlanEndDate = #{record.planenddate,jdbcType=TIMESTAMP},
|
||
|
|
AppStatus = #{record.appstatus,jdbcType=VARCHAR},
|
||
|
|
Subject = #{record.subject,jdbcType=VARCHAR},
|
||
|
|
AttachmentFlag = #{record.attachmentflag,jdbcType=INTEGER},
|
||
|
|
Frequency = #{record.frequency,jdbcType=BIGINT},
|
||
|
|
Priority = #{record.priority,jdbcType=VARCHAR},
|
||
|
|
IsFinish = #{record.isfinish,jdbcType=VARCHAR},
|
||
|
|
OALabel = #{record.oalabel,jdbcType=VARCHAR},
|
||
|
|
LinkedUrl = #{record.linkedurl,jdbcType=VARCHAR},
|
||
|
|
ReadBack = #{record.readback,jdbcType=VARCHAR},
|
||
|
|
OTCId = #{record.otcid,jdbcType=VARCHAR},
|
||
|
|
OTCType = #{record.otctype,jdbcType=VARCHAR},
|
||
|
|
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
|
||
|
|
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
|
||
|
|
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
|
||
|
|
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR}
|
||
|
|
<if test="_parameter != null">
|
||
|
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
|
</if>
|
||
|
|
</update>
|
||
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.rzyc.model.OATask">
|
||
|
|
update OATask
|
||
|
|
<set>
|
||
|
|
<if test="oataskmgrid != null">
|
||
|
|
OATaskMgrId = #{oataskmgrid,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="tasktype != null">
|
||
|
|
TaskType = #{tasktype,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="taskflow != null">
|
||
|
|
TaskFlow = #{taskflow,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="taskdepart != null">
|
||
|
|
TaskDepart = #{taskdepart,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="tasklevel != null">
|
||
|
|
Tasklevel = #{tasklevel,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="taskperson != null">
|
||
|
|
TaskPerson = #{taskperson,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="taskviewer != null">
|
||
|
|
TaskViewer = #{taskviewer,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="syspercent != null">
|
||
|
|
SysPercent = #{syspercent,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="startdate != null">
|
||
|
|
StartDate = #{startdate,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="enddate != null">
|
||
|
|
EndDate = #{enddate,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="planenddate != null">
|
||
|
|
PlanEndDate = #{planenddate,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="appstatus != null">
|
||
|
|
AppStatus = #{appstatus,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="subject != null">
|
||
|
|
Subject = #{subject,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="attachmentflag != null">
|
||
|
|
AttachmentFlag = #{attachmentflag,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="frequency != null">
|
||
|
|
Frequency = #{frequency,jdbcType=BIGINT},
|
||
|
|
</if>
|
||
|
|
<if test="priority != null">
|
||
|
|
Priority = #{priority,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="isfinish != null">
|
||
|
|
IsFinish = #{isfinish,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="oalabel != null">
|
||
|
|
OALabel = #{oalabel,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="linkedurl != null">
|
||
|
|
LinkedUrl = #{linkedurl,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="readback != null">
|
||
|
|
ReadBack = #{readback,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="otcid != null">
|
||
|
|
OTCId = #{otcid,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="otctype != null">
|
||
|
|
OTCType = #{otctype,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="createdon != null">
|
||
|
|
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="createdby != null">
|
||
|
|
CreatedBy = #{createdby,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="modifiedon != null">
|
||
|
|
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
|
||
|
|
</if>
|
||
|
|
<if test="modifiedby != null">
|
||
|
|
ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="docbody != null">
|
||
|
|
DocBody = #{docbody,jdbcType=LONGVARCHAR},
|
||
|
|
</if>
|
||
|
|
</set>
|
||
|
|
where OATaskId = #{oataskid,jdbcType=VARCHAR}
|
||
|
|
</update>
|
||
|
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.rzyc.model.OATask">
|
||
|
|
update OATask
|
||
|
|
set OATaskMgrId = #{oataskmgrid,jdbcType=VARCHAR},
|
||
|
|
TaskType = #{tasktype,jdbcType=VARCHAR},
|
||
|
|
TaskFlow = #{taskflow,jdbcType=VARCHAR},
|
||
|
|
TaskDepart = #{taskdepart,jdbcType=VARCHAR},
|
||
|
|
Tasklevel = #{tasklevel,jdbcType=VARCHAR},
|
||
|
|
TaskPerson = #{taskperson,jdbcType=VARCHAR},
|
||
|
|
TaskViewer = #{taskviewer,jdbcType=VARCHAR},
|
||
|
|
SysPercent = #{syspercent,jdbcType=INTEGER},
|
||
|
|
StartDate = #{startdate,jdbcType=TIMESTAMP},
|
||
|
|
EndDate = #{enddate,jdbcType=TIMESTAMP},
|
||
|
|
PlanEndDate = #{planenddate,jdbcType=TIMESTAMP},
|
||
|
|
AppStatus = #{appstatus,jdbcType=VARCHAR},
|
||
|
|
Subject = #{subject,jdbcType=VARCHAR},
|
||
|
|
AttachmentFlag = #{attachmentflag,jdbcType=INTEGER},
|
||
|
|
Frequency = #{frequency,jdbcType=BIGINT},
|
||
|
|
Priority = #{priority,jdbcType=VARCHAR},
|
||
|
|
IsFinish = #{isfinish,jdbcType=VARCHAR},
|
||
|
|
OALabel = #{oalabel,jdbcType=VARCHAR},
|
||
|
|
LinkedUrl = #{linkedurl,jdbcType=VARCHAR},
|
||
|
|
ReadBack = #{readback,jdbcType=VARCHAR},
|
||
|
|
OTCId = #{otcid,jdbcType=VARCHAR},
|
||
|
|
OTCType = #{otctype,jdbcType=VARCHAR},
|
||
|
|
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
|
||
|
|
CreatedBy = #{createdby,jdbcType=VARCHAR},
|
||
|
|
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
|
||
|
|
ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
|
||
|
|
DocBody = #{docbody,jdbcType=LONGVARCHAR}
|
||
|
|
where OATaskId = #{oataskid,jdbcType=VARCHAR}
|
||
|
|
</update>
|
||
|
|
<update id="updateByPrimaryKey" parameterType="com.rzyc.model.OATask">
|
||
|
|
update OATask
|
||
|
|
set OATaskMgrId = #{oataskmgrid,jdbcType=VARCHAR},
|
||
|
|
TaskType = #{tasktype,jdbcType=VARCHAR},
|
||
|
|
TaskFlow = #{taskflow,jdbcType=VARCHAR},
|
||
|
|
TaskDepart = #{taskdepart,jdbcType=VARCHAR},
|
||
|
|
Tasklevel = #{tasklevel,jdbcType=VARCHAR},
|
||
|
|
TaskPerson = #{taskperson,jdbcType=VARCHAR},
|
||
|
|
TaskViewer = #{taskviewer,jdbcType=VARCHAR},
|
||
|
|
SysPercent = #{syspercent,jdbcType=INTEGER},
|
||
|
|
StartDate = #{startdate,jdbcType=TIMESTAMP},
|
||
|
|
EndDate = #{enddate,jdbcType=TIMESTAMP},
|
||
|
|
PlanEndDate = #{planenddate,jdbcType=TIMESTAMP},
|
||
|
|
AppStatus = #{appstatus,jdbcType=VARCHAR},
|
||
|
|
Subject = #{subject,jdbcType=VARCHAR},
|
||
|
|
AttachmentFlag = #{attachmentflag,jdbcType=INTEGER},
|
||
|
|
Frequency = #{frequency,jdbcType=INTEGER},
|
||
|
|
Priority = #{priority,jdbcType=VARCHAR},
|
||
|
|
IsFinish = #{isfinish,jdbcType=VARCHAR},
|
||
|
|
OALabel = #{oalabel,jdbcType=VARCHAR},
|
||
|
|
LinkedUrl = #{linkedurl,jdbcType=VARCHAR},
|
||
|
|
ReadBack = #{readback,jdbcType=VARCHAR},
|
||
|
|
OTCId = #{otcid,jdbcType=VARCHAR},
|
||
|
|
OTCType = #{otctype,jdbcType=VARCHAR},
|
||
|
|
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
|
||
|
|
CreatedBy = #{createdby,jdbcType=VARCHAR},
|
||
|
|
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
|
||
|
|
ModifiedBy = #{modifiedby,jdbcType=VARCHAR}
|
||
|
|
where OATaskId = #{oataskid,jdbcType=VARCHAR}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<!--任务列表-->
|
||
|
|
<resultMap id="TaskResultMap" type="com.rzyc.model.OATask">
|
||
|
|
<id column="OATaskId" jdbcType="VARCHAR" property="oataskid" />
|
||
|
|
<result column="OATaskMgrId" jdbcType="VARCHAR" property="oataskmgrid" />
|
||
|
|
<result column="TaskType" jdbcType="VARCHAR" property="tasktype" />
|
||
|
|
<result column="TaskFlow" jdbcType="VARCHAR" property="taskflow" />
|
||
|
|
<result column="TaskDepart" jdbcType="VARCHAR" property="taskdepart" />
|
||
|
|
<result column="Tasklevel" jdbcType="VARCHAR" property="tasklevel" />
|
||
|
|
<result column="TaskPerson" jdbcType="VARCHAR" property="taskperson" />
|
||
|
|
<result column="TaskViewer" jdbcType="VARCHAR" property="taskviewer" />
|
||
|
|
<result column="SysPercent" jdbcType="INTEGER" property="syspercent" />
|
||
|
|
<result column="StartDate" jdbcType="TIMESTAMP" property="startdate" />
|
||
|
|
<result column="EndDate" jdbcType="TIMESTAMP" property="enddate" />
|
||
|
|
<result column="PlanEndDate" jdbcType="TIMESTAMP" property="planenddate" />
|
||
|
|
<result column="AppStatus" jdbcType="VARCHAR" property="appstatus" />
|
||
|
|
<result column="Subject" jdbcType="VARCHAR" property="subject" />
|
||
|
|
<result column="AttachmentFlag" jdbcType="INTEGER" property="attachmentflag" />
|
||
|
|
<result column="Frequency" jdbcType="BIGINT" property="frequency" />
|
||
|
|
<result column="totalFrequency" jdbcType="BIGINT" property="totalFrequency" />
|
||
|
|
<result column="Priority" jdbcType="VARCHAR" property="priority" />
|
||
|
|
<result column="IsFinish" jdbcType="VARCHAR" property="isfinish" />
|
||
|
|
<result column="RedAlert" jdbcType="VARCHAR" property="redAlert" />
|
||
|
|
<result column="YellowAlert" jdbcType="VARCHAR" property="yellowAlert" />
|
||
|
|
<result column="OALabel" jdbcType="VARCHAR" property="oalabel" />
|
||
|
|
<result column="LinkedUrl" jdbcType="VARCHAR" property="linkedurl" />
|
||
|
|
<result column="ReadBack" jdbcType="VARCHAR" property="readback" />
|
||
|
|
<result column="OTCId" jdbcType="VARCHAR" property="otcid" />
|
||
|
|
<result column="OTCType" jdbcType="VARCHAR" property="otctype" />
|
||
|
|
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
|
||
|
|
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
|
||
|
|
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
|
||
|
|
<result column="ModifiedBy" jdbcType="VARCHAR" property="modifiedby" />
|
||
|
|
<result column="checkNum" jdbcType="BIGINT" property="checkNum" />
|
||
|
|
<result column="AppStatus" jdbcType="VARCHAR" property="appstatus" />
|
||
|
|
<result column="ChinaName" jdbcType="VARCHAR" property="sendName" />
|
||
|
|
<result column="taskStatus" jdbcType="VARCHAR" property="taskStatus" />
|
||
|
|
<result column="UnitName" jdbcType="VARCHAR" property="unitName" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<!--发布任务列表-->
|
||
|
|
<select id="sendTaskPage" resultMap="TaskResultMap">
|
||
|
|
SELECT
|
||
|
|
su.`ChinaName`,
|
||
|
|
(SELECT COUNT(*) FROM OADistribution ob WHERE ob.OATaskId = ot.OATaskId AND ob.AppStatus = '已读') checkNum,
|
||
|
|
ot.*
|
||
|
|
FROM OATask ot
|
||
|
|
left join SysUser su on su.SysUserId = ot.`CreatedBy`
|
||
|
|
WHERE ot.`TaskPerson` = #{sysUserId}
|
||
|
|
AND ot.`Subject` LIKE #{condition}
|
||
|
|
<foreach collection ="entTasks" item="entTask" index= "index" >
|
||
|
|
AND ot.TaskType != #{entTask}
|
||
|
|
</foreach>
|
||
|
|
and ot.del_state = 1
|
||
|
|
ORDER BY ot.CreatedOn DESC
|
||
|
|
LIMIT #{start},#{end};
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--发布任务总数-->
|
||
|
|
<select id="countSendTask" resultType="java.lang.Long">
|
||
|
|
SELECT
|
||
|
|
count(*)
|
||
|
|
FROM OATask ot
|
||
|
|
WHERE ot.`TaskPerson` = #{sysUserId}
|
||
|
|
AND ot.`Subject` LIKE #{condition}
|
||
|
|
<foreach collection ="entTasks" item="entTask" index= "index" >
|
||
|
|
AND ot.TaskType != #{entTask}
|
||
|
|
</foreach>
|
||
|
|
and ot.del_state = 1
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--接收任务列表-->
|
||
|
|
<select id="receiveTaskPage" resultMap="TaskResultMap">
|
||
|
|
SELECT lf.PerformClassName ChinaName,ob.`AppStatus` taskStatus,
|
||
|
|
lt.RedAlert,lt.YellowAlert,
|
||
|
|
lt.Frequency totalFrequency,ot.*
|
||
|
|
FROM OATask ot
|
||
|
|
LEFT JOIN OADistribution ob ON ob.`OATaskId` = ot.`OATaskId`
|
||
|
|
LEFT JOIN SysUser su ON su.`SysUserId` = ot.`TaskPerson`
|
||
|
|
left join ListPerform lf on su.SysTitle = lf.ListPerformId
|
||
|
|
left join ListFactor lt on ot.OTCId = lt.listFactorId
|
||
|
|
WHERE ot.`Subject` LIKE '%%'
|
||
|
|
and ot.del_state = 1
|
||
|
|
<if test="null != tasktype and '' != tasktype " >
|
||
|
|
<if test=" '履职任务' == tasktype">
|
||
|
|
AND (ot.TaskType is null or ot.TaskType = '履职任务')
|
||
|
|
AND ot.StartDate <= #{startTime}
|
||
|
|
AND (ot.IsFinish IS NULL OR ot.IsFinish = '否')
|
||
|
|
and lt.del_state = 1
|
||
|
|
</if>
|
||
|
|
<if test=" '履职任务' != tasktype">
|
||
|
|
AND ot.TaskType = #{tasktype}
|
||
|
|
</if>
|
||
|
|
</if>
|
||
|
|
AND (ob.`SysUserId` IN (
|
||
|
|
<foreach collection ="sysUserIds" item="sysUserId" index= "index" separator =",">
|
||
|
|
#{sysUserId}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
<if test="null != otcIds and otcIds.size > 0 ">
|
||
|
|
OR ot.OTCId IN (
|
||
|
|
<foreach collection ="otcIds" item="otcId" index= "index" separator =",">
|
||
|
|
#{otcId}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
</if>
|
||
|
|
)
|
||
|
|
AND ot.`OATaskId` IS NOT NULL
|
||
|
|
ORDER BY ot.OTCId ASC ,ot.`StartDate` DESC
|
||
|
|
LIMIT #{start},#{end};
|
||
|
|
|
||
|
|
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--接收任务列表-->
|
||
|
|
<select id="countReceiveTask" resultType="java.lang.Long">
|
||
|
|
SELECT count(*) FROM OATask ot
|
||
|
|
LEFT JOIN OADistribution ob ON ob.`OATaskId` = ot.`OATaskId`
|
||
|
|
LEFT JOIN SysUser su ON su.`SysUserId` = ot.`CreatedBy`
|
||
|
|
WHERE ot.`Subject` LIKE '%%'
|
||
|
|
and ot.del_state = 1
|
||
|
|
<if test="null != tasktype and '' != tasktype " >
|
||
|
|
<if test=" '履职任务' == tasktype">
|
||
|
|
AND (ot.TaskType is null or ot.TaskType = '履职任务')
|
||
|
|
AND ot.StartDate <= #{startTime}
|
||
|
|
AND (ot.IsFinish IS NULL OR ot.IsFinish = '否')
|
||
|
|
</if>
|
||
|
|
<if test=" '履职任务' != tasktype">
|
||
|
|
AND ot.TaskType = #{tasktype}
|
||
|
|
</if>
|
||
|
|
</if>
|
||
|
|
AND (ob.`SysUserId` IN (
|
||
|
|
<foreach collection ="sysUserIds" item="sysUserId" index= "index" separator =",">
|
||
|
|
#{sysUserId}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
<if test="null != otcIds and otcIds.size > 0 ">
|
||
|
|
OR ot.OTCId IN (
|
||
|
|
<foreach collection ="otcIds" item="otcId" index= "index" separator =",">
|
||
|
|
#{otcId}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
</if>
|
||
|
|
)
|
||
|
|
AND ot.`OATaskId` IS NOT NULL
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--通过otcid查询任务-->
|
||
|
|
<select id="findByOtcId" resultMap="TaskResultMap">
|
||
|
|
SELECT lt.Frequency totalFrequency,ot.* FROM `OATask` ot
|
||
|
|
left join ListFactor lt on ot.OTCId = lt.listFactorId
|
||
|
|
WHERE ot.OTCId IN (
|
||
|
|
<foreach collection ="otcIds" item="otcId" index= "index" separator =",">
|
||
|
|
#{otcId}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
AND ot.StartDate <= NOW()
|
||
|
|
and ot.del_state = 1
|
||
|
|
and lf.del_state = 1
|
||
|
|
ORDER BY ot.OTCId ASC ,ot.`StartDate` DESC
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--修改任务完成状态-->
|
||
|
|
<update id="changeIsFinish">
|
||
|
|
UPDATE `OATask` SET IsFinish = '是' ,
|
||
|
|
EndDate = now()
|
||
|
|
WHERE OATaskId IN (
|
||
|
|
<foreach collection ="taskIds" item="taskId" index= "index" separator =",">
|
||
|
|
#{taskId}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<!--任务详情-->
|
||
|
|
<select id="taskDetail" resultMap="TaskResultMap">
|
||
|
|
SELECT ob.`AppStatus` taskStatus,ot.* FROM OATask ot
|
||
|
|
LEFT JOIN `OADistribution` ob ON ot.OATaskId = ob.OATaskId
|
||
|
|
AND ob.SysUserId = #{sysUserId}
|
||
|
|
WHERE ot.OATaskId = #{taskId}
|
||
|
|
LIMIT 1;
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--通过月份查询履职信息-->
|
||
|
|
<select id="findByMonths" resultMap="TaskResultMap">
|
||
|
|
SELECT * FROM `OATask` ot WHERE ot.`OTCId` = #{otcId}
|
||
|
|
AND ot.`TaskType` = '履职任务'
|
||
|
|
and ot.del_state = 1
|
||
|
|
AND (
|
||
|
|
<foreach collection ="times" item="time" index= "index" separator ="or">
|
||
|
|
ot.`StartDate` LIKE #{time}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
;
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--查询企业消息通知-->
|
||
|
|
<select id="findByEntId" resultMap="TaskResultMap">
|
||
|
|
SELECT su.`UnitName`,ot.* FROM OATask ot
|
||
|
|
LEFT JOIN SysUnit su ON su.sysunitid = ot.`TaskDepart`
|
||
|
|
WHERE ot.`OTCId` = #{entId}
|
||
|
|
and ot.del_state = 1
|
||
|
|
ORDER BY ot.`CreatedBy` DESC
|
||
|
|
LIMIT #{start},#{end};
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--企业消息通知总数-->
|
||
|
|
<select id="countByEntId" resultType="java.lang.Long">
|
||
|
|
SELECT count(*) FROM OATask ot
|
||
|
|
WHERE ot.`OTCId` = #{entId}
|
||
|
|
and ot.del_state = 1
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--修改履职任务-->
|
||
|
|
<update id="finshTask">
|
||
|
|
UPDATE `OATask` SET IsFinish = '是' ,
|
||
|
|
EndDate = NOW() WHERE `TaskType` = '履职任务'
|
||
|
|
AND `OTCId` = #{otcId}
|
||
|
|
AND `StartDate` <= #{time} AND `PlanEndDate` >= #{time};
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<!--批量导入任务-->
|
||
|
|
<insert id="insertList" parameterType="com.rzyc.model.OATask">
|
||
|
|
insert into OATask (OATaskId, OATaskMgrId, TaskType,
|
||
|
|
TaskFlow, TaskDepart, Tasklevel,
|
||
|
|
TaskPerson, TaskViewer, SysPercent,
|
||
|
|
StartDate, EndDate, PlanEndDate,
|
||
|
|
AppStatus, Subject, AttachmentFlag,Frequency,
|
||
|
|
Priority, IsFinish, OALabel,
|
||
|
|
LinkedUrl, ReadBack, OTCId,del_state,
|
||
|
|
OTCType, CreatedOn, CreatedBy,
|
||
|
|
ModifiedOn, ModifiedBy, DocBody
|
||
|
|
)
|
||
|
|
values
|
||
|
|
<foreach collection="records" item="record" separator=",">
|
||
|
|
(#{record.oataskid,jdbcType=VARCHAR}, #{record.oataskmgrid,jdbcType=VARCHAR},
|
||
|
|
#{record.tasktype,jdbcType=VARCHAR},
|
||
|
|
#{record.taskflow,jdbcType=VARCHAR}, #{record.taskdepart,jdbcType=VARCHAR},
|
||
|
|
#{record.tasklevel,jdbcType=VARCHAR},
|
||
|
|
#{record.taskperson,jdbcType=VARCHAR}, #{record.taskviewer,jdbcType=VARCHAR},
|
||
|
|
#{record.syspercent,jdbcType=INTEGER},
|
||
|
|
#{record.startdate,jdbcType=TIMESTAMP}, #{record.enddate,jdbcType=TIMESTAMP},
|
||
|
|
#{record.planenddate,jdbcType=TIMESTAMP},
|
||
|
|
#{record.appstatus,jdbcType=VARCHAR}, #{record.subject,jdbcType=VARCHAR},
|
||
|
|
#{record.attachmentflag,jdbcType=INTEGER},
|
||
|
|
#{record.frequency,jdbcType=BIGINT},
|
||
|
|
#{record.priority,jdbcType=VARCHAR}, #{record.isfinish,jdbcType=VARCHAR},
|
||
|
|
#{record.oalabel,jdbcType=VARCHAR},
|
||
|
|
#{record.linkedurl,jdbcType=VARCHAR}, #{record.readback,jdbcType=VARCHAR},
|
||
|
|
#{record.otcid,jdbcType=VARCHAR},
|
||
|
|
#{record.delState,jdbcType=VARCHAR},
|
||
|
|
#{record.otctype,jdbcType=VARCHAR}, #{record.createdon,jdbcType=TIMESTAMP},
|
||
|
|
#{record.createdby,jdbcType=VARCHAR},
|
||
|
|
#{record.modifiedon,jdbcType=TIMESTAMP}, #{record.modifiedby,jdbcType=VARCHAR},
|
||
|
|
#{record.docbody,jdbcType=LONGVARCHAR}
|
||
|
|
)
|
||
|
|
</foreach>
|
||
|
|
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<!--修改任务完成进度-->
|
||
|
|
<update id="changeFrequency">
|
||
|
|
UPDATE `OATask`
|
||
|
|
SET
|
||
|
|
Frequency = #{frequency},
|
||
|
|
IsFinish = #{isFinish}
|
||
|
|
WHERE OATaskId = #{taskId}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<!--需完成的任务列-->
|
||
|
|
<select id="findByOtcIdAndTime" resultMap="BaseResultMap">
|
||
|
|
select * from `OATask` ot
|
||
|
|
WHERE ot.`TaskType` = '履职任务'
|
||
|
|
and ot.del_state = 1
|
||
|
|
AND ot.`OTCId` = #{otcId}
|
||
|
|
AND (ot.IsFinish IS NULL OR ot.IsFinish = '否')
|
||
|
|
AND ot.`StartDate` <= #{time} AND ot.`PlanEndDate` >= #{time};
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
<!--需完成的任务列-->
|
||
|
|
<select id="findByListPerformId" resultMap="BaseResultMap">
|
||
|
|
SELECT ot.*,
|
||
|
|
lf.RedAlert,lf.YellowAlert,
|
||
|
|
lf.Frequency totalFrequency
|
||
|
|
FROM `OATask` ot
|
||
|
|
LEFT JOIN ListFactor lf ON ot.`OTCId` = lf.`ListFactorId`
|
||
|
|
WHERE ot.`TaskType` = '履职任务'
|
||
|
|
and lf.del_state = 1
|
||
|
|
and ot.del_state = 1
|
||
|
|
AND lf.`ListPerformId` = #{listPerformId}
|
||
|
|
AND lf.`SysYear` = #{sysYear}
|
||
|
|
<if test="null != isFinish and '' != isFinish">
|
||
|
|
AND ot.IsFinish = #{isFinish}
|
||
|
|
</if>
|
||
|
|
AND ot.`StartDate` < #{time}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--任务详情-->
|
||
|
|
<select id="findById" resultMap="BaseResultMap">
|
||
|
|
SELECT ot.* FROM `OATask` ot
|
||
|
|
WHERE ot.`OATaskId` = #{taskId}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
<!--未完成的履职任务-->
|
||
|
|
<select id="notFinishTask" resultMap="BaseResultMap">
|
||
|
|
SELECT * FROM OATask ot
|
||
|
|
WHERE ot.`TaskType` = '履职任务'
|
||
|
|
and ot.del_state = 1
|
||
|
|
AND ot.`OTCId` = #{otcId}
|
||
|
|
AND ot.`StartDate` < NOW()
|
||
|
|
AND ot.`IsFinish` = '否'
|
||
|
|
ORDER BY ot.`StartDate` DESC;
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--删除履职任务-->
|
||
|
|
<update id="delFactorTask" >
|
||
|
|
update OATask set del_state = 2
|
||
|
|
where `OTCId` = #{otcId} and `TaskType` = '履职任务'
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<!--接收任务列表-->
|
||
|
|
<select id="receiveTaskPages" resultMap="TaskResultMap">
|
||
|
|
SELECT ob.`AppStatus` taskStatus,ot.*
|
||
|
|
FROM OATask ot
|
||
|
|
LEFT JOIN OADistribution ob ON ob.`OATaskId` = ot.`OATaskId`
|
||
|
|
LEFT JOIN SysUser su ON su.`SysUserId` = ot.`TaskPerson`
|
||
|
|
WHERE ot.`Subject` LIKE #{condition}
|
||
|
|
and ot.del_state = 1
|
||
|
|
<if test="null != tasktype and '' != tasktype " >
|
||
|
|
AND ot.TaskType = #{tasktype}
|
||
|
|
</if>
|
||
|
|
AND ob.`SysUserId` IN (
|
||
|
|
<foreach collection ="sysUserIds" item="sysUserId" index= "index" separator =",">
|
||
|
|
#{sysUserId}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
AND ot.TaskType != '履职任务'
|
||
|
|
AND ot.`OATaskId` IS NOT NULL
|
||
|
|
ORDER BY ot.OTCId ASC ,ot.`StartDate` DESC
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--已完成事项-->
|
||
|
|
<select id="countComplete" resultType="java.lang.Integer">
|
||
|
|
SELECT count(*)
|
||
|
|
FROM `oatask` ot
|
||
|
|
LEFT JOIN listfactor lf ON ot.`OTCId` = lf.`ListFactorId`
|
||
|
|
WHERE ot.`TaskType` = '履职任务'
|
||
|
|
AND ot.`StartDate` <= NOW() AND ot.`IsFinish` = '是'
|
||
|
|
AND lf.`ListPerformId` = #{listPerformId}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--已超时事项-->
|
||
|
|
<select id="countOvertime" resultType="java.lang.Integer">
|
||
|
|
SELECT count(*)
|
||
|
|
FROM `oatask` ot
|
||
|
|
LEFT JOIN listfactor lf ON ot.`OTCId` = lf.`ListFactorId`
|
||
|
|
WHERE ot.`TaskType` = '履职任务'
|
||
|
|
AND ot.`PlanEndDate` <= NOW() AND ot.`IsFinish` = '否'
|
||
|
|
AND lf.`ListPerformId` = #{listPerformId}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<!--进行中事项-->
|
||
|
|
<select id="countConduct" resultType="java.lang.Integer">
|
||
|
|
SELECT count(*)
|
||
|
|
FROM `oatask` ot
|
||
|
|
LEFT JOIN listfactor lf ON ot.`OTCId` = lf.`ListFactorId`
|
||
|
|
WHERE ot.`TaskType` = '履职任务'
|
||
|
|
AND ot.`StartDate` <= NOW() AND ot.`PlanEndDate` >= NOW() AND ot.`IsFinish` = '否'
|
||
|
|
AND lf.`ListPerformId` = #{listPerformId}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|