Ver Fonte

档案收集增加数据,档案预警

qianxb há 1 ano atrás
pai
commit
a436d9407c

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

@@ -96,6 +96,9 @@ ArchiveFileAutoController extends BladeController {
                             saveVo.setSourceType(2);
                             saveVo.setProjectId(archive.getProjectId() == null ? "" : archive.getProjectId().toString());
                             saveVo.setContractId(archive.getContractId() == null ? "" : archive.getContractId().toString());
+                            saveVo.setIsElement(0);
+                            saveVo.setDutyUser(archive.getUnit());
+                            saveVo.setFileName(archive.getName());
                             list.add(saveVo);
                             if (saveVo.getFilePage() != null && !saveVo.getFilePage().equals("")) {
                                 pageN = pageN + saveVo.getFilePage();

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

@@ -154,7 +154,7 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 		//根据用户在当前合同段的权限,判断返回
 		BladeUser user = AuthUtil.getUser();
 		String name = baseMapper.getUserRoleName(vo.getProjectId(),vo.getContractId(),user.getUserId());
-		if (name.contains("超级管理员") || contractType == 3) {
+		if ((StringUtils.isNotBlank(name) && name.contains("超级管理员")) || contractType == 3) {
 			vo.setContractId(null);
 		}
 		if (StringUtils.isNotBlank(vo.getNodeIds())) {

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

@@ -138,17 +138,17 @@
         <if test="vo.rectification != null and vo.rectification != ''">
             and u.rectification = #{vo.rectification}
         </if>
-        <choose>
-            <when test="vo.isArchive != null and vo.isArchive != ''">
-                and u.is_auto_file = #{vo.isArchive}
-            </when>
-            <when test="vo.archiveId != null and vo.archiveId != ''">
-                and 1=1
-            </when>
-            <otherwise>
-                and (u.is_auto_file is null or u.is_auto_file != 1)
-            </otherwise>
-        </choose>
+<!--        <choose>-->
+<!--            <when test="vo.isArchive != null and vo.isArchive != ''">-->
+<!--                and u.is_auto_file = #{vo.isArchive}-->
+<!--            </when>-->
+<!--            <when test="vo.archiveId != null and vo.archiveId != ''">-->
+<!--                and 1=1-->
+<!--            </when>-->
+<!--            <otherwise>-->
+<!--                and (u.is_auto_file is null or u.is_auto_file != 1)-->
+<!--            </otherwise>-->
+<!--        </choose>-->
         <if test="vo.nodeIds != null and vo.nodeIds != ''">
             and u.node_id in
             <foreach collection="vo.nodeIdArray" item="nodeId" open="(" separator="," close=")">