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
c724a94c
Commit
c724a94c
authored
Mar 27, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl_bugfix' of
http://36.40.66.175:5000/moa/amos-boot-biz…
Merge branch 'develop_dl_bugfix' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_dl_bugfix
parents
a35ba225
df9d5b06
Hide whitespace changes
Inline
Side-by-side
Showing
107 changed files
with
674 additions
and
132 deletions
+674
-132
application-dev.properties
...ta-accessapi/src/main/resource/application-dev.properties
+1
-1
application-qa.properties
...ata-accessapi/src/main/resource/application-qa.properties
+1
-1
application-dev.properties
...-data-alarm/src/main/resources/application-dev.properties
+1
-1
application-dev.properties
...-data-equip/src/main/resources/application-dev.properties
+1
-1
application-cyl.properties
...ata-openapi/src/main/resources/application-cyl.properties
+1
-1
application-dev.properties
...ata-openapi/src/main/resources/application-dev.properties
+1
-1
application-jd.properties
...data-openapi/src/main/resources/application-jd.properties
+1
-1
application-lift.properties
...ta-openapi/src/main/resources/application-lift.properties
+1
-1
application-qa.properties
...data-openapi/src/main/resources/application-qa.properties
+1
-1
application-spe.properties
...ata-openapi/src/main/resources/application-spe.properties
+1
-1
application-tzs.properties
...ata-openapi/src/main/resources/application-tzs.properties
+1
-1
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+7
-0
DutyCarServiceImpl.java
...ot/module/common/biz/service/impl/DutyCarServiceImpl.java
+13
-3
DutyFireFightingServiceImpl.java
.../common/biz/service/impl/DutyFireFightingServiceImpl.java
+11
-5
DutyFirstAidServiceImpl.java
...dule/common/biz/service/impl/DutyFirstAidServiceImpl.java
+15
-1
DutyPersonServiceImpl.java
...module/common/biz/service/impl/DutyPersonServiceImpl.java
+36
-28
FireTeamServiceImpl.java
...t/module/common/biz/service/impl/FireTeamServiceImpl.java
+5
-0
FirefightersServiceImpl.java
...dule/common/biz/service/impl/FirefightersServiceImpl.java
+8
-0
LinkageUnitServiceImpl.java
...odule/common/biz/service/impl/LinkageUnitServiceImpl.java
+8
-2
MaintenanceCompanyServiceImpl.java
...ommon/biz/service/impl/MaintenanceCompanyServiceImpl.java
+6
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+16
-1
BigScreenController.java
...m/yeejoin/equipmanage/controller/BigScreenController.java
+6
-0
AnalysisReportLogServiceImpl.java
...quipmanage/service/impl/AnalysisReportLogServiceImpl.java
+12
-0
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+14
-0
CarServiceImpl.java
.../com/yeejoin/equipmanage/service/impl/CarServiceImpl.java
+6
-0
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+6
-0
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+16
-0
EquipmentManageServiceImpl.java
.../equipmanage/service/impl/EquipmentManageServiceImpl.java
+5
-0
EquipmentSpecificAlarmLogServiceImpl.java
...ge/service/impl/EquipmentSpecificAlarmLogServiceImpl.java
+5
-0
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+12
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+26
-0
FormInstanceServiceImpl.java
...oin/equipmanage/service/impl/FormInstanceServiceImpl.java
+6
-0
MaintenanceResourceDataServiceImpl.java
...nage/service/impl/MaintenanceResourceDataServiceImpl.java
+7
-0
MaintenanceResourceServiceImpl.java
...ipmanage/service/impl/MaintenanceResourceServiceImpl.java
+7
-0
MonitorEventService.java
...yeejoin/equipmanage/service/impl/MonitorEventService.java
+7
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+5
-0
PressurePumpServiceImpl.java
...oin/equipmanage/service/impl/PressurePumpServiceImpl.java
+6
-0
QREquipmentKnowledgeServiceImpl.java
...pmanage/service/impl/QREquipmentKnowledgeServiceImpl.java
+36
-30
RiskSourceServiceImpl.java
...ejoin/equipmanage/service/impl/RiskSourceServiceImpl.java
+7
-0
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+7
-0
PowerTransferServiceImpl.java
...module/jcs/biz/service/impl/PowerTransferServiceImpl.java
+7
-2
CheckController.java
...join/amos/patrol/business/controller/CheckController.java
+7
-0
InputItemController.java
.../amos/patrol/business/controller/InputItemController.java
+7
-0
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+23
-0
InputItemServiceImpl.java
...os/patrol/business/service/impl/InputItemServiceImpl.java
+10
-0
LatentDangerServiceImpl.java
...patrol/business/service/impl/LatentDangerServiceImpl.java
+52
-0
MessageServiceImpl.java
...amos/patrol/business/service/impl/MessageServiceImpl.java
+8
-0
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+19
-0
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+7
-0
RiskJudgmentTaskServiceImpl.java
...ol/business/service/impl/RiskJudgmentTaskServiceImpl.java
+20
-0
RouteServiceImpl.java
...n/amos/patrol/business/service/impl/RouteServiceImpl.java
+7
-1
application.properties
...-module-cas-biz/src/main/resources/application.properties
+1
-1
AmoCCSApplication.java
...ccs/src/main/java/com/yeejoin/amos/AmoCCSApplication.java
+11
-0
application-dev.properties
...-system-ccs/src/main/resources/application-dev.properties
+1
-1
AmostEquipApplication.java
...quip/src/main/java/com/yeejoin/AmostEquipApplication.java
+11
-0
application-dev.properties
...ystem-equip/src/main/resources/application-dev.properties
+1
-1
application-docker.properties
...em-equip/src/main/resources/application-docker.properties
+1
-1
application-jcs.properties
...ystem-equip/src/main/resources/application-jcs.properties
+1
-1
application-qa.properties
...system-equip/src/main/resources/application-qa.properties
+1
-1
application-test.properties
...stem-equip/src/main/resources/application-test.properties
+1
-1
FireAutoSysApplication.java
...rc/main/java/com/yeejoin/amos/FireAutoSysApplication.java
+11
-0
application-dev.properties
...-system-fas/src/main/resources/application-dev.properties
+1
-1
application-docker.properties
...stem-fas/src/main/resources/application-docker.properties
+1
-1
application-jcs.properties
...-system-fas/src/main/resources/application-jcs.properties
+1
-1
application-qa.properties
...t-system-fas/src/main/resources/application-qa.properties
+1
-1
application-test.properties
...system-fas/src/main/resources/application-test.properties
+1
-1
AmosJcsApplication.java
...cs/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
+11
-0
application-dev.properties
...-system-jcs/src/main/resources/application-dev.properties
+5
-3
application-jcs.properties
...-system-jcs/src/main/resources/application-jcs.properties
+1
-1
application-qa.properties
...t-system-jcs/src/main/resources/application-qa.properties
+1
-1
application.properties
...boot-system-jcs/src/main/resources/application.properties
+1
-0
application-dev.properties
...-system-kgd/src/main/resources/application-dev.properties
+1
-1
KnowledgebaseApplication.java
.../main/java/com/yeejoin/amos/KnowledgebaseApplication.java
+12
-0
application-dev.properties
...owledgebase/src/main/resources/application-dev.properties
+1
-1
application-jcs.properties
...owledgebase/src/main/resources/application-jcs.properties
+1
-1
application-qa.properties
...nowledgebase/src/main/resources/application-qa.properties
+1
-1
application-test.properties
...wledgebase/src/main/resources/application-test.properties
+1
-1
LatentDangerApplication.java
...c/main/java/com/yeejoin/amos/LatentDangerApplication.java
+11
-0
application-dev.properties
...atentdanger/src/main/resources/application-dev.properties
+1
-1
application-docker.properties
...ntdanger/src/main/resources/application-docker.properties
+1
-1
application-test.properties
...tentdanger/src/main/resources/application-test.properties
+1
-1
MaintenanceApplication.java
...rc/main/java/com/yeejoin/amos/MaintenanceApplication.java
+11
-0
application-dev.properties
...maintenance/src/main/resources/application-dev.properties
+1
-1
application-jcs.properties
...maintenance/src/main/resources/application-jcs.properties
+1
-1
PatrolApplication.java
...rol/src/main/java/com/yeejoin/amos/PatrolApplication.java
+11
-0
application-dev.properties
...stem-patrol/src/main/resources/application-dev.properties
+5
-3
application-docker.properties
...m-patrol/src/main/resources/application-docker.properties
+1
-1
application-jcs.properties
...stem-patrol/src/main/resources/application-jcs.properties
+1
-1
application-test.properties
...tem-patrol/src/main/resources/application-test.properties
+1
-1
StartPrecontrolService.java
...rc/main/java/com/yeejoin/amos/StartPrecontrolService.java
+11
-0
application-dev.properties
...m-precontrol/src/main/resource/application-dev.properties
+1
-1
application-dev2.properties
...-precontrol/src/main/resource/application-dev2.properties
+1
-1
application-docker.properties
...recontrol/src/main/resource/application-docker.properties
+1
-1
application-public.properties
...recontrol/src/main/resource/application-public.properties
+1
-1
application-qa.properties
...em-precontrol/src/main/resource/application-qa.properties
+1
-1
SupervisionApplication.java
...rc/main/java/com/yeejoin/amos/SupervisionApplication.java
+11
-0
application-dev.properties
...supervision/src/main/resources/application-dev.properties
+1
-1
application-jcs.properties
...supervision/src/main/resources/application-jcs.properties
+1
-1
application-dev.properties
...ule-tdc-biz/src/main/resources/application-dev.properties
+1
-1
application-dev.properties
...ule-tzs-biz/src/main/resources/application-dev.properties
+1
-1
application-dev2.properties
...le-tzs-biz/src/main/resources/application-dev2.properties
+1
-1
application-jd.properties
...dule-tzs-biz/src/main/resources/application-jd.properties
+1
-1
application-qa.properties
...dule-tzs-biz/src/main/resources/application-qa.properties
+1
-1
application.properties
...-module-ugp-biz/src/main/resources/application.properties
+1
-1
AmosBootUtilsMessageApplication.java
...ava/com/yeejoin/amos/AmosBootUtilsMessageApplication.java
+11
-0
application-dev.properties
...ils-message/src/main/resources/application-dev.properties
+1
-1
application-roma.properties
...ls-message/src/main/resources/application-roma.properties
+1
-1
No files found.
amos-boot-data/amos-boot-data-accessapi/src/main/resource/application-dev.properties
View file @
c724a94c
...
...
@@ -42,7 +42,7 @@ eureka.instance.instance-id=${eureka.instance.ip-address}:${server.port}
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.90:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
amos-boot-data/amos-boot-data-accessapi/src/main/resource/application-qa.properties
View file @
c724a94c
...
...
@@ -40,7 +40,7 @@ eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.90:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
amos-boot-data/amos-boot-data-alarm/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -58,7 +58,7 @@ spring.security.user.name=admin
spring.security.user.password
=
a1234560
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.220:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
amos-boot-data/amos-boot-data-equip/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -39,7 +39,7 @@ spring.security.user.password=a1234560
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-cyl.properties
View file @
c724a94c
...
...
@@ -41,7 +41,7 @@ eureka.instance.instance-id=${eureka.instance.ip-address}:${server.port}
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://113.134.211.174:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -40,7 +40,7 @@ eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.90:1883
emqx.user-name
=
super
emqx.password
=
123456
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-jd.properties
View file @
c724a94c
...
...
@@ -39,7 +39,7 @@ eureka.instance.metadata-map.management.api-docs=http://192.168.1.10:${server.po
##emqx
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://192.168.1.10:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-lift.properties
View file @
c724a94c
...
...
@@ -39,7 +39,7 @@ eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://113.134.211.174:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-qa.properties
View file @
c724a94c
...
...
@@ -39,7 +39,7 @@ eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://113.134.211.174:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-spe.properties
View file @
c724a94c
...
...
@@ -39,7 +39,7 @@ eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://113.134.211.174:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-tzs.properties
View file @
c724a94c
...
...
@@ -39,7 +39,7 @@ eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://113.134.211.174:1883
emqx.user-name
=
admin
emqx.password
=
public
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
c724a94c
...
...
@@ -104,6 +104,8 @@ public class OrgUsrController extends BaseController {
String
deptKey
;
@Value
(
"special-deptType"
)
String
deptTypeKey
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Autowired
DynamicFormInstanceMapper
dynamicFormInstanceMapper
;
...
...
@@ -1153,6 +1155,7 @@ public class OrgUsrController extends BaseController {
return
ResponseHelper
.
buildResponse
(
orgUsrList
);
}
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单位基本信息"
,
notes
=
"查询单位基本信息"
)
@GetMapping
(
value
=
"/candidateGroupsUser"
)
...
...
@@ -1166,6 +1169,10 @@ public class OrgUsrController extends BaseController {
List
<
Map
>
objects
=
JSONObject
.
parseArray
(
result
,
Map
.
class
);
//9891 按照测试要求转成人员管理信息且按换流站过滤
List
<
Map
>
map
=
new
ArrayList
<>();
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
objects
.
stream
().
forEach
(
e
->{
OrgUsr
orgUsr
=
orgUsrMapper
.
queryByUserId
(
Long
.
valueOf
(
e
.
get
(
"userId"
).
toString
()));
if
(!
ObjectUtils
.
isEmpty
(
orgUsr
)
&&
orgUsr
.
getBizOrgCode
().
startsWith
(
bizOrgCode
)){
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyCarServiceImpl.java
View file @
c724a94c
...
...
@@ -6,8 +6,10 @@ import java.util.List;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
...
@@ -36,7 +38,7 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
@Autowired
FirefightersMapper
firefightersMapper
;
FirefightersMapper
firefightersMapper
;
@Autowired
EquipFeignClient
equipFeignClient
;
...
...
@@ -45,6 +47,8 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
@Autowired
EquipFeignClient
equipFeign
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
...
...
@@ -166,6 +170,8 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
}
resultList
.
add
(
titleMap_2
);
String
carId
=
map
.
get
(
CARID
).
toString
();
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
Map
<
String
,
Object
>
instanceMap
=
dutyPersonShiftMapper
.
getInstanceIdForSpecifyDateAndEquipment
(
dutyDay
,
this
.
getGroupCode
(),
carId
);
if
(
instanceMap
==
null
)
{
...
...
@@ -174,7 +180,7 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
String
instanceId
=
instanceMap
.
get
(
"instanceIds"
).
toString
();
if
(
StringUtils
.
isNotBlank
(
instanceId
))
{
String
[]
instanceIds
=
instanceId
.
split
(
","
);
// 获取当前装备ID下的排版数据
List
<
Map
<
String
,
Object
>>
specifyDateList
=
dutyPersonShiftMapper
.
getPositionStaffDutyForSpecifyDate
(
dutyDay
,
...
...
@@ -200,6 +206,8 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
}
@Override
public
int
getDutyCarCount
(
Long
carId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
Map
<
String
,
Object
>>
equipmentList
=
dutyPersonShiftMapper
.
getEquipmentForSpecifyDate
(
DateUtils
.
getDateNowShortStr
(),
this
.
getGroupCode
(),
CARID
,
CARNAME
,
TEAMNAME
,
""
);
int
count
=
0
;
...
...
@@ -227,6 +235,8 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
public
List
<
Map
<
String
,
Object
>>
theCarDutyPerson
(
Long
carId
)
{
List
<
Map
<
String
,
Object
>>
specifyDateList
=
null
;
String
dutyDay
=
DateUtils
.
getDateNowShortStr
();
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
Map
<
String
,
Object
>
instanceMap
=
dutyPersonShiftMapper
.
getInstanceIdForSpecifyDateAndEquipment
(
dutyDay
,
this
.
getGroupCode
(),
carId
.
toString
());
if
(
instanceMap
==
null
)
{
...
...
@@ -237,7 +247,7 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
String
[]
instanceIds
=
instanceId
.
split
(
","
);
specifyDateList
=
dutyPersonShiftMapper
.
getPositionStaffDutyForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
instanceIds
,
null
,
null
);
}
}
return
specifyDateList
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyFireFightingServiceImpl.java
View file @
c724a94c
...
...
@@ -6,8 +6,10 @@ import java.util.LinkedHashMap;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -23,18 +25,20 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement
@Autowired
FireStationServiceImpl
fireStationServiceImpl
;
private
static
final
String
USERNAME
=
"userName"
;
private
static
final
String
POSTTYPENAME
=
"postTypeName"
;
private
static
final
String
TEAMNAME
=
"teamName"
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Autowired
DynamicFormInstanceServiceImpl
alertFormValueServiceImpl
;
public
String
getGroupCode
()
{
return
"dutyFireFighting"
;
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
DutyFireFightingDto
save
(
DutyFireFightingDto
dto
)
{
...
...
@@ -56,6 +60,8 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement
return
dto
;
}
public
Object
getSchedulingDutyForSpecifyDate
(
String
dutyDay
,
Long
shiftId
,
String
postType
,
String
fieldCode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
Map
<
String
,
Object
>>
equipmentList
=
dutyPersonShiftMapper
.
getEquipmentForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
"fireFightingId"
,
"fireFighting"
,
TEAMNAME
,
"result.fireFightingId"
);
if
(
equipmentList
==
null
||
equipmentList
.
size
()<
1
||
equipmentList
.
get
(
0
)==
null
)
{
...
...
@@ -81,7 +87,7 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement
String
instanceId
=
instanceMap
.
get
(
"instanceIds"
).
toString
();
if
(
StringUtils
.
isNotBlank
(
instanceId
))
{
String
[]
instanceIds
=
instanceId
.
split
(
","
);
// 获取当前装备ID下的排版数据
List
<
Map
<
String
,
Object
>>
specifyDateList
=
dutyPersonShiftMapper
.
getPositionStaffDutyForSpecifyDate
(
dutyDay
,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyFirstAidServiceImpl.java
View file @
c724a94c
...
...
@@ -5,8 +5,11 @@ import java.util.HashMap;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
...
...
@@ -20,10 +23,12 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Autowired
OrgUsrServiceImpl
orgUsrServiceImpl
;
private
static
final
String
POSTTYPENAME
=
"postTypeName"
;
private
static
final
String
USERNAME
=
"userName"
;
...
...
@@ -55,6 +60,8 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
@Override
public
Object
getSchedulingDutyForSpecifyDate
(
String
dutyDay
,
Long
shiftId
,
String
postType
,
String
fieldCode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
Map
<
String
,
Object
>>
equipmentList
=
dutyPersonShiftMapper
.
getEquipmentForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
"firstAidId"
,
"firstAid"
,
"teamName"
,
"result.firstAidId"
);
if
(
equipmentList
==
null
||
equipmentList
.
size
()
<
1
||
equipmentList
.
get
(
0
)
==
null
)
{
...
...
@@ -108,6 +115,9 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
List
<
String
>
firstAidSimpleList
=
new
ArrayList
<
String
>();
List
<
String
>
companyNameList
=
new
ArrayList
<
String
>();
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
String
firstAidCompanyId
=
dutyPersonShiftMapper
.
getFirstAidCompanyId
();
if
(!
""
.
equals
(
firstAidCompanyId
)
&&
firstAidCompanyId
!=
null
){
ids
.
add
(
firstAidCompanyId
);
...
...
@@ -139,6 +149,10 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
});
detailMap
.
put
(
POSTTYPENAME
,
dataDicSimpleList
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
Map
<
String
,
Object
>>
list
=
dutyPersonShiftMapper
.
getFirstAidForTypeCodeAndCompanyId
(
Long
.
parseLong
(
firstAidCompanyId
));
list
.
stream
().
forEach
(
m
->
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyPersonServiceImpl.java
View file @
c724a94c
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.common.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift
;
...
...
@@ -14,6 +15,7 @@ import com.yeejoin.amos.boot.module.common.biz.enums.DynamicGroupCodeEnum;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -41,6 +43,8 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut
private
static
final
String
POSTTYPENAME
=
"postTypeName"
;
private
static
final
String
WXXFZ
=
"微型消防站"
;
private
static
final
String
VALUE
=
"value"
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Override
public
String
getGroupCode
(){
...
...
@@ -260,12 +264,12 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut
});
return
temp
;
}
public
Object
BuildScheduleDetails
(
String
dutyDay
,
Long
shiftId
,
String
postType
)
{
List
<
Map
<
String
,
Object
>>
list
=
dayDutyPersonList
(
dutyDay
,
shiftId
,
postType
);
list
.
stream
().
forEach
(
i
->{
List
<
Object
>
fieldsList
=
new
ArrayList
<
Object
>();
...
...
@@ -278,14 +282,14 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
map
.
clear
();
map
.
put
(
"name"
,
WXXFZ
);
map
.
put
(
VALUE
,
i
.
get
(
DEPTNAME
).
toString
());
});
return
postType
;
}
@Override
...
...
@@ -309,6 +313,8 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
}
public
Object
getSchedulingDutyForSpecifyDate
(
String
dutyDay
,
Long
shiftId
,
String
postType
,
String
fieldCode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
Map
<
String
,
Object
>>
equipmentList
=
dutyPersonShiftMapper
.
getNewEquipmentForSpecifyDate
(
dutyDay
,
this
.
getGroupCode
(),
DEPTID
,
DEPTNAME
,
"result.deptId"
);
if
(
equipmentList
==
null
||
equipmentList
.
size
()
<
1
||
equipmentList
.
get
(
0
)
==
null
)
{
...
...
@@ -322,6 +328,8 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
resultList
.
add
(
map
.
get
(
DEPTNAME
).
toString
());
}
String
carId
=
map
.
get
(
DEPTID
).
toString
();
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
Map
<
String
,
Object
>
instanceMap
=
dutyPersonShiftMapper
.
getInstanceIdForSpecifyDateAndEquipment
(
dutyDay
,
this
.
getGroupCode
(),
carId
);
if
(
instanceMap
==
null
)
{
...
...
@@ -350,22 +358,22 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
}
return
detailList
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FireTeamServiceImpl.java
View file @
c724a94c
...
...
@@ -12,6 +12,7 @@ import com.google.common.collect.Maps;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
...
...
@@ -69,6 +70,8 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
private
static
final
String
GETSEQUENCENBR
=
"getSequenceNbr"
;
private
static
final
String
TEAMID
=
"teamId"
;
private
static
final
String
IS_DELETE
=
"is_delete"
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
/**
* 获取监控大队列表
*
...
...
@@ -116,6 +119,8 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
IPage
<
FireTeamCardDto
>
fireTeamListPage
=
this
.
baseMapper
.
getFireTeamForPage
(
page
,
team
);
List
<
FireTeamCardDto
>
fireTeamList
=
fireTeamListPage
.
getRecords
();
Map
<
Object
,
Long
>
finalTeamCarCountMap
=
teamCarCountMap
;
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
fireTeamList
.
forEach
(
t
->
{
// 递归返回teamId bug2684 bykongfm
List
<
Long
>
teamIds
=
new
ArrayList
<>();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FirefightersServiceImpl.java
View file @
c724a94c
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
...
...
@@ -27,6 +28,7 @@ import org.apache.commons.lang3.ObjectUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.support.TransactionSynchronization
;
...
...
@@ -65,6 +67,8 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
@Autowired
private
IDataSyncService
dataSyncService
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
private
static
final
String
BIZORGCODE
=
"bizOrgCode"
;
...
...
@@ -302,6 +306,8 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
public
BigScreen1VO
getFireForceInfoByCode
(
String
companyCode
)
{
String
bizOrgCode
=
null
;
if
(
StringUtils
.
isNotEmpty
(
companyCode
))
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
OrgUsr
orgUsr
=
orgUsrMapper
.
queryByCompanyCode
(
companyCode
);
if
(
ObjectUtils
.
isNotEmpty
(
orgUsr
))
{
bizOrgCode
=
orgUsr
.
getBizOrgCode
();
...
...
@@ -327,6 +333,8 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
HashMap
<
String
,
Object
>
teamInfoMap
=
new
HashMap
<>();
teamInfoList
.
add
(
teamInfoMap
);
bigScreen1VO
.
setTeamNumInfo
(
teamInfoList
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
Map
<
String
,
Object
>>
stationSignInfo
=
firefightersMapper
.
getStationSignInfo
(
bizOrgCode
);
bigScreen1VO
.
setUsrSignInfo
(
stationSignInfo
);
List
<
Map
<
String
,
Object
>>
usrSignInfoByBizOrgCode
=
firefightersMapper
.
getUsrSignInfoByBizOrgCode
(
bizOrgCode
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/LinkageUnitServiceImpl.java
View file @
c724a94c
...
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
...
...
@@ -23,6 +24,7 @@ import com.yeejoin.amos.boot.module.common.api.mapper.LinkageUnitMapper;
import
com.yeejoin.amos.boot.module.common.api.service.ILinkageUnitService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
...
@@ -60,6 +62,8 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
public
String
getGroupCode
()
{
return
"linkageUnit"
;
...
...
@@ -67,7 +71,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
/**
* 分页查询
*
*
* @param inAgreement
*/
@Override
...
...
@@ -79,9 +83,11 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
String
linkageUnitType
,
String
emergencyLinkageUnitCode
,
String
inAgreement
,
String
bizOrgCode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
Page
<
List
<
LinkageUnitDto
>>
linkageUnitList
=
linkageUnitMapper
.
getEmergencyLinkageUnitList
(
page
,
unitName
,
linkageUnitType
,
linkageUnitTypeCode
,
emergencyLinkageUnitCode
,
inAgreement
,
bizOrgCode
);
List
<
Map
>
linkageUnitListMap
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
linkageUnitList
.
getRecords
()),
Map
.
class
);
List
<
Map
<
String
,
Object
>>
pageList
=
dynamicFormInstanceService
.
listAll
(
getGroupCode
());
linkageUnitListMap
.
forEach
(
i
->
{
String
mainString
=
i
.
get
(
"instanceId"
).
toString
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/MaintenanceCompanyServiceImpl.java
View file @
c724a94c
...
...
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.common.api.dto.MaintenanceCompanyDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.MaintenancePersonExcleDto
;
...
...
@@ -25,6 +26,7 @@ import com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyServic
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -80,6 +82,8 @@ public class MaintenanceCompanyServiceImpl
SourceFileServiceImpl
sourceFileService
;
@Autowired
OrgUsrMapper
orgUsrMapper
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
private
static
final
String
STATUS
=
"status"
;
...
...
@@ -715,6 +719,8 @@ public class MaintenanceCompanyServiceImpl
wrapper
.
eq
(
MaintenanceCompany:
:
getType
,
COMPANY
);
// 查询所有维保单位信息
List
<
MaintenanceCompany
>
lists
=
maintenanceCompanyMapper
.
selectList
(
wrapper
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
lists
.
forEach
(
list
->
{
Map
<
String
,
Object
>
maintenanceCompany
=
new
HashMap
<>();
maintenanceCompany
.
put
(
"id"
,
list
.
getSequenceNbr
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
c724a94c
...
...
@@ -184,6 +184,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Autowired
IdxFeignClient
idxFeignClient
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyAuthEnabled
;
public
static
List
<
OrgMenuDto
>
buildTreeParallel
(
List
<
OrgUsr
>
list
)
{
List
<
OrgMenuDto
>
menuList
=
list
.
stream
()
...
...
@@ -1854,6 +1857,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public
UserUnitDto
getUserUnit
(
String
userId
)
{
String
[]
typeArr
=
TYPE
.
split
(
","
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
// 业主单位人员
List
<
UserUnitDto
>
list
=
orgUsrMapper
.
getUserUnit
(
userId
,
typeArr
[
0
],
null
);
// 维保单位人员
...
...
@@ -1901,6 +1906,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
List
<
UserDto
>
userDtoList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotBlank
(
userId
))
{
String
[]
typeArr
=
TYPE
.
split
(
","
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
// 业主单位
List
<
UserDto
>
list
=
orgUsrMapper
.
getUserInfo
(
userId
,
typeArr
[
0
],
null
,
FIELD_CODE
.
split
(
","
));
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
...
...
@@ -2772,6 +2779,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public
UserDto
getUserParentInfo
(
String
userId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyAuthEnabled
);
OrgUsr
orgUsr
=
orgUsrMapper
.
queryByUserId
(
Long
.
parseLong
(
userId
));
if
(
null
!=
orgUsr
)
{
UserDto
userDto
=
new
UserDto
();
...
...
@@ -2800,6 +2810,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public
UserDto
selectByIdUser
(
String
userId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
OrgUsr
orgUsr
=
orgUsrMapper
.
queryByUserId
(
Long
.
parseLong
(
userId
));
if
(
null
!=
orgUsr
)
{
UserDto
userDto
=
new
UserDto
();
...
...
@@ -2842,6 +2854,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if
(
userDto
.
getBizOrgType
().
equals
(
"COMPANY"
)){
return
userDto
.
getBizOrgCode
();
}
else
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
OrgUsr
bizOrg
=
orgUsrMapper
.
queryBySequenceNbr
(
userDto
.
getParentId
());
return
getCompany
(
bizOrg
);
}
...
...
@@ -3588,7 +3602,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public
List
<
OrgMenuDto
>
companyUserTreeByUserAndTypeAll
(
String
bizorgcode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyAuthEnabled
);
List
<
OrgUsr
>
list
=
orgUsrMapper
.
companyUserTreeByUserAndTypeALL
(
bizorgcode
);
return
buildTreeParallel
(
list
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BigScreenController.java
View file @
c724a94c
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.equipmanage.common.utils.CommonPageable
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
...
...
@@ -50,6 +51,9 @@ public class BigScreenController extends AbstractBaseController {
@Value
(
"${equipment.pressurepump.start}"
)
private
String
pressurePumpStart
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyEnabled
;
@GetMapping
(
value
=
"/list"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"系统、消防水池、工业水池、水源总容积、消防车辆(接口弃用)"
,
notes
=
"系统、消防水池、工业水池、水源总容积、消防车辆"
)
...
...
@@ -82,6 +86,8 @@ public class BigScreenController extends AbstractBaseController {
@ApiOperation
(
value
=
"稳压泵列表信息"
)
@GetMapping
(
"/getPressurePumpInfo"
)
public
ResponseModel
getPressurePumpInfo
(
CommonPageable
commonPageable
,
@RequestParam
(
required
=
false
,
value
=
"companyCode"
)
String
companyCode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/AnalysisReportLogServiceImpl.java
View file @
c724a94c
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto
;
import
com.yeejoin.equipmanage.common.entity.AnalysisReportLog
;
import
com.yeejoin.equipmanage.common.entity.UploadFile
;
...
...
@@ -60,6 +61,9 @@ public class AnalysisReportLogServiceImpl extends ServiceImpl<AnalysisReportLogM
@Value
(
"classpath:/json/systemIndex.json"
)
private
Resource
systemIndex
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Override
public
IPage
<
AnalysisReportLog
>
listPage
(
Page
page
,
AnalysisReportLog
analysisReportLog
)
{
...
...
@@ -87,6 +91,8 @@ public class AnalysisReportLogServiceImpl extends ServiceImpl<AnalysisReportLogM
this
.
saveAnalysisReportLog
(
reportEnum
,
beginDate
,
endDate
);
// 创建月分析统计报告数据
// 1、 查询消防系统表,捞出所有系统,新增字段,存放自定义用的告警指标模糊查询指标key,逗号分隔
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
Map
<
String
,
Object
>>
list
=
fireFightingSystemMapper
.
selectSystemByBizOrgCode
(
null
);
// 2、循环插入 wl_analysis_report_month、wl_analysis_report_summary
String
beginDateStr
=
DateUtils
.
dateFormat
(
beginDate
,
DateUtils
.
DATE_PATTERN
);
...
...
@@ -105,6 +111,8 @@ public class AnalysisReportLogServiceImpl extends ServiceImpl<AnalysisReportLogM
filter
(
index
->
index
.
get
(
"code"
).
equals
(
String
.
valueOf
(
f
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
collect
))
{
String
indicator
=
String
.
valueOf
(
collect
.
get
(
0
).
get
(
"index"
));
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
analysisReportMonthMapper
.
insertSystemMonthData
(
new
ArrayList
<>(
Arrays
.
asList
(
indicator
.
split
(
","
))),
beginDateStr
,
endDateStr
,
Long
.
valueOf
(
f
.
get
(
"id"
).
toString
()));
analysisReportSummaryMapper
.
insertSystemMonthSummaryData
(
new
ArrayList
<>(
Arrays
.
asList
(
indicator
.
split
(
","
))),
beginDateStr
,
endDateStr
,
Long
.
valueOf
(
f
.
get
(
"id"
).
toString
()));
}
...
...
@@ -118,6 +126,8 @@ public class AnalysisReportLogServiceImpl extends ServiceImpl<AnalysisReportLogM
this
.
saveAnalysisReportLog
(
reportEnum
,
beginDate
,
endDate
);
// 创建月分析统计报告数据
// 1、 查询消防系统表,捞出所有系统,新增字段,存放自定义用的告警指标模糊查询指标key,逗号分隔
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
Map
<
String
,
Object
>>
list
=
fireFightingSystemMapper
.
selectSystemByBizOrgCode
(
null
);
// 2、循环插入 wl_analysis_report_month、wl_analysis_report_summary
String
beginDateStr
=
DateUtils
.
dateFormat
(
beginDate
,
DateUtils
.
DATE_PATTERN
);
...
...
@@ -136,6 +146,8 @@ public class AnalysisReportLogServiceImpl extends ServiceImpl<AnalysisReportLogM
filter
(
index
->
index
.
get
(
"code"
).
equals
(
String
.
valueOf
(
f
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
collect
))
{
String
indicator
=
String
.
valueOf
(
collect
.
get
(
0
).
get
(
"index"
));
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
analysisReportMonthMapper
.
insertSystemMonthData
(
new
ArrayList
<>(
Arrays
.
asList
(
indicator
.
split
(
","
))),
beginDateStr
,
endDateStr
,
Long
.
valueOf
(
f
.
get
(
"id"
).
toString
()));
analysisReportSummaryMapper
.
insertSystemMonthSummaryData
(
new
ArrayList
<>(
Arrays
.
asList
(
indicator
.
split
(
","
))),
beginDateStr
,
endDateStr
,
Long
.
valueOf
(
f
.
get
(
"id"
).
toString
()));
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
c724a94c
...
...
@@ -11,6 +11,7 @@ import com.google.common.collect.Lists;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowFlakeGenerateIdWorker
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
...
...
@@ -148,6 +149,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Value
(
"${auth-key-fire-build-video:fire_build_video_info}"
)
private
String
buildVideoAuthKey
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyEnable
;
@Autowired
private
JCSRemoteService
jcsRemoteService
;
...
...
@@ -177,6 +181,10 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Value
(
"${firefightingsystem.equip.alarms.url}"
)
private
String
ffsEquipAlarmsUrl
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyAuthEnabled
;
final
String
ALL_BUILDING
=
"allBuilding"
;
final
static
String
[]
list
=
{
"92031900"
,
"92011000"
,
"92010700"
};
...
...
@@ -363,6 +371,8 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
private
void
synWarehouse
(
Map
<
String
,
Object
>
formKeyMap
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnable
);
String
parentId
=
(
String
)
formKeyMap
.
get
(
"parentId"
);
String
stuctureName
=
formInstanceMapper
.
getStuctureName
(
parentId
);
if
(
StringUtils
.
isEmpty
(
stuctureName
)){
...
...
@@ -377,6 +387,8 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
public
Object
updateForm
(
Long
instanceId
,
String
orgCode
,
Map
<
String
,
Object
>
map
,
String
groupCode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnable
);
if
(
StringUtil
.
isNotEmpty
(
groupCode
))
{
map
.
keySet
().
forEach
(
x
->
{
formInstanceMapper
.
updateFormFieldValue
(
instanceId
,
x
,
String
.
valueOf
(
map
.
get
(
x
)));
...
...
@@ -399,6 +411,8 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
if
(!
"0"
.
equals
(
parentId
))
{
fullName
=
parentName
+
'-'
+
name
;
}
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyAuthEnabled
);
formInstanceMapper
.
updateStr
(
instanceId
,
name
,
fullName
,
parentId
,
code
,
bizOrgCode
,
bizOrgName
);
/*若还有子级节点,一起修改*/
List
<
Map
<
String
,
Object
>>
result
=
formInstanceMapper
.
getParentId
(
instanceId
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/CarServiceImpl.java
View file @
c724a94c
...
...
@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.github.pagehelper.util.StringUtil
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
...
...
@@ -171,6 +172,9 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
@Value
(
"${car.max.speed:100}"
)
private
Integer
CAR_MAX_SPEED
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
/**
* 当前登录用户信息
*/
...
...
@@ -1299,6 +1303,8 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
@Override
public
List
<
CarPropertyVo
>
getCarPropertyList
(
List
<
Long
>
idList
,
Long
teamId
,
String
nameKeys
,
Integer
isIot
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
CarPropertyVo
>
list
=
carMapper
.
getCarPropertyList
(
idList
,
teamId
,
nameKeys
,
isIot
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
return
list
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
c724a94c
...
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.IotSystemAlarmRo
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
...
...
@@ -83,6 +84,9 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
private
static
IEquipmentSpecificSerivce
equipmentSpecificSerivce
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Autowired
@Lazy
...
...
@@ -137,6 +141,8 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
@Override
public
Map
<
String
,
Object
>
getDetailsById
(
String
alarmId
,
String
equipId
,
String
type
,
String
area
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
final
String
videoType
=
"video"
;
Map
<
String
,
Object
>
res
=
new
HashMap
<>();
if
(
videoType
.
equals
(
type
))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
c724a94c
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service.impl;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipTypeAmountPageDTO
;
...
...
@@ -68,6 +69,9 @@ public class EmergencyServiceImpl implements IEmergencyService {
@Value
(
"${equipment.pressurepump.start.cron}"
)
private
String
pumpYesterdayStart
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Override
public
List
<
Map
<
String
,
Object
>>
getSystemState
(
String
bizOrgCode
)
{
List
<
Map
<
String
,
Object
>>
list
=
emergencyMapper
.
getSystemState
(
bizOrgCode
);
...
...
@@ -192,6 +196,8 @@ public class EmergencyServiceImpl implements IEmergencyService {
@Override
public
List
<
Map
<
String
,
Object
>>
selectAlarmAnalysis
(
String
startDate
,
String
endDate
,
String
dataType
,
String
date
,
String
systemType
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
String
>
strings
=
emergencyMapper
.
selectSystemCodes
(
systemType
);
if
(!
CollectionUtils
.
isEmpty
(
strings
))
{
return
emergencyMapper
.
selectAlarmAnalysis
(
startDate
,
endDate
,
dataType
,
date
,
strings
);
...
...
@@ -202,6 +208,8 @@ public class EmergencyServiceImpl implements IEmergencyService {
@Override
public
List
<
Map
<
String
,
Object
>>
selectAlarmAnalysisCount
(
String
systemType
,
String
startDate
,
String
endDate
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
String
>
strings
=
emergencyMapper
.
selectSystemCodes
(
systemType
);
if
(!
CollectionUtils
.
isEmpty
(
strings
))
{
return
emergencyMapper
.
selectAlarmAnalysisCount
(
startDate
,
endDate
,
strings
);
...
...
@@ -217,6 +225,8 @@ public class EmergencyServiceImpl implements IEmergencyService {
@Override
public
List
<
Map
<
String
,
Object
>>
selectFireCannonAlarmAnalysisPie
(
String
startDate
,
String
endDate
,
String
systemType
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
String
>
strings
=
emergencyMapper
.
selectSystemCodes
(
systemType
);
if
(!
CollectionUtils
.
isEmpty
(
strings
))
{
return
emergencyMapper
.
selectFireCannonAlarmAnalysisPie
(
startDate
,
endDate
,
strings
);
...
...
@@ -226,6 +236,8 @@ public class EmergencyServiceImpl implements IEmergencyService {
@Override
public
List
<
Map
<
String
,
Object
>>
waterSystemAlarmAnalysisPie
(
String
startDate
,
String
endDate
,
String
systemType
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
String
>
strings
=
emergencyMapper
.
selectSystemCodes
(
systemType
);
if
(!
CollectionUtils
.
isEmpty
(
strings
))
{
return
emergencyMapper
.
waterSystemAlarmAnalysisPie
(
startDate
,
endDate
,
strings
);
...
...
@@ -235,6 +247,8 @@ public class EmergencyServiceImpl implements IEmergencyService {
@Override
public
List
<
Map
<
String
,
Object
>>
waterSystemAlarmAnalysis
(
String
startDate
,
String
endDate
,
String
dataType
,
String
date
,
String
systemType
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
String
>
strings
=
emergencyMapper
.
selectSystemCodes
(
systemType
);
if
(!
CollectionUtils
.
isEmpty
(
strings
))
{
return
emergencyMapper
.
waterSystemAlarmAnalysis
(
startDate
,
endDate
,
dataType
,
date
,
strings
);
...
...
@@ -245,6 +259,8 @@ public class EmergencyServiceImpl implements IEmergencyService {
@Override
public
List
<
Map
<
String
,
Object
>>
fireCannonSystemAlarmAnalysis
(
String
startDate
,
String
endDate
,
String
dataType
,
String
date
,
String
systemType
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
String
>
strings
=
emergencyMapper
.
selectSystemCodes
(
systemType
);
if
(!
CollectionUtils
.
isEmpty
(
strings
))
{
return
emergencyMapper
.
fireCannonSystemAlarmAnalysis
(
startDate
,
endDate
,
dataType
,
date
,
strings
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentManageServiceImpl.java
View file @
c724a94c
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.equipmanage.common.entity.DynamicFormGroup
;
...
...
@@ -51,6 +52,8 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
@Value
(
"${equipment.fire.systemid}"
)
private
String
fireSystemId
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Override
public
Map
<
String
,
Object
>
queryEquipmenInfoAndCount
(
String
equimentName
,
String
equimentCode
,
String
construction
,
String
maintenance
,
...
...
@@ -70,6 +73,8 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
map
.
put
(
"nameOrCode"
,
nameOrCode
);
map
.
put
(
"systemStatus"
,
systemStatus
);
map
.
put
(
"invokeSource"
,
invokeSource
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
EquipmentManageVo
>
dataList
=
equipmentManageMapper
.
queryEquipmenInfo
(
map
);
Long
count
=
equipmentManageMapper
.
queryEquipmenCount
(
map
);
map
.
clear
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmLogServiceImpl.java
View file @
c724a94c
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentAlarmLogDto
;
import
com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO
;
...
...
@@ -73,9 +74,13 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
IotFeign
iotFeign
;
@Autowired
IESeqService
eSeqService
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Override
public
void
updateAlarmLogByIotCodeAndIndexKey
(
EquipmentSpecificAlarm
equipmentSpecificAlarm
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
equipmentSpecificAlarmLogMapper
.
updateAlarmLogByIotCodeAndIndexKey
(
equipmentSpecificAlarm
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
c724a94c
...
...
@@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
...
...
@@ -80,6 +81,8 @@ import static org.typroject.tyboot.core.foundation.utils.DateTimeUtil.ISO8601_DA
@Slf4j
public
class
EquipmentSpecificSerivceImpl
extends
ServiceImpl
<
EquipmentSpecificMapper
,
EquipmentSpecific
>
implements
IEquipmentSpecificSerivce
{
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
private
final
String
injection
=
"{\n"
+
"\n"
+
" \"items\": [\n"
+
...
...
@@ -376,6 +379,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Value
(
"${equipment.pressurepump.start}"
)
private
String
pressurePumpStart
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
private
StockBill
buildStockBills
(
EquipmentSpecific
equipmentSpecific
,
ReginParams
reginParams
,
AgencyUserModel
agencyUserModel
)
{
StockBill
stockBill
=
new
StockBill
();
stockBill
.
setCreatorId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
...
...
@@ -1186,6 +1192,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
public
Map
<
String
,
Double
>
getEquipLocationInfo
(
Long
equipmentSpecificId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
return
equipmentSpecificMapper
.
getEquipLocationInfo
(
equipmentSpecificId
);
}
...
...
@@ -2138,6 +2146,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Override
public
void
updateEquipSpecificStatus
(
String
status
,
String
id
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
Integer
num
=
equipmentSpecificMapper
.
updateEquipSpecificStatus
(
status
,
id
);
if
(
0
<
num
)
{
...
...
@@ -2145,6 +2155,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
if
(
StringUtil
.
isNotEmpty
(
equipmentSpecific
.
getSystemId
()))
{
List
<
String
>
ids
=
new
ArrayList
<>();
ids
=
Arrays
.
asList
(
equipmentSpecific
.
getSystemId
().
split
(
","
));
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
ids
.
forEach
(
x
->
{
// 系统赋码
String
equipStatus
=
equipmentSpecificMapper
.
getEquipStatusList
(
x
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
c724a94c
...
...
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
...
...
@@ -155,6 +156,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Value
(
"${auth-key-fire-system:fire_system_info}"
)
private
String
authKey
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyEnabled
;
@Value
(
"${equipment.type}"
)
String
equipmentCategoryLeftTypeCode
;
...
...
@@ -169,6 +173,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Value
(
"${redis_equip_type_count}"
)
private
String
equipTypeAndCount
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyAuthEnabled
;
@Autowired
@Lazy
...
...
@@ -219,6 +225,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
userMap.put(z.getUserId(), z.getRealName());
});
}*/
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyAuthEnabled
);
dataList
.
forEach
(
x
->
{
// x.setChargePerson(userMap.get(x.getChargePerson()));
x
.
setSystemimg
(
equipmentManageMapper
.
getFiles
(
valueOf
(
x
.
getId
()),
"face"
));
...
...
@@ -1437,6 +1445,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
public
Map
<
String
,
Object
>
equipAlarmTOP
(
HashMap
<
String
,
Object
>
hashMap
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
String
id
=
fireFightingSystemMapper
.
equipmentId
(
hashMap
);
hashMap
.
put
(
"systemId"
,
id
);
...
...
@@ -1460,6 +1470,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
public
Page
<
Map
<
String
,
Object
>>
equipmentState
(
Page
res
,
HashMap
<
String
,
Object
>
hashMap
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
Page
result
=
new
Page
<>(
res
.
getCurrent
(),
res
.
getSize
());
String
id
=
fireFightingSystemMapper
.
equipmentId
(
hashMap
);
Page
<
Map
<
String
,
Object
>>
mapPage
=
fireFightingSystemMapper
.
equipmentState
(
result
,
id
);
...
...
@@ -1468,6 +1480,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
public
Page
<
Map
<
String
,
Object
>>
equipmentStateBySuper
(
Page
res
,
HashMap
<
String
,
Object
>
hashMap
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
Page
result
=
new
Page
<>(
res
.
getCurrent
(),
res
.
getSize
());
String
id
=
fireFightingSystemMapper
.
equipmentIdBySuper
(
hashMap
);
if
(!
StringUtil
.
isNotEmpty
(
id
))
{
...
...
@@ -1582,6 +1596,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
public
BigScreenVo
getCarInfo
(
String
companyCode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
String
bizOrgCode
=
null
;
if
(
StringUtil
.
isNotEmpty
(
companyCode
))
{
bizOrgCode
=
fireFightingSystemMapper
.
queryByCompanyCode
(
companyCode
);
...
...
@@ -1603,6 +1619,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
private
Map
<
String
,
Object
>
getData
(
String
bizOrgCode
,
String
startDate
,
String
endDate
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
// 查询该站信息以及所有系统
List
<
Map
<
String
,
Object
>>
system
=
fireFightingSystemMapper
.
selectSystemByBizOrgCode
(
bizOrgCode
);
...
...
@@ -1808,6 +1826,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
private
Map
<
String
,
Object
>
getWeekData
(
String
bizOrgCode
,
String
startDate
,
String
endDate
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
// 查询该站信息以及所有系统
List
<
Map
<
String
,
Object
>>
systemList
=
fireFightingSystemMapper
.
selectSystemByBizOrgCode
(
bizOrgCode
);
...
...
@@ -2013,6 +2033,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
private
Map
<
String
,
Object
>
getDayData
(
String
bizOrgCode
,
String
startDate
,
String
endDate
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
// 查询该站信息以及所有系统
List
<
Map
<
String
,
Object
>>
systemList
=
fireFightingSystemMapper
.
selectSystemByBizOrgCode
(
bizOrgCode
);
...
...
@@ -2221,6 +2243,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
public
Page
<
Map
<
String
,
Object
>>
getWaterInfo
(
Page
page
,
String
companyCode
,
String
systemCode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
String
bizOrgCode
=
null
;
if
(
StringUtil
.
isNotEmpty
(
companyCode
))
{
bizOrgCode
=
fireFightingSystemMapper
.
queryByCompanyCode
(
companyCode
);
...
...
@@ -2230,6 +2254,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
public
Page
<
Map
<
String
,
Object
>>
getSystemInfo
(
Page
page
,
String
companyCode
,
String
systemCode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
String
bizOrgCode
=
null
;
if
(
StringUtil
.
isNotEmpty
(
companyCode
))
{
bizOrgCode
=
fireFightingSystemMapper
.
queryByCompanyCode
(
companyCode
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FormInstanceServiceImpl.java
View file @
c724a94c
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
com.yeejoin.equipmanage.common.entity.FormGroup
;
...
...
@@ -78,6 +79,9 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
@Value
(
"${systemctl.dict.building-structure-type}"
)
private
String
buildingStructureType
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
private
final
String
CODE
=
"code"
;
private
final
String
ORGCODE
=
"orgCode"
;
...
...
@@ -133,6 +137,8 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
public
Map
<
String
,
Object
>
updateInstance
(
Long
instanceId
,
String
companyCode
,
Map
<
String
,
Object
>
map
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
//1.插入前数据校验
List
<
FormInstance
>
list
=
this
.
queryByInstanceId
(
instanceId
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MaintenanceResourceDataServiceImpl.java
View file @
c724a94c
...
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.equipmanage.common.dto.MaintenanceResourceDataDto
;
import
com.yeejoin.equipmanage.common.entity.MaintenanceResource
;
import
com.yeejoin.equipmanage.common.entity.MaintenanceResourceData
;
...
...
@@ -26,6 +27,7 @@ import org.apache.logging.log4j.LogManager;
import
org.apache.logging.log4j.Logger
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -61,6 +63,9 @@ public class MaintenanceResourceDataServiceImpl extends ServiceImpl<MaintenanceR
@Autowired
private
EmqKeeper
emqKeeper
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
/**
* 查询消防设施资源数据
*
...
...
@@ -113,6 +118,8 @@ public class MaintenanceResourceDataServiceImpl extends ServiceImpl<MaintenanceR
*/
@Override
public
int
deleteMaintenanceResourceDataByIds
(
Long
[]
ids
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
if
(
ids
!=
null
&&
ids
.
length
>
0
)
{
List
<
MaintenanceResourceDataDto
>
list
=
maintenanceResourceDataMapper
.
deleteBeforeMainResCount
(
ids
);
List
<
MaintenanceResourceDataDto
>
list1
=
maintenanceResourceDataMapper
.
deleteBeforeMainResCount
(
null
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MaintenanceResourceServiceImpl.java
View file @
c724a94c
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.equipmanage.common.dto.MaintenanceResourceDto
;
import
com.yeejoin.equipmanage.common.dto.WaterResourceDto
;
import
com.yeejoin.equipmanage.common.dto.WaterResourceTypeDto
;
...
...
@@ -20,6 +21,7 @@ import com.yeejoin.equipmanage.mapper.MaintenanceResourceDataMapper;
import
com.yeejoin.equipmanage.mapper.MaintenanceResourceMapper
;
import
com.yeejoin.equipmanage.service.IMaintenanceResourceService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -50,6 +52,9 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
@Autowired
private
JcsFeign
jcsFeign
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
/**
* 查询维保设施资源树
*
...
...
@@ -279,6 +284,8 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
@Override
public
IPage
<
MaintenanceResourceDataVo
>
combineDataPage
(
Page
page
,
Long
fireFightSysId
,
Long
fireFacilityId
,
String
fireFacilityName
,
String
classifyId
,
List
<
Long
>
buildingId
,
String
maintenanceCompanyId
,
String
appKey
,
String
product
,
String
token
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
// 存放组合键,ID+type,数据库查看是否已关联
List
<
String
>
keyList
=
new
ArrayList
<>();
int
current
=
Integer
.
parseInt
(
String
.
valueOf
(
page
.
getCurrent
()));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MonitorEventService.java
View file @
c724a94c
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.equipmanage.common.entity.MonitorEvent
;
import
com.yeejoin.equipmanage.common.entity.Video
;
...
...
@@ -14,6 +15,7 @@ import com.yeejoin.equipmanage.mapper.MonitorEventMapper;
import
com.yeejoin.equipmanage.service.IVideoService
;
import
com.yeejoin.equipmanage.service.IVideoSourceService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
...
@@ -51,6 +53,9 @@ public class MonitorEventService
@Autowired
private
IVideoSourceService
videoSourceService
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
public
MonitorEventDto
createMonitorEvent
(
MonitorEventDto
model
)
...
...
@@ -79,6 +84,8 @@ public class MonitorEventService
}
}
model
.
setId
(
UUIDUtils
.
getUUIDInOrderId
().
longValue
());
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
monitorEventMapper
.
saveEvent
(
model
);
return
model
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
c724a94c
...
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.component.influxdb.InfluxDbConnection
;
...
...
@@ -220,6 +221,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
private
Resource
systemStateIndex
;
@Value
(
"${message.alarm.char}"
)
private
String
specialChars
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyEnable
;
public
static
List
<
EquipmentSpecificAlarmLog
>
upAlarmLogStatus
(
String
iotCode
,
String
equipmentSpecificIndexKey
,
String
traceId
,
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
,
...
...
@@ -1383,6 +1386,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
* @param equipmentSpecificIndex equipmentSpecificIndex
*/
private
boolean
doWaterPoolLevel
(
IotDataVO
iotDataVO
,
EquipmentSpecificIndex
equipmentSpecificIndex
,
Map
<
String
,
String
>
messageBody
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnable
);
boolean
alarmFlag
=
false
;
MessageModel
model
=
new
MessageModel
();
Map
<
String
,
Object
>
map
=
fireFightingSystemMapper
.
getWaterPoolLevel
(
equipmentSpecificIndex
.
getEquipmentSpecificId
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/PressurePumpServiceImpl.java
View file @
c724a94c
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.equipmanage.common.dto.OrgUsrDto
;
...
...
@@ -55,6 +56,9 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
@Value
(
"${equipment.pressurepump.pipepressure}"
)
private
String
pressurePumpPipePressure
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyEnabled
;
@Override
@Async
public
void
saveDataToRedis
(
List
<
IotDataVO
>
iotDatalist
,
String
iotCode
,
String
bizOrgCode
)
{
...
...
@@ -437,6 +441,8 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
}
public
List
<
OrgUsrDto
>
getOrgUsrDtoInfo
(
Map
<
String
,
String
>
map
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
return
orgUsrMapper
.
getOrgUsrDtoInfo
(
map
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/QREquipmentKnowledgeServiceImpl.java
View file @
c724a94c
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
...
...
@@ -22,6 +23,7 @@ import com.yeejoin.equipmanage.common.vo.*;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.service.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -85,7 +87,9 @@ public class QREquipmentKnowledgeServiceImpl implements IQRCodeService<ScanResul
private
IEquipmentSpecificSerivce
equipmentSpecificSerivce
;
@Autowired
private
IStockDetailService
iStockDetailService
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
public
ScanResult
<
QREquipResponse
>
scan
(
QRCodeRequest
request
)
throws
RuntimeException
{
try
{
String
qrCode
=
StringUtil
.
splitQRCode
(
request
)[
1
];
...
...
@@ -93,7 +97,7 @@ public class QREquipmentKnowledgeServiceImpl implements IQRCodeService<ScanResul
QREquipResponse
response
=
new
QREquipResponse
();
ScanTypeEnum
type
=
ScanTypeEnum
.
getEnum
(
request
.
getType
());
// 出库需要知道装备的附加信息
response
.
setNeedEdditionalInfo
(
true
);
switch
(
type
)
{
...
...
@@ -249,15 +253,15 @@ public class QREquipmentKnowledgeServiceImpl implements IQRCodeService<ScanResul
if
(
null
==
equipmentSpecific
)
{
throw
new
IllegalArgumentException
(
"该二维码不属于本系统!"
);
}
// if (equipmentSpecific.getSingle() == false){
// throw new IllegalArgumentException("该功能只支持单件管理!");
// }
ScanEquipmentBasicInfo
info
=
new
ScanEquipmentBasicInfo
();
Boolean
flag
=
equipmentSpecificSerivce
.
equipmentgetIsSingleByQrcode
(
qrCode
,
null
);
info
.
setSingleOrDouble
(
flag
);
// 获取装备信息
EquipmentDetail
equipmentDetail
=
iEquipmentDetailService
.
getOneById
(
equipmentSpecific
.
getEquipmentDetailId
());
Equipment
equipmentOne
=
iEquipmentService
.
getById
(
equipmentDetail
.
getEquipmentId
());
...
...
@@ -305,9 +309,9 @@ public class QREquipmentKnowledgeServiceImpl implements IQRCodeService<ScanResul
}
ParsePropertyUtil
.
setting
(
info:
:
setBrand
,
equipmentDetail:
:
getBrand
);
// ParsePropertyUtil.setting(info::setSupplier,
// equipmentDetail::getSupplierName);
ParsePropertyUtil
.
setting
(
info:
:
setDateProduced
,
()
->
DateUtils
.
date2LongStr
(
equipmentSpecific
.
getCreateDate
()));
...
...
@@ -454,7 +458,7 @@ public class QREquipmentKnowledgeServiceImpl implements IQRCodeService<ScanResul
ParsePropertyUtil
.
setting
(
info:
:
setStockDetailId
,
equipmentOnCar:
:
getStockDetailId
);
//设置二维码包含数量
info
.
setAmount
(
stockDetail
.
getAmount
());
ParsePropertyUtil
.
setting
(
info:
:
setStatus
,
()
->
EquipStatusEnum
.
getEnum
(
Long
.
valueOf
(
stockDetail
.
getStatus
())).
getDescribe
());
ParsePropertyUtil
.
setting
(
info:
:
setCarType
,
()
->
{
...
...
@@ -485,8 +489,8 @@ public class QREquipmentKnowledgeServiceImpl implements IQRCodeService<ScanResul
.
selectById
(
detail1
.
getWarehouseStructureId
());
// 获取仓库
Warehouse
warehouse
=
warehouseDao
.
selectById
(
detail1
.
getWarehouseId
());
//设置二维码包含数量
info
.
setAmount
(
detail1
.
getAmount
());
ParsePropertyUtil
.
setting
(
info:
:
setGoodsAllocationCode
,
warehouseStructure:
:
getCode
);
...
...
@@ -520,11 +524,11 @@ public class QREquipmentKnowledgeServiceImpl implements IQRCodeService<ScanResul
d
->
EquipStatusEnum
.
getEnum
(
Long
.
valueOf
(
d
.
getStatus
()))
==
EquipStatusEnum
.
REPAIR
);
List
<
StockDetail
>
maintainE
=
ArrayUtil
.
filter
(
details
,
d
->
EquipStatusEnum
.
getEnum
(
Long
.
valueOf
(
d
.
getStatus
()))
==
EquipStatusEnum
.
ONCAR
);
// List<StockDetail> retirementEquips =
// ArrayUtil.filter(details, d ->
// EquipStatusEnum.getEnum(Long.valueOf(d.getStatus())) ==
...
...
@@ -538,7 +542,7 @@ public class QREquipmentKnowledgeServiceImpl implements IQRCodeService<ScanResul
ParsePropertyUtil
.
setting
(
info:
:
setCarType
,
()
->
findCategoryNameByID
(
lossEquips
.
get
(
0
).
getId
()));
ParsePropertyUtil
.
setting
(
info:
:
setCarCompany
,
getSelectedOrgInfo
().
getCompany
()::
getCompanyName
);
}
else
if
(!
maintainEquips
.
isEmpty
())
{
//设置二维码包含数量
info
.
setAmount
(
maintainEquips
.
get
(
0
).
getAmount
());
ParsePropertyUtil
.
setting
(
info:
:
setStatus
,
()
->
EquipStatusEnum
.
REPAIR
.
getDescribe
());
...
...
@@ -547,28 +551,28 @@ public class QREquipmentKnowledgeServiceImpl implements IQRCodeService<ScanResul
()
->
findCategoryNameByID
(
maintainEquips
.
get
(
0
).
getId
()));
ParsePropertyUtil
.
setting
(
info:
:
setCarCompany
,
getSelectedOrgInfo
().
getCompany
()::
getCompanyName
);
}
else
if
(!
maintainE
.
isEmpty
()){
//查询车载数量
EquipmentOnCar
equipmentOnCar
=
findEquipmentOnCarda
(
maintainE
.
get
(
0
).
getId
());
//设置二维码包含数量
info
.
setAmount
(
equipmentOnCar
.
getAmount
());
ParsePropertyUtil
.
setting
(
info:
:
setStatus
,
()
->
EquipStatusEnum
.
ONCAR
.
getDescribe
());
ParsePropertyUtil
.
setting
(
info:
:
setStockDetailId
,
()
->
maintainE
.
get
(
0
).
getId
());
ParsePropertyUtil
.
setting
(
info:
:
setCarType
,
()
->
findCategoryNameByID
(
maintainE
.
get
(
0
).
getId
()));
ParsePropertyUtil
.
setting
(
info:
:
setCarCompany
,
getSelectedOrgInfo
().
getCompany
()::
getCompanyName
);
}
// else if (!retirementEquips.isEmpty()){
// ParsePropertyUtil.setting(info::setStatus,
// ()->EquipStatusEnum.RETIREMENT.getDescribe());
...
...
@@ -628,6 +632,8 @@ public class QREquipmentKnowledgeServiceImpl implements IQRCodeService<ScanResul
}
public
String
findCategoryNameByID
(
long
id
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
Map
<
String
,
Object
>>
list
=
iStockDetailDao
.
findCategoryNameByID
(
id
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
return
list
.
get
(
0
).
get
(
"name"
).
toString
();
...
...
@@ -1117,7 +1123,7 @@ public class QREquipmentKnowledgeServiceImpl implements IQRCodeService<ScanResul
if
(
stockDetail
!=
null
)
{
for
(
int
i
=
0
;
i
<
stockDetail
.
size
();
i
++)
{
num
=
num
+
stockDetail
.
get
(
i
).
getAmount
();
}
}
}
return
num
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/RiskSourceServiceImpl.java
View file @
c724a94c
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.equipmanage.common.dto.FireRiskSourceDto
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.enums.DynamicLabelEnum
;
...
...
@@ -17,6 +18,7 @@ import com.yeejoin.equipmanage.service.IRiskSourceService;
import
liquibase.pro.packaged.E
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -49,6 +51,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
EquipmentSpecificIndexMapper
equipmentSpecificIndexMapper
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Override
@Transactional
public
List
<
FireRiskSourceDto
>
getFiskSourceTierTree
(
Integer
tier
,
Boolean
isRegion
)
{
...
...
@@ -75,6 +80,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
SendToMsgRiskAlarmInfoVo
equipAlarm
=
new
SendToMsgRiskAlarmInfoVo
();
Map
<
String
,
Object
>
m
=
new
HashMap
<>();
RiskBizInfoVo
infoVo
=
new
RiskBizInfoVo
();
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
if
(
source
.
equalsIgnoreCase
(
RiskSourceTypeEnum
.
PATROL
.
getName
()))
{
List
<
Map
<
String
,
Object
>>
checkInputItems
=
equipmentSpecificMapper
.
queryCheckInputItemsByCheckId
(
id
);
Map
<
String
,
Object
>
map
=
checkInputItems
.
get
(
0
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
View file @
c724a94c
...
...
@@ -19,6 +19,7 @@ import java.util.function.Consumer;
import
java.util.stream.Collectors
;
import
java.util.stream.IntStream
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.module.command.api.dto.FrontlineLiaisonDto
;
import
com.yeejoin.amos.boot.module.command.biz.service.impl.FrontlineLiaisonServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.*
;
...
...
@@ -191,6 +192,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
private
String
fireBrigade
=
"fireBrigade"
;
private
String
telephone
=
"telephone"
;
private
String
sequenceNbr
=
"sequenceNbr"
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Autowired
FireTeamServiceImpl
fireTeamServiceImpl
;
...
...
@@ -892,6 +895,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
String
urlString
=
""
;
report
.
setEndTime
(
DateUtils
.
convertDateToString
(
new
Date
(),
DateUtils
.
DATE_TIME_PATTERN
));
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
// 查询第一次调派
List
<
Map
<
String
,
Object
>>
first
=
alertSubmittedMapper
.
getFirst
(
alertCalled
.
getSequenceNbr
());
...
...
@@ -1151,6 +1156,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
dto
.
setStation
(
map
.
get
(
companyName
).
toString
());
// 随车人员
if
(
map
.
containsKey
(
"id"
))
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
PowerData
>
powerDataOne
=
powerTransferMapper
.
getPowerDataOne
(
Long
.
valueOf
(
map
.
get
(
"id"
).
toString
()));
if
(!
ValidationUtil
.
isEmpty
(
powerDataOne
))
{
dto
.
setPersonNum
(
String
.
valueOf
(
powerDataOne
.
size
()));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferServiceImpl.java
View file @
c724a94c
...
...
@@ -6,6 +6,7 @@ import java.util.stream.Collectors;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.common.api.entity.DutyShift
;
import
com.yeejoin.amos.boot.module.common.api.mapper.DutyPersonShiftMapper
;
...
...
@@ -131,6 +132,8 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
private
static
final
String
USERNAME
=
"userName"
;
private
static
final
String
COUNT
=
"count"
;
private
static
final
String
TOTAL
=
"total"
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Override
...
...
@@ -299,13 +302,13 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
if
(
specifyDateList
==
null
||
specifyDateList
.
size
()
<
1
||
specifyDateList
.
get
(
0
)
==
null
)
{
continue
;
}
int
num
=
0
;
LinkedHashMap
<
String
,
String
>
infoMap_1
=
new
LinkedHashMap
<
String
,
String
>();
for
(
Map
<
String
,
Object
>
specify
:
specifyDateList
)
{
//
if
(
specify
.
containsKey
(
USERNAME
)
&&
specify
.
get
(
USERNAME
)
!=
null
)
{
if
(
specify
.
get
(
USERNAME
).
toString
().
contains
(
","
))
{
String
[]
userNames
=
specify
.
get
(
USERNAME
).
toString
().
split
(
","
);
num
=
num
+
userNames
.
length
;
...
...
@@ -660,6 +663,8 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
@Override
public
List
<
PowerCompanyCountDto
>
getPowerCompanyCountDtocount
(
Long
id
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
PowerCompanyCountDto
>
list
=
powerTransferMapper
.
getPowerCompanyCountDtocount
(
id
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
list
.
stream
().
forEach
(
powerCompanyCountDto
->
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CheckController.java
View file @
c724a94c
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.patrol.business.controller;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
import
com.yeejoin.amos.patrol.business.dao.mapper.CheckMapper
;
...
...
@@ -124,6 +125,8 @@ public class CheckController extends AbstractBaseController {
@Autowired
PointMapper
pointMapper
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
/**
*
...
...
@@ -303,6 +306,8 @@ public class CheckController extends AbstractBaseController {
}
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
Map
<
String
,
Object
>>
checkInputItems
=
checkMapper
.
queryCheckInputItemsByCheckId
(
checkDto
.
getCheckId
());
publishDataToMessage
(
checkInputItems
);
is
.
pointCheckInfoPushToB
(
checkDto
.
getCheckId
());
...
...
@@ -349,6 +354,8 @@ public class CheckController extends AbstractBaseController {
equipInfoVo
.
setTraceId
(
map
.
get
(
"traceId"
).
toString
());
}
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
Map
<
String
,
Object
>
pointMap
=
pointMapper
.
getPointById
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"pointId"
))));
alarmInfoVo
.
setIndexNo
(
String
.
valueOf
(
pointMap
.
get
(
"id"
)));
alarmInfoVo
.
setName
(
String
.
valueOf
(
pointMap
.
get
(
"pointName"
)));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/InputItemController.java
View file @
c724a94c
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.patrol.business.dao.mapper.InputItemMapper
;
...
...
@@ -81,6 +82,8 @@ public class InputItemController extends AbstractBaseController {
@Autowired
private
RedisUtils
redisUtils
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
/**
* 检查项列表左侧树缓存Key
...
...
@@ -110,6 +113,8 @@ public class InputItemController extends AbstractBaseController {
map
.
put
(
i
,
Integer
.
valueOf
(
result
[
i
]));
}
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
Map
<
String
,
String
>
equipmentCategory
=
inputItemMapper
.
getCategoryByCode
(
treeId
.
replace
(
"@"
,
""
),
"2"
);
if
(
equipmentCategory
==
null
)
{
throw
new
RuntimeException
(
"装备定义code有误"
);
...
...
@@ -127,6 +132,8 @@ public class InputItemController extends AbstractBaseController {
}
break
;
}
else
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
//查找到循环几次为空
equipmentCategory
=
inputItemMapper
.
getCategoryById
(
equipmentCategory
.
get
(
"parentId"
));
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/CheckServiceImpl.java
View file @
c724a94c
...
...
@@ -8,6 +8,7 @@ import com.google.common.base.Joiner;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
...
...
@@ -48,6 +49,7 @@ import org.assertj.core.util.Sets;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cglib.beans.BeanMap
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
...
...
@@ -115,6 +117,11 @@ public class CheckServiceImpl implements ICheckService {
@Autowired
private
IdxFeign
idxFeign
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyEnabled
;
public
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
CheckServiceImpl
.
class
);
...
...
@@ -250,6 +257,8 @@ public class CheckServiceImpl implements ICheckService {
Point
point
=
iPointService
.
queryPointById
(
requestParam
.
getPointId
());
try
{
if
(!
ObjectUtils
.
isEmpty
(
requestParam
)
&&
!
ObjectUtils
.
isEmpty
(
requestParam
.
getPlanTaskId
())
&&
requestParam
.
getPlanTaskId
()
>
0
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
detail
=
planTaskDetailMapper
.
findPlanTaskByTaskIdAndPointId
(
requestParam
.
getPlanTaskId
(),
requestParam
.
getPointId
());
if
(!
ObjectUtils
.
isEmpty
(
detail
))
{
check
=
checkDao
.
findByPlanTaskIdAndPointId
(
requestParam
.
getPlanTaskId
(),
requestParam
.
getPointId
());
...
...
@@ -435,6 +444,8 @@ public class CheckServiceImpl implements ICheckService {
checkService
.
saveCheckImg
(
imgList
);
}
if
(
check
.
getPlanTaskId
()
>
0
&&
null
!=
detail
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
planTaskDetailMapper
.
finishTaskDetail
(
Long
.
parseLong
(
detail
.
get
(
"planTaskDetailId"
).
toString
()),
requestParam
.
getPointId
(),
requestParam
.
getPlanTaskId
(),
user
.
getUserId
());
}
else
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
...
@@ -753,11 +764,15 @@ public class CheckServiceImpl implements ICheckService {
@Override
public
List
<
Map
<
String
,
Object
>>
selectCheckById
(
Long
id
,
Long
pointId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
return
checkMapper
.
selectCheckById
(
id
,
pointId
);
}
@Override
public
void
delCheckByTaskId
(
Long
id
,
List
<
Long
>
ids
,
Long
pointId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
checkMapper
.
delCheckByTaskId
(
id
,
pointId
);
checkMapper
.
delCheckInputByCheckId
(
ids
);
}
...
...
@@ -1519,6 +1534,8 @@ public class CheckServiceImpl implements ICheckService {
}
private
Long
getLastsetCheckByPointID
(
Long
pointId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
Long
checkID
=
checkMapper
.
getLastsetCheckByPointID
(
pointId
);
return
checkID
;
}
...
...
@@ -1533,6 +1550,8 @@ public class CheckServiceImpl implements ICheckService {
}
}
Long
checkID
=
param
.
getCheckID
();
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
long
total
=
checkMapper
.
countCheckInputByMybatis
(
checkID
);
List
<
CheckInputBo
>
content
=
checkMapper
.
getCheckInputByCheckId
(
param
);
CommonPage
<
CheckInputBo
>
result
=
new
CommonPage
<>(
content
,
param
,
total
);
...
...
@@ -1542,6 +1561,8 @@ public class CheckServiceImpl implements ICheckService {
private
EquipFeign
equipment
;
@Override
public
List
<
HashMap
<
String
,
Object
>>
getEquipByCheckId
(
CheckDetailInputPageParam
param
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
// 如果不传巡检ID,则获取最新一条巡检点对应的巡检记录ID
if
(
param
.
getCheckID
()
==
-
1
)
{
Long
checkID
=
getLastsetCheckByPointID
(
param
.
getPointID
());
...
...
@@ -1549,6 +1570,8 @@ public class CheckServiceImpl implements ICheckService {
param
.
setCheckID
(
checkID
);
}
}
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
HashMap
<
String
,
Object
>>
equipList
=
checkMapper
.
getCheckEquipByCheckID
(
param
.
getCheckID
());
equipList
.
forEach
(
equip
->{
param
.
setClassifyId
(
equip
.
get
(
"classifyId"
).
toString
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/InputItemServiceImpl.java
View file @
c724a94c
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.patrol.business.service.impl;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.patrol.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.IInputItemDao
;
...
...
@@ -44,10 +45,15 @@ public class InputItemServiceImpl implements IInputItemService {
private
ICatalogTreeService
iCatalogTreeService
;
@Value
(
"${input.custom.prefix}"
)
private
String
customPre
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyEnabled
;
...
...
@@ -234,6 +240,8 @@ public class InputItemServiceImpl implements IInputItemService {
@Override
public
List
<
PointInputItemVo
>
queryCustomInputItemNew
(
HashMap
<
String
,
Object
>
param
,
String
orgCode
,
String
companyBizOrgCode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
param
.
put
(
"orgCode"
,
orgCode
);
param
.
put
(
"bizOrgCode"
,
companyBizOrgCode
);
List
<
String
>
list
=
new
ArrayList
<>();
...
...
@@ -253,6 +261,8 @@ public class InputItemServiceImpl implements IInputItemService {
}
public
List
<
String
>
getEquipParent
(
String
code
,
List
<
String
>
objects
){
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
Map
<
String
,
String
>
equipmentType
=
inputItemMapper
.
getEquipParentCode
(
code
);
if
(
equipmentType
==
null
)
{
equipmentType
=
inputItemMapper
.
getSystemParentCode
(
code
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/LatentDangerServiceImpl.java
View file @
c724a94c
...
...
@@ -9,6 +9,7 @@ import com.google.common.collect.Maps;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.boot.biz.common.bo.RoleBo
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
...
...
@@ -157,8 +158,13 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
private
static
final
String
path
=
"AppNormalLatentDangerReview"
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyEnabled
;
@Value
(
"${server.port}"
)
private
String
port
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
// @Value("${LatentDanger.flow.photoUrls}")
// private String photoUrlPre;
...
...
@@ -248,6 +254,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
for
(
LatentDangerPatrolItemParam
param
:
itemList
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
InputCheckDto
inputCheckDto
=
checkInputMapper
.
getByCheckIdAndItemIdAndRoutePointItemId
(
checkId
,
param
.
getItemId
(),
param
.
getRoutePointItemId
(),
null
);
if
(
CheckModeEnum
.
WEB_OUT
.
getCode
().
equals
(
check
.
getCheckMode
()))
{
...
...
@@ -340,6 +348,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
latentDangerBo
.
setCurrentFlowRecordId
(
inputRecord
.
getId
());
latentDangerBo
.
setInstanceId
(
instance
.
getString
(
"id"
));
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
latentDangerMapper
.
update
(
latentDangerBo
);
//修改管控措施的状态为失效
LatentDangerPatrolBo
patrolBo
=
latentDangerPatrolMapper
.
getByDangerId
(
latentDangerBo
.
getId
());
...
...
@@ -355,6 +365,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
private
void
updateCheckInputDangerState
(
Long
id
,
int
code
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
latentDangerMapper
.
updateCheckInputDangerState
(
id
,
code
);
// 巡检站端与中心级数据同步
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
...
...
@@ -377,6 +389,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
map
.
put
(
"measuresContentId"
,
measuresContentId
);
map
.
put
(
"evaluateId"
,
evaluateId
);
map
.
put
(
"status"
,
riskFactorsCmStatusEnum
.
getCode
());
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
riskFactorCmMapper
.
updateStatusByMap
(
map
);
RiskFactorBo
riskFactorBo
=
new
RiskFactorBo
();
riskFactorBo
.
setId
(
riskFactorId
);
...
...
@@ -448,6 +462,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
record
.
setDeleted
(
0
);
record
.
setActionFlag
(
taskName
);
record
.
setRemark
(
remark
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
latentDangerFlowRecordMapper
.
save
(
record
);
return
record
;
}
...
...
@@ -476,6 +492,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
if
(
flowJson
!=
null
)
{
flowRecord
.
setFlowJson
(
flowJson
.
toJSONString
());
}
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
latentDangerFlowRecordMapper
.
update
(
flowRecord
);
}
...
...
@@ -695,6 +713,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
DangerExecuteSubmitDto
executeSubmitDto
=
new
DangerExecuteSubmitDto
();
LatentDangerBo
latentDangerBo
=
null
;
if
(
StringUtil
.
isNotEmpty
(
latentDangerExcuteParam
.
getDangerId
()))
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
latentDangerBo
=
latentDangerMapper
.
getById
(
latentDangerExcuteParam
.
getDangerId
());
}
if
(
StringUtil
.
isNotEmpty
(
latentDangerExcuteParam
.
getReformLimitDate
())){
...
...
@@ -751,6 +771,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
JSONObject
task
=
jsonObject
.
getJSONObject
(
"data"
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
LatentDangerBo
latentDangerBo
=
latentDangerMapper
.
getbyBusinessKey
(
task
.
getString
(
"businessKey"
));
// LinkedHashMap<String,Object> positionAll = equipFeign.getBuildingAbsolutePosition();
...
...
@@ -832,6 +854,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
private
void
buildOfDifferentDangerType
(
LatentDangerBo
latentDangerBo
,
LatentDangerDetailVo
detailVo
)
{
if
(
latentDangerBo
.
getDangerType
().
equals
(
LatentDangerTypeEnum
.
计划检查
.
getCode
().
toString
())
||
latentDangerBo
.
getDangerType
().
equals
(
LatentDangerTypeEnum
.
无计划检查
.
getCode
().
toString
()))
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
LatentDangerPatrolBo
patrolBo
=
latentDangerPatrolMapper
.
getByDangerId
(
latentDangerBo
.
getId
());
if
(
patrolBo
!=
null
)
{
LatentDangerDetailRiskVo
riskVo
=
new
LatentDangerDetailRiskVo
();
...
...
@@ -879,6 +903,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
@Override
public
CommonResponse
getByInstanceId
(
String
instanceId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
LatentDangerBo
latentDangerBo
=
latentDangerMapper
.
getByInstanceId
(
instanceId
);
if
(
latentDangerBo
==
null
)
{
return
CommonResponseUtil
.
failure
(
"隐患不存在"
);
...
...
@@ -929,6 +955,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
}
}
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
LatentDangerFlowRecordBo
reviewRecordBo
=
latentDangerFlowRecordMapper
.
getByDangerIdAndActionFlag
(
latentDangerBo
.
getId
(),
"B_2"
);
LatentDangerFlowRecordBo
reformRecordBo
=
latentDangerFlowRecordMapper
.
getByDangerIdAndActionFlag
(
latentDangerBo
.
getId
(),
"B_3"
);
if
(
reviewRecordBo
!=
null
)
{
...
...
@@ -1003,6 +1031,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
String
userId
,
String
userRealName
,
String
departmentId
,
String
departmentName
)
{
DangerExecuteSubmitDto
executeSubmitDto
=
new
DangerExecuteSubmitDto
();
executeSubmitDto
.
setIsOk
(
true
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
LatentDangerBo
latentDangerBo
=
latentDangerMapper
.
getByInstanceId
(
instanceId
);
if
(
latentDangerBo
!=
null
)
{
LatentDangerFlowRecordBo
currentRecord
=
latentDangerFlowRecordMapper
.
getById
(
latentDangerBo
.
getCurrentFlowRecordId
());
...
...
@@ -1021,6 +1051,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
patrolBo
=
latentDangerPatrolMapper
.
getByDangerId
(
latentDangerBo
.
getId
());
userIds
=
Joiner
.
on
(
","
).
join
(
getUserIdsStrByPerTypeAndDefKey
(
flowJson
));
}
else
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
LatentDangerFlowRecordBo
recordBo
=
latentDangerFlowRecordMapper
.
getByDangerIdAndActionFlag
(
latentDangerBo
.
getId
(),
"B_8"
);
userIds
=
recordBo
.
getFlowTaskUserIds
();
}
...
...
@@ -1069,6 +1101,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
patrolBo
=
latentDangerPatrolMapper
.
getByDangerId
(
latentDangerBo
.
getId
());
userIds
=
Joiner
.
on
(
","
).
join
(
getUserIdsStrByPerTypeAndDefKey
(
flowJson
));
}
else
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
LatentDangerFlowRecordBo
recordBo
=
latentDangerFlowRecordMapper
.
getByDangerIdAndActionFlag
(
latentDangerBo
.
getId
(),
"B_3"
);
userIds
=
recordBo
.
getFlowTaskUserIds
();
}
...
...
@@ -1089,6 +1123,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
@Override
public
void
updateDangerStateOfOvertime
()
{
logger
.
info
(
"修改治理过期隐患的逾期状态"
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
LatentDangerBo
>
overtimeList
=
latentDangerMapper
.
listOfOvertime
();
for
(
LatentDangerBo
latentDangerBo
:
overtimeList
)
{
latentDangerBo
.
setOvertimeState
(
LatentDangerOvertimeStateEnum
.
已超时
.
getCode
());
...
...
@@ -1140,6 +1176,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
@Override
public
CommonResponse
listFlowRecord
(
String
token
,
String
product
,
String
appKey
,
Long
id
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
LatentDangerBo
latentDangerBo
=
latentDangerMapper
.
getById
(
id
);
if
(
latentDangerBo
==
null
)
{
return
CommonResponseUtil
.
failure
(
"隐患不存在"
);
...
...
@@ -1300,6 +1338,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
}
else
{
// 延期治理评审通过且 需要 公司审核
latentDangerBo
.
setDangerState
(
LatentDangerStateEnum
.
延期治理申请待公司审核
.
getCode
().
toString
());
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
LatentDangerFlowRecordBo
recordBo
=
latentDangerFlowRecordMapper
.
getByDangerIdAndCreate
(
latentDangerBo
.
getId
());
String
flowJsonStr
=
recordBo
.
getFlowJson
();
...
...
@@ -1348,6 +1388,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
* @return
*/
public
boolean
assignGovernUser
(
LatentDangerBo
latentDangerBo
,
DangerExecuteSubmitDto
executeSubmitDto
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
// 获取最后一次评审时选择的治理人
LatentDangerFlowRecordBo
record
=
latentDangerFlowRecordMapper
.
getByDangerIdAndActionFlag
(
latentDangerBo
.
getId
(),
"隐患评审"
);
JSONObject
recordObj
=
JSONObject
.
parseObject
(
record
.
getFlowJson
());
...
...
@@ -1468,6 +1510,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
private
List
<
String
>
getTroubleList
(
Long
pointId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
List
<
String
>
troubleList
=
Lists
.
newArrayList
();
List
<
LatentDangerPatrolBo
>
patrolList
=
latentDangerPatrolMapper
.
listByPointId
(
pointId
);
if
(!
CollectionUtils
.
isEmpty
(
patrolList
))
{
...
...
@@ -1499,6 +1543,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
private
void
updateRiskSourceDangerState
(
Boolean
isSave
,
Long
riskSourceId
,
LatentDangerLevelEnum
levelEnum
,
Long
pointId
,
Long
dangerId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
RiskSourceBo
riskSourceBo
=
riskSourceMapper
.
getById
(
riskSourceId
);
if
(
riskSourceBo
!=
null
)
{
if
(
isSave
)
{
...
...
@@ -1520,6 +1566,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pointId"
,
pointId
);
params
.
put
(
"dangerId"
,
dangerId
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
LatentDangerBo
>
latentDangerBos
=
latentDangerMapper
.
listNotFinishByPointId
(
params
);
if
(
CollectionUtils
.
isEmpty
(
latentDangerBos
))
{
riskSourceBo
.
setIsDanger
(
false
);
...
...
@@ -1529,6 +1577,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
riskSourceBo
.
setDangerLevel
(
dangerLevel
);
}
}
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
riskSourceMapper
.
updateDangerState
(
riskSourceBo
);
}
}
...
...
@@ -1552,6 +1602,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
@Override
public
void
freshRiskJudgmentLangerCount
(
LatentDangerExcuteParam
latentDangerExcuteParam
)
{
Long
currentFlowRecordId
=
latentDangerExcuteParam
.
getFlowRecordId
();
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
LatentDangerFlowRecordBo
currentRecord
=
latentDangerFlowRecordMapper
.
getById
(
currentFlowRecordId
);
if
(
currentRecord
==
null
)
{
return
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/MessageServiceImpl.java
View file @
c724a94c
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
service
.
impl
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
...
...
@@ -29,6 +30,7 @@ import org.apache.commons.lang.StringUtils;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.http.HttpStatus
;
...
...
@@ -91,10 +93,14 @@ public class MessageServiceImpl implements IMessageService {
@Autowired
private
JcsFeignClient
jcsFeignClient
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Override
public
void
pushCheckMessage
(
String
toke
,
String
product
,
String
appKey
,
Long
checkId
)
{
try
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
//消息发送内容、执行人id,巡检点id,巡检线路id
CheckMsgBo
checkMsgBo
=
msgMapper
.
getCheckMsgBos
(
checkId
);
if
(
checkMsgBo
!=
null
){
...
...
@@ -141,6 +147,8 @@ public class MessageServiceImpl implements IMessageService {
jpushUser
.
add
(
pb
);
}
});
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
//获取需要推送的email的用户
List
<
PushTargetBo
>
emailUser
=
msgMapper
.
getPushUserBo
(
"email"
,
String
.
join
(
","
,
needUserIds
),
checkMsgBo
.
getRouteId
(),
getEmailPushConfig
(
checkMsgBo
.
getStatus
()));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
c724a94c
...
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.amos.boot.biz.common.constants.RuleConstant
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
...
...
@@ -56,6 +57,7 @@ import org.apache.commons.compress.utils.Sets;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
...
...
@@ -141,6 +143,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
private
final
String
WEB
=
"WEB"
;
private
final
String
APP_WEB
=
"APP/WEB"
;
private
static
final
String
TAB
=
"\r\n"
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyEnabled
;
@Override
...
...
@@ -1457,6 +1464,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
if
(
check
!=
null
)
{
pointCheckRespone
=
checkService
.
queryCheckPointDetail
(
toke
,
product
,
appKey
,
check
.
getId
());
}
else
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
PointCheckDetailBo
planPointInfo
=
planTaskMapper
.
getPointPlanTaskInfo
(
planTaskId
,
pointId
);
...
...
@@ -1482,6 +1491,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
pointCheckRespone
.
setPointNo
(
planPointInfo
.
getPointNo
());
pointCheckRespone
.
setPointStatus
(
"0"
);
pointCheckRespone
.
setPlanName
(
planPointInfo
.
getPlanName
());
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
PointCheckDetailBo
>
pointInputs
=
planTaskMapper
.
getPointInputByRouteIdAndPointId
(
planPointInfo
.
getRouteId
(),
planPointInfo
.
getPointId
());
JSONObject
appResponeMap
=
new
JSONObject
();
pointInputs
.
forEach
(
action
->
{
...
...
@@ -1516,11 +1527,15 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Override
public
AppPointCheckRespone
queryPointPlanTaskDetailInVersion2
(
String
toke
,
String
product
,
String
appKey
,
Long
planTaskId
,
Long
pointId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
AppPointCheckRespone
pointCheckRespone
=
new
AppPointCheckRespone
();
Check
check
=
checkDao
.
findByPlanTaskIdAndPointId
(
planTaskId
,
pointId
);
if
(
check
!=
null
)
{
pointCheckRespone
=
checkService
.
queryCheckPointDetailInVersion2
(
toke
,
product
,
appKey
,
check
.
getId
());
}
else
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
PointCheckDetailBo
planPointInfo
=
planTaskMapper
.
getPointPlanTaskInfo
(
planTaskId
,
pointId
);
if
(
planPointInfo
!=
null
)
{
...
...
@@ -1594,6 +1609,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Override
public
AppPointCheckRespone
queryPointPlanTaskDetailInVersion2New
(
Long
planTaskId
,
Long
pointId
)
{
AppPointCheckRespone
pointCheckRespone
=
new
AppPointCheckRespone
();
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
Check
check
=
checkDao
.
findByPlanTaskIdAndPointId
(
planTaskId
,
pointId
);
if
(
check
!=
null
)
{
pointCheckRespone
=
checkService
.
queryCheckPointDetailInVersion2New
(
check
.
getId
());
...
...
@@ -2042,6 +2059,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Override
public
List
<
Map
<
String
,
Object
>>
getStatics
(
String
companyCode
,
String
bizOrgCode
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
if
(
StringUtils
.
isEmpty
(
bizOrgCode
)
&&
StringUtil
.
isNotEmpty
(
companyCode
))
{
bizOrgCode
=
planTaskMapper
.
queryByCompanyCode
(
companyCode
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PointServiceImpl.java
View file @
c724a94c
...
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
import
com.yeejoin.amos.patrol.business.dao.mapper.InputItemMapper
;
...
...
@@ -39,6 +40,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.BeanWrapper
;
import
org.springframework.beans.BeanWrapperImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.*
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.stereotype.Service
;
...
...
@@ -113,6 +115,8 @@ public class PointServiceImpl implements IPointService {
@Autowired
private
IPatrolDataSyncService
patrolDataSyncService
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Override
@Transactional
...
...
@@ -1898,6 +1902,9 @@ public class PointServiceImpl implements IPointService {
@Override
public
List
<
Map
<
String
,
Object
>>
queryEquipPointInputItem
(
Long
pointId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
Map
<
String
,
Object
>>
content
=
pointMapper
.
queryEquipPointInputItem
(
pointId
);
content
.
forEach
(
e
->{
if
(
e
.
get
(
"id"
)!=
null
&&
!
StringUtils
.
isBlank
(
e
.
get
(
"id"
).
toString
())){
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/RiskJudgmentTaskServiceImpl.java
View file @
c724a94c
...
...
@@ -7,6 +7,7 @@ import com.google.common.collect.Lists;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
...
...
@@ -27,6 +28,7 @@ import org.assertj.core.util.Sets;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -67,9 +69,14 @@ public class RiskJudgmentTaskServiceImpl implements IRiskJudgmentTaskService {
@Autowired
private
AsyncTask
asyncTask
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
private
static
final
String
permissionType
=
"activitiItem"
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyEnabled
;
@Override
public
void
initRiskJudgmentTask
(
Date
date
)
{
List
<
CompanyBo
>
companyBoList
=
remoteSecurityService
.
listCompanyTree
();
...
...
@@ -143,6 +150,8 @@ public class RiskJudgmentTaskServiceImpl implements IRiskJudgmentTaskService {
}
private
boolean
initRiskJudgment
(
JSONObject
taskInstance
,
DepartmentBo
departmentBo
,
Date
date
,
List
<
RiskJudgmentItemBo
>
items
,
String
orgCode
,
String
companyId
,
String
instanceId
,
String
businessKey
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
try
{
RiskJudgmentTaskBo
riskJudgmentTaskBo
=
new
RiskJudgmentTaskBo
();
String
currentFlowTaskId
=
taskInstance
.
getString
(
"id"
);
...
...
@@ -265,6 +274,8 @@ public class RiskJudgmentTaskServiceImpl implements IRiskJudgmentTaskService {
public
Long
getCount
(
String
flag
,
String
deptId
)
{
Long
count
=
null
;
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
switch
(
flag
)
{
case
"other_latent_danger_state_"
:
//安全问题--
count
=
latentDangerMapper
.
countNotFinishByTypeAndDeptId
(
0
,
deptId
);
...
...
@@ -333,6 +344,9 @@ public class RiskJudgmentTaskServiceImpl implements IRiskJudgmentTaskService {
@Override
public
void
updateRiskJudgmentTaskToOverTime
(
Date
date
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
String
dateStr
=
DateUtil
.
formatDatrToStr
(
date
,
DateUtil
.
SHORT_PATTERN
);
RiskJudgmentTaskStatusEnum
statusEnum
=
RiskJudgmentTaskStatusEnum
.
已超时
;
List
<
RiskJudgmentTaskBo
>
taskBos
=
riskJudgmentTaskMapper
.
listByDateAndStatus
(
dateStr
,
RiskJudgmentTaskStatusEnum
.
进行中
.
getCode
());
...
...
@@ -366,6 +380,8 @@ public class RiskJudgmentTaskServiceImpl implements IRiskJudgmentTaskService {
@Override
public
void
updateRiskJudgmentTaskToProcess
(
Date
date
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
String
dateStr
=
DateUtil
.
formatDatrToStr
(
date
,
DateUtil
.
SHORT_PATTERN
);
RiskJudgmentTaskStatusEnum
statusEnum
=
RiskJudgmentTaskStatusEnum
.
进行中
;
List
<
RiskJudgmentTaskBo
>
taskBos
=
riskJudgmentTaskMapper
.
listByDateAndStatus
(
dateStr
,
RiskJudgmentTaskStatusEnum
.
未开始
.
getCode
());
...
...
@@ -389,6 +405,8 @@ public class RiskJudgmentTaskServiceImpl implements IRiskJudgmentTaskService {
@Override
public
void
freshRiskJudgmentLangerCount
(
Long
riskSourceId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
RiskSourceBo
riskSource
=
riskSourceMapper
.
getById
(
riskSourceId
);
if
(
riskSource
!=
null
&&
StringUtil
.
isNotEmpty
(
riskSource
.
getBelongDepartmentId
()))
{
Long
count1
=
latentDangerMapper
.
countNotFinishByTypeAndDeptId
(
1
,
riskSource
.
getBelongDepartmentId
());
...
...
@@ -411,6 +429,8 @@ public class RiskJudgmentTaskServiceImpl implements IRiskJudgmentTaskService {
@Override
public
void
freshRiskJudgmentTaskwork
(
String
deptId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKeyEnabled
);
//循环更新riskJudgmentFillRecordMapper 的 select_result and input_result
Long
count
=
0L
;
String
defaultSelectId
=
null
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/RouteServiceImpl.java
View file @
c724a94c
...
...
@@ -13,8 +13,10 @@ import java.util.Set;
import
javax.annotation.Resource
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
...
...
@@ -98,7 +100,9 @@ public class RouteServiceImpl extends ServiceImpl<RouteMapper, Route> implement
@Autowired
private
IRoutePointItemDao
iRoutePointItemDao
;
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKey
;
@Override
...
...
@@ -526,6 +530,8 @@ public class RouteServiceImpl extends ServiceImpl<RouteMapper, Route> implement
@Override
public
List
<
PointInputItemVo
>
listRoutePointInputItem
(
Long
routeId
,
Long
pointId
)
{
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
PointInputItemVo
>
inputItemList
=
routeMapper
.
getInputItemById
(
routeId
,
pointId
);
return
inputItemList
;
}
...
...
amos-boot-system-cas/amos-boot-module-cas-biz/src/main/resources/application.properties
View file @
c724a94c
...
...
@@ -44,7 +44,7 @@ spring.redis.expire.time=300
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.90:1883
emqx.user-name
=
super
emqx.password
=
ENC(cOsjObSVn0vn4se0yiQSt1EpAQtKC6kpZGRsZGPKnvaQZCcbbJohIQXyPuOY+qcD)
...
...
amos-boot-system-ccs/src/main/java/com/yeejoin/amos/AmoCCSApplication.java
View file @
c724a94c
...
...
@@ -11,13 +11,18 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.security.SecureRandom
;
import
java.util.Collections
;
/**
* <pre>
...
...
@@ -38,6 +43,12 @@ public class AmoCCSApplication {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmoCCSApplication
.
class
);
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
SpringApplication
application
=
new
SpringApplication
(
AmoCCSApplication
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
AmoCCSApplication
.
class
,
args
);
Environment
env
=
context
.
getEnvironment
();
String
appName
=
env
.
getProperty
(
"spring.application.name"
);
...
...
amos-boot-system-ccs/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -12,7 +12,7 @@ spring.redis.port=6379
spring.redis.password
=
ENC(2FDlTJDGXAfqBqn7QMeZ3cXPAdzjQBs9Yde/Ajc8TAVXxymomLieBPZxSF0R7wK9)
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.password
=
ENC(Lz+MNIZ0XP5lVzyswe7b1RyFAEImtD/qmYpkWilkGrj1myMjSnyf9ZS0l/hMD/Er)
...
...
amos-boot-system-equip/src/main/java/com/yeejoin/AmostEquipApplication.java
View file @
c724a94c
...
...
@@ -19,7 +19,10 @@ import org.springframework.context.ConfigurableApplicationContext;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
...
...
@@ -29,6 +32,8 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.security.SecureRandom
;
import
java.util.Collections
;
@SpringBootApplication
@EnableTransactionManagement
...
...
@@ -59,6 +64,12 @@ public class AmostEquipApplication {
private
CarIotNewListener
carIotNewListener
;
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
SpringApplication
application
=
new
SpringApplication
(
AmostEquipApplication
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
AmostEquipApplication
.
class
,
args
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
Environment
env
=
context
.
getEnvironment
();
...
...
amos-boot-system-equip/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -38,7 +38,7 @@ spring.redis.expire.time=30000
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.password
=
ENC(GGQmxuyl6uOxAsDhjRo+USgUybWC8Ns4Q7mlnyq3JqJE9LsFgYBNK8gzJ7H/Znw+)
...
...
amos-boot-system-equip/src/main/resources/application-docker.properties
View file @
c724a94c
...
...
@@ -38,7 +38,7 @@ spring.redis.expire.time=30000
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.password
=
ENC(X2ZEAhE0U0KJqtQHU+TjL8WR6is04xBIji30FpnJCbat9k6dBMCJfm/Vf/b0hCPl)
...
...
amos-boot-system-equip/src/main/resources/application-jcs.properties
View file @
c724a94c
...
...
@@ -38,7 +38,7 @@ spring.redis.expire.time=30000
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.password
=
ENC(srgCLv3AyU0NTJXS4iNxkf4zjx+mjxHf8Jdv4jqsDgluFO2oUgPHMnRQYTtt/Ivg)
...
...
amos-boot-system-equip/src/main/resources/application-qa.properties
View file @
c724a94c
...
...
@@ -38,7 +38,7 @@ spring.redis.expire.time=30000
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.password
=
ENC(DuaVOeFwh3f7oH9rroTwg5M/Prx/US38savsyTmQ1pSVVXZNNdbj/Lcfjip20VXm)
...
...
amos-boot-system-equip/src/main/resources/application-test.properties
View file @
c724a94c
...
...
@@ -38,7 +38,7 @@ spring.redis.expire.time=30000
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.password
=
ENC(dRiUEDTcM21M9w1wK0Dom1CAANdG81rFb45KEm6kZ0/fPhYRhkGGgQk7uw3q0NAg)
...
...
amos-boot-system-fas/src/main/java/com/yeejoin/amos/FireAutoSysApplication.java
View file @
c724a94c
...
...
@@ -4,6 +4,8 @@ import java.io.IOException;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.UnknownHostException
;
import
java.security.SecureRandom
;
import
java.util.Collections
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
...
...
@@ -21,7 +23,10 @@ import org.springframework.context.ApplicationContext;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
...
...
@@ -67,6 +72,12 @@ public class FireAutoSysApplication implements ApplicationContextAware {
* @throws URISyntaxException
*/
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
SpringApplication
application
=
new
SpringApplication
(
FireAutoSysApplication
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
logger
.
info
(
"start Service.........."
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
FireAutoSysApplication
.
class
,
args
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
...
...
amos-boot-system-fas/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -50,7 +50,7 @@ file.readUrl=http://172.16.11.33:8085/file/getFile?in=
params.isPush
=
false
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
ENC(e0puQgHcLshj+SaycIrhSnuLNdDLUHQtfcqaHqjVmnDRAoyJWmkvMNjt1pdCPOnr)
...
...
amos-boot-system-fas/src/main/resources/application-docker.properties
View file @
c724a94c
...
...
@@ -45,7 +45,7 @@ file.readUrl=http://172.16.11.33:8085/file/getFile?in=
params.isPush
=
false
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.33:1883
emqx.user-name
=
admin
emqx.password
=
ENC(ZCkHjJtiLg1aguo4I/OXOwAoJ/EzcxnrTL0gxUgktsyIFqeLkKpPMY6jn/MChpjv)
...
...
amos-boot-system-fas/src/main/resources/application-jcs.properties
View file @
c724a94c
...
...
@@ -50,7 +50,7 @@ file.readUrl=http://11.11.16.1:8085/file/getFile?in=
params.isPush
=
false
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://11.11.16.1:2883
emqx.user-name
=
super
emqx.password
=
ENC(z5FeZv8ZpthHXLvFMthDvSvtve/suOu7oiGsIJNX/yWNeJSHNuj0qCZcyKHSuldK)
...
...
amos-boot-system-fas/src/main/resources/application-qa.properties
View file @
c724a94c
...
...
@@ -50,7 +50,7 @@ file.readUrl=http://172.16.11.33:8085/file/getFile?in=
params.isPush
=
false
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.33:1883
emqx.user-name
=
admin
emqx.password
=
ENC(WDylw19tt1zmwfkfHhS2AgugfTlGzS5MNElC5LqrUWXnIRyPPCA2mZbantTWFkhj)
...
...
amos-boot-system-fas/src/main/resources/application-test.properties
View file @
c724a94c
...
...
@@ -45,7 +45,7 @@ file.readUrl=http://172.16.11.33:8085/file/getFile?in=
params.isPush
=
false
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.33:1883
emqx.user-name
=
admin
emqx.password
=
ENC(YPyOgMYvSm1s20HN03RewespKNyomI+NdungqiYFv+uXGwRkH0RL8+061DxEj++M)
...
...
amos-boot-system-jcs/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
View file @
c724a94c
...
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.security.SecureRandom
;
import
java.util.Collections
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
...
...
@@ -15,7 +17,10 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
import
org.springframework.data.redis.core.RedisTemplate
;
...
...
@@ -47,6 +52,12 @@ public class AmosJcsApplication {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosJcsApplication
.
class
);
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
SpringApplication
application
=
new
SpringApplication
(
AmosJcsApplication
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
AmosJcsApplication
.
class
,
args
);
Environment
env
=
context
.
getEnvironment
();
delKey
(
env
,
context
);
// 添加全部清空redis缓存的方法 2021-09-09
...
...
amos-boot-system-jcs/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -27,7 +27,7 @@ elasticsearch.password=ENC(tPXldVBJjiRAQ0rk11qOVCSJFWtkGGvlTqcWtmkxrNA/W9PJ7TibZ
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.password
=
ENC(yVcJLlSl9/CXSEMT/SjcyzaLAvGU4o8OhU0AVnaF40Olfvo9kT+VxykM6bunDzcb)
...
...
@@ -62,4 +62,6 @@ ifc.call-back.localIp=11.11.16.1
#平台应用名称
privilege.fegin.name
=
AMOS-API-PRIVILEGE
feign.client.config.default.connect-timeout
=
20000
feign.client.config.default.read-timeout
=
20000
\ No newline at end of file
feign.client.config.default.read-timeout
=
20000
auth-key-auth-enabled
=
auth-enabled
\ No newline at end of file
amos-boot-system-jcs/src/main/resources/application-jcs.properties
View file @
c724a94c
...
...
@@ -20,7 +20,7 @@ spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://11.11.16.1:2883
emqx.user-name
=
super
emqx.password
=
ENC(lsUzcQULDnEaqXtDJYGztWUa1hUKpz714my0EzynE86xAD5nmYUEhFOiv0bJzjch)
...
...
amos-boot-system-jcs/src/main/resources/application-qa.properties
View file @
c724a94c
...
...
@@ -20,7 +20,7 @@ spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://39.98.45.134:1883
emqx.user-name
=
super
emqx.password
=
ENC(6jzGMkPiiUXER1UhMjiBTVAwzCn3K3tAwrUpEICoXYwAcwcqndNQuEnGrEI+53jJ)
...
...
amos-boot-system-jcs/src/main/resources/application.properties
View file @
c724a94c
...
...
@@ -126,6 +126,7 @@ auth-key-fire-station=fire_station_info
auth-key-key-site
=
key_site_info
#消防人员
auth-key-fire-fighters
=
fire_fighters_info
auth-key-auth-enabled
=
auth-enabled
#权限开关: true 启用权限 false 不启用
mybatis.interceptor.enabled
=
true
...
...
amos-boot-system-kgd/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -42,7 +42,7 @@ lettuce.timeout=10000
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.3.18:2883
emqx.user-name
=
super
emqx.password
=
ENC(hqcljkebJzk/mWPZCj6/Gj6a3nkOrUj/1Yzde1pmm/J4fpMJ8juIgeSFwi16v3cJ)
...
...
amos-boot-system-knowledgebase/src/main/java/com/yeejoin/amos/KnowledgebaseApplication.java
View file @
c724a94c
...
...
@@ -2,10 +2,13 @@ package com.yeejoin.amos;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.security.SecureRandom
;
import
java.util.Collections
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.WebApplicationType
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
...
...
@@ -13,7 +16,10 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
...
...
@@ -36,6 +42,12 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
public
class
KnowledgebaseApplication
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
KnowledgebaseApplication
.
class
);
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
SpringApplication
application
=
new
SpringApplication
(
KnowledgebaseApplication
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
ConfigurableApplicationContext
context
=
new
SpringApplicationBuilder
(
KnowledgebaseApplication
.
class
).
web
(
WebApplicationType
.
SERVLET
).
run
(
args
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
Environment
env
=
context
.
getEnvironment
();
...
...
amos-boot-system-knowledgebase/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -45,7 +45,7 @@ spring.elasticsearch.rest.uris=http://39.100.239.237:9200
#emqx v4.0
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.3.18:2883
emqx.user-name
=
super
emqx.password
=
ENC(BRNhmVnl0ioUEI/GazSkeYtogsl1y7lRrXopoZ5Kig9YL9TrHyqfTDudI34lrLuy)
...
...
amos-boot-system-knowledgebase/src/main/resources/application-jcs.properties
View file @
c724a94c
...
...
@@ -44,7 +44,7 @@ spring.elasticsearch.rest.uris=http://11.11.16.1:9200
#emqx v4.0
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://11.11.16.1:2883
emqx.user-name
=
knowledge
emqx.password
=
ENC(tgbYZ8KgZN01mGJCmgYhJwMhVvJESOlB01NXzcSAND04iV9RqtdhEB0d8gBX6St8)
...
...
amos-boot-system-knowledgebase/src/main/resources/application-qa.properties
View file @
c724a94c
...
...
@@ -44,7 +44,7 @@ spring.elasticsearch.rest.uris=http://172.16.10.66:9200
#emqx v4.0
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
ENC(eN2mhzWo59KZmjw5cuujBMHno77e2k1jmXhSEH4CcpAEiecIW7vdSRhgo/7+UzeF)
...
...
amos-boot-system-knowledgebase/src/main/resources/application-test.properties
View file @
c724a94c
...
...
@@ -44,7 +44,7 @@ spring.elasticsearch.rest.uris=http://127.0.0.1:9200
#emqx v4.0
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
ENC(eVGQ8GcDlYMAo4PuzTfT4SEkBdhDmnAFrE0/g1fayeTLgEwVKVRVe6pxgvrpYcwv)
...
...
amos-boot-system-latentdanger/src/main/java/com/yeejoin/amos/LatentDangerApplication.java
View file @
c724a94c
...
...
@@ -15,7 +15,10 @@ import org.springframework.context.ConfigurableApplicationContext;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
...
...
@@ -27,6 +30,8 @@ import java.io.IOException;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.UnknownHostException
;
import
java.security.SecureRandom
;
import
java.util.Collections
;
/**
* <pre>
...
...
@@ -68,6 +73,12 @@ public class LatentDangerApplication {
*/
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
logger
.
info
(
"start Service.........."
);
SpringApplication
application
=
new
SpringApplication
(
LatentDangerApplication
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
LatentDangerApplication
.
class
,
args
);
Environment
env
=
context
.
getEnvironment
();
String
appName
=
env
.
getProperty
(
"spring.application.name"
);
...
...
amos-boot-system-latentdanger/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -80,7 +80,7 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${
security-random-int}
emqx.broker
=
tcp://172.16.10.211:2883
emqx.user-name
=
super
emqx.password
=
ENC(qV5LV4xIsXBnd+Q1P+dDUqx1zwVqAR5YcZSss/hZidit4XG+TgXBUtQh8n+BVakG)
...
...
amos-boot-system-latentdanger/src/main/resources/application-docker.properties
View file @
c724a94c
...
...
@@ -75,7 +75,7 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${
security-random-int}
emqx.broker
=
tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
ENC(k+rmkOo3F50CUtKAN92MZgGS5eAvLEl+ezfsRoSP89wYw7oV0SSj+B7iTw+Bk5/h)
...
...
amos-boot-system-latentdanger/src/main/resources/application-test.properties
View file @
c724a94c
...
...
@@ -75,7 +75,7 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${
security-random-int}
emqx.broker
=
tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
ENC(Xm0idEy22WFaWaIHxmShsk/sfjrIZXZBdD/PlGgUNpwb6rnzuWoQlLIJS2khM8aH)
...
...
amos-boot-system-maintenance/src/main/java/com/yeejoin/amos/MaintenanceApplication.java
View file @
c724a94c
...
...
@@ -14,7 +14,10 @@ import org.springframework.context.ConfigurableApplicationContext;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
...
...
@@ -26,6 +29,8 @@ import java.io.IOException;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.UnknownHostException
;
import
java.security.SecureRandom
;
import
java.util.Collections
;
/**
* <pre>
...
...
@@ -66,6 +71,12 @@ public class MaintenanceApplication {
*/
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
logger
.
info
(
"start Service.........."
);
SpringApplication
application
=
new
SpringApplication
(
MaintenanceApplication
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
MaintenanceApplication
.
class
,
args
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
Environment
env
=
context
.
getEnvironment
();
...
...
amos-boot-system-maintenance/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -41,7 +41,7 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${
security-random-int}
emqx.broker
=
tcp://172.16.10.211:2883
emqx.user-name
=
admin
emqx.password
=
ENC(plHHeaMcUrvvF/jAG6zZsbYVW63oqE9szljel6qsAh0y/R1ZP2K97jTukGshWDxW)
...
...
amos-boot-system-maintenance/src/main/resources/application-jcs.properties
View file @
c724a94c
...
...
@@ -38,7 +38,7 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${
security-random-int}
emqx.broker
=
tcp://11.11.16.1:2883
emqx.user-name
=
admin
emqx.password
=
ENC(u6uzXt+v9awsBoBq2R/Y39dgBtYOuM7wssNhlofJHttg9ed9M8dw4wN2r/o0vN57)
...
...
amos-boot-system-patrol/src/main/java/com/yeejoin/amos/PatrolApplication.java
View file @
c724a94c
...
...
@@ -19,7 +19,10 @@ import org.springframework.context.ConfigurableApplicationContext;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
...
...
@@ -32,6 +35,8 @@ import java.io.IOException;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.UnknownHostException
;
import
java.security.SecureRandom
;
import
java.util.Collections
;
/**
* <pre>
...
...
@@ -82,6 +87,12 @@ public class PatrolApplication {
*/
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
logger
.
info
(
"start Service.........."
);
SpringApplication
application
=
new
SpringApplication
(
PatrolApplication
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
PatrolApplication
.
class
,
args
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
Environment
env
=
context
.
getEnvironment
();
...
...
amos-boot-system-patrol/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -86,7 +86,7 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]}-3578
emqx.client-id
=
${spring.application.name}-${
security-random-int}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.user-name
=
admin
emqx.password
=
ENC(5+PwujB0t52PNInudV/Qa0WPNrkRcJRTeXRlZ/WG1JLrhGHgpNm1IQW2UJC8Hx1w)
...
...
@@ -98,4 +98,6 @@ file.url=http://172.16.11.201:9000/
logic
=
false
#是否为中心级系统 true-中心级系统 false-站端系统
is.zxj
=
true
\ No newline at end of file
is.zxj
=
true
auth-key-auth-enabled
=
auth-enabled
\ No newline at end of file
amos-boot-system-patrol/src/main/resources/application-docker.properties
View file @
c724a94c
...
...
@@ -76,7 +76,7 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${
security-random-int}
emqx.broker
=
tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
ENC(hZ3P601LVYc16F8pJyils9C0xUbtQn/NijVbXiQaUnSmEY+N+R+F2+cHsRO2mZjQ)
...
...
amos-boot-system-patrol/src/main/resources/application-jcs.properties
View file @
c724a94c
...
...
@@ -80,7 +80,7 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${
security-random-int}
emqx.broker
=
tcp://11.11.16.1:2883
emqx.user-name
=
super
emqx.password
=
ENC(EuPZLjEccNFCYrINWXWg4LvC8BCpY6GstwrtV/visuMmjXXE+jtyjeLGPjPHn5pb)
...
...
amos-boot-system-patrol/src/main/resources/application-test.properties
View file @
c724a94c
...
...
@@ -76,7 +76,7 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${
security-random-int}
emqx.broker
=
tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
ENC(3XTg2UtPdtN9aGpMIsV0w+YIM7sJJDXOsMjzgM3jEmEk8Ovbd6L7Ji2Mf3hNoaCm)
...
...
amos-boot-system-precontrol/src/main/java/com/yeejoin/amos/StartPrecontrolService.java
View file @
c724a94c
package
com
.
yeejoin
.
amos
;
import
java.security.SecureRandom
;
import
java.text.ParseException
;
import
java.util.Collections
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.mybatis.spring.annotation.MapperScan
;
...
...
@@ -12,6 +14,9 @@ import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.scheduling.TaskScheduler
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
;
...
...
@@ -66,6 +71,12 @@ public class StartPrecontrolService {
private
StartRiskService
startRiskService
;
public
static
void
main
(
String
[]
args
)
{
SpringApplication
application
=
new
SpringApplication
(
StartPrecontrolService
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
SpringApplication
.
run
(
StartPrecontrolService
.
class
,
args
).
getEnvironment
();
log
.
info
(
"swagger:--->http://localhost:8060/precontrol/swagger-ui.html"
);
}
...
...
amos-boot-system-precontrol/src/main/resource/application-dev.properties
View file @
c724a94c
...
...
@@ -69,7 +69,7 @@ spring.liquibase.password=ENC(Vfge4mGDNB4aqT4K/qM2DT1x7elpG4EBx7aUimCfXaVpSWLMX4
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://39.100.239.237:1883
emqx.user-name
=
admin
emqx.password
=
ENC(OSA64iMVlqZkH0frCyNCX+Mk1oLnp5AHRLBsL6GjrV+r6LIoNp8n8Zhhm2k6TD/T)
...
...
amos-boot-system-precontrol/src/main/resource/application-dev2.properties
View file @
c724a94c
...
...
@@ -69,7 +69,7 @@ spring.liquibase.password=ENC(yrlvuaaLuIuHDUxzzhik2ugEGTukH8y+e8VWdomirI74jl4Lul
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://47.92.234.253:1883
emqx.user-name
=
admin
emqx.password
=
ENC(A+dlQa1l1oQx9rLboFUK0RgtSMJNVdezIMnAkq659CTHvmAWIqFiVRILmBSOVJoo)
...
...
amos-boot-system-precontrol/src/main/resource/application-docker.properties
View file @
c724a94c
...
...
@@ -26,7 +26,7 @@ spring.redis.pool.min-idle=0
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
ENC(yTU4Z2TMe2O3iqkeCAVav7uvCIG1J8qgCky2VXy94k4sgtj8r/EET7+xNgl8EUxv)
...
...
amos-boot-system-precontrol/src/main/resource/application-public.properties
View file @
c724a94c
...
...
@@ -60,7 +60,7 @@ spring.liquibase.password=ENC(oNxwEeDiI6UDbkhItiD0gK0fwFOnSGaRawkcf8N1KcUZ4SfN1r
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
ENC(eQAzGB9pywIbkKtZbiJNQEbwHSM4X7xUA1JN4im6IJcAMFOpdndLBhjDDAUuYR+K)
...
...
amos-boot-system-precontrol/src/main/resource/application-qa.properties
View file @
c724a94c
...
...
@@ -68,7 +68,7 @@ spring.liquibase.password=ENC(To3o7waoSJrrNe94UjDo5mo2vHklcFvE4Hca9vl7lOW4sbdAM1
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://39.100.239.237:1883
emqx.user-name
=
admin
emqx.password
=
ENC(Z8Cf5vBqGB+qYSJhu2DKjgpGctqcvf1dysR/a9FymAWBKJ/G4CYyAl9ZgvFEJMfk)
...
...
amos-boot-system-supervision/src/main/java/com/yeejoin/amos/SupervisionApplication.java
View file @
c724a94c
...
...
@@ -17,7 +17,10 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
...
...
@@ -29,6 +32,8 @@ import java.io.IOException;
import
java.net.InetAddress
;
import
java.net.URISyntaxException
;
import
java.net.UnknownHostException
;
import
java.security.SecureRandom
;
import
java.util.Collections
;
/**
* <pre>
...
...
@@ -72,6 +77,12 @@ public class SupervisionApplication {
*/
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
logger
.
info
(
"start Service.........."
);
SpringApplication
application
=
new
SpringApplication
(
SupervisionApplication
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
SupervisionApplication
.
class
,
args
);
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
Environment
env
=
context
.
getEnvironment
();
...
...
amos-boot-system-supervision/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -46,7 +46,7 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${
security-random-int}
emqx.broker
=
tcp://172.16.10.211:2883
emqx.user-name
=
super
emqx.password
=
ENC(H5ou9RR/Qj8EPGnwCoXh7tpCUB2dHpfkUSlBLKmIs+HOLqK0/C8IPVN6Cd6fPAkE)
...
...
amos-boot-system-supervision/src/main/resources/application-jcs.properties
View file @
c724a94c
...
...
@@ -44,7 +44,7 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${
security-random-int}
emqx.broker
=
tcp://172.16.11.33:1883
emqx.user-name
=
admin
emqx.password
=
ENC(OtiAFcvYKHhEnjYxScPgdWbAXxDDBT4qgFWgvGc+90wxmdgN1a3CJnFZFXQc1lnv)
...
...
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -18,7 +18,7 @@ spring.redis.port=6379
spring.redis.password
=
ENC(DL3Z9hoL084UizE7RO6heJboTMyWGzcMkNtxXTZTWuUw8zzp06MYUC2FKADBuB4c)
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.215:1883
emqx.user-name
=
admin
emqx.password
=
ENC(Gvv5Gg9Y5V+L7fG5DvCfkbyG91V0QG0/AUiHVaiYxvBP7VE7RMQvRNxZbN5wanwH)
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -41,7 +41,7 @@ spring.redis.expire.time=300
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.90:1883
emqx.user-name
=
admin
emqx.password
=
ENC(ozAs7gHZMAFb1ihZ2Z26IH/MEqhvTrBbUYCa4jzZdvKBaziSnGTPR3AFvZDp1SIH)
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/application-dev2.properties
View file @
c724a94c
...
...
@@ -41,7 +41,7 @@ spring.redis.expire.time=300
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.90:1883
emqx.user-name
=
admin
emqx.password
=
ENC(/dB1fGCjMhkr6rH2dr4DnjG8mTxsuJ6ouophTI+YJgyquIJBpQ49cDAyCKv6V+4X)
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/application-jd.properties
View file @
c724a94c
...
...
@@ -38,7 +38,7 @@ spring.redis.expire.time=300
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.3.28:1883
emqx.user-name
=
admin
emqx.password
=
ENC(ct0pDXxkV3zVcxhOGdUzTjmMqokFmrKN4wuXxmYNf6YVNBPyttucTF7a6RePsoei)
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/application-qa.properties
View file @
c724a94c
...
...
@@ -38,7 +38,7 @@ spring.redis.expire.time=300
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://36.46.151.113:1883
emqx.user-name
=
admin
emqx.password
=
ENC(in1DRHeNHbqkD7wb2Yn/SmKdyJ4bskd+/dJcuPs/ZZrU4fcFYGfO6/Aq0FDfqabZ)
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/resources/application.properties
View file @
c724a94c
...
...
@@ -44,7 +44,7 @@ spring.redis.expire.time=300
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.10.90:1883
emqx.user-name
=
super
emqx.password
=
ENC(23pJcuCki2sX99sRZJgDjhDNXDvY6/EnTZIdMx2EwjyGgJmYf0Q0MjWYfu7HZDf6)
...
...
amos-boot-utils/amos-boot-utils-message/src/main/java/com/yeejoin/amos/AmosBootUtilsMessageApplication.java
View file @
c724a94c
...
...
@@ -11,11 +11,16 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.security.SecureRandom
;
import
java.util.Collections
;
/**
* <pre>
...
...
@@ -38,6 +43,12 @@ public class AmosBootUtilsMessageApplication {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosBootUtilsMessageApplication
.
class
);
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
SpringApplication
application
=
new
SpringApplication
(
AmosBootUtilsMessageApplication
.
class
);
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
int
randomClientId
=
new
SecureRandom
().
nextInt
(
65536
-
1024
)
+
1024
;
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"securityRandomSource"
,
Collections
.
singletonMap
(
"security-random-int"
,
randomClientId
)));
application
.
setEnvironment
(
environment
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
AmosBootUtilsMessageApplication
.
class
,
args
);
Environment
env
=
context
.
getEnvironment
();
...
...
amos-boot-utils/amos-boot-utils-message/src/main/resources/application-dev.properties
View file @
c724a94c
...
...
@@ -75,7 +75,7 @@ management.health.redis.enabled=false
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.client-user-name
=
admin
emqx.client-password
=
ENC(6pRD7dM5Hp6rjy+DcS8Il2TCdN/IYz8IXeZXkSlAZT/NV/vTe51acJDDu7lzF9Dx)
...
...
amos-boot-utils/amos-boot-utils-message/src/main/resources/application-roma.properties
View file @
c724a94c
...
...
@@ -91,7 +91,7 @@ management.health.redis.enabled=false
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${
random.int[1024,65536]
}
emqx.client-id
=
${spring.application.name}-${
security-random-int
}
emqx.broker
=
tcp://172.16.11.201:1883
emqx.client-user-name
=
admin
emqx.client-password
=
ENC(e7sU0wBHIqXiGS4097G/ywpFFkIf8lks2zm9mWcqE4Cn8Xsh5mUSXVr+oqGwcyip)
...
...
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