|
@@ -36,11 +36,9 @@ import org.springblade.core.tool.node.ForestNodeMerger;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.evisa.feign.EVisaClient;
|
|
|
import org.springblade.evisa.vo.CertBeanVO;
|
|
|
-import org.springblade.manager.entity.ContractInfo;
|
|
|
-import org.springblade.manager.entity.ContractRelationJlyz;
|
|
|
-import org.springblade.manager.entity.WbsTreeContract;
|
|
|
-import org.springblade.manager.entity.WbsTreePrivate;
|
|
|
+import org.springblade.manager.entity.*;
|
|
|
import org.springblade.manager.feign.ContractClient;
|
|
|
+import org.springblade.manager.feign.ProjectClient;
|
|
|
import org.springblade.manager.feign.WbsTreeContractClient;
|
|
|
import org.springblade.manager.feign.WbsTreePrivateClient;
|
|
|
import org.springblade.manager.vo.WbsTreeContractTreeVOS;
|
|
@@ -101,6 +99,8 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
|
|
|
private final MessageWarningClient messageWarningClient;
|
|
|
|
|
|
+ private final ProjectClient projectClient;
|
|
|
+
|
|
|
/**
|
|
|
* 初始化合同段导图树
|
|
|
*/
|
|
@@ -564,12 +564,34 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
if(queries != null && queries.size() > 0){
|
|
|
title = queries.stream().map(InformationQuery::getName).distinct().collect(Collectors.joining());
|
|
|
|
|
|
+ List<Long> projectIds = queries.stream().map(InformationQuery::getProjectId).distinct().collect(Collectors.toList());
|
|
|
+ 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);
|
|
|
+
|
|
|
+ Map<String, ProjectInfo> projectMap = new HashMap<>();
|
|
|
+ Map<String, ContractInfo> contractMap = new HashMap<>();
|
|
|
+ projects.forEach(project -> projectMap.put(project.getId().toString(), project));
|
|
|
+ contracts.forEach(contract -> contractMap.put(contract.getId().toString(), contract));
|
|
|
+
|
|
|
for(InformationQuery query : queries){
|
|
|
if(StringUtils.isNotEmpty(query.getFileUserIdAndName())){
|
|
|
String[] userArray = query.getFileUserIdAndName().split(",");
|
|
|
for(String str : userArray){
|
|
|
String[] strs = str.split("-");
|
|
|
try{
|
|
|
+ String projectName = "", contractName = "";
|
|
|
+ if(projectMap.containsKey(query.getProjectId().toString())){
|
|
|
+ ProjectInfo project = projectMap.get(query.getProjectId().toString());
|
|
|
+ projectName = StringUtils.isNotEmpty(project.getProjectAlias()) ? project.getProjectAlias() : project.getProjectName();
|
|
|
+ }
|
|
|
+ if(contractMap.containsKey(query.getContractId().toString())){
|
|
|
+ ContractInfo contract = contractMap.get(query.getContractId().toString());
|
|
|
+ contractName = contract.getContractName();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//保存通知记录
|
|
|
this.messageWarningClient.savePushUserMessageWarning(
|
|
|
new MessageWarningVO(
|
|
@@ -578,7 +600,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
//废除通知
|
|
|
3,
|
|
|
//内容
|
|
|
- AuthUtil.getNickName() + "废除了【" + query.getName() + "】",
|
|
|
+ projectName + contractName + "的用户【" + AuthUtil.getNickName() + "】废除了【" + query.getName() + "】",
|
|
|
//推送的目标人
|
|
|
Long.parseLong(strs[0]),
|
|
|
//默认未读
|
|
@@ -590,13 +612,17 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- //保存操作记录
|
|
|
- this.operationLogClient.saveUserOperationLog(6, "资料管理", "工序资料", Func.toStrList(task.getFormDataId()), title);
|
|
|
+ try{
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ json.put("operationObjIds", Func.toStrList(task.getFormDataId()));
|
|
|
+ json.put("operationObjName", title);
|
|
|
+
|
|
|
+ //保存操作记录
|
|
|
+ this.operationLogClient.saveUserOperationLog(6, "资料管理", "工序资料", json);
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
return R.data(true, "废除成功");
|
|
|
}catch (Exception e){
|
|
@@ -651,8 +677,16 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
title = queries.stream().map(InformationQuery::getName).distinct().collect(Collectors.joining());
|
|
|
}
|
|
|
|
|
|
- //保存操作记录
|
|
|
- this.operationLogClient.saveUserOperationLog(5, "资料管理", "工序资料", Func.toStrList(startTaskVO.getIds()), title);
|
|
|
+ try{
|
|
|
+ //保存操作记录
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ json.put("operationObjIds", Func.toStrList(startTaskVO.getIds()));
|
|
|
+ json.put("operationObjName", title);
|
|
|
+
|
|
|
+ this.operationLogClient.saveUserOperationLog(5, "资料管理", "工序资料", json);
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
return R.data(true);
|
|
|
}
|
|
|
}
|
|
@@ -1105,7 +1139,16 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
WbsTreeContract queries = this.wbsTreeContractClient.getContractWbsTreeByPrimaryKeyId(pKeyId);
|
|
|
|
|
|
//保存操作记录
|
|
|
- this.operationLogClient.saveUserOperationLog(3, "资料管理", "工序资料", Func.toStrList(pKeyId.toString()), StringUtils.isNotEmpty(queries.getFullName()) ? queries.getFullName() : queries.getDeptName());
|
|
|
+ try{
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ json.put("operationObjIds", Func.toStrList(pKeyId.toString()));
|
|
|
+ json.put("operationObjName", StringUtils.isNotEmpty(queries.getFullName()) ? queries.getFullName() : queries.getDeptName());
|
|
|
+
|
|
|
+ this.operationLogClient.saveUserOperationLog(3, "资料管理", "工序资料", json);
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
return R.data(this.wbsTreeContractClient.updateContractNodeParameter(node));
|
|
|
}
|
|
|
|
|
@@ -1185,7 +1228,12 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
|
|
|
//保存操作记录
|
|
|
List<String> idArray = JSONArray.parseArray(JSONObject.toJSONString(ids.split(",")), String.class);
|
|
|
- this.operationLogClient.saveUserOperationLog(4, "资料管理", "工序资料", idArray, nodeName);
|
|
|
+
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ json.put("operationObjIds", idArray);
|
|
|
+ json.put("operationObjName", nodeName);
|
|
|
+ this.operationLogClient.saveUserOperationLog(4, "资料管理", "工序资料", json);
|
|
|
+
|
|
|
//保存进回收站
|
|
|
this.recycleBinClient.saveDelBusinessData(idArray, StringUtils.isNotEmpty(removeNode.getFullName()) ? removeNode.getFullName() : removeNode.getDeptName(), 2, parentNodeName.toString(), removeNode.getProjectId(), removeNode.getContractId());
|
|
|
|
|
@@ -1372,11 +1420,13 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
if(saveLedger.size() > 0){
|
|
|
this.constructionLedgerService.saveBatch(saveLedger);
|
|
|
}
|
|
|
+
|
|
|
try{
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ json.put("operationObjIds", JSONArray.parseArray(JSONObject.toJSONString(saveList.stream().map(WbsTreeContract::getPKeyId).distinct().collect(Collectors.toList())), String.class));
|
|
|
+ json.put("operationObjName", saveList.stream().map(wbs -> StringUtils.isNotEmpty(wbs.getFullName()) ? wbs.getFullName() : wbs.getDeptName()).collect(Collectors.joining()));
|
|
|
//保存操作记录
|
|
|
- this.operationLogClient.saveUserOperationLog(operationType, "资料管理", "工序资料",
|
|
|
- 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()));
|
|
|
+ this.operationLogClient.saveUserOperationLog(operationType, "资料管理", "工序资料", json);
|
|
|
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
@@ -1735,6 +1785,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
if(new Integer("2").equals(contractInfo.getContractType())){
|
|
|
//监理合同段,需要获取关联的施工方合同段根节点数据
|
|
|
rootTreeNode = this.wbsTreeContractClient.lazyTree(StringUtils.isNotEmpty(parentId) ? Long.parseLong(parentId) : 0, contractId, contractIdRelation, contractInfo.getContractType());
|
|
|
+ int i = 0;
|
|
|
} else {
|
|
|
if(com.alibaba.nacos.common.utils.StringUtils.isEmpty(parentId)){
|
|
|
//为空,说明初始化
|
|
@@ -1757,7 +1808,8 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
}
|
|
|
|
|
|
rootTreeNode.forEach(vo -> {
|
|
|
- String primaryKeyId = new Integer("2").equals(contractInfo.getContractType()) ? vo.getId().toString() : vo.getPrimaryKeyId();
|
|
|
+// String primaryKeyId = new Integer("2").equals(contractInfo.getContractType()) ? vo.getId().toString() : vo.getPrimaryKeyId();
|
|
|
+ String primaryKeyId = vo.getPrimaryKeyId();
|
|
|
|
|
|
if(new Integer("1").equals(contractInfo.getContractType())){
|
|
|
if(StringUtils.isEmpty(parentId) || "0".equals(parentId)){
|