|
@@ -67,90 +67,102 @@
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<select id="selectArchiveFileCount" resultType="java.lang.Integer">
|
|
<select id="selectArchiveFileCount" resultType="java.lang.Integer">
|
|
- select count(id) from u_archive_file where is_deleted = 0
|
|
|
|
|
|
+ select count(u.id) from u_archive_file u
|
|
|
|
+ <if test="vo.nodeIds != null and vo.nodeIds != ''">
|
|
|
|
+ left join m_archive_tree_contract t on t.id = u.node_id
|
|
|
|
+ </if>
|
|
|
|
+ where u.is_deleted = 0
|
|
<if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
|
|
<if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
|
|
- and status = #{vo.isApprovalValue}
|
|
|
|
|
|
+ and u.status = #{vo.isApprovalValue}
|
|
</if>
|
|
</if>
|
|
<if test="vo.isCertificationValue != null and vo.isCertificationValue != ''">
|
|
<if test="vo.isCertificationValue != null and vo.isCertificationValue != ''">
|
|
- and is_certification = #{vo.isCertificationValue}
|
|
|
|
|
|
+ and u.is_certification = #{vo.isCertificationValue}
|
|
</if>
|
|
</if>
|
|
<if test="vo.projectId != null and vo.projectId != ''">
|
|
<if test="vo.projectId != null and vo.projectId != ''">
|
|
- and project_id = #{vo.projectId}
|
|
|
|
|
|
+ and u.project_id = #{vo.projectId}
|
|
</if>
|
|
</if>
|
|
<if test="vo.archiveId != null and vo.archiveId != ''">
|
|
<if test="vo.archiveId != null and vo.archiveId != ''">
|
|
- and archive_id = #{vo.archiveId}
|
|
|
|
|
|
+ and u.archive_id = #{vo.archiveId}
|
|
</if>
|
|
</if>
|
|
<choose>
|
|
<choose>
|
|
<when test="vo.isArchive != null and vo.isArchive != ''">
|
|
<when test="vo.isArchive != null and vo.isArchive != ''">
|
|
- and is_auto_file = #{vo.isArchive}
|
|
|
|
|
|
+ and u.is_auto_file = #{vo.isArchive}
|
|
</when>
|
|
</when>
|
|
<when test="vo.archiveId != null and vo.archiveId != ''">
|
|
<when test="vo.archiveId != null and vo.archiveId != ''">
|
|
and 1=1
|
|
and 1=1
|
|
</when>
|
|
</when>
|
|
<otherwise>
|
|
<otherwise>
|
|
- and (is_auto_file is null or is_auto_file != 1)
|
|
|
|
|
|
+ and (u.is_auto_file is null or u.is_auto_file != 1)
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
<if test="vo.nodeIds != null and vo.nodeIds != ''">
|
|
<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=")">
|
|
<foreach collection="vo.nodeIdArray" item="nodeId" open="(" separator="," close=")">
|
|
#{nodeId}
|
|
#{nodeId}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
<if test="vo.queryValue != null and vo.queryValue != ''">
|
|
<if test="vo.queryValue != null and vo.queryValue != ''">
|
|
and (
|
|
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},'%')
|
|
|
|
|
|
+ u.file_name like concat('%',#{vo.queryValue},'%') or
|
|
|
|
+ u.file_number like concat('%',#{vo.queryValue},'%') or
|
|
|
|
+ u.duty_user like concat('%',#{vo.queryValue},'%') or
|
|
|
|
+ u.sheet_source like concat('%',#{vo.queryValue},'%') or
|
|
|
|
+ u.drawing_no like concat('%',#{vo.queryValue},'%') or
|
|
|
|
+ u.cite_change_number like concat('%',#{vo.queryValue},'%')
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectArchiveFilePage" resultMap="archiveFileResultMap">
|
|
<select id="selectArchiveFilePage" resultMap="archiveFileResultMap">
|
|
- select * from u_archive_file where is_deleted = 0
|
|
|
|
|
|
+ select u.* from u_archive_file u
|
|
|
|
+ <if test="vo.nodeIds != null and vo.nodeIds != ''">
|
|
|
|
+ left join m_archive_tree_contract t on t.id = u.node_id
|
|
|
|
+ </if>
|
|
|
|
+ where u.is_deleted = 0
|
|
<if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
|
|
<if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
|
|
- and status = #{vo.isApprovalValue}
|
|
|
|
|
|
+ and u.status = #{vo.isApprovalValue}
|
|
</if>
|
|
</if>
|
|
<if test="vo.isCertificationValue != null and vo.isCertificationValue != ''">
|
|
<if test="vo.isCertificationValue != null and vo.isCertificationValue != ''">
|
|
- and is_certification = #{vo.isCertificationValue}
|
|
|
|
|
|
+ and u.is_certification = #{vo.isCertificationValue}
|
|
</if>
|
|
</if>
|
|
<if test="vo.projectId != null and vo.projectId != ''">
|
|
<if test="vo.projectId != null and vo.projectId != ''">
|
|
- and project_id = #{vo.projectId}
|
|
|
|
|
|
+ and u.project_id = #{vo.projectId}
|
|
</if>
|
|
</if>
|
|
<if test="vo.archiveId != null and vo.archiveId != ''">
|
|
<if test="vo.archiveId != null and vo.archiveId != ''">
|
|
- and archive_id = #{vo.archiveId}
|
|
|
|
|
|
+ and u.archive_id = #{vo.archiveId}
|
|
</if>
|
|
</if>
|
|
<choose>
|
|
<choose>
|
|
<when test="vo.isArchive != null and vo.isArchive != ''">
|
|
<when test="vo.isArchive != null and vo.isArchive != ''">
|
|
- and is_auto_file = #{vo.isArchive}
|
|
|
|
|
|
+ and u.is_auto_file = #{vo.isArchive}
|
|
</when>
|
|
</when>
|
|
<when test="vo.archiveId != null and vo.archiveId != ''">
|
|
<when test="vo.archiveId != null and vo.archiveId != ''">
|
|
and 1=1
|
|
and 1=1
|
|
</when>
|
|
</when>
|
|
<otherwise>
|
|
<otherwise>
|
|
- and (is_auto_file is null or is_auto_file != 1)
|
|
|
|
|
|
+ and (u.is_auto_file is null or u.is_auto_file != 1)
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
<if test="vo.nodeIds != null and vo.nodeIds != ''">
|
|
<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=")">
|
|
<foreach collection="vo.nodeIdArray" item="nodeId" open="(" separator="," close=")">
|
|
#{nodeId}
|
|
#{nodeId}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
<if test="vo.queryValue != null and vo.queryValue != ''">
|
|
<if test="vo.queryValue != null and vo.queryValue != ''">
|
|
and (
|
|
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},'%')
|
|
|
|
|
|
+ u.file_name like concat('%',#{vo.queryValue},'%') or
|
|
|
|
+ u.file_number like concat('%',#{vo.queryValue},'%') or
|
|
|
|
+ u.duty_user like concat('%',#{vo.queryValue},'%') or
|
|
|
|
+ u.sheet_source like concat('%',#{vo.queryValue},'%') or
|
|
|
|
+ u.drawing_no like concat('%',#{vo.queryValue},'%') or
|
|
|
|
+ u.cite_change_number like concat('%',#{vo.queryValue},'%')
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|
|
- order by sort,create_time DESC
|
|
|
|
|
|
+ order by
|
|
|
|
+ <if test="vo.nodeIds != null and vo.nodeIds != ''">
|
|
|
|
+ t.tree_sort,
|
|
|
|
+ </if>
|
|
|
|
+ u.sort,u.create_time
|
|
limit #{current}, #{size}
|
|
limit #{current}, #{size}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -191,7 +203,7 @@
|
|
cite_change_number like concat('%',#{vo.queryValue},'%')
|
|
cite_change_number like concat('%',#{vo.queryValue},'%')
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|
|
- order by box_number,sort,create_time DESC
|
|
|
|
|
|
+ order by box_number,sort,create_time
|
|
|
|
|
|
</select>
|
|
</select>
|
|
<select id="selectArchiveFilePageByBoxName" resultMap="archiveFileResultMap">
|
|
<select id="selectArchiveFilePageByBoxName" resultMap="archiveFileResultMap">
|
|
@@ -231,7 +243,7 @@
|
|
cite_change_number like concat('%',#{vo.queryValue},'%')
|
|
cite_change_number like concat('%',#{vo.queryValue},'%')
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|
|
- order by box_number,sort,create_time DESC
|
|
|
|
|
|
+ order by box_number,sort,create_time
|
|
limit #{current}, #{size}
|
|
limit #{current}, #{size}
|
|
</select>
|
|
</select>
|
|
<select id="getDeleteDataByIds" resultType="org.springblade.business.entity.ArchiveFile">
|
|
<select id="getDeleteDataByIds" resultType="org.springblade.business.entity.ArchiveFile">
|
|
@@ -280,7 +292,7 @@
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
- order by sort,create_time DESC
|
|
|
|
|
|
+ order by sort,create_time
|
|
</select>
|
|
</select>
|
|
<select id="getArchiveFileByFileIds" resultMap="archiveFileResultMap">
|
|
<select id="getArchiveFileByFileIds" resultMap="archiveFileResultMap">
|
|
select * from u_archive_file where is_deleted = 0
|
|
select * from u_archive_file where is_deleted = 0
|
|
@@ -290,7 +302,7 @@
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
- order by sort,create_time DESC
|
|
|
|
|
|
+ order by sort,create_time
|
|
</select>
|
|
</select>
|
|
<select id="getListByProjectId" resultType="org.springblade.business.entity.ArchiveFile">
|
|
<select id="getListByProjectId" resultType="org.springblade.business.entity.ArchiveFile">
|
|
select id,project_id as projectId,node_id as nodeId,file_number as fileNumber,file_name as fileName,file_time as fileTime,file_url as fileUrl,pdf_file_url as pdfFileUrl,archive_id as archiveId,status,is_deleted as isDeleted,create_time as createTime
|
|
select id,project_id as projectId,node_id as nodeId,file_number as fileNumber,file_name as fileName,file_time as fileTime,file_url as fileUrl,pdf_file_url as pdfFileUrl,archive_id as archiveId,status,is_deleted as isDeleted,create_time as createTime
|
|
@@ -305,7 +317,7 @@
|
|
<select id="getAllArchiveFileUrl" resultType="org.springblade.business.entity.ArchiveFile">
|
|
<select id="getAllArchiveFileUrl" resultType="org.springblade.business.entity.ArchiveFile">
|
|
SELECT uaf.file_url ,uaf.pdf_file_url
|
|
SELECT uaf.file_url ,uaf.pdf_file_url
|
|
FROM u_archive_file uaf
|
|
FROM u_archive_file uaf
|
|
- WHERE uaf.project_id = #{projectId};
|
|
|
|
|
|
+ WHERE uaf.project_id = #{projectId} and uaf.is_deleted = 0;
|
|
</select>
|
|
</select>
|
|
<select id="getAllArchiveFileByArchiveIds" resultType="org.springblade.business.entity.ArchiveFile">
|
|
<select id="getAllArchiveFileByArchiveIds" resultType="org.springblade.business.entity.ArchiveFile">
|
|
SELECT * FROM u_archive_file
|
|
SELECT * FROM u_archive_file
|