|
@@ -123,6 +123,48 @@
|
|
|
order by sort,create_time DESC
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectArchiveFilePageByBoxNameCount" resultType="java.lang.Integer">
|
|
|
+ select count(id) from u_archive_file where is_deleted = 0
|
|
|
+ <if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
|
|
|
+ and status = #{vo.isApprovalValue}
|
|
|
+ </if>
|
|
|
+ <if test="vo.isCertificationValue != null and vo.isCertificationValue != ''">
|
|
|
+ and is_certification = #{vo.isCertificationValue}
|
|
|
+ </if>
|
|
|
+ <if test="vo.projectId != null and vo.projectId != ''">
|
|
|
+ and project_id = #{vo.projectId}
|
|
|
+ </if>
|
|
|
+ <if test="vo.contractId != null and vo.contractId != ''">
|
|
|
+ and contract_id = #{vo.contractId}
|
|
|
+ </if>
|
|
|
+ <if test="vo.nodeIds != null and vo.nodeIds != ''">
|
|
|
+ and node_id in
|
|
|
+ <foreach collection="vo.nodeIdArray" item="nodeId" open="(" separator="," close=")">
|
|
|
+ #{nodeId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <choose>
|
|
|
+ <when test="vo.boxName != null and vo.boxName != ''">
|
|
|
+ and (box_name = #{vo.boxName} or box_name is null or box_name = '')
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and (box_name is null or box_name = '')
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+
|
|
|
+ <if test="vo.queryValue != null and vo.queryValue != ''">
|
|
|
+ and (
|
|
|
+ file_name like concat('%',#{vo.queryValue},'%') or
|
|
|
+ file_number like concat('%',#{vo.queryValue},'%') or
|
|
|
+ duty_user like concat('%',#{vo.queryValue},'%') or
|
|
|
+ sheet_source like concat('%',#{vo.queryValue},'%') or
|
|
|
+ drawing_no like concat('%',#{vo.queryValue},'%') or
|
|
|
+ cite_change_number like concat('%',#{vo.queryValue},'%')
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ order by box_number,sort,create_time DESC
|
|
|
+ </select>
|
|
|
<select id="selectArchiveFilePageByBoxName" resultMap="archiveFileResultMap">
|
|
|
select * from u_archive_file where is_deleted = 0
|
|
|
<if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
|
|
@@ -146,7 +188,7 @@
|
|
|
|
|
|
<choose>
|
|
|
<when test="vo.boxName != null and vo.boxName != ''">
|
|
|
- and box_name = #{vo.boxName}
|
|
|
+ and (box_name = #{vo.boxName} or box_name is null or box_name = '')
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
and (box_name is null or box_name = '')
|
|
@@ -165,7 +207,6 @@
|
|
|
</if>
|
|
|
order by box_number,sort,create_time DESC
|
|
|
</select>
|
|
|
-
|
|
|
<select id="getDeleteDataByIds" resultType="org.springblade.business.entity.ArchiveFile">
|
|
|
select * from u_archive_file where id in
|
|
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
@@ -173,7 +214,7 @@
|
|
|
</foreach>
|
|
|
</select>
|
|
|
|
|
|
- <select id="IsBoxName" resultType="java.lang.Integer">
|
|
|
+ <select id="isBoxName" resultType="java.lang.Integer">
|
|
|
select count(id) from u_archive_file where is_deleted = 0 and box_name = #{boxName}
|
|
|
</select>
|
|
|
|
|
@@ -184,4 +225,22 @@
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
+ <update id="updateArchiveFileByBoxNameOne" >
|
|
|
+ update u_archive_file set box_name = null,box_number = null where
|
|
|
+ box_name = #{boxName} and box_number = #{boxNumber}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="selectBoxNameAndBoxNumber" resultType="java.util.Map">
|
|
|
+ select box_name as boxName,box_number as boxNumber,group_concat(DISTINCT id ORDER BY id ASC SEPARATOR ',') as ids
|
|
|
+ from u_archive_file where node_id = #{nodeId} and box_number is not null
|
|
|
+ group by box_name order by box_number asc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="updateArchiveFileByNodeId" >
|
|
|
+ update u_archive_file set node_id = #{nodeId} where
|
|
|
+ id in
|
|
|
+ <foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
</mapper>
|