Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
civil-bigdata
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
civil
civil-bigdata
Commits
8e7fe087
Commit
8e7fe087
authored
Dec 28, 2021
by
wqc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APP残疾页面更改
parent
f227ef93
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
158 additions
and
0 deletions
+158
-0
api-server/src/main/java/com/zq/api/feign/PortalFeign.java
+6
-0
api-server/src/main/java/com/zq/api/service/IApiLogic.java
+16
-0
api-server/src/main/java/com/zq/api/service/impl/ApiV100Logic.java
+10
-0
portal-server/src/main/java/com/zq/portal/controller/app/CjStatsController.java
+14
-0
portal-server/src/main/java/com/zq/portal/dao/CjStatsDao.java
+4
-0
portal-server/src/main/java/com/zq/portal/manager/PortalCacheKeys.java
+9
-0
portal-server/src/main/java/com/zq/portal/service/CjStatsService.java
+73
-0
portal-server/src/main/java/com/zq/portal/vo/StatsVo.java
+8
-0
portal-server/src/main/resources/mapper/CjStatsMapper.xml
+18
-0
No files found.
api-server/src/main/java/com/zq/api/feign/PortalFeign.java
View file @
8e7fe087
...
...
@@ -67,4 +67,10 @@ public interface PortalFeign {
@PostMapping
(
"/stats/getAreaUnderNumStats"
)
ResultVo
getAreaUnderNumStats
(
@RequestBody
Map
<
String
,
Object
>
paramsMap
);
@PostMapping
(
"/stats/getEnjoySubsidyStats"
)
ResultVo
getEnjoySubsidyStats
(
Map
<
String
,
Object
>
paramsMap
);
@PostMapping
(
"/stats/getEnjoySumStatsData"
)
ResultVo
getEnjoySumStatsData
(
Map
<
String
,
Object
>
paramsMap
);
}
api-server/src/main/java/com/zq/api/service/IApiLogic.java
View file @
8e7fe087
...
...
@@ -92,6 +92,22 @@ public interface IApiLogic extends IApiCommon {
ApiResp
getYearDisabledIssueStats
(
ApiForm
form
);
/**
* 获取在享补贴统计
*
* @param form
* @return
*/
ApiResp
getEnjoySubsidyStats
(
ApiForm
form
);
/**
* 获取在享补贴统计
*
* @param form
* @return
*/
ApiResp
getEnjoySumStatsData
(
ApiForm
form
);
/**
* 获取区域社会救助统计列表
*
* @param form
...
...
api-server/src/main/java/com/zq/api/service/impl/ApiV100Logic.java
View file @
8e7fe087
...
...
@@ -91,6 +91,16 @@ public class ApiV100Logic extends BaseApiLogic implements IApiLogic {
}
@Override
public
ApiResp
getEnjoySubsidyStats
(
ApiForm
form
)
{
return
ApiUtils
.
toApiResp
(
form
,
portalFeign
.
getEnjoySubsidyStats
(
form
.
getParamsMap
()));
}
@Override
public
ApiResp
getEnjoySumStatsData
(
ApiForm
form
)
{
return
ApiUtils
.
toApiResp
(
form
,
portalFeign
.
getEnjoySumStatsData
(
form
.
getParamsMap
()));
}
@Override
public
ApiResp
getAreaShjzStats
(
ApiForm
form
)
{
return
ApiUtils
.
toApiResp
(
form
,
portalFeign
.
getAreaShjzStats
(
form
.
getParamsMap
()));
}
...
...
portal-server/src/main/java/com/zq/portal/controller/app/CjStatsController.java
View file @
8e7fe087
...
...
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
@Api
(
tags
=
"残疾统计相关接口"
)
@RequiredArgsConstructor
@RestController
...
...
@@ -39,4 +41,16 @@ public class CjStatsController {
return
ResultVo
.
success
(
cjStatsService
.
getCacheAreaDisabledIssueStats
(
vo
));
}
@ApiOperation
(
"区域在享发放统计"
)
@PostMapping
(
value
=
"/getEnjoySubsidyStats"
)
public
ResultVo
getEnjoySubsidyStats
(
@RequestBody
StatsReqVo
vo
)
{
return
ResultVo
.
success
(
cjStatsService
.
getCacheEnjoySubsidyStats
(
vo
));
}
@ApiOperation
(
"在享发放总数"
)
@PostMapping
(
value
=
"/getEnjoySumStatsData"
)
public
ResultVo
getEnjoySumStats
(
@RequestBody
StatsReqVo
vo
)
{
return
ResultVo
.
success
(
cjStatsService
.
getCacheEnjoySumStatsData
(
vo
));
}
}
portal-server/src/main/java/com/zq/portal/dao/CjStatsDao.java
View file @
8e7fe087
...
...
@@ -69,4 +69,8 @@ public interface CjStatsDao {
List
<
StatsVo
>
getYearIssueStats
(
StatsReqVo
vo
);
List
<
Map
<
String
,
Object
>>
search
(
SearchReqVo
vo
);
List
<
StatsVo
>
getAreaSubsidyStats
(
StatsReqVo
vo
);
List
<
StatsVo
>
getEnjoySumStats
(
StatsReqVo
vo
);
}
portal-server/src/main/java/com/zq/portal/manager/PortalCacheKeys.java
View file @
8e7fe087
...
...
@@ -76,6 +76,10 @@ public abstract class PortalCacheKeys {
return
PREFIX
+
"getAreaDisabledIssueStats."
+
vo
.
getAreaCode
()
+
"."
+
vo
.
getYear
();
}
public
static
String
getEnjoySubsidyStatsKey
(
StatsReqVo
vo
)
{
return
PREFIX
+
"getEnjoySubsidyStats."
+
vo
.
getAreaCode
()
+
"."
+
vo
.
getYear
();
}
// 获取区域养老院统计列表
public
static
String
getAreaNursingStatsListKey
(
StatsReqVo
vo
)
{
return
PREFIX
+
"getAreaNursingStatsList."
+
vo
.
getAreaCode
()
+
"."
+
vo
.
getYear
()
+
"."
+
vo
.
getType
();
...
...
@@ -135,4 +139,9 @@ public abstract class PortalCacheKeys {
public
static
String
getAreaShjzStats
(
StatsReqVo
vo
)
{
return
PREFIX
+
"getAreaShjzStats."
+
vo
.
getAreaCode
();
}
//获取两项补贴统计
public
static
String
getEnjoySumStatsKey
(
StatsReqVo
vo
)
{
return
PREFIX
+
"getEnjoySumStats."
+
vo
.
getAreaCode
();
}
}
portal-server/src/main/java/com/zq/portal/service/CjStatsService.java
View file @
8e7fe087
...
...
@@ -278,4 +278,77 @@ public class CjStatsService {
}
return
PagingUtils
.
paging
(
vo
,
cjStatsDao:
:
search
);
}
public
Object
getCacheEnjoySubsidyStats
(
StatsReqVo
vo
)
{
Object
obj
=
redisUtils
.
getObj
(
PortalCacheKeys
.
getEnjoySubsidyStatsKey
(
vo
));
if
(
obj
!=
null
)
{
return
obj
;
}
return
getEnjoySubsidyStats
(
vo
);
}
//区域补贴在享人数
public
Object
getEnjoySubsidyStats
(
StatsReqVo
vo
)
{
if
(
StringUtils
.
isBlank
(
vo
.
getAreaCode
()))
{
vo
.
setAreaCode
(
"450000000000"
);
}
SystemArea
systemArea
=
areaDao
.
selectById
(
vo
.
getAreaCode
());
vo
.
setSubAreaCode
(
systemArea
.
subAreaCode
());
vo
.
setSize
(
SystemArea
.
getNextLevelLength
(
systemArea
.
getType
()));
List
<
String
>
areaList
=
new
ArrayList
<>();
List
<
String
>
nursingSubsidyNumList
=
new
ArrayList
<>();
//护理补贴
List
<
String
>
nursingSubsidyAmountList
=
new
ArrayList
<>();
List
<
String
>
livingAllowanceNumList
=
new
ArrayList
<>();
//生活补贴
List
<
String
>
livingAllowanceAmountList
=
new
ArrayList
<>();
List
<
StatsVo
>
subsidyStats
=
cjStatsDao
.
getAreaSubsidyStats
(
vo
);
for
(
StatsVo
subsidyStat
:
subsidyStats
)
{
SystemArea
area
=
areaDao
.
selectById
(
SystemArea
.
patchZero
(
subsidyStat
.
getCode
()));
if
(
area
==
null
)
{
continue
;
}
areaList
.
add
(
area
.
getName
());
nursingSubsidyNumList
.
add
(
subsidyStat
.
getHlnum
());
nursingSubsidyAmountList
.
add
(
subsidyStat
.
getHlamount
());
livingAllowanceNumList
.
add
(
subsidyStat
.
getShnum
());
livingAllowanceAmountList
.
add
(
subsidyStat
.
getShamount
());
vo
.
setSubAreaCode
(
subsidyStat
.
getCode
());
}
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"areaList"
,
areaList
);
data
.
put
(
"nursingSubsidyNum"
,
nursingSubsidyNumList
);
data
.
put
(
"nursingSubsidyAmount"
,
nursingSubsidyAmountList
);
data
.
put
(
"livingAllowanceNum"
,
livingAllowanceNumList
);
data
.
put
(
"livingAllowanceAmount"
,
livingAllowanceAmountList
);
redisUtils
.
setObj
(
PortalCacheKeys
.
getEnjoySubsidyStatsKey
(
vo
),
data
);
return
data
;
}
public
Object
getCacheEnjoySumStatsData
(
StatsReqVo
vo
)
{
Object
obj
=
redisUtils
.
getObj
(
PortalCacheKeys
.
getEnjoySumStatsKey
(
vo
));
if
(
obj
!=
null
)
{
return
obj
;
}
return
getEnjoySumStatsData
(
vo
);
}
public
Object
getEnjoySumStatsData
(
StatsReqVo
vo
)
{
List
<
Map
<
String
,
Object
>>
returnData
=
new
ArrayList
<>();
List
<
StatsVo
>
enjoySumStats
=
cjStatsDao
.
getEnjoySumStats
(
vo
);
for
(
StatsVo
statsVo
:
enjoySumStats
)
{
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"num"
,
statsVo
.
getNum
());
data
.
put
(
"amout"
,
statsVo
.
getAmount
());
returnData
.
add
(
data
);
}
redisUtils
.
setObj
(
PortalCacheKeys
.
getYearDisabledIssueStatsKey
(
vo
),
returnData
);
return
returnData
;
}
}
portal-server/src/main/java/com/zq/portal/vo/StatsVo.java
View file @
8e7fe087
...
...
@@ -24,6 +24,14 @@ public class StatsVo {
private
String
amount
;
private
String
hlnum
;
private
String
hlamount
;
private
String
shnum
;
private
String
shamount
;
private
String
code
;
private
String
date
;
...
...
portal-server/src/main/resources/mapper/CjStatsMapper.xml
View file @
8e7fe087
...
...
@@ -99,6 +99,24 @@
GROUP BY LEFT(UNIT_ID, #{size})
</select>
<select
id=
"getAreaSubsidyStats"
resultType=
"com.zq.portal.vo.StatsVo"
>
SELECT LEFT(AREACODE, 6) 'code', FF_DATE 'month',FF_ZD_PC 'hlnum', FF_ZD_MC 'hlamount',FF_KUN_PC 'shnum', FF_KUN_MC 'shamount'
FROM `ff_data_jm`
WHERE
CHAR_LENGTH (LEFT ( AREACODE, #{size} )) = #{size}
<if
test=
"month != null"
>
AND DATE_FORMAT(FF_DATE, '%Y-%m')= #{year}
</if>
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND AREACODE LIKE CONCAT(#{subAreaCode}, '%')
</if>
GROUP BY LEFT(AREACODE, #{size})
</select>
<select
id=
"getEnjoySumStats"
resultType=
"com.zq.portal.vo.StatsVo"
>
SELECT SUM(S_PC) 'num' , SUM(S_MC) 'amount' FROM ff_data_jm
</select>
<select
id=
"getYearIssueStats"
resultType=
"com.zq.portal.vo.StatsVo"
>
SELECT APPLY_TYPE_ID 'type', GRANT_YEAR 'year', SUM( COUNT_PEOPLE ) 'num', SUM( SUM_MONEY ) 'amount'
FROM `statics_grant`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment