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
ed936616
Commit
ed936616
authored
Jan 21, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of 172.16.10.76:moa/amos-boot-biz into developer
parents
133f6dc6
48b8d871
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
268 additions
and
54 deletions
+268
-54
readme.txt
amos-boot-data/amos-boot-data-openapi/readme.txt
+4
-3
CseiController.java
...m/yeejoin/amos/api/openapi/controller/CseiController.java
+11
-11
CylinderController.java
...ejoin/amos/api/openapi/controller/CylinderController.java
+6
-6
OpenapiBizTokenModel.java
...oin/amos/api/openapi/face/model/OpenapiBizTokenModel.java
+4
-0
OpenapiBizToken.java
...oin/amos/api/openapi/face/orm/entity/OpenapiBizToken.java
+5
-1
OpenapiBizTokenService.java
...amos/api/openapi/face/service/OpenapiBizTokenService.java
+0
-10
application-cyl.properties
...ata-openapi/src/main/resources/application-cyl.properties
+49
-0
application-dev.properties
...ata-openapi/src/main/resources/application-dev.properties
+3
-0
application-lift.properties
...ta-openapi/src/main/resources/application-lift.properties
+49
-0
application-qa.properties
...data-openapi/src/main/resources/application-qa.properties
+3
-0
application-spe.properties
...ata-openapi/src/main/resources/application-spe.properties
+49
-0
application-tzs.properties
...ata-openapi/src/main/resources/application-tzs.properties
+3
-0
application.properties
...ot-data-openapi/src/main/resources/application.properties
+1
-5
LatentDanger.java
...om/yeejoin/amos/latentdanger/dao/entity/LatentDanger.java
+2
-1
LatentDangerController.java
...entdanger/business/controller/LatentDangerController.java
+7
-0
LatentDangerMapper.java
.../latentdanger/business/dao/mapper/LatentDangerMapper.java
+3
-0
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+43
-15
ILatentDangerService.java
...ntdanger/business/service/intfc/ILatentDangerService.java
+7
-0
LatentDangerMapper.xml
...anger/src/main/resources/db/mapper/LatentDangerMapper.xml
+19
-2
No files found.
amos-boot-data/amos-boot-data-openapi/readme.txt
View file @
ed936616
##气瓶对接配置
spring.application.name=AMOS-API-OPENAPI
spring.application.name=AMOS-API-OPENAPI
-CYL
server.port=11001
数据库:amos_openapi_cylinder
##检验对接配置
...
...
@@ -7,10 +7,10 @@ spring.application.name=AMOS-API-OPENAPI-SPE
server.port=11002
数据库:amos_openapi_spe
##电梯对接配置
spring.application.name=AMOS-API-OPENAPI-LIF
E
spring.application.name=AMOS-API-OPENAPI-LIF
T
server.port=11003
数据库:xiy_amos_tzs_biz
##数据中心
spring.application.name=AMOS-API-OPENAPI-CYL
INDER
-BIZ
spring.application.name=AMOS-API-OPENAPI-CYL-BIZ
server.port=11004
数据库:(XXXX自己补全)
\ No newline at end of file
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/controller/CseiController.java
View file @
ed936616
...
...
@@ -94,7 +94,7 @@ public class CseiController {
@RequestBody
String
unitData
)
throws
Exception
{
logger
.
info
(
unitData
);
logger
.
info
(
"单位信息"
+
unitData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
unitData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"unitInfo"
,
SpecialUnitModel
.
class
);
...
...
@@ -112,7 +112,7 @@ public class CseiController {
@RequestBody
String
equInfoData
)
throws
Exception
{
logger
.
info
(
equInfoData
);
logger
.
info
(
"设备基本数据"
+
equInfoData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
equInfoData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"equInfo"
,
SpecialEquModel
.
class
);
...
...
@@ -129,7 +129,7 @@ public class CseiController {
@RequestBody
String
boilerData
)
throws
Exception
{
logger
.
info
(
boilerData
);
logger
.
info
(
"锅炉信息"
+
boilerData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
boilerData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"boilerInfo"
,
SpecialBoilerModel
.
class
);
...
...
@@ -146,7 +146,7 @@ public class CseiController {
@RequestBody
String
presContainerData
)
throws
Exception
{
logger
.
info
(
presContainerData
);
logger
.
info
(
"压力容器信息"
+
presContainerData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
presContainerData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"presContainerInfo"
,
SpecialPresContainerModel
.
class
);
...
...
@@ -163,7 +163,7 @@ public class CseiController {
@RequestBody
String
elevatorData
)
throws
Exception
{
logger
.
info
(
elevatorData
);
logger
.
info
(
"电梯信息"
+
elevatorData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
elevatorData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"elevatorInfo"
,
SpecialElevatorModel
.
class
);
...
...
@@ -180,7 +180,7 @@ public class CseiController {
@RequestBody
String
craneData
)
throws
Exception
{
logger
.
info
(
craneData
);
logger
.
info
(
"起重机械信息"
+
craneData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
craneData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"craneInfo"
,
SpecialCraneModel
.
class
);
...
...
@@ -197,7 +197,7 @@ public class CseiController {
@RequestBody
String
boilerData
)
throws
Exception
{
logger
.
info
(
boilerData
);
logger
.
info
(
"厂(场)内机动车辆"
+
boilerData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
boilerData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"vehicleInfo"
,
SpecialVehicleModel
.
class
);
...
...
@@ -214,7 +214,7 @@ public class CseiController {
@RequestBody
String
recreationFacilityData
)
throws
Exception
{
logger
.
info
(
recreationFacilityData
);
logger
.
info
(
"游乐设施信息"
+
recreationFacilityData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
recreationFacilityData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"recreationFacilityInfo"
,
SpecialRecreationFacilityModel
.
class
);
...
...
@@ -231,7 +231,7 @@ public class CseiController {
@RequestBody
String
passengerData
)
throws
Exception
{
logger
.
info
(
passengerData
);
logger
.
info
(
"客运索道信息"
+
passengerData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
passengerData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"passengerInfo"
,
SpecialPassengerRopewayModel
.
class
);
...
...
@@ -249,7 +249,7 @@ public class CseiController {
@RequestBody
String
constructionData
)
throws
Exception
{
logger
.
info
(
constructionData
);
logger
.
info
(
"设备施工告知信息"
+
constructionData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
constructionData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"constructionInfo"
,
SpecialConstructionInfoModel
.
class
);
...
...
@@ -266,7 +266,7 @@ public class CseiController {
@RequestBody
String
inspectData
)
throws
Exception
{
logger
.
info
(
inspectData
);
logger
.
info
(
"检验信息"
+
inspectData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
inspectData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"inspectInfo"
,
SpecialInspectModel
.
class
);
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/controller/CylinderController.java
View file @
ed936616
...
...
@@ -76,7 +76,7 @@ public class CylinderController {
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
public
ResponseModel
<
String
>
cylinderUnit
(
@RequestBody
String
unitData
)
throws
Exception
{
logger
.
info
(
unitData
);
logger
.
info
(
"气瓶企业信息"
+
unitData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
unitData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"unit"
,
CylinderUnitModel
.
class
);
...
...
@@ -93,7 +93,7 @@ public class CylinderController {
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
public
ResponseModel
<
String
>
cylinderInfo
(
@RequestBody
String
infoData
)
throws
Exception
{
logger
.
info
(
infoData
);
logger
.
info
(
"气瓶基础数据"
+
infoData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
infoData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"info"
,
CylinderInfoModel
.
class
);
...
...
@@ -109,7 +109,7 @@ public class CylinderController {
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
public
ResponseModel
<
String
>
cylinderTagInfo
(
@RequestBody
String
tagData
)
throws
Exception
{
logger
.
info
(
tagData
);
logger
.
info
(
"气瓶标签数据"
+
tagData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
tagData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"tag"
,
CylinderTagsModel
.
class
);
...
...
@@ -125,7 +125,7 @@ public class CylinderController {
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
public
ResponseModel
<
String
>
cylinderInspectionInfo
(
@RequestBody
String
inspectionData
)
throws
Exception
{
logger
.
info
(
inspectionData
);
logger
.
info
(
"气瓶检验数据"
+
inspectionData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
inspectionData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"inspection"
,
CylinderInspectionModel
.
class
);
...
...
@@ -141,7 +141,7 @@ public class CylinderController {
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
public
ResponseModel
<
String
>
cylinderFillingInfo
(
@RequestBody
String
fillingData
)
throws
Exception
{
logger
.
info
(
fillingData
);
logger
.
info
(
"气瓶充装数据"
+
fillingData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
fillingData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"fillingBefore"
,
CylinderFillingModel
.
class
);
...
...
@@ -176,7 +176,7 @@ public class CylinderController {
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
public
ResponseModel
<
String
>
cylinderFillingAudit
(
@RequestBody
String
fillingAuditData
)
throws
Exception
{
logger
.
info
(
fillingAuditData
);
logger
.
info
(
"气瓶充装审核数据"
+
fillingAuditData
);
JSONObject
jsonobject
=
JSONObject
.
fromObject
(
fillingAuditData
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<
String
,
Class
>();
classMap
.
put
(
"fillingAudit"
,
CylinderFillingExamineModel
.
class
);
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/model/OpenapiBizTokenModel.java
View file @
ed936616
...
...
@@ -56,4 +56,8 @@ public class OpenapiBizTokenModel extends BaseModel {
* 服务机构-开发机构
*/
private
String
developerAgency
;
/**
* 对接数据分类
*/
private
String
dataType
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/orm/entity/OpenapiBizToken.java
View file @
ed936616
...
...
@@ -65,5 +65,9 @@ public class OpenapiBizToken extends BaseEntity{
*/
@TableField
(
"DEVELOPER_AGENCY"
)
private
String
developerAgency
;
/**
* 对接数据分类
*/
@TableField
(
"DATA_TYPE"
)
private
String
dataType
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/OpenapiBizTokenService.java
View file @
ed936616
...
...
@@ -2,31 +2,21 @@ package com.yeejoin.amos.api.openapi.face.service;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.cache.Redis
;
import
org.typroject.tyboot.component.cache.enumeration.CacheType
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.api.openapi.constant.Constant
;
import
com.yeejoin.amos.api.openapi.face.model.BizTokenModel
;
import
com.yeejoin.amos.api.openapi.face.model.OpenapiBizTokenModel
;
import
com.yeejoin.amos.api.openapi.face.model.OpenapiLogModel
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.OpenapiBizTokenMapper
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.OpenapiBizToken
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.IdPasswordAuthModel
;
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-cyl.properties
0 → 100644
View file @
ed936616
spring.application.name
=
AMOS-API-OPENAPI-CYL
server.servlet.context-path
=
/openapicyl
server.port
=
11001
# jdbc_config
spring.datasource.url
=
jdbc:mysql://113.134.211.174:3308/amos_openapi_cylinder?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&serverTimezone=GMT%2B8
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle
=
5
spring.datasource.hikari.maximum-pool-size
=
15
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
1800000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
# REDIS (RedisProperties)
spring.redis.database
=
1
spring.redis.host
=
113.134.211.174
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
spring.redis.expire.time
=
300
#注册中心地址
eureka.client.service-url.defaultZone
=
http://113.134.211.174:10001/eureka/
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://113.134.211.174:1883
emqx.user-name
=
admin
emqx.password
=
public
emqx.max-inflight
=
1000
##biz custem properties
biz.lxyd.lift.url
=
http://39.106.181.149:8088/elevatorapi
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-dev.properties
View file @
ed936616
spring.application.name
=
AMOS-API-OPENAPI
server.servlet.context-path
=
/openapi
server.port
=
11004
# jdbc_config
spring.datasource.url
=
jdbc:mysql://172.16.6.60:3306/amos_openapi?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&serverTimezone=GMT%2B8
spring.datasource.username
=
root
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-lift.properties
0 → 100644
View file @
ed936616
spring.application.name
=
AMOS-API-OPENAPI-LIFT
server.servlet.context-path
=
/openapilift
server.port
=
11003
# jdbc_config
spring.datasource.url
=
jdbc:mysql://113.134.211.174:3306/xiy_amos_tzs_biz?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&serverTimezone=GMT%2B8
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle
=
5
spring.datasource.hikari.maximum-pool-size
=
15
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
1800000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
# REDIS (RedisProperties)
spring.redis.database
=
1
spring.redis.host
=
113.134.211.174
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
spring.redis.expire.time
=
300
#注册中心地址
eureka.client.service-url.defaultZone
=
http://113.134.211.174:10001/eureka/
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://113.134.211.174:1883
emqx.user-name
=
admin
emqx.password
=
public
emqx.max-inflight
=
1000
##biz custem properties
biz.lxyd.lift.url
=
http://39.106.181.149:8088/elevatorapi
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-qa.properties
View file @
ed936616
spring.application.name
=
AMOS-API-OPENAPI
server.servlet.context-path
=
/openapi
server.port
=
11004
# jdbc_config
spring.datasource.url
=
jdbc:mysql://113.134.211.174:3306/amos_openapi?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&serverTimezone=GMT%2B8
spring.datasource.username
=
root
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-spe.properties
0 → 100644
View file @
ed936616
spring.application.name
=
AMOS-API-OPENAPI-SPE
server.servlet.context-path
=
/openapispe
server.port
=
11002
# jdbc_config
spring.datasource.url
=
jdbc:mysql://113.134.211.174:3307/amos_openapi_spe?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&serverTimezone=GMT%2B8
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle
=
5
spring.datasource.hikari.maximum-pool-size
=
15
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
1800000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
# REDIS (RedisProperties)
spring.redis.database
=
1
spring.redis.host
=
113.134.211.174
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
spring.redis.expire.time
=
300
#注册中心地址
eureka.client.service-url.defaultZone
=
http://113.134.211.174:10001/eureka/
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://113.134.211.174:1883
emqx.user-name
=
admin
emqx.password
=
public
emqx.max-inflight
=
1000
##biz custem properties
biz.lxyd.lift.url
=
http://39.106.181.149:8088/elevatorapi
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-tzs.properties
View file @
ed936616
spring.application.name
=
AMOS-API-OPENAPI
server.servlet.context-path
=
/openapi
server.port
=
11004
# jdbc_config
spring.datasource.url
=
jdbc:mysql://113.134.211.174:3306/amos_openapi?allowMultiQueries=true&serverTimezone=GMT%2B8
spring.datasource.username
=
root
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application.properties
View file @
ed936616
spring.application.name
=
AMOS-API-OPENAPI
server.port
=
11001
spring.profiles.active
=
dev
server.servlet.context-path
=
/openapi
server.compression.enabled
=
true
spring.jackson.dateFormat
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-
${spring.profiles.active}
.xml
logging.config
=
classpath:logback-
dev
.xml
#设置文件上传的大小限制
spring.servlet.multipart.maxFileSize
=
3MB
spring.servlet.multipart.maxRequestSize
=
3MB
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-latentdanger-api/src/main/java/com/yeejoin/amos/latentdanger/dao/entity/LatentDanger.java
View file @
ed936616
...
...
@@ -11,6 +11,7 @@ import lombok.EqualsAndHashCode;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
import
java.util.Map
;
/**
* @author keyong
...
...
@@ -187,7 +188,7 @@ public class LatentDanger extends BasicEntity {
/**
* 业务信息
*/
@TableField
(
typeHandler
=
JacksonTypeHandler
.
class
)
@TableField
(
value
=
"biz_info"
,
typeHandler
=
JacksonTypeHandler
.
class
)
private
JSONObject
bizInfo
;
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/controller/LatentDangerController.java
View file @
ed936616
...
...
@@ -379,4 +379,11 @@ public class LatentDangerController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iLatentDangerService
.
getSupervisionReviewInfo
(
orgCode
,
DateUtils
.
longStr2Date
(
t1
),
DateUtils
.
longStr2Date
(
t2
)));
}
@ApiOperation
(
value
=
"所有未完成隐患数量"
,
notes
=
"所有未完成隐患数量"
)
@GetMapping
(
value
=
"/app/unFinishedDanger"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
getUnFinishedDangerCountMap
()
{
return
ResponseHelper
.
buildResponse
(
iLatentDangerService
.
getUnFinishedDangerCountMap
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/dao/mapper/LatentDangerMapper.java
View file @
ed936616
...
...
@@ -84,4 +84,7 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
IPage
<
LatentDanger
>
selectPageByParam
(
@Param
(
"page"
)
Page
<
LatentDanger
>
page
,
@Param
(
"paramMap"
)
Map
<
String
,
Object
>
paramMap
);
Integer
selectUnFinishedCount
(
@Param
(
"dangerState1"
)
List
<
String
>
dangerState1
,
@Param
(
"dangerState2"
)
List
<
String
>
dangerState2
);
Integer
selectUnFinishedCountByParam
(
@Param
(
"bizType"
)
String
bizType
,
@Param
(
"dangerState"
)
List
<
String
>
dangerState
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/LatentDangerServiceImpl.java
View file @
ed936616
...
...
@@ -1222,12 +1222,17 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
latentDanger
.
setInstanceId
((
String
)
resultData
.
get
(
"id"
));
latentDanger
.
setUpdateDate
(
new
Date
());
if
(
PlanTypeEnum
.
OUTER
.
getCode
().
equals
(
bizInfo
.
getString
(
"isOuter"
)))
{
// 外部单位隐患直接到 安运部二次审核节点
// 保存日志信息
executeResultMsg
=
latentDanger
.
getDangerStateName
()
+
ExecuteTypeEnum
.
通过
.
getName
();
record
=
latentDangerFlowRecordService
.
getOne
(
new
LambdaQueryWrapper
<
LatentDangerFlowRecord
>().
eq
(
LatentDangerFlowRecord:
:
getDangerId
,
latentDanger
.
getId
()));
latentDanger
.
setDangerState
(
LatentDangerState
.
SupervisionDangerStateEnum
.
隐患二次审核确认
.
getCode
());
latentDanger
.
setDangerStateName
(
LatentDangerState
.
SupervisionDangerStateEnum
.
隐患二次审核确认
.
getName
());
// 3、执行一步安运部二次审核
boolean
executeResult
=
workflowExecuteService
.
excuteTask
(
latentDanger
.
getInstanceId
(),
planType
);
if
(!
executeResult
)
{
this
.
updateById
(
latentDanger
);
executeSubmitDto
.
setIsOk
(
false
);
executeSubmitDto
.
setMsg
(
"任务执行失败"
);
return
executeSubmitDto
;
}
}
else
{
latentDanger
.
setDangerState
(
LatentDangerState
.
SupervisionDangerStateEnum
.
现场确认
.
getCode
());
latentDanger
.
setDangerStateName
(
LatentDangerState
.
SupervisionDangerStateEnum
.
现场确认
.
getName
());
...
...
@@ -1250,18 +1255,18 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
executeSubmitDto
.
setMsg
(
"设置节点执行人失败"
);
return
executeSubmitDto
;
}
// 5、保存日志信息
executeResultMsg
=
latentDanger
.
getDangerStateName
()
+
ExecuteTypeEnum
.
通过
.
getName
();
record
=
saveFlowRecord
(
""
,
latentDanger
.
getDangerStateName
(),
userId
,
departmentId
,
latentDanger
.
getFlowJson
(),
latentDanger
.
getId
(),
reginParams
.
getRole
(),
executeResultMsg
,
""
,
userRealName
,
departmentName
,
latentDanger
.
getDangerState
(),
0
);
LatentDangerState
.
SupervisionDangerStateEnum
curEnum
=
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumByCode
(
latentDanger
.
getDangerState
());
LatentDangerState
.
SupervisionDangerStateEnum
nextEnum
=
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumByCode
(
curEnum
.
getNext
());
latentDanger
.
setDangerState
(
nextEnum
.
getCode
());
latentDanger
.
setDangerStateName
(
nextEnum
.
getName
());
}
// 5、保存日志信息
executeResultMsg
=
latentDanger
.
getDangerStateName
()
+
ExecuteTypeEnum
.
通过
.
getName
();
record
=
saveFlowRecord
(
""
,
latentDanger
.
getDangerStateName
(),
userId
,
departmentId
,
latentDanger
.
getFlowJson
(),
latentDanger
.
getId
(),
reginParams
.
getRole
(),
executeResultMsg
,
""
,
userRealName
,
departmentName
,
latentDanger
.
getDangerState
(),
0
);
LatentDangerState
.
SupervisionDangerStateEnum
curEnum
=
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumByCode
(
latentDanger
.
getDangerState
());
LatentDangerState
.
SupervisionDangerStateEnum
nextEnum
=
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumByCode
(
curEnum
.
getNext
());
latentDanger
.
setDangerState
(
nextEnum
.
getCode
());
latentDanger
.
setDangerStateName
(
nextEnum
.
getName
());
latentDanger
.
setCurrentFlowRecordId
(
record
.
getId
());
this
.
updateById
(
latentDanger
);
...
...
@@ -2354,4 +2359,27 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
return
map
;
}
@Override
public
Map
<
String
,
Integer
>
getUnFinishedDangerCountMap
()
{
Map
<
String
,
Integer
>
resultMap
=
Maps
.
newHashMap
();
// 巡检隐患未关闭状态集合
List
<
LatentDangerState
.
PatrolDangerStateEnum
>
pDangerStateEnumList
=
Lists
.
newArrayList
();
pDangerStateEnumList
.
add
(
LatentDangerState
.
PatrolDangerStateEnum
.
治理完毕
);
pDangerStateEnumList
.
add
(
LatentDangerState
.
PatrolDangerStateEnum
.
待评审
);
pDangerStateEnumList
.
add
(
LatentDangerState
.
PatrolDangerStateEnum
.
已撤销
);
Integer
pDangerCount
=
this
.
baseMapper
.
selectUnFinishedCountByParam
(
"patrol"
,
pDangerStateEnumList
.
stream
().
map
(
LatentDangerState
.
PatrolDangerStateEnum
::
getCode
).
collect
(
Collectors
.
toList
()));
resultMap
.
put
(
"patrol"
,
pDangerCount
);
// 防火监督未关闭隐患状态集合
List
<
LatentDangerState
.
SupervisionDangerStateEnum
>
sDangerStateEnumList
=
Lists
.
newArrayList
();
sDangerStateEnumList
.
addAll
(
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumListByProcessState
(
LatentDangerProcessStateEnum
.
未审核
.
getCode
()));
sDangerStateEnumList
.
addAll
(
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumListByProcessState
(
LatentDangerProcessStateEnum
.
待审核
.
getCode
()));
sDangerStateEnumList
.
addAll
(
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumListByProcessState
(
LatentDangerProcessStateEnum
.
治理完毕
.
getCode
()));
Integer
sDangerCount
=
this
.
baseMapper
.
selectUnFinishedCountByParam
(
"supervision"
,
sDangerStateEnumList
.
stream
().
map
(
LatentDangerState
.
SupervisionDangerStateEnum
::
getCode
).
collect
(
Collectors
.
toList
()));
resultMap
.
put
(
"supervision"
,
sDangerCount
);
return
resultMap
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/intfc/ILatentDangerService.java
View file @
ed936616
...
...
@@ -185,4 +185,11 @@ public interface ILatentDangerService {
* @return
*/
Object
getSupervisionReviewInfo
(
String
orgCode
,
Date
t1
,
Date
t2
);
/**
* 获取所有未完成的隐患数量
*
* @return
*/
Map
<
String
,
Integer
>
getUnFinishedDangerCountMap
();
}
amos-boot-system-latentdanger/src/main/resources/db/mapper/LatentDangerMapper.xml
View file @
ed936616
...
...
@@ -958,7 +958,10 @@
WHERE
pld.business_key = #{businessKey}
</select>
<select
id=
"selectPageByParam"
resultType=
"com.yeejoin.amos.latentdanger.dao.entity.LatentDanger"
>
<resultMap
id=
"selectPageByParamResult"
type=
"com.yeejoin.amos.latentdanger.dao.entity.LatentDanger"
>
<result
column=
"biz_info"
property=
"bizInfo"
typeHandler=
"com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"
/>
</resultMap>
<select
id=
"selectPageByParam"
resultMap=
"selectPageByParamResult"
>
select
*,
CASE
...
...
@@ -966,7 +969,8 @@
1
ELSE
0
END as overtimeState
END as overtimeState,
a.biz_info
from p_latent_danger a
<where>
deleted = 0
...
...
@@ -1056,4 +1060,16 @@
</if>
))
</select>
<select
id=
"selectUnFinishedCountByParam"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1)
FROM p_latent_danger
WHERE deleted = 0
AND biz_type = #{bizType}
<if
test=
"dangerState != null and !dangerState.isEmpty()"
>
AND danger_state NOT IN
<foreach
collection=
"dangerState"
item=
"state"
open=
"("
separator=
","
close=
")"
>
#{state}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
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