浏览代码

fix 修改招商部分问题

Administrator 4 年之前
父节点
当前提交
f71f30b7d3

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/BmDeptPlanAreaController.java

@@ -115,7 +115,7 @@ public class BmDeptPlanAreaController extends BaseController
         if (StringUtils.isBlank(year)){
             year = DateUtils.getYear();
         }
-        List<BmDeptPlanVo> bmDeptPlanVos = bmDeptPlanAreaService.selectAreaList(year);
-        return getDataTable(bmDeptPlanVos);
+        List<BmDeptPlanArea> bmDeptPlanAreaList = bmDeptPlanAreaService.selectAreaList(year);
+        return getDataTable(bmDeptPlanAreaList);
     }
 }

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

@@ -110,8 +110,8 @@ public class BmDeptPlanController extends BaseController {
         if (StringUtils.isBlank(year)){
             year = DateUtils.getYear();
         }
-        List<BmDeptPlanVo> bmDeptPlanVos = bmDeptPlanService.selectUnitList(year);
-        return getDataTable(bmDeptPlanVos);
+        List<BmDeptPlan> bmDeptPlanList = bmDeptPlanService.selectUnitList(year);
+        return getDataTable(bmDeptPlanList);
     }
 
     /**

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

@@ -67,5 +67,5 @@ public interface BmDeptPlanAreaMapper
      * 两区及乡镇榜单
      * @return
      */
-    public List<BmDeptPlanVo> selectAreaList(@Param("year") String year);
+    public List<BmDeptPlanArea> selectAreaList(@Param("year") String year);
 }

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

@@ -67,7 +67,7 @@ public interface BmDeptPlanMapper
      * 首页-市值榜单
      * @return
      */
-    public List<BmDeptPlanVo> selectUnitList(@Param("year") String year);
+    public List<BmDeptPlan> selectUnitList(@Param("year") String year);
 
 
 

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

@@ -101,8 +101,8 @@ public class BmDeptPlanAreaServiceImpl implements IBmDeptPlanAreaService
      * @return
      */
     @Override
-    public List<BmDeptPlanVo> selectAreaList(String year) {
-        List<BmDeptPlanVo> bmDeptPlanVos = bmDeptPlanAreaMapper.selectAreaList(year);
-        return bmDeptPlanVos;
+    public List<BmDeptPlanArea> selectAreaList(String year) {
+        List<BmDeptPlanArea> BmDeptPlanAreaList = bmDeptPlanAreaMapper.selectAreaList(year);
+        return BmDeptPlanAreaList;
     }
 }

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

@@ -105,13 +105,13 @@ public class BmDeptPlanServiceImpl implements IBmDeptPlanService
     }
 
     /**
-     * 首页-单位榜单
+     * 首页-两区及乡镇
      * @return
      */
     @Override
-    public List<BmDeptPlanVo> selectUnitList(String year) {
-        List<BmDeptPlanVo> bmDeptPlanVos = bmDeptPlanMapper.selectUnitList(year);
-        return bmDeptPlanVos;
+    public List<BmDeptPlan> selectUnitList(String year) {
+        List<BmDeptPlan> bmDeptPlanList = bmDeptPlanMapper.selectUnitList(year);
+        return bmDeptPlanList;
     }
 
 

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

@@ -65,5 +65,5 @@ public interface IBmDeptPlanAreaService
      * 两区及乡镇榜单
      * @return
      */
-    public List<BmDeptPlanVo> selectAreaList(String year);
+    public List<BmDeptPlanArea> selectAreaList(String year);
 }

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

@@ -67,7 +67,7 @@ public interface IBmDeptPlanService
      * 首页-单位榜单
      * @return
      */
-    public List<BmDeptPlanVo> selectUnitList(String year);
+    public List<BmDeptPlan> selectUnitList(String year);
 
 
     /**

+ 4 - 7
ruoyi-system/src/main/resources/mapper/system/project/BmDeptPlanAreaMapper.xml

@@ -166,12 +166,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </delete>
 
-    <select id="selectAreaList"  resultType="com.ruoyi.system.domain.vo.BmDeptPlanVo">
-		select a.project_million_num, a.project_city_money, a.project_pro_num,  d.dept_name
+    <select id="selectAreaList"  resultMap="BmDeptPlanAreaResult">
+		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
-		left join sys_dept d on a.sys_dept_id = d.dept_id
-		where
-		a.is_del = '0'
-		and a.year = #{year}
+		right join sys_dept d on a.sys_dept_id = d.dept_id and a.is_del = '0' and a.year = #{year}
     </select>
-</mapper>
+        </mapper>

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

@@ -99,11 +99,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
 
-    <select id="selectUnitList" parameterType="String"  resultType="com.ruoyi.system.domain.vo.BmDeptPlanVo">
-		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
-		where
-		p.is_del = '0'
-		and p.year = #{year}
+    <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}
     </select>
 
 

+ 1 - 1
ruoyi-ui/src/api/statistical/index.js

@@ -4,7 +4,7 @@ import request  from '@/utils/request'
 export function getIndexEharts(query) {
   return request({
     url: '/bmProject/project/projectEharts',
-    method: 'get',
+    method: 'post',
     params: query
   })
 }

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

@@ -135,6 +135,7 @@
       },
       bd_btn() {
         getUnitList().then(res =>{
+          console.log(res)
           this.unitList = res.rows
         })
       },