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
0def61b6
Commit
0def61b6
authored
Jun 29, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
eced1a27
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
90 additions
and
17 deletions
+90
-17
api-server/src/main/java/com/zq/api/config/FeignConfig.java
+20
-2
api-server/src/main/resources/bootstrap.yml
+1
-1
portal-server/src/main/java/com/zq/portal/controller/admin/HyStatsAdminController.java
+6
-0
portal-server/src/main/java/com/zq/portal/dao/HyStatsDao.java
+3
-0
portal-server/src/main/java/com/zq/portal/service/BzStatsService.java
+5
-3
portal-server/src/main/java/com/zq/portal/service/HyStatsService.java
+10
-0
portal-server/src/main/java/com/zq/portal/service/StatsService.java
+7
-3
portal-server/src/main/java/com/zq/portal/task/StatsTimingTask.java
+20
-2
portal-server/src/main/resources/mapper/BzStatsMapper.xml
+1
-1
portal-server/src/main/resources/mapper/HyStatsMapper.xml
+16
-5
user-server/pom.xml
+1
-0
No files found.
api-server/src/main/java/com/zq/api/config/FeignConfig.java
View file @
0def61b6
...
...
@@ -7,11 +7,27 @@ import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Configuration
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Arrays
;
import
java.util.Enumeration
;
import
java.util.List
;
@Configuration
public
class
FeignConfig
{
private
static
final
List
<
String
>
HEADERS_TO_TRY
=
Arrays
.
asList
(
"X-Forwarded-For"
,
"Proxy-Client-IP"
,
"WL-Proxy-Client-IP"
,
"HTTP_X_FORWARDED_FOR"
,
"HTTP_X_FORWARDED"
,
"HTTP_X_CLUSTER_CLIENT_IP"
,
"HTTP_CLIENT_IP"
,
"HTTP_FORWARDED_FOR"
,
"HTTP_FORWARDED"
,
"HTTP_VIA"
,
"REMOTE_ADDR"
,
"X-Real-IP"
);
/**
* 解决fein远程调用丢失请求头
*
...
...
@@ -32,8 +48,10 @@ public class FeignConfig {
if
(
name
.
equals
(
"content-length"
))
{
continue
;
}
String
values
=
request
.
getHeader
(
name
);
template
.
header
(
name
,
values
);
if
(
HEADERS_TO_TRY
.
contains
(
name
))
{
String
values
=
request
.
getHeader
(
name
);
template
.
header
(
name
,
values
);
}
}
}
}
...
...
api-server/src/main/resources/bootstrap.yml
View file @
0def61b6
...
...
@@ -18,4 +18,4 @@ feign:
config
:
default
:
connectTimeout
:
5000
#连接超时时间
readTimeout
:
60000
#读超时时间
readTimeout
:
60000
0
#读超时时间
portal-server/src/main/java/com/zq/portal/controller/admin/HyStatsAdminController.java
View file @
0def61b6
...
...
@@ -50,4 +50,10 @@ public class HyStatsAdminController {
return
ResultVo
.
success
(
hyStatsService
.
marriageSearch
(
vo
.
getKeyword
()));
}
@ApiOperation
(
"获取人员列表"
)
@PostMapping
(
value
=
"/getPersonnelList"
)
public
ResultVo
getPersonnelList
(
@RequestBody
StatsReqVo
vo
)
{
return
ResultVo
.
success
(
hyStatsService
.
getPersonnelList
());
}
}
portal-server/src/main/java/com/zq/portal/dao/HyStatsDao.java
View file @
0def61b6
...
...
@@ -60,4 +60,7 @@ public interface HyStatsDao {
* @return
*/
List
<
Map
<
String
,
Object
>>
search
(
@Param
(
"keyword"
)
String
keyword
);
List
<
Map
<
String
,
Object
>>
getPersonnelList
();
}
portal-server/src/main/java/com/zq/portal/service/BzStatsService.java
View file @
0def61b6
...
...
@@ -51,7 +51,7 @@ public class BzStatsService {
}
SystemArea
systemArea
=
areaDao
.
selectById
(
vo
.
getAreaCode
());
vo
.
setSubAreaCode
(
systemArea
.
subAreaCode
());
vo
.
setSize
(
vo
.
getSubAreaCode
().
length
(
));
vo
.
setSize
(
SystemArea
.
getNextLevelLength
(
vo
.
getSubAreaCode
()
));
VBzCremationStats
build
=
VBzCremationStats
.
builder
()
.
areaCode
(
systemArea
.
getCode
())
...
...
@@ -87,7 +87,7 @@ public class BzStatsService {
*
* @param vo
*/
public
Object
getCremationStatsList
(
StatsReqVo
vo
)
{
public
Map
<
String
,
Object
>
getCremationStatsList
(
StatsReqVo
vo
)
{
SystemArea
systemArea
=
areaDao
.
selectById
(
vo
.
getAreaCode
());
vo
.
setSubAreaCode
(
systemArea
.
subAreaCode
());
vo
.
setSize
(
SystemArea
.
getNextLevelLength
(
vo
.
getSubAreaCode
()));
...
...
@@ -138,7 +138,9 @@ public class BzStatsService {
* @return
*/
public
Object
getCremationRateStats
(
StatsReqVo
vo
)
{
List
<
VBzCremationStats
>
list
=
(
List
<
VBzCremationStats
>)
getCremationStatsList
(
vo
);
Map
<
String
,
Object
>
statsMap
=
getCremationStatsList
(
vo
);
List
<
VBzCremationStats
>
list
=
(
List
<
VBzCremationStats
>)
statsMap
.
get
(
"statsLst"
);
List
<
Map
<
String
,
Object
>>
returnData
=
new
ArrayList
<>();
for
(
VBzCremationStats
vBzCremationStats
:
list
)
{
...
...
portal-server/src/main/java/com/zq/portal/service/HyStatsService.java
View file @
0def61b6
...
...
@@ -339,4 +339,14 @@ public class HyStatsService {
public
Object
marriageSearch
(
String
keyword
)
{
return
hyStatsDao
.
search
(
keyword
);
}
/**
* 获取搜索框的列表
*
* @return
*/
public
Object
getPersonnelList
()
{
List
<
Map
<
String
,
Object
>>
data
=
hyStatsDao
.
getPersonnelList
();
return
data
;
}
}
portal-server/src/main/java/com/zq/portal/service/StatsService.java
View file @
0def61b6
...
...
@@ -114,10 +114,14 @@ public class StatsService {
Map
<
Object
,
Object
>
returnMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
search
=
hyStatsDao
.
search
(
vo
.
getKeyword
());
returnMap
.
put
(
"marriage"
,
search
);
// 婚姻搜索
List
<
Map
<
String
,
Object
>>
marriageSearchList
=
hyStatsDao
.
search
(
vo
.
getKeyword
()
);
redisUtils
.
setObj
(
PortalCacheKeys
.
gatherSearchKey
(
vo
),
returnMap
,
1L
,
TimeUnit
.
DAYS
);
// 救助
returnMap
.
put
(
"marriage"
,
marriageSearchList
);
redisUtils
.
setObj
(
PortalCacheKeys
.
gatherSearchKey
(
vo
),
returnMap
,
1L
,
TimeUnit
.
HOURS
);
return
returnMap
;
}
}
portal-server/src/main/java/com/zq/portal/task/StatsTimingTask.java
View file @
0def61b6
...
...
@@ -22,8 +22,9 @@ public class StatsTimingTask {
private
final
EtStatsService
etStatsService
;
private
final
ShzzStatsService
shzzStatsService
;
private
final
CjStatsService
cjStatsService
;
private
final
BzStatsService
bzStatsService
;
private
final
AreaDao
areaDao
;
private
final
String
cron
=
"0 0
0/3
* * ?"
;
private
final
String
cron
=
"0 0
1
* * ?"
;
@Scheduled
(
cron
=
cron
)
...
...
@@ -84,8 +85,25 @@ public class StatsTimingTask {
@Scheduled
(
cron
=
cron
)
public
void
cjStats
()
{
System
.
out
.
println
(
"残疾-基本数统计 触发时间 :"
+
new
Date
());
List
<
SystemArea
>
systemAreaList
=
areaDao
.
selectList
(
Wrappers
.
lambdaQuery
(
SystemArea
.
builder
().
parentId
(
"450000000000"
).
build
()));
cjStatsService
.
getDisabledLevelStats
(
StatsReqVo
.
builder
().
areaCode
(
"450000000000"
).
build
());
for
(
SystemArea
systemArea
:
systemAreaList
)
{
cjStatsService
.
getDisabledLevelStats
(
StatsReqVo
.
builder
().
areaCode
(
systemArea
.
getCode
()).
build
());
}
}
cjStatsService
.
getDisabledLevelStats
(
StatsReqVo
.
builder
().
areaCode
(
"450000000000"
).
year
(
2021
).
build
());
@Scheduled
(
cron
=
cron
)
public
void
bzStats
()
{
System
.
out
.
println
(
"殡葬-基本数统计 触发时间 :"
+
new
Date
());
List
<
SystemArea
>
systemAreaList
=
areaDao
.
selectList
(
Wrappers
.
lambdaQuery
(
SystemArea
.
builder
().
parentId
(
"450000000000"
).
build
()));
bzStatsService
.
getCremationRateStats
(
StatsReqVo
.
builder
().
areaCode
(
"450000000000"
).
build
());
bzStatsService
.
getCremationRateStats
(
StatsReqVo
.
builder
().
areaCode
(
"450000000000"
).
build
());
for
(
SystemArea
systemArea
:
systemAreaList
)
{
bzStatsService
.
getCremationRateStats
(
StatsReqVo
.
builder
().
areaCode
(
systemArea
.
getCode
()).
build
());
bzStatsService
.
getCremationRateStats
(
StatsReqVo
.
builder
().
areaCode
(
systemArea
.
getCode
()).
build
());
}
}
...
...
portal-server/src/main/resources/mapper/BzStatsMapper.xml
View file @
0def61b6
...
...
@@ -18,7 +18,7 @@
GROUP BY LEFT(d.ups, #{size})
</select>
<select
id=
"getCremationRateStats"
resultType=
"com.zq.portal.vo.StatsVo"
>
SELECT ROUND(hhsum.c1 / rksum.c2 * 100)
SELECT ROUND(hhsum.c1 / rksum.c2 * 100)
'num'
FROM (SELECT count(1) as c1 FROM fis_cremation_info_sum) hhsum,
(SELECT count(1) as c2 FROM fis_dead_info) rksum
...
...
portal-server/src/main/resources/mapper/HyStatsMapper.xml
View file @
0def61b6
...
...
@@ -117,12 +117,23 @@
</select>
<select
id=
"search"
resultType=
"java.util.Map"
>
SELECT AIAX0001 'type', AIAP0005 'manName', AIAP0006 'girl', AIAP0013 'manIdCard', AIAP0014 'girlIdCard', AIAP0015 'manNationality', AIAP0016 'girlNationality', AIAP0023 'manState', AIAP0024 'girlState', AIAP0027 'manDomicile', AIAP0028 'girlDomicile', AIAX0035 'manContact', AIAX0036 'girlContact', AIAX0059 'archiveYear', AIAX0048 'registerDate'
SELECT AIAX0001 'type', AIAP0005 'manName', AIAP0006 'girl', AIAP0013 'manIdCard', AIAP0014 'girlIdCard',
AIAP0015 'manNationality', AIAP0016 'girlNationality', AIAP0023 'manState', AIAP0024 'girlState', AIAP0027
'manDomicile', AIAP0028 'girlDomicile', AIAX0035 'manContact', AIAX0036 'girlContact', AIAX0059 'archiveYear',
AIAX0048 'registerDate'
FROM `mrcase`
WHERE AIAP0005 = #{keyword}
OR AIAP0006 = #{keyword}
OR AIAP0013 = #{keyword}
OR AIAP0014 = #{keyword}
WHERE 1=1
<choose>
<when
test=
"keyword != null and keyword != ''"
>
AND (AIAP0005 = #{keyword}
OR AIAP0006 = #{keyword}
OR AIAP0013 = #{keyword}
OR AIAP0014 = #{keyword})
</when>
<otherwise>
ORDER BY AIAX0048 DESC LIMIT 20
</otherwise>
</choose>
</select>
</mapper>
user-server/pom.xml
View file @
0def61b6
...
...
@@ -82,6 +82,7 @@
<artifactId>
mysql-connector-java
</artifactId>
<scope>
runtime
</scope>
</dependency>
</dependencies>
<build>
...
...
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