LIVE_YE 2 jaren geleden
bovenliggende
commit
7e763caa33

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fgw/FgwJdapController.java

@@ -81,7 +81,7 @@ public class FgwJdapController extends BaseController
     /**
      * 修改发改委_节点安排
      */
-    @PreAuthorize("@ss.hasPermi('fgw:jdap:edit')")
+    //@PreAuthorize("@ss.hasPermi('fgw:jdap:edit')")
     @Log(title = "发改委_节点安排", businessType = BusinessType.UPDATE)
     @PostMapping("/put")
     public AjaxResult edit(@RequestBody FgwJdap fgwJdap)
@@ -140,7 +140,7 @@ public class FgwJdapController extends BaseController
     /**
      * 删除发改委_节点安排
      */
-    @PreAuthorize("@ss.hasPermi('fgw:jdap:remove')")
+    //@PreAuthorize("@ss.hasPermi('fgw:jdap:remove')")
     @Log(title = "发改委_节点安排", businessType = BusinessType.DELETE)
 	@GetMapping("/delete/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)

+ 10 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java

@@ -55,6 +55,16 @@ public class SysDeptController extends BaseController
         return AjaxResult.success(deptService.buildDeptTreeSelect(depts));
     }
 
+    /**
+     * 获取部门下拉树列表(发改委使用)
+     */
+    @GetMapping("/fgw/treeselect")
+    public AjaxResult fgwTreeselect(SysDept dept)
+    {
+        List<SysDept> depts = deptService.selectDeptFgwList(dept);
+        return AjaxResult.success(deptService.buildDeptTreeSelect(depts));
+    }
+
     /**
      * 加载对应角色部门列表树
      */

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java

@@ -115,4 +115,6 @@ public interface SysDeptMapper
      * @return 结果
      */
     public int deleteDeptById(Long deptId);
+
+    List<SysDept> selectDeptFgwList(SysDept dept);
 }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java

@@ -121,4 +121,6 @@ public interface ISysDeptService
      * @return 结果
      */
     public int deleteDeptById(Long deptId);
+
+    List<SysDept> selectDeptFgwList(SysDept dept);
 }

+ 5 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java

@@ -298,6 +298,11 @@ public class SysDeptServiceImpl implements ISysDeptService
         return deptMapper.deleteDeptById(deptId);
     }
 
+    @Override
+    public List<SysDept> selectDeptFgwList(SysDept dept) {
+        return deptMapper.selectDeptFgwList(dept);
+    }
+
     /**
      * 递归列表
      */

+ 12 - 6
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/fgw/FgwCommonServiceImpl.java

@@ -105,15 +105,21 @@ public class FgwCommonServiceImpl implements IFgwCommonService {
 
         }
         //预警项目
-        List<FgwDbd> fgwDbdList = fgwDbdMapper.selectFgwDbdYjxmNum();
-        if (fgwDbdList != null && fgwDbdList.size() > 0) {
-            map.put("yjxm", fgwDbdList.size());
+        //查询预警配置时间
+        FgwYjpz fgwYjpz = fgwYjpzMapper.selectFgwYjpzNew();
+        if(fgwYjpz==null){
+            fgwYjpz = new FgwYjpz();
+            fgwYjpz.setYzcqts(7L);
+        }
+        List<FgwJdap> fgwJdapList = fgwJdapMapper.selectFgwJdapNum(fgwYjpz.getYjts());
+        if (fgwJdapList != null && fgwJdapList.size() > 0) {
+            map.put("yjxm", fgwJdapList.size());
         }
 
         //超期项目
-        List<FgwDbd> fgwDbdListCq = fgwDbdMapper.selectFgwDbdCqxmNum();
-        if (fgwDbdListCq != null && fgwDbdListCq.size() > 0) {
-            map.put("cqxm", fgwDbdListCq.size());
+        List<FgwJdap> fgwJdapCqList = fgwJdapMapper.selectFgwJdapCqxmNum();
+        if (fgwJdapCqList != null && fgwJdapCqList.size() > 0) {
+            map.put("cqxm", fgwJdapCqList.size());
         }
 
         ZsyzSbbzb zsyzSbbzb = new ZsyzSbbzb();

+ 19 - 2
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -86,8 +86,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	    <include refid="selectDeptVo"/>
 		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
 	</select>
-    
-    <insert id="insertDept" parameterType="SysDept">
+	<select id="selectDeptFgwList" resultMap="SysDeptResult">
+		<include refid="selectDeptVo"/>
+		where d.del_flag = '0'
+		<if test="deptId != null and deptId != 0">
+			AND dept_id = #{deptId}
+		</if>
+		<if test="parentId != null and parentId != 0">
+			AND find_in_set(#{parentId}, ancestors)
+		</if>
+		<if test="deptName != null and deptName != ''">
+			AND dept_name like concat('%', #{deptName}, '%')
+		</if>
+		<if test="status != null and status != ''">
+			AND status = #{status}
+		</if>
+		order by d.parent_id, d.order_num
+	</select>
+
+	<insert id="insertDept" parameterType="SysDept">
  		insert into sys_dept(
  			<if test="deptId != null and deptId != 0">dept_id,</if>
  			<if test="parentId != null and parentId != 0">parent_id,</if>