|
@@ -67,26 +67,29 @@
|
|
|
|
|
|
|
|
|
<select id="selectArchivesAutoFileCount" resultType="java.lang.Integer">
|
|
|
- select count(id) from u_archives_auto where is_deleted = 0 and is_archive = 1
|
|
|
+ select count(id) from u_archives_auto u where u.is_deleted = 0
|
|
|
<if test="vo.projectId != null and vo.projectId != ''">
|
|
|
- and project_id = #{vo.projectId}
|
|
|
+ and u.project_id = #{vo.projectId}
|
|
|
+ </if>
|
|
|
+ <if test="vo.queryValue != null and vo.queryValue != ''">
|
|
|
+ and (u.name like concat('%',#{vo.queryValue},'%') or u.file_number like concat('%',#{vo.queryValue},'%'))
|
|
|
</if>
|
|
|
<if test="vo.isAutoFile != null and vo.isAutoFile != ''">
|
|
|
- and is_auto_file = #{vo.isAutoFile}
|
|
|
+ and u.is_auto_file = #{vo.isAutoFile}
|
|
|
</if>
|
|
|
<choose>
|
|
|
<when test="vo.isArchive != null and vo.isArchive != ''">
|
|
|
- and is_auto_file = #{vo.isArchive}
|
|
|
+ and u.is_archive = #{vo.isArchive}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- and (is_auto_file is null or is_auto_file != 1)
|
|
|
+ and (u.is_archive is null or u.is_archive != 1)
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
<if test="vo.isAutoFile != null and vo.isAutoFile != ''">
|
|
|
- and is_auto_file = #{vo.isAutoFile}
|
|
|
+ and u.is_auto_file = #{vo.isAutoFile}
|
|
|
</if>
|
|
|
<if test="vo.nodeIds != null and vo.nodeIds != ''">
|
|
|
- and node_id in
|
|
|
+ and u.node_id in
|
|
|
<foreach collection="vo.nodeIdArray" item="nodeId" open="(" separator="," close=")">
|
|
|
#{nodeId}
|
|
|
</foreach>
|
|
@@ -94,28 +97,32 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectArchivesAutoFilePage" resultMap="archivesAutoResultMap">
|
|
|
- select * from u_archives_auto where is_deleted = 0
|
|
|
+ select * from u_archives_auto u where u.is_deleted = 0
|
|
|
<if test="vo.projectId != null and vo.projectId != ''">
|
|
|
- and project_id = #{vo.projectId}
|
|
|
+ and u.project_id = #{vo.projectId}
|
|
|
+ </if>
|
|
|
+ <if test="vo.queryValue != null and vo.queryValue != ''">
|
|
|
+ and (u.name like concat('%',#{vo.queryValue},'%') or u.file_number like concat('%',#{vo.queryValue},'%'))
|
|
|
</if>
|
|
|
<choose>
|
|
|
<when test="vo.isArchive != null and vo.isArchive != ''">
|
|
|
- and is_auto_file = #{vo.isArchive}
|
|
|
+ and u.is_archive = #{vo.isArchive}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- and (is_auto_file is null or is_auto_file != 1)
|
|
|
+ and (u.is_archive is null or u.is_archive != 1)
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
<if test="vo.isAutoFile != null and vo.isAutoFile != ''">
|
|
|
- and is_auto_file = #{vo.isAutoFile}
|
|
|
+ and u.is_auto_file = #{vo.isAutoFile}
|
|
|
</if>
|
|
|
<if test="vo.nodeIds != null and vo.nodeIds != ''">
|
|
|
- and node_id in
|
|
|
+ and u.node_id in
|
|
|
<foreach collection="vo.nodeIdArray" item="nodeId" open="(" separator="," close=")">
|
|
|
#{nodeId}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- order by tree_sort,auto_file_sort,file_number asc
|
|
|
+ order by u.tree_sort,u.auto_file_sort,u.file_number asc
|
|
|
+ limit #{current}, #{size}
|
|
|
</select>
|
|
|
|
|
|
<update id="updateArchivesAutoFileByNodeId" >
|