Răsfoiți Sursa

2024 5 14 号

zhuwei 1 an în urmă
părinte
comite
b327c000f5
39 a modificat fișierele cu 946 adăugiri și 301 ștergeri
  1. 2 2
      blade-common/src/main/java/org/springblade/common/utils/AsyncConfigurer.java
  2. 5 0
      blade-common/src/main/java/org/springblade/common/utils/SystemUtils.java
  3. 4 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialSelfInspectionRecord.java
  4. 187 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/LoadDataInfoVO.java
  5. 3 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/StartTaskVO.java
  6. 1 1
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TaskApprovalVO.java
  7. 26 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialSampleDataInfoVO.java
  8. 7 1
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialSampleInfoVO.java
  9. 2 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/TrialSelfDataRecord.java
  10. 2 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/WbsTreePrivateVO4.java
  11. 25 11
      blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java
  12. 17 4
      blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialDetectionController.java
  13. 11 6
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSampleInfoMapper.xml
  14. 1 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSelfInspectionRecordMapper.xml
  15. 3 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/ITrialSelfInspectionRecordService.java
  16. 6 7
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java
  17. 10 12
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialMaterialMobilizationServiceImpl.java
  18. 15 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java
  19. 13 0
      blade-service/blade-business/src/main/java/org/springblade/business/utils/FileUtils.java
  20. 14 8
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/EVisaController.java
  21. 28 17
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/EVisaServiceImpl.java
  22. 1 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java
  23. 1 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreeController.java
  24. 4 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreePrivateController.java
  25. 14 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ExcelTabClientImpl.java
  26. 0 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/feign/WbsTreePrivateClientImpl.java
  27. 13 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IExcelTabService.java
  28. 3 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IWbsFormElementService.java
  29. 3 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeContractServiceImpl.java
  30. 1 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeContractSyncImpl.java
  31. 436 114
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java
  32. 1 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TextdictInfoServiceImpl.java
  33. 20 16
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsFormElementServiceImpl.java
  34. 23 10
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreeContractServiceImpl.java
  35. 3 10
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreePrivateServiceImpl.java
  36. 0 62
      blade-service/blade-manager/src/main/java/org/springblade/manager/utils/ExcelInfoUtils2.java
  37. 6 4
      blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FileUtils.java
  38. 2 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/utils/PdfAddimgUtil.java
  39. 33 5
      blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java

+ 2 - 2
blade-common/src/main/java/org/springblade/common/utils/AsyncConfigurer.java

@@ -15,7 +15,7 @@ public class AsyncConfigurer {
     /**
      * cpu 核心数量
      */
-    public static final int cpuNum =10 ;//Runtime.getRuntime().availableProcessors();
+    public static final int cpuNum =12 ;//Runtime.getRuntime().availableProcessors();
 
     /**
      * 线程池配置
@@ -25,7 +25,7 @@ public class AsyncConfigurer {
     @Bean("taskExecutor1")
     public ThreadPoolExecutor getAsyncExecutor() {
         return new ThreadPoolMonitor(cpuNum
-                , 20
+                , 25
                 , 30
                 , TimeUnit.SECONDS
                 , new LinkedBlockingQueue<>(2000)

+ 5 - 0
blade-common/src/main/java/org/springblade/common/utils/SystemUtils.java

@@ -1,5 +1,7 @@
 package org.springblade.common.utils;
 
+import org.springblade.common.constant.CommonConstant;
+
 public class SystemUtils {
 
     /**
@@ -46,4 +48,7 @@ public class SystemUtils {
     public static String getOsName() {
         return System.getProperty("os.name");
     }
+
+
+
 }

+ 4 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialSelfInspectionRecord.java

@@ -77,4 +77,8 @@ public class TrialSelfInspectionRecord extends BaseEntity {
     @ApiModelProperty(value = "多表合并PDF")
     private String pdfUrl;
 
+    @ApiModelProperty(value = "委托单Id")
+    private Long entrustId;
+
+
 }

+ 187 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/LoadDataInfoVO.java

@@ -0,0 +1,187 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+
+/**
+ * 数据采集信息
+ *
+ * @author BladeX
+ * @since 2024-05-08
+ */
+@Data
+public class LoadDataInfoVO {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * id
+	 */
+	@ApiModelProperty("id")
+	private String id;
+
+	/**
+	 * 合同段Id
+	 */
+	@ApiModelProperty("合同段Id")
+	private String contractId;
+
+	/**
+	 * 委托单位
+	 */
+	@ApiModelProperty("工程部位")
+	private String engineInfo;
+	/**
+	 * 设备名称
+	 */
+	@ApiModelProperty("设备名称")
+	private String deviceName;
+
+	/**
+	 * 设备采集编号
+	 */
+	@ApiModelProperty("设备采集编号")
+	private String equipmentAcquisitionNumber;
+
+	/**
+	 * 试验时间
+	 */
+	@ApiModelProperty("试验时间")
+	private String testDate;
+
+	/**
+	 * 样品编号
+	 */
+	@ApiModelProperty("样品编号")
+	private String specificationNumber;
+
+	/**
+	 * 试验类型
+	 */
+	@ApiModelProperty("试验类型")
+	private Integer testTypeId;
+
+	/**
+	 * 试验类型Id
+	 */
+	@ApiModelProperty("试验类型")
+	private Integer testTypePId;
+
+	/**
+	 * 试验类型名称
+	 */
+	@ApiModelProperty("试验类型名称")
+	private String  testTypeName;
+
+	/**
+	 * 承压面积
+	 */
+	@ApiModelProperty(value = "承压面积")
+	private String beArea;
+
+
+	/**
+	 * 试件尺寸
+	 */
+	@ApiModelProperty(value = "试件尺寸")
+	private String specimenSize;
+
+	/**
+	 * 设计强度
+	 */
+	@ApiModelProperty(value = "设计强度")
+	private String desStrength;
+
+	/**
+	 * 期龄
+	 */
+	@ApiModelProperty(value = "期龄")
+	private String ageDate;
+
+	/**
+	 * 荷载1
+	 */
+	@ApiModelProperty(value = "荷载1")
+	private String load1;
+
+	/**
+	 * 荷载2
+	 */
+	@ApiModelProperty(value = "荷载2")
+	private String load2;
+
+	/**
+	 * 荷载3
+	 */
+	@ApiModelProperty(value = "荷载3")
+	private String load3;
+
+	/**
+	 * 强度代表值
+	 */
+	@ApiModelProperty(value = "强度代表值")
+	private String strengthAVG;
+
+	/**
+	 * 最大总延伸1
+	 */
+	@ApiModelProperty(value = "最大总延伸1")
+	private String maxConceal1;
+
+	/**
+	 * 最大总延伸2
+	 */
+	@ApiModelProperty(value = "最大总延伸2")
+	private String maxConceal2;
+
+	/**
+	 * 最大总延伸3
+	 */
+	@ApiModelProperty(value = "最大总延伸3")
+	private String maxConceal3;
+
+	/**
+	 * 数据是否合格
+	 */
+	@ApiModelProperty(value = "数据是否合格")
+	private String dataQualified;
+
+	/**
+	 * 数据状态
+	 */
+	@ApiModelProperty(value = "数据状态1=未引用 2=引用")
+	private String dataStatus;
+
+	/**
+	 * 开始时间
+	 */
+	@ApiModelProperty(value = "委托单位上报时间")
+	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
+	private Date startTime;
+
+	/**
+	 * 结束时间
+	 */
+	@ApiModelProperty(value = "委托单位上报时间")
+	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
+	private Date endTime;
+}

+ 3 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/StartTaskVO.java

@@ -54,6 +54,9 @@ public class StartTaskVO {
     @ApiModelProperty("自定义流程,所选的审批人ID和姓名集合")
     private List<CustomUserTask> userTasks;
 
+    @ApiModelProperty("任务类型")
+    private String taskType;
+
     /**
      * 试验自检记录id
      */

+ 1 - 1
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TaskApprovalVO.java

@@ -26,7 +26,7 @@ public class TaskApprovalVO {
     @ApiModelProperty("数据源")
     private String formDataId;
 
-    // 1=填报数据 2=工程文件 3=日志资料 4=档案数据
+    // 1=填报数据(质量填报,试验上报)   2=工程文件 3=日志资料 4=档案数据   5=计量支付证书  6=计量 材料  7= 计量 中间支付  8委托单
     @ApiModelProperty("上报类型")
     private Integer approvalType;
 

+ 26 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialSampleDataInfoVO.java

@@ -2,6 +2,7 @@ package org.springblade.business.vo;
 
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springblade.business.entity.EntrustInfo;
 import org.springblade.business.entity.TrialSampleInfo;
 
 
@@ -74,4 +75,29 @@ public class TrialSampleDataInfoVO extends TrialSampleInfo {
      */
     @ApiModelProperty(value = "委托单状态名称")
     private String entrustStatusName;
+
+    /**
+     * 自检Id
+     */
+    @ApiModelProperty(value = "自检Id")
+    private String testId;
+
+    /**
+     * 待测时间
+     */
+    @ApiModelProperty(value = "待测时间")
+    private String ctestTime;
+
+    /**
+     * 试验数量
+     */
+    @ApiModelProperty(value = "待测时间")
+    private int expCount;
+
+    /**
+     * 剩余数量
+     */
+    @ApiModelProperty(value = "剩余数量")
+    private int sxCount;
+
 }

+ 7 - 1
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialSampleInfoVO.java

@@ -44,6 +44,12 @@ public class TrialSampleInfoVO extends TrialSampleInfo {
      * 委托单信息id
      */
     @ApiModelProperty("委托单信息id")
-    private Long entrustId;
+    private String entrustId;
+
+    /**
+     * 试验单 Id
+     */
+    @ApiModelProperty("试验单id")
+    private String testId;
 
 }

+ 2 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/TrialSelfDataRecord.java

@@ -25,4 +25,6 @@ public class TrialSelfDataRecord implements Serializable {
 
     private String pdfUrl;
 
+    //抽取数据主建Id
+    private String loadDataId;
 }

+ 2 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/WbsTreePrivateVO4.java

@@ -62,4 +62,6 @@ public class WbsTreePrivateVO4 implements Serializable {
     //是否是复制的表 0=否 1=是 (复制表可以删除)
     private Integer isCopyTab;
 
+    private String loadDataId;
+
 }

+ 25 - 11
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -1234,6 +1234,8 @@ public class InformationWriteQueryController extends BladeController {
     @ApiOperation(value = "批量上报")
     @PushMessage(clientId = ClientIdConstant.BUSINESS_CLIENT_ID)
     public R<Object> batchTask(@RequestBody StartTaskVO startTaskVO) {
+        // 1= 代表 试验 流程上报  2=试验 - 委托单上报   其他=质检或别的项目上报
+        Long appType = startTaskVO.getTrialSelfInspectionRecordId();
         if (ObjectUtil.isEmpty(SecureUtil.getUserId()) || SecureUtil.getUserId() == -1L) {
             throw new ServiceException("未获取到当前用户信息");
         }
@@ -1242,20 +1244,21 @@ public class InformationWriteQueryController extends BladeController {
             String[] ids = startTaskVO.getIds().split(",");
             if (ids.length > 0) {
                 List<InformationQuery> queryList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getId, Arrays.asList(ids)));
-
                 //试验批量上报
                 String trialIds = "";
                 Map<Long, Long> mapKey = new HashMap<>();
-                if (queryList.size() == 0 && startTaskVO.getTrialSelfInspectionRecordId() == 1L) {
+                if (queryList.size() == 0 ) {
                     //试验填报数据
                     queryList = new ArrayList<>(this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, Arrays.asList(ids))));
                     //重新绑定trialSelfInspectionRecordId使用map
-                    for (InformationQuery informationQuery : queryList) {
-                        mapKey.put(informationQuery.getId(), informationQuery.getWbsId());
+                    if(appType == 1L){ // 试验上报
+                        for (InformationQuery informationQuery : queryList) {
+                            mapKey.put(informationQuery.getId(), informationQuery.getWbsId());
+                        }
+                        trialIds = startTaskVO.getIds();
                     }
-                    //试验记录ids重新赋值映射为数据源ids
+                    //试验记录 和 委托单 ids重新赋值映射为数据源ids
                     ids = queryList.stream().map(InformationQuery::getId).map(String::valueOf).toArray(String[]::new);
-                    trialIds = startTaskVO.getIds();
                 }
 
                 Map<String, String> queryMap = new HashMap<>();
@@ -1265,9 +1268,8 @@ public class InformationWriteQueryController extends BladeController {
 
                 try {
                     for (String id : ids) {
-
                         //试验-批量上报时,重新绑定当前试验记录id
-                        if (ObjectUtil.isNotEmpty(startTaskVO.getTrialSelfInspectionRecordId()) && startTaskVO.getTrialSelfInspectionRecordId() == 1L) {
+                        if (ObjectUtil.isNotEmpty(appType) && appType == 1L) {
                             Long wbsId = mapKey.get(Long.parseLong(id));
                             if (ObjectUtil.isNotEmpty(wbsId)) {
                                 startTaskVO.setTrialSelfInspectionRecordId(wbsId);
@@ -1291,7 +1293,11 @@ public class InformationWriteQueryController extends BladeController {
                         //设置数据源指向
                         taskVO.setFormDataId(id);
                         //设置上报类型
-                        taskVO.setApprovalType(1);
+                        if(appType!=null && appType==2L){
+                            taskVO.setApprovalType(8);
+                        }else{
+                            taskVO.setApprovalType(1);
+                        }
 
                         taskVO.setReportUserId(SecureUtil.getUserId().toString());
                         taskVO.setReportUserName(SecureUtil.getNickName());
@@ -1315,15 +1321,23 @@ public class InformationWriteQueryController extends BladeController {
                             this.informationQueryService.update(wrappers);
 
                             //修改试验记录上报任务状态(单上报)
-                            if (ObjectUtil.isNotEmpty(startTaskVO.getTrialSelfInspectionRecordId()) && startTaskVO.getTrialSelfInspectionRecordId() != 1L) {
+                            if (ObjectUtil.isNotEmpty(startTaskVO.getTrialSelfInspectionRecordId()) && appType == 1L) {
                                 String sql = "update u_trial_self_inspection_record set task_status = '待审批' where id = " + startTaskVO.getTrialSelfInspectionRecordId();
                                 jdbcTemplate.execute(sql);
                             }
+
+                            // 为多单上报 状态修改
+                            if(appType!=null && appType == 2L){
+                                String sql = "update u_entrust_info set status = 2 ,sample_status=1 where id = " + startTaskVO.getIds();
+                                jdbcTemplate.execute(sql);
+                            }
                             var = true;
+                        }else{
+                            return R.fail("创建主流程失败");
                         }
                     }
 
-                    if (StringUtils.isNotEmpty(trialIds) && var) {
+                    if (StringUtils.isNotEmpty(trialIds) && var && appType==1L) {
                         //修改试验记录上报任务状态(批量上报)
                         String sql = "update u_trial_self_inspection_record set task_status = '待审批' where id in(" + trialIds + ")";
                         jdbcTemplate.execute(sql);

+ 17 - 4
blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialDetectionController.java

@@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.*;
 import lombok.AllArgsConstructor;
 import lombok.SneakyThrows;
 import org.springblade.business.dto.*;
@@ -426,4 +423,20 @@ public class TrialDetectionController extends BladeController {
         return R.data(result);
     }
 
+
+
+    @PostMapping("/self/trialSelfInById")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "自检记录详情接口", notes = "自检记录详情接口")
+    public R<TrialSelfInspectionRecord> trialSelfInById(String id) throws FileNotFoundException {
+        return R.data(iTrialSelfInspectionRecordService.getById(Func.toLong(id)));
+    }
+
+
+    @PostMapping("/self/getSamplePdfUrl")
+    @ApiOperationSupport(order = 28)
+    @ApiOperation(value = "获取样品pdf", notes = "获取样品pdf")
+    public R<String> getSamplePdfUrl(@ApiParam(value = "试验Id", required = true)String testId, @ApiParam(value = "合同段Id", required = true)String contractId){
+        return iTrialSelfInspectionRecordService.getSamplePdfUrl(testId,contractId);
+    }
 }

+ 11 - 6
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSampleInfoMapper.xml

@@ -41,24 +41,29 @@
         SELECT  a.*,
                (SELECT name from blade_user c where a.user_id=c.id) as userName,
                (SELECT c.mobilization_id from u_trial_sampling_record c where a.id=c.sample_info_id) as mobilizationId,
-               b.id as entrustId
+               b.id as entrustId,
+               (SELECT max(c.id) from u_trial_self_inspection_record c where c.entrust_id = a.id) as testId
         from u_trial_sample_info  a LEFT JOIN u_entrust_info b on a.id = b.sample_id
         where a.is_deleted = 0
        <if test="param2.nodeId != null and param2.nodeId != '' ">
             and a.node_id = #{param2.nodeId}
         </if>
 
+        <if test="param2.contractId != null and param2.contractId != '' ">
+            and a.contract_id = #{param2.contractId}
+        </if>
+
         <if test="param2.startTime != null and param2.startTime != '' ">
-            and a.create_time &gt;= #{param2.startTime}
+            and DATE_FORMAT(a.sampling_date,'%Y-%m-%d')  &gt;= #{param2.startTime}
         </if>
 
         <if test="param2.endTime != null and param2.endTime != '' ">
-            and a.create_time &lt;= #{param2.endTime}
+            and DATE_FORMAT(a.sampling_date,'%Y-%m-%d') &lt;= #{param2.endTime}
         </if>
         <if test="param2.queryValue != null and param2.queryValue != ''">
-            AND (   a.material_name like CONCAT(CONCAT('%', #{param2.queryValue}), '%'))
-                    or a.specification_model like CONCAT(CONCAT('%', #{param2.queryValue}), '%'))
-                    or a.specification_number like CONCAT(CONCAT('%', #{param2.queryValue}), '%'))
+            and (   a.material_name like CONCAT(CONCAT('%', #{param2.queryValue}), '%')
+                    or a.specification_model like CONCAT(CONCAT('%', #{param2.queryValue}), '%')
+                    or a.specification_number like CONCAT(CONCAT('%', #{param2.queryValue}), '%')
             )
         </if>
     </select>

+ 1 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSelfInspectionRecordMapper.xml

@@ -30,6 +30,7 @@
         <result column="update_time" property="updateTime"/>
         <result column="status" property="status"/>
         <result column="is_deleted" property="isDeleted"/>
+        <result column="entrust_id" property="entrustId"/>
     </resultMap>
 
     <insert id="saveSelfSample">

+ 3 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/ITrialSelfInspectionRecordService.java

@@ -43,4 +43,7 @@ public interface ITrialSelfInspectionRecordService extends BaseService<TrialSelf
 
     boolean fileSubmit(TrialFileSubmitDTO dto) throws FileNotFoundException;
 
+
+    R getSamplePdfUrl(String id,String contrctId);
+
 }

+ 6 - 7
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java

@@ -168,7 +168,9 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
             case 3:
                 //日志资料
                 return this.queryTheLogFileBusinessData(taskApprovalVO.getFormDataId());
-
+            case 8:
+                //填报数据
+                return this.queryProcessSubmitBusinessData(taskApprovalVO.getFormDataId(), true);
             default:
                 return null;
         }
@@ -186,6 +188,9 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
             case 3:
                 //日志资料
                 return this.queryTheLogFileBusinessData(taskApprovalVO.getFormDataId());
+            case 8:
+                //委拖单
+                return this.queryProcessSubmitBusinessData(taskApprovalVO.getFormDataId(), false);
             default:
                 return null;
         }
@@ -1160,12 +1165,6 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                         .set(InformationQuery::getBusinessTime, dateInfo)
                         .set(InformationQuery::getNodePdfUrl, newFileUrl)
                         .in(InformationQuery::getId, Arrays.asList(formDataId.split(","))));
-
-                /*//如果是废除任务,那么删除合同段节点树缓存
-                if (status == 3) {
-                    informationQueryService.delAsyncWbsTree(queryinfo.getContractId().toString());
-                }*/
-
                 //修改试验业务状态(已审批的情况下修改)
                 if (new Integer(2).equals(queryinfo.getType()) && ObjectUtil.isNotEmpty(queryinfo.getWbsId()) && status != 3) {
                     jdbcTemplate.execute("update u_trial_self_inspection_record set task_status = '已审批' where id = " + queryinfo.getWbsId());

+ 10 - 12
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialMaterialMobilizationServiceImpl.java

@@ -27,6 +27,7 @@ import org.springblade.business.vo.TrialMaterialMobilizationVO;
 import org.springblade.business.vo.TrialSamplingRecordVO;
 import org.springblade.business.wrapper.TrialMaterialMobilizationWarpper;
 import org.springblade.common.utils.CommonUtil;
+import org.springblade.common.utils.FileUtils;
 import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.common.utils.SystemUtils;
 import org.springblade.core.log.exception.ServiceException;
@@ -70,12 +71,12 @@ public class TrialMaterialMobilizationServiceImpl extends BaseServiceImpl<TrialM
                 .eq(TrialMaterialMobilization::getContractId, contractId)
         );
         if (StringUtils.isEmpty(id)) {
-            TrialMaterialMobilization trialMaterialMobilization1 = list.stream().filter(f -> f.getMaterialNumber().equals(number)).findAny().orElse(null);
+            TrialMaterialMobilization trialMaterialMobilization1 = list.stream().filter(f ->f.getMaterialNumber()!=null && f.getMaterialNumber().equals(number) ).findAny().orElse(null);
             return trialMaterialMobilization1 != null;
         } else {
-            TrialMaterialMobilization trialMaterialMobilization = list.stream().filter(f -> f.getId().equals(Long.parseLong(id))).findAny().orElse(null);
+            TrialMaterialMobilization trialMaterialMobilization = list.stream().filter(f -> f.getMaterialNumber()!=null && f.getId().equals(Long.parseLong(id))).findAny().orElse(null);
             if (trialMaterialMobilization != null && !trialMaterialMobilization.getMaterialNumber().equals(number)) {
-                TrialMaterialMobilization trialMaterialMobilization1 = list.stream().filter(f -> f.getMaterialNumber().equals(number)).findAny().orElse(null);
+                TrialMaterialMobilization trialMaterialMobilization1 = list.stream().filter(f -> f.getMaterialNumber()!=null && f.getMaterialNumber().equals(number)).findAny().orElse(null);
                 return trialMaterialMobilization1 != null;
             }
             return false;
@@ -125,7 +126,7 @@ public class TrialMaterialMobilizationServiceImpl extends BaseServiceImpl<TrialM
         if (StringUtils.isNotEmpty(obj.getStartTime()) && StringUtils.isNotEmpty(obj.getEndTime())) {
             String endTime = obj.getEndTime();
             endTime = DateUtil.format(DateUtils.addDays(DateUtil.parse(endTime, "yyyy-MM-dd"), 1), "yyyy-MM-dd");
-            queryWrapper.lambda().between(TrialMaterialMobilization::getCreateTime, obj.getStartTime(), endTime);
+            queryWrapper.lambda().between(TrialMaterialMobilization::getMobilizationDate, obj.getStartTime(), endTime);
         }
         if (ObjectUtil.isNotEmpty(obj.getQueryValue())) {
             queryWrapper.lambda().and(wrapper -> wrapper.like(TrialMaterialMobilization::getMaterialName, obj.getQueryValue())
@@ -219,12 +220,10 @@ public class TrialMaterialMobilizationServiceImpl extends BaseServiceImpl<TrialM
             //构造数据
             List<TrialMaterialMobilization> list = baseMapper.selectBatchIds(Func.toLongList(ids)).stream()
                     .sorted(Comparator.comparing(TrialMaterialMobilization::getMobilizationDate, Comparator.nullsLast(Date::compareTo))).collect(Collectors.toList());
-            //List<TrialMaterialMobilization> list = new ArrayList<>(baseMapper.selectBatchIds(Func.toLongList(ids)));
 
             //删除旧PDF
             List<String> pdfUrls = list.stream().map(TrialMaterialMobilization::getPdfUrl).distinct().collect(Collectors.toList());
             for (String pdfUrl : pdfUrls) {
-                //格式 https: //xxx.com//upload/20221101/xxx.pdf
                 if (StringUtils.isNotEmpty(pdfUrl)) {
                     String pdfName = pdfUrl.split("//")[2].split("/")[2];
                     newIOSSClient.removeFile(pdfName);
@@ -234,27 +233,26 @@ public class TrialMaterialMobilizationServiceImpl extends BaseServiceImpl<TrialM
             //创建文档,设置页面大小、左右上下边距
             Document document = new Document();
             BaseFont bfChinese = null;
-            String pdfUrl = null;
+            String pdfUrl = org.springblade.business.utils.FileUtils.getSysLocalFileUrl()+"pdfFiles/";
+
             //处理中文显示问题,使用资源字体
             if (SystemUtils.isWindows()) {
                 //windows
-                pdfUrl = "C:\\pdfFiles\\";
                 File file = new File(pdfUrl);
                 if (!file.exists()) {
                     file.mkdirs();
                 }
                 bfChinese = BaseFont.createFont("C:/WINDOWS/Fonts/SIMYOU.TTF", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
             }
-            if (SystemUtils.isLinux()) {
+
+            if (SystemUtils.isMacOs()) {
                 //linux
-                pdfUrl = "/home/pdfFiles";
                 File file = new File(pdfUrl);
                 if (!file.exists()) {
                     file.mkdirs();
                 }
-                bfChinese = BaseFont.createFont("/usr/share/fonts/my-fonts/SIMYOU.TTF", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
+                bfChinese = BaseFont.createFont("/Users/hongchuangyanfa/fsdownload/SIMYOU.TTF", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
             }
-
             FileOutputStream fileOutputStream = new FileOutputStream(pdfUrl + fileName);
 
             //Font dateTitle = new Font(bfChinese, 7, Font.NORMAL);

+ 15 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java

@@ -15,6 +15,7 @@ import org.springblade.business.entity.*;
 import org.springblade.business.mapper.TrialMaterialMobilizationMapper;
 import org.springblade.business.mapper.TrialSampleInfoMapper;
 import org.springblade.business.mapper.TrialSelfInspectionRecordMapper;
+import org.springblade.business.service.IEntrustInfoService;
 import org.springblade.business.service.ITrialSelfInspectionRecordService;
 import org.springblade.business.utils.FileUtils;
 import org.springblade.business.utils.FileUtils2;
@@ -983,6 +984,10 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             //------关联新增设备使用记录信息------
             this.trialDeviceUseService.addDeviceUseInfo(dto);
         }
+
+        // 修改entr上报状态
+       // jdbcTemplate
+
         return dto.getId().toString();
     }
 
@@ -1500,5 +1505,15 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
         return false;
     }
 
+    @Override
+    public R getSamplePdfUrl(String id, String contrctId) {
+        try {
+            String  pdf = this.getMergePdfToTrial(Func.toLong(contrctId), Func.toLong(id));
+            return R.success(pdf);
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
 
 }

+ 13 - 0
blade-service/blade-business/src/main/java/org/springblade/business/utils/FileUtils.java

@@ -14,9 +14,12 @@ import org.apache.commons.lang.StringUtils;
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.util.Units;
+import org.springblade.common.constant.CommonConstant;
 import org.springblade.common.utils.CommonUtil;
+import org.springblade.common.utils.SystemUtils;
 import org.springblade.common.vo.DataVO;
 import org.springblade.core.tool.utils.IoUtil;
+import org.springblade.system.cache.ParamCache;
 
 import javax.imageio.IIOImage;
 import javax.imageio.ImageIO;
@@ -312,4 +315,14 @@ public class FileUtils {
             doc.close();
         }
     }
+
+    public static String getSysLocalFileUrl() {
+        String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        if (SystemUtils.isMacOs()) {
+            file_path = "/Users/hongchuangyanfa/Desktop/";
+        } else if (SystemUtils.isWindows()) {
+            file_path = "C://upload//";
+        }
+        return file_path;
+    }
 }

+ 14 - 8
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/EVisaController.java

@@ -108,7 +108,6 @@ public class EVisaController {
                //状态改为 == 4 --
                 String up_task = "update u_task_batch set is_deleted=5 where id="+taskApprovalVO.getId();
                 jdbcTemplate.execute(up_task);
-
                 String up_task_par = "update u_task_parallel set e_visa_status=99,e_visa_content='pdf关键字与数据库中id不匹配' ,update_time=SYSDATE() where parallel_process_instance_id='"+taskApprovalVO.getParallelProcessInstanceId()+"'";
                 jdbcTemplate.execute(up_task_par);
 
@@ -136,11 +135,12 @@ public class EVisaController {
                         e.printStackTrace();
                     }
                     //修改主流程状态为已完成
-                    String up_task = "update u_task set status=2,update_time=SYSDATE() where id="+taskApprovalVO.getTaskId();
+                    String up_task = "update u_task set status=2,update_time=SYSDATE() where is_deleted=0 and id="+taskApprovalVO.getTaskId();
                     jdbcTemplate.execute(up_task);
                     //修改对应的业务数据状态为已审批
                     int approvalType = taskApprovalVO.getApprovalType();
-                    if(approvalType<=4){
+
+                    if(approvalType<=4){ //质检 修改queryinfo 数据信息
                         taskClient.updateBusinessDataByFormDataId(masterTask, 2, finalPdfUrl, taskApprovalVO.getUserId());
                         //返回电签成功的pdf路径,给试验用
                         try {
@@ -148,8 +148,8 @@ public class EVisaController {
                         } catch (FileNotFoundException e) {
                             throw new RuntimeException(e);
                         }
-                    } else {
-                        UpMeterSignDataInfo(taskApprovalVO,finalPdfUrl);
+                    }else{
+                        UpMeterSignDataInfo(taskApprovalVO,finalPdfUrl,2);
                     }
                 }else {
                     //只更新PDF路径
@@ -163,7 +163,7 @@ public class EVisaController {
                             throw new RuntimeException(e);
                         }
                     }else{
-                        UpMeterSignDataInfo(taskApprovalVO,finalPdfUrl);
+                        UpMeterSignDataInfo(taskApprovalVO,finalPdfUrl,1);
                     }
                 }
             }else if ("eVisaError".equals(eVisaStatus) || eVisaStatus.contains("eVisaError")) {
@@ -185,16 +185,22 @@ public class EVisaController {
     }
 
     // 电签成功状态修改---计量系统
-    public void UpMeterSignDataInfo(TaskApprovalVO taskApprovalVO,String finalPdfUrl){
+    public void UpMeterSignDataInfo(TaskApprovalVO taskApprovalVO,String finalPdfUrl,int type){
         if (taskApprovalVO.getApprovalType()==5) { //计量 -
             this.jdbcTemplate.execute("update s_interim_pay_certificate set raw_url='"+finalPdfUrl+"' where contract_period_id = " + taskApprovalVO.getFormDataId());
             this.jdbcTemplate.execute("delete from u_task_batch where id="+taskApprovalVO.getId());
             RedisTemplate.delete("sign-" + taskApprovalVO.getFormDataId());
         } else if (taskApprovalVO.getApprovalType()==6 || taskApprovalVO.getApprovalType()==7) { //计量 --材料 ,中间
             this.jdbcTemplate.execute("update s_material_start_statement set raw_url='"+finalPdfUrl+"' where meter_period_id = " + taskApprovalVO.getFormDataId());
+            this.jdbcTemplate.execute("delete from u_task_batch where id="+taskApprovalVO.getId());
+            RedisTemplate.delete("sign-" + taskApprovalVO.getFormDataId());
+        } else if (taskApprovalVO.getApprovalType()==8) { // 委托单
+
+            this.jdbcTemplate.execute("update u_entrust_info set sample_status=2,status="+(type+1)+",entrust_e_pdf='"+finalPdfUrl+"' where id=(SELECT wbs_id from u_information_query where id='"+taskApprovalVO.getFormDataId()+"')");
+            jdbcTemplate.execute("update u_information_query set e_visa_pdf_url='"+finalPdfUrl+"',status="+type+" where id='"+taskApprovalVO.getFormDataId()+"'");
+
             this.jdbcTemplate.execute("delete from u_task_batch where id="+taskApprovalVO.getId());
             RedisTemplate.delete("sign-" + taskApprovalVO.getFormDataId());
         }
     }
-
 }

+ 28 - 17
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/EVisaServiceImpl.java

@@ -93,8 +93,8 @@ import java.util.*;
 @AllArgsConstructor
 public class EVisaServiceImpl implements EVisaService {
 
-    private static final String SIGN_HOST = "172.30.224.79";
-    //private static final String SIGN_HOST = "47.115.117.246";
+    //private static final String SIGN_HOST = "172.30.224.79";
+    private static final String SIGN_HOST = "47.115.117.246";
 
     private static final String SIGN_PORT = "8183";
 
@@ -370,10 +370,10 @@ public class EVisaServiceImpl implements EVisaService {
 
         //根据任务类型获取对应的文件信息
         TaskApprovalVO taskFile=new TaskApprovalVO();
-        if(task.getApprovalType()<=4){
+        if(task.getApprovalType()<=4 || task.getApprovalType()<=8){
             //上报类型,1填报资料,2工程文件,3日志资料  ,  4档案数据
             taskFile = this.taskClient.queryBusinessDataTask(JSONObject.parseObject(JSONObject.toJSONString(task), TaskApprovalVO.class));
-        } else if (task.getApprovalType()<=8 && task.getApprovalType()>=5) {
+        } else if ( task.getApprovalType()>=5) {
            // 计量任务类型  5 = 中间计量申请,6 = 材料计量单,7 = 开工预付款计量单,8 = 变更令
             Map<String, Object> map =new HashMap<>();
             if(task.getApprovalType()==6 || task.getApprovalType()==7){
@@ -428,6 +428,12 @@ public class EVisaServiceImpl implements EVisaService {
                             HashMap<String, Object> daMa = new HashMap<>();
                             daMa.put("keyWord", dataMap.get("keyWord"));
                             daMa.put("sealId", dataMap.get("sealId"));
+                            // 设置图片显示大小
+                            daMa.put("showHeight",30);
+                            daMa.put("showWidth",60);
+                            //设置显示签字体的位置
+                            daMa.put("sealOffsetY",-15);
+                            daMa.put("sealOffsetX",-30);
 
                             byte[] fileByte;
                             if (fileUrl.indexOf("aliyuncs.com") >= 0) {
@@ -533,11 +539,6 @@ public class EVisaServiceImpl implements EVisaService {
             RedisTemplate.delete("sign-" + task.getFormDataId());
             e.printStackTrace();
         }
-        // }
-        //释放锁
-        //  DistributedRedisLock.release(task.getUserId().toString());
-
-        System.out.println("bladeFile---eVisa" + task.getFormDataId() + "--" + resultMessage);
         return resultMessage;
     }
 
@@ -685,14 +686,22 @@ public class EVisaServiceImpl implements EVisaService {
         return "";
     }
 
-  /*  public static void main(String[] args) throws Exception {
-        String pdfPath ="/Users/hongchuangyanfa/Documents/fcf5efab3af8d1e7f26cec1d5fbdb634.pdf";
-        String sealId ="289b84c769694deba4c42599032699a4";
+/*
+    public static void main(String[] args) throws Exception {
+        String pdfPath ="/Users/hongchuangyanfa/Downloads/2207f338ed7d2d65eba145fbb75a1ee9.pdf";
+        String sealId ="0ff724e095fc4a16b9c9c25ebe44e68f";
         String formDataId ="vv";
         List<Map<String,Object>> maps = new ArrayList<>();
         Map<String,Object> daMap = new HashMap<>();
-        daMap.put("keyWord","1630012525913309193");
+        daMap.put("keyWord","1778694778876067840");
         daMap.put("sealId",sealId);
+        //设置显示签字体的宽高
+        daMap.put("showHeight",30);
+        daMap.put("showWidth",60);
+        //设置显示签字体的位置
+        daMap.put("sealOffsetY",-15);
+        daMap.put("sealOffsetX",-30);
+
         maps.add(daMap);
 
         String fileUrl =pdfPath;
@@ -701,7 +710,6 @@ public class EVisaServiceImpl implements EVisaService {
             FileReader fileReader = new FileReader(fileUrl);
             String originalFileB64 = Base64.toBase64String(fileReader.readBytes());
             daMa.put("fileB64", originalFileB64);
-
             daMa.put("lastSignFlag", false);
 
             if(maps.size()==1){
@@ -715,7 +723,8 @@ public class EVisaServiceImpl implements EVisaService {
             }
             System.out.println(fileUrl);
         }
-    }*/
+    }
+*/
 
     /**
      * 东方 中讯
@@ -723,8 +732,8 @@ public class EVisaServiceImpl implements EVisaService {
      * @throws Exception
      */
     public static String signPdfByDFZX(HashMap<String, Object> request) {
-        String url = "http://39.108.216.210:9125/FrontSysGs/SealServicezx/FileSignByKeyWord";
-       // String url = "http://172.30.224.81:9125/FrontSysGs/SealServicezx/FileSignByKeyWord";
+        String url = "http://172.30.224.81:9125/FrontSys/SealServicezx/FileSignByKeyWord";
+
         String sysLocalFileUrl = FileUtils.getSysLocalFileUrl();
         String filecode = SnowFlakeUtil.getId() + "";
         String dataFileUrl = sysLocalFileUrl + "/pdf/" + filecode + ".pdf";
@@ -764,8 +773,10 @@ public class EVisaServiceImpl implements EVisaService {
             FileOutputStream fout = new FileOutputStream(dataFileUrl);
             fout.write(Base64.decode(fileB642));//生成base64字符串格式文件
             fout.close();
+            System.out.println(dataFileUrl);
             return SUCCESS + "@@@@" + dataFileUrl;
         } catch (Exception e) {
+            e.printStackTrace();
             return ERROR + "@@@@异常出错";
         }
     }

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

@@ -4068,7 +4068,7 @@ public class ExcelTabController extends BladeController {
     })
     public R<List<Map<String, Object>>> getBussDataInfoTrialentrust(Long id, Long pkeyId, Long contractId) {
 
-        List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrial(id, pkeyId, contractId);
+        List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrialentrust(id, pkeyId, contractId);
         return R.data(bussDataInfoTrial);
     }
 }

+ 1 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreeController.java

@@ -351,7 +351,7 @@ public class WbsTreeController extends BladeController {
     @ApiOperation(value = "编辑表单元素批量修改", notes = "传入WbsFormElement")
     @ApiImplicitParam(name = "ids", value = "元素的id集合", required = true)
     public R updateBatchElements(@RequestBody List<WbsFormElement> wbsFormElementList, @RequestParam("initTableName") String initTableName) {
-        return R.status(wbsFormElementService.updateAndSyn(wbsFormElementList, initTableName));
+        return wbsFormElementService.updateAndSyn(wbsFormElementList, initTableName);
     }
 
 

+ 4 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreePrivateController.java

@@ -18,6 +18,7 @@ import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.support.Kv;
+import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.ObjectUtil;
 import org.springblade.core.tool.utils.StringUtil;
 import org.springblade.manager.dto.WbsTreePrivateDTO2;
@@ -705,6 +706,9 @@ public class WbsTreePrivateController extends BladeController {
                 if (bussDataInfoTrial != null && bussDataInfoTrial.size() > 0) {
                     bussDataInfoTrial.get(0).remove("group_id");
                     treePrivate.setBussDataInfoTrial(bussDataInfoTrial.get(0));
+                    if(bussDataInfoTrial.get(0)!=null && Func.isNotEmpty(bussDataInfoTrial.get(0))){
+                        treePrivate.setLoadDataId(bussDataInfoTrial.get(0).get("loadDataId")+"");
+                    }
                 }
             }
         }

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

@@ -2,8 +2,12 @@ package org.springblade.manager.feign;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.select.Elements;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springblade.business.dto.TrialSelfInspectionRecordDTO;
@@ -13,14 +17,17 @@ import org.springblade.common.constant.CommonConstant;
 import org.springblade.core.oss.model.BladeFile;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.IoUtil;
 import org.springblade.core.tool.utils.ObjectUtil;
 import org.springblade.core.tool.utils.ResourceUtil;
 import org.springblade.manager.bean.TableInfo;
 import org.springblade.manager.controller.ExcelTabController;
 import org.springblade.manager.entity.ExcelTab;
 import org.springblade.manager.entity.TrialSelfDataRecord;
+import org.springblade.manager.entity.WbsTreePrivate;
 import org.springblade.manager.enums.ExecuteType;
 import org.springblade.manager.service.IExcelTabService;
+import org.springblade.manager.service.IWbsTreePrivateService;
 import org.springblade.manager.utils.FileUtils;
 import org.springblade.resource.feign.NewIOSSClient;
 import org.springblade.system.cache.ParamCache;
@@ -32,6 +39,8 @@ import org.springframework.web.bind.annotation.RestController;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequestWrapper;
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -59,6 +68,10 @@ public class ExcelTabClientImpl implements ExcelTabClient {
         String nodeId = table.getString("nodeId");
         String projectId = table.getString("projectId");
         String contractId = table.getString("contractId");
+
+        //应用抽取的数据
+        dataArray = excelTabService.addLoadDataInfo(dataArray);
+
         List<TableInfo> tableInfoList = this.excelTabService.getTableInfoListTrial(dataArray, tabIds);
         try {
             //------公式填充------
@@ -84,7 +97,7 @@ public class ExcelTabClientImpl implements ExcelTabClient {
                         List<TrialSelfDataRecord> query = jdbcTemplate.query("select pdf_url from u_trial_self_data_record where record_id = " + id, new BeanPropertyRowMapper<>(TrialSelfDataRecord.class));
                         List<String> pdfList = query.stream().map(TrialSelfDataRecord::getPdfUrl).collect(Collectors.toList());
                         if (ObjectUtil.isNotEmpty(pdfList) && pdfList.size() > 0) {
-                            String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+                            String file_path = FileUtils.getSysLocalFileUrl();
                             String pdfPath = file_path + "/pdf//" + id + "_2.pdf";
                             File tabPdf = ResourceUtil.getFile(pdfPath);
                             if (tabPdf.exists()) {
@@ -168,5 +181,4 @@ public class ExcelTabClientImpl implements ExcelTabClient {
         return pdfUrl;
     }
 
-
 }

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

@@ -198,7 +198,6 @@ public class WbsTreePrivateClientImpl implements WbsTreePrivateClient {
     @Override
     public WbsTreePrivate getNodeByPrimaryKeyId(String primaryKeyId) {
         return wbsTreePrivateService.getBaseMapper().selectOne(Wrappers.<WbsTreePrivate>lambdaQuery()
-                .select(WbsTreePrivate::getInitTableName)
                 .eq(WbsTreePrivate::getStatus, 1)
                 .eq(WbsTreePrivate::getPKeyId, primaryKeyId));
     }

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

@@ -198,4 +198,17 @@ public interface IExcelTabService extends BaseService<ExcelTab> {
      * 试验委托单 生成 pdf
      */
     String getEntrustPDFTrial(Long pKeyId, String contractId, Long groupId) throws Exception;
+
+
+    // 添加
+    JSONArray addLoadDataInfo(JSONArray dataArray);
+
+    /**
+     * 委托单获取数据信息
+     * @param id
+     * @param pkeyId
+     * @param contractId
+     * @return
+     */
+    List<Map<String, Object>> getBussDataInfoTrialentrust(Long id, Long pkeyId, Long contractId);
 }

+ 3 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IWbsFormElementService.java

@@ -2,6 +2,7 @@ package org.springblade.manager.service;
 
 import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.tool.api.R;
 import org.springblade.manager.dto.FormElementDTO2;
 import org.springblade.manager.dto.WbsFormElementDTO2;
 import org.springblade.manager.entity.WbsFormElement;
@@ -10,6 +11,7 @@ import org.springblade.manager.excel.WbsFormElementExcel;
 import org.springblade.manager.vo.WbsFormElementVO;
 import org.springblade.manager.vo.WbsFormElementVO2;
 import org.springblade.manager.vo.WbsNodeTableVO;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
 
@@ -31,7 +33,7 @@ public interface IWbsFormElementService extends BaseService<WbsFormElement> {
 
     boolean deleteAndSyn(String ids, String elementName, String tableName);
 
-    boolean updateAndSyn(List<WbsFormElement> wbsFormElementList, String initTableName);
+    R updateAndSyn(List<WbsFormElement> wbsFormElementList, String initTableName);
 
     List<WbsFormElementDTO2> findWbsTreeTableSameLevel(String parentId);
 

+ 3 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeContractServiceImpl.java

@@ -566,6 +566,9 @@ public class ArchiveTreeContractServiceImpl extends BaseServiceImpl<ArchiveTreeC
 					if (contractInfo.getStatus() == 0) {
 						if (ar.getTreeCode().equals("C") && contractInfo.getContractType() == 1) {
 							//复制施工
+							if(contractInfo.getContractName().contains("加油")){
+								System.out.println("www");
+							}
 							List<ArchiveTreeContract> tmpSaveList =
 									archiveTreeContractSync.getContractSaveList(srcTree,ar,contractInfo,dstNode);
 							saveList.addAll(tmpSaveList);

+ 1 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeContractSyncImpl.java

@@ -132,9 +132,8 @@ public class ArchiveTreeContractSyncImpl {
         Long newNodeId = dstTree.getId();
         ArchiveTreeVO2 subTree = ForestNodeMergerEx.getSubTree(srcTree, srcNodeId);
 
-
         arTreeContractInitService.copyContractTree(dstNode.getTenantId(), dstNode.getProjectId()
-                , contractInfo, newNodeId, subTree.getChildren(), saveList, null);
+                    , contractInfo, newNodeId, subTree.getChildren(), saveList, null);
 
         return saveList;
     }

+ 436 - 114
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -333,9 +333,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     }
                 }
                 dataInfo2.put("p_key_id", tableInfo.getPkeyId());
-                dataInfo2.put("classify",tableInfo.getClassify());
-                dataInfo2.put("contractId",tableInfo.getContractId());
-                dataInfo2.put("projectId",tableInfo.getProjectId());
+                dataInfo2.put("classify", tableInfo.getClassify());
+                dataInfo2.put("contractId", tableInfo.getContractId());
+                dataInfo2.put("projectId", tableInfo.getProjectId());
                 tableInfo.setDataMap(dataMap2);
                 result.add(tableInfo);
             }
@@ -352,40 +352,40 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 FormulaLog log = new FormulaLog();
                 /*每次都是部分表单提交,保证跨节点跨表取数正常,其次是反向依赖的被动刷新*/
                 List<NodeTable> tableAll = createNodeTables(nodeId, tableInfoList.get(0).getContractId(), tableInfoList.get(0).getProjectId(), type);
-                if(tableAll.size()>tableInfoList.size()){
+                if (tableAll.size() > tableInfoList.size()) {
                     TableInfo example = tableInfoList.get(0);
                     /*补充缺失的数据*/
-                    List<Long> cp= tableInfoList.stream().map(TableInfo::getPkeyId).map(Long::parseLong).collect(Collectors.toList());
-                    List<Long> load=tableAll.stream().map(NodeTable::getPKeyId).filter(pk->!cp.contains(pk)).collect(Collectors.toList());
-                    Map<Long,String> keyMap=tableAll.stream().collect(Collectors.toMap(NodeTable::getPKeyId,NodeTable::getInitTableName));
-                    Map<String,List<Long>> loadMap=load.stream().collect(Collectors.groupingBy(keyMap::get,Collectors.toList()));
-                    loadMap.entrySet().parallelStream().forEach(entry->{
+                    List<Long> cp = tableInfoList.stream().map(TableInfo::getPkeyId).map(Long::parseLong).collect(Collectors.toList());
+                    List<Long> load = tableAll.stream().map(NodeTable::getPKeyId).filter(pk -> !cp.contains(pk)).collect(Collectors.toList());
+                    Map<Long, String> keyMap = tableAll.stream().collect(Collectors.toMap(NodeTable::getPKeyId, NodeTable::getInitTableName));
+                    Map<String, List<Long>> loadMap = load.stream().collect(Collectors.groupingBy(keyMap::get, Collectors.toList()));
+                    loadMap.entrySet().parallelStream().forEach(entry -> {
                         /*init_table_name*/
-                        String k=entry.getKey();
+                        String k = entry.getKey();
                         /*pkeyId集合*/
-                        List<Long> v= entry.getValue();
-                      List<Map<String,Object>> dataMap=  this.jdbcTemplate.queryForList("select * from "+k+" where p_key_id in ("+v.stream().map(Objects::toString).collect(Collectors.joining(","))+")");
-                      if(dataMap.size()>0){
-                           dataMap.forEach(map->{
-                               TableInfo e = new TableInfo();
-                               e.setPkeyId(map.get("p_key_id").toString());
-                               e.setDataMap(new LinkedHashMap<>());
-                               e.setToBeUpdated(false);
-                               e.setBusinessId(null);
-                               e.setContractId(example.getContractId());
-                               e.setClassify(example.getClassify());
-                               e.setProjectId(example.getProjectId());
-                               e.setGroupId(example.getGroupId());
-                               map.forEach((key,value)->{
-                                   if(key.startsWith("key_")){
-                                       e.getDataMap().put(key,Func.toStr(value));
-                                   }
-                               });
-                               tableInfoList.add(e);
-                           });
-                      }
+                        List<Long> v = entry.getValue();
+                        List<Map<String, Object>> dataMap = this.jdbcTemplate.queryForList("select * from " + k + " where p_key_id in (" + v.stream().map(Objects::toString).collect(Collectors.joining(",")) + ")");
+                        if (dataMap.size() > 0) {
+                            dataMap.forEach(map -> {
+                                TableInfo e = new TableInfo();
+                                e.setPkeyId(map.get("p_key_id").toString());
+                                e.setDataMap(new LinkedHashMap<>());
+                                e.setToBeUpdated(false);
+                                e.setBusinessId(null);
+                                e.setContractId(example.getContractId());
+                                e.setClassify(example.getClassify());
+                                e.setProjectId(example.getProjectId());
+                                e.setGroupId(example.getGroupId());
+                                map.forEach((key, value) -> {
+                                    if (key.startsWith("key_")) {
+                                        e.getDataMap().put(key, Func.toStr(value));
+                                    }
+                                });
+                                tableInfoList.add(e);
+                            });
+                        }
                     });
-                    List<Long> tableAllIds=tableAll.stream().map(NodeTable::getPKeyId).collect(Collectors.toList());
+                    List<Long> tableAllIds = tableAll.stream().map(NodeTable::getPKeyId).collect(Collectors.toList());
                     tableInfoList.sort(Comparator.comparingInt(a -> tableAllIds.indexOf(Long.parseLong(a.getPkeyId()))));
                 }
                 StopWatch stopWatch = new StopWatch();
@@ -437,7 +437,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     }
 
 
-
     @Override
     public void formulaFillData2(JSONArray dataArray, ExecuteType type) {
         try {
@@ -513,7 +512,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     private List<NodeTable> createNodeTables(Long nodeId, String contractId, String projectId, ExecuteType type) {
         List<NodeTable> tableAll = new ArrayList<>();
         if (type.equals(ExecuteType.INSPECTION)) {
-            List<AppWbsTreeContractVO> treeNode = wbsTreeContractService.searchNodeAllTable(nodeId.toString(), "1", contractId, projectId,null);
+            List<AppWbsTreeContractVO> treeNode = wbsTreeContractService.searchNodeAllTable(nodeId.toString(), "1", contractId, projectId, null);
             tableAll = BeanUtil.copyProperties(treeNode, NodeTable.class);
         } else if (type.equals(ExecuteType.TESTING)) {
             List<WbsTreePrivateVO4> wbsTreePrivateVO4s = wbsTreePrivateService.searchNodeAllTable(nodeId.toString(), "1", "9", contractId, projectId, null, null);
@@ -563,12 +562,12 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
     private void updateFormulaLog(String log, Long pKeyId) {
         try {
-            if(log.length()<=2000) {
+            if (log.length() <= 2000) {
                 String deleteSql = "DELETE FROM m_formula_log WHERE id = ?";
                 String insertSql = "INSERT INTO m_formula_log (id, content,update_time) VALUES (?, ?,?)";
                 jdbcTemplate.update(deleteSql, pKeyId);
                 jdbcTemplate.update(insertSql, pKeyId, log, DateTime.now());
-            }else{
+            } else {
                 StaticLog.error(log);
             }
         } catch (Exception e) {
@@ -594,7 +593,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 currentNode.setWbsId(Long.parseLong(publicWtp.getWbsId()));
                 currentNode.setWtpPkeyId(wtp.getPKeyId());
                 currentNode.setWbsNodeId(publicWtp.getId());
-                if(Func.isNotBlank(wtc.getTreeCode())){
+                if (Func.isNotBlank(wtc.getTreeCode())) {
                     currentNode.getTreeCode().addAll(FormulaUtils.treeCodeSplit(wtc.getTreeCode()));
                 }
                 return currentNode;
@@ -928,8 +927,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
         //获取未匹配的字段
         List<WbsFormElement> list = new ArrayList<>();
-        if(set!=null && set.size()>0){
-             list = baseMapper.getUnMatchField(tabId, set);
+        if (set != null && set.size() > 0) {
+            list = baseMapper.getUnMatchField(tabId, set);
         }
         return list;
     }
@@ -1145,7 +1144,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     String sqlInfo = "";
                     LinkedHashMap<String, String> dataMap2 = tableInfo.getDataMap();
                     /*检查发现有p_key_id缺失的情况,导致表单数据丢失,所以强制覆盖*/
-                    dataMap2.put("p_key_id",tableInfo.getPkeyId());
+                    dataMap2.put("p_key_id", tableInfo.getPkeyId());
                     //统计保存的字段
 //                    saveData.append(wbsTreeContract.getNodeName()+"<br>");
 //                    for (String s : dataMap2.keySet()) {
@@ -1236,7 +1235,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 if (p.contains("Data too long for column")) {
                     List<Map<String, Object>> result = this.jdbcTemplate.queryForList("select CONCAT(a.tab_ch_name,'&',b.e_name) tf from m_table_info a join m_wbs_form_element b on b.f_id=a.id where a.tab_en_name='" + m.group(1) + "' and  b.e_key='" + m.group(4) + "'");
                     if (result.size() > 0) {
-                        sb.append("【").append(result.get(0).values().stream().map(String::valueOf).collect(Collectors.joining(","))).append(m.group(4)+"数据库字段太短】");
+                        sb.append("【").append(result.get(0).values().stream().map(String::valueOf).collect(Collectors.joining(","))).append(m.group(4) + "数据库字段太短】");
                     }
                 } else if (p.contains("Unknown column")) {
                     sb.append("【").append(m.group(1)).append(":").append(m.group(4)).append("关联错误】");
@@ -1289,14 +1288,15 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     }
 
     @Override
-    public Map<String,Object> getBussDataInfo(Long pkeyId, int type) {
+    public Map<String, Object> getBussDataInfo(Long pkeyId, int type) {
         /*只有默认不执行表单公式isFormLoading==false*/
-        return this.getBussDataInfo(pkeyId,type,false);
+        return this.getBussDataInfo(pkeyId, type, false);
     }
+
     @Override
-    public Map<String,Object> getBussDataInfo(Long pkeyId, int type,Boolean isFormLoading) {
+    public Map<String, Object> getBussDataInfo(Long pkeyId, int type, Boolean isFormLoading) {
         /*需要加载表单公式的时候isFormLoading==true*/
-        Document document=null;
+        Document document = null;
         Map<String, Object> reData = new HashMap<>();
 
         WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
@@ -1329,7 +1329,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
             String htmlString = IoUtil.readToString(inputStreamByUrl);
             Document doc = Jsoup.parse(htmlString);
-            document=doc;
+            document = doc;
 
             // 解析
             // 模糊匹配
@@ -1380,10 +1380,14 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 }
 
             }
+
             if (sgtitle.size() >= 1) {
-                int y = Integer.parseInt(sgtitle.attr("trindex"));
-                if (y <= 20) {
-                    reData.put(sgtitle.attr("keyName"), contractInfo.getConstructionUnitName());
+                for (Element element : sgtitle) {
+                    int trindex = Integer.parseInt(element.attr("trindex"));
+                    String placeholderxx = element.attr("placeholder");
+                    if (trindex < 10 || placeholderxx.equals("施工单位")) {
+                        reData.put(element.attr("keyName"), contractInfo.getConstructionUnitName());
+                    }
                 }
             }
 
@@ -1517,7 +1521,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                             if (tabVal.contains("[") && tabVal.contains("年")) {
                                 String[] strings = StringUtils.strip(tabData[0], "[]").split(",");
                                 reData.put(key + "__" + tabData[1], strings);
-                            }if (tabVal.contains("[") && tabVal.contains("]") && tabVal.indexOf(",")>=0) {
+                            }
+                            if (tabVal.contains("[") && tabVal.contains("]") && tabVal.indexOf(",") >= 0) {
                                 String[] strings = StringUtils.strip(tabData[0], "[]").split(",");
                                 reData.put(key + "__" + tabData[1], strings);
                             } else {
@@ -1560,15 +1565,15 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
         reData.put("tabGroupId", wbsTreeContract.getTabGroupId());
         /*表单公式*/
-        if(isFormLoading) {
+        if (isFormLoading) {
             this.formulaService.paramFormula(wbsTreeContract, reData, document);
         }
         return reData;
     }
 
     @Override
-    public Map<String, Object> getBussDataInfoMulti(Long pkeyId, int type, Boolean isFormLoading, ConcurrentHashMap<String,String> htmlStrCache) {
-        Document document=null;
+    public Map<String, Object> getBussDataInfoMulti(Long pkeyId, int type, Boolean isFormLoading, ConcurrentHashMap<String, String> htmlStrCache) {
+        Document document = null;
         Map<String, Object> reData = new HashMap<>();
 
         WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
@@ -1598,14 +1603,14 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         // 匹配关联
         try {
             String htmlString;
-            if(htmlStrCache.containsKey(wbsTreeContract.getInitTableName())) {
+            if (htmlStrCache.containsKey(wbsTreeContract.getInitTableName())) {
                 htmlString = htmlStrCache.get(wbsTreeContract.getInitTableName());
-            }else{
+            } else {
                 InputStream inputStreamByUrl = FileUtils.getInputStreamByUrl(wbsTreeContract.getHtmlUrl());
                 htmlString = IoUtil.readToString(inputStreamByUrl);
             }
             Document doc = Jsoup.parse(htmlString);
-            document=doc;
+            document = doc;
             // 解析
             // 模糊匹配
             Elements dwtitle = doc.select("el-input[placeholder~=.*承包单位]");
@@ -1827,7 +1832,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
         reData.put("tabGroupId", wbsTreeContract.getTabGroupId());
         /*表单公式*/
-        if(isFormLoading) {
+        if (isFormLoading) {
             this.formulaService.paramFormula(wbsTreeContract, reData, document);
         }
         return reData;
@@ -1895,7 +1900,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         int all = 0;
         List<CellRangeAddress> mergedRegions = sheet.getMergedRegions();
         int xle = 10;
-        if(mergedRegions.size()<=10){
+        if (mergedRegions.size() <= 10) {
             xle = mergedRegions.size();
         }
         for (int i = 0; i < xle; i++) {
@@ -1942,7 +1947,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             }
         }
 
-        if(pkeyId==1771097177339199489L){
+        if (pkeyId == 1771097177339199489L) {
             System.out.println("1231");
         }
         //数据不为空
@@ -1965,10 +1970,10 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             Long sigSize = table.getElementsByAttribute(":readonly").stream().count();
             int keySize = keyList.size();
             List<String> fills = DataInfo.keySet().stream().filter(e -> e.contains("__") && e.contains("key")).collect(Collectors.toList());
-            if (fills.size() != 0 && keyList != null && keyList.size() != 0){
-                if (keySize == sigSize){
+            if (fills.size() != 0 && keyList != null && keyList.size() != 0) {
+                if (keySize == sigSize) {
                     realFillRate = 100;
-                }else if (keySize > sigSize) {
+                } else if (keySize > sigSize) {
                     keySize = keySize - sigSize.intValue();
                     keyList.retainAll(fills);
                     Double v = new Double(keyList.size()) / new Double(keySize) * 100;
@@ -2000,8 +2005,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                             }
 
                             String myData = DataInfo.get(val) + "";
-                            System.out.println(data.attr("type").indexOf("date")>=0);
-                            if (data.attr("type").indexOf("date")>=0 && (myData.indexOf("T") >= 0 && myData.indexOf("-") >= 0) || (myData.indexOf(",") >= 0 && myData.indexOf("]") >= 0) ) {
+                            System.out.println(data.attr("type").indexOf("date") >= 0);
+                            if (data.attr("type").indexOf("date") >= 0 && (myData.indexOf("T") >= 0 && myData.indexOf("-") >= 0) || (myData.indexOf(",") >= 0 && myData.indexOf("]") >= 0)) {
                                 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
                                 sdf.setTimeZone(TimeZone.getTimeZone("GTM+8"));
                                 SimpleDateFormat formatStr = new SimpleDateFormat("yyyy年MM月dd日");
@@ -2041,14 +2046,14 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                 if (obj instanceof String[]) {
                                     String[] dataDate = (String[]) obj;
                                     String HtmlEle = data.toString();
-                                    if(HtmlEle.indexOf("el-date-picker")>=0){//时间时间段处理格式
+                                    if (HtmlEle.indexOf("el-date-picker") >= 0) {//时间时间段处理格式
                                         if ((dataDate[0].trim()).equals((dataDate[1].trim()))) {
                                             myData = dataDate[0];
                                         } else {
                                             myData = dataDate[0].replace("\"", "") + "-" + dataDate[1].trim().replace("\"", "");
                                         }
-                                    }else{
-                                        myData = Func.convert(dataDate,String.class).replaceAll(" ","");
+                                    } else {
+                                        myData = Func.convert(dataDate, String.class).replaceAll(" ", "");
                                     }
                                 }
                             }
@@ -2056,7 +2061,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                             if ((myData.indexOf("https") >= 0 || myData.indexOf("http") >= 0) && myData.indexOf("aliyuncs") >= 0) {
 
                                 InputStream imageIn = CommonUtil.getOSSInputStream(myData);
-                                if(imageIn!=null) {
+                                if (imageIn != null) {
                                     byte[] byteNew = IOUtils.toByteArray(imageIn);
                                     byte[] bytes = CommonUtil.compressImage(byteNew);
                                     // 这里根据实际需求选择图片类型
@@ -2170,7 +2175,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         FileOutputStream outputStream = new FileOutputStream(excelPath);
         workbook.write(outputStream);
 
-      //  FileUtils.excel2pdf(excelPath, pdfPath);
+        //  FileUtils.excel2pdf(excelPath, pdfPath);
         FileUtils.excelToPdf(excelPath, pdfPath);
 
         BladeFile bladeFile = newIOSSClient.uploadFile(pkeyId + ".pdf", pdfPath);
@@ -2232,9 +2237,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     public void getBussPdfs(String nodeId, String classify, String contractId, String projectId) throws Exception {
         String file_path = FileUtils.getSysLocalFileUrl();
         // 获取有权限的节点信息
-        List<AppWbsTreeContractVO> wbsTreeContractList = wbsTreeContractService.searchNodeAllTable(nodeId, classify, contractId, projectId,null);
+        List<AppWbsTreeContractVO> wbsTreeContractList = wbsTreeContractService.searchNodeAllTable(nodeId, classify, contractId, projectId, null);
         List<String> data = new ArrayList<>();
-        if(nodeId.indexOf(":")>=0){
+        if (nodeId.indexOf(":") >= 0) {
             nodeId = nodeId.split(":")[0];
         }
         if (wbsTreeContractList != null && wbsTreeContractList.size() >= 1) {
@@ -2276,7 +2281,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     contractId = wbsTreeContract.getContractId();
                 }
             }
-            String sql = "update u_information_query set pdf_url ='" + bladeFile.getLink() + "' , sort = " + sort +",e_visa_pdf_url = null" +" where classify='" + classify + "' and  wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' ";
+            String sql = "update u_information_query set pdf_url ='" + bladeFile.getLink() + "' , sort = " + sort + ",e_visa_pdf_url = null" + " where classify='" + classify + "' and  wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' ";
             System.out.println(sql);
             jdbcTemplate.execute(sql);
         }
@@ -2293,7 +2298,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 tableInfo.setToBeUpdated(true);
 
                 // entrustInfo = 为 委托单信息
-                if(!tabIds.equals("entrustInfo")){
+                if (!tabIds.equals("entrustInfo")) {
                     if (!tabIds.contains(tableInfo.getPkeyId())) {
                         //隐藏表不做处理
                         continue;
@@ -2305,6 +2310,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     this.setFirstData(dataInfo2, tableInfo);
                     //设置日志信息
                     this.setTheLogData(dataInfo2, tableInfo);
+
+
                 }
                 tableInfo.setContractId(dataInfo2.getString("contractId"));
 
@@ -2329,6 +2336,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 //计算数据
                 LinkedHashMap<String, List<String>> dataMap = dataInfo2.keySet().stream().filter(e -> e.contains("__")).collect(Collectors.groupingBy(e -> e.split("__")[0], LinkedHashMap<String, List<String>>::new, Collectors.toList()));
                 LinkedHashMap<String, String> dataMap2 = new LinkedHashMap<>();
+
                 //字段组合
                 for (String k : dataMap.keySet()) {
                     if (dataMap.get(k).size() > 1 && !dataMap.get(k).contains("000Z")) {
@@ -2350,7 +2358,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                         StringBuilder lastStr = new StringBuilder(dataInfo2.getString(ziduan[0]) + "_^_" + ziduan[0].split("__")[1]);
                         for (int i = 1; i < ziduan.length; i++) {
                             String keyData = dataInfo2.getString(ziduan[i]);
-                            if (!keyData.equals("")) {
+                            if (keyData!=null && Func.isNotEmpty(keyData)) {
                                 lastStr.append("☆").append(dataInfo2.getString(ziduan[i])).append("_^_").append(ziduan[i].split("__")[1]);
                             }
 
@@ -2397,6 +2405,22 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             return list;
         }
 
+        //获取引用数据信息
+        String loadDataId = "";
+        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") + "";
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return list;
+        } finally {
+            reData.put("loadDataId", loadDataId);
+        }
+
+
         //实体数据
         String querySql = "select * from " + wbsTreePrivate.getInitTableName() + " where p_key_id=" + pkeyId + " and group_id = " + groupId;
         List<Map<String, Object>> dataIn = jdbcTemplate.queryForList(querySql);
@@ -2567,6 +2591,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                     if (tabVal.contains("[") && tabVal.contains("年")) {
                                         String[] strings = StringUtils.strip(tabData[0], "[]").split(",");
                                         reData.put(key + "__" + tabData[1], strings);
+                                    }else if (tabVal.contains("[") && tabVal.contains("]") && tabVal.indexOf(",") >= 0) {
+                                        String[] strings = StringUtils.strip(tabData[0], "[]").split(",");
+                                        reData.put(key + "__" + tabData[1], strings);
                                     } else {
                                         reData.put(key + "__" + tabData[1], tabData[0]);
                                     }
@@ -2790,8 +2817,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
      */
     @Override
     public String getBussPDFTrial(Long pkeyId, String contractId, Long id, int pageNumber, int pageNumberCount, TrialSelfInspectionRecordDTO dto) throws Exception {
-        String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
-        String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
+        String file_path = FileUtils.getSysLocalFileUrl();
+
         WbsTreePrivate wbsTreePrivate = wbsTreePrivateService.getBaseMapper().selectOne(Wrappers.<WbsTreePrivate>query().lambda()
                 .eq(WbsTreePrivate::getPKeyId, pkeyId));
         if (wbsTreePrivate == null) {
@@ -2873,13 +2900,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         //数据不为空,构造数据
         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);
-        }
+        InputStream fileInputStream = FileUtils.getInputStreamByUrl(fileUrl);
 
         String htmlString = IoUtil.readToString(fileInputStream);
         htmlString = htmlString.replaceAll("placeholder", "placeholderxx");
@@ -2965,9 +2986,15 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                             Object obj = DataInfo.get(val);
                                             if (obj instanceof String[]) {
                                                 String[] dataDate = (String[]) obj;
-                                                myData = dataDate[0].trim() + "-" + dataDate[1].trim();
-                                                if (dataDate[0].trim().equals(dataDate[1].trim())) {
-                                                    myData = dataDate[0];
+                                                String HtmlEle = data.toString();
+                                                if (HtmlEle.indexOf("el-date-picker") >= 0) {//时间时间段处理格式
+                                                    if ((dataDate[0].trim()).equals((dataDate[1].trim()))) {
+                                                        myData = dataDate[0];
+                                                    } else {
+                                                        myData = dataDate[0].replace("\"", "") + "-" + dataDate[1].trim().replace("\"", "");
+                                                    }
+                                                } else {
+                                                    myData = Func.convert(dataDate, String.class).replaceAll(" ", "");
                                                 }
                                             }
                                         }
@@ -3001,6 +3028,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                             Row row = sheet.getRow(y1 - 1);
                                             if (row != null) {
                                                 Cell cell = row.getCell(x1 - 1);
+
                                                 if (cell != null) {
                                                     String exceVal = cell.getStringCellValue().replaceAll(" ", "");
                                                     short fontIndex = cell.getCellStyle().getFontIndex();
@@ -3148,14 +3176,25 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             //查询是否存在关系
             String sqlQuery = "select id from u_trial_self_data_record where record_id = " + id + " and tab_id = " + pkeyId;
             List<TrialSelfDataRecord> query = jdbcTemplate.query(sqlQuery, new BeanPropertyRowMapper<>(TrialSelfDataRecord.class));
+
+            // 获取匹配的laodId
+            String load_data_id = "";
+            JSONArray jsonArray = dto.getDataInfo().getJSONArray("orderList");
+            load_data_id = jsonArray.getJSONObject(0).getString("loadDataId");
+
             String sql;
             if (query.size() == 0) {
                 //新增关系
-                sql = "insert into u_trial_self_data_record(id,record_id,tab_id,is_buss_show,is_tab_pdf,is_tab_file_type,pdf_url) values" +
-                        "(" + SnowFlakeUtil.getId() + "," + id + "," + pkeyId + "," + 1 + "," + 2 + "," + 1 + ",'" + bladeFile.getLink() + "')";
+                sql = "insert into u_trial_self_data_record(id,record_id,tab_id,is_buss_show,is_tab_pdf,is_tab_file_type,pdf_url,load_data_id) values" +
+                        "(" + SnowFlakeUtil.getId() + "," + id + "," + pkeyId + "," + 1 + "," + 2 + "," + 1 + ",'" + bladeFile.getLink() + "','" + load_data_id + "')";
             } else {
                 //修改pdfUrl
-                sql = "update u_trial_self_data_record set pdf_url ='" + bladeFile.getLink() + "' where record_id = " + id + " and tab_id = " + pkeyId;
+                if (load_data_id == null || Func.isEmpty(load_data_id)) {
+                    sql = "update u_trial_self_data_record set pdf_url ='" + bladeFile.getLink() + "' where record_id = " + id + " and tab_id = " + pkeyId;
+                } else {
+                    sql = "update u_trial_self_data_record set pdf_url ='" + bladeFile.getLink() + "',load_data_id='" + load_data_id + "' where record_id = " + id + " and tab_id = " + pkeyId;
+                }
+
             }
             jdbcTemplate.execute(sql);
 
@@ -3170,7 +3209,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     @Override
     public String getBussPDFSTrial(String nodeId, String tableType, String classify, String contractId, String
             projectId, Long id, String tabIds, TrialSelfInspectionRecordDTO dto) throws Exception {
-        String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        String file_path = FileUtils.getSysLocalFileUrl();
         //获取有权限的表的信息
         List<WbsTreePrivate> queryList = jdbcTemplate.query("select p_key_id,html_url,table_type,sort,node_name,create_time from m_wbs_tree_private where is_deleted = 0 and p_key_id in (" + tabIds + ") order by sort,node_name,create_time", new BeanPropertyRowMapper<>(WbsTreePrivate.class));
         List<String> dataPdfUrls = new ArrayList<>();
@@ -3292,14 +3331,14 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         String contractId = tableInfo1.getString("contractId");
         String projectId = tableInfo1.getString("projectId");
         String classify = tableInfo1.getString("classify");
-        String UserId = AuthUtil.getUserId()+"";
-        RedisTemplate.opsForValue().set("pdf-" + nodeId+"-"+classify, "1", 300, TimeUnit.SECONDS);
+        String UserId = AuthUtil.getUserId() + "";
+        RedisTemplate.opsForValue().set("pdf-" + nodeId + "-" + classify, "1", 300, TimeUnit.SECONDS);
         //构造阻塞器
         CountDownLatch cdl = new CountDownLatch(dataArray.size());
         // 构造多线程保存用户数据到表中 并生成excel
         for (int i = 0; i < dataArray.size(); i++) {
             JSONObject jsonObject = dataArray.getJSONObject(i);
-            jsonObject.put("UserId",UserId);
+            jsonObject.put("UserId", UserId);
             Thread countUserThread = new Thread(() -> {
                 try {
                     SaveOneTabInfo(jsonObject);
@@ -3315,10 +3354,10 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 try {
                     cdl.await();
                     //合并pdf加载
-                    this.getBussPdfs(nodeId+":"+UserId, classify, contractId, projectId);
+                    this.getBussPdfs(nodeId + ":" + UserId, classify, contractId, projectId);
                     //更新缓存
                     informationQueryClient.delAsyncWbsTree(contractId);
-                    RedisTemplate.delete("pdf-" + nodeId+"-"+classify);
+                    RedisTemplate.delete("pdf-" + nodeId + "-" + classify);
                 } catch (Exception e) {
                     e.printStackTrace();
                 } finally {
@@ -3409,10 +3448,10 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             Long sigSize = table.getElementsByAttribute(":readonly").stream().count();
             int keySize = keyList.size();
             List<String> fills = tableInfo.keySet().stream().filter(e -> StringUtils.isNotEmpty(tableInfo.getString(e)) && e.contains("__") && e.contains("key")).collect(Collectors.toList());
-            if (fills.size() != 0 && keyList != null && keyList.size() != 0){
-                if (keySize == sigSize){
+            if (fills.size() != 0 && keyList != null && keyList.size() != 0) {
+                if (keySize == sigSize) {
                     realFillRate = 100;
-                }else if (keySize > sigSize) {
+                } else if (keySize > sigSize) {
                     keySize = keySize - sigSize.intValue();
                     keyList.retainAll(fills);
                     Double v = new Double(keyList.size()) / new Double(keySize) * 100;
@@ -3623,17 +3662,17 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             throw new RuntimeException("字段过长,新增失败");
         }
 
-        String fileName ="暂无文件提名1";
+        String fileName = "暂无文件提名1";
         // 处理文件提名
         try {
             WbsTreeContract wbsTreeContractByP = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, nodeId));
             //处理文件提名
             fileName = this.wbsParamService.createFileTitle(wbsTreeContractByP);
-        }catch (Exception exception){
+        } catch (Exception exception) {
 
-        }finally {
+        } finally {
             //huangjn 保存成功后调用生成资料查询列表数据
-            this.informationQueryClient.saveOrUpdateInformationQueryData(nodeId+":"+UserId, "首件使用字段", "业务ID(主要将来给首件使用)", fileName, Integer.parseInt(classify), 2, "false", "源文件(首件字段)", "pdf文件(首件字段)", "首件上传总结报告名称", new ArrayList<>());
+            this.informationQueryClient.saveOrUpdateInformationQueryData(nodeId + ":" + UserId, "首件使用字段", "业务ID(主要将来给首件使用)", fileName, Integer.parseInt(classify), 2, "false", "源文件(首件字段)", "pdf文件(首件字段)", "首件上传总结报告名称", new ArrayList<>());
         }
 
         String file_path = FileUtils.getSysLocalFileUrl();
@@ -3712,7 +3751,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     }
 
     /**
-     *
      * @param parentName
      * @return
      */
@@ -3819,7 +3857,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         FileOutputStream outputStream = new FileOutputStream(excelPath);
         workbook.write(outputStream);
         FileUtils.excelToPdf(excelPath, pdfPath);
-        PdfAddimgUtil.pdfAddImgInfo(pdfPath,String.join(",",sign));
+        PdfAddimgUtil.pdfAddImgInfo(pdfPath, String.join(",", sign));
         return R.data(PdfAddimgUtil.getNetUrl(pdfPath));
     }
 
@@ -3905,14 +3943,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
         //数据不为空,构造数据
         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);
-        }
+        InputStream fileInputStream = FileUtils.getInputStreamByUrl(fileUrl);
 
         String htmlString = IoUtil.readToString(fileInputStream);
         htmlString = htmlString.replaceAll("placeholder", "placeholderxx");
@@ -4106,7 +4137,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
         if (bladeFile != null) {
             String pdfUrl = bladeFile.getLink();
-            jdbcTemplate.update("update u_entrust_info set entrust_pdf = '"+pdfUrl+"' where id='"+groupId+"' ");
+            jdbcTemplate.update("update u_entrust_info set entrust_pdf = '" + pdfUrl + "' where id='" + groupId + "' ");
             List<InformationQuery> query2 = jdbcTemplate.query("select id from u_information_query where classify = 1 and wbs_id ='" + groupId + "' and contract_id ='" + contractId + "'", new BeanPropertyRowMapper<>(InformationQuery.class));
             if (query2.size() > 0) {
                 jdbcTemplate.execute("update u_information_query set pdf_url ='" + bladeFile.getLink() + "', name ='委托单'  where classify='1' and  wbs_id='" + groupId + "' and contract_id ='" + contractId + "'");
@@ -4118,4 +4149,295 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         return "操作失败";
     }
 
-}
+    /**
+     * 添加抽取的 数据信息
+     *
+     * @return
+     */
+    @Override
+    public JSONArray addLoadDataInfo(JSONArray jsonArray) {
+        JSONArray json2 = new JSONArray();
+        for (int i = 0; i < jsonArray.size(); i++) {
+            JSONObject jsonObject = jsonArray.getJSONObject(i);
+            String loadDataId = jsonObject.getString("loadDataId");
+
+            if (loadDataId != null && Func.isNotEmpty(loadDataId)) {
+
+                String pkeyId = jsonObject.getString("pkeyId");
+                String projectId = jsonObject.getString("projectId");
+                WbsTreePrivate wbsTreePrivate = this.wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getPKeyId, pkeyId));
+
+                String sql = "select * from m_wbs_form_element where is_deleted = 0 and dynamic_dict in('1','2','3','4','5','6','7','8','9','10','11')  and f_id=" + wbsTreePrivate.getInitTableId()+" order by dynamic_dict";
+                List<Map<String, Object>> wbsFormElements = jdbcTemplate.queryForList(sql);
+
+                String htmlString = null;
+                try {
+                    htmlString = IoUtil.readToString(FileUtils.getInputStreamByUrl(wbsTreePrivate.getHtmlUrl()));
+                } catch (Exception e) {
+                    throw new RuntimeException(e);
+                }
+                Document doc = Jsoup.parse(htmlString);
+
+                List<Map<String, Object>> maps = jdbcTemplate.queryForList("select * from u_view_gather_data_info where id in(" + loadDataId + ")");
+                if (maps != null && maps.size() >= 1) {
+                    for (int j = 0; j < maps.size(); j++) {
+                        Map<String, Object> dataInfo = maps.get(j);
+                        int y1=0;
+                        int y2=0;
+                        for (Map<String, Object> wb : wbsFormElements) {
+
+                            if ((wb.get("dynamic_dict") + "").equals("1")) { //试验压力机_样品编号
+                                Elements elements = doc.getElementsByAttributeValueStarting("id", wb.get("e_key") + "");
+                                String id = elements.get(j).attr("id");
+                                jsonObject.put(id, dataInfo.get("specificationNumber"));
+                                y1 = Func.toInt(elements.get(j).attr("y1"));
+                                y2 = Func.toInt(elements.get(j).attr("y2"));
+                            }
+                            if ((wb.get("dynamic_dict") + "").equals("4")) { //试验压力机_设计强度
+                                Elements elements = doc.getElementsByAttributeValueStarting("id", wb.get("e_key") + "");
+                                Element element = elements.get(j);
+                                int valy1 = Func.toInt(element.attr("y1"));
+                                int valy2 = Func.toInt(element.attr("y2"));
+                                String id = element.attr("id");
+                                if( valy1>=y1 && valy2<=y2){
+                                    jsonObject.put(id, dataInfo.get("desStrength"));
+                                }
+                            }
+                            if ((wb.get("dynamic_dict") + "").equals("3")) { //试验压力机_强度代表值
+                                Elements elements = doc.getElementsByAttributeValueStarting("id", wb.get("e_key") + "");
+                                Element element = elements.get(0);
+                                int valy1 = Func.toInt(element.attr("y1"));
+                                int valy2 = Func.toInt(element.attr("y2"));
+                                String id= element.attr("id");
+                                if( valy1>=y1 && valy2<=y2){
+                                    jsonObject.put(id, dataInfo.get("strengthAVG"));
+                                }
+                            }
+
+                            if ((wb.get("dynamic_dict") + "").equals("2")) { //试验压力机_荷载(KN)
+                                Elements elements = doc.getElementsByAttributeValueStarting("id", wb.get("e_key") + "");
+                                int valIndex = 0;
+                                for (Element element:elements){
+                                    int valy1 = Func.toInt(element.attr("y1"));
+                                    int valy2 = Func.toInt(element.attr("y2"));
+                                    if( valy1>=y1 && valy2<=y2){
+                                        if(valIndex==0){
+                                            String id1 = element.attr("id");
+                                            jsonObject.put(id1, dataInfo.get("load1"));
+                                        }
+                                        if(valIndex==1){
+                                            String id2 = element.attr("id");
+                                            jsonObject.put(id2, dataInfo.get("load2"));
+                                        }
+                                        if(valIndex==2){
+                                            String id3 = element.attr("id");
+                                            jsonObject.put(id3, dataInfo.get("load3"));
+                                        }
+                                        valIndex = valIndex+1;
+                                    }
+                                }
+                            }
+
+                            if ((wb.get("dynamic_dict") + "").equals("5")) { //试验压力机_强度单值
+                                Elements elements = doc.getElementsByAttributeValueStarting("id", wb.get("e_key") + "");
+                                int valIndex = 0;
+                                for (Element element:elements){
+                                    int valy1 = Func.toInt(element.attr("y1"));
+                                    int valy2 = Func.toInt(element.attr("y2"));
+                                    if( valy1>=y1 && valy2<=y2){
+                                        if(valIndex==0){
+                                            String id1 = element.attr("id");
+                                            jsonObject.put(id1, dataInfo.get("mpa1"));
+                                        }
+                                        if(valIndex==1){
+                                            String id2 = element.attr("id");
+                                            jsonObject.put(id2, dataInfo.get("mpa2"));
+                                        }
+                                        if(valIndex==2){
+                                            String id3 = element.attr("id");
+                                            jsonObject.put(id3, dataInfo.get("mpa3"));
+                                        }
+                                        valIndex = valIndex+1;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            json2.add(jsonObject);
+        }
+        return json2;
+    }
+
+
+    /**
+     * 试验 委托单获取填报信息
+     */
+    @Override
+    public List<Map<String, Object>> getBussDataInfoTrialentrust(Long groupId, Long pkeyId, Long contractId) {
+        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 list;
+        }
+        if (wbsTreePrivate.getHtmlUrl() == null) {
+            return list;
+        }
+
+        //表单是否存储在
+        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 list;
+        }
+
+        //获取引用数据信息
+        String loadDataId = "";
+        String sampleId = "";
+        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") + "";
+            }
+
+            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 list;
+        } finally {
+            reData.put("loadDataId", loadDataId);
+            reData.put("sampleId", sampleId);
+        }
+
+
+        //实体数据
+        String querySql = "select * from " + wbsTreePrivate.getInitTableName() + " where p_key_id=" + pkeyId + " and group_id = " + groupId;
+        List<Map<String, Object>> dataIn = jdbcTemplate.queryForList(querySql);
+
+        //匹配关联
+        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);
+                        }
+                    }
+                }
+            }
+        } 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());
+                }
+            }
+        }
+
+        // 移除Id 和 p_key_id
+        reData.remove("id");
+        reData.remove("p_key_id");
+        reData.remove("classify");
+        reData.remove("contractId");
+        reData.remove("pkeyId");
+        reData.remove("projectId");
+        chart(reData, wbsTreePrivate);
+        list.add(reData);
+        return list;
+    }
+
+}

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

@@ -91,7 +91,7 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
     public TextdictInfoVO selectTextdictInfoById(TextdictInfo textdictInfo) {
         List<TextdictInfoVO>  dataInfo = baseMapper.selectTextdictInfoById(textdictInfo.getId()+"");
         TextdictInfoVO testinfo = new TextdictInfoVO();
-        if(dataInfo==null &&  dataInfo.size()==0){
+        if(dataInfo==null ||  dataInfo.size()==0){
             return testinfo;
         } else if ( dataInfo.size()>1) {
             for (TextdictInfoVO da :dataInfo){

+ 20 - 16
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsFormElementServiceImpl.java

@@ -11,6 +11,7 @@ import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.constant.BladeConstant;
 import org.springblade.core.tool.utils.*;
 import org.springblade.manager.dto.FormElementDTO2;
@@ -285,19 +286,19 @@ public class WbsFormElementServiceImpl extends BaseServiceImpl<WbsFormElementMap
     }
 
     @Override
-    @Transactional(rollbackFor = Exception.class)
-    public boolean updateAndSyn(List<WbsFormElement> wbsFormElementList, String initTableName) {
+    @Transactional
+    public R updateAndSyn(List<WbsFormElement> wbsFormElementList, String initTableName) {
         if (StringUtils.isEmpty(initTableName)) {
-            throw new ServiceException("未获取到initTableName对应实体表名称,操作失败");
+            return R.fail("未获取到initTableName对应实体表名称,操作失败");
         }
         //校验,不能在同一个表单中,为多个字段配置相同的统计标识
         Map<Integer, List<WbsFormElement>> collect = wbsFormElementList.stream()
                 .filter(l->Objects.nonNull(l.getDynamicDict()))
                 .filter(l-> l.getDynamicDict() != 0)
                 .collect(Collectors.groupingBy(WbsFormElement::getDynamicDict));
-        for (Integer integer : collect.keySet()) {
-            if (collect.get(integer).size() >= 2){
-                throw new ServiceException("不能在一张表中,为多个字段配置相同的统计标识,请重新配置");
+        for (Integer index : collect.keySet()) {
+            if (collect.get(index).size() >= 2 &&  index>=12 && index<1){
+                return R.fail("不能在一张表中,为多个字段配置相同的统计标识,请重新配置");
             }
         }
 
@@ -321,13 +322,13 @@ public class WbsFormElementServiceImpl extends BaseServiceImpl<WbsFormElementMap
                 String eType = WbsElementUtil.getInitTableFiledType(wbsFormElement.getEType());
 
                 if (eType.equals("bigint") && (eLength > 255 || eLength < 10)) {
-                    throw new ServiceException("请输入正确长度,该类型范围为10-255之间");
+                    return R.fail(eKey+"请输入正确长度,该类型范围为10-255之间");
                 } else if (eType.equals("varchar") && (eLength > 2000 || eLength < 10)) {
-                    throw new ServiceException("请输入正确长度,该类型范围为10-1000之间");
+                    return  R.fail(eKey+"请输入正确长度,该类型范围为10-1000之间");
                 } else if (eType.equals("decimal") && (eLength > 65 || eLength < 10)) {
-                    throw new ServiceException("请输入正确长度,该类型范围为10-65之间");
-                } else if (eType.equals("datetime") && (eLength > 50 || eLength < 0)) {
-                    throw new ServiceException("请输入正确长度,该类型范围为0-50之间");
+                    return  R.fail(eKey+"请输入正确长度,该类型范围为10-65之间");
+                } else if (eType.equals("datetime") && (eLength > 100 || eLength < 0)) {
+                    return  R.fail(eKey+"请输入正确长度,该类型范围为0-100之间");
                 }
 
                 //设置默认长度
@@ -342,12 +343,16 @@ public class WbsFormElementServiceImpl extends BaseServiceImpl<WbsFormElementMap
                 //判断是否存在该Key字段
                 int row1 = wbsTreeMapper.isThereAField(initTableName, eKey);
                 if (row1 > 0) {
-                    //修改
-                    baseMapper.updateFiledType(initTableName, eKey, "varchar", eLength);
+                    try {
+                        baseMapper.updateFiledType(initTableName, eKey, "varchar", eLength);
+                    }catch (Exception e){
+                        e.printStackTrace();
+                        return R.fail(eKey+"--"+e.getMessage());
+                    }
                 }
             }
         }
-        return true;
+        return R.success("操作成功");
     }
 
     @Override
@@ -905,7 +910,6 @@ public class WbsFormElementServiceImpl extends BaseServiceImpl<WbsFormElementMap
             tableInfoService.update(updateWrapper);
 
         }
-
-
     }
+
 }

+ 23 - 10
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreeContractServiceImpl.java

@@ -505,23 +505,36 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
             String userAgent = request.getHeader("User-Agent");
             if (userAgent != null && (userAgent.contains("Windows") || userAgent.contains("windows") || userAgent.contains("Mac") || userAgent.contains("mac"))) {
                 //客户端查询
-                resultTabs = baseMapper.selectWbsTreeContractListClient(roleTableOwnerSets,
-                        wbsTreeContract.getProjectId(), wbsTreeContract.getWbsId(),
-                        wbsTreeContract.getContractId(), wbsTreeContract.getId(),
-                        wbsTreeContract.getContractIdRelation());
+                if(roleTableOwnerSets!=null && roleTableOwnerSets.size()>=1){
+                    resultTabs = baseMapper.selectWbsTreeContractListClient(roleTableOwnerSets,
+                            wbsTreeContract.getProjectId(), wbsTreeContract.getWbsId(),
+                            wbsTreeContract.getContractId(), wbsTreeContract.getId(),
+                            wbsTreeContract.getContractIdRelation());
+                }else{
+                    resultTabs = new ArrayList<>();
+                }
+
             } else {
                 //APP查询
+                if(roleTableOwnerSets!=null && roleTableOwnerSets.size()>=1) {
+                    resultTabs = baseMapper.selectWbsTreeContractList(roleTableOwnerSets,
+                            wbsTreeContract.getProjectId(), wbsTreeContract.getWbsId(),
+                            wbsTreeContract.getContractId(), wbsTreeContract.getId(),
+                            wbsTreeContract.getContractIdRelation());
+                }else{
+                    resultTabs = new ArrayList<>();
+                }
+            }
+        } else {
+            //其他接口调用默认保持原始调用方式查询
+            if(roleTableOwnerSets!=null && roleTableOwnerSets.size()>=1) {
                 resultTabs = baseMapper.selectWbsTreeContractList(roleTableOwnerSets,
                         wbsTreeContract.getProjectId(), wbsTreeContract.getWbsId(),
                         wbsTreeContract.getContractId(), wbsTreeContract.getId(),
                         wbsTreeContract.getContractIdRelation());
+            }else{
+                resultTabs = new ArrayList<>();
             }
-        } else {
-            //其他接口调用默认保持原始调用方式查询
-            resultTabs = baseMapper.selectWbsTreeContractList(roleTableOwnerSets,
-                    wbsTreeContract.getProjectId(), wbsTreeContract.getWbsId(),
-                    wbsTreeContract.getContractId(), wbsTreeContract.getId(),
-                    wbsTreeContract.getContractIdRelation());
         }
 
         //表单排序

+ 3 - 10
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreePrivateServiceImpl.java

@@ -2631,8 +2631,7 @@ public class WbsTreePrivateServiceImpl extends BaseServiceImpl<WbsTreePrivateMap
 
     @Override
     public Object getExcelHtml(String primaryKeyId) throws Exception {
-        String file_path = FileUtils.getSysLocalFileUrl();//ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
-        String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
+
         WbsTreePrivate wbsTreePrivate = baseMapper.selectOne(Wrappers.<WbsTreePrivate>query().lambda()
                 .eq(WbsTreePrivate::getPKeyId, primaryKeyId));
         if (wbsTreePrivate == null) {
@@ -2643,14 +2642,8 @@ public class WbsTreePrivateServiceImpl extends BaseServiceImpl<WbsTreePrivateMap
         }
 
         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);
-        }
+        InputStream fileInputStream = FileUtils.getInputStreamByUrl(fileUrl);
+
 
         String htmlString = IoUtil.readToString(fileInputStream);
          if(Func.isBlank(htmlString)){

+ 0 - 62
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/ExcelInfoUtils2.java

@@ -234,68 +234,6 @@ public class ExcelInfoUtils2 {
         }
     }
 
-    public static void main123(String[] args) throws Exception {
-
-       /* String html="/Users/hongchuangyanfa/Desktop/privateUrl/1701131518073634816.html";
-        File html1 = new File(html);  // 原始html
-        InputStream inputStream1 = new FileInputStream(html1);
-
-        String htmlString1 = IoUtil.readToString(inputStream1);
-        Document doc1 = Jsoup.parse(htmlString1);
-        Element table1 = doc1.select("table").first();
-        Elements dqids = table1.getElementsByAttribute("dqid");
-        int x1=0;
-        int y1=0;
-        for (Element element : dqids){
-            if(element.hasAttr("x1") && element.hasAttr("y1")){
-                Elements x11 = element.getElementsByAttribute("x1");
-                Element element1 = x11.get(x11.size()-1);
-                x1 = Func.toInt(element1.attr("x1"));
-                y1 = Func.toInt(element1.attr("y1"));
-            }
-        }*/
-        String excelPath="/Users/hongchuangyanfa/Desktop/pdf/1234567.xlsx";
-        String data="https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload/20230911/b63658909c268efeb753dcf673ce34ab.xlsx";
-        InputStream exceInp = CommonUtil.getOSSInputStream(data);
-        org.apache.poi.ss.usermodel.Workbook workbook = WorkbookFactory.create(exceInp);
-
-        //获取工作表
-        Sheet sheet = workbook.getSheetAt(0);
-        Row row = sheet.getRow(7-1);
-        Cell cell = row.getCell(5-1);
-        cell.setCellValue("123444");
-
-        FileOutputStream outputStream = new FileOutputStream(excelPath);
-        workbook.write(outputStream);
-    }
-
-    public static void main11121(String[] args) throws Exception {
-        FileInputStream inputStream = new FileInputStream("/Users/hongchuangyanfa/Desktop/excel/123456.xlsx");
-        org.apache.poi.ss.usermodel.Workbook workbook = new XSSFWorkbook(inputStream);
-        Sheet sheet = workbook.getSheetAt(0);
-        Row row = sheet.getRow(0);
-        Cell cell = row.getCell(0);
-
-        if (cell != null) {
-            Font font = workbook.getFontAt(cell.getCellStyle().getFontIndex());
-            // 获取字体间距,单位为1/20个字符宽度
-            short typeOffset = font.getTypeOffset();
-            System.out.println("字体间距(字间距): " + typeOffset);
-            String data = cell.getStringCellValue();
-            data = data.replaceAll("[^\\x00-\\xff]", "**");
-            int length = data.length();
-
-
-            double shij = cell.getSheet().getColumnWidth(cell.getColumnIndex());
-
-            short fontSize = font.getFontHeightInPoints();
-
-            System.out.println(checkCellReasonable(cell,fontSize));
-
-        }
-        workbook.close();
-        inputStream.close();
-    }
 
 
 

+ 6 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FileUtils.java

@@ -382,15 +382,13 @@ public class FileUtils {
 
     // 获取本地 或 远程工作流ParamCache
     public static InputStream getInputStreamByUrl(String fileUrl) throws Exception {
-        String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
-        String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
 
         File file1 = new File(fileUrl);
         InputStream fileInputStream = null;
         if (file1.exists()) {
             fileInputStream = new FileInputStream(file1);
         } else {
-            String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path, "");
+            String path = getNetUrl(fileUrl);
             fileInputStream = CommonUtil.getOSSInputStream(path);
         }
         return fileInputStream;
@@ -398,8 +396,12 @@ public class FileUtils {
 
     public static String getNetUrl(String fileUrl){
         String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        String file_path2 = getSysLocalFileUrl();
         String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
-       String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path, "");
+        if(fileUrl.indexOf("/www/wwwroot")>=0){
+            file_path2 = file_path;
+        }
+       String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path2, "");
         return path;
     }
 

+ 2 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/PdfAddimgUtil.java

@@ -76,8 +76,8 @@ public class PdfAddimgUtil {
         Rectangle pageSize = reader.getPageSize(1);
         float height = pageSize.getHeight();
         float width = pageSize.getWidth();
-        x = width * x - 20;
-        y = height - height * y - 8;
+        x = width * x ;//- 20;
+        y = height - height * y ;//- 8;
         // 读图片
         Image image = Image.getInstance(imagePath);
 

+ 33 - 5
blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java

@@ -204,8 +204,37 @@ public class UserController {
             data.setRoleId("1537248158277914626");
             projectAndUserList.add(data);
             user.setProjectAndUserList(projectAndUserList);
-        }
-        if (ObjectUtil.isNotEmpty(user.getSysId()) && user.getSysId().equals("40")) {
+        }else if (ObjectUtil.isNotEmpty(user.getSysId()) && user.getSysId().equals("40")) {
+            user.setUserType("1,2,3,7");
+            user.setPassword("123456");
+            user.setPlaintextPassword("123456");
+            user.setTenantId("000000");
+            user.setDeptId("1750404533561184258");
+            user.setStatus(1);
+            user.setSysType(2);
+            List<SaveUserInfoByProjectDTO> projectAndUserList = new ArrayList<>();
+            SaveUserInfoByProjectDTO data = new SaveUserInfoByProjectDTO();
+            data.setContractId("1714919227250950146");
+            data.setProjectId("1750070685257990145");
+            data.setRoleId("1538760412710289409");
+            projectAndUserList.add(data);
+            user.setProjectAndUserList(projectAndUserList);
+        }else if (ObjectUtil.isNotEmpty(user.getSysId()) && user.getSysId().equals("50")) {
+            user.setUserType("1,2,3,7");
+            user.setPassword("123456");
+            user.setPlaintextPassword("123456");
+            user.setTenantId("000000");
+            user.setDeptId("1793176283872776194");
+            user.setStatus(1);
+            user.setSysType(2);
+            List<SaveUserInfoByProjectDTO> projectAndUserList = new ArrayList<>();
+            SaveUserInfoByProjectDTO data = new SaveUserInfoByProjectDTO();
+            data.setContractId("1792766434089168898");
+            data.setProjectId("1792760669353865218");
+            data.setRoleId("1537249581371707394");
+            projectAndUserList.add(data);
+            user.setProjectAndUserList(projectAndUserList);
+        }else{
             user.setUserType("1,2,3,7");
             user.setPassword("123456");
             user.setPlaintextPassword("123456");
@@ -564,10 +593,9 @@ public class UserController {
     }
 
     /**
-     * 定时同步白马项目用户信息
+     * 定时同步白马项目用户信息 不在使用
      */
-    @Scheduled(cron = "0 0 4 * * ?")
-    //@Scheduled(cron = "0 */2 * * * ?")
+   // @Scheduled(cron = "0 0 4 * * ?")
     public void syncProjectUserInfo() throws ParseException, IOException {
         JSONObject json = new JSONObject();
         json.put("fn", "all");