|
@@ -2767,10 +2767,10 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
this.currentNodeAllParent(parentNodeName, removeNode);
|
|
|
|
|
|
//判断是否子节点有上报或审批过的资料
|
|
|
- List<InformationQuery> list = informationQueryService.selectChildrenNodeInfo(removeNode);
|
|
|
- if (list != null && list.size() >= 1) {
|
|
|
- return R.data(300, false, "存在已经上报或审批的节点,不允许删除");
|
|
|
- }
|
|
|
+// List<InformationQuery> list = informationQueryService.selectChildrenNodeInfo(removeNode);
|
|
|
+// if (list != null && list.size() >= 1) {
|
|
|
+// return R.data(300, false, "存在已经上报或审批的节点,不允许删除");
|
|
|
+// }
|
|
|
|
|
|
//查询所有子节点 TODO(不能用ancestors字段获取,ancestors字段有问题,目前用递归获取)2023年9月19日
|
|
|
//List<WbsTreeContract> removeNodeList = jdbcTemplate.query("select p_key_id,type from m_wbs_tree_contract where is_deleted = 0 and contract_id = " + removeNode.getContractId() + " and ancestors like '%" + removeNode.getId() + "%'", new BeanPropertyRowMapper<>(WbsTreeContract.class));
|
|
@@ -2779,6 +2779,13 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
|
|
|
//获取pKeyId
|
|
|
List<Long> removeList = removeNodeList.stream().map(WbsTreeContract::getPKeyId).distinct().collect(Collectors.toList());
|
|
|
+
|
|
|
+ /** 判断是否子节点有上报或审批过的资料,因为父id和祖级节点错误,直接使用上面的值去查询上报情况*/
|
|
|
+ List<InformationQuery> list = informationQueryService.selectChildrenNodeInfo(removeList);
|
|
|
+ if (list != null && list.size() >= 1) {
|
|
|
+ return R.data(300, false, "存在已经上报或审批的节点,不允许删除");
|
|
|
+ }
|
|
|
+
|
|
|
//拼接
|
|
|
ids = ids + "," + String.join(",", JSONArray.parseArray(JSONObject.toJSONString(removeList), String.class));
|
|
|
//删除掉表格 TODO(不清楚为什么要剔除表格,按理说删除节点后,节点下的表也应该一起删除的,猜测或许是为了方便恢复节点的时候表数据还存在)2023年9月19日
|