|
@@ -5,18 +5,17 @@
|
|
<!--插入数据-->
|
|
<!--插入数据-->
|
|
<!--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
|
|
|
|
- (#{reportId}, #{parentId}, #{followUpName}, #{remark},
|
|
|
|
|
|
+ insert into rms_test.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},
|
|
#{timeLimit}, #{agent}, #{assistPerson}, #{finishTime}, #{status},
|
|
#{timeLimit}, #{agent}, #{assistPerson}, #{finishTime}, #{status},
|
|
#{conclusion}, #{createPersonId}, #{createPersonName})
|
|
#{conclusion}, #{createPersonId}, #{createPersonName})
|
|
</insert>
|
|
</insert>
|
|
<!--根据id修改数据-->
|
|
<!--根据id修改数据-->
|
|
<!--int update(FollowUp followUp);-->
|
|
<!--int update(FollowUp followUp);-->
|
|
<update id="update">
|
|
<update id="update">
|
|
- update follow_up
|
|
|
|
|
|
+ update rms_test.follow_up
|
|
<set>
|
|
<set>
|
|
<if test="followUpName != null">
|
|
<if test="followUpName != null">
|
|
follow_up_name = #{followUpName},
|
|
follow_up_name = #{followUpName},
|
|
@@ -78,31 +77,68 @@
|
|
<result column="file_name" property="fileName"/>
|
|
<result column="file_name" property="fileName"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
-<!-- <select id="query" resultMap="queryMap">-->
|
|
|
|
-<!-- select id,-->
|
|
|
|
-<!-- report_id,-->
|
|
|
|
-<!-- parent_id,-->
|
|
|
|
-<!-- follow_up_name,-->
|
|
|
|
-<!-- remark,-->
|
|
|
|
-<!-- time_limit,-->
|
|
|
|
-<!-- agent,-->
|
|
|
|
-<!-- assist_person,-->
|
|
|
|
-<!-- finish_time,-->
|
|
|
|
-<!-- status,-->
|
|
|
|
-<!-- conclusion,-->
|
|
|
|
-<!-- create_person_id,-->
|
|
|
|
-<!-- create_person_name,-->
|
|
|
|
-<!-- create_time-->
|
|
|
|
-<!-- from follow_up-->
|
|
|
|
-<!-- where report_id = #{reportId}-->
|
|
|
|
-<!-- </select>-->
|
|
|
|
|
|
+ <!-- <select id="query" resultMap="queryMap">-->
|
|
|
|
+ <!-- select id,-->
|
|
|
|
+ <!-- report_id,-->
|
|
|
|
+ <!-- parent_id,-->
|
|
|
|
+ <!-- follow_up_name,-->
|
|
|
|
+ <!-- remark,-->
|
|
|
|
+ <!-- time_limit,-->
|
|
|
|
+ <!-- agent,-->
|
|
|
|
+ <!-- assist_person,-->
|
|
|
|
+ <!-- finish_time,-->
|
|
|
|
+ <!-- status,-->
|
|
|
|
+ <!-- conclusion,-->
|
|
|
|
+ <!-- create_person_id,-->
|
|
|
|
+ <!-- create_person_name,-->
|
|
|
|
+ <!-- create_time-->
|
|
|
|
+ <!-- from follow_up-->
|
|
|
|
+ <!-- where report_id = #{reportId}-->
|
|
|
|
+ <!-- </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
|
|
|
|
- ON a.ID = d.FOLLOW_UP_ID
|
|
|
|
|
|
+ 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 rms_test.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 rms_test.asso_follow_up_file b
|
|
|
|
+ LEFT JOIN rms_test.report_file c ON b.FILE_ID = c.ID) d
|
|
|
|
+ ON a.ID = d.FOLLOW_UP_ID
|
|
WHERE a.report_id = #{reportId}
|
|
WHERE a.report_id = #{reportId}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -110,7 +146,7 @@
|
|
<!--int countByReportId();-->
|
|
<!--int countByReportId();-->
|
|
<select id="countByReportId" resultType="int">
|
|
<select id="countByReportId" resultType="int">
|
|
select count(*)
|
|
select count(*)
|
|
- from follow_up
|
|
|
|
|
|
+ from rms_test.follow_up
|
|
where report_id = #{reportId}
|
|
where report_id = #{reportId}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -118,7 +154,7 @@
|
|
<!--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
|
|
delete
|
|
- from follow_up
|
|
|
|
|
|
+ from rms_test.follow_up
|
|
where id in
|
|
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}
|
|
@@ -129,28 +165,29 @@
|
|
<!--int deleteAssoId(Integer followUpId, Integer fileId);-->
|
|
<!--int deleteAssoId(Integer followUpId, Integer fileId);-->
|
|
<delete id="deleteAssoId">
|
|
<delete id="deleteAssoId">
|
|
delete
|
|
delete
|
|
- from asso_follow_up_file
|
|
|
|
|
|
+ from rms_test.asso_follow_up_file
|
|
where follow_up_id = #{followUpId}
|
|
where follow_up_id = #{followUpId}
|
|
and FILE_ID in
|
|
and FILE_ID in
|
|
- <foreach collection="fileIds" item="fileId" index="index" open="(" close=")" separator=",">
|
|
|
|
- #{fileId}
|
|
|
|
- </foreach>
|
|
|
|
|
|
+ <foreach collection="fileIds" item="fileId" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{fileId}
|
|
|
|
+ </foreach>
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<!--根据报告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 rms_test.asso_follow_up_file
|
|
|
|
+ WHERE FOLLOW_UP_ID = #{followUpId};
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!--插入数据-->
|
|
<!--插入数据-->
|
|
<!--int addAssoIds(List<AssoFollowUpFile> assoFollowUpFiles);-->
|
|
<!--int addAssoIds(List<AssoFollowUpFile> assoFollowUpFiles);-->
|
|
<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
|
|
|
|
- (#{followUpId}, #{fileId}, #{fileType})
|
|
|
|
|
|
+ insert into rms_test.asso_follow_up_file(follow_up_id, file_id, file_type)
|
|
|
|
+ values (#{followUpId}, #{fileId}, #{fileType})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|