|
@@ -919,7 +919,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
//判断是否未生成文件
|
|
//判断是否未生成文件
|
|
List<String> list = Arrays.asList(ids.split(","));
|
|
List<String> list = Arrays.asList(ids.split(","));
|
|
for (String s : list) {
|
|
for (String s : list) {
|
|
- if (StringUtils.isBlank(s)){
|
|
|
|
|
|
+ if (StringUtils.isBlank(s)) {
|
|
return R.fail("选择的资料未生成文件");
|
|
return R.fail("选择的资料未生成文件");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -981,7 +981,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
//判断是否未生成文件
|
|
//判断是否未生成文件
|
|
List<String> list = Arrays.asList(ids.split(","));
|
|
List<String> list = Arrays.asList(ids.split(","));
|
|
for (String s : list) {
|
|
for (String s : list) {
|
|
- if (StringUtils.isBlank(s)){
|
|
|
|
|
|
+ if (StringUtils.isBlank(s)) {
|
|
return R.fail("选择的资料未生成文件");
|
|
return R.fail("选择的资料未生成文件");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1000,7 +1000,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return R.success("下载成功");
|
|
return R.success("下载成功");
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
return R.fail("选择的资料未生成文件");
|
|
return R.fail("选择的资料未生成文件");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1014,6 +1014,19 @@ public class InformationWriteQueryController extends BladeController {
|
|
public R<Boolean> batchAbolish(@RequestParam String ids, String primaryKeyId) {
|
|
public R<Boolean> batchAbolish(@RequestParam String ids, String primaryKeyId) {
|
|
//获取所有相关任务记录
|
|
//获取所有相关任务记录
|
|
List<Task> taskList = this.taskClient.queryTaskListByFormDataId(ids);
|
|
List<Task> taskList = this.taskClient.queryTaskListByFormDataId(ids);
|
|
|
|
+
|
|
|
|
+ if (taskList.size() == 0) {
|
|
|
|
+ //试验
|
|
|
|
+ List<InformationQuery> dataList = this.informationQueryService.getBaseMapper().selectList(Wrappers.<InformationQuery>lambdaQuery()
|
|
|
|
+ .select(InformationQuery::getId)
|
|
|
|
+ .eq(InformationQuery::getType, 2)
|
|
|
|
+ .in(InformationQuery::getWbsId, Func.toStrList(ids)));
|
|
|
|
+ if (dataList.size() > 0) {
|
|
|
|
+ List<Long> dataIds = dataList.stream().map(InformationQuery::getId).collect(Collectors.toList());
|
|
|
|
+ taskList = this.taskClient.queryTaskListByFormDataId(StringUtils.join(dataIds, ","));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
if (taskList != null && taskList.size() > 0) {
|
|
if (taskList != null && taskList.size() > 0) {
|
|
try {
|
|
try {
|
|
//执行废除
|
|
//执行废除
|
|
@@ -1156,10 +1169,10 @@ public class InformationWriteQueryController extends BladeController {
|
|
String sql;
|
|
String sql;
|
|
if (StringUtils.isNotEmpty(primaryKeyId)) {
|
|
if (StringUtils.isNotEmpty(primaryKeyId)) {
|
|
//单个废除
|
|
//单个废除
|
|
- sql = "update u_trial_self_inspection_record set task_status = '未上报' where id in(" + primaryKeyId + ")";
|
|
|
|
|
|
+ sql = "update u_trial_self_inspection_record set task_status = '已废除' where id = " + primaryKeyId;
|
|
} else {
|
|
} else {
|
|
//批量废除直接调的该接口,primaryKeyId为null,ids=当前试验记录的ids
|
|
//批量废除直接调的该接口,primaryKeyId为null,ids=当前试验记录的ids
|
|
- sql = "update u_trial_self_inspection_record set task_status = '未上报' where id in(" + ids + ")";
|
|
|
|
|
|
+ sql = "update u_trial_self_inspection_record set task_status = '已废除' where id in(" + ids + ")";
|
|
}
|
|
}
|
|
jdbcTemplate.execute(sql);
|
|
jdbcTemplate.execute(sql);
|
|
|
|
|
|
@@ -1184,6 +1197,16 @@ public class InformationWriteQueryController extends BladeController {
|
|
String[] ids = startTaskVO.getIds().split(",");
|
|
String[] ids = startTaskVO.getIds().split(",");
|
|
if (ids.length > 0) {
|
|
if (ids.length > 0) {
|
|
List<InformationQuery> queryList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getId, Arrays.asList(ids)));
|
|
List<InformationQuery> queryList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getId, Arrays.asList(ids)));
|
|
|
|
+
|
|
|
|
+ //试验批量上报
|
|
|
|
+ String trialIds = "";
|
|
|
|
+ if (queryList.size() == 0 && startTaskVO.getTrialSelfInspectionRecordId() == 1L) {
|
|
|
|
+ queryList = new ArrayList<>(this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, Arrays.asList(ids))));
|
|
|
|
+ trialIds = startTaskVO.getIds();
|
|
|
|
+ //试验记录ids重新赋值映射为数据源ids
|
|
|
|
+ ids = queryList.stream().map(InformationQuery::getId).map(String::valueOf).toArray(String[]::new);
|
|
|
|
+ }
|
|
|
|
+
|
|
Map<String, String> queryMap = new HashMap<>();
|
|
Map<String, String> queryMap = new HashMap<>();
|
|
queryList.forEach(query -> queryMap.put(query.getId().toString(), query.getName()));
|
|
queryList.forEach(query -> queryMap.put(query.getId().toString(), query.getName()));
|
|
try {
|
|
try {
|
|
@@ -1225,13 +1248,21 @@ public class InformationWriteQueryController extends BladeController {
|
|
//修改记录
|
|
//修改记录
|
|
this.informationQueryService.update(wrappers);
|
|
this.informationQueryService.update(wrappers);
|
|
|
|
|
|
- //修改试验记录上报任务状态
|
|
|
|
- if (ObjectUtil.isNotEmpty(startTaskVO.getTrialSelfInspectionRecordId())) {
|
|
|
|
|
|
+ //修改试验记录上报任务状态(单上报)
|
|
|
|
+ if (ObjectUtil.isNotEmpty(startTaskVO.getTrialSelfInspectionRecordId()) && startTaskVO.getTrialSelfInspectionRecordId() != 1L) {
|
|
String sql = "update u_trial_self_inspection_record set task_status = '待审批' where id = " + startTaskVO.getTrialSelfInspectionRecordId();
|
|
String sql = "update u_trial_self_inspection_record set task_status = '待审批' where id = " + startTaskVO.getTrialSelfInspectionRecordId();
|
|
jdbcTemplate.execute(sql);
|
|
jdbcTemplate.execute(sql);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (StringUtils.isNotEmpty(trialIds)) {
|
|
|
|
+ //修改试验记录上报任务状态(批量上报)
|
|
|
|
+ String sql = "update u_trial_self_inspection_record set task_status = '待审批' where id in(" + trialIds + ")";
|
|
|
|
+ jdbcTemplate.execute(sql);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
return R.data(300, false, "上报失败");
|
|
return R.data(300, false, "上报失败");
|
|
@@ -1277,10 +1308,10 @@ public class InformationWriteQueryController extends BladeController {
|
|
public R<Boolean> diySort(@RequestBody DiySortVO vo) {
|
|
public R<Boolean> diySort(@RequestBody DiySortVO vo) {
|
|
List<String> sortLists = vo.getSortList();
|
|
List<String> sortLists = vo.getSortList();
|
|
boolean b = wbsTreeContractClient.diySort(sortLists);
|
|
boolean b = wbsTreeContractClient.diySort(sortLists);
|
|
- if(sortLists!=null){
|
|
|
|
|
|
+ if (sortLists != null) {
|
|
WbsTreeContract needCopyNode = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(sortLists.get(0));
|
|
WbsTreeContract needCopyNode = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(sortLists.get(0));
|
|
//获取父节点信息
|
|
//获取父节点信息
|
|
- informationQueryService.AsyncWbsTree(needCopyNode.getParentId()+ "",needCopyNode.getParentId()+ "",needCopyNode.getContractId(),"","1");
|
|
|
|
|
|
+ informationQueryService.AsyncWbsTree(needCopyNode.getParentId() + "", needCopyNode.getParentId() + "", needCopyNode.getContractId(), "", "1");
|
|
}
|
|
}
|
|
return R.status(b);
|
|
return R.status(b);
|
|
}
|
|
}
|
|
@@ -1295,13 +1326,13 @@ public class InformationWriteQueryController extends BladeController {
|
|
//首先查询需要复制的节点及其下级所有子节点的信息
|
|
//首先查询需要复制的节点及其下级所有子节点的信息
|
|
WbsTreeContract needCopyNode = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(vo.getNeedCopyPrimaryKeyId());
|
|
WbsTreeContract needCopyNode = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(vo.getNeedCopyPrimaryKeyId());
|
|
// 获取当前节点的所有子节点
|
|
// 获取当前节点的所有子节点
|
|
- String vocational = SnowFlakeUtil.getId()+"";
|
|
|
|
|
|
+ String vocational = SnowFlakeUtil.getId() + "";
|
|
//新增施工台账
|
|
//新增施工台账
|
|
- List<WbsTreeContract> saveList = new ArrayList<>();
|
|
|
|
|
|
+ List<WbsTreeContract> saveList = new ArrayList<>();
|
|
List<ConstructionLedger> saveLedger = new ArrayList<>();
|
|
List<ConstructionLedger> saveLedger = new ArrayList<>();
|
|
// 获取附件
|
|
// 获取附件
|
|
- List<WbsTreeContract> nodeChildAll = informationQueryService.getNodeChildAllByNodeId(needCopyNode.getId() + "", needCopyNode.getContractId(),vo.getNeedCopyPrimaryKeyId());
|
|
|
|
- // 获取实体表列对象
|
|
|
|
|
|
+ List<WbsTreeContract> nodeChildAll = informationQueryService.getNodeChildAllByNodeId(needCopyNode.getId() + "", needCopyNode.getContractId(), vo.getNeedCopyPrimaryKeyId());
|
|
|
|
+ // 获取实体表列对象
|
|
List<QueryProcessDataVO> nodeTabCols = informationQueryService.getNodeChildTabColsAllByNodeId(needCopyNode.getId() + "", needCopyNode.getContractId());
|
|
List<QueryProcessDataVO> nodeTabCols = informationQueryService.getNodeChildTabColsAllByNodeId(needCopyNode.getId() + "", needCopyNode.getContractId());
|
|
// 转化为map
|
|
// 转化为map
|
|
Map<String, String> nodeTabColsMap = nodeTabCols.stream().collect(Collectors.toMap(QueryProcessDataVO::getQueryType, QueryProcessDataVO::getAncestors, (key1, key2) -> key2));
|
|
Map<String, String> nodeTabColsMap = nodeTabCols.stream().collect(Collectors.toMap(QueryProcessDataVO::getQueryType, QueryProcessDataVO::getAncestors, (key1, key2) -> key2));
|
|
@@ -1370,25 +1401,25 @@ public class InformationWriteQueryController extends BladeController {
|
|
}
|
|
}
|
|
|
|
|
|
// 组织复制值Sql
|
|
// 组织复制值Sql
|
|
- if(nodeTabColsMap!=null && node.getType()==2){
|
|
|
|
|
|
+ if (nodeTabColsMap != null && node.getType() == 2) {
|
|
String tableName = newData.getInitTableName();
|
|
String tableName = newData.getInitTableName();
|
|
String col = nodeTabColsMap.get(tableName);
|
|
String col = nodeTabColsMap.get(tableName);
|
|
String colVal = nodeTabColsMap.get(tableName);
|
|
String colVal = nodeTabColsMap.get(tableName);
|
|
- colVal = colVal.replaceAll("id,p_key_id,","'"+SnowFlakeUtil.getId()+"' as id,'"+newData.getPKeyId()+"' as p_key_id,");
|
|
|
|
- copeSql.append("insert into "+tableName+" ("+col+") select "+colVal+" from "+tableName+" where p_key_id='"+node.getPKeyId()+"' ;");
|
|
|
|
|
|
+ colVal = colVal.replaceAll("id,p_key_id,", "'" + SnowFlakeUtil.getId() + "' as id,'" + newData.getPKeyId() + "' as p_key_id,");
|
|
|
|
+ copeSql.append("insert into " + tableName + " (" + col + ") select " + colVal + " from " + tableName + " where p_key_id='" + node.getPKeyId() + "' ;");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
//保存节点信息
|
|
//保存节点信息
|
|
- R<Boolean> booleanR = this.saveOrCopyNodeTree(saveList, saveLedger, 32, needCopyNode);
|
|
|
|
|
|
+ R<Boolean> booleanR = this.saveOrCopyNodeTree(saveList, saveLedger, 32, needCopyNode);
|
|
|
|
|
|
//复制数据逻辑
|
|
//复制数据逻辑
|
|
- if(nodeTabColsMap!=null &&copeSql.length()>=10){
|
|
|
|
|
|
+ if (nodeTabColsMap != null && copeSql.length() >= 10) {
|
|
jdbcTemplate.execute(copeSql.toString());
|
|
jdbcTemplate.execute(copeSql.toString());
|
|
}
|
|
}
|
|
|
|
|
|
//获取父节点信息
|
|
//获取父节点信息
|
|
- informationQueryService.AsyncWbsTree(needCopyNode.getParentId()+ "",needCopyNode.getParentId()+ "",needCopyNode.getContractId(),"","1");
|
|
|
|
|
|
+ informationQueryService.AsyncWbsTree(needCopyNode.getParentId() + "", needCopyNode.getParentId() + "", needCopyNode.getContractId(), "", "1");
|
|
return booleanR;
|
|
return booleanR;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1424,23 +1455,23 @@ public class InformationWriteQueryController extends BladeController {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
//复制结构信息
|
|
//复制结构信息
|
|
- // R<Boolean> booleanR = this.saveOrCopyNodeTree(saveList, saveLedger, 32, needCopyNode);
|
|
|
|
|
|
+ // R<Boolean> booleanR = this.saveOrCopyNodeTree(saveList, saveLedger, 32, needCopyNode);
|
|
// 复制表数据
|
|
// 复制表数据
|
|
|
|
|
|
- System.out.println("1="+DateUtil.formatDateTime(DateUtil.now()));
|
|
|
|
|
|
+ System.out.println("1=" + DateUtil.formatDateTime(DateUtil.now()));
|
|
List<WbsTreeContract> parentList = new ArrayList<>(), childList = new ArrayList<>(), allList = new ArrayList<>(), saveList = new ArrayList<>();
|
|
List<WbsTreeContract> parentList = new ArrayList<>(), childList = new ArrayList<>(), allList = new ArrayList<>(), saveList = new ArrayList<>();
|
|
//新增施工台账
|
|
//新增施工台账
|
|
List<ConstructionLedger> saveLedger = new ArrayList<>();
|
|
List<ConstructionLedger> saveLedger = new ArrayList<>();
|
|
|
|
|
|
parentList.add(needCopyNode);
|
|
parentList.add(needCopyNode);
|
|
- System.out.println("2="+DateUtil.formatDateTime(DateUtil.now()));
|
|
|
|
|
|
+ System.out.println("2=" + DateUtil.formatDateTime(DateUtil.now()));
|
|
//查询所有有效子节点(慢 10分钟)
|
|
//查询所有有效子节点(慢 10分钟)
|
|
this.foreachQueryChildContract(parentList, childList, contractAllNodeMap);
|
|
this.foreachQueryChildContract(parentList, childList, contractAllNodeMap);
|
|
|
|
|
|
- System.out.println("3="+DateUtil.formatDateTime(DateUtil.now()));
|
|
|
|
|
|
+ System.out.println("3=" + DateUtil.formatDateTime(DateUtil.now()));
|
|
allList.addAll(parentList);
|
|
allList.addAll(parentList);
|
|
allList.addAll(childList);
|
|
allList.addAll(childList);
|
|
- System.out.println("4="+DateUtil.formatDateTime(DateUtil.now()));
|
|
|
|
|
|
+ System.out.println("4=" + DateUtil.formatDateTime(DateUtil.now()));
|
|
if ("1".equals(vo.getCopyType())) {
|
|
if ("1".equals(vo.getCopyType())) {
|
|
if (StringUtils.isNotEmpty(vo.getNeedCopyPrimaryKeyId())) {
|
|
if (StringUtils.isNotEmpty(vo.getNeedCopyPrimaryKeyId())) {
|
|
WbsTreeContract parent = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(vo.getParentPrimaryKeyId());
|
|
WbsTreeContract parent = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(vo.getParentPrimaryKeyId());
|
|
@@ -1455,7 +1486,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
- System.out.println("5="+DateUtil.formatDateTime(DateUtil.now()));
|
|
|
|
|
|
+ System.out.println("5=" + DateUtil.formatDateTime(DateUtil.now()));
|
|
//todo 单份复制
|
|
//todo 单份复制
|
|
allList.forEach(node -> {
|
|
allList.forEach(node -> {
|
|
WbsTreeContract newData = new WbsTreeContract();
|
|
WbsTreeContract newData = new WbsTreeContract();
|
|
@@ -1527,7 +1558,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- System.out.println("6="+DateUtil.formatDateTime(DateUtil.now()));
|
|
|
|
|
|
+ System.out.println("6=" + DateUtil.formatDateTime(DateUtil.now()));
|
|
} else {
|
|
} else {
|
|
//todo 多份复制
|
|
//todo 多份复制
|
|
//获取需要复制到的位置集合
|
|
//获取需要复制到的位置集合
|
|
@@ -1814,7 +1845,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
Boolean aBoolean = this.wbsTreeContractClient.updateContractNodeParameter(node);
|
|
Boolean aBoolean = this.wbsTreeContractClient.updateContractNodeParameter(node);
|
|
|
|
|
|
//获取父节点信息
|
|
//获取父节点信息
|
|
- informationQueryService.AsyncWbsTree(queries.getParentId()+ "",queries.getParentId()+ "",queries.getContractId(),"","1");
|
|
|
|
|
|
+ informationQueryService.AsyncWbsTree(queries.getParentId() + "", queries.getParentId() + "", queries.getContractId(), "", "1");
|
|
return R.data(aBoolean);
|
|
return R.data(aBoolean);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1886,9 +1917,9 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
|
|
|
if (queryProcess != null && queryProcess.size() > 0) {
|
|
if (queryProcess != null && queryProcess.size() > 0) {
|
|
//检查这些填报节点是否存在已经审批或已经上报的节点,如果存在则不允许删除
|
|
//检查这些填报节点是否存在已经审批或已经上报的节点,如果存在则不允许删除
|
|
- List<QueryProcessDataVO> approvalList = queryProcess.stream().filter(vo -> new Integer("2").equals(vo.getStatus()) && vo.getInformationQueryId()!=null).collect(Collectors.toList());
|
|
|
|
|
|
+ List<QueryProcessDataVO> approvalList = queryProcess.stream().filter(vo -> new Integer("2").equals(vo.getStatus()) && vo.getInformationQueryId() != null).collect(Collectors.toList());
|
|
//
|
|
//
|
|
- List<QueryProcessDataVO> runTaskList = queryProcess.stream().filter(vo -> new Integer("1").equals(vo.getStatus()) && vo.getInformationQueryId()!=null).collect(Collectors.toList());
|
|
|
|
|
|
+ List<QueryProcessDataVO> runTaskList = queryProcess.stream().filter(vo -> new Integer("1").equals(vo.getStatus()) && vo.getInformationQueryId() != null).collect(Collectors.toList());
|
|
if (approvalList.size() > 0 || runTaskList.size() > 0) {
|
|
if (approvalList.size() > 0 || runTaskList.size() > 0) {
|
|
//说明存在已经审批或已经上报的节点,不允许删除
|
|
//说明存在已经审批或已经上报的节点,不允许删除
|
|
return R.data(300, false, "存在已经上报或审批的节点,不允许删除");
|
|
return R.data(300, false, "存在已经上报或审批的节点,不允许删除");
|
|
@@ -1915,7 +1946,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
this.recycleBinClient.saveDelBusinessData(idArray, StringUtils.isNotEmpty(removeNode.getFullName()) ? removeNode.getFullName() : removeNode.getNodeName(), 2, parentNodeName.toString(), removeNode.getProjectId(), removeNode.getContractId());
|
|
this.recycleBinClient.saveDelBusinessData(idArray, StringUtils.isNotEmpty(removeNode.getFullName()) ? removeNode.getFullName() : removeNode.getNodeName(), 2, parentNodeName.toString(), removeNode.getProjectId(), removeNode.getContractId());
|
|
Boolean aBoolean = this.wbsTreeContractClient.removeContractTreeNode(idArray);
|
|
Boolean aBoolean = this.wbsTreeContractClient.removeContractTreeNode(idArray);
|
|
// 更新redis
|
|
// 更新redis
|
|
- this.informationQueryService.AsyncWbsTree(removeNode.getParentId()+ "",removeNode.getParentId()+ "",removeNode.getContractId(),"","1");
|
|
|
|
|
|
+ this.informationQueryService.AsyncWbsTree(removeNode.getParentId() + "", removeNode.getParentId() + "", removeNode.getContractId(), "", "1");
|
|
return R.data(aBoolean);
|
|
return R.data(aBoolean);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2103,9 +2134,9 @@ public class InformationWriteQueryController extends BladeController {
|
|
R<Boolean> booleanR = this.saveOrCopyNodeTree(saveList, saveLedger, 2, treeContract);
|
|
R<Boolean> booleanR = this.saveOrCopyNodeTree(saveList, saveLedger, 2, treeContract);
|
|
|
|
|
|
//更新redis
|
|
//更新redis
|
|
- List<WbsTreeContractTreeVOS> wbsTreeContractTreeVOS = this.informationQueryService.queryContractTree(treeContract.getId()+ "", treeContract.getContractId(), "", "1");
|
|
|
|
|
|
+ List<WbsTreeContractTreeVOS> wbsTreeContractTreeVOS = this.informationQueryService.queryContractTree(treeContract.getId() + "", treeContract.getContractId(), "", "1");
|
|
|
|
|
|
- informationQueryService.AsyncWbsTree(treeContract.getId()+ "",treeContract.getId()+ "",treeContract.getContractId(),"","1");
|
|
|
|
|
|
+ informationQueryService.AsyncWbsTree(treeContract.getId() + "", treeContract.getId() + "", treeContract.getContractId(), "", "1");
|
|
return booleanR;
|
|
return booleanR;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2360,9 +2391,9 @@ public class InformationWriteQueryController extends BladeController {
|
|
//如果是首件列表请求,则删掉没有标记为首件的数据
|
|
//如果是首件列表请求,则删掉没有标记为首件的数据
|
|
if (queryDataResult != null && queryDataResult.size() > 0) {
|
|
if (queryDataResult != null && queryDataResult.size() > 0) {
|
|
if (StringUtils.isNotEmpty(vo.getIsFirst())) {
|
|
if (StringUtils.isNotEmpty(vo.getIsFirst())) {
|
|
- if (StringUtils.isNotEmpty(vo.getFirstTitle())){
|
|
|
|
- queryDataResult = queryDataResult.stream().filter(qdr->"3".equals(qdr.getQueryType())).collect(Collectors.toList());
|
|
|
|
- }else {
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(vo.getFirstTitle())) {
|
|
|
|
+ queryDataResult = queryDataResult.stream().filter(qdr -> "3".equals(qdr.getQueryType())).collect(Collectors.toList());
|
|
|
|
+ } else {
|
|
//节点主键集合
|
|
//节点主键集合
|
|
List<String> treeIds = queryDataResult.stream().map(QueryProcessDataVO::getPrimaryKeyId).distinct().collect(Collectors.toList());
|
|
List<String> treeIds = queryDataResult.stream().map(QueryProcessDataVO::getPrimaryKeyId).distinct().collect(Collectors.toList());
|
|
//通过合同段主键在首件关联表中查询出所有数据
|
|
//通过合同段主键在首件关联表中查询出所有数据
|
|
@@ -2422,22 +2453,22 @@ public class InformationWriteQueryController extends BladeController {
|
|
@RequestParam String parentId,
|
|
@RequestParam String parentId,
|
|
@RequestParam String contractId,
|
|
@RequestParam String contractId,
|
|
@RequestParam String contractIdRelation,
|
|
@RequestParam String contractIdRelation,
|
|
- @RequestParam String classifyType){
|
|
|
|
|
|
+ @RequestParam String classifyType) {
|
|
if (StringUtils.isNotEmpty(primaryKeyId)) {
|
|
if (StringUtils.isNotEmpty(primaryKeyId)) {
|
|
parentId = primaryKeyId;
|
|
parentId = primaryKeyId;
|
|
}
|
|
}
|
|
|
|
|
|
- String dataInfoId = contractId+"_"+parentId+"_"+classifyType;
|
|
|
|
- Object data = RedisTemplate.opsForValue().get("blade-manager::contract:wbstree:"+dataInfoId);
|
|
|
|
|
|
+ String dataInfoId = contractId + "_" + parentId + "_" + classifyType;
|
|
|
|
+ Object data = RedisTemplate.opsForValue().get("blade-manager::contract:wbstree:" + dataInfoId);
|
|
List<WbsTreeContractTreeVOS> wbsTreeContractTreeVOS = null;
|
|
List<WbsTreeContractTreeVOS> wbsTreeContractTreeVOS = null;
|
|
- if(data!=null){
|
|
|
|
|
|
+ if (data != null) {
|
|
wbsTreeContractTreeVOS = JSON.parseArray(data.toString(), WbsTreeContractTreeVOS.class);
|
|
wbsTreeContractTreeVOS = JSON.parseArray(data.toString(), WbsTreeContractTreeVOS.class);
|
|
}
|
|
}
|
|
|
|
|
|
if (wbsTreeContractTreeVOS == null) {
|
|
if (wbsTreeContractTreeVOS == null) {
|
|
wbsTreeContractTreeVOS = this.informationQueryService.queryContractTree(parentId, contractId, contractIdRelation, classifyType);
|
|
wbsTreeContractTreeVOS = this.informationQueryService.queryContractTree(parentId, contractId, contractIdRelation, classifyType);
|
|
- JSONArray array= JSONArray.parseArray(JSON.toJSONString(wbsTreeContractTreeVOS));
|
|
|
|
- RedisTemplate.opsForValue().set("blade-manager::contract:wbstree:"+dataInfoId,JSON.toJSON(array).toString());
|
|
|
|
|
|
+ JSONArray array = JSONArray.parseArray(JSON.toJSONString(wbsTreeContractTreeVOS));
|
|
|
|
+ RedisTemplate.opsForValue().set("blade-manager::contract:wbstree:" + dataInfoId, JSON.toJSON(array).toString());
|
|
}
|
|
}
|
|
return R.data(wbsTreeContractTreeVOS);
|
|
return R.data(wbsTreeContractTreeVOS);
|
|
}
|
|
}
|