123 lines
3.2 KiB
XML
123 lines
3.2 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.hx.slj.modules.assessment.dao.ExecuteFileDao">
|
||
|
|
<sql id="planColumns">
|
||
|
|
a.id,
|
||
|
|
a.standard_subtask_id AS "subtaskID",
|
||
|
|
a.file_title AS "fileTitle",
|
||
|
|
a.file_type AS "fileType",
|
||
|
|
a.file_size AS "fileSize",
|
||
|
|
a.file_url AS "fileUrl",
|
||
|
|
a.khtx_file_list_id AS "khtxFileListId",
|
||
|
|
a.create_by AS "createBy.id",
|
||
|
|
a.create_date,
|
||
|
|
a.update_by AS "updateBy.id",
|
||
|
|
a.update_date,
|
||
|
|
a.del_flag,
|
||
|
|
a.upload_type AS "uploadType",
|
||
|
|
a.non_designated_name AS "nonDesignatedName",
|
||
|
|
a.remarks
|
||
|
|
</sql>
|
||
|
|
<select id="get" resultType="com.hx.slj.modules.assessment.entity.ExecuteFile">
|
||
|
|
SELECT
|
||
|
|
<include refid="planColumns"/>
|
||
|
|
FROM execute_file a
|
||
|
|
WHERE a.id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="findList" resultType="com.hx.slj.modules.assessment.entity.ExecuteFile">
|
||
|
|
SELECT
|
||
|
|
<include refid="planColumns"/>
|
||
|
|
FROM execute_file a
|
||
|
|
WHERE a.del_flag = #{DEL_FLAG_NORMAL}
|
||
|
|
<if test="subtaskID!=null and subtaskID!=''">
|
||
|
|
and a.standard_subtask_id=#{subtaskID}
|
||
|
|
</if>
|
||
|
|
<if test="khtxFileListId!=null and khtxFileListId!=''">
|
||
|
|
and a.khtx_file_list_id=#{khtxFileListId}
|
||
|
|
</if>
|
||
|
|
<if test="uploadType!=null and uploadType!=''">
|
||
|
|
and a.upload_type=#{uploadType}
|
||
|
|
</if>
|
||
|
|
<if test="nonDesignatedName!=null and nonDesignatedName!=''">
|
||
|
|
and a.non_designated_name=#{nonDesignatedName}
|
||
|
|
</if>
|
||
|
|
<choose>
|
||
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||
|
|
ORDER BY ${page.orderBy}
|
||
|
|
</when>
|
||
|
|
<otherwise>
|
||
|
|
ORDER BY a.update_date
|
||
|
|
</otherwise>
|
||
|
|
</choose>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insert">
|
||
|
|
INSERT INTO execute_file(
|
||
|
|
id,
|
||
|
|
standard_subtask_id,
|
||
|
|
file_title,
|
||
|
|
file_type,
|
||
|
|
file_size,
|
||
|
|
file_url,
|
||
|
|
khtx_file_list_id,
|
||
|
|
create_by,
|
||
|
|
create_date,
|
||
|
|
update_by,
|
||
|
|
update_date,
|
||
|
|
del_flag,
|
||
|
|
upload_type,
|
||
|
|
non_designated_name,
|
||
|
|
remarks
|
||
|
|
) VALUES (
|
||
|
|
#{id},
|
||
|
|
#{subtaskID},
|
||
|
|
#{fileTitle},
|
||
|
|
#{fileType},
|
||
|
|
#{fileSize},
|
||
|
|
#{fileUrl},
|
||
|
|
#{khtxFileListId},
|
||
|
|
#{createBy.id},
|
||
|
|
#{createDate},
|
||
|
|
#{updateBy.id},
|
||
|
|
#{updateDate},
|
||
|
|
#{delFlag},
|
||
|
|
#{uploadType},
|
||
|
|
#{nonDesignatedName},
|
||
|
|
#{remarks}
|
||
|
|
)
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="update">
|
||
|
|
UPDATE execute_file SET
|
||
|
|
standard_subtask_id =#{subtaskID},
|
||
|
|
file_title=#{fileTitle},
|
||
|
|
file_type =#{fileType},
|
||
|
|
file_size =#{fileSize},
|
||
|
|
file_url=#{fileUrl},
|
||
|
|
khtx_file_list_id =#{khtxFileListId},
|
||
|
|
update_by = #{updateBy.id},
|
||
|
|
update_date = #{updateDate},
|
||
|
|
del_flag = #{delFlag},
|
||
|
|
upload_type = #{uploadType},
|
||
|
|
non_designated_name = #{nonDesignatedName},
|
||
|
|
remarks = #{remarks}
|
||
|
|
WHERE id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<update id="deleteById">
|
||
|
|
UPDATE execute_file SET
|
||
|
|
del_flag = #{delFlag}
|
||
|
|
WHERE id = #{id}
|
||
|
|
</update>
|
||
|
|
<!--根据文件列表表id或者子任务id-->
|
||
|
|
<select id="getByFileListId" resultType="com.hx.slj.modules.assessment.entity.ExecuteFile">
|
||
|
|
SELECT
|
||
|
|
<include refid="planColumns"/>
|
||
|
|
FROM execute_file a
|
||
|
|
WHERE a.khtx_file_list_id = #{khtxFileListId}
|
||
|
|
<if test="subtaskID!=null and subtaskID !=''">
|
||
|
|
and a.standard_subtask_id = #{subtaskID}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
</mapper>
|