Parcourir la source

fix 修改招商部分问题

Administrator il y a 4 ans
Parent
commit
84ead3afe1

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/BmDeptPlanController.java

@@ -171,7 +171,7 @@ public class BmDeptPlanController extends BaseController {
      * 统计分析-在建项目-柱状图
      */
     @PostMapping("/projectUnitAmountEharts")
-    public AjaxResult projectUnitAmountEharts( String year) {
+    public AjaxResult projectUnitAmountEharts(String year) {
         if (StringUtils.isBlank(year)){
             year = DateUtils.getYear();
         }

+ 19 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/BmProjectController.java

@@ -185,7 +185,25 @@ public class BmProjectController extends BaseController {
     @GetMapping("/statistics/{projectStatus}")
     public TableDataInfo statisticsList(@PathVariable Long[] projectStatus) {
         startPage();
-        List<BmProject> list = bmProjectService.selectStatisticsList(projectStatus);
+        LoginUser loginUser = SecurityUtils.getLoginUser();
+        Long deptId = -1L;
+        if (ObjectUtil.isNotNull(loginUser)){
+            List<SysRole> roles = loginUser.getUser().getRoles();
+            boolean flag = false;
+            if (roles.size() > 0){
+                for (SysRole role : roles) {
+                    String roleKey = role.getRoleKey();
+                    if (StringUtils.isNotBlank(roleKey) && ("manage".equals(roleKey)||"admin".equals(roleKey))){
+                        flag = true;
+                        break;
+                    }
+                }
+            }
+            if (!flag){
+                deptId = loginUser.getUser().getDeptId();
+            }
+        }
+        List<BmProject> list = bmProjectService.selectStatisticsList(projectStatus,deptId);
         return getDataTable(list);
     }
 

+ 1 - 1
ruoyi-admin/src/main/resources/application.yml

@@ -44,7 +44,7 @@ spring:
     # 国际化资源文件路径
     basename: i18n/messages
   profiles:
-    active: prod
+    active: druid
   # 文件上传
   servlet:
      multipart:

+ 3 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/project/BmProjectMapper.java

@@ -70,12 +70,14 @@ public interface BmProjectMapper
      */
     public int deleteBmProjectByIds(Long[] ids);
 
+
     /**
      * 统计分析公共查询列表
+     * @param deptId
      * @param ids
      * @return
      */
-    public List<BmProject> selectStatisticsList(Long[] ids);
+    public List<BmProject> selectStatisticsList(@Param("deptId")Long deptId, @Param("ids") Long[] ids);
 
     /**
      * 统计分析-在谈线索-柱状图

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/project/BmDeptPlanAreaServiceImpl.java

@@ -97,7 +97,7 @@ public class BmDeptPlanAreaServiceImpl implements IBmDeptPlanAreaService
     }
 
     /**
-     * 两区及乡镇榜单
+     * 首页 -两区及乡镇榜单
      * @return
      */
     @Override

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/project/BmDeptPlanServiceImpl.java

@@ -105,7 +105,7 @@ public class BmDeptPlanServiceImpl implements IBmDeptPlanService
     }
 
     /**
-     * 首页-两区及乡镇
+     * 首页-市直榜单
      * @return
      */
     @Override

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/project/BmProjectServiceImpl.java

@@ -310,8 +310,8 @@ public class BmProjectServiceImpl implements IBmProjectService {
      * @return
      */
     @Override
-    public List<BmProject> selectStatisticsList(Long[] ids) {
-        List<BmProject> bmProjects = bmProjectMapper.selectStatisticsList(ids);
+    public List<BmProject> selectStatisticsList(Long[] ids,Long deptId) {
+        List<BmProject> bmProjects = bmProjectMapper.selectStatisticsList(deptId,ids);
         return bmProjects;
     }
 

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/project/IBmDeptPlanService.java

@@ -64,7 +64,7 @@ public interface IBmDeptPlanService
     public int deleteBmDeptPlanById(Long id);
 
     /**
-     * 首页-单位榜单
+     * 首页-市直榜单
      * @return
      */
     public List<BmDeptPlan> selectUnitList(String year);

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/project/IBmProjectService.java

@@ -84,7 +84,7 @@ public interface IBmProjectService
      * @param ids
      * @return
      */
-   public List<BmProject> selectStatisticsList(Long[] ids);
+   public List<BmProject> selectStatisticsList(Long[] ids,Long deptId);
 
     /**
      * 统计分析-在谈线索-柱状图

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/project/BmDeptPlanAreaMapper.xml

@@ -171,5 +171,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		select ifnull(a.project_million_num,0) as project_million_num, ifnull(a.project_city_money,0) as project_city_money, ifnull(a.project_pro_num,0) as project_pro_num,  d.dept_name
 		from bm_dept_plan_area a
 		right join sys_dept d on a.sys_dept_id = d.dept_id and a.is_del = '0' and a.year = #{year}
+		where d.parent_id = 105
     </select>
         </mapper>

+ 1 - 1
ruoyi-system/src/main/resources/mapper/system/project/BmDeptPlanMapper.xml

@@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectUnitList" parameterType="string"  resultMap="BmDeptPlanResult">
 		select ifnull(p.target_contract_amount,0) as target_contract_amount , ifnull(p.target_arrival_amount,0) as target_arrival_amount, d.dept_name
-		from bm_dept_plan p right join sys_dept d on p.sys_dept_id = d.dept_id and p.is_del = '0' and p.year = #{year}
+		from bm_dept_plan p right join sys_dept d on p.sys_dept_id = d.dept_id and p.is_del = '0' and p.year = #{year} where d.parent_id = 124
     </select>
 
 

+ 6 - 3
ruoyi-system/src/main/resources/mapper/system/project/BmProjectMapper.xml

@@ -206,12 +206,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
 
-    <select id="selectStatisticsList" resultMap="BmProjectResult">
+    <select id="selectStatisticsList"  resultMap="BmProjectResult">
         <include refid="selectBmProjectVo"></include>
-        where is_del = '0' and project_status in
-        <foreach item="id" collection="array" open="(" separator="," close=")">
+        <where> is_del = '0'
+        <if test="deptId != -1">and dept_id = #{deptId}</if>
+        and project_status in
+        <foreach item="id" collection="ids" open="(" separator="," close=")">
             #{id}
         </foreach>
+        </where>
         order by create_time DESC
     </select>
 

+ 69 - 64
ruoyi-ui/src/components/Echarts/index.vue

@@ -1,12 +1,12 @@
-<template>
-  <div class="Echarts">
-    <div id="main" style="width:100%; height:600px;"></div>
-  </div>
-</template>
-
+<template>
+  <div class="Echarts">
+    <div id="main" style="width:100%; height:600px;"></div>
+  </div>
+</template>
+
 <script>
-  require('echarts/lib/component/legend')
-  export default {
+  require('echarts/lib/component/legend')
+  export default {
     name: 'Echarts',
     props:{
       echartData: {
@@ -31,67 +31,72 @@
       ehaersLists() {
         return this.ehaersList
       }
-    },
-    methods: {
-      myEcharts(datas={x:'',y:''}) {
-        // 基于准备好的dom,初始化echarts实例
-        var myChart = this.$echarts.init(document.getElementById('main'));
-
-        // 指定图表的配置项和数据
-        var option = {
-          title: {
-            text: this.echartData.name,
+    },
+    methods: {
+      myEcharts(datas={x:'',y:''}) {
+        // 基于准备好的dom,初始化echarts实例
+        var myChart = this.$echarts.init(document.getElementById('main'));
+
+        // 指定图表的配置项和数据
+        var option = {
+          title: {
+            text: this.echartData.name,
             top: 0,
-            left: 'center',
-            subtextStyle: {
-              fontFamily: "微软雅黑",
-              fontSize: 14,
-              color: '#6c7a89',
-            }
-          },
-          tooltip: {},
-          legend: {
+            left: 'center',
+            subtextStyle: {
+              fontFamily: "微软雅黑",
+              fontSize: 14,
+              color: '#6c7a89',
+            }
+          },
+          tooltip: {},
+          legend: {
             data: this.echartData.numNameArr,
-            top: 25,
-          },
-          xAxis: {
-            data: this.ehaersLists.x,
-          },
-          yAxis: {},
-          series: [{
-            name: this.echartData.numName,
-            type: 'bar',
-            data: this.ehaersLists.y,
-            itemStyle: {
-              normal: {
-                color: '#1C84C6', //设置柱子颜色
-                label: {
-                  show: true, //柱子上显示值
-                  position: 'top', //值在柱子上方显示
-                  textStyle: {
-                    color: '#333' //值得颜色
-                  }
-                }
-              }
-            },
-          }]
-        };
-
-        // 使用刚指定的配置项和数据显示图表。
+            top: 25,
+          },
+          xAxis: {
+            data: this.ehaersLists.x,
+            axisLabel : {
+              formatter: function(){
+                return "";
+              }
+            }
+          },
+          yAxis: {},
+          series: [{
+            name: this.echartData.numName,
+            type: 'bar',
+            data: this.ehaersLists.y,
+            itemStyle: {
+              normal: {
+                color: '#1C84C6', //设置柱子颜色
+                label: {
+                  show: true, //柱子上显示值
+                  position: 'top', //值在柱子上方显示
+                  textStyle: {
+                    color: '#333' //值得颜色
+                  }
+                }
+              }
+            },
+          }]
+        };
+
+        // 使用刚指定的配置项和数据显示图表。
         myChart.setOption(option);
         setTimeout(function (){
         	    window.onresize = function () {
         	    	myChart.resize();
         	    }
-        	},200)
-      }
-    },
-    mounted() {
-      this.myEcharts();
-    }
-  }
-</script>
-
-<style>
-
+        	},200)
+      }
+    },
+    mounted() {
+      this.myEcharts();
+    }
+  }
+</script>
+
+<style>
+
 </style>

+ 85 - 80
ruoyi-ui/src/components/Echarts/indexTwo.vue

@@ -1,12 +1,12 @@
-<template>
-  <div class="Echarts">
-    <div id="main" style="width:100%; height:600px;"></div>
-  </div>
-</template>
-
+<template>
+  <div class="Echarts">
+    <div id="main" style="width:100%; height:600px;"></div>
+  </div>
+</template>
+
 <script>
-  require('echarts/lib/component/legend')
-  export default {
+  require('echarts/lib/component/legend')
+  export default {
     name: 'Echarts',
     props:{
       echartData: {
@@ -31,83 +31,88 @@
       ehaersLists() {
         return this.ehaersList
       }
-    },
-    methods: {
-      myEcharts(datas={x:'',y:''}) {
-        // 基于准备好的dom,初始化echarts实例
-        var myChart = this.$echarts.init(document.getElementById('main'));
-
-        // 指定图表的配置项和数据
-        var option = {
-          title: {
-            text: this.echartData.name,
+    },
+    methods: {
+      myEcharts(datas={x:'',y:''}) {
+        // 基于准备好的dom,初始化echarts实例
+        var myChart = this.$echarts.init(document.getElementById('main'));
+
+        // 指定图表的配置项和数据
+        var option = {
+          title: {
+            text: this.echartData.name,
             top: 0,
-            left: 'center',
-            subtextStyle: {
-              fontFamily: "微软雅黑",
-              fontSize: 14,
-              color: '#6c7a89',
-            }
-          },
-          tooltip: {},
-          legend: {
+            left: 'center',
+            subtextStyle: {
+              fontFamily: "微软雅黑",
+              fontSize: 14,
+              color: '#6c7a89',
+            }
+          },
+          tooltip: {},
+          legend: {
             data: this.echartData.numNameArr,
-            top: 25,
-          },
-          xAxis: {
-            data: this.ehaersLists.x,
-          },
-          yAxis: {},
-          series: [{
-            name: this.echartData.numName[0],
-            type: 'bar',
-            data: this.ehaersLists.y1,
-            itemStyle: {
-              normal: {
-                color: '#1C84C6', //设置柱子颜色
-                label: {
-                  show: true, //柱子上显示值
-                  position: 'top', //值在柱子上方显示
-                  textStyle: {
-                    color: '#333' //值得颜色
-                  }
-                }
-              }
-            },
-          },{
-            name: this.echartData.numName[1],
-            type: 'bar',
-            data: this.ehaersLists.y2,
-            itemStyle: {
-              normal: {
-                color: '#FEA908', //设置柱子颜色
-                label: {
-                  show: true, //柱子上显示值
-                  position: 'top', //值在柱子上方显示
-                  textStyle: {
-                    color: '#333' //值得颜色
-                  }
-                }
-              }
-            },
-          }]
-        };
-
-        // 使用刚指定的配置项和数据显示图表。
+            top: 25,
+          },
+          xAxis: {
+            data: this.ehaersLists.x,
+            axisLabel : {
+              formatter: function(){
+                return "";
+              }
+            }
+          },
+          yAxis: {},
+          series: [{
+            name: this.echartData.numName[0],
+            type: 'bar',
+            data: this.ehaersLists.y1,
+            itemStyle: {
+              normal: {
+                color: '#1C84C6', //设置柱子颜色
+                label: {
+                  show: true, //柱子上显示值
+                  position: 'top', //值在柱子上方显示
+                  textStyle: {
+                    color: '#333' //值得颜色
+                  }
+                }
+              }
+            },
+          },{
+            name: this.echartData.numName[1],
+            type: 'bar',
+            data: this.ehaersLists.y2,
+            itemStyle: {
+              normal: {
+                color: '#FEA908', //设置柱子颜色
+                label: {
+                  show: true, //柱子上显示值
+                  position: 'top', //值在柱子上方显示
+                  textStyle: {
+                    color: '#333' //值得颜色
+                  }
+                }
+              }
+            },
+          }]
+        };
+
+        // 使用刚指定的配置项和数据显示图表。
         myChart.setOption(option);
         setTimeout(function (){
         	    window.onresize = function () {
         	    	myChart.resize();
         	    }
-        	},200)
-      }
-    },
-    mounted() {
-      this.myEcharts();
-    }
-  }
-</script>
-
-<style>
-
+        	},200)
+      }
+    },
+    mounted() {
+      this.myEcharts();
+    }
+  }
+</script>
+
+<style>
+
 </style>

+ 4 - 4
ruoyi-ui/src/settings.js

@@ -1,7 +1,7 @@
 module.exports = {
   title: '招商引资管理系统',
-  urls: 'http://47.99.82.249:80',
-  // urls: 'http://192.168.101.11:8010',
+  // urls: 'http://47.99.82.249:80',
+  urls: 'http://192.168.101.11:8010',
 
   /**
    * 侧边栏主题 深色主题theme-dark,浅色主题theme-light
@@ -35,6 +35,6 @@ module.exports = {
    * If you want to also use it in dev, you can pass ['production', 'development']
    */
   errorLog: 'production',
-  // apiUrl: 'http://192.168.101.11:8010'
-  apiUrl: 'http://47.99.82.249:80'
+  apiUrl: 'http://192.168.101.11:8010'
+  // apiUrl: 'http://47.99.82.249:80'
 }

+ 4 - 0
ruoyi-ui/src/views/index.vue

@@ -64,7 +64,11 @@
               <span>{{item.projectProNum?item.projectProNum:0}}个</span>
             </div>
           </div>
+          <div class="rig_title">
+            市直榜单
+          </div>
           <div class="rig_tab_top" style="background-color: #1C84C6;">
+
             <div class="rig_tab_item">
               单位名称
             </div>

+ 3 - 0
ruoyi-ui/src/views/statistical/sign/index.vue

@@ -53,6 +53,9 @@
               <span>{{item.successMission?item.successMission:0}}个</span>
             </div>
           </div>
+          <div class="rig_title">
+            市直榜单
+          </div>
           <div class="rig_tab_top" style="background-color: #1C84C6;">
             <div class="rig_tab_item">
               单位名称

Fichier diff supprimé car celui-ci est trop grand
+ 875 - 875
ruoyi-ui/src/views/under/index.vue


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff