lyh
2025-01-23 8d63dd77b9b3cd9b6d9768f216670fc499a8cab3
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/ProductInfoController.java
@@ -16,6 +16,8 @@
import org.jeecg.modules.dnc.service.IProductInfoService;
import org.jeecg.modules.dnc.ucenter.Department;
import org.jeecg.modules.dnc.ucenter.UserDepartExt;
import org.jeecg.modules.dnc.utils.ValidateUtil;
import org.jeecg.modules.system.entity.MdcProduction;
import org.jeecg.modules.system.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -59,7 +61,7 @@
    public QueryListResponseResult<CommonGenericTree> loadProductTree() {
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String userId = user.getId();
        if(!StrUtil.isEmpty(userId))
        if(!ValidateUtil.validateString(userId))
            return new QueryListResponseResult<>(CommonCode.SUCCESS, Collections.emptyList());
        List<CommonGenericTree> list = productInfoService.loadProductTree(userId);
        if(list == null)
@@ -73,7 +75,7 @@
    public QueryListResponseResult<CommonGenericTree> loadBaseTree() {
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String userId = user.getId();
        if(!StrUtil.isEmpty(userId))
        if(!ValidateUtil.validateString(userId))
            return new QueryListResponseResult<>(CommonCode.SUCCESS, Collections.emptyList());
        List<CommonGenericTree> list = productInfoService.loadBaseTree(userId);
        if(list == null)
@@ -87,7 +89,7 @@
    public QueryListResponseResult<CommonGenericTree> loadTree(@PathVariable("nodeType") Integer nodeType, @PathVariable("paramId") String paramId) {
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String userId = user.getId();
        if(!StrUtil.isEmpty(userId))
        if(!ValidateUtil.validateString(userId))
            return new QueryListResponseResult<>(CommonCode.SUCCESS, Collections.emptyList());
        List<CommonGenericTree> list = productInfoService.loadTree(userId, nodeType, paramId);
        if(list == null)
@@ -141,8 +143,8 @@
    @AutoLog(value = "产品表-获取已分配的部门")
    @ApiOperation(value = "产品表-获取已分配的部门", notes = "产品表-获取已分配的部门")
    @GetMapping("/get/perm/depart/{nodeType}/{paramId}")
    public QueryListResponseResult<Department> getDepartPermsList(@PathVariable("nodeType") Integer nodeType, @PathVariable("paramId")  String paramId) {
        List<Department> list = productInfoService.getDepartPermsList(nodeType, paramId);
    public QueryListResponseResult<MdcProduction> getDepartPermsList(@PathVariable("nodeType") Integer nodeType, @PathVariable("paramId")  String paramId) {
        List<MdcProduction> list = productInfoService.getDepartPermsList(nodeType, paramId);
        if(list == null)
            list = Collections.emptyList();
        return new QueryListResponseResult(CommonCode.SUCCESS, list);
@@ -151,8 +153,8 @@
    @AutoLog(value = "产品表-获取未分配的部门")
    @ApiOperation(value = "产品表-获取未分配的部门", notes = "产品表-获取未分配的部门")
    @GetMapping("/get/non/perm/depart/{nodeType}/{paramId}")
    public QueryListResponseResult<Department> getDepartNonPermsList(@PathVariable("nodeType") Integer nodeType, @PathVariable("paramId")  String paramId) {
        List<Department> list = productInfoService.getDepartNonPermsList(nodeType, paramId);
    public QueryListResponseResult<MdcProduction> getDepartNonPermsList(@PathVariable("nodeType") Integer nodeType, @PathVariable("paramId")  String paramId) {
        List<MdcProduction> list = productInfoService.getDepartNonPermsList(nodeType, paramId);
        if(list == null)
            list = Collections.emptyList();
        return new QueryListResponseResult(CommonCode.SUCCESS, list);
@@ -245,7 +247,7 @@
    public QueryListResponseResult<CommonGenericTree> searchProductTree(String queryParam) {
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        String userId = user.getId();
        if(!StrUtil.isEmpty(userId))
        if(!ValidateUtil.validateString(userId))
            return new QueryListResponseResult<>(CommonCode.SUCCESS, Collections.emptyList());
        List<CommonGenericTree> list = productInfoService.searchProductTree(userId,  queryParam);
        if(list == null)