@@ -81,16 +81,16 @@ public class ResourceBigController extends BaseController { | |||||
@GetMapping("/homepageStatistics") | @GetMapping("/homepageStatistics") | ||||
public AjaxResult homepageStatistics() { | public AjaxResult homepageStatistics() { | ||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); | LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); | ||||
Object statisticVOMap = redisCache.getCacheObject(CacheConstants.BIG_DATA_RESOURCE_KEY+"homepageStatistics" + loginUser.getUser().getUserName()); | |||||
if (Objects.nonNull(statisticVOMap)) { | |||||
return AjaxResult.success(statisticVOMap); | |||||
} | |||||
// Object statisticVOMap = redisCache.getCacheObject(CacheConstants.BIG_DATA_RESOURCE_KEY+"homepageStatistics" + loginUser.getUser().getUserName()); | |||||
// if (Objects.nonNull(statisticVOMap)) { | |||||
// return AjaxResult.success(statisticVOMap); | |||||
// } | |||||
List<TBigDataScreen> list = tResourceLandService.progressResourceInvestigationStatistics(loginUser.getUser().getDeptId());//资源调查进度统计 | List<TBigDataScreen> list = tResourceLandService.progressResourceInvestigationStatistics(loginUser.getUser().getDeptId());//资源调查进度统计 | ||||
TBigDataScreen tBigDataScreen = tResourceLandService.homepageDownStatistics(loginUser.getUser().getDeptId());//首页下面统计 | TBigDataScreen tBigDataScreen = tResourceLandService.homepageDownStatistics(loginUser.getUser().getDeptId());//首页下面统计 | ||||
Map map = new HashMap(); | Map map = new HashMap(); | ||||
map.put("progressResourceInvestigation",list); | map.put("progressResourceInvestigation",list); | ||||
map.put("homepageStatistics",tBigDataScreen); | map.put("homepageStatistics",tBigDataScreen); | ||||
redisCache.setCacheObject(CacheConstants.BIG_DATA_RESOURCE_KEY+"homepageStatistics" + loginUser.getUser().getUserName(), map, expireTime, TimeUnit.MINUTES); | |||||
// redisCache.setCacheObject(CacheConstants.BIG_DATA_RESOURCE_KEY+"homepageStatistics" + loginUser.getUser().getUserName(), map, expireTime, TimeUnit.MINUTES); | |||||
return AjaxResult.success(map); | return AjaxResult.success(map); | ||||
} | } | ||||
@@ -22,34 +22,46 @@ public class TBigDataScreen | |||||
/** 部门名称 */ | /** 部门名称 */ | ||||
private String deptName; | private String deptName; | ||||
/** 统计数量1 首页上 资源调查进度统计 - */ | |||||
/** 统计数量1 */ | |||||
/** 首页上 资源调查进度统计 - 待调查总数*/ | |||||
/** 首页下 地块总数*/ | |||||
private String dataNum1; | private String dataNum1; | ||||
/** 统计数量2 */ | |||||
/** 统计数量2*/ | |||||
/** 首页上 资源调查进度统计 - 已调查总数*/ | |||||
/** 首页下 待调查总数*/ | |||||
private String dataNum2; | private String dataNum2; | ||||
/** 统计数量3 */ | /** 统计数量3 */ | ||||
/** 首页下 已调查总数*/ | |||||
private String dataNum3; | private String dataNum3; | ||||
/** 统计数量4 */ | /** 统计数量4 */ | ||||
/** 首页下 地块总面积*/ | |||||
private String dataNum4; | private String dataNum4; | ||||
/** 统计数量5 */ | /** 统计数量5 */ | ||||
/** 首页下 机动地总面积*/ | |||||
private String dataNum5; | private String dataNum5; | ||||
/** 统计数量6 */ | /** 统计数量6 */ | ||||
/** 首页下 承包总金额*/ | |||||
private String dataNum6; | private String dataNum6; | ||||
/** 统计数量7 */ | /** 统计数量7 */ | ||||
/** 首页下 兑现总金额*/ | |||||
private String dataNum7; | private String dataNum7; | ||||
/** 统计数量8 */ | /** 统计数量8 */ | ||||
/** 首页下 尚欠总金额*/ | |||||
private String dataNum8; | private String dataNum8; | ||||
/** 统计数量9 */ | /** 统计数量9 */ | ||||
/** 首页下 经营总面积*/ | |||||
private String dataNum9; | private String dataNum9; | ||||
/** 统计数量10 */ | /** 统计数量10 */ | ||||
/** 首页下 年总收益*/ | |||||
private String dataNum10; | private String dataNum10; | ||||
} | } |
@@ -345,7 +345,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||
SUM(CASE WHEN l.survey_status = '1' THEN 1 ELSE 0 END) AS data_num1, | SUM(CASE WHEN l.survey_status = '1' THEN 1 ELSE 0 END) AS data_num1, | ||||
SUM(CASE WHEN l.survey_status = '2' THEN 1 ELSE 0 END) AS data_num2 | SUM(CASE WHEN l.survey_status = '2' THEN 1 ELSE 0 END) AS data_num2 | ||||
FROM sys_dept d | FROM sys_dept d | ||||
LEFT JOIN t_resource_land l ON l.import_code LIKE concat(d.import_code, '%') WHERE d.parent_id = #{deptId} | |||||
LEFT JOIN t_resource_land l ON l.import_code LIKE CONCAT(d.import_code, '%') WHERE d.parent_id = #{deptId} | |||||
GROUP BY d.dept_id, d.dept_name ORDER BY d.dept_id | GROUP BY d.dept_id, d.dept_name ORDER BY d.dept_id | ||||
</select> | </select> | ||||
@@ -364,7 +364,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||
SUM( o.JYMJ ) AS data_num9,#经营总面积 | SUM( o.JYMJ ) AS data_num9,#经营总面积 | ||||
SUM( o.NSY ) AS data_num10#年总收益 | SUM( o.NSY ) AS data_num10#年总收益 | ||||
FROM sys_dept d | FROM sys_dept d | ||||
LEFT JOIN t_resource_land l ON l.import_code LIKE concat( d.import_code, '%' ) | |||||
LEFT JOIN t_resource_land l ON l.import_code LIKE CONCAT( d.import_code, '%' ) | |||||
LEFT JOIN t_resource_operation o ON l.DKBM = o.DKBM WHERE d.dept_id = #{deptId} | LEFT JOIN t_resource_operation o ON l.DKBM = o.DKBM WHERE d.dept_id = #{deptId} | ||||
</select> | </select> | ||||
</mapper> | </mapper> |