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
18a10678
Commit
18a10678
authored
Jan 29, 2023
by
wqc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app数据修改
parent
9060fe45
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
100 additions
and
8 deletions
+100
-8
api-server/src/main/java/com/zq/api/controller/ApiController.java
+1
-1
api-server/src/main/java/com/zq/api/feign/PortalFeign.java
+3
-0
api-server/src/main/java/com/zq/api/service/ApiService.java
+0
-0
api-server/src/main/java/com/zq/api/service/IApiLogic.java
+3
-0
api-server/src/main/java/com/zq/api/service/impl/ApiV100Logic.java
+5
-0
portal-server/src/main/java/com/zq/portal/controller/app/HyStatsController.java
+6
-0
portal-server/src/main/java/com/zq/portal/dao/HyStatsDao.java
+7
-0
portal-server/src/main/java/com/zq/portal/entity/VMarriageStats.java
+0
-0
portal-server/src/main/java/com/zq/portal/manager/PortalCacheKeys.java
+4
-0
portal-server/src/main/java/com/zq/portal/service/HyStatsService.java
+43
-2
portal-server/src/main/java/com/zq/portal/vo/HYVo.java
+0
-0
portal-server/src/main/java/com/zq/portal/vo/SearchReqVo.java
+4
-0
portal-server/src/main/resources/mapper/CjStatsMapper.xml
+6
-4
portal-server/src/main/resources/mapper/HyStatsMapper.xml
+15
-0
portal-server/src/main/resources/mapper/ShjzStatsDao.xml
+1
-1
resource-server/src/main/java/com/zq/resource/controller/DeptController.java
+2
-0
sys-server/src/main/java/com/zq/system/modules/system/service/VerifyService.java
+0
-0
sys-server/src/main/java/com/zq/system/modules/system/service/impl/UserServiceImpl.java
+0
-0
No files found.
api-server/src/main/java/com/zq/api/controller/ApiController.java
View file @
18a10678
...
...
@@ -51,7 +51,7 @@ public class ApiController {
return
ApiUtils
.
getSuccessResp
(
form
);
}
form
.
setType
(
2
);
form
.
setType
(
1
);
String
method
=
form
.
getMethod
();
if
(
StrUtil
.
isBlank
(
method
))
{
method
=
request
.
getParameter
(
"method"
);
...
...
api-server/src/main/java/com/zq/api/feign/PortalFeign.java
View file @
18a10678
...
...
@@ -17,6 +17,9 @@ public interface PortalFeign {
@PostMapping
(
"/stats/getMarriageStats"
)
ResultVo
getMarriageStats
(
@RequestBody
Map
<
String
,
Object
>
paramsMap
);
@PostMapping
(
"/stats/getYearMarriedCouple"
)
ResultVo
getYearMarriedCouple
(
@RequestBody
Map
<
String
,
Object
>
paramsMap
);
@PostMapping
(
"/stats/getAreaUnderMarriageStatsList"
)
ResultVo
getAreaUnderMarriageStatsList
(
@RequestBody
Map
<
String
,
Object
>
paramsMap
);
...
...
api-server/src/main/java/com/zq/api/service/ApiService.java
View file @
18a10678
api-server/src/main/java/com/zq/api/service/IApiLogic.java
View file @
18a10678
...
...
@@ -32,6 +32,9 @@ public interface IApiLogic extends IApiCommon {
@ApiMethod
(
name
=
"获取婚姻统计"
,
service
=
"PORTAL-SERVER"
)
ApiResp
getMarriageStats
(
ApiForm
form
);
@ApiMethod
(
name
=
"获取1年结婚离婚对数"
,
service
=
"PORTAL-SERVER"
)
ApiResp
getYearMarriedCouple
(
ApiForm
form
);
@ApiMethod
(
name
=
"获取区域下的婚姻统计列表"
,
service
=
"PORTAL-SERVER"
)
ApiResp
getAreaUnderMarriageStatsList
(
ApiForm
form
);
...
...
api-server/src/main/java/com/zq/api/service/impl/ApiV100Logic.java
View file @
18a10678
...
...
@@ -71,6 +71,11 @@ public class ApiV100Logic extends BaseApiLogic implements IApiLogic {
}
@Override
public
ApiResp
getYearMarriedCouple
(
ApiForm
form
)
{
return
ApiUtils
.
toApiResp
(
form
,
portalFeign
.
getYearMarriedCouple
(
form
.
getParamsMap
()));
}
@Override
public
ApiResp
getAreaUnderMarriageStatsList
(
ApiForm
form
)
{
return
ApiUtils
.
toApiResp
(
form
,
portalFeign
.
getAreaUnderMarriageStatsList
(
form
.
getParamsMap
()));
}
...
...
portal-server/src/main/java/com/zq/portal/controller/app/HyStatsController.java
View file @
18a10678
...
...
@@ -38,4 +38,10 @@ public class HyStatsController {
return
ResultVo
.
success
(
hyStatsService
.
getCacheFivesYearMarriageLine
(
vo
));
}
@ApiOperation
(
"获取1年结婚离婚对数"
)
@PostMapping
(
value
=
"/getYearMarriedCouple"
)
public
ResultVo
getYearMarriedCouple
(
@RequestBody
StatsReqVo
vo
)
{
return
ResultVo
.
success
(
hyStatsService
.
getCacheYearMarriedCouple
(
vo
));
}
}
portal-server/src/main/java/com/zq/portal/dao/HyStatsDao.java
View file @
18a10678
...
...
@@ -69,4 +69,11 @@ public interface HyStatsDao {
*/
List
<
Map
<
String
,
Object
>>
search
(
SearchReqVo
vo
);
/**
* 获取结婚离婚对数
*
* @param vo
* @return
*/
List
<
StatsVo
>
getYearMarriedCouple
(
StatsReqVo
vo
);
}
portal-server/src/main/java/com/zq/portal/entity/VMarriageStats.java
View file @
18a10678
portal-server/src/main/java/com/zq/portal/manager/PortalCacheKeys.java
View file @
18a10678
...
...
@@ -144,4 +144,8 @@ public abstract class PortalCacheKeys {
public
static
String
getEnjoySumStatsKey
(
StatsReqVo
vo
)
{
return
PREFIX
+
"getEnjoySumStats."
+
vo
.
getAreaCode
();
}
public
static
String
getYearMarriedCoupleKey
()
{
return
PREFIX
+
"getYearMarriedCouple"
;
}
}
portal-server/src/main/java/com/zq/portal/service/HyStatsService.java
View file @
18a10678
...
...
@@ -62,7 +62,7 @@ public class HyStatsService {
VMarriageStats
build
=
VMarriageStats
.
builder
()
.
areaCode
(
area
.
getCode
())
.
areaName
(
area
.
getName
())
.
year
(
vo
.
getYear
())
.
year
(
2022
)
.
createTime
(
DateUtil
.
parseDate
(
DateUtil
.
today
()))
.
build
();
...
...
@@ -98,7 +98,8 @@ public class HyStatsService {
redisUtils
.
setObj
(
PortalCacheKeys
.
getMarriageStatsKey
(
vo
),
build
);
// 放进数据库 有时间条件的不存库
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(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
()));
if
(
marriageStats
==
null
)
{
vMarriageStatsDao
.
insert
(
build
);
}
else
{
...
...
@@ -390,4 +391,44 @@ public class HyStatsService {
return
PagingUtils
.
paging
(
vo
,
hyStatsDao:
:
search
);
}
/**
* 获取缓存年统计结婚对数
*
* @param vo
* @return
*/
public
Object
getCacheYearMarriedCouple
(
StatsReqVo
vo
)
{
Object
obj
=
redisUtils
.
getObj
(
PortalCacheKeys
.
getYearMarriedCoupleKey
());
if
(
obj
!=
null
)
{
return
obj
;
}
return
getYearMarriedCouple
(
vo
);
}
/**
* 年统计结婚离婚对数
*
* @param vo
* @return
*/
private
Object
getYearMarriedCouple
(
StatsReqVo
vo
)
{
Integer
iaCount
=
null
;
Integer
ibCount
=
null
;
Map
<
String
,
Object
>
returnData
=
new
HashMap
<>();
List
<
StatsVo
>
yearMarriedCouple
=
hyStatsDao
.
getYearMarriedCouple
(
vo
);
for
(
StatsVo
statsVo:
yearMarriedCouple
)
{
if
(
"IA"
.
equals
(
statsVo
.
getType
()))
{
iaCount
=
statsVo
.
getNum
();
}
else
if
(
"IB"
.
equals
(
statsVo
.
getType
()))
{
ibCount
=
statsVo
.
getNum
();
}
}
returnData
.
put
(
"结婚对数"
,
iaCount
);
returnData
.
put
(
"离婚对数"
,
ibCount
);
return
returnData
;
}
}
portal-server/src/main/java/com/zq/portal/vo/HYVo.java
View file @
18a10678
portal-server/src/main/java/com/zq/portal/vo/SearchReqVo.java
View file @
18a10678
...
...
@@ -18,6 +18,10 @@ public class SearchReqVo extends PageReqVo {
private
String
keyword
;
private
String
IAcount
;
private
String
IBcount
;
public
String
getAreaCode
()
{
return
SystemArea
.
patchZero
(
areaCode
);
}
...
...
portal-server/src/main/resources/mapper/CjStatsMapper.xml
View file @
18a10678
...
...
@@ -85,8 +85,9 @@
SELECT LEFT(UNIT_ID, #{size}) 'code', APPLY_TYPE_ID 'type', GRANT_YEAR 'year', COUNT_PEOPLE 'num', SUM_MONEY
'amount'
FROM `statics_grant`
WHERE DATE_FORMAT(create_time, '%Y-%m-%d') = (SELECT DATE_FORMAT(create_time, '%Y-%m-%d') FROM statics_grant ORDER BY create_time DESC LIMIT 1)
AND CHAR_LENGTH (LEFT ( UNIT_ID, #{size} )) = #{size}
WHERE
# DATE_FORMAT(create_time, '%Y-%m-%d') = (SELECT DATE_FORMAT(create_time, '%Y-%m-%d') FROM statics_grant ORDER BY create_time DESC LIMIT 1)
CHAR_LENGTH (LEFT ( UNIT_ID, #{size} )) = #{size}
<if
test=
"year != null"
>
AND GRANT_YEAR = #{year}
</if>
...
...
@@ -120,8 +121,9 @@
<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`
WHERE DATE_FORMAT(create_time, '%Y-%m-%d') = (SELECT DATE_FORMAT(create_time, '%Y-%m-%d') FROM statics_grant
ORDER BY create_time DESC LIMIT 1)
WHERE 1=1
# DATE_FORMAT(create_time, '%Y-%m-%d') = (SELECT DATE_FORMAT(create_time, '%Y-%m-%d') FROM statics_grant
# ORDER BY create_time DESC LIMIT 1)
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
AND UNIT_ID LIKE CONCAT( #{subAreaCode}, '%' )
</if>
...
...
portal-server/src/main/resources/mapper/HyStatsMapper.xml
View file @
18a10678
...
...
@@ -175,5 +175,20 @@
</if>
ORDER BY registerDate DESC
</select>
<select
id=
"getYearMarriedCouple"
resultType=
"com.zq.portal.vo.StatsVo"
>
SELECT
COUNT( 1 )
FROM
MRCASE m
WHERE
1=1
<if
test=
"type != null and type != ''"
>
AND m.AIAX0001 = #{type}
</if>
AND BIAX0075 = '1'
AND AIAX0072 = '1'
AND DATE_FORMAT(AIAX0048,'%Y%m') >= '202201'
AND DATE_FORMAT(AIAX0048,'%Y%m')
<
= '202212'
</select>
</mapper>
portal-server/src/main/resources/mapper/ShjzStatsDao.xml
View file @
18a10678
...
...
@@ -200,7 +200,7 @@
LEFT ( a.area_code, #{size} ) 'code',
a.type 'type',
SUM(a.people_num) 'num'
FROM city_coutry
_2021 a
FROM city_coutry
a
WHERE
CHAR_LENGTH (LEFT ( a.area_code, #{size} )) = #{size}
<if
test=
"subAreaCode != null and subAreaCode != ''"
>
...
...
resource-server/src/main/java/com/zq/resource/controller/DeptController.java
View file @
18a10678
package
com
.
zq
.
resource
.
controller
;
import
com.zq.common.annotation.AnonymousAccess
;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.common.vo.IdVo
;
import
com.zq.common.vo.PageVo
;
...
...
@@ -74,6 +75,7 @@ public class DeptController {
@ApiOperation
(
"机构注册"
)
@PostMapping
(
value
=
"/share/registerDept"
)
@AnonymousAccess
public
ResultVo
registerDept
(
@RequestBody
IdVo
vo
)
{
AssertUtils
.
notEmpty
(
vo
.
getIds
(),
"至少选择一项"
);
...
...
sys-server/src/main/java/com/zq/system/modules/system/service/VerifyService.java
View file @
18a10678
sys-server/src/main/java/com/zq/system/modules/system/service/impl/UserServiceImpl.java
View file @
18a10678
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