Browse Source

Merge remote-tracking branch 'origin/master' into master

yangyj 2 years ago
parent
commit
630fb10a92

+ 3 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/ContractClient.java

@@ -34,6 +34,9 @@ public interface ContractClient {
     @PostMapping(API_PREFIX + "/getContractById")
     ContractInfo getContractById(@RequestParam Long id);
 
+    @PostMapping(API_PREFIX + "/getContractByIds")
+    List<ContractInfo> getContractByIds(@RequestParam List<Long> ids);
+
     /**
      * 根据项目ID获取合同段
      *

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

@@ -27,8 +27,10 @@ import org.springblade.core.tool.utils.Func;
 import org.springblade.evisa.feign.EVisaClient;
 import org.springblade.manager.entity.ArchiveTree;
 import org.springblade.manager.entity.ContractInfo;
+import org.springblade.manager.entity.ProjectInfo;
 import org.springblade.manager.feign.ArchiveTreeClient;
 import org.springblade.manager.feign.ContractClient;
+import org.springblade.manager.feign.ProjectClient;
 import org.springblade.manager.vo.ArchiveTreeVO;
 import org.springblade.system.entity.Role;
 import org.springblade.system.feign.ISysClient;
@@ -69,6 +71,8 @@ public class ArchiveFileController extends BladeController {
 
 	private final ContractClient contractClient;
 
+	private final ProjectClient projectClient;
+
 	private final ISysClient sysClient;
 
 	private final RecycleBinClient recycleBinClient;
@@ -164,6 +168,9 @@ public class ArchiveFileController extends BladeController {
 				List<ArchiveFile> archiveFiles = this.archiveFileService.getBaseMapper().selectBatchIds(Arrays.asList(task.getFormDataId().split(",")));
 				for(ArchiveFile archiveFile : archiveFiles){
 					try{
+						ProjectInfo projectInfo = this.projectClient.queryProjectList(Func.toStrList(archiveFile.getProjectId())).get(0);
+						ContractInfo contractInfo = this.contractClient.getContractById(Long.parseLong(archiveFile.getContractId()));
+
 						//保证推送人
 						this.messageWarningClient.savePushUserMessageWarning(new MessageWarningVO(
 								Long.parseLong(archiveFile.getProjectId()),
@@ -171,7 +178,7 @@ public class ArchiveFileController extends BladeController {
 								//废除提醒
 								3,
 								//内容
-								AuthUtil.getNickName() + "废除了【" + archiveFile.getFileName() + "】流程,请及时查看",
+								(StringUtils.isNotEmpty(projectInfo.getProjectAlias()) ? projectInfo.getProjectAlias() : projectInfo.getProjectName()) + contractInfo.getContractName() + "的用户" + AuthUtil.getNickName() + "废除了【" + archiveFile.getFileName() + "】流程,请及时查看",
 								//推送的目标人
 								archiveFile.getCreateUser(),
 								//默认未读

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

@@ -28,6 +28,10 @@ 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.utils.Func;
+import org.springblade.manager.entity.ContractInfo;
+import org.springblade.manager.entity.ProjectInfo;
+import org.springblade.manager.feign.ContractClient;
+import org.springblade.manager.feign.ProjectClient;
 import org.springblade.manager.feign.WbsTreeContractClient;
 import org.springblade.manager.vo.WbsTreeContractTreeVOS;
 import org.springblade.resource.feign.NewIOSSClient;
@@ -69,6 +73,10 @@ public class ContractLogController extends BladeController {
 
 	private final NewIOSSClient newIOSSClient;
 
+	private final ContractClient contractClient;
+
+	private final ProjectClient projectClient;
+
 	/**
 	 * 单个废除(填报页)
 	 */
@@ -267,11 +275,15 @@ public class ContractLogController extends BladeController {
 					this.taskClient.abolishTask(task);
 				} else if(new Integer("2").equals(task.getStatus())) {
 					//已审批的任务,修改业务数据的审批状态为未上报并撤签即可
-					this.contractLogService.update(Wrappers.<ContractLog>lambdaUpdate().set(ContractLog::getEVisaPdfUrl, null).set(ContractLog::getStatus, 3).in(ContractLog::getId, Arrays.asList(task.getFormDataId().split(","))));
+					this.contractLogService.update(Wrappers.<ContractLog>lambdaUpdate().set(ContractLog::getAuditUserIdAndName, null).set(ContractLog::getEVisaPdfUrl, null).set(ContractLog::getStatus, 3).in(ContractLog::getId, Arrays.asList(task.getFormDataId().split(","))));
 				}
 
 				List<ContractLog> contractLogs = this.contractLogService.getBaseMapper().selectBatchIds(Arrays.asList(task.getFormDataId().split(",")));
 				for(ContractLog contractLog : contractLogs){
+
+					ProjectInfo projectInfo = this.projectClient.queryProjectList(Func.toStrList(contractLog.getProjectId().toString())).get(0);
+					ContractInfo contractInfo = this.contractClient.getContractById(contractLog.getContractId());
+
 					try{
 						//保存推送记录
 						this.messageWarningClient.savePushUserMessageWarning(new MessageWarningVO(
@@ -280,7 +292,7 @@ public class ContractLogController extends BladeController {
 								//废除通知
 								3,
 								//内容
-								AuthUtil.getNickName() + "废除了【" + contractLog.getFileName() + "】流程,请及时查看",
+								(StringUtils.isNotEmpty(projectInfo.getProjectAlias()) ? projectInfo.getProjectAlias() : projectInfo.getProjectName()) + contractInfo.getContractName() + "的用户" + AuthUtil.getNickName() + "废除了【" + contractLog.getFileName() + "】流程,请及时查看",
 								//推送的目标人
 								contractLog.getCreateUser(),
 								//默认未读

+ 4 - 2
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -377,7 +377,7 @@ public class InformationWriteQueryController extends BladeController {
 		//记录状态
 		String status = "1";
 		//查询填报状态
-		InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify));
+		InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).ne(InformationQuery::getType, 3));
 		if(businessData != null){
 			switch (businessData.getStatus()){
 				case 0:
@@ -546,6 +546,8 @@ public class InformationWriteQueryController extends BladeController {
 						wrapper.set(InformationQuery::getEVisaPdfUrl, null);
 						//将上报批次置空
 						wrapper.set(InformationQuery::getReportNumber, null);
+						//置空审批人
+						wrapper.set(InformationQuery::getAuditUserIdAndName, null);
 
 						this.informationQueryService.update(wrapper.in(InformationQuery::getId, Arrays.asList(task.getFormDataId().split(","))));
 					}
@@ -559,7 +561,7 @@ public class InformationWriteQueryController extends BladeController {
 						List<Long> contractIds = queries.stream().map(InformationQuery::getContractId).distinct().collect(Collectors.toList());
 
 						List<ProjectInfo> projects = this.projectClient.queryProjectList(JSONArray.parseArray(JSONObject.toJSONString(projectIds), String.class));
-						List<ContractInfo> contracts = this.contractClient.queryContractListByIds(contractIds);
+						List<ContractInfo> contracts = this.contractClient.getContractByIds(contractIds);
 
 						Map<String, ProjectInfo> projectMap = new HashMap<>();
 						Map<String, ContractInfo> contractMap = new HashMap<>();

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

@@ -244,7 +244,7 @@ public class TaskController extends BladeController {
 			}
 			return R.data(true);
 		}
-		return R.data(true);
+		return R.data(false);
 	}
 
 	/**

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

@@ -116,7 +116,7 @@ public class ContractLogClientImpl implements ContractLogClient {
             contractLog.setId(SnowFlakeUtil.getId());
             contractLog.setCreateTime(new Date());
             contractLog.setCreateUser(AuthUtil.getUserId());
-            contractLog.setCreateUserName(AuthUtil.getUserName());
+            contractLog.setCreateUserName(AuthUtil.getNickName());
             contractLog.setStatus(0);
             contractLog.setFileName(saveContractLogVO.getRecordTime() + " " + node.getNodeName());
 

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

@@ -13,11 +13,8 @@ import org.springblade.business.service.ITaskService;
 import org.springblade.business.vo.TaskApprovalVO;
 import org.springblade.business.vo.TaskVO;
 import org.springblade.core.tool.api.R;
-import org.springblade.manager.entity.WbsTreeContract;
 import org.springblade.manager.feign.EVisaConfigClient;
 import org.springframework.web.bind.annotation.RestController;
-
-import java.util.ArrayList;
 import java.util.List;
 
 @RestController

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

@@ -65,6 +65,7 @@
         <result column="isFirst" property="isFirst"/>
         <result column="nodeType" property="nodeType"/>
         <result column="colorStatus" property="colorStatus"/>
+        <result column="type" property="type"/>
     </resultMap>
 
     <resultMap id="intResultMap" type="java.lang.Integer"/>
@@ -80,6 +81,8 @@
             wtc.contract_id AS contractIdRelation,
             wtc.old_id AS oldId,
             wtc.major_data_type AS majorDataType,
+            wtc.node_type AS `type`,
+            wtc.node_type AS nodeType,
             CASE
                 wtc.node_type
             WHEN 6 THEN 'true'
@@ -154,6 +157,7 @@
             wtc.contract_id AS contractId,
             wtc.old_id AS oldId,
             wtc.major_data_type AS majorDataType,
+            wtc.node_type AS `type`,
             wtc.node_type AS nodeType,
             CASE
                 wtc.node_type

+ 5 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ContractClientImpl.java

@@ -33,6 +33,11 @@ public class ContractClientImpl implements ContractClient {
         return this.contractInfoService.getById(id);
     }
 
+    @Override
+    public List<ContractInfo> getContractByIds(List<Long> ids) {
+        return this.contractInfoService.list(Wrappers.<ContractInfo>lambdaQuery().in(ContractInfo::getId, ids));
+    }
+
     @Override
     public List<ContractInfo> queryContractListByIds(List<Long> ids) {
         return this.contractInfoService.selectContractByProjectIds(ids);

+ 1 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ExcelTabMapper.xml

@@ -62,6 +62,7 @@
         dept.parent_id,
         dept.name,
         dept.file_type,
+        dept.tab_type AS "tabType",
         (
         SELECT
         CASE WHEN count(1) > 0 THEN 1 ELSE 0 END