huangjn 2 vuotta sitten
vanhempi
commit
446003ff18

+ 3 - 3
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/InformationQuery.java

@@ -61,10 +61,10 @@ public class InformationQuery extends BaseEntity {
     @ApiModelProperty("节点ID")
     private Long wbsId;
     /**
-     * 是否是试验资料,1是试验
+     * 资料类型,1资料填报,2试验,3首件
      */
-	@ApiModelProperty("是否是试验资料,1是试验")
-    private Integer isExperiment;
+	@ApiModelProperty("资料类型")
+    private Integer type;
     /**
      * 数据ID
      */

+ 1 - 1
blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/InformationQueryClient.java

@@ -25,6 +25,6 @@ public interface InformationQueryClient {
      * @param sourceType 1原生2数据化
      */
     @PostMapping(API_PREFIX + "/saveOrUpdateInformationQueryData")
-    void saveOrUpdateInformationQueryData(@RequestParam String wbsId, @RequestParam String fileName, @RequestParam Integer classify, @RequestParam Integer sourceType);
+    void saveOrUpdateInformationQueryData(@RequestParam String wbsId, @RequestParam String businessId, @RequestParam String fileName, @RequestParam Integer classify, @RequestParam Integer sourceType, @RequestParam String isFirst);
 
 }

+ 2 - 2
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/InformationQueryClientImpl.java

@@ -12,7 +12,7 @@ public class InformationQueryClientImpl implements InformationQueryClient {
     private final IInformationQueryService iInformationQueryService;
 
     @Override
-    public void saveOrUpdateInformationQueryData(String wbsId, String fileName, Integer classify, Integer sourceType) {
-        this.iInformationQueryService.saveOrUpdateInformationQueryData(wbsId, fileName, classify, sourceType);
+    public void saveOrUpdateInformationQueryData(String wbsId, String businessId, String fileName, Integer classify, Integer sourceType, String isFirst) {
+        this.iInformationQueryService.saveOrUpdateInformationQueryData(wbsId, businessId, fileName, classify, sourceType, isFirst);
     }
 }

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

@@ -20,7 +20,7 @@
         <result column="contract_id" property="contractId"/>
         <result column="classify" property="classify"/>
         <result column="wbs_id" property="wbsId"/>
-        <result column="is_experiment" property="isExperiment"/>
+        <result column="type" property="type"/>
         <result column="data_id" property="dataId"/>
         <result column="task_id" property="taskId"/>
         <result column="file_user_id_and_name" property="fileUserIdAndName"/>

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

@@ -22,7 +22,7 @@
     </resultMap>
 
     <select id="queryApprovalUser" resultMap="taskParallelResultMap">
-        select task_user, task_user_name from u_task_parallel where process_instance_id = #{processInstanceId} and is_deleted = 0
+        select task_user, task_user_name, e_visa_status, status from u_task_parallel where process_instance_id = #{processInstanceId} and is_deleted = 0
     </select>
 
     <select id="queryOtherLinkList" resultMap="taskParallelResultMap">

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/IInformationQueryService.java

@@ -50,7 +50,7 @@ public interface IInformationQueryService extends BaseService<InformationQuery>
 	 * @param classify 1施工2质检
 	 * @param sourceType 1原生2数据化
 	 */
-	void saveOrUpdateInformationQueryData(String wbsId, String fileName, Integer classify, Integer sourceType);
+	void saveOrUpdateInformationQueryData(String wbsId, String businessId, String fileName, Integer classify, Integer sourceType, String isFirst);
 
 	/**
 	 * 获取当前合同段下所有的上报批次

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

@@ -63,15 +63,11 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 	}
 
 	@Override
-	public void saveOrUpdateInformationQueryData(String primaryKeyId, String fileName, Integer classify, Integer sourceType) {
+	public void saveOrUpdateInformationQueryData(String primaryKeyId, String businessId, String fileName, Integer classify, Integer sourceType, String isFirst) {
 		BladeUser user = AuthUtil.getUser();
 
 		//首先根据wbsId获取合同段ID和项目ID
 		WbsTreeContract contractTree = this.wbsTreeContractClient.getContractWbsTreeByPrimaryKeyId(Long.parseLong(primaryKeyId));
-//		if(new Integer("2").equals(contractTree.getWbsType()) || new Integer("2").equals(contractTree.getType())){
-//			//说明是表单,需要获取其父级
-//			contractTree = this.wbsTreeContractClient.getContractWbsTreeByContractIdAndId(contractTree.getParentId(), Long.parseLong(contractTree.getContractId()));
-//		}
 
 		//判断当前填报节点下是否已经存在相应数据
 		InformationQuery oldData = this.baseMapper.getInformationQueryByWbsId(contractTree.getPKeyId(), classify);
@@ -112,10 +108,13 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 			newData.setClassify(classify);
 			//节点ID
 			newData.setWbsId(contractTree.getPKeyId());
-			//是否是试验节点
-			newData.setIsExperiment(contractTree.getIsExpernode());
+
+			//1资料填报,2试验,3首件
+			newData.setType(StringUtils.isNotEmpty(isFirst) ? 3 : (contractTree.getIsExpernode() == null || contractTree.getIsExpernode() <= 0) ? 1 : 2);
+
 			//数据ID
 //			newData.setDataId(dataId);
+
 			//流程状态,默认未上报
 			newData.setStatus(0);
 			//填报人ID及姓名

+ 6 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/bean/TableInfo.java

@@ -17,4 +17,10 @@ public class TableInfo {
     private String classify;
     private String projectId;
     private String groupId;
+
+    /**
+     * huangjn 2022-09-08 11:18 是否是首件填报
+     */
+    private String isFirst;
+
 }

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

@@ -761,7 +761,7 @@ public class ExcelTabController extends BladeController {
             fileName = StringUtils.isNotEmpty(fileName) ? fileName : "缺少文件提名配置";
 
             //huangjn 保存成功后调用生成资料查询列表数据
-            this.informationQueryClient.saveOrUpdateInformationQueryData(wbsTreeContractByP.getPKeyId() + "", fileName, Integer.parseInt(classify), 2);
+            this.informationQueryClient.saveOrUpdateInformationQueryData(wbsTreeContractByP.getPKeyId() + "", "业务ID(主要将来给首件使用)", fileName, Integer.parseInt(classify), 2, "是否是首件(临时,暂时没用到)");
 /*        }else{ //更新
             sqlInfo = "update  "+tabName+" set ";
             for (String keys : dataMap2.keySet()){

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

@@ -154,6 +154,13 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 				//huangjn 填报的类型,施工或监理
 				tableInfo.setClassify(dataInfo2.getString("classify"));
 				//huangjn 填报的类型,施工或监理
+
+				//huangjn 判断是否是首件
+				if(dataInfo2.containsKey("isFirst")){
+					tableInfo.setIsFirst(dataInfo2.getString("isFirst"));
+				}
+				//huangjn 判断是否是首件
+
 				dataInfo2.fluentRemove("contractId")
 						 .fluentRemove("pkeyId")
 						 .fluentRemove("p_key_id")
@@ -161,6 +168,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 				         .fluentRemove("classify")
 				         .fluentRemove("pickerKey")
 				         .fluentRemove("id")
+						 .fluentRemove("isFirst")
 				         .fluentRemove("");
 				// 计算数据
 				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()));
@@ -267,7 +275,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 					fileName = StringUtils.isNotEmpty(fileName) ? fileName : "缺少文件提名配置";
 
 					//huangjn 保存成功后调用生成资料查询列表数据
-				this.informationQueryClient.saveOrUpdateInformationQueryData(wbsTreeContractByP.getPKeyId()+"", fileName, Integer.parseInt(tableInfo.getClassify()), 2);
+				this.informationQueryClient.saveOrUpdateInformationQueryData(wbsTreeContractByP.getPKeyId()+"", "业务ID(主要将来给首件使用)", fileName, Integer.parseInt(tableInfo.getClassify()), 2,"是否是首件(临时,暂时没用到)");
 
 				UpdateWrapper<WbsTreeContract> updateWrapper = new UpdateWrapper<>();
 				updateWrapper.in("p_key_id",tableInfo.getPkeyId());