|
|
@ -2,7 +2,7 @@
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.ruoyi.tc.mapper.AssetTaskMapper">
|
|
|
|
<mapper namespace="com.ruoyi.tc.mapper.AssetTaskMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.ruoyi.tc.domain.AssetTask" id="AssetTaskMap">
|
|
|
|
<resultMap type="com.ruoyi.tc.entity.AssetTask" id="AssetTaskMap">
|
|
|
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
|
|
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
|
|
|
<result property="taskId" column="task_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="taskId" column="task_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="taskName" column="task_name" jdbcType="VARCHAR"/>
|
|
|
|
<result property="taskName" column="task_name" jdbcType="VARCHAR"/>
|
|
|
@ -10,7 +10,7 @@
|
|
|
|
<result property="taskDeadline" column="task_deadline" jdbcType="VARCHAR"/>
|
|
|
|
<result property="taskDeadline" column="task_deadline" jdbcType="VARCHAR"/>
|
|
|
|
<result property="taskFinishTime" column="task_finish_time" jdbcType="TIMESTAMP"/>
|
|
|
|
<result property="taskFinishTime" column="task_finish_time" jdbcType="TIMESTAMP"/>
|
|
|
|
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
|
|
|
|
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
|
|
|
|
<result property="dwId" column="dw_id" jdbcType="INTEGER"/>
|
|
|
|
<result property="dwmc" column="dwmc" jdbcType="VARCHAR"/>
|
|
|
|
<result property="createId" column="create_id" jdbcType="INTEGER"/>
|
|
|
|
<result property="createId" column="create_id" jdbcType="INTEGER"/>
|
|
|
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
|
|
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
@ -25,32 +25,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
<!--查询单个-->
|
|
|
|
<!--查询单个-->
|
|
|
|
<select id="queryById" resultMap="AssetTaskMap">
|
|
|
|
<select id="queryById" resultMap="AssetTaskMap">
|
|
|
|
select id,
|
|
|
|
select a.id,
|
|
|
|
task_id,
|
|
|
|
a.task_id,
|
|
|
|
task_name,
|
|
|
|
a.task_name,
|
|
|
|
task_time,
|
|
|
|
a.task_time,
|
|
|
|
task_deadline,
|
|
|
|
a.task_deadline,
|
|
|
|
task_finish_time,
|
|
|
|
a.task_finish_time,
|
|
|
|
task_status,
|
|
|
|
a.task_status,
|
|
|
|
dw_id,
|
|
|
|
a.dwmc,
|
|
|
|
create_id,
|
|
|
|
a.create_id,
|
|
|
|
create_by,
|
|
|
|
a.create_by,
|
|
|
|
create_time,
|
|
|
|
a.create_time,
|
|
|
|
update_id,
|
|
|
|
a.update_id,
|
|
|
|
update_by,
|
|
|
|
a.update_by,
|
|
|
|
update_time,
|
|
|
|
a.update_time,
|
|
|
|
user_id,
|
|
|
|
a.user_id,
|
|
|
|
dept_id,
|
|
|
|
a.dept_id,
|
|
|
|
version,
|
|
|
|
a.version,
|
|
|
|
reamark
|
|
|
|
a.reamark,
|
|
|
|
from asset_task
|
|
|
|
b.xtlx,b.xtmc
|
|
|
|
where id = #{id}
|
|
|
|
from asset_task a left join asset_current b on a.dwmc =b.dwmc
|
|
|
|
|
|
|
|
where a.id = #{id}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<!--查询指定行数据-->
|
|
|
|
<!--查询指定行数据-->
|
|
|
|
<select id="queryAllByLimit" resultMap="AssetTaskMap">
|
|
|
|
<select id="queryAllByLimit" resultMap="AssetTaskMap">
|
|
|
|
select
|
|
|
|
select
|
|
|
|
id,task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark
|
|
|
|
id,task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dwmc,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark
|
|
|
|
from asset_task
|
|
|
|
from asset_task
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="id != null">
|
|
|
|
<if test="id != null">
|
|
|
@ -74,8 +75,8 @@
|
|
|
|
<if test="taskStatus != null and taskStatus != ''">
|
|
|
|
<if test="taskStatus != null and taskStatus != ''">
|
|
|
|
and task_status = #{taskStatus}
|
|
|
|
and task_status = #{taskStatus}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="dwId != null">
|
|
|
|
<if test="dwmc != null">
|
|
|
|
and dw_id = #{dwId}
|
|
|
|
and dwmc = #{dwmc}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="createId != null">
|
|
|
|
<if test="createId != null">
|
|
|
|
and create_id = #{createId}
|
|
|
|
and create_id = #{createId}
|
|
|
@ -137,8 +138,8 @@
|
|
|
|
<if test="taskStatus != null and taskStatus != ''">
|
|
|
|
<if test="taskStatus != null and taskStatus != ''">
|
|
|
|
and task_status = #{taskStatus}
|
|
|
|
and task_status = #{taskStatus}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="dwId != null">
|
|
|
|
<if test="dwmc != null">
|
|
|
|
and dw_id = #{dwId}
|
|
|
|
and dwmc = #{dwmc}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="createId != null">
|
|
|
|
<if test="createId != null">
|
|
|
|
and create_id = #{createId}
|
|
|
|
and create_id = #{createId}
|
|
|
@ -172,63 +173,64 @@
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="queryByPage" resultType="com.ruoyi.tc.domain.AssetTask">
|
|
|
|
<select id="queryByPage" resultType="com.ruoyi.tc.entity.AssetTask">
|
|
|
|
select
|
|
|
|
select
|
|
|
|
id,task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark
|
|
|
|
id,task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dwmc,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark
|
|
|
|
from asset_task
|
|
|
|
from asset_task
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="taskName != null and taskName != ''">
|
|
|
|
<if test="req.taskName != null and req.taskName != ''">
|
|
|
|
and task_name = #{taskName}
|
|
|
|
and task_name = #{req.taskName}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
<if test="taskFinishTime != null">
|
|
|
|
|
|
|
|
and task_finish_time = #{taskFinishTime}
|
|
|
|
<if test="req.begainTime != null">
|
|
|
|
</if>
|
|
|
|
and task_finish_time >= #{req.begainTime}
|
|
|
|
<if test="begainTime != null">
|
|
|
|
|
|
|
|
and task_finish_time >= #{begainTime}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="endTime != null">
|
|
|
|
<if test="req.endTime != null">
|
|
|
|
and task_finish_time <= #{endTime}
|
|
|
|
and task_finish_time <= #{req.endTime}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="taskStatus != null and taskStatus != ''">
|
|
|
|
<if test="req.taskStatus != null and req.taskStatus != ''">
|
|
|
|
and task_status = #{taskStatus}
|
|
|
|
and task_status = #{req.taskStatus}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="taskId != null and taskId != ''">
|
|
|
|
<if test="req.taskId != null and req.taskId != ''">
|
|
|
|
and task_id = #{taskId}
|
|
|
|
and task_id = #{req.taskId}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="findByDwmcAssetCurrent" resultType="com.ruoyi.tc.entity.response.AssetCurrentResponse">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<!--新增所有列-->
|
|
|
|
<!--新增所有列-->
|
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
|
insert into asset_task(task_id, task_name, task_time, task_deadline, task_finish_time, task_status, dw_id,
|
|
|
|
insert into asset_task(task_id, task_name, task_time, task_deadline, task_finish_time, task_status, dwmc,
|
|
|
|
create_id, create_by, create_time, update_id, update_by, update_time, user_id, dept_id,
|
|
|
|
create_id, create_by, create_time, update_id, update_by, update_time, user_id, dept_id,
|
|
|
|
version, reamark)
|
|
|
|
version, reamark)
|
|
|
|
values (#{taskId}, #{taskName}, #{taskTime}, #{taskDeadline}, #{taskFinishTime}, #{taskStatus}, #{dwId},
|
|
|
|
values (#{taskId}, #{taskName}, #{taskTime}, #{taskDeadline}, #{taskFinishTime}, #{taskStatus}, #{dwmc},
|
|
|
|
#{createId}, #{createBy}, #{createTime}, #{updateId}, #{updateBy}, #{updateTime}, #{userId}, #{deptId},
|
|
|
|
#{createId}, #{createBy}, #{createTime}, #{updateId}, #{updateBy}, #{updateTime}, #{userId}, #{deptId},
|
|
|
|
#{version}, #{reamark})
|
|
|
|
#{version}, #{reamark})
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
|
insert into
|
|
|
|
insert into
|
|
|
|
asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark)
|
|
|
|
asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dwmc,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark)
|
|
|
|
values
|
|
|
|
values
|
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
|
(#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline},#{entity.taskFinishTime},#{entity.taskStatus},#{entity.dwId},#{entity.createId},#{entity.createBy},#{entity.createTime},#{entity.updateId},#{entity.updateBy},#{entity.updateTime},#{entity.userId},#{entity.deptId},#{entity.version},#{entity.reamark})
|
|
|
|
(#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline},#{entity.taskFinishTime},#{entity.taskStatus},#{entity.dwmc},#{entity.createId},#{entity.createBy},#{entity.createTime},#{entity.updateId},#{entity.updateBy},#{entity.updateTime},#{entity.userId},#{entity.deptId},#{entity.version},#{entity.reamark})
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
|
insert into
|
|
|
|
insert into
|
|
|
|
asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark)
|
|
|
|
asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dwmc,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark)
|
|
|
|
values
|
|
|
|
values
|
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
|
(#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline}#{entity.taskFinishTime}#{entity.taskStatus}#{entity.dwId}#{entity.createId}#{entity.createBy}#{entity.createTime}#{entity.updateId}#{entity.updateBy}#{entity.updateTime}#{entity.userId}#{entity.deptId}#{entity.version}#{entity.reamark})
|
|
|
|
(#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline}#{entity.taskFinishTime}#{entity.taskStatus}#{entity.dwmc}#{entity.createId}#{entity.createBy}#{entity.createTime}#{entity.updateId}#{entity.updateBy}#{entity.updateTime}#{entity.userId}#{entity.deptId}#{entity.version}#{entity.reamark})
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
on duplicate key update
|
|
|
|
on duplicate key update
|
|
|
|
task_id = values(task_id)task_name = values(task_name)task_time = values(task_time)task_deadline =
|
|
|
|
task_id = values(task_id)task_name = values(task_name)task_time = values(task_time)task_deadline =
|
|
|
|
values(task_deadline)task_finish_time = values(task_finish_time)task_status = values(task_status)dw_id =
|
|
|
|
values(task_deadline)task_finish_time = values(task_finish_time)task_status = values(task_status)dwmc =
|
|
|
|
values(dw_id)create_id = values(create_id)create_by = values(create_by)create_time =
|
|
|
|
values(dwmc)create_id = values(create_id)create_by = values(create_by)create_time =
|
|
|
|
values(create_time)update_id = values(update_id)update_by = values(update_by)update_time =
|
|
|
|
values(create_time)update_id = values(update_id)update_by = values(update_by)update_time =
|
|
|
|
values(update_time)user_id = values(user_id)dept_id = values(dept_id)version = values(version)reamark =
|
|
|
|
values(update_time)user_id = values(user_id)dept_id = values(dept_id)version = values(version)reamark =
|
|
|
|
values(reamark)
|
|
|
|
values(reamark)
|
|
|
@ -256,8 +258,8 @@
|
|
|
|
<if test="taskStatus != null and taskStatus != ''">
|
|
|
|
<if test="taskStatus != null and taskStatus != ''">
|
|
|
|
task_status = #{taskStatus},
|
|
|
|
task_status = #{taskStatus},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="dwId != null">
|
|
|
|
<if test="dwmc != null">
|
|
|
|
dw_id = #{dwId},
|
|
|
|
dwmc = #{dwmc},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="createId != null">
|
|
|
|
<if test="createId != null">
|
|
|
|
create_id = #{createId},
|
|
|
|
create_id = #{createId},
|
|
|
|