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
883aafa8
Commit
883aafa8
authored
Jul 11, 2024
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents
d3f1a9c6
27762a7b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
26 deletions
+24
-26
CountDto.java
...n/java/com/yeejoin/amos/boot/biz/common/dto/CountDto.java
+1
-1
DPStatisticsServiceImpl.java
...t/module/jg/biz/service/impl/DPStatisticsServiceImpl.java
+7
-9
TzBaseEnterpriseInfoMapper.java
...oot/module/ymt/api/mapper/TzBaseEnterpriseInfoMapper.java
+2
-1
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+4
-3
application-dev.properties
...ule-ymt-biz/src/main/resources/application-dev.properties
+10
-12
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/dto/CountDto.java
View file @
883aafa8
...
@@ -12,7 +12,7 @@ import lombok.Data;
...
@@ -12,7 +12,7 @@ import lombok.Data;
public
class
CountDto
{
public
class
CountDto
{
@ApiModelProperty
(
value
=
"数据标识"
)
@ApiModelProperty
(
value
=
"数据标识"
)
private
String
key
;
private
String
key
Str
;
@ApiModelProperty
(
value
=
"描述"
)
@ApiModelProperty
(
value
=
"描述"
)
private
String
label
;
private
String
label
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/DPStatisticsServiceImpl.java
View file @
883aafa8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.yeejoin.amos.boot.biz.common.dto.CountDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto
;
...
@@ -31,7 +32,6 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
...
@@ -31,7 +32,6 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import
org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder
;
import
org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StopWatch
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
...
@@ -222,15 +222,12 @@ public class DPStatisticsServiceImpl {
...
@@ -222,15 +222,12 @@ public class DPStatisticsServiceImpl {
//3.单位数量统计
//3.单位数量统计
this
.
staticsCenterMapCountDataForCompany
(
result
,
dpFilterParamDto
);
this
.
staticsCenterMapCountDataForCompany
(
result
,
dpFilterParamDto
);
//4.人员数量统计
//4.人员数量统计
StopWatch
stopWatch5
=
new
StopWatch
();
stopWatch5
.
start
();
this
.
staticsCenterMapCountDataForPerson
(
result
,
dpFilterParamDto
);
this
.
staticsCenterMapCountDataForPerson
(
result
,
dpFilterParamDto
);
stopWatch5
.
stop
();
log
.
info
(
"------人员查询>:{}"
,
stopWatch5
.
getTotalTimeSeconds
());
return
result
;
return
result
;
}
}
private
void
staticsCenterMapCountDataForPerson
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
private
void
staticsCenterMapCountDataForPerson
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
// 效率太慢暂时注释掉
// String orgCode = regionCodeOrgCodeMap.get(dpFilterParamDto.getCityCode());
// String orgCode = regionCodeOrgCodeMap.get(dpFilterParamDto.getCityCode());
// if (orgCode == null) {
// if (orgCode == null) {
// orgCode = commonMapper.getOrgCodeByCompanyCode(dpFilterParamDto.getCityCode());
// orgCode = commonMapper.getOrgCodeByCompanyCode(dpFilterParamDto.getCityCode());
...
@@ -250,10 +247,11 @@ public class DPStatisticsServiceImpl {
...
@@ -250,10 +247,11 @@ public class DPStatisticsServiceImpl {
}
}
regionCodeOrgCodeMap
.
put
(
dpFilterParamDto
.
getCityCode
(),
orgCode
);
regionCodeOrgCodeMap
.
put
(
dpFilterParamDto
.
getCityCode
(),
orgCode
);
}
}
result
.
put
(
DPMapStatisticsItemEnum
.
USERS_UNITS
.
getCode
(),
enterpriseInfoMapper
.
countByUnitTypeAndOrgCode
(
orgCode
,
COMPANY_TYPE_USE
));
List
<
CountDto
>
countDtos
=
enterpriseInfoMapper
.
countByUnitTypeAndOrgCode
(
orgCode
);
result
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_UNITS
.
getCode
(),
enterpriseInfoMapper
.
countByUnitTypeAndOrgCode
(
orgCode
,
COMPANY_TYPE_MAINTENANCE
));
result
.
put
(
DPMapStatisticsItemEnum
.
USERS_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_USE
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
result
.
put
(
DPMapStatisticsItemEnum
.
MANUFACTURING_UNITS
.
getCode
(),
enterpriseInfoMapper
.
countByUnitTypeAndOrgCode
(
orgCode
,
COMPANY_TYPE_MANUFACTURE
));
result
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MAINTENANCE
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
result
.
put
(
DPMapStatisticsItemEnum
.
GAS_UNITS
.
getCode
(),
enterpriseInfoMapper
.
countByUnitTypeAndOrgCode
(
orgCode
,
COMPANY_TYPE_FILLING
));
result
.
put
(
DPMapStatisticsItemEnum
.
MANUFACTURING_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MANUFACTURE
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
result
.
put
(
DPMapStatisticsItemEnum
.
GAS_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_FILLING
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
}
}
private
long
staticsCenterMapCountDataForCylinder
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
private
long
staticsCenterMapCountDataForCylinder
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/TzBaseEnterpriseInfoMapper.java
View file @
883aafa8
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.dto.CountDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquEnterDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquEnterDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
...
@@ -65,5 +66,5 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
...
@@ -65,5 +66,5 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
*/
*/
TzBaseEnterpriseInfo
selectBySeq
(
Long
sequenceNbr
);
TzBaseEnterpriseInfo
selectBySeq
(
Long
sequenceNbr
);
L
ong
countByUnitTypeAndOrgCode
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"unitType"
)
String
unitTyp
e
);
L
ist
<
CountDto
>
countByUnitTypeAndOrgCode
(
@Param
(
"orgCode"
)
String
orgCod
e
);
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
883aafa8
...
@@ -196,13 +196,14 @@
...
@@ -196,13 +196,14 @@
<select
id=
"selectBySeq"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo"
>
<select
id=
"selectBySeq"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo"
>
select * from tz_base_enterprise_info where sequence_nbr = #{sequenceNbr}
select * from tz_base_enterprise_info where sequence_nbr = #{sequenceNbr}
</select>
</select>
<select
id=
"countByUnitTypeAndOrgCode"
resultType=
"
java.lang.Long
"
>
<select
id=
"countByUnitTypeAndOrgCode"
resultType=
"
com.yeejoin.amos.boot.biz.common.dto.CountDto
"
>
SELECT
SELECT
count(1)
count(1) as intValue,
a.unit_type as keyStr
FROM
FROM
"tz_base_enterprise_info" a
"tz_base_enterprise_info" a
where
where
a.supervise_org_code like concat(#{orgCode},'%')
a.supervise_org_code like concat(#{orgCode},'%')
and a.unit_type like concat('%', #{unitType},'%')
group by a.unit_type
</select>
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/resources/application-dev.properties
View file @
883aafa8
#DB properties:
#DB properties:
spring.datasource.url
=
jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.datasource.url
=
jdbc:vastbase://172.16.10.243:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
#spring.datasource.url=jdbc:vastbase://36.46.151.113:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz
spring.datasource.username
=
admin
spring.datasource.username
=
admin
spring.datasource.password
=
Yeejoin@2023
spring.datasource.password
=
Yeejoin@2023
eureka.client.service-url.defaultZone
=
http://172.16.10.2
10
:10001/eureka/
eureka.client.service-url.defaultZone
=
http://172.16.10.2
43
:10001/eureka/
eureka.instance.prefer-ip-address
=
true
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url
=
http://172.16.3.
17
:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.health-check-url
=
http://172.16.3.
68
:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url
=
http://172.16.3.
17
:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.status-page-url
=
http://172.16.3.
68
:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://172.16.3.
17
:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.metadata-map.management.api-docs
=
http://172.16.3.
68
:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address
=
172.16.3.
17
eureka.instance.ip-address
=
172.16.3.
68
## ES properties:
## ES properties:
elasticsearch.username
=
elastic
elasticsearch.username
=
elastic
elasticsearch.password
=
a123456
elasticsearch.password
=
a123456
spring.elasticsearch.rest.uris
=
http://172.16.10.2
10
:9200
spring.elasticsearch.rest.uris
=
http://172.16.10.2
43
:9200
## unit(h)
## unit(h)
alertcall.es.synchrony.time
=
48
alertcall.es.synchrony.time
=
48
#redis properties:
#redis properties:
spring.redis.mode
=
singleton
spring.redis.database
=
1
spring.redis.database
=
1
spring.redis.host
=
172.16.10.2
10
spring.redis.host
=
172.16.10.2
43
spring.redis.port
=
1
6379
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.password
=
yeejoin@2020
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-wait
=
-1
...
@@ -32,7 +30,7 @@ spring.redis.lettuce.pool.min-idle=0
...
@@ -32,7 +30,7 @@ spring.redis.lettuce.pool.min-idle=0
## emqx properties:
## emqx properties:
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://
36.46.151.113:1
883
emqx.broker
=
tcp://
172.16.10.243:2
883
emqx.client-user-name
=
super
emqx.client-user-name
=
super
emqx.client-password
=
123456
emqx.client-password
=
123456
emqx.keepAliveInterval
=
1000
emqx.keepAliveInterval
=
1000
...
...
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