浏览代码

资料查询 重置文件题名优化

chenr 2 月之前
父节点
当前提交
c4fbee678a

+ 8 - 1
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -200,7 +200,7 @@ public class InformationWriteQueryController extends BladeController {
             .map(Long::valueOf)
             .collect(Collectors.toList());
         List<InformationQuery> queryList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery()
-            .select(InformationQuery::getId, InformationQuery::getName,InformationQuery::getProjectId,InformationQuery::getClassify).in(InformationQuery::getId, idList));
+            .select(InformationQuery::getId, InformationQuery::getName,InformationQuery::getProjectId,InformationQuery::getClassify,InformationQuery::getStatus).in(InformationQuery::getId, idList));
         String sgSuffix="";
         String jlSuffix="";
         if(queryList.size()>0){
@@ -222,6 +222,13 @@ public class InformationWriteQueryController extends BladeController {
                 }
             }
         }
+        List<InformationQuery> taskList = queryList.stream().filter(o -> o.getStatus() == 1 || o.getStatus() == 2).collect(Collectors.toList());
+        if(taskList.size()>0){
+            for (InformationQuery query : taskList) {
+                String update="update u_task set task_name='"+query.getName()+"' where form_data_id='"+query.getId()+"' and is_deleted=0";
+                jdbcTemplate.update(update);
+            }
+        }
         return R.status(this.informationQueryService.updateBatchById(queryList));
     }