Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
196a1894
Commit
196a1894
authored
Jul 31, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.公共代码整理
parent
99ee0e55
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6 additions
and
24 deletions
+6
-24
DataInitAfterRuning.java
...s/boot/module/statistcs/biz/init/DataInitAfterRuning.java
+1
-9
AQZSDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/AQZSDPStatisticsServiceImpl.java
+0
-0
JGDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
+0
-0
JYJCDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/JYJCDPStatisticsServiceImpl.java
+0
-0
StCommonServiceImpl.java
...odule/statistcs/biz/service/impl/StCommonServiceImpl.java
+0
-0
YJDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/YJDPStatisticsServiceImpl.java
+0
-0
ZLDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
+5
-15
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/init/DataInitAfterRuning.java
View file @
196a1894
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
init
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.AQZSDPStatisticsServiceImpl
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.JGDPStatisticsServiceImpl
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
org.springframework.boot.ApplicationArguments
;
...
...
@@ -15,19 +14,14 @@ import org.typroject.tyboot.core.foundation.context.RequestContext;
@Component
public
class
DataInitAfterRuning
implements
ApplicationRunner
{
private
JGDPStatisticsServiceImpl
jgdpStatisticsService
;
private
AQZSDPStatisticsServiceImpl
aqzsdpStatisticsService
;
private
StCommonServiceImpl
stCommonService
;
private
AmosRequestContext
amosRequestContext
;
public
DataInitAfterRuning
(
JGDPStatisticsServiceImpl
jgdpStatisticsService
,
StCommonServiceImpl
stCommonService
,
AmosRequestContext
amosRequestContext
,
AQZSDPStatisticsServiceImpl
aqzsdpStatisticsService
)
{
this
.
jgdpStatisticsService
=
jgdpStatisticsService
;
public
DataInitAfterRuning
(
StCommonServiceImpl
stCommonService
,
AmosRequestContext
amosRequestContext
)
{
this
.
stCommonService
=
stCommonService
;
this
.
amosRequestContext
=
amosRequestContext
;
this
.
aqzsdpStatisticsService
=
aqzsdpStatisticsService
;
}
@Override
...
...
@@ -36,8 +30,6 @@ public class DataInitAfterRuning implements ApplicationRunner {
RequestContext
.
setAppKey
(
amosRequestContext
.
getAppKey
());
RequestContext
.
setProduct
(
amosRequestContext
.
getProduct
());
RequestContext
.
setToken
(
amosRequestContext
.
getToken
());
jgdpStatisticsService
.
init
();
stCommonService
.
init
();
aqzsdpStatisticsService
.
init
();
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/AQZSDPStatisticsServiceImpl.java
View file @
196a1894
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
View file @
196a1894
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/JYJCDPStatisticsServiceImpl.java
View file @
196a1894
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/StCommonServiceImpl.java
View file @
196a1894
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/YJDPStatisticsServiceImpl.java
View file @
196a1894
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
View file @
196a1894
...
...
@@ -29,7 +29,6 @@ import java.io.IOException;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
@Service
...
...
@@ -45,13 +44,14 @@ public class ZLDPStatisticsServiceImpl {
private
RestHighLevelClient
restHighLevelClient
;
private
static
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>()
;
private
StCommonServiceImpl
stCommonService
;
public
ZLDPStatisticsServiceImpl
(
ZLStatisticsMapper
screenMapper
,
DataDictionaryServiceImpl
iDataDictionaryService
,
AlertStatisticsMapper
alertStatisticsMapper
,
RestHighLevelClient
restHighLevelClient
)
{
public
ZLDPStatisticsServiceImpl
(
ZLStatisticsMapper
screenMapper
,
DataDictionaryServiceImpl
iDataDictionaryService
,
AlertStatisticsMapper
alertStatisticsMapper
,
RestHighLevelClient
restHighLevelClient
,
StCommonServiceImpl
stCommonService
)
{
this
.
screenMapper
=
screenMapper
;
this
.
iDataDictionaryService
=
iDataDictionaryService
;
this
.
alertStatisticsMapper
=
alertStatisticsMapper
;
this
.
restHighLevelClient
=
restHighLevelClient
;
this
.
stCommonService
=
stCommonService
;
}
...
...
@@ -462,7 +462,7 @@ public class ZLDPStatisticsServiceImpl {
SearchRequest
searchRequest
=
new
SearchRequest
(
"idx_biz_view_jg_all"
);
SearchSourceBuilder
searchSourceBuilder
=
new
SearchSourceBuilder
();
//设置模糊搜索
String
orgCode
=
getAndSetOrgCode
(
screenDto
.
getCityCode
());
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
screenDto
.
getCityCode
());
searchSourceBuilder
.
query
(
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_CODE.keyword"
,
QueryParser
.
escape
(
orgCode
)
+
"*"
)));
searchSourceBuilder
.
aggregation
(
AggregationBuilders
.
terms
(
"count_by_use_site_code"
).
field
(
"USE_SITE_CODE"
).
size
(
500
));
...
...
@@ -499,16 +499,6 @@ public class ZLDPStatisticsServiceImpl {
return
returnList
;
}
private
String
getAndSetOrgCode
(
String
cityCode
)
{
String
orgCode
=
regionCodeOrgCodeMap
.
get
(
cityCode
);
if
(
orgCode
==
null
)
{
orgCode
=
screenMapper
.
getOrgCodeByCompanyCode
(
cityCode
);
if
(
orgCode
!=
null
)
{
regionCodeOrgCodeMap
.
put
(
cityCode
,
orgCode
);
}
}
return
orgCode
;
}
public
Map
<
String
,
Object
>
userCountNew
(
DPFilterParamDto
screenDto
)
{
List
<
String
>
unitTypeList
=
UnitTypeEnum
.
getNameListByType
(
screenDto
.
getCompanyType
());
...
...
@@ -580,7 +570,7 @@ public class ZLDPStatisticsServiceImpl {
jsonObject5
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getAvgTime
())
?
0
:
statistics
.
getAvgTime
());
jsonObject5
.
put
(
"name"
,
"平均救援时间"
);
String
orgCode
=
this
.
getAndSetOrgCode
(
regionCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
regionCode
);
JSONObject
jsonObject6
=
new
JSONObject
();
jsonObject6
.
put
(
"key"
,
"jycq"
);
jsonObject6
.
put
(
"value"
,
this
.
getQuestionNumber
(
"检验超期"
,
params
,
orgCode
));
...
...
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