浏览代码

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

yangyj 2 年之前
父节点
当前提交
92c2a1fa06

+ 6 - 0
blade-service-api/blade-archive-api/src/main/java/org/springblade/archive/entity/ArchivesAuto.java

@@ -147,4 +147,10 @@ public class ArchivesAuto extends BaseEntity {
 	//是否案卷收集上传的案卷
 	private Integer isAutoFile;
 
+	private Integer autoFileSort;
+
+	/**
+	 * 立卷单位
+	 * **/
+	private String filingUnit;
 }

+ 10 - 0
blade-service-api/blade-archive-api/src/main/java/org/springblade/archive/vo/ArchivesAutoVO.java

@@ -60,6 +60,16 @@ public class ArchivesAutoVO extends ArchivesAuto {
 	private String nodeIds;
 
 	private List<String> nodeIdArray;
+
+	/**
+	 * 保密级别
+	 */
+	private String secretLevelValue;
+
+	/**
+	 * 保管期限(单位/年)
+	 */
+	private String storageTimeValue;
 	/**
 	* 案卷收集附件信息
 	* */

+ 4 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/ArchiveFile.java

@@ -239,4 +239,8 @@ public class ArchiveFile extends BaseEntity {
 	 */
 	@ApiModelProperty("分盒编号")
 	private Integer boxNumber;
+
+	//是否案卷收集上传的案卷
+	@ApiModelProperty("是否案卷收集上传的案卷")
+	private Integer isAutoFile;
 }

+ 1 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/controller/ArchiveFileAutoController.java

@@ -69,6 +69,7 @@ public class ArchiveFileAutoController extends BladeController {
                         for (ArchivesAutoVO.ApprovalFile approvalFile : saveList) {
                             ArchiveFileVO saveVo = BeanUtil.copy(approvalFile, ArchiveFileVO.class);
                             saveVo.setSort(l + i);
+                            saveVo.setIsAutoFile(1);
                             saveVo.setStatus(new Integer("0").equals(saveVo.getIsApproval()) ? 2 : 0);
                             saveVo.setIsCertification(new Integer("0").equals(saveVo.getIsNeedCertification()) ? 1 : 0);
                             saveVos.getList().add(saveVo);

+ 2 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/mapper/ArchivesAutoMapper.xml

@@ -45,6 +45,8 @@
         <result column="isOpen" property="isOpen"/>
         <result column="ischeck" property="ischeck"/>
         <result column="is_auto_file" property="isAutoFile"/>
+        <result column="auto_file_sort" property="autoFileSort"/>
+        <result column="filing_unit" property="filingUnit"/>
     </resultMap>
 
 

+ 19 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java

@@ -18,6 +18,7 @@ package org.springblade.archive.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
 import org.springblade.archive.entity.ArchivesAuto;
 import org.springblade.archive.vo.ArchivesAutoVO;
@@ -28,6 +29,7 @@ import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.system.entity.DictBiz;
+import org.springblade.system.feign.IDictBizClient;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
@@ -40,8 +42,10 @@ import java.util.List;
  * @since 2023-02-17
  */
 @Service
+@AllArgsConstructor
 public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper, ArchivesAuto> implements IArchivesAutoService {
 
+	private final IDictBizClient iDictBizClient;
 	@Override
 	public IPage<ArchivesAutoVO> selectArchivesAutoPage(IPage<ArchivesAutoVO> page, ArchivesAutoVO archivesAuto) {
 		return page.setRecords(baseMapper.selectArchivesAutoPage(page, archivesAuto));
@@ -67,6 +71,21 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 		//设置分页信息
 		iPage.setTotal(total);
 		List<ArchivesAutoVO> pageVoList = JSONArray.parseArray(JSONObject.toJSONString(pageList), ArchivesAutoVO.class);
+		List<DictBiz> sheetSourceList = this.iDictBizClient.getList("security_level", "notRoot").getData();
+		List<DictBiz> sheetSourceList1 = this.iDictBizClient.getList("storage_period", "notRoot").getData();
+
+		pageVoList.forEach(vos -> {
+			if(StringUtils.isNotEmpty(vos.getSecretLevel()) || StringUtils.isNotEmpty(vos.getStorageTime())){
+				sheetSourceList.forEach(source -> {
+					if(StringUtils.isNotEmpty(vos.getSecretLevel()) && source.getDictKey().equals(vos.getSecretLevel())){
+						vos.setSecretLevelValue(source.getDictValue());
+					}
+					if(StringUtils.isNotEmpty(vos.getStorageTime()) && source.getDictKey().equals(vos.getStorageTime())){
+						vos.setStorageTimeValue(source.getDictValue());
+					}
+				});
+			}
+		});
 
 		return iPage.setRecords(pageVoList);
 	}

+ 6 - 4
blade-service/blade-business/src/main/java/org/springblade/business/mapper/ArchiveFileMapper.xml

@@ -49,6 +49,7 @@
         <result column="sort" property="sort"/>
         <result column="box_name" property="boxName"/>
         <result column="box_number" property="boxNumber"/>
+        <result column="is_auto_file" property="isAutoFile"/>
     </resultMap>
     <update id="recoveryByIds">
         update u_archive_file set is_deleted = 0 where
@@ -59,7 +60,7 @@
     </update>
 
     <select id="selectArchiveFileCount" resultType="java.lang.Integer">
-        select count(id) from u_archive_file where is_deleted = 0
+        select count(id) from u_archive_file where is_deleted = 0  and is_auto_file != 1
         <if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
             and status = #{vo.isApprovalValue}
         </if>
@@ -72,6 +73,7 @@
         <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=")">
@@ -91,7 +93,7 @@
     </select>
 
     <select id="selectArchiveFilePage" resultMap="archiveFileResultMap">
-        select * from u_archive_file where is_deleted = 0
+        select * from u_archive_file where is_deleted = 0 and is_auto_file != 1
         <if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
             and status = #{vo.isApprovalValue}
         </if>
@@ -124,7 +126,7 @@
     </select>
 
     <select id="selectArchiveFilePageByBoxNameCount" resultType="java.lang.Integer">
-        select count(id) from u_archive_file where is_deleted = 0
+        select count(id) from u_archive_file where is_deleted = 0 and is_auto_file != 1
         <if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
             and status = #{vo.isApprovalValue}
         </if>
@@ -166,7 +168,7 @@
         order by box_number,sort,create_time DESC
     </select>
     <select id="selectArchiveFilePageByBoxName" resultMap="archiveFileResultMap">
-        select * from u_archive_file where is_deleted = 0
+        select * from u_archive_file where is_deleted = 0 and is_auto_file != 1
         <if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
             and status = #{vo.isApprovalValue}
         </if>