Explorar el Código

Merge remote-tracking branch 'origin/dev2' into dev2

chendayu hace 2 años
padre
commit
c4fc38997a
Se han modificado 1 ficheros con 53 adiciones y 53 borrados
  1. 53 53
      RMS/src/main/resources/mapper/FollowUpMapper.xml

+ 53 - 53
RMS/src/main/resources/mapper/FollowUpMapper.xml

@@ -5,10 +5,10 @@
     <!--插入数据-->
     <!--int add(FollowUp followUp);-->
     <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},
              #{timeLimit}, #{agent}, #{assistPerson}, #{finishTime}, #{status},
              #{conclusion}, #{createPersonId}, #{createPersonName})
@@ -16,66 +16,66 @@
     <!--根据id修改数据-->
     <!--int update(FollowUp followUp);-->
     <update id="update">
-        update follow_up
+        UPDATE FOLLOW_UP
         <set>
             <if test="followUpName != null">
-                follow_up_name = #{followUpName},
+                FOLLOW_UP_NAME = #{followUpName},
             </if>
             <if test="remark != null">
-                remark = #{remark},
+                REMARK = #{remark},
             </if>
             <if test="timeLimit != null">
-                time_limit = #{timeLimit},
+                TIME_LIMIT = #{timeLimit},
             </if>
             <if test="agent != null">
-                agent = #{agent},
+                AGENT = #{agent},
             </if>
             <if test="assistPerson != null">
-                assist_person = #{assistPerson},
+                ASSIST_PERSON = #{assistPerson},
             </if>
             <if test="finishTime != null">
-                finish_time = #{finishTime},
+                FINISH_TIME = #{finishTime},
             </if>
             <if test="status != null">
-                status = #{status},
+                STATUS = #{status},
             </if>
             <if test="conclusion != null">
-                conclusion = #{conclusion},
+                CONCLUSION = #{conclusion},
             </if>
         </set>
-        where id = #{id}
+        WHERE ID = #{id}
     </update>
 
     <!--根据报告id查询后续事项-->
     <!--List<FollowUpVO> query(Integer reportId);-->
     <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"/>
     </resultMap>
     <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="FILEREMARK" property="remark"/>
-        <result column="update_time" property="updateTime"/>
+        <result column="UPDATE_TIME" property="updateTime"/>
         <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>
 
     <!--    <select id="query" resultMap="queryMap">-->
@@ -98,28 +98,28 @@
     <!--    </select>-->
 
     <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
-        WHERE a.report_id = #{reportId} ORDER BY create_time DESC
+        WHERE a.REPORT_ID = #{reportId} ORDER BY CREATE_TIME DESC
     </select>
 
     <!--根据报告id统计后续事项数量-->
     <!--int countByReportId();-->
     <select id="countByReportId" resultType="int">
-        select count(*)
-        from follow_up
-        where report_id = #{reportId}
+        SELECT count(*)
+        FROM FOLLOW_UP
+        WHERE REPORT_ID = #{reportId}
     </select>
 
     <!--根据ids删除数据-->
     <!--int delete(List<Integer> ids);-->
     <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=",">
             #{id}
         </foreach>
@@ -128,10 +128,10 @@
     <!--根据后续事项id和文件id删除数据-->
     <!--int deleteAssoId(Integer followUpId, List<Integer> fileIds);-->
     <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=",">
             #{fileId}
         </foreach>
@@ -141,15 +141,15 @@
     <!--根据报告id统计后续事项数量-->
     <!--List<Integer> queryFileIdByFollowUpId(Integer followUpId);-->
     <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>
 
 
     <!--插入数据-->
     <!--int addAssoIds(AssoFollowUpFile assoFollowUpFile);-->
     <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})
     </insert>