From c06fab29ca7826a6dc9736c1ba8ce1e26a11c829 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期四, 06 三月 2025 15:57:08 +0800
Subject: [PATCH] 新增层级结构工艺规程版本、结构树表、新权限表 修改原有权限验证 删除原有代码

---
 lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcProductionServiceImpl.java |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcProductionServiceImpl.java b/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcProductionServiceImpl.java
index 2ca696b..9b7711e 100644
--- a/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcProductionServiceImpl.java
+++ b/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/MdcProductionServiceImpl.java
@@ -1,5 +1,6 @@
 package org.jeecg.modules.system.service.impl;
 
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -196,6 +197,15 @@
     }
 
     /**
+     * 閫掑綊鏌ヨ鎵�鏈夊瓙鑺傜偣
+     */
+    @Override
+    public List<MdcProduction> recursionChildrenByPid(String pid){
+        List<String> ids=this.recursionChildren(pid);
+        return super.list(new LambdaQueryWrapper<MdcProduction>().eq(MdcProduction::getDelFlag, CommonConstant.DEL_FLAG_0.toString()).in(MdcProduction::getId, ids));
+    }
+
+    /**
      * 鏍规嵁鐢ㄦ埛id鑾峰彇浜х嚎涓嬫媺鏍戦�夐」
      */
     @Override
@@ -359,4 +369,33 @@
         }
         return stringList;
     }
+
+    /**
+     * 鑾峰彇鐢ㄦ埛宸插垎閰嶇殑閮ㄩ棬鍒楄〃
+     * @param userId
+     * @return
+     */
+     @Override
+     public Map<String, MdcProduction> getUserAssignedDepart(String userId){
+         if(StrUtil.isEmpty(userId))
+             return null;
+         List<MdcProduction> userPermDepart = this.baseMapper.findAllProductionId(userId);
+         if(userPermDepart == null || userPermDepart.isEmpty())
+             return null;
+         Map<String, MdcProduction> map = new HashMap<>();
+         userPermDepart.forEach(item -> {
+             map.put(item.getId(), item);
+         });
+         return map;
+    }
+
+    /**
+     * 閫氳繃涓�缁刬d鑾峰彇閮ㄩ棬
+     * @param ids
+     * @return
+     */
+    @Override
+    public List<String> findAllProductionIds(List<String> ids){
+        return this.baseMapper.recursionChildrenByList(ids);
+    }
 }

--
Gitblit v1.9.3