|
|
@@ -305,7 +305,7 @@
|
|
|
</select>
|
|
|
<select id="pageByArchivesAuto" resultMap="archivesAutoResultMap">
|
|
|
select uaa.* from m_archive_tree_contract matc left join u_archives_auto uaa on matc.id = uaa.node_id left join u_archive_file uaf on uaa.id = uaf.archive_id
|
|
|
- where uaa.is_deleted = 0
|
|
|
+ where uaa.is_deleted = 0 and uaa.is_archive = 1
|
|
|
<if test="vo.projectId != null and vo.projectId != ''">
|
|
|
and matc.project_id = #{vo.projectId}
|
|
|
</if>
|
|
|
@@ -359,7 +359,7 @@
|
|
|
or ancestors like concat('%',#{nodeId},'%') or id = #{nodeId}
|
|
|
</foreach>
|
|
|
) matc left join u_archives_auto uaa on matc.id = uaa.node_id left join u_archive_file uaf on uaa.id = uaf.archive_id
|
|
|
- where uaa.is_deleted = 0
|
|
|
+ where uaa.is_deleted = 0 and uaa.is_archive = 1
|
|
|
<if test="vo.contractId != null and vo.contractId != ''">
|
|
|
and uaa.contract_id = #{vo.contractId}
|
|
|
</if>
|
|
|
@@ -418,7 +418,7 @@
|
|
|
select uaa.id,uaa.file_number,uaa.name,uaa.file_size,CASE uaa.storage_time WHEN '1' THEN '10年' WHEN '2' THEN '30年' ELSE '永久' END as storageTimeValue
|
|
|
from(
|
|
|
select id from m_archive_tree_contract
|
|
|
- where project_id = #{vo.projectId} and ancestors like concat('%', #{vo.nodeId}, '%') or id = #{vo.nodeId}
|
|
|
+ where project_id = #{vo.projectId} and ancestors like concat('%', #{vo.nodeId}, '%') and is_deleted = 0 or id = #{vo.nodeId}
|
|
|
) matc
|
|
|
left join u_archives_auto uaa on matc.id = uaa.node_id
|
|
|
where
|
|
|
@@ -434,11 +434,12 @@
|
|
|
<if test="vo.filingUnit != null and vo.filingUnit != ''">
|
|
|
and uaa.filing_unit = #{vo.filingUnit}
|
|
|
</if>
|
|
|
+ and uaa.is_archive = 1
|
|
|
</select>
|
|
|
<select id="getFilingUnitList" resultType="java.lang.String">
|
|
|
- SELECT filing_unit
|
|
|
- FROM u_archives_auto WHERE project_id =#{projectId} AND filing_unit is not NULL
|
|
|
- GROUP BY filing_unit
|
|
|
+ SELECT unit
|
|
|
+ FROM u_archives_auto WHERE project_id =#{projectId} and is_deleted = 0 AND unit is not NULL
|
|
|
+ GROUP BY unit
|
|
|
</select>
|
|
|
<select id="getCarrierTypeByDict" resultType="org.springblade.system.entity.DictBiz">
|
|
|
SELECT * FROM blade_dict_biz WHERE code = 'storage_type' AND parent_id > 0 AND tenant_id = 000000
|