From 34892403d4c66bcb0a18c74fcb1d562e1aa681fd Mon Sep 17 00:00:00 2001
From: fengjin <1435304038@qq.com>
Date: 星期四, 17 十一月 2022 16:29:49 +0800
Subject: [PATCH] 1.更改短信平台 从阿里云更新导电信平台 2.系统设置加入提醒字段 3.法律法规 政策文件加入部门验证

---
 flower_city/src/main/java/com/dg/core/controller/AutomessagePolicyDocumentsController.java |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/flower_city/src/main/java/com/dg/core/controller/AutomessagePolicyDocumentsController.java b/flower_city/src/main/java/com/dg/core/controller/AutomessagePolicyDocumentsController.java
index 005855c..f085289 100644
--- a/flower_city/src/main/java/com/dg/core/controller/AutomessagePolicyDocumentsController.java
+++ b/flower_city/src/main/java/com/dg/core/controller/AutomessagePolicyDocumentsController.java
@@ -7,12 +7,14 @@
 import com.dg.core.db.gen.entity.AutomessagePolicyDocuments;
 import com.dg.core.db.gen.entity.SysUser;
 import com.dg.core.service.IAutomessagePolicyDocumentsService;
+import com.dg.core.service.IOrganizationChartService;
 import com.dg.core.util.TableDataInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import lombok.Data;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -25,6 +27,9 @@
 
     @Resource
     private IAutomessagePolicyDocumentsService iAutomessagePolicyDocumentsService;
+
+    @Resource
+    private IOrganizationChartService iOrganizationChartService;
 
     /**
      * 获取法律法规政策文件列表(分页)
@@ -44,8 +49,12 @@
                                           @RequestParam(value = "departmentId",required = false) Integer departmentId,
                                           @CurrentUser SysUser sysUser){
         Page<AutomessagePolicyDocuments> pageParam = new Page<>(pageNum,pageSize);
-        List<AutomessagePolicyDocuments> list = iAutomessagePolicyDocumentsService.selectConfigList(pageParam,pageSize,name,type,sysUser,departmentId);
-        return getDataTable(list,iAutomessagePolicyDocumentsService.selectCountList(name,type,departmentId));
+        List<String> ids=null;
+        if (sysUser!=null&&(sysUser.getUserType().equals("2")||sysUser.getIsDivisionHead().equals("1"))){
+           ids=iOrganizationChartService.getDepartmentId(sysUser.getDepartmentId());
+        }
+        List<AutomessagePolicyDocuments> list = iAutomessagePolicyDocumentsService.selectConfigList(pageParam,pageSize,name,type,sysUser,departmentId,ids);
+        return getDataTable(list,iAutomessagePolicyDocumentsService.selectCountList(name,type,departmentId,ids));
     }
 
     /**
@@ -62,7 +71,7 @@
     public ResultData selectConfigList(@RequestParam(value = "name",required = false) String name,
                                           @RequestParam(value = "type",required = false) String type,
                                        @RequestParam(value = "departmentId",required = false) Integer departmentId){
-        List<AutomessagePolicyDocuments> list = iAutomessagePolicyDocumentsService.selectConfigList(name,type,departmentId);
+        List<AutomessagePolicyDocuments> list = iAutomessagePolicyDocumentsService.selectConfigList(name,type,departmentId,null);
         return  ResultData.success(list);
     }
 

--
Gitblit v1.7.1