Explorar o código

委托单取消关联样品

cr hai 1 mes
pai
achega
17ec25c494

+ 2 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/IEntrustInfoService.java

@@ -77,4 +77,6 @@ public interface IEntrustInfoService extends BaseService<EntrustInfo> {
 	R checkSample(Long sampleId);
 
     R annul(String id);
+
+	void cancelSample(Long groupId, Long pkeyId, Long contractId, Long sampleId1);
 }

+ 10 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -4725,16 +4725,21 @@ public class ExcelTabController extends BladeController {
             @ApiImplicitParam(name = "id", value = "记录id-当做groupId", required = true),
             @ApiImplicitParam(name = "contractId", value = "合同段id", required = true)
     })
-    public R<List<Map<String, Object>>> getBussDataInfoTrialentrust(Long id, Long pkeyId, Long contractId, Long sampleId, String formData,Boolean isCancel) {
+    public R<List<Map<String, Object>>> getBussDataInfoTrialentrust(Long id, Long pkeyId, Long contractId, Long sampleId, String formData) {
         JSONObject jsonObject = JSONObject.parseObject(formData);
         Boolean isrmove=true;
-        if(isCancel==null){
-            isCancel=false;
-        }
-        List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrialentrust(id, pkeyId, contractId, sampleId, jsonObject,isrmove,isCancel);
+        List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrialentrust(id, pkeyId, contractId, sampleId, jsonObject,isrmove);
         return R.data(bussDataInfoTrial);
     }
 
+    @GetMapping("/cancelSample")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "委托单取消关联样品")
+    public R cancelSample(Long groupId, Long pkeyId, Long contractId,Long sampleId1) throws Exception {
+        excelTabService.cancelSample(groupId,pkeyId,contractId,sampleId1);
+        return R.status(true);
+    }
+
     public static synchronized InputStream getOSSInputStream2(String urlStr) throws Exception {
         //获取OSS文件流
         URL url = new URL(urlStr);

+ 1 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ExcelTabClientImpl.java

@@ -472,7 +472,7 @@ public class ExcelTabClientImpl implements ExcelTabClient {
     public R saveReEntrustTabData(ReSigningEntrustDto dto, String header) {
         WbsTreePrivate wbsTreePrivate = jdbcTemplate.queryForObject("select * from m_wbs_tree_private where p_key_id=" + dto.getNodeId(), new BeanPropertyRowMapper<>(WbsTreePrivate.class));
         Boolean isRemove=true;
-        List<Map<String, Object>> list = excelTabService.getBussDataInfoTrialentrust(Long.parseLong(dto.getEntrustId()), wbsTreePrivate.getJlerTreeId(), Long.parseLong(dto.getContractId()), null, null,isRemove,false);
+        List<Map<String, Object>> list = excelTabService.getBussDataInfoTrialentrust(Long.parseLong(dto.getEntrustId()), wbsTreePrivate.getJlerTreeId(), Long.parseLong(dto.getContractId()), null, null,isRemove);
         Map<String, Object> map = list.get(0);
         if(!map.containsKey("contractId")){
             map.put("contractId",dto.getContractId());

+ 8 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IExcelTabService.java

@@ -212,5 +212,13 @@ public interface IExcelTabService extends BaseService<ExcelTab> {
      * @param contractId
      * @return
      */
+    List<Map<String, Object>> getBussDataInfoTrialentrust(Long id, Long pkeyId, Long contractId, Long sampleId, JSONObject jsonObject,Boolean isremove);
+
+    void synchronizedPdf(List<TableInfo> tableInfoList, String nodeId, String classify, String contractId, String projectId) throws Exception;
+
+
+
+    void cancelSample(Long groupId, Long pkeyId, Long contractId, Long sampleId1) throws Exception;
+
     List<Map<String, Object>> getBussDataInfoTrialentrust(Long id, Long pkeyId, Long contractId, Long sampleId, JSONObject jsonObject,Boolean isremove,Boolean isCaneal);
 }

+ 278 - 49
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -2754,7 +2754,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     trialMaterialMobilization = null;
                 }
                 //通过html获取页面上的key值 返回key值对应的数据
-                List<String> isCancelList = setBasicFormData(doc, reData, sampleInfo, trialMaterialMobilization, entrustInfo, false);
+              setBasicFormData(doc, reData, sampleInfo, trialMaterialMobilization, entrustInfo);
             }
             //第一次新增 回显系统生成的编号
             if(type != null && nodeId != null){
@@ -2764,6 +2764,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 trialSelfInspectionRecordDTO.setContractId(contractId);
                 trialSelfInspectionRecordDTO.setNodeId(nodeId);
                 trialSelfInspectionRecordDTO.setType(type);
+                trialSelfInspectionRecordDTO.setId(groupId);
                 HashMap<String, String> stringStringHashMap = trialSelfInspectionRecordClient.previewGeneratedReportOrRecordNum(trialSelfInspectionRecordDTO);
                 String mapType = stringStringHashMap.get("type");
                 if("报告单".equals(mapType)){
@@ -4776,7 +4777,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,JSONObject jsonObject,Boolean isremove,Boolean isCancel) {
+    public List<Map<String, Object>> getBussDataInfoTrialentrust(Long groupId, Long pkeyId, Long contractId,Long sampleId1,JSONObject jsonObject,Boolean isremove) {
         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<>();
@@ -4848,7 +4849,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         //实体数据
         String querySql = "select * from " + wbsTreePrivate.getInitTableName() + " where p_key_id=" + pkeyId + " and group_id = " + groupId;
         List<Map<String, Object>> dataIn = jdbcTemplate.queryForList(querySql);
-        List<String> isCancelList=new ArrayList<>();
         //匹配关联
         try {
             String fileUrl = wbsTreePrivate.getHtmlUrl();
@@ -4931,7 +4931,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 }
             }
             //通过html获取页面上的key值 返回key值对应的数据
-             isCancelList = setBasicFormData(doc, reData, sampleInfo, trialMaterialMobilization, null, isCancel);
+             setBasicFormData(doc, reData, sampleInfo, trialMaterialMobilization, null);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -4963,12 +4963,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
         chart(reData, wbsTreePrivate);
         if(ObjectUtil.isNotEmpty(jsonObject)){
-            if(isCancel){
-                if(isCancelList.size()>0){
-                    List<String> finalIsCancelList = isCancelList;
-                    jsonObject.entrySet().removeIf(entry -> finalIsCancelList.contains(entry.getKey()));
-                }
-            }
             for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
                 if(entry.getKey().contains("key")){
                     if(!reData.containsKey(entry.getKey())){
@@ -4981,7 +4975,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         return list;
     }
 
-    private static List<String> setBasicFormData(Document doc, Map<String, Object> reData, TrialSampleInfo sampleInfo ,TrialMaterialMobilization trialMaterialMobilization, EntrustInfo entrustInfo,Boolean isCancel) {
+    private static List<String> setBasicFormData(Document doc, Map<String, Object> reData, TrialSampleInfo sampleInfo ,TrialMaterialMobilization trialMaterialMobilization, EntrustInfo entrustInfo) {
         List<String> isCancelList=new ArrayList<>();
         if(sampleInfo==null){
             sampleInfo=new TrialSampleInfo();
@@ -4994,42 +4988,45 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
             format= simpleDateFormat.format(mobilizationDate);
         }
-        setFirstData(doc,"批号",sampleInfo.getBatchNumber(),reData,isCancel,isCancelList);
-        setFirstData(doc,"生产批号",sampleInfo.getBatchNumber(),reData,isCancel,isCancelList);
-        setFirstData(doc,"样品编号",sampleInfo.getSpecificationNumber(),reData,isCancel,isCancelList);
-        setFirstData(doc,"取样地点",sampleInfo.getSamplingLocation(),reData,isCancel,isCancelList);
-        setFirstData(doc,"样品描述",sampleInfo.getSampleDescription(),reData,isCancel,isCancelList);
-        setFirstData(doc,"取样时间",sampleInfo.getSamplingDate(),reData,isCancel,isCancelList);
-        setFirstData(doc,"取样日期",sampleInfo.getSamplingDate(),reData,isCancel,isCancelList);
-        setFirstData(doc,"试样名称",sampleInfo.getMaterialName(),reData,isCancel,isCancelList);
-        setFirstData(doc,"样品名称",sampleInfo.getMaterialName(),reData,isCancel,isCancelList);
-        setFirstData(doc,"材料名称",sampleInfo.getMaterialName(),reData,isCancel,isCancelList);
-        setFirstData(doc,"规格 型号",sampleInfo.getSpecificationModel(),reData,isCancel,isCancelList);
-        setFirstData(doc,"规格型号",sampleInfo.getSpecificationModel(),reData,isCancel,isCancelList);
-        setFirstData(doc,"材料规格",sampleInfo.getSpecificationModel(),reData,isCancel,isCancelList);
-        setFirstData(doc,"规格(mm)",sampleInfo.getSpecificationModel(),reData,isCancel,isCancelList);
-        setFirstData(doc,"试样 数量",sampleInfo.getMaterialCount(),reData,isCancel,isCancelList);
-        setFirstData(doc,"试样数量",sampleInfo.getMaterialCount(),reData,isCancel,isCancelList);
-        setFirstData(doc,"代表数量",sampleInfo.getMaterialCount(),reData,isCancel,isCancelList);
-        setFirstData(doc,"拟用结构部 位",sampleInfo.getProposedPosition(),reData,isCancel,isCancelList);
-        setFirstData(doc,"拟用结构部位",sampleInfo.getProposedPosition(),reData,isCancel,isCancelList);
-        setFirstData(doc,"工程部位、构件编号",sampleInfo.getProposedPosition(),reData,isCancel,isCancelList);
-        setFirstData(doc,"工程部位、高程桩号",sampleInfo.getProposedPosition(),reData,isCancel,isCancelList);
-        setFirstData(doc,"设计强度 等级",sampleInfo.getDesignStrength(),reData,isCancel,isCancelList);
-        setFirstData(doc,"设计强度等级",sampleInfo.getDesignStrength(),reData,isCancel,isCancelList);
-        setFirstData(doc,"用途(使用在何工程部位)",sampleInfo.getProposedPosition(),reData,isCancel,isCancelList);
-        setFirstData(doc,"成型日期",null,reData,isCancel,isCancelList);
+        setFirstData(doc,"批号",sampleInfo.getBatchNumber(),reData,isCancelList);
+        setFirstData(doc,"生产批号",sampleInfo.getBatchNumber(),reData,isCancelList);
+        setFirstData(doc,"生产厂家",sampleInfo.getSamplingLocation(),reData,isCancelList);
+        setFirstData(doc,"样品编号",sampleInfo.getSpecificationNumber(),reData,isCancelList);
+        setFirstData(doc,"取样地点",sampleInfo.getSamplingLocation(),reData,isCancelList);
+        setFirstData(doc,"样品描述",sampleInfo.getSampleDescription(),reData,isCancelList);
+        setFirstData(doc,"取样时间",sampleInfo.getSamplingDate(),reData,isCancelList);
+        setFirstData(doc,"取样日期",sampleInfo.getSamplingDate(),reData,isCancelList);
+        setFirstData(doc,"试样名称",sampleInfo.getMaterialName(),reData,isCancelList);
+        setFirstData(doc,"样品名称",sampleInfo.getMaterialName(),reData,isCancelList);
+        setFirstData(doc,"材料名称",sampleInfo.getMaterialName(),reData,isCancelList);
+        setFirstData(doc,"规格 型号",sampleInfo.getSpecificationModel(),reData,isCancelList);
+        setFirstData(doc,"规格型号",sampleInfo.getSpecificationModel(),reData,isCancelList);
+        setFirstData(doc,"材料规格",sampleInfo.getSpecificationModel(),reData,isCancelList);
+        setFirstData(doc,"试验依据",sampleInfo.getSpecificationModel(),reData,isCancelList);
+        setFirstData(doc,"评定标准",sampleInfo.getSpecificationModel(),reData,isCancelList);
+        setFirstData(doc,"规格(mm)",sampleInfo.getSpecificationModel(),reData,isCancelList);
+        setFirstData(doc,"试样 数量",sampleInfo.getMaterialCount(),reData,isCancelList);
+        setFirstData(doc,"试样数量",sampleInfo.getMaterialCount(),reData,isCancelList);
+        setFirstData(doc,"代表数量",sampleInfo.getMaterialCount(),reData,isCancelList);
+        setFirstData(doc,"拟用结构部 位",sampleInfo.getProposedPosition(),reData,isCancelList);
+        setFirstData(doc,"拟用结构部位",sampleInfo.getProposedPosition(),reData,isCancelList);
+        setFirstData(doc,"工程部位、构件编号",sampleInfo.getProposedPosition(),reData,isCancelList);
+        setFirstData(doc,"工程部位、高程桩号",sampleInfo.getProposedPosition(),reData,isCancelList);
+        setFirstData(doc,"设计强度 等级",sampleInfo.getDesignStrength(),reData,isCancelList);
+        setFirstData(doc,"设计强度等级",sampleInfo.getDesignStrength(),reData,isCancelList);
+        setFirstData(doc,"用途(使用在何工程部位)",sampleInfo.getProposedPosition(),reData,isCancelList);
+        setFirstData(doc,"成型日期",null,reData,isCancelList);
        // setFirstData(doc,"试件编号",sampleInfo.getSpecificationNumber(),reData,isCancel,isCancelList);
-        setFirstData(doc,"进场日期代表数量",format+"/"+representativeCount+calculationUnit,reData,isCancel,isCancelList);
-        setFirstData(doc,"材料进场日期",format,reData,isCancel,isCancelList);
+        setFirstData(doc,"进场日期代表数量",format+"/"+representativeCount+calculationUnit,reData,isCancelList);
+        setFirstData(doc,"材料进场日期",format,reData,isCancelList);
 
         if(entrustInfo != null){
-            setFirstData(doc,"委托编号",entrustInfo.getEntrustNo(),reData,isCancel,isCancelList);
-            setFirstData(doc,"本批材料数量",entrustInfo.getExpCount()+calculationUnit,reData,isCancel,isCancelList);
+            setFirstData(doc,"委托编号",entrustInfo.getEntrustNo(),reData,isCancelList);
+            setFirstData(doc,"本批材料数量",entrustInfo.getExpCount()+calculationUnit,reData,isCancelList);
         }
         if(trialMaterialMobilization != null){
-            setFirstData(doc,"生产厂家",trialMaterialMobilization.getPlaceOfProduction(),reData,isCancel,isCancelList);
-            setFirstData(doc,"供应商",trialMaterialMobilization.getPlaceOfProduction(),reData,isCancel,isCancelList);
+            setFirstData(doc,"生产厂家",trialMaterialMobilization.getPlaceOfProduction(),reData,isCancelList);
+            setFirstData(doc,"供应商",trialMaterialMobilization.getPlaceOfProduction(),reData,isCancelList);
         }
         return isCancelList;
     }
@@ -5041,8 +5038,11 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
      * @param value
      * @param reData
      */
-    private static void  setFirstData(Document doc, String elementValue,Object value,Map<String, Object> reData,Boolean isCancel,List<String> isCancelList) {
+    private static void  setFirstData(Document doc, String elementValue,Object value,Map<String, Object> reData,List<String> isCancelList) {
 
+        if(value==null){
+            value="";
+        }
         Elements select = doc.select("[placeholderxx=" + elementValue + "]");
 
         if(select.isEmpty()){//没找到加上:继续找
@@ -5067,9 +5067,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             }
             if(textareaElement != null){//正常情况
                 String id = textareaElement.attr("id");
-                if(isCancel){
-                    isCancelList.add(id);
-                }
+                isCancelList.add(id);
                 if(ObjectUtil.isNotEmpty(value)){
                     reData.put(id, value);
                 }
@@ -5098,9 +5096,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 Element textareaElement = select2.first();
                 if(textareaElement != null){//正常情况
                     String id = textareaElement.attr("id");
-                    if(isCancel){
-                        isCancelList.add(id);
-                    }
+                    isCancelList.add(id);
                     if(ObjectUtil.isNotEmpty(value)){
                         reData.put(id, value);
                     }
@@ -5109,6 +5105,239 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
     }
 
+    @Override
+    @Async("taskExecutor1")
+    public void synchronizedPdf(List<TableInfo> tableInfoList, String nodeId, String classify, String contractId, String projectId) {
+        try {
+            List<String> errorPKeyIds = new ArrayList<>();
+            //单个pdf加载
+            if (tableInfoList != null) {
+                tableInfoList.parallelStream().forEach(tableInfo -> {
+                    R bussPdfInfo = null;
+                    try {
+                        bussPdfInfo = this.getBussPdfInfo(Long.parseLong(tableInfo.getPkeyId()));
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                    if (ObjectUtil.isEmpty(bussPdfInfo) || bussPdfInfo.getCode() != 200) {
+                        //如果返回的单张pdfUrl为空,那么表示发生异常,返回异常信息
+                        errorPKeyIds.add(tableInfo.getPkeyId());
+                    }
+                });
+            }
+
+            //发生异常后直接返回,不进行合并
+//        if (errorPKeyIds.size() > 0) {
+//            List<AppWbsTreeContractVO> errorTabs = new LinkedList<>();
+//            for (AppWbsTreeContractVO appWbsTreeContractVO : tableAll) {
+//                if (errorPKeyIds.contains(appWbsTreeContractVO.getPKeyId().toString())) {
+//                    errorTabs.add(appWbsTreeContractVO);
+//                }
+//            }
+//            if (errorTabs.size() > 0) {
+//                List<String> names = errorTabs.stream().map(WbsTreeContract::getNodeName).collect(Collectors.toList());
+//                return R.fail("以下的表在生成pdf文件时发生了异常【" + StringUtils.join(names, "、") + "】");
+//            }
+//        }
+
+            //合并pdf加载
+            this.getBussPdfs(nodeId, classify, contractId, projectId);
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new ServiceException("问题");
+        }
+    }
+
+    @Override
+    public void cancelSample(Long groupId, Long pkeyId, Long contractId, Long sampleId1) throws Exception {
+        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<>();
+        Map<String, Object> reData = new HashMap<>();
+        WbsTreePrivate wbsTreePrivate = wbsTreePrivateService.getBaseMapper().selectOne(Wrappers.<WbsTreePrivate>query().lambda()
+                .select(WbsTreePrivate::getInitTableName, WbsTreePrivate::getHtmlUrl, WbsTreePrivate::getPKeyId, WbsTreePrivate::getProjectId)
+                .eq(WbsTreePrivate::getPKeyId, pkeyId));
+        if (wbsTreePrivate == null) {
+            return ;
+        }
+        if (wbsTreePrivate.getHtmlUrl() == null) {
+            return ;
+        }
+        //表单是否存储在
+        String tabName = wbsTreePrivate.getInitTableName();
+        String isExitSql = "select * from information_schema.TABLES where TABLE_NAME='" + tabName + "'";
+        List<Map<String, Object>> tabList = jdbcTemplate.queryForList(isExitSql);
+        if (tabList.size() <= 0) {
+            return ;
+        }
+        //获取引用数据信息
+        String loadDataId = "";
+        String sampleId = "";
+        if(groupId == null){
+            if(sampleId1!=null){
+                sampleId = sampleId1.toString();
+            }
+        }
+        try {
+            String sqlQuery = "select * from u_trial_self_data_record where record_id = " + groupId + " and tab_id = " + pkeyId;
+            List<Map<String, Object>> stringObjectMap = jdbcTemplate.queryForList(sqlQuery);
+            if (stringObjectMap != null && stringObjectMap.size() >= 1) {
+                loadDataId = stringObjectMap.get(0).get("load_data_id") + "";
+            }
+            if(groupId !=null){
+                String samQuery = "SELECT * from u_entrust_info where id=" + groupId + " ";
+                List<Map<String, Object>> strbjectMap = jdbcTemplate.queryForList(samQuery);
+                if (strbjectMap != null && strbjectMap.size() >= 1) {
+                    sampleId = strbjectMap.get(0).get("sample_id") + "";
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return ;
+        } finally {
+            reData.put("loadDataId", loadDataId);
+            reData.put("sampleId", sampleId);
+        }
+        TrialSampleInfo sampleInfo=null;
+        try {
+            String querySql1 = "select * from u_trial_sample_info where id=" + sampleId ;
+            sampleInfo= jdbcTemplate.queryForObject(querySql1, new BeanPropertyRowMapper<>(TrialSampleInfo.class));
+        } catch (Exception e) {
+            sampleInfo=null;
+        }
+        //用sampleId查询出关联的材料对象
+        String querySql2 = "select * from u_trial_material_mobilization where id =(select mobilization_id from u_trial_sampling_record where sample_info_id = "+sampleId+") ";
+        TrialMaterialMobilization trialMaterialMobilization = null;
+        try {
+            trialMaterialMobilization = jdbcTemplate.queryForObject(querySql2, new BeanPropertyRowMapper<>(TrialMaterialMobilization.class));
+        } catch (DataAccessException e) {
+            trialMaterialMobilization = null;
+        }
+        //实体数据
+        String querySql = "select * from " + wbsTreePrivate.getInitTableName() + " where p_key_id=" + pkeyId + " and group_id = " + groupId;
+        List<Map<String, Object>> dataIn = jdbcTemplate.queryForList(querySql);
+        List<String> isCancelList=new ArrayList<>();
+        //匹配关联
+        try {
+            String fileUrl = wbsTreePrivate.getHtmlUrl();
+            File file1 = ResourceUtil.getFile(fileUrl);
+            InputStream fileInputStream;
+            if (file1.exists()) {
+                fileInputStream = new FileInputStream(file1);
+            } else {
+                String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path, "");
+                fileInputStream = CommonUtil.getOSSInputStream(path);
+            }
+            String htmlString = IoUtil.readToString(fileInputStream);
+            htmlString = htmlString.replaceAll("placeholder", "placeholderxx");
+            htmlString = htmlString.replaceAll("title", "titlexx");
+            Document doc = Jsoup.parse(htmlString);
+
+            if (dataIn.size() >= 1) {
+                Map<String, Object> mysqlData = dataIn.get(0);
+                for (String key : mysqlData.keySet()) {
+                    String tabVal = mysqlData.get(key) + "";
+                    // 时间段处理
+                    if (StringUtils.isNotEmpty(tabVal) && !tabVal.equals("null")) {
+                        if (tabVal.contains("T") && tabVal.contains(".000Z]")) {
+                            String[] tabData = tabVal.split("_\\^_");
+
+                            if (reData.containsKey("pickerKey")) {
+                                String pickerKey = reData.get("pickerKey") + "," + key + "__" + tabData[1];
+                                reData.put("pickerKey", pickerKey);
+                            } else {
+                                reData.put("pickerKey", key + "__" + tabData[1]);
+                            }
+
+                            String sql = tabData[0];
+                            sql = sql.replaceAll("\\[", "['");
+                            sql = sql.replaceAll("]", "']");
+                            sql = sql.replaceAll("000Z,", "000Z',");
+                            sql = sql.replaceAll(", 20", ", '20");
+                            //   sql = sql.replaceAll("'", "");
+                            if (StringUtils.isNotEmpty(tabData[0])) {
+                                reData.put(key + "__" + tabData[1], sql);
+                            }
+                        } else if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z") >= 0) {//时间
+                            // 时间和字符串合作
+                            if (tabVal.indexOf("☆") >= 0) {
+                                String[] mysql = tabVal.split("☆");
+                                for (String data : mysql) {
+                                    String[] tabData = data.split("_\\^_");
+                                    if (StringUtils.isNotEmpty(tabData[0])) {
+                                        reData.put(key + "__" + tabData[1], tabData[0]);
+                                    }
+                                }
+                            } else {
+                                String[] tabData = tabVal.split("_\\^_");
+                                if (StringUtils.isNotEmpty(tabData[0])) {
+                                    reData.put(key + "__" + tabData[1], tabData[0]);
+                                }
+                            }
+                        } else if (tabVal.indexOf("☆") >= 0) {
+                            String[] mysql = tabVal.split("☆");
+                            for (String data : mysql) {
+                                String[] tabData = data.split("_\\^_");
+                                if (StringUtils.isNotEmpty(tabData[0])) {
+                                    reData.put(key + "__" + tabData[1], tabData[0]);
+                                }
+                            }
+                        } else if (tabVal.indexOf("_^_") >= 0) {
+                            String[] tabData = tabVal.split("_\\^_");
+                            if (StringUtils.isNotEmpty(tabData[0])) {
+                                if (tabVal.contains("[") && tabVal.contains("年")) {
+                                    String[] strings = StringUtils.strip(tabData[0], "[]").split(",");
+                                    reData.put(key + "__" + tabData[1], strings);
+                                } else {
+                                    reData.put(key + "__" + tabData[1], tabData[0]);
+                                }
+                            }
+                        } else {
+                            reData.put(key, tabVal);
+                        }
+                    }
+                }
+            }
+            //通过html获取页面上的key值 返回key值对应的数据
+            isCancelList = setBasicFormData(doc, reData, sampleInfo, trialMaterialMobilization, null);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        // 获取默认值
+        QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
+        queryWrapper.select("col_key", "sig_role_name");
+        queryWrapper.eq("type", 4);
+        queryWrapper.eq("tab_id", wbsTreePrivate.getPKeyId());
+        final List<TextdictInfo> textDictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
+        if (!textDictInfos.isEmpty()) {
+            for (TextdictInfo textdictInfo : textDictInfos) {
+                if (reData.containsKey(textdictInfo.getColKey())) {
+                    String keyVal = reData.get(textdictInfo.getColKey()) + "";
+                } else {
+                    reData.put(textdictInfo.getColKey() + "", textdictInfo.getSigRoleName());
+                }
+            }
+        }
+        chart(reData, wbsTreePrivate);
+        if(ObjectUtil.isNotEmpty(reData)){
+                if(isCancelList.size()>0){
+                    List<String> finalIsCancelList = isCancelList;
+                    reData.entrySet().removeIf(entry -> finalIsCancelList.contains(entry.getKey()));
+                }
+        }
+        reData.put("pkeyId",pkeyId);
+        reData.put("group_id",groupId);
+        JSONObject jsonObject = new JSONObject(reData);
+        JSONArray dataArray = new JSONArray();
+        String entrustInfoName = jsonObject.getString("entrustInfoName");
+        dataArray.add(jsonObject);
+        List<TableInfo> tableInfoList = getTableInfoListTrial(dataArray, "entrustInfo");
+        this.saveOrUpdateInfoTrial(tableInfoList, Func.toLong(groupId));
+        this.getEntrustPDFTrial(Func.toLong(pkeyId), String.valueOf(contractId), Func.toLong(groupId),entrustInfoName);
+        String sql="update u_entrust_info set sample_id=0, sample_status=0  where id="+groupId;
+        jdbcTemplate.update(sql);
+    }
+
     @Override
     public void synPdfKeyInfo(String nodeId, String classify, String contractId, String projectId) throws Exception {
         // 获取有权限的节点信息