|
@@ -5,10 +5,10 @@
|
|
<!--插入数据-->
|
|
<!--插入数据-->
|
|
<!--int add(FollowUp followUp);-->
|
|
<!--int add(FollowUp followUp);-->
|
|
<insert id="add" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="add" useGeneratedKeys="true" keyProperty="id">
|
|
- insert into follow_up(report_id, parent_id, follow_up_name, remark, time_limit,
|
|
|
|
- agent, assist_person, finish_time, status, conclusion, create_person_id,
|
|
|
|
- create_person_name)
|
|
|
|
- values
|
|
|
|
|
|
+ INSERT INTO FOLLOW_UP(REPORT_ID, PARENT_ID, FOLLOW_UP_NAME, REMARK, TIME_LIMIT,
|
|
|
|
+ AGENT, ASSIST_PERSON, FINISH_TIME, STATUS, CONCLUSION, CREATE_PERSON_ID,
|
|
|
|
+ CREATE_PERSON_NAME)
|
|
|
|
+ VALUES
|
|
(#{reportId}, #{parentId}, #{followUpName}, #{remark},
|
|
(#{reportId}, #{parentId}, #{followUpName}, #{remark},
|
|
#{timeLimit}, #{agent}, #{assistPerson}, #{finishTime}, #{status},
|
|
#{timeLimit}, #{agent}, #{assistPerson}, #{finishTime}, #{status},
|
|
#{conclusion}, #{createPersonId}, #{createPersonName})
|
|
#{conclusion}, #{createPersonId}, #{createPersonName})
|
|
@@ -16,66 +16,66 @@
|
|
<!--根据id修改数据-->
|
|
<!--根据id修改数据-->
|
|
<!--int update(FollowUp followUp);-->
|
|
<!--int update(FollowUp followUp);-->
|
|
<update id="update">
|
|
<update id="update">
|
|
- update follow_up
|
|
|
|
|
|
+ UPDATE FOLLOW_UP
|
|
<set>
|
|
<set>
|
|
<if test="followUpName != null">
|
|
<if test="followUpName != null">
|
|
- follow_up_name = #{followUpName},
|
|
|
|
|
|
+ FOLLOW_UP_NAME = #{followUpName},
|
|
</if>
|
|
</if>
|
|
<if test="remark != null">
|
|
<if test="remark != null">
|
|
- remark = #{remark},
|
|
|
|
|
|
+ REMARK = #{remark},
|
|
</if>
|
|
</if>
|
|
<if test="timeLimit != null">
|
|
<if test="timeLimit != null">
|
|
- time_limit = #{timeLimit},
|
|
|
|
|
|
+ TIME_LIMIT = #{timeLimit},
|
|
</if>
|
|
</if>
|
|
<if test="agent != null">
|
|
<if test="agent != null">
|
|
- agent = #{agent},
|
|
|
|
|
|
+ AGENT = #{agent},
|
|
</if>
|
|
</if>
|
|
<if test="assistPerson != null">
|
|
<if test="assistPerson != null">
|
|
- assist_person = #{assistPerson},
|
|
|
|
|
|
+ ASSIST_PERSON = #{assistPerson},
|
|
</if>
|
|
</if>
|
|
<if test="finishTime != null">
|
|
<if test="finishTime != null">
|
|
- finish_time = #{finishTime},
|
|
|
|
|
|
+ FINISH_TIME = #{finishTime},
|
|
</if>
|
|
</if>
|
|
<if test="status != null">
|
|
<if test="status != null">
|
|
- status = #{status},
|
|
|
|
|
|
+ STATUS = #{status},
|
|
</if>
|
|
</if>
|
|
<if test="conclusion != null">
|
|
<if test="conclusion != null">
|
|
- conclusion = #{conclusion},
|
|
|
|
|
|
+ CONCLUSION = #{conclusion},
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
- where id = #{id}
|
|
|
|
|
|
+ WHERE ID = #{id}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<!--根据报告id查询后续事项-->
|
|
<!--根据报告id查询后续事项-->
|
|
<!--List<FollowUpVO> query(Integer reportId);-->
|
|
<!--List<FollowUpVO> query(Integer reportId);-->
|
|
<resultMap id="queryMap" type="cn.cslg.report.common.model.vo.FollowUpVO">
|
|
<resultMap id="queryMap" type="cn.cslg.report.common.model.vo.FollowUpVO">
|
|
- <id column="id" property="id"/>
|
|
|
|
- <result column="report_id" property="reportId"/>
|
|
|
|
- <result column="parent_id" property="parentId"/>
|
|
|
|
- <result column="follow_up_name" property="followUpName"/>
|
|
|
|
- <result column="remark" property="remark"/>
|
|
|
|
- <result column="time_limit" property="timeLimit"/>
|
|
|
|
- <result column="agent" property="agent"/>
|
|
|
|
- <result column="assist_person" property="assistPerson"/>
|
|
|
|
- <result column="finish_time" property="finishTime"/>
|
|
|
|
- <result column="status" property="status"/>
|
|
|
|
- <result column="conclusion" property="conclusion"/>
|
|
|
|
- <result column="create_person_id" property="createPersonId"/>
|
|
|
|
- <result column="create_person_name" property="createPersonName"/>
|
|
|
|
- <result column="create_time" property="createTime"/>
|
|
|
|
|
|
+ <id column="ID" property="id"/>
|
|
|
|
+ <result column="REPORT_ID" property="reportId"/>
|
|
|
|
+ <result column="PARENT_ID" property="parentId"/>
|
|
|
|
+ <result column="FOLLOW_UP_NAME" property="followUpName"/>
|
|
|
|
+ <result column="REMARK" property="remark"/>
|
|
|
|
+ <result column="TIME_LIMIT" property="timeLimit"/>
|
|
|
|
+ <result column="AGENT" property="agent"/>
|
|
|
|
+ <result column="ASSIST_PERSON" property="assistPerson"/>
|
|
|
|
+ <result column="FINISH_TIME" property="finishTime"/>
|
|
|
|
+ <result column="STATUS" property="status"/>
|
|
|
|
+ <result column="CONCLUSION" property="conclusion"/>
|
|
|
|
+ <result column="CREATE_PERSON_ID" property="createPersonId"/>
|
|
|
|
+ <result column="CREATE_PERSON_NAME" property="createPersonName"/>
|
|
|
|
+ <result column="CREATE_TIME" property="createTime"/>
|
|
<collection property="filesVOs" resultMap="FilesVOsResultMap"/>
|
|
<collection property="filesVOs" resultMap="FilesVOsResultMap"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
<resultMap id="FilesVOsResultMap" type="cn.cslg.report.common.model.vo.FilesVO">
|
|
<resultMap id="FilesVOsResultMap" type="cn.cslg.report.common.model.vo.FilesVO">
|
|
- <result column="file_id" property="fileId"/>
|
|
|
|
- <result column="name" property="name"/>
|
|
|
|
- <result column="address" property="url"/>
|
|
|
|
|
|
+ <result column="FILE_ID" property="fileId"/>
|
|
|
|
+ <result column="NAME" property="name"/>
|
|
|
|
+ <result column="ADDRESS" property="url"/>
|
|
<result column="ZID" property="zId"/>
|
|
<result column="ZID" property="zId"/>
|
|
<result column="FILEREMARK" property="remark"/>
|
|
<result column="FILEREMARK" property="remark"/>
|
|
- <result column="update_time" property="updateTime"/>
|
|
|
|
|
|
+ <result column="UPDATE_TIME" property="updateTime"/>
|
|
<result column="UID" property="uId"/>
|
|
<result column="UID" property="uId"/>
|
|
- <result column="type" property="type"/>
|
|
|
|
- <result column="suffix" property="suffix"/>
|
|
|
|
- <result column="file_name" property="fileName"/>
|
|
|
|
|
|
+ <result column="TYPE" property="type"/>
|
|
|
|
+ <result column="SUFFIX" property="suffix"/>
|
|
|
|
+ <result column="FILE_NAME" property="fileName"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<!-- <select id="query" resultMap="queryMap">-->
|
|
<!-- <select id="query" resultMap="queryMap">-->
|
|
@@ -98,28 +98,28 @@
|
|
<!-- </select>-->
|
|
<!-- </select>-->
|
|
|
|
|
|
<select id="query" resultMap="queryMap">
|
|
<select id="query" resultMap="queryMap">
|
|
- select a.id, a.report_id, a.parent_id, a.follow_up_name,a.remark,a.time_limit,a.agent,a.assist_person,a.finish_time,a.status, a.conclusion,
|
|
|
|
- a.create_person_id, a.create_person_name, a.create_time, d.FILE_ID, d.NAME, d.ADDRESS, d.ZID,d.FILEREMARK, d.UPDATE_TIME, d.UID,d.TYPE, d.SIZE, d.SUFFIX, d.FILE_NAME
|
|
|
|
- from follow_up a left JOIN (SELECT b.follow_up_id, b.FILE_ID, c.ID, c.NAME, c.ADDRESS, c.ZID, c.REMARK AS FILEREMARK, c.UPDATE_TIME, c.UID, c.TYPE, c.SIZE, c.SUFFIX, c.FILE_NAME
|
|
|
|
- FROM asso_follow_up_file b LEFT JOIN report_file c ON b.FILE_ID = c.ID) d
|
|
|
|
|
|
+ SELECT a.ID, a.REPORT_ID, a.PARENT_ID, a.FOLLOW_UP_NAME,a.REMARK,a.TIME_LIMIT,a.AGENT,a.ASSIST_PERSON,a.FINISH_TIME,a.STATUS, a.CONCLUSION,
|
|
|
|
+ a.CREATE_PERSON_ID, a.CREATE_PERSON_NAME, a.CREATE_TIME, d.FILE_ID, d.NAME, d.ADDRESS, d.ZID,d.FILEREMARK, d.UPDATE_TIME, d.UID,d.TYPE, d.SIZE, d.SUFFIX, d.FILE_NAME
|
|
|
|
+ FROM FOLLOW_UP a LEFT JOIN (SELECT b.follow_up_id, b.FILE_ID, c.ID, c.NAME, c.ADDRESS, c.ZID, c.REMARK AS FILEREMARK, c.UPDATE_TIME, c.UID, c.TYPE, c.SIZE, c.SUFFIX, c.FILE_NAME
|
|
|
|
+ FROM ASSO_FOLLOW_UP_FILE b LEFT JOIN REPORT_FILE c ON b.FILE_ID = c.ID) d
|
|
ON a.ID = d.FOLLOW_UP_ID
|
|
ON a.ID = d.FOLLOW_UP_ID
|
|
- WHERE a.report_id = #{reportId} ORDER BY create_time DESC
|
|
|
|
|
|
+ WHERE a.REPORT_ID = #{reportId} ORDER BY CREATE_TIME DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--根据报告id统计后续事项数量-->
|
|
<!--根据报告id统计后续事项数量-->
|
|
<!--int countByReportId();-->
|
|
<!--int countByReportId();-->
|
|
<select id="countByReportId" resultType="int">
|
|
<select id="countByReportId" resultType="int">
|
|
- select count(*)
|
|
|
|
- from follow_up
|
|
|
|
- where report_id = #{reportId}
|
|
|
|
|
|
+ SELECT count(*)
|
|
|
|
+ FROM FOLLOW_UP
|
|
|
|
+ WHERE REPORT_ID = #{reportId}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--根据ids删除数据-->
|
|
<!--根据ids删除数据-->
|
|
<!--int delete(List<Integer> ids);-->
|
|
<!--int delete(List<Integer> ids);-->
|
|
<delete id="delete" parameterType="java.util.List">
|
|
<delete id="delete" parameterType="java.util.List">
|
|
- delete
|
|
|
|
- from follow_up
|
|
|
|
- where id in
|
|
|
|
|
|
+ DELETE
|
|
|
|
+ FROM FOLLOW_UP
|
|
|
|
+ WHERE ID IN
|
|
<foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
@@ -128,10 +128,10 @@
|
|
<!--根据后续事项id和文件id删除数据-->
|
|
<!--根据后续事项id和文件id删除数据-->
|
|
<!--int deleteAssoId(Integer followUpId, List<Integer> fileIds);-->
|
|
<!--int deleteAssoId(Integer followUpId, List<Integer> fileIds);-->
|
|
<delete id="deleteAssoId">
|
|
<delete id="deleteAssoId">
|
|
- delete
|
|
|
|
- from asso_follow_up_file
|
|
|
|
- where follow_up_id = #{followUpId}
|
|
|
|
- and FILE_ID in
|
|
|
|
|
|
+ DELETE
|
|
|
|
+ FROM ASSO_FOLLOW_UP_FILE
|
|
|
|
+ WHERE FOLLOW_UP_ID = #{followUpId}
|
|
|
|
+ AND FILE_ID IN
|
|
<foreach collection="fileIds" item="fileId" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="fileIds" item="fileId" index="index" open="(" close=")" separator=",">
|
|
#{fileId}
|
|
#{fileId}
|
|
</foreach>
|
|
</foreach>
|
|
@@ -141,15 +141,15 @@
|
|
<!--根据报告id统计后续事项数量-->
|
|
<!--根据报告id统计后续事项数量-->
|
|
<!--List<Integer> queryFileIdByFollowUpId(Integer followUpId);-->
|
|
<!--List<Integer> queryFileIdByFollowUpId(Integer followUpId);-->
|
|
<select id="queryFileIdByFollowUpId" resultType="Integer">
|
|
<select id="queryFileIdByFollowUpId" resultType="Integer">
|
|
- SELECT FILE_ID FROM asso_follow_up_file WHERE FOLLOW_UP_ID = #{followUpId};
|
|
|
|
|
|
+ SELECT FILE_ID FROM ASSO_FOLLOW_UP_FILE WHERE FOLLOW_UP_ID = #{followUpId};
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!--插入数据-->
|
|
<!--插入数据-->
|
|
<!--int addAssoIds(AssoFollowUpFile assoFollowUpFile);-->
|
|
<!--int addAssoIds(AssoFollowUpFile assoFollowUpFile);-->
|
|
<insert id="addAssoIds" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="addAssoIds" useGeneratedKeys="true" keyProperty="id">
|
|
- insert into asso_follow_up_file(follow_up_id, file_id, file_type)
|
|
|
|
- values
|
|
|
|
|
|
+ INSERT INTO ASSO_FOLLOW_UP_FILE(FOLLOW_UP_ID, FILE_ID, FILE_TYPE)
|
|
|
|
+ VALUES
|
|
(#{followUpId}, #{fileId}, #{fileType})
|
|
(#{followUpId}, #{fileId}, #{fileType})
|
|
</insert>
|
|
</insert>
|
|
|
|
|