Quellcode durchsuchen

Merge remote-tracking branch 'origin/test-merge' into test-merge

LHB vor 1 Monat
Ursprung
Commit
222f85d6fd

+ 54 - 51
blade-service/blade-business/src/main/java/org/springblade/business/mapper/ImageClassificationFileMapper.xml

@@ -73,60 +73,63 @@
 
     <select id="selectImageClassificationFilePage" resultMap="imageClassificationFileResultMap">
         select
-            files.id,
-            files.title,
-            files.text_content,
-            files.shooting_user,
-            files.shooting_time,
-            files.file_size,
-            files.image_url,
-            files.pdf_url,
-            files.type,
-            files.marge_pdf_url,
-            files.create_time,
-            files.wbs_id
+        files.id,
+        files.title,
+        files.text_content,
+        files.shooting_user,
+        files.shooting_time,
+        files.file_size,
+        files.image_url,
+        files.pdf_url,
+        files.type,
+        files.marge_pdf_url,
+        files.create_time,
+        files.wbs_id
         from
         (
-            select
-                wbs_id,
-                create_time,
-                id,
-                title,
-                text_content,
-                shooting_user,
-                shooting_time,
-                file_size,
-                image_url,
-                pdf_url,
-                marge_pdf_url,
-                type,
-                date_format(shooting_time,'%Y-%m-%d') as shootingTimeStr
-            from u_image_classification_file
-            where is_deleted = 0 and status = 1
-                and project_id = #{param.projectId}
-                and classify_id = #{param.classifyId}
-            <if test="param.contractId != null and param.contractId != ''">
-                and contract_id = #{param.contractId}
-            </if>
-            <if test="param.queryStr != null and param.queryStr != ''">
-                and (title like concat('%',#{param.queryStr},'%') OR shooting_user like concat('%',#{param.queryStr},'%'))
-            </if>
-            <if test="param.wbsIds != null and param.wbsIds.size != 0">
-                and wbs_id in
-                <foreach collection="param.wbsIds" item="wbsId" open="(" separator="," close=")">
-                    #{wbsId}
-                </foreach>
-            </if>
-            <if test="param.staDate != null and param.staDate != ''">
-                <![CDATA[ and  shooting_time >= DATE_FORMAT(#{param.staDate}, '%Y-%m-%d %H:%i:%S') ]]>
-            </if>
-            <if test="param.endDate != null and param.endDate != ''">
-                <![CDATA[ and  shooting_time <= DATE_FORMAT(#{param.endDate}, '%Y-%m-%d %H:%i:%S') ]]>
-            </if>
-                order by shooting_time desc
-            ) as files
+        select
+        uicf.wbs_id,
+        uicf.create_time,
+        uicf.id,
+        uicf.title,
+        uicf.text_content,
+        uicf.shooting_user,
+        uicf.shooting_time,
+        uicf.file_size,
+        uicf.image_url,
+        uicf.pdf_url,
+        uicf.marge_pdf_url,
+        uicf.type,
+        date_format(uicf.shooting_time,'%Y-%m-%d') as shootingTimeStr
+        from u_image_classification_file uicf
+        <if test="param.wbsIds == null or param.wbsIds.size == 0">
+            JOIN m_wbs_tree_contract mwtc ON uicf.wbs_id = mwtc.p_key_id AND mwtc.is_deleted = 0
+        </if>
+        where uicf.is_deleted = 0 and uicf.status = 1
+        and uicf.project_id = #{param.projectId}
+        and uicf.classify_id = #{param.classifyId}
+        <if test="param.contractId != null and param.contractId != ''">
+            and uicf.contract_id = #{param.contractId}
+        </if>
+        <if test="param.queryStr != null and param.queryStr != ''">
+            and (uicf.title like concat('%',#{param.queryStr},'%') OR uicf.shooting_user like concat('%',#{param.queryStr},'%'))
+        </if>
+        <if test="param.wbsIds != null and param.wbsIds.size != 0">
+            and uicf.wbs_id in
+            <foreach collection="param.wbsIds" item="wbsId" open="(" separator="," close=")">
+                #{wbsId}
+            </foreach>
+        </if>
+        <if test="param.staDate != null and param.staDate != ''">
+            <![CDATA[ and uicf.shooting_time >= DATE_FORMAT(#{param.staDate}, '%Y-%m-%d %H:%i:%S') ]]>
+        </if>
+        <if test="param.endDate != null and param.endDate != ''">
+            <![CDATA[ and uicf.shooting_time <= DATE_FORMAT(#{param.endDate}, '%Y-%m-%d %H:%i:%S') ]]>
+        </if>
+        order by uicf.shooting_time desc
+        ) as files
         where
-            1 = 1
+        1 = 1
         <if test="param.queryDate != null and param.queryDate != ''">
             and files.shootingTimeStr like concat('%',#{param.queryDate},'%')
         </if>

+ 8 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -2292,7 +2292,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             }
             Elements dateElements = doc.select("el-date-picker");
             if(!dateElements.isEmpty()){
-                for (Element element : dateElements) {
+              a:  for (Element element : dateElements) {
                     String keyname = element.attr("keyname");
                     String placeholder = element.attr("placeholder");
                     if(StringUtils.isNotEmpty(placeholder)&&placeholder.equals("取样时间")){
@@ -2300,6 +2300,13 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     }
                     dateKeyNames.add(keyname);
                     if(!DataInfo.containsKey(keyname)||(StringUtils.isEmpty(DataInfo.get(keyname).toString()))){
+                        String[] strings = keyname.split("__");
+                        Set<String> keySet = DataInfo.keySet();
+                        for (String key : keySet) {
+                            if(key.contains(strings[0])){
+                                continue  a;
+                            }
+                        }
                         dateFlag=false;
                     }
                 }

+ 2 - 2
blade-service/blade-repair/src/main/java/org/springblade/repair/controller/CheckAndRepairController.java

@@ -436,7 +436,7 @@ public class CheckAndRepairController {
     private final TransactionTemplate transactionTemplate;
     @RequestMapping("/checkAndRepairExcelHtmlDefaultValue")
     @ApiOperation("定时检测修复ExcelHtml")
-    @Scheduled(cron = "00 00 01 * * ?")
+    //@Scheduled(cron = "00 00 01 * * ?")
     public void checkAndRepairExcelHtmlDefaultValue() {
 //        String projectSql = "SELECT * from m_project_info WHERE is_deleted = 0 and id != 1904814720589430785";
         String projectSql = "SELECT * from m_project_info WHERE is_deleted = 0 and id = 1630011899725201410";
@@ -738,7 +738,7 @@ public class CheckAndRepairController {
      * 检查元素库的元素 根据key和html上的元素是否对应
      */
     @GetMapping("/checkAndRepairElementAndHtml")
-    @Scheduled(cron = "0 00  4 * * ?")
+    //@Scheduled(cron = "0 00  4 * * ?")
     public void checkAndRepairElementAndHtml() throws Exception {
         String sql=" select id,tab_en_name from m_table_info where is_deleted=0";
         List<TableInfo> TableInfoList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(TableInfo.class));