huangjn 3 жил өмнө
parent
commit
b4d590020d
12 өөрчлөгдсөн 215 нэмэгдсэн , 107 устгасан
  1. 1 1
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/OperationLogClient.java
  2. 28 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/InformationQueryVO.java
  3. 1 1
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TaskVO.java
  4. 22 10
      blade-service/blade-business/src/main/java/org/springblade/business/controller/ArchiveFileController.java
  5. 13 2
      blade-service/blade-business/src/main/java/org/springblade/business/controller/ContractLogController.java
  6. 11 6
      blade-service/blade-business/src/main/java/org/springblade/business/controller/ImageClassificationFileController.java
  7. 72 70
      blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java
  8. 1 1
      blade-service/blade-business/src/main/java/org/springblade/business/controller/OperationLogController.java
  9. 2 2
      blade-service/blade-business/src/main/java/org/springblade/business/feignClient/OperationLogClientImpl.java
  10. 8 1
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TaskMapper.xml
  11. 53 9
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/InformationQueryServiceImpl.java
  12. 3 4
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreePrivateController.java

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

@@ -19,6 +19,6 @@ public interface OperationLogClient {
      * @param operationObjId 操作的业务对象ID
      */
     @PostMapping(API_PREFIX + "/saveUserOperationLog")
-    void saveUserOperationLog(@RequestBody Integer type, @RequestParam String operationModule, @RequestParam String operationView, @RequestParam Object operationObjId);
+    void saveUserOperationLog(@RequestBody Integer type, @RequestParam String operationModule, @RequestParam String operationView, @RequestParam Object operationObjId, @RequestParam String operationObjName);
 
 }

+ 28 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/InformationQueryVO.java

@@ -21,6 +21,7 @@ import org.springblade.business.entity.InformationQuery;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -62,4 +63,31 @@ public class InformationQueryVO extends InformationQuery {
 
 	private String isFirst;
 
+	@ApiModelProperty("上报批次")
+	private String reportNumber;
+
+	@ApiModelProperty("任务人")
+	private List<WaitingUser> waitingUserList;
+
+	public void setWaitingUserList(String waitingUserName, Integer status){
+		if(this.waitingUserList == null){
+			this.waitingUserList = new ArrayList<>();
+		}
+		this.waitingUserList.add(new WaitingUser(waitingUserName, status));
+	}
+
+	@Data
+	private class WaitingUser {
+		@ApiModelProperty("审批人姓名")
+		private String waitingUserName;
+
+		@ApiModelProperty("审批状态,1未签字(黑色),2已签字(绿色),3已废除(黄色),999签字异常(红色)")
+		private Integer status;
+
+		public WaitingUser(String waitingUserName, Integer status){
+			this.waitingUserName = waitingUserName;
+			this.status = status;
+		}
+	}
+
 }

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

@@ -48,7 +48,7 @@ public class TaskVO extends Task {
 	private String taskId;
 
 	@ApiModelProperty("审批人集合")
-	List<WaitingUser> waitingUserList = new ArrayList<>();
+	private List<WaitingUser> waitingUserList = new ArrayList<>();
 
 	public void setWaitingUserList(String waitingUserName, Integer status){
 		this.waitingUserList.add(new WaitingUser(waitingUserName, status));

+ 22 - 10
blade-service/blade-business/src/main/java/org/springblade/business/controller/ArchiveFileController.java

@@ -153,12 +153,12 @@ public class ArchiveFileController extends BladeController {
 					this.taskClient.abolishTask(task);
 				} else if(new Integer("2").equals(task.getStatus())) {
 					//已审批的任务,修改业务数据的审批状态为未上报并撤签即可
-					this.archiveFileService.update(Wrappers.<ArchiveFile>lambdaUpdate().set(ArchiveFile::getStatus, 0).in(ArchiveFile::getId, Arrays.asList(task.getFormDataId().split(","))));
-					// todo ================== 调用撤签
-					// todo ================== 调用撤签
+					this.archiveFileService.update(Wrappers.<ArchiveFile>lambdaUpdate().set(ArchiveFile::getEVisaFile, null).set(ArchiveFile::getStatus, 0).in(ArchiveFile::getId, Arrays.asList(task.getFormDataId().split(","))));
 				}
+				ArchiveFile archiveFile = this.archiveFileService.getBaseMapper().selectById(task.getFormDataId());
+
 				//保存操作记录
-				this.operationLogClient.saveUserOperationLog(26, "其它文件", "工程文件", task.getFormDataId());
+				this.operationLogClient.saveUserOperationLog(26, "其它文件", "工程文件", task.getFormDataId(), archiveFile.getFileName());
 			}
 		}
 
@@ -180,8 +180,14 @@ public class ArchiveFileController extends BladeController {
 			taskVO.setFormDataId(archiveTaskIds);
 			taskVO.setApprovalType(2);
 
+			List<ArchiveFile> archiveFiles = this.archiveFileService.getBaseMapper().selectBatchIds(Arrays.asList(archiveTaskIds.split(",")));
+			String title = "工程文件批量上报";
+			if(archiveFiles != null && archiveFiles.size() > 0){
+				title = archiveFiles.stream().map(ArchiveFile::getFileName).distinct().collect(Collectors.joining());
+			}
+
 			//新增操作日志
-			this.operationLogClient.saveUserOperationLog(25, "其它文件", "工程文件", archiveTaskIds);
+			this.operationLogClient.saveUserOperationLog(25, "其它文件", "工程文件", archiveTaskIds, title);
 
 			//启动流程
 			this.taskClient.startTask(taskVO);
@@ -284,12 +290,18 @@ public class ArchiveFileController extends BladeController {
 	@ApiOperationSupport(order = 1)
 	@ApiOperation(value = "逻辑删除", notes = "传入ids")
 	public R<Boolean> remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		//保存操作日志
-		this.operationLogClient.saveUserOperationLog(27, "其他文件", "工程文件", ids);
-		//保存回收站记录
+		List<ArchiveFile> fileList =  this.archiveFileService.list(Wrappers.<ArchiveFile>lambdaQuery().in(ArchiveFile::getId, Arrays.asList(ids.split(","))));
+
 		try{
-			List<ArchiveFile> fileList =  this.archiveFileService.list(Wrappers.<ArchiveFile>lambdaQuery().in(ArchiveFile::getId, Arrays.asList(ids.split(","))));
-			this.recycleBinClient.saveDelBusinessData(ids, fileList.stream().map(ArchiveFile::getFileName).collect(Collectors.joining(",")), 1, null, fileList.get(0).getProjectId(), fileList.get(0).getContractId());
+			if(fileList != null && fileList.size() > 0){
+				String title = fileList.stream().map(ArchiveFile::getFileName).distinct().collect(Collectors.joining(","));
+
+				//保存操作日志
+				this.operationLogClient.saveUserOperationLog(27, "其他文件", "工程文件", ids, title);
+
+				//保存回收站记录
+				this.recycleBinClient.saveDelBusinessData(ids, title, 1, null, fileList.get(0).getProjectId(), fileList.get(0).getContractId());
+			}
 		}catch (Exception e){
 			e.printStackTrace();
 		}

+ 13 - 2
blade-service/blade-business/src/main/java/org/springblade/business/controller/ContractLogController.java

@@ -27,6 +27,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 
 import java.util.Arrays;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 日志通用表 控制器
@@ -79,8 +80,11 @@ public class ContractLogController extends BladeController {
 					// todo ================== 调用撤签
 					// todo ================== 调用撤签
 				}
+
+				ContractLog contractLog = this.contractLogService.getBaseMapper().selectById(task.getFormDataId());
+
 				//保存操作记录
-				this.operationLogClient.saveUserOperationLog(9, "台账日志", "日志填报", task.getFormDataId());
+				this.operationLogClient.saveUserOperationLog(9, "台账日志", "日志填报", task.getFormDataId(), contractLog.getFileName());
 			}
 		}
 		return R.data(true);
@@ -111,8 +115,15 @@ public class ContractLogController extends BladeController {
 						this.contractLogService.update(Wrappers.<ContractLog>lambdaUpdate().set(ContractLog::getStatus, 1).eq(ContractLog::getId, id));
 					}
 				}
+
+				List<ContractLog> contractLogs = this.contractLogService.getBaseMapper().selectBatchIds(Arrays.asList(startTaskVO.getIds().split(",")));
+				String title = "批量上报";
+				if(contractLogs != null && contractLogs.size() > 0){
+					title = contractLogs.stream().map(ContractLog::getFileName).distinct().collect(Collectors.joining());
+				}
+
 				//保存操作记录
-				this.operationLogClient.saveUserOperationLog(8, "台账日志", "日志填报", startTaskVO.getIds());
+				this.operationLogClient.saveUserOperationLog(8, "台账日志", "日志填报", startTaskVO.getIds(), title);
 				return R.data(true);
 			}
 		}

+ 11 - 6
blade-service/blade-business/src/main/java/org/springblade/business/controller/ImageClassificationFileController.java

@@ -178,7 +178,7 @@ public class ImageClassificationFileController extends BladeController {
 									//参见号
 									sheet.getRow(28).getCell(4).setCellValue(file.getSeeAlsoCode());
 									//拍摄时间
-									sheet.getRow(30).getCell(4).setCellValue(DateUtil.format(file.getShootingTime(), "yyyy-MM-dd HH:mm:ss"));
+									sheet.getRow(30).getCell(4).setCellValue(DateUtil.format(file.getShootingTime(), "yyyy-MM-dd"));
 									//参见号
 									sheet.getRow(32).getCell(4).setCellValue(file.getShootingUser());
 
@@ -559,12 +559,17 @@ public class ImageClassificationFileController extends BladeController {
 	@ApiOperationSupport(order = 5)
 	@ApiOperation(value = "影音资料信息逻辑删除", notes = "传入ids")
 	public R<Boolean> remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		//保存操作日志
-		this.operationLogClient.saveUserOperationLog(31, "其它文件", "影像资料", ids);
-		//保存回收站记录
+
+		List<ImageClassificationFile> fileList = this.imageClassificationFileService.list(Wrappers.<ImageClassificationFile>lambdaQuery().in(ImageClassificationFile::getId, Arrays.asList(ids.split(","))));
+
 		try{
-			List<ImageClassificationFile> fileList = this.imageClassificationFileService.list(Wrappers.<ImageClassificationFile>lambdaQuery().in(ImageClassificationFile::getId, Arrays.asList(ids.split(","))));
-			this.recycleBinClient.saveDelBusinessData(ids, fileList.stream().map(ImageClassificationFile::getFileName).distinct().collect(Collectors.joining(",")), 1, null, fileList.get(0).getProjectId().toString(), fileList.get(0).getContractId().toString());
+			String title = fileList.stream().map(ImageClassificationFile::getFileName).distinct().collect(Collectors.joining(","));
+
+			//保存操作日志
+			this.operationLogClient.saveUserOperationLog(31, "其它文件", "影像资料", ids, title);
+
+			//保存回收站记录
+			this.recycleBinClient.saveDelBusinessData(ids, title, 1, null, fileList.get(0).getProjectId().toString(), fileList.get(0).getContractId().toString());
 		}catch (Exception e){
 			e.printStackTrace();
 		}

+ 72 - 70
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -24,9 +24,11 @@ import org.springblade.business.service.IContractTreeDrawingsService;
 import org.springblade.business.service.ITreeContractFirstService;
 import org.springblade.business.utils.FileUtils;
 import org.springblade.business.vo.*;
+import org.springblade.common.utils.CommonUtil;
 import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.oss.model.BladeFile;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.jackson.JsonUtil;
@@ -42,6 +44,7 @@ import org.springblade.manager.feign.ContractClient;
 import org.springblade.manager.feign.WbsTreeContractClient;
 import org.springblade.manager.feign.WbsTreePrivateClient;
 import org.springblade.manager.vo.WbsTreeContractTreeVOS;
+import org.springblade.resource.feign.NewIOSSClient;
 import org.springblade.system.entity.DictBiz;
 import org.springblade.system.feign.IDictBizClient;
 import org.springframework.beans.BeanUtils;
@@ -94,11 +97,16 @@ public class InformationWriteQueryController extends BladeController {
 
 	private final RecycleBinClient recycleBinClient;
 
+	private final NewIOSSClient newIOSSClient;
+
+	/**
+	 * 初始化合同段导图树
+	 */
 	@PostMapping("/initMappingStructureTree")
 	@ApiOperationSupport(order = 27)
 	@ApiOperation(value = "初始化合同段导图树(只有接口,功能未写)")
 	public R<List<WbsTreeContractTreeVOS>> initMappingStructureTree(@RequestBody List<String> ids){
-
+		System.out.println(ids);
 		return null;
 	}
 
@@ -418,6 +426,7 @@ public class InformationWriteQueryController extends BladeController {
 	@ApiOperationSupport(order = 21)
 	@ApiOperation(value = "本地验签")
 	public R<Boolean> localVerify(@RequestParam String ids){
+		System.out.println(ids);
 		return R.data(false);
 	}
 
@@ -446,7 +455,23 @@ public class InformationWriteQueryController extends BladeController {
     @ApiOperationSupport(order = 20)
     @ApiOperation(value = "批量打印")
     public R<String> batchPrint(@RequestParam String ids) {
-        return R.data(null);
+		//获取勾选的数据
+    	List<InformationQuery> queries = this.informationQueryService.getBaseMapper().selectBatchIds(Arrays.asList(ids.split(",")));
+    	//获取pdf
+		List<String> pdfList = queries.stream().map(query -> StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() : query.getPdfUrl()).distinct().collect(Collectors.toList());
+    	pdfList.removeIf(StringUtils::isEmpty);
+    	//执行合并
+		String mergeName = SnowFlakeUtil.getId() + ".pdf", mergeUrl = "/Users/doc/print/" + mergeName;
+		FileUtils.mergePdfPublicMethods(pdfList, mergeUrl);
+
+		//上传
+		BladeFile bladeFile = this.newIOSSClient.uploadFile(mergeName, mergeUrl);
+		if(StringUtils.isNotEmpty(bladeFile.getLink())){
+			//执行本地文件删除
+			CommonUtil.removeFile(Arrays.asList(mergeUrl.split(",")));
+		}
+
+        return R.data(bladeFile.getLink());
     }
 
     /**
@@ -482,7 +507,7 @@ public class InformationWriteQueryController extends BladeController {
 	@ApiOperation(value = "批量废除")
 	public R<Boolean> batchAbolish(@RequestParam String ids){
 		//获取所有相关任务记录
-		List<Task> taskList =  this.taskClient.queryTaskListByFormDataId(ids);
+		List<Task> taskList = this.taskClient.queryTaskListByFormDataId(ids);
 		if(taskList != null && taskList.size() > 0){
 			try{
 				//执行废除
@@ -500,8 +525,15 @@ public class InformationWriteQueryController extends BladeController {
 
 						this.informationQueryService.update(wrapper.in(InformationQuery::getId, Arrays.asList(task.getFormDataId().split(","))));
 					}
+
+					List<InformationQuery> queries = this.informationQueryService.getBaseMapper().selectBatchIds(Arrays.asList(task.getFormDataId().split(",")));
+					String title = "批量废除";
+					if(queries != null && queries.size() > 0){
+						title = queries.stream().map(InformationQuery::getName).distinct().collect(Collectors.joining());
+					}
+
 					//保存操作记录
-					this.operationLogClient.saveUserOperationLog(6, "资料管理", "工序资料", task.getFormDataId());
+					this.operationLogClient.saveUserOperationLog(6, "资料管理", "工序资料", task.getFormDataId(), title);
 				}
 				return R.data(true, "废除成功");
 			}catch (Exception e){
@@ -549,8 +581,15 @@ public class InformationWriteQueryController extends BladeController {
 					e.printStackTrace();
 					return R.data(300, false, "上报失败");
 				}
+
+				List<InformationQuery> queries = this.informationQueryService.getBaseMapper().selectBatchIds(Arrays.asList(startTaskVO.getIds().split(",")));
+				String title = "批量上报";
+				if(queries != null && queries.size() > 0){
+					title = queries.stream().map(InformationQuery::getName).distinct().collect(Collectors.joining());
+				}
+
 				//保存操作记录
-				this.operationLogClient.saveUserOperationLog(5, "资料管理", "工序资料", startTaskVO.getIds());
+				this.operationLogClient.saveUserOperationLog(5, "资料管理", "工序资料", startTaskVO.getIds(), title);
 				return R.data(true);
 			}
 		}
@@ -736,7 +775,7 @@ public class InformationWriteQueryController extends BladeController {
 				});
 			}
 		}
-		return this.saveOrCopyNodeTree(saveList, saveLedger);
+		return this.saveOrCopyNodeTree(saveList, saveLedger, 32);
 	}
 
 	/**
@@ -952,8 +991,11 @@ public class InformationWriteQueryController extends BladeController {
 		if(StringUtils.isEmpty(node.getDeptName()) || "null".equals(String.valueOf(node.getPKeyId())) || StringUtils.isEmpty(String.valueOf(node.getPKeyId()))){
 			return R.data(-1, false , "缺少参数");
 		}
+
+		WbsTreeContract queries = this.wbsTreeContractClient.getContractWbsTreeByPrimaryKeyId(pKeyId);
+
 		//保存操作记录
-		this.operationLogClient.saveUserOperationLog(3, "资料管理", "工序资料", pKeyId);
+		this.operationLogClient.saveUserOperationLog(3, "资料管理", "工序资料", pKeyId, StringUtils.isNotEmpty(queries.getFullName()) ? queries.getFullName() : queries.getDeptName());
 		return R.data(this.wbsTreeContractClient.updateContractNodeParameter(node));
 	}
 
@@ -989,6 +1031,7 @@ public class InformationWriteQueryController extends BladeController {
 		List<Long> removeList = removeNodeList.stream().map(WbsTreeContract::getPKeyId).distinct().collect(Collectors.toList());
 		//拼接
 		ids = ids + "," + String.join(",", JSONArray.parseArray(JSONObject.toJSONString(removeList), String.class));
+		String nodeName = StringUtils.isNotEmpty(removeNode.getFullName()) ? removeNode.getFullName() : removeNode.getDeptName() + "," + removeNodeList.stream().map(wbs -> StringUtils.isNotEmpty(wbs.getFullName()) ? wbs.getFullName() : wbs.getDeptName()).collect(Collectors.joining());
 
 		//获取当前节点下所有填报节点
 		List<QueryProcessDataVO> queryProcess = this.informationQueryService.queryProcessDataByParentIdAndContractId(removeNode.getId().toString(), 1, removeNode.getContractId());
@@ -1008,7 +1051,7 @@ public class InformationWriteQueryController extends BladeController {
 		}
 
 		//保存操作记录
-		this.operationLogClient.saveUserOperationLog(4, "资料管理", "工序资料", ids);
+		this.operationLogClient.saveUserOperationLog(4, "资料管理", "工序资料", ids, nodeName);
 		//保存进回收站
 		this.recycleBinClient.saveDelBusinessData(ids, removeNode.getDeptName(), 2, "", removeNode.getProjectId(), removeNode.getContractId());
 
@@ -1170,7 +1213,7 @@ public class InformationWriteQueryController extends BladeController {
 			});
 		}
 
-		return this.saveOrCopyNodeTree(saveList, saveLedger);
+		return this.saveOrCopyNodeTree(saveList, saveLedger, 2);
 	}
 
 	private List<WbsTreePrivate> unifiedCode(List<AddContractTreeNodeVO.Node> allSelectedNodeList, WbsTreeContract treeContract){
@@ -1185,7 +1228,7 @@ public class InformationWriteQueryController extends BladeController {
 	}
 
 	@NotNull
-	private R<Boolean> saveOrCopyNodeTree(List<WbsTreeContract> saveList, List<ConstructionLedger> saveLedger) {
+	private R<Boolean> saveOrCopyNodeTree(List<WbsTreeContract> saveList, List<ConstructionLedger> saveLedger, Integer operationType) {
 		if(saveList.size() > 0){
 			//保存施工日志
 			if(saveLedger.size() > 0){
@@ -1193,7 +1236,10 @@ public class InformationWriteQueryController extends BladeController {
 			}
 			try{
 				//保存操作记录
-				this.operationLogClient.saveUserOperationLog(2, "资料管理", "工序资料", String.join(",", JSONArray.parseArray(JSONObject.toJSONString(saveList.stream().map(WbsTreeContract::getPKeyId).distinct().collect(Collectors.toList())), String.class)));
+				this.operationLogClient.saveUserOperationLog(operationType, "资料管理", "工序资料",
+						String.join(",", JSONArray.parseArray(JSONObject.toJSONString(saveList.stream().map(WbsTreeContract::getPKeyId).distinct().collect(Collectors.toList())), String.class)),
+						saveList.stream().map(wbs -> StringUtils.isNotEmpty(wbs.getFullName()) ? wbs.getFullName() : wbs.getDeptName()).collect(Collectors.joining()));
+
 			}catch (Exception e){
 				e.printStackTrace();
 			}
@@ -1407,63 +1453,9 @@ public class InformationWriteQueryController extends BladeController {
 			@ApiImplicitParam(name = "contractId", value = "合同段ID", required = true)
 	})
 	public R<List<WbsTreeContractTreeVOS>> queryContractWbsTreeByContractIdAndType(@RequestParam String parentId, @RequestParam String contractId, @RequestParam String contractIdRelation){
-		List<WbsTreeContractTreeVOS> rootTreeNode;
-
-		//获取合同段,检查是否是监理合同段
-		ContractInfo contractInfo = this.contractClient.getContractById(Long.parseLong(contractId));
-		if(new Integer("2").equals(contractInfo.getContractType())){
-			//监理合同段,需要获取关联的施工方合同段根节点数据
-			rootTreeNode = this.wbsTreeContractClient.lazyTree(StringUtils.isNotEmpty(parentId) ? Long.parseLong(parentId) : 0, contractId, contractIdRelation, contractInfo.getContractType());
-		} else {
-			if(com.alibaba.nacos.common.utils.StringUtils.isEmpty(parentId)){
-				//为空,说明初始化
-				//获取根节点
-				rootTreeNode = this.clientTreePublicCodeClient.queryContractWbsTreeByContractIdAndType(contractId, 1, "0");
-			} else {
-				//不为空,获取其下子节点
-				rootTreeNode = this.wbsTreeContractClient.queryContractWbsTreeByContractIdAndType(contractId, 1, parentId);
-			}
-		}
+		List<WbsTreeContractTreeVOS> rootTreeNode = this.queryContractTree(parentId, contractId, contractIdRelation);
+		rootTreeNode = rootTreeNode.stream().filter(vo -> vo.getDeptCategory() != 111).collect(Collectors.toList());
 
-		//其他参数
-		if(rootTreeNode != null && rootTreeNode.size() > 0){
-			//获取当前父节点下所有工序节点及填报资料
-			List<QueryProcessDataVO> queryDataResult;
-			if(new Integer("2").equals(contractInfo.getContractType())){
-				queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(parentId, 2, contractIdRelation);
-			} else {
-				queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(parentId, 1, contractId);
-			}
-
-			rootTreeNode.forEach(vo -> {
-				String primaryKeyId = new Integer("2").equals(contractInfo.getContractType()) ? vo.getId().toString() : vo.getPrimaryKeyId();
-
-				if(new Integer("1").equals(contractInfo.getContractType())){
-					if(StringUtils.isEmpty(parentId) || "0".equals(parentId)){
-						vo.setTitle(contractInfo.getContractName());
-					}
-				}
-
-				//获取上传的图纸
-				ContractTreeDrawings drawings = this.contractTreeDrawingsService.queryCurrentNodeDrawings(primaryKeyId);
-				if(drawings != null){
-					//主键
-					vo.setDrawingsId(drawings.getId());
-					//文件路径
-					vo.setFileUrl(drawings.getFileUrl());
-				}
-
-				//处理颜色
-				if(queryDataResult != null && queryDataResult.size() > 0){
-					this.setNodeColor(vo, queryDataResult, true);
-				}
-
-				//判断当前节点是否被标记为首件
-				TreeContractFirst first = this.treeContractFirstService.getOne(Wrappers.<TreeContractFirst>lambdaQuery().eq(TreeContractFirst::getIsDeleted, 0).eq(TreeContractFirst::getWbsNodeId, primaryKeyId));
-				vo.setIsFirst(first != null);
-			});
-		}
-		rootTreeNode = rootTreeNode.stream().filter(vo->vo.getDeptCategory()!=111).collect(Collectors.toList());
 		return R.data(rootTreeNode);
 	}
 
@@ -1589,6 +1581,17 @@ public class InformationWriteQueryController extends BladeController {
 			@ApiImplicitParam(name = "contractId", value = "合同段ID", required = true)
 	})
 	public R<List<WbsTreeContractTreeVOS>> queryContractWbsTreeByFirstInfo(@RequestParam String parentId, @RequestParam String contractId, @RequestParam String contractIdRelation){
+		List<WbsTreeContractTreeVOS> rootTreeNode = this.queryContractTree(parentId, contractId, contractIdRelation);
+		//查询被标记为首件的数据
+		rootTreeNode = rootTreeNode.stream().filter(WbsTreeContractTreeVOS::getIsFirst).collect(Collectors.toList());
+
+		return R.data(rootTreeNode);
+	}
+
+	/**
+	 * 查询合同段划分树公共代码
+	 */
+	private List<WbsTreeContractTreeVOS> queryContractTree(String parentId, String contractId, String contractIdRelation){
 		List<WbsTreeContractTreeVOS> rootTreeNode;
 
 		//获取合同段,检查是否是监理合同段
@@ -1646,8 +1649,7 @@ public class InformationWriteQueryController extends BladeController {
 			});
 		}
 
-		rootTreeNode = rootTreeNode.stream().filter(wbsbenan->wbsbenan.getIsFirst()==true).collect(Collectors.toList());
-		return R.data(rootTreeNode);
+		return rootTreeNode;
 	}
-	
+
 }

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

@@ -127,7 +127,7 @@ public class OperationLogController extends BladeController {
 			String endTime = operationLog.getEndTime();
 			endTime = DateUtil.format(DateUtils.addDays(DateUtil.parse(endTime, "yyyy-MM-dd"), 1), "yyyy-MM-dd");
 			try{
-				wrapper.lambda().between(OperationLog::getOperationTime, operationLog.getStartTime(), endTime);
+				wrapper.lambda().between(OperationLog::getCreateTime, operationLog.getStartTime(), endTime);
 			}catch (Exception e){
 				e.printStackTrace();
 			}

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

@@ -24,7 +24,7 @@ public class OperationLogClientImpl implements OperationLogClient {
     private final IDictBizClient dictBizClient;
 
     @Override
-    public void saveUserOperationLog(Integer type, String operationModule, String operationView, Object operationObjId) {
+    public void saveUserOperationLog(Integer type, String operationModule, String operationView, Object operationObjId, String operationObjName) {
         try{
             //获取业务字典
             List<DictBiz> dictBizList = this.dictBizClient.getList("operation_type", "notRoot").getData();
@@ -41,7 +41,7 @@ public class OperationLogClientImpl implements OperationLogClient {
             //操作模块
             newData.setOperationModule(operationModule);
             //操作内容
-            newData.setOperationContent(operationAccount + ";" + operationObjId);
+            newData.setOperationContent(operationAccount + ":" + operationObjName);
             //PC 还是 APP
             newData.setOperationMedium("PC");
             //业务数据

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

@@ -31,7 +31,14 @@
     </resultMap>
 
     <select id="queryTaskListByFormDataId" resultMap="taskResultMap">
-        select id,form_data_id,process_instance_id,approval_type,status from u_task where form_data_id like #{formDataId} and status in(1,2) and is_deleted = 0 limit 1
+        select
+          id,
+          form_data_id,
+          process_instance_id,
+          approval_type,
+          status,
+          batch
+        from u_task where form_data_id like #{formDataId} and status in(1,2) and is_deleted = 0 order by create_time DESC limit 1
     </select>
 
     <select id="queryBatchList" resultMap="taskResultMap">

+ 53 - 9
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/InformationQueryServiceImpl.java

@@ -6,6 +6,11 @@ import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
 import org.apache.http.client.utils.DateUtils;
 import org.springblade.business.entity.InformationQuery;
+import org.springblade.business.entity.Task;
+import org.springblade.business.entity.TaskParallel;
+import org.springblade.business.feign.TaskClient;
+import org.springblade.business.service.ITaskParallelService;
+import org.springblade.business.service.ITaskService;
 import org.springblade.business.vo.FileUserVO;
 import org.springblade.business.vo.InformationQueryVO;
 import org.springblade.business.mapper.InformationQueryMapper;
@@ -14,9 +19,12 @@ import org.springblade.business.vo.QueryProcessDataVO;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.secure.BladeUser;
 import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.jackson.JsonUtil;
 import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.manager.entity.WbsTreeContract;
 import org.springblade.manager.feign.WbsTreeContractClient;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
@@ -34,6 +42,12 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 
 	private final WbsTreeContractClient wbsTreeContractClient;
 
+	private final IUserClient userClient;
+
+	private final TaskClient taskClient;
+
+	private final ITaskParallelService taskParallelService;
+
 	@Override
 	public List<QueryProcessDataVO> queryProcessDataByPrimaryKeyIdAndClassify(String primaryKeyId, Integer classify) {
 		return this.baseMapper.queryProcessDataByPrimaryKeyIdAndClassify(primaryKeyId, classify);
@@ -69,7 +83,7 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 			}
 
 			//拼接填报人信息
-			String fileUser = user.getUserId() + "-" + user.getUserName();
+			String fileUser = user.getUserId() + "-" + user.getNickName();
 			if(StringUtils.isNotEmpty(oldData.getFileUserIdAndName())){
 				if(!oldData.getFileUserIdAndName().contains(fileUser)){
 					//不包含,拼接
@@ -133,12 +147,25 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 			List<String> userList = new ArrayList<>();
 			fileUserResult.removeIf(Objects::isNull);
 			if(fileUserResult.size() > 0){
-				fileUserResult.forEach(user -> userList.add(user.getFileUserIdAndName()));
-				//去重
+				fileUserResult.forEach(user -> {
+					//一次去重
+					String[] array = user.getFileUserIdAndName().split(",");
+					for(String str : array){
+						if(!userList.contains(str)){
+							userList.add(str);
+						}
+					}
+				});
+				//二次去重
 				HashSet<String> hashSet = new HashSet<>(userList);
 				hashSet.forEach(user -> {
 					String[] array = user.split("-");
-					result.add(new FileUserVO(array[0], array[1]));
+					User bUser = this.userClient.userInfoById(Long.parseLong(array[0])).getData();
+					if(bUser != null){
+						result.add(new FileUserVO(array[0], bUser.getRealName()));
+					} else {
+						result.add(new FileUserVO(array[0], array[1]));
+					}
 				});
 			}
 		}
@@ -151,10 +178,6 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 		long current = (page.getCurrent() - 1L) * page.getSize();
 		//获取总量
 		Integer count = this.baseMapper.countInformationQuery(vo);
-		//多节点查询
-//		if(vo.getWbsId() != null){
-//			vo.setWbsIds(JSONArray.parseArray(JSONObject.toJSONString(Arrays.asList(String.valueOf(vo.getWbsId()).split(","))), String.class));
-//		}
 
 		if(StringUtils.isNotEmpty(vo.getBetweenTime())){
 			String[] betweenTime;
@@ -177,8 +200,22 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 			voResult.forEach(vor -> {
 				vor.setStartTime(DateUtil.format(vor.getCreateTime(), "yyyy-MM-dd"));
 				vor.setTaskStatusStr(new Integer("0").equals(vor.getStatus()) ? "未上报" : new Integer("1").equals(vor.getStatus()) ? "待审批" : new Integer("2").equals(vor.getStatus()) ? "已审批" : "已废除");
-			});
 
+				if(Arrays.asList("1,2".split(",")).contains(vor.getStatus().toString())){
+					//说明属于待审批和已审批状态,查询待办信息
+					List<Task> tasks = this.taskClient.queryTaskListByFormDataId(String.valueOf(vor.getId()));
+					if(tasks != null && tasks.size() > 0){
+						//查询当前任务的所有待办人
+						List<TaskParallel> linkTasks = this.taskParallelService.queryApprovalUser(tasks.get(0).getProcessInstanceId());
+						if(linkTasks != null && linkTasks.size() > 0){
+							//处理审批状态
+							this.integrationMethod(vor, linkTasks);
+						}
+						//设置上报批次
+						vor.setReportNumber(String.valueOf(tasks.get(0).getBatch()));
+					}
+				}
+			});
 			page.setRecords(voResult);
 			page.setTotal(count);
 
@@ -188,4 +225,11 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 		return page.setRecords(null);
 	}
 
+	/**
+	 * 统合方法
+	 */
+	private void integrationMethod(InformationQueryVO vo, List<TaskParallel> linkList) {
+		linkList.forEach(link -> vo.setWaitingUserList(link.getTaskUserName(), new Integer("999").equals(link.getEVisaStatus()) ? 999 : new Integer("2").equals(link.getStatus()) ? 2 : new Integer("3").equals(link.getStatus()) && new Integer("1").equals(link.getInitiative()) ? 3 : 1));
+	}
+
 }

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

@@ -34,10 +34,7 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
 
@@ -94,6 +91,7 @@ public class WbsTreePrivateController extends BladeController {
                     wbsTreeList.addAll(wbsTreeTableList);
                 }
                 //复制数据
+                Date now = new Date();
                 for(WbsTree tree : wbsTreeList){
                     WbsTreePrivate treePrivate = new WbsTreePrivate();
                     BeanUtils.copyProperties(tree, treePrivate);
@@ -101,6 +99,7 @@ public class WbsTreePrivateController extends BladeController {
                     treePrivate.setWbsType("4");
                     treePrivate.setProjectId(vo.getProjectId());
                     treePrivate.setPKeyId(SnowFlakeUtil.getId());
+                    treePrivate.setCreateTime(now);
                 }
                 if(saveTreePrivateList.size() > 0){
                     //修改项目引用