Bläddra i källkod

Merge branch 'master' of http://47.110.251.215:3000/java_org/bladex

huangtf 2 år sedan
förälder
incheckning
bc5d40d792

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

@@ -85,6 +85,8 @@ public class ArchiveFileAutoController extends BladeController {
                                 saveVo.setFileType((long) FileUtils.getFileType(name));
                             }
                             saveVo.setSourceType(2);
+                            saveVo.setProjectId(archive.getProjectId() == null?"":archive.getProjectId().toString());
+                            saveVo.setContractId(archive.getContractId()==null?"":archive.getContractId().toString());
                             list.add(saveVo);
                             if(saveVo.getFilePage() != null && !saveVo.getFilePage().equals("")){
                                 pageN = pageN + saveVo.getFilePage();

+ 8 - 3
blade-service/blade-archive/src/main/java/org/springblade/archive/mapper/ArchivesAutoMapper.xml

@@ -93,9 +93,14 @@
         <if test="vo.contractId != null and vo.contractId != ''">
             and contract_id = #{vo.contractId}
         </if>
-        <if test="vo.isArchive != null and vo.isArchive != ''">
-            and is_archive = #{vo.isArchive}
-        </if>
+        <choose>
+            <when test="vo.isArchive != null and vo.isArchive != ''">
+                and  is_auto_file = #{vo.isArchive}
+            </when>
+            <otherwise>
+                and (is_auto_file is null or is_auto_file != 1)
+            </otherwise>
+        </choose>
         <if test="vo.isAutoFile != null and vo.isAutoFile != ''">
             and is_auto_file = #{vo.isAutoFile}
         </if>

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

@@ -100,7 +100,7 @@
     </select>
 
     <select id="selectArchiveFilePage" resultMap="archiveFileResultMap">
-        select * from u_archive_file where is_deleted = 0 and (is_auto_file is null or is_auto_file != 1)
+        select * from u_archive_file where is_deleted = 0
         <if test="vo.isApprovalValue != null and vo.isApprovalValue != ''">
             and status = #{vo.isApprovalValue}
         </if>
@@ -113,9 +113,17 @@
         <if test="vo.contractId != null and vo.contractId != ''">
             and contract_id = #{vo.contractId}
         </if>
-        <if test="vo.archive_id != null and vo.archive_id != ''">
-            and archive_id = #{vo.archive_id}
+        <if test="vo.archiveId != null and vo.archiveId != ''">
+            and archive_id = #{vo.archiveId}
         </if>
+        <choose>
+            <when test="vo.isArchive != null and vo.isArchive != ''">
+                and  is_auto_file = #{vo.isArchive}
+            </when>
+            <otherwise>
+                and (is_auto_file is null or is_auto_file != 1)
+            </otherwise>
+        </choose>
         <if test="vo.nodeIds != null and vo.nodeIds != ''">
             and node_id in
             <foreach collection="vo.nodeIdArray" item="nodeId" open="(" separator="," close=")">