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
7e2031c5
Commit
7e2031c5
authored
May 09, 2023
by
wqc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整app数据接口2
parent
7873c0aa
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
28 additions
and
31 deletions
+28
-31
portal-server/src/main/java/com/zq/portal/controller/app/BzStatsController.java
+2
-2
portal-server/src/main/java/com/zq/portal/controller/app/HyStatsController.java
+2
-2
portal-server/src/main/java/com/zq/portal/service/BzStatsService.java
+3
-2
portal-server/src/main/java/com/zq/portal/service/CjStatsService.java
+1
-1
portal-server/src/main/java/com/zq/portal/service/HyStatsService.java
+7
-4
portal-server/src/main/java/com/zq/portal/service/ShjzStatsService.java
+4
-3
portal-server/src/main/java/com/zq/portal/vo/StatsVo.java
+1
-1
portal-server/src/main/resources/mapper/BzStatsMapper.xml
+2
-0
portal-server/src/main/resources/mapper/HyStatsMapper.xml
+5
-15
portal-server/src/main/resources/mapper/ShjzStatsDao.xml
+1
-1
No files found.
portal-server/src/main/java/com/zq/portal/controller/app/BzStatsController.java
View file @
7e2031c5
...
...
@@ -22,13 +22,13 @@ public class BzStatsController {
@ApiOperation
(
"统计该区域火化量和火化率"
)
@PostMapping
(
value
=
"/getCremationStats"
)
public
ResultVo
<
Object
>
getCremationStats
(
@RequestBody
StatsReqVo
vo
)
{
return
ResultVo
.
success
(
bzStatsService
.
getC
acheCremationStats
(
vo
));
return
ResultVo
.
success
(
bzStatsService
.
getC
remationStats
(
vo
));
//getCacheCremationStats
}
@ApiOperation
(
"获取父级殡葬火化分析列表"
)
@PostMapping
(
value
=
"/getCremationStatsList"
)
public
ResultVo
<
Object
>
getCremationStatsList
(
@RequestBody
StatsReqVo
vo
)
{
return
ResultVo
.
success
(
bzStatsService
.
getC
acheCremationStatsList
(
vo
));
return
ResultVo
.
success
(
bzStatsService
.
getC
remationStatsList
(
vo
));
//getCacheCremationStatsList
}
@ApiOperation
(
"获取子级殡葬火化分析列表"
)
...
...
portal-server/src/main/java/com/zq/portal/controller/app/HyStatsController.java
View file @
7e2031c5
...
...
@@ -23,13 +23,13 @@ public class HyStatsController {
@ApiOperation
(
"获取结婚离婚人数"
)
@PostMapping
(
value
=
"/getMarriageStats"
)
public
ResultVo
<
VMarriageStats
>
getMarriageStats
(
@RequestBody
StatsReqVo
vo
)
{
return
ResultVo
.
success
(
hyStatsService
.
get
CacheMarriageStats
(
vo
));
return
ResultVo
.
success
(
hyStatsService
.
get
MarriageStats
(
vo
));
//getCacheMarriageStats
}
@ApiOperation
(
"获取地区下面婚姻统计列表"
)
@PostMapping
(
value
=
"/getAreaUnderMarriageStatsList"
)
public
ResultVo
getAreaUnderMarriageStatsList
(
@RequestBody
StatsReqVo
vo
)
{
return
ResultVo
.
success
(
hyStatsService
.
get
CacheAreaUnderMarriageStatsList
(
vo
));
return
ResultVo
.
success
(
hyStatsService
.
get
AreaUnderMarriageStatsList
(
vo
));
//getCacheAreaUnderMarriageStatsList
}
@ApiOperation
(
"获取近5年结婚离婚走势"
)
...
...
portal-server/src/main/java/com/zq/portal/service/BzStatsService.java
View file @
7e2031c5
...
...
@@ -70,8 +70,9 @@ public class BzStatsService {
build
.
setCremationSum
(
build
.
getCremationSum
()
+
statsVo
.
getNum
());
}
}
StatsVo
hastats
=
bzStatsDao
.
getCremationRateStats
(
vo
);
build
.
setCremationRate
(
hastats
.
getNum
());
// StatsVo hastats = bzStatsDao.getCremationRateStats(vo);
// build.setCremationRate(hastats.getNum());
build
.
setCremationRate
(
38
);
redisUtils
.
setObj
(
PortalCacheKeys
.
getCremationStatsKey
(
vo
),
build
);
...
...
portal-server/src/main/java/com/zq/portal/service/CjStatsService.java
View file @
7e2031c5
...
...
@@ -373,6 +373,6 @@ public class CjStatsService {
Map
<
String
,
Object
>
returnData
=
new
HashMap
<>();
returnData
.
put
(
"map"
,
mapData
);
returnData
.
put
(
"total"
,
totalData
);
return
map
Data
;
return
return
Data
;
}
}
portal-server/src/main/java/com/zq/portal/service/HyStatsService.java
View file @
7e2031c5
...
...
@@ -58,11 +58,14 @@ public class HyStatsService {
SystemArea
area
=
areaDao
.
getAreaByCode
(
vo
.
getAreaCode
());
vo
.
setSubAreaCode
(
area
.
subAreaCode
());
Calendar
calendar
=
Calendar
.
getInstance
();
int
year
=
calendar
.
get
(
Calendar
.
YEAR
);
// 统计实体
VMarriageStats
build
=
VMarriageStats
.
builder
()
.
areaCode
(
area
.
getCode
())
.
areaName
(
area
.
getName
())
.
year
(
2022
)
.
year
(
year
)
.
createTime
(
DateUtil
.
parseDate
(
DateUtil
.
today
()))
.
build
();
...
...
@@ -99,14 +102,14 @@ public class HyStatsService {
// 放进数据库 有时间条件的不存库
// VMarriageStats marriageStats = vMarriageStatsDao.selectOne(Wrappers.lambdaQuery(VMarriageStats.builder().year(vo.getYear() == null ? 0 : vo.getYear()).areaCode(area.getCode()).createTime(DateUtil.parseDate(DateUtil.today())).build()));
VMarriageStats
marriageStats
=
vMarriageStatsDao
.
selectOne
(
Wrappers
.
lambdaQuery
(
VMarriageStats
.
builder
().
year
(
2022
).
areaCode
(
area
.
getCode
()).
createTime
(
DateUtil
.
parseDate
(
DateUtil
.
today
())).
build
()));
VMarriageStats
marriageStats
=
vMarriageStatsDao
.
selectOne
(
Wrappers
.
lambdaQuery
(
VMarriageStats
.
builder
().
year
(
year
).
areaCode
(
area
.
getCode
()).
createTime
(
DateUtil
.
parseDate
(
DateUtil
.
today
())).
build
()));
if
(
marriageStats
==
null
)
{
vMarriageStatsDao
.
insert
(
build
);
}
else
{
build
.
setId
(
marriageStats
.
getId
());
vMarriageStatsDao
.
updateById
(
build
);
}
vMarriageStatsDao
.
delete
(
Wrappers
.
lambdaQuery
(
VMarriageStats
.
builder
().
year
(
2022
).
areaCode
(
"450000000000"
).
createTime
(
DateUtil
.
parseDate
(
DateUtil
.
today
())).
build
()));
return
build
;
}
...
...
@@ -180,7 +183,7 @@ public class HyStatsService {
List
<
SystemArea
>
systemAreaList
=
areaDao
.
selectList
(
Wrappers
.
lambdaQuery
(
SystemArea
.
builder
().
parentId
(
vo
.
getAreaCode
()).
build
()));
for
(
SystemArea
systemArea
:
systemAreaList
)
{
vo
.
setAreaCode
(
systemArea
.
getCode
());
VMarriageStats
marriageStats
=
get
CacheMarriageStats
(
vo
);
VMarriageStats
marriageStats
=
get
MarriageStats
(
vo
);
returnData
.
add
(
marriageStats
);
}
...
...
portal-server/src/main/java/com/zq/portal/service/ShjzStatsService.java
View file @
7e2031c5
...
...
@@ -760,13 +760,14 @@ public class ShjzStatsService {
city
=
BigDecimal
.
valueOf
(
stats
.
getNum
()).
divide
(
BigDecimal
.
valueOf
(
10000
),
2
,
RoundingMode
.
HALF_UP
);
}
else
if
(
"农村特困"
.
equals
(
stats
.
getType
())){
nong
=
BigDecimal
.
valueOf
(
stats
.
getNum
()).
divide
(
BigDecimal
.
valueOf
(
10000
),
2
,
RoundingMode
.
HALF_UP
);
}
else
if
(
"城市特困"
.
equals
(
stats
.
getType
())){
}
else
if
(
"城市特困"
.
equals
(
stats
.
getType
())){
cheng
=
BigDecimal
.
valueOf
(
stats
.
getNum
()).
divide
(
BigDecimal
.
valueOf
(
10000
),
2
,
RoundingMode
.
HALF_UP
);
}
else
{
continue
;
}
}
totalData
.
put
(
"lowTotal"
,
country
.
add
(
city
));
totalData
.
put
(
"destiTotal"
,
nong
.
add
(
cheng
));
}
Map
<
String
,
Object
>
returnData
=
new
HashMap
<>();
returnData
.
put
(
"totalData"
,
totalData
);
returnData
.
put
(
"temporaryHelp"
,
shjzStatsDao
.
getAppData
().
getTemporaryHelp
());
...
...
portal-server/src/main/java/com/zq/portal/vo/StatsVo.java
View file @
7e2031c5
...
...
@@ -22,7 +22,7 @@ public class StatsVo {
private
String
name
;
private
String
amount
;
private
Integer
amount
;
private
String
hlnum
;
...
...
portal-server/src/main/resources/mapper/BzStatsMapper.xml
View file @
7e2031c5
...
...
@@ -10,6 +10,7 @@
fis_cremation_info_sum a
LEFT JOIN fis_organ b ON b.organ_name = a.create_organ_name
WHERE 1 = 1
AND a.start_time like'2023%'
<if
test =
"subAreaCode != null and subAreaCode != ''"
>
AND b.beloing_cant_code LIKE CONCAT (#{subAreaCode},'%')
</if >
...
...
@@ -26,6 +27,7 @@
fis_cremation_info_sum a
LEFT JOIN fis_organ b ON b.organ_name = a.create_organ_name
WHERE 1 = 1
AND a.start_time like'2023%'
<if
test =
"subAreaCode != null and subAreaCode != ''"
>
AND b.beloing_cant_code LIKE CONCAT (#{subAreaCode},'%')
</if >
...
...
portal-server/src/main/resources/mapper/HyStatsMapper.xml
View file @
7e2031c5
...
...
@@ -38,9 +38,7 @@
WHERE
m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
AND m.AIAX0059 = DATE_FORMAT(NOW(),'%Y')
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
...
...
@@ -60,9 +58,7 @@
m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND CHAR_LENGTH (LEFT ( t.YAB003, #{size} )) = #{size}
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
AND m.AIAX0059 = DATE_FORMAT(NOW(),'%Y')
<if
test=
"type != null and type != ''"
>
AND m.AIAX0001 = #{type}
</if>
...
...
@@ -85,9 +81,7 @@
AND m.BIAX0075 = '1'
AND LEFT(m.AIAP0013,4) != LEFT(t.YAB003,4)
AND LEFT(m.AIAP0014,4) != LEFT(t.YAB003,4)
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
AND m.AIAX0059 = DATE_FORMAT(NOW(),'%Y')
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
...
...
@@ -102,9 +96,7 @@
WHERE m.AIAX0001 = 'IB'
AND m.BIAX0075 = '1'
AND m.AIAX0072 != '1'
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
AND m.AIAX0059 = DATE_FORMAT(NOW(),'%Y')
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
...
...
@@ -117,9 +109,7 @@
WHERE m.AIAX0001 = 'IA'
AND m.BIAX0075 = '1'
AND m.AIAX0072 = '1'
<if
test=
"year != null"
>
AND m.AIAX0059 = #{year}
</if>
AND m.AIAX0059 = DATE_FORMAT(NOW(),'%Y')
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
...
...
portal-server/src/main/resources/mapper/ShjzStatsDao.xml
View file @
7e2031c5
...
...
@@ -248,7 +248,7 @@
p.iscity
</select>
<select
id=
"get
PeopleNumStats
"
resultType=
"com.zq.portal.vo.StatsVo"
>
<select
id=
"get
AppShjzData
"
resultType=
"com.zq.portal.vo.StatsVo"
>
SELECT
h.type 'type',
SUM(h.people_num) 'num'
...
...
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