Răsfoiți Sursa

甬台温日志查看

chenr 7 luni în urmă
părinte
comite
d940d6e9a8

+ 3 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IExcelTabService.java

@@ -17,6 +17,7 @@
 package org.springblade.manager.service;
 
 import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.jsoup.nodes.Document;
 import org.springblade.business.dto.TrialSelfInspectionRecordDTO;
@@ -136,7 +137,7 @@ public interface IExcelTabService extends BaseService<ExcelTab> {
     /**
      * 获取试验用户端 单个表单接口数据
      */
-    List<Map<String, Object>> getBussDataInfoTrial(Long id, Long pkeyId, Long contractId, Long entrustId, Integer type,Long nodeId);
+    List<Map<String, Object>> getBussDataInfoTrial(Long id, Long pkeyId, Long contractId, Long entrustId, Integer type,Long nodeId,JSONObject jsonObject);
 
     /**
      * 获取试验用户端 单个表单接口数据 - 关联施工
@@ -209,5 +210,5 @@ public interface IExcelTabService extends BaseService<ExcelTab> {
      * @param contractId
      * @return
      */
-    List<Map<String, Object>> getBussDataInfoTrialentrust(Long id, Long pkeyId, Long contractId, Long sampleId);
+    List<Map<String, Object>> getBussDataInfoTrialentrust(Long id, Long pkeyId, Long contractId, Long sampleId, JSONObject jsonObject);
 }

+ 22 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -2527,7 +2527,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
      * 试验 获取填报信息
      */
     @Override
-    public List<Map<String, Object>> getBussDataInfoTrial(Long groupId, Long pkeyId, Long contractId, Long entrustId, Integer type,Long nodeId) {
+    public List<Map<String, Object>> getBussDataInfoTrial(Long groupId, Long pkeyId, Long contractId, Long entrustId, Integer type,Long nodeId,JSONObject jsonObject) {
         String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
         String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
         List<Map<String, Object>> list = new ArrayList<>();
@@ -2541,7 +2541,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         if (wbsTreePrivate.getHtmlUrl() == null) {
             return list;
         }
-
         //表单是否存储在
         String tabName = wbsTreePrivate.getInitTableName();
         String isExitSql = "select * from information_schema.TABLES where TABLE_NAME='" + tabName + "'";
@@ -2820,6 +2819,15 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         reData.remove("pkeyId");
         reData.remove("projectId");
         chart(reData, wbsTreePrivate);
+        if(ObjectUtil.isNotEmpty(jsonObject)){
+            for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
+                if(entry.getKey().contains("key")){
+                    if(!reData.containsKey(entry.getKey())){
+                        reData.put(entry.getKey(),entry.getValue());
+                    }
+                }
+            }
+        }
         list.add(reData);
         return list;
     }
@@ -3030,7 +3038,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
 
         //获取数据信息info
-        List<Map<String, Object>> bussDataInfoTrial = this.getBussDataInfoTrial(id, pkeyId, Long.parseLong(contractId),null,null,null);
+        List<Map<String, Object>> bussDataInfoTrial = this.getBussDataInfoTrial(id, pkeyId, Long.parseLong(contractId),null,null,null,null);
         Map<String, Object> DataInfo = new HashMap<>();
         if (bussDataInfoTrial.size() > 0) {
             DataInfo.putAll(bussDataInfoTrial.stream().findAny().orElse(null));
@@ -4084,7 +4092,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
 
         //获取数据信息info
-        List<Map<String, Object>> bussDataInfoTrial = this.getBussDataInfoTrial(groupId, pkeyId, Long.parseLong(contractId),null,null,null);
+        List<Map<String, Object>> bussDataInfoTrial = this.getBussDataInfoTrial(groupId, pkeyId, Long.parseLong(contractId),null,null,null,null);
         Map<String, Object> DataInfo = new HashMap<>();
         if (bussDataInfoTrial.size() > 0) {
             DataInfo.putAll(bussDataInfoTrial.stream().findAny().orElse(null));
@@ -4465,7 +4473,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
      * 试验 委托单获取填报信息  groupId和sampleId1必须传其中一个
      */
     @Override
-    public List<Map<String, Object>> getBussDataInfoTrialentrust(Long groupId, Long pkeyId, Long contractId,Long sampleId1) {
+    public List<Map<String, Object>> getBussDataInfoTrialentrust(Long groupId, Long pkeyId, Long contractId,Long sampleId1,JSONObject jsonObject) {
         String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
         String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
         List<Map<String, Object>> list = new ArrayList<>();
@@ -4642,6 +4650,15 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         reData.remove("pkeyId");
         reData.remove("projectId");
         chart(reData, wbsTreePrivate);
+        if(ObjectUtil.isNotEmpty(jsonObject)){
+            for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
+                if(entry.getKey().contains("key")){
+                    if(!reData.containsKey(entry.getKey())){
+                        reData.put(entry.getKey(),entry.getValue());
+                    }
+                }
+            }
+        }
         list.add(reData);
         return list;
     }