Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
0cb2f733
Commit
0cb2f733
authored
May 15, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of
http://172.16.10.76/station/YeeAmosFireAutoSysRoot
into dev_upgrade
parents
6e37ce61
fc083344
Show whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
830 additions
and
322 deletions
+830
-322
ManageLevelEum.java
...ava/com/yeejoin/amos/fas/common/enums/ManageLevelEum.java
+61
-0
EquipDetailsResponse.java
...n/amos/fas/core/common/response/EquipDetailsResponse.java
+12
-0
AccidentType.java
...in/java/com/yeejoin/amos/fas/dao/entity/AccidentType.java
+22
-8
Equipment.java
.../main/java/com/yeejoin/amos/fas/dao/entity/Equipment.java
+10
-8
EvaluationModel.java
...java/com/yeejoin/amos/fas/dao/entity/EvaluationModel.java
+3
-3
FireStation.java
...ain/java/com/yeejoin/amos/fas/dao/entity/FireStation.java
+3
-3
FireStationFireEquipment.java
...yeejoin/amos/fas/dao/entity/FireStationFireEquipment.java
+3
-3
FireStrength.java
...in/java/com/yeejoin/amos/fas/dao/entity/FireStrength.java
+3
-3
Fmea.java
...n/src/main/java/com/yeejoin/amos/fas/dao/entity/Fmea.java
+3
-3
PreplanPicture.java
.../java/com/yeejoin/amos/fas/dao/entity/PreplanPicture.java
+3
-3
RiskFactor.java
...main/java/com/yeejoin/amos/fas/dao/entity/RiskFactor.java
+6
-6
RiskLevel.java
.../main/java/com/yeejoin/amos/fas/dao/entity/RiskLevel.java
+6
-4
RiskSource.java
...main/java/com/yeejoin/amos/fas/dao/entity/RiskSource.java
+3
-3
WaterResource.java
...n/java/com/yeejoin/amos/fas/dao/entity/WaterResource.java
+3
-3
AccidentTypeController.java
.../amos/fas/business/controller/AccidentTypeController.java
+1
-1
EquipmentController.java
...oin/amos/fas/business/controller/EquipmentController.java
+18
-17
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+1
-1
FireStationController.java
...n/amos/fas/business/controller/FireStationController.java
+3
-3
FireStrengthController.java
.../amos/fas/business/controller/FireStrengthController.java
+1
-1
RiskFactorController.java
...in/amos/fas/business/controller/RiskFactorController.java
+1
-1
RiskLevelController.java
...oin/amos/fas/business/controller/RiskLevelController.java
+10
-6
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+20
-19
WaterResourceController.java
...amos/fas/business/controller/WaterResourceController.java
+1
-1
FeignConfiguration.java
...m/yeejoin/amos/fas/business/feign/FeignConfiguration.java
+0
-8
MultipartSupportConfig.java
...ejoin/amos/fas/business/feign/MultipartSupportConfig.java
+37
-0
PushFeign.java
...n/java/com/yeejoin/amos/fas/business/feign/PushFeign.java
+40
-0
PushFeignServer.java
.../com/yeejoin/amos/fas/business/feign/PushFeignServer.java
+52
-0
AppMessagePushService.java
...eejoin/amos/fas/business/jpush/AppMessagePushService.java
+56
-46
AccidentTypeServiceImpl.java
...os/fas/business/service/impl/AccidentTypeServiceImpl.java
+41
-4
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+59
-27
FireCarServiceImpl.java
...in/amos/fas/business/service/impl/FireCarServiceImpl.java
+24
-14
FireEquipPointServiceImpl.java
.../fas/business/service/impl/FireEquipPointServiceImpl.java
+0
-1
FmeaServiceImpl.java
...ejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
+70
-0
RiskFactorServiceImpl.java
...amos/fas/business/service/impl/RiskFactorServiceImpl.java
+49
-12
RiskLevelServiceImpl.java
.../amos/fas/business/service/impl/RiskLevelServiceImpl.java
+39
-5
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+122
-28
IAccidentTypeService.java
...amos/fas/business/service/intfc/IAccidentTypeService.java
+3
-4
IEquipmentService.java
...in/amos/fas/business/service/intfc/IEquipmentService.java
+1
-1
IFireCarService.java
...join/amos/fas/business/service/intfc/IFireCarService.java
+1
-4
IRiskFactorService.java
...n/amos/fas/business/service/intfc/IRiskFactorService.java
+1
-1
IRiskLevelService.java
...in/amos/fas/business/service/intfc/IRiskLevelService.java
+1
-1
IRiskSourceService.java
...n/amos/fas/business/service/intfc/IRiskSourceService.java
+1
-1
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+3
-1
fas-create-table.sql
...src/main/resources/db/changelog/init/fas-create-table.sql
+15
-15
dbTemplate_accident_type.xml
...src/main/resources/db/mapper/dbTemplate_accident_type.xml
+4
-12
dbTemplate_fire_car.xml
...tart/src/main/resources/db/mapper/dbTemplate_fire_car.xml
+0
-4
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+1
-5
dbTemplate_fmea.xml
...SysStart/src/main/resources/db/mapper/dbTemplate_fmea.xml
+5
-5
dbTemplate_fmea_point_inputitem.xml
...n/resources/db/mapper/dbTemplate_fmea_point_inputitem.xml
+2
-11
dbTemplate_risk_factor.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_factor.xml
+1
-4
dbTemplate_risk_level.xml
...rt/src/main/resources/db/mapper/dbTemplate_risk_level.xml
+3
-3
dbTemplate_risk_source.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_source.xml
+2
-5
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/ManageLevelEum.java
0 → 100644
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 管控级别
*/
public
enum
ManageLevelEum
{
company
(
"单位级"
,
1
),
department
(
"部门级"
,
2
),
group
(
"班组级"
,
3
),
person
(
"个人级"
,
4
);
private
String
name
;
private
int
manageLevel
;
ManageLevelEum
(
String
name
,
int
manageLevel
){
this
.
name
=
name
;
this
.
manageLevel
=
manageLevel
;
}
public
static
List
<
Map
>
getManageLevelEumList
(){
List
<
Map
>
eumList
=
new
ArrayList
<>();
for
(
ManageLevelEum
eum
:
ManageLevelEum
.
values
()){
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"key"
,
eum
.
getManageLevel
());
param
.
put
(
"label"
,
eum
.
getName
());
eumList
.
add
(
param
);
}
return
eumList
;
}
public
static
String
getNameByManageLevel
(
int
level
){
String
name
=
""
;
for
(
ManageLevelEum
eum
:
ManageLevelEum
.
values
()){
if
(
level
==
eum
.
getManageLevel
()){
name
=
eum
.
getName
();
break
;
}
}
return
name
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
int
getManageLevel
()
{
return
manageLevel
;
}
public
void
setManageLevel
(
int
manageLevel
)
{
this
.
manageLevel
=
manageLevel
;
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/core/common/response/EquipDetailsResponse.java
View file @
0cb2f733
...
@@ -20,6 +20,8 @@ public class EquipDetailsResponse {
...
@@ -20,6 +20,8 @@ public class EquipDetailsResponse {
private
String
remarks
;
private
String
remarks
;
private
String
userId
;
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
}
}
...
@@ -83,4 +85,14 @@ public class EquipDetailsResponse {
...
@@ -83,4 +85,14 @@ public class EquipDetailsResponse {
public
void
setStationName
(
String
stationName
)
{
public
void
setStationName
(
String
stationName
)
{
this
.
stationName
=
stationName
;
this
.
stationName
=
stationName
;
}
}
public
String
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/AccidentType.java
View file @
0cb2f733
...
@@ -19,10 +19,10 @@ public class AccidentType extends BasicEntity {
...
@@ -19,10 +19,10 @@ public class AccidentType extends BasicEntity {
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
Long
createBy
;
private
String
createBy
;
@Column
(
name
=
"dept_id"
)
@Column
(
name
=
"dept_id"
)
private
Long
deptId
;
private
String
deptId
;
private
String
name
;
private
String
name
;
...
@@ -45,22 +45,36 @@ public class AccidentType extends BasicEntity {
...
@@ -45,22 +45,36 @@ public class AccidentType extends BasicEntity {
}
}
public
Long
getCreateBy
()
{
return
this
.
createBy
;
public
String
getCreateBy
()
{
return
createBy
;
}
}
public
void
setCreateBy
(
Long
createBy
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
public
Long
getDeptId
()
{
return
this
.
deptId
;
public
String
getDeptId
()
{
return
deptId
;
}
}
public
void
setDeptId
(
Long
deptId
)
{
public
void
setDeptId
(
String
deptId
)
{
this
.
deptId
=
deptId
;
this
.
deptId
=
deptId
;
}
}
@Transient
@Transient
public
String
getInfluence
()
{
public
String
getInfluence
()
{
return
this
.
influence
;
return
this
.
influence
;
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/Equipment.java
View file @
0cb2f733
...
@@ -45,10 +45,10 @@ public class Equipment extends BasicEntity {
...
@@ -45,10 +45,10 @@ public class Equipment extends BasicEntity {
private
Boolean
isIndoor
;
private
Boolean
isIndoor
;
@Column
(
name
=
"charge_dept_id"
)
@Column
(
name
=
"charge_dept_id"
)
private
int
chargeDeptId
;
private
String
chargeDeptId
;
@Column
(
name
=
"charge_user_id"
)
@Column
(
name
=
"charge_user_id"
)
private
int
chargeUserId
;
private
String
chargeUserId
;
private
String
code
;
private
String
code
;
...
@@ -147,19 +147,21 @@ public class Equipment extends BasicEntity {
...
@@ -147,19 +147,21 @@ public class Equipment extends BasicEntity {
this
.
riskSourceId
=
riskSourceId
;
this
.
riskSourceId
=
riskSourceId
;
}
}
public
int
getChargeDeptId
()
{
return
this
.
chargeDeptId
;
public
String
getChargeDeptId
()
{
return
chargeDeptId
;
}
}
public
void
setChargeDeptId
(
int
chargeDeptId
)
{
public
void
setChargeDeptId
(
String
chargeDeptId
)
{
this
.
chargeDeptId
=
chargeDeptId
;
this
.
chargeDeptId
=
chargeDeptId
;
}
}
public
int
getChargeUserId
()
{
public
String
getChargeUserId
()
{
return
this
.
chargeUserId
;
return
chargeUserId
;
}
}
public
void
setChargeUserId
(
int
chargeUserId
)
{
public
void
setChargeUserId
(
String
chargeUserId
)
{
this
.
chargeUserId
=
chargeUserId
;
this
.
chargeUserId
=
chargeUserId
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/EvaluationModel.java
View file @
0cb2f733
...
@@ -18,7 +18,7 @@ public class EvaluationModel extends BasicEntity {
...
@@ -18,7 +18,7 @@ public class EvaluationModel extends BasicEntity {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
String
createBy
;
private
String
name
;
private
String
name
;
...
@@ -54,11 +54,11 @@ public class EvaluationModel extends BasicEntity {
...
@@ -54,11 +54,11 @@ public class EvaluationModel extends BasicEntity {
public
EvaluationModel
()
{
public
EvaluationModel
()
{
}
}
public
int
getCreateBy
()
{
public
String
getCreateBy
()
{
return
this
.
createBy
;
return
this
.
createBy
;
}
}
public
void
setCreateBy
(
int
createBy
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireStation.java
View file @
0cb2f733
...
@@ -72,7 +72,7 @@ public class FireStation extends BasicEntity{
...
@@ -72,7 +72,7 @@ public class FireStation extends BasicEntity{
* 创建人
* 创建人
*/
*/
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
String
createBy
;
@Column
(
name
=
"picture"
)
@Column
(
name
=
"picture"
)
...
@@ -165,11 +165,11 @@ public class FireStation extends BasicEntity{
...
@@ -165,11 +165,11 @@ public class FireStation extends BasicEntity{
this
.
orgCode
=
orgCode
;
this
.
orgCode
=
orgCode
;
}
}
public
int
getCreateBy
()
{
public
String
getCreateBy
()
{
return
createBy
;
return
createBy
;
}
}
public
void
setCreateBy
(
int
createBy
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireStationFireEquipment.java
View file @
0cb2f733
...
@@ -45,7 +45,7 @@ public class FireStationFireEquipment extends BasicEntity{
...
@@ -45,7 +45,7 @@ public class FireStationFireEquipment extends BasicEntity{
* 创建人
* 创建人
*/
*/
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
String
createBy
;
public
Long
getFireStationId
()
{
public
Long
getFireStationId
()
{
return
fireStationId
;
return
fireStationId
;
...
@@ -79,11 +79,11 @@ public class FireStationFireEquipment extends BasicEntity{
...
@@ -79,11 +79,11 @@ public class FireStationFireEquipment extends BasicEntity{
this
.
unit
=
unit
;
this
.
unit
=
unit
;
}
}
public
int
getCreateBy
()
{
public
String
getCreateBy
()
{
return
createBy
;
return
createBy
;
}
}
public
void
setCreateBy
(
int
createBy
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireStrength.java
View file @
0cb2f733
...
@@ -78,7 +78,7 @@ public class FireStrength extends BasicEntity{
...
@@ -78,7 +78,7 @@ public class FireStrength extends BasicEntity{
* 创建人
* 创建人
*/
*/
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
String
createBy
;
public
String
getCode
()
{
public
String
getCode
()
{
return
code
;
return
code
;
...
@@ -144,11 +144,11 @@ public class FireStrength extends BasicEntity{
...
@@ -144,11 +144,11 @@ public class FireStrength extends BasicEntity{
this
.
orgCode
=
orgCode
;
this
.
orgCode
=
orgCode
;
}
}
public
int
getCreateBy
()
{
public
String
getCreateBy
()
{
return
createBy
;
return
createBy
;
}
}
public
void
setCreateBy
(
int
createBy
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/Fmea.java
View file @
0cb2f733
...
@@ -91,7 +91,7 @@ public class Fmea extends BasicEntity {
...
@@ -91,7 +91,7 @@ public class Fmea extends BasicEntity {
private
String
personLeader
;
private
String
personLeader
;
@Column
(
name
=
"identify_user"
)
@Column
(
name
=
"identify_user"
)
private
Integer
identifyUser
;
private
String
identifyUser
;
@Column
(
name
=
"identify_method"
)
@Column
(
name
=
"identify_method"
)
private
String
identifyMethod
;
private
String
identifyMethod
;
...
@@ -298,11 +298,11 @@ public class Fmea extends BasicEntity {
...
@@ -298,11 +298,11 @@ public class Fmea extends BasicEntity {
this
.
personLeader
=
personLeader
;
this
.
personLeader
=
personLeader
;
}
}
public
Integer
getIdentifyUser
()
{
public
String
getIdentifyUser
()
{
return
identifyUser
;
return
identifyUser
;
}
}
public
void
setIdentifyUser
(
Integer
identifyUser
)
{
public
void
setIdentifyUser
(
String
identifyUser
)
{
this
.
identifyUser
=
identifyUser
;
this
.
identifyUser
=
identifyUser
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/PreplanPicture.java
View file @
0cb2f733
...
@@ -17,7 +17,7 @@ public class PreplanPicture extends BasicEntity {
...
@@ -17,7 +17,7 @@ public class PreplanPicture extends BasicEntity {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
String
createBy
;
@Column
(
name
=
"equipment_id"
)
@Column
(
name
=
"equipment_id"
)
private
Long
equipmentId
;
private
Long
equipmentId
;
...
@@ -34,11 +34,11 @@ public class PreplanPicture extends BasicEntity {
...
@@ -34,11 +34,11 @@ public class PreplanPicture extends BasicEntity {
public
PreplanPicture
()
{
public
PreplanPicture
()
{
}
}
public
int
getCreateBy
()
{
public
String
getCreateBy
()
{
return
this
.
createBy
;
return
this
.
createBy
;
}
}
public
void
setCreateBy
(
int
createBy
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskFactor.java
View file @
0cb2f733
...
@@ -20,10 +20,10 @@ public class RiskFactor extends BasicEntity {
...
@@ -20,10 +20,10 @@ public class RiskFactor extends BasicEntity {
private
Long
accidentTypeId
;
private
Long
accidentTypeId
;
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
String
createBy
;
@Column
(
name
=
"dept_id"
)
@Column
(
name
=
"dept_id"
)
private
Long
deptId
;
private
String
deptId
;
private
String
name
;
private
String
name
;
...
@@ -45,19 +45,19 @@ public class RiskFactor extends BasicEntity {
...
@@ -45,19 +45,19 @@ public class RiskFactor extends BasicEntity {
this
.
accidentTypeId
=
accidentTypeId
;
this
.
accidentTypeId
=
accidentTypeId
;
}
}
public
int
getCreateBy
()
{
public
String
getCreateBy
()
{
return
this
.
createBy
;
return
this
.
createBy
;
}
}
public
void
setCreateBy
(
int
createBy
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
public
Long
getDeptId
()
{
public
String
getDeptId
()
{
return
this
.
deptId
;
return
this
.
deptId
;
}
}
public
void
setDeptId
(
Long
deptId
)
{
public
void
setDeptId
(
String
deptId
)
{
this
.
deptId
=
deptId
;
this
.
deptId
=
deptId
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskLevel.java
View file @
0cb2f733
...
@@ -19,7 +19,7 @@ public class RiskLevel extends BasicEntity {
...
@@ -19,7 +19,7 @@ public class RiskLevel extends BasicEntity {
private
String
color
;
private
String
color
;
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
Long
createBy
;
private
String
createBy
;
@Column
(
name
=
"evaluation_model_id"
)
@Column
(
name
=
"evaluation_model_id"
)
private
Long
evaluationModelId
;
private
Long
evaluationModelId
;
...
@@ -64,11 +64,13 @@ public class RiskLevel extends BasicEntity {
...
@@ -64,11 +64,13 @@ public class RiskLevel extends BasicEntity {
this
.
color
=
color
;
this
.
color
=
color
;
}
}
public
Long
getCreateBy
()
{
return
this
.
createBy
;
public
String
getCreateBy
()
{
return
createBy
;
}
}
public
void
setCreateBy
(
Long
createBy
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/RiskSource.java
View file @
0cb2f733
...
@@ -29,7 +29,7 @@ public class RiskSource extends BasicEntity {
...
@@ -29,7 +29,7 @@ public class RiskSource extends BasicEntity {
private
Boolean
isIndoor
;
private
Boolean
isIndoor
;
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
String
createBy
;
private
String
name
;
private
String
name
;
...
@@ -142,11 +142,11 @@ public class RiskSource extends BasicEntity {
...
@@ -142,11 +142,11 @@ public class RiskSource extends BasicEntity {
this
.
code
=
code
;
this
.
code
=
code
;
}
}
public
int
getCreateBy
()
{
public
String
getCreateBy
()
{
return
this
.
createBy
;
return
this
.
createBy
;
}
}
public
void
setCreateBy
(
int
createBy
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/WaterResource.java
View file @
0cb2f733
...
@@ -81,7 +81,7 @@ public class WaterResource extends BasicEntity{
...
@@ -81,7 +81,7 @@ public class WaterResource extends BasicEntity{
* 创建人
* 创建人
*/
*/
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
int
createBy
;
private
String
createBy
;
/**
/**
* ue4位置
* ue4位置
...
@@ -184,11 +184,11 @@ public class WaterResource extends BasicEntity{
...
@@ -184,11 +184,11 @@ public class WaterResource extends BasicEntity{
this
.
orgCode
=
orgCode
;
this
.
orgCode
=
orgCode
;
}
}
public
int
getCreateBy
()
{
public
String
getCreateBy
()
{
return
createBy
;
return
createBy
;
}
}
public
void
setCreateBy
(
int
createBy
)
{
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
this
.
createBy
=
createBy
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/AccidentTypeController.java
View file @
0cb2f733
...
@@ -45,7 +45,7 @@ public class AccidentTypeController extends BaseController {
...
@@ -45,7 +45,7 @@ public class AccidentTypeController extends BaseController {
public
CommonResponse
queryRiskLevelPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
public
CommonResponse
queryRiskLevelPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
list
=
iAccidentTypeService
.
queryAccidentTypePage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
list
=
iAccidentTypeService
.
queryAccidentTypePage
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
return
CommonResponseUtil
.
success
(
list
);
return
CommonResponseUtil
.
success
(
list
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/EquipmentController.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.yeejoin.amos.fas.business.param.ImgParam
;
import
com.yeejoin.amos.fas.business.param.ImgParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
...
@@ -12,25 +28,10 @@ import com.yeejoin.amos.fas.core.util.StringUtil;
...
@@ -12,25 +28,10 @@ import com.yeejoin.amos.fas.core.util.StringUtil;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
@RestController
@RestController
@RequestMapping
(
value
=
"/api/impEquip"
)
@RequestMapping
(
value
=
"/api/impEquip"
)
...
@@ -249,7 +250,7 @@ public class EquipmentController extends BaseController {
...
@@ -249,7 +250,7 @@ public class EquipmentController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"重点装备详情"
,
notes
=
"重点装备详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"重点装备详情"
,
notes
=
"重点装备详情"
)
@GetMapping
(
value
=
"/detail/{equipmentId}"
,
produces
=
"application/json;charset=UTF-8"
)
@GetMapping
(
value
=
"/detail/{equipmentId}"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
findEquipDetail
(
@PathVariable
Long
equipmentId
)
{
public
CommonResponse
findEquipDetail
(
@PathVariable
Long
equipmentId
)
{
return
CommonResponseUtil
.
success
(
iEquipService
.
findEquipDetailsById
(
equipmentId
));
return
CommonResponseUtil
.
success
(
iEquipService
.
findEquipDetailsById
(
getToken
(),
getProduct
(),
getAppKey
(),
equipmentId
));
}
}
/**
/**
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireSourceController.java
View file @
0cb2f733
...
@@ -91,7 +91,7 @@ public class FireSourceController extends BaseController {
...
@@ -91,7 +91,7 @@ public class FireSourceController extends BaseController {
@RequestMapping
(
value
=
"/fire-car/det/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/fire-car/det/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryFireCar
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@PathVariable
Long
id
)
{
public
CommonResponse
queryFireCar
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@PathVariable
Long
id
)
{
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
id
);
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
getToken
(),
getProduct
(),
getAppKey
(),
id
);
return
CommonResponseUtil
.
success
(
car
);
return
CommonResponseUtil
.
success
(
car
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireStationController.java
View file @
0cb2f733
...
@@ -37,7 +37,7 @@ public class FireStationController extends BaseController {
...
@@ -37,7 +37,7 @@ public class FireStationController extends BaseController {
throw
new
Exception
(
"数据校验失败."
);
throw
new
Exception
(
"数据校验失败."
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
String
compCode
=
getOrgCode
(
reginParams
);
fireStation
.
setCreateBy
(
0
);
fireStation
.
setCreateBy
(
"0"
);
fireStation
.
setCreateDate
(
new
Date
());
fireStation
.
setCreateDate
(
new
Date
());
fireStation
.
setOrgCode
(
compCode
);
fireStation
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
save
(
fireStation
));
return
CommonResponseUtil
.
success
(
iFireStationService
.
save
(
fireStation
));
...
@@ -52,7 +52,7 @@ public class FireStationController extends BaseController {
...
@@ -52,7 +52,7 @@ public class FireStationController extends BaseController {
throw
new
Exception
(
"数据校验失败."
);
throw
new
Exception
(
"数据校验失败."
);
for
(
FireStationFireEquipment
fireStationFireEquipment
:
fireStationFireEquipments
)
{
for
(
FireStationFireEquipment
fireStationFireEquipment
:
fireStationFireEquipments
)
{
fireStationFireEquipment
.
setCreateBy
(
0
);
fireStationFireEquipment
.
setCreateBy
(
"0"
);
fireStationFireEquipment
.
setCreateDate
(
new
Date
());
fireStationFireEquipment
.
setCreateDate
(
new
Date
());
}
}
return
CommonResponseUtil
.
success
(
iFireStationService
.
saveStationFireEquipment
(
fireStationFireEquipments
));
return
CommonResponseUtil
.
success
(
iFireStationService
.
saveStationFireEquipment
(
fireStationFireEquipments
));
...
@@ -136,7 +136,7 @@ public class FireStationController extends BaseController {
...
@@ -136,7 +136,7 @@ public class FireStationController extends BaseController {
throw
new
Exception
(
"数据校验失败."
);
throw
new
Exception
(
"数据校验失败."
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
String
compCode
=
getOrgCode
(
reginParams
);
fireStation
.
setCreateBy
(
0
);
fireStation
.
setCreateBy
(
"0"
);
fireStation
.
setCreateDate
(
new
Date
());
fireStation
.
setCreateDate
(
new
Date
());
fireStation
.
setOrgCode
(
compCode
);
fireStation
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iFireStationService
.
saveAndUpd
(
fireStation
,
file
));
return
CommonResponseUtil
.
success
(
iFireStationService
.
saveAndUpd
(
fireStation
,
file
));
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireStrengthController.java
View file @
0cb2f733
...
@@ -41,7 +41,7 @@ public class FireStrengthController extends BaseController{
...
@@ -41,7 +41,7 @@ public class FireStrengthController extends BaseController{
||
StringUtils
.
isEmpty
(
fireStrength
.
getCode
()
))
||
StringUtils
.
isEmpty
(
fireStrength
.
getCode
()
))
throw
new
Exception
(
"数据校验失败."
);
throw
new
Exception
(
"数据校验失败."
);
fireStrength
.
setCreateBy
(
0
);
fireStrength
.
setCreateBy
(
"0"
);
fireStrength
.
setCreateDate
(
new
Date
());
fireStrength
.
setCreateDate
(
new
Date
());
return
CommonResponseUtil
.
success
(
fireStengthService
.
savePoint
(
fireStrength
));
return
CommonResponseUtil
.
success
(
fireStengthService
.
savePoint
(
fireStrength
));
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskFactorController.java
View file @
0cb2f733
...
@@ -41,7 +41,7 @@ public class RiskFactorController extends BaseController {
...
@@ -41,7 +41,7 @@ public class RiskFactorController extends BaseController {
public
CommonResponse
queryRiskFactorPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
public
CommonResponse
queryRiskFactorPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
list
=
iRiskFactorService
.
queryRiskFactorPage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
list
=
iRiskFactorService
.
queryRiskFactorPage
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
return
CommonResponseUtil
.
success
(
list
);
return
CommonResponseUtil
.
success
(
list
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskLevelController.java
View file @
0cb2f733
...
@@ -4,6 +4,7 @@ import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
...
@@ -4,6 +4,7 @@ import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskLevelService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskLevelService
;
import
com.yeejoin.amos.fas.business.util.CommonPageParamUtil
;
import
com.yeejoin.amos.fas.business.util.CommonPageParamUtil
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.common.enums.ManageLevelEum
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonRequest
;
import
com.yeejoin.amos.fas.core.common.request.CommonRequest
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
...
@@ -17,14 +18,11 @@ import org.slf4j.Logger;
...
@@ -17,14 +18,11 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RestController
@RequestMapping
(
"/api/riskLevel"
)
@RequestMapping
(
"/api/riskLevel"
)
...
@@ -44,7 +42,7 @@ public class RiskLevelController extends BaseController {
...
@@ -44,7 +42,7 @@ public class RiskLevelController extends BaseController {
public
CommonResponse
queryRiskLevelPage
(
@ApiParam
(
value
=
"查询条件"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
public
CommonResponse
queryRiskLevelPage
(
@ApiParam
(
value
=
"查询条件"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
list
=
iRiskLevelService
.
queryRiskLevelPage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
list
=
iRiskLevelService
.
queryRiskLevelPage
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
return
CommonResponseUtil
.
success
(
list
);
return
CommonResponseUtil
.
success
(
list
);
}
}
...
@@ -100,4 +98,10 @@ public class RiskLevelController extends BaseController {
...
@@ -100,4 +98,10 @@ public class RiskLevelController extends BaseController {
}
}
}
}
@ApiOperation
(
value
=
"风险管控级别查询"
,
notes
=
"风险管控级别查询"
)
@GetMapping
(
value
=
"/manageLevel/list"
)
public
CommonResponse
getManageLevelEumList
(){
return
CommonResponseUtil
.
success
(
ManageLevelEum
.
getManageLevelEumList
());
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
java.util.ArrayList
;
import
com.yeejoin.amos.fas.business.param.FmeaBindParam
;
import
java.util.HashMap
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
import
java.util.List
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
java.util.Map
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -30,10 +20,21 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -30,10 +20,21 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
java.util.HashMap
;
import
com.yeejoin.amos.fas.business.param.FmeaBindParam
;
import
java.util.List
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
import
java.util.Map
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
@RestController
@RestController
@RequestMapping
(
"/api/risksource"
)
@RequestMapping
(
"/api/risksource"
)
...
@@ -484,7 +485,7 @@ public class RiskSourceController extends BaseController {
...
@@ -484,7 +485,7 @@ public class RiskSourceController extends BaseController {
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
@RequestParam
Integer
pageNumber
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
@RequestParam
Integer
pageNumber
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
@RequestParam
Integer
pageSize
)
{
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
@RequestParam
Integer
pageSize
)
{
try
{
try
{
Page
<
Map
<
String
,
Object
>>
list
=
riskSourceService
.
listFmeaPointInputitem
(
fmeaId
,
pageNumber
,
pageSize
);
Page
<
Map
<
String
,
Object
>>
list
=
riskSourceService
.
listFmeaPointInputitem
(
getToken
(),
getProduct
(),
getAppKey
(),
fmeaId
,
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
list
);
return
CommonResponseUtil
.
success
(
list
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/WaterResourceController.java
View file @
0cb2f733
...
@@ -48,7 +48,7 @@ public class WaterResourceController extends BaseController{
...
@@ -48,7 +48,7 @@ public class WaterResourceController extends BaseController{
throw
new
Exception
(
"数据校验失败."
);
throw
new
Exception
(
"数据校验失败."
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
String
compCode
=
getOrgCode
(
reginParams
);
waterResource
.
setCreateBy
(
0
);
waterResource
.
setCreateBy
(
"0"
);
waterResource
.
setCreateDate
(
new
Date
());
waterResource
.
setCreateDate
(
new
Date
());
waterResource
.
setOrgCode
(
compCode
);
waterResource
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
save
(
waterResource
));
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
save
(
waterResource
));
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/FeignConfiguration.java
View file @
0cb2f733
...
@@ -7,14 +7,6 @@ import feign.Logger;
...
@@ -7,14 +7,6 @@ import feign.Logger;
@Configuration
@Configuration
public
class
FeignConfiguration
{
public
class
FeignConfiguration
{
/**
* 日志级别
* @return
*/
@Bean
Logger
.
Level
feignLoggerLevel
()
{
return
Logger
.
Level
.
FULL
;
}
/**
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/MultipartSupportConfig.java
0 → 100644
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
feign
;
import
feign.codec.Encoder
;
import
feign.form.spring.SpringFormEncoder
;
import
org.springframework.beans.factory.ObjectFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.http.HttpMessageConverters
;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.context.request.RequestContextListener
;
/**
* @Author: xinglei
* @Description:
* @Date: 2020/3/30 16:26
*/
@Configuration
public
class
MultipartSupportConfig
{
@Autowired
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
@Bean
public
Encoder
feignFormEncoder
()
{
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
}
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* @return
*/
@Bean
public
RequestContextListener
requestInterceptor
()
{
return
new
RequestContextListener
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/PushFeign.java
0 → 100644
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
feign
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
com.yeejoin.amos.fas.business.jpush.PushMsgParam
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
import
org.springframework.cloud.openfeign.FeignClient
;
//推送
@FeignClient
(
name
=
"${Push.fegin.name}"
,
configuration
={
MultipartSupportConfig
.
class
})
public
interface
PushFeign
{
//
// @RequestMapping(value = "/api/user/sendMessage", method = RequestMethod.POST)
// CommonResponse sendMessage( @RequestBody List<PushMsgParam> responses);
@RequestMapping
(
value
=
"/api/user/sendMessageone"
,
method
=
RequestMethod
.
POST
)
CommonResponse
sendMessageone
(
@RequestBody
PushMsgParam
responses
);
@RequestMapping
(
value
=
"/api/user/pushNoticeMany"
,
method
=
RequestMethod
.
POST
)
CommonResponse
pushNoticeMany
(
@RequestBody
PushMsgParam
responses
);
@RequestMapping
(
value
=
"/api/user/buildPushPayload"
,
method
=
RequestMethod
.
POST
)
CommonResponse
buildPushPayload
(
@RequestBody
PushMsgParam
responses
);
@RequestMapping
(
value
=
"/api/user/pushDevice"
,
method
=
RequestMethod
.
GET
)
CommonResponse
PushDevice
(
@RequestParam
(
"alias"
)
String
alias
);
@RequestMapping
(
value
=
"/api/user/PushDeviceRegistration"
,
method
=
RequestMethod
.
GET
)
CommonResponse
PushDeviceRegistration
(
@RequestParam
(
"registrationId"
)
String
registrationId
,
@RequestParam
(
"alias"
)
String
alias
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/PushFeignServer.java
0 → 100644
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
feign
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
com.yeejoin.amos.fas.business.jpush.PushMsgParam
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
@Service
(
"pushFeignServer"
)
public
class
PushFeignServer
{
private
final
RestTemplate
restTemplate
;
public
PushFeignServer
()
{
this
.
restTemplate
=
new
RestTemplate
();
}
@Value
(
"${Push.fegin.name}"
)
private
String
RPushFeginName
;
private
static
String
sendMessage
=
"/api/user/sendMessage"
;
public
String
geturls
(
String
url
){
return
"http://"
+
RPushFeginName
+
url
;
}
public
HttpHeaders
getHeader
(
String
toke
,
String
product
,
String
appKey
){
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
headers
.
set
(
"Content-Type"
,
"application/json"
);
headers
.
set
(
"token"
,
toke
);
headers
.
set
(
"product"
,
product
);
headers
.
set
(
"appKey"
,
appKey
);
return
headers
;
}
public
CommonResponse
sendMessage
(
String
toke
,
String
product
,
String
appKey
,
List
<
PushMsgParam
>
pushMsgParam
){
try
{
HttpEntity
httpEntity
=
new
HttpEntity
<>(
pushMsgParam
,
getHeader
(
toke
,
product
,
appKey
));
CommonResponse
commonResponse1
=
restTemplate
.
postForObject
(
geturls
(
sendMessage
),
httpEntity
,
CommonResponse
.
class
);
return
commonResponse1
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
CommonResponseUtil
.
failure
(
"发送失败"
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/jpush/AppMessagePushService.java
View file @
0cb2f733
...
@@ -7,17 +7,16 @@ import cn.jpush.api.push.model.audience.Audience;
...
@@ -7,17 +7,16 @@ import cn.jpush.api.push.model.audience.Audience;
import
cn.jpush.api.push.model.notification.Notification
;
import
cn.jpush.api.push.model.notification.Notification
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.
Value
;
import
org.springframework.beans.factory.annotation.
Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
java.util.List
;
@Service
@Service
public
class
AppMessagePushService
{
public
class
AppMessagePushService
{
protected
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
AppMessagePushService
.
class
);
protected
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
AppMessagePushService
.
class
);
/*
@Value("${params.isPush}")
@Value("${params.isPush}")
private String isPush;
private String isPush;
...
@@ -26,54 +25,65 @@ public class AppMessagePushService {
...
@@ -26,54 +25,65 @@ public class AppMessagePushService {
private static final String MASTER_SECRET = "8b650e645fb3a43c96be02b2";
private static final String MASTER_SECRET = "8b650e645fb3a43c96be02b2";
private static JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY);
private static JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY);
*/
@Autowired
private
com
.
yeejoin
.
amos
.
fas
.
business
.
feign
.
PushFeign
PushFeign
;
public
void
sendMessage
(
List
<
PushMsgParam
>
responses
)
{
try
{
if
(
responses
!=
null
&&
"true"
.
equals
(
isPush
))
{
for
(
PushMsgParam
response
:
responses
)
{
PushPayload
payload
=
buildPushPayload
(
response
);
// public void sendMessage(List<PushMsgParam> responses) {
jpushClient
.
sendPush
(
payload
);
// try {
}
// if (responses != null && "true".equals(isPush)) {
}
// for (PushMsgParam response : responses) {
}
catch
(
Exception
e
)
{
// PushPayload payload = buildPushPayload(response);
log
.
error
(
"极光推送异常"
,
e
);
// jpushClient.sendPush(payload);
}
// }
}
// }
// } catch (Exception e) {
// log.error("极光推送异常", e);
// }
// }
private
PushPayload
buildPushPayload
(
PushMsgParam
response
)
{
private
PushPayload
buildPushPayload
(
PushMsgParam
response
)
{
if
(
JPushTypeEnum
.
ALL
.
getCode
().
equals
(
response
.
getType
()))
{
CommonResponse
commonResponse
=
PushFeign
.
buildPushPayload
(
response
);
return
PushPayload
.
newBuilder
()
return
(
PushPayload
)
commonResponse
.
getDataList
();
.
setPlatform
(
Platform
.
android
())
// if (JPushTypeEnum.ALL.getCode().equals(response.getType())) {
.
setAudience
(
Audience
.
all
())
// return PushPayload.newBuilder()
.
setNotification
(
Notification
.
android
(
response
.
getContent
(),
response
.
getSubject
(),
response
.
getExtras
()))
// .setPlatform(Platform.android())
.
build
();
// .setAudience(Audience.all())
}
else
if
(
JPushTypeEnum
.
TAG
.
getCode
().
equals
(
response
.
getType
()))
{
// .setNotification(Notification.android(response.getContent(), response.getSubject(), response.getExtras()))
return
PushPayload
.
newBuilder
()
// .build();
.
setPlatform
(
Platform
.
android
())
// } else if (JPushTypeEnum.TAG.getCode().equals(response.getType())) {
.
setAudience
(
Audience
.
tag
(
response
.
getRecivers
()))
// return PushPayload.newBuilder()
.
setNotification
(
Notification
.
android
(
response
.
getContent
(),
response
.
getSubject
(),
response
.
getExtras
()))
// .setPlatform(Platform.android())
.
build
();
// .setAudience(Audience.tag(response.getRecivers()))
}
else
{
// .setNotification(Notification.android(response.getContent(), response.getSubject(), response.getExtras()))
return
PushPayload
.
newBuilder
()
// .build();
.
setPlatform
(
Platform
.
android
())
// } else {
.
setAudience
(
Audience
.
alias
(
response
.
getRecivers
()))
// return PushPayload.newBuilder()
.
setNotification
(
Notification
.
android
(
response
.
getContent
(),
response
.
getSubject
(),
response
.
getExtras
()))
// .setPlatform(Platform.android())
.
build
();
// .setAudience(Audience.alias(response.getRecivers()))
}
// .setNotification(Notification.android(response.getContent(), response.getSubject(), response.getExtras()))
// .build();
// }
}
}
public
void
sendMessage
(
PushMsgParam
response
)
{
public
void
sendMessage
(
PushMsgParam
response
)
{
try
{
CommonResponse
commonResponse
=
PushFeign
.
sendMessageone
(
response
);
if
(
null
!=
response
&&
"true"
.
equals
(
isPush
))
{
// try {
PushPayload
payload
=
PushPayload
.
newBuilder
().
setPlatform
(
Platform
.
android
())
// if (null != response && "true".equals(isPush)) {
.
setAudience
(
Audience
.
all
())
// PushPayload payload = PushPayload.newBuilder().setPlatform(Platform.android())
.
setNotification
(
Notification
.
android
(
response
.
getContent
(),
response
.
getSubject
(),
response
.
getExtras
()))
// .setAudience(Audience.all())
.
build
();
// .setNotification(Notification.android(response.getContent(), response.getSubject(), response.getExtras()))
jpushClient
.
sendPush
(
payload
);
// .build();
}
// jpushClient.sendPush(payload);
}
catch
(
Exception
e
)
{
// }
log
.
error
(
"极光推送异常"
,
e
);
// } catch (Exception e) {
}
// log.error("极光推送异常", e);
// }
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/AccidentTypeServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.amos.fas.business.dao.mapper.AccidentTypeMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.AccidentTypeMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IAccidentTypeDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IAccidentTypeDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IAccidentTypeService
;
import
com.yeejoin.amos.fas.business.service.intfc.IAccidentTypeService
;
import
com.yeejoin.amos.fas.dao.entity.AccidentType
;
import
com.yeejoin.amos.fas.dao.entity.AccidentType
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
@Service
(
"accidentTypeService"
)
@Service
(
"accidentTypeService"
)
public
class
AccidentTypeServiceImpl
implements
IAccidentTypeService
{
public
class
AccidentTypeServiceImpl
implements
IAccidentTypeService
{
...
@@ -27,7 +34,8 @@ public class AccidentTypeServiceImpl implements IAccidentTypeService {
...
@@ -27,7 +34,8 @@ public class AccidentTypeServiceImpl implements IAccidentTypeService {
IAccidentTypeDao
iAccidentTypeDao
;
IAccidentTypeDao
iAccidentTypeDao
;
@Autowired
@Autowired
IRiskFactorDao
iRiskFactorDao
;
IRiskFactorDao
iRiskFactorDao
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Override
@Override
public
void
detAccidentType
(
Long
[]
param
)
{
public
void
detAccidentType
(
Long
[]
param
)
{
//1.校验
//1.校验
...
@@ -56,8 +64,8 @@ public class AccidentTypeServiceImpl implements IAccidentTypeService {
...
@@ -56,8 +64,8 @@ public class AccidentTypeServiceImpl implements IAccidentTypeService {
String
userId
=
map
.
get
(
"user_id"
)==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
String
deptId
=
map
.
get
(
"dept_id"
)==
null
?
"0"
:
map
.
get
(
"dept_id"
).
toString
();
String
deptId
=
map
.
get
(
"dept_id"
)==
null
?
"0"
:
map
.
get
(
"dept_id"
).
toString
();
param
.
setOrgCode
(
orgCode
);
param
.
setOrgCode
(
orgCode
);
param
.
setDeptId
(
Long
.
parseLong
(
deptId
));
param
.
setDeptId
(
deptId
);
param
.
setCreateBy
(
Long
.
parseLong
(
userId
));
param
.
setCreateBy
(
userId
);
param
.
setCreateDate
(
new
Date
());
param
.
setCreateDate
(
new
Date
());
iAccidentTypeDao
.
save
(
param
);
iAccidentTypeDao
.
save
(
param
);
}
}
...
@@ -69,9 +77,38 @@ public class AccidentTypeServiceImpl implements IAccidentTypeService {
...
@@ -69,9 +77,38 @@ public class AccidentTypeServiceImpl implements IAccidentTypeService {
}
}
@Override
@Override
public
Page
<
HashMap
<
String
,
Object
>>
queryAccidentTypePage
(
CommonPageInfoParam
param
)
{
public
Page
<
HashMap
<
String
,
Object
>>
queryAccidentTypePage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
)
{
long
total
=
accidentTypeMapper
.
countPageData
(
param
);
long
total
=
accidentTypeMapper
.
countPageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
accidentTypeMapper
.
findAccidentTypePage
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
accidentTypeMapper
.
findAccidentTypePage
(
param
);
List
<
String
>
userIdList
=
new
ArrayList
<
String
>();
List
<
String
>
deptIdList
=
new
ArrayList
<
String
>();
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
String
userId
=
String
.
valueOf
(
map
.
get
(
"createBy"
));
String
deptId
=
String
.
valueOf
(
map
.
get
(
"deptId"
));
if
(
userId
!=
null
&&!
userIdList
.
contains
(
userId
))
{
userIdList
.
add
(
userId
);
}
if
(
deptId
!=
null
&&!
deptIdList
.
contains
(
deptId
))
{
deptIdList
.
add
(
deptId
);
}
}
List
<
AgencyUserModel
>
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdList
));
Map
<
String
,
String
>
userMap
=
new
HashMap
<
String
,
String
>();
for
(
int
i
=
0
;
i
<
users
.
size
();
i
++)
{
userMap
.
put
(
users
.
get
(
i
).
getUserId
(),
users
.
get
(
i
).
getUserName
());
}
List
<
LinkedHashMap
>
depts
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIdList
));
Map
<
String
,
String
>
deptMap
=
new
HashMap
<
String
,
String
>();
for
(
int
i
=
0
;
i
<
depts
.
size
();
i
++)
{
deptMap
.
put
(
depts
.
get
(
i
).
get
(
"sequenceNbr"
).
toString
(),
depts
.
get
(
i
).
get
(
"departmentName"
).
toString
());
}
content
.
forEach
(
e
->
{
e
.
put
(
"userName"
,
userMap
.
get
(
e
.
get
(
"createBy"
)));
e
.
put
(
"deptName"
,
deptMap
.
get
(
e
.
get
(
"deptId"
)));
});
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
param
,
total
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
param
,
total
);
return
result
;
return
result
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
javax.annotation.PostConstruct
;
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.data.domain.Sort
;
import
org.springframework.data.domain.Sort.Direction
;
import
org.springframework.data.domain.Sort.Order
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper
;
...
@@ -10,6 +41,7 @@ import com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao;
...
@@ -10,6 +41,7 @@ import com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.param.ImgParam
;
import
com.yeejoin.amos.fas.business.param.ImgParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
...
@@ -22,29 +54,10 @@ import com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment;
...
@@ -22,29 +54,10 @@ import com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment;
import
com.yeejoin.amos.fas.dao.entity.FireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
org.slf4j.Logger
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
org.slf4j.LoggerFactory
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
org.springframework.beans.factory.annotation.Value
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.domain.Sort.Direction
;
import
org.springframework.data.domain.Sort.Order
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.PostConstruct
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.*
;
@Service
(
"equipService"
)
@Service
(
"equipService"
)
public
class
EquipmentServiceImpl
implements
IEquipmentService
{
public
class
EquipmentServiceImpl
implements
IEquipmentService
{
...
@@ -89,6 +102,9 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -89,6 +102,9 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Value
(
"${linux.img.path}"
)
@Value
(
"${linux.img.path}"
)
private
String
linuxImgPath
;
private
String
linuxImgPath
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
public
Equipment
save
(
Equipment
equipment
)
{
public
Equipment
save
(
Equipment
equipment
)
{
Long
eqId
=
equipment
.
getId
();
Long
eqId
=
equipment
.
getId
();
equipment
=
iEquipmentDao
.
saveAndFlush
(
equipment
);
equipment
=
iEquipmentDao
.
saveAndFlush
(
equipment
);
...
@@ -243,7 +259,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -243,7 +259,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
pp
.
setEquipmentId
(
equipmentId
);
pp
.
setEquipmentId
(
equipmentId
);
pp
.
setType
(
type
);
pp
.
setType
(
type
);
pp
.
setCreateDate
(
new
Date
());
pp
.
setCreateDate
(
new
Date
());
pp
.
setCreateBy
(
userId
.
intValue
()
);
pp
.
setCreateBy
(
userId
.
intValue
()
+
""
);
}
}
String
path
=
FasConstant
.
UPLOAD_ROOT_PATH
+
File
.
separator
+
FasConstant
.
UPLOAD_EQUIPMENT_PATH
+
File
.
separator
String
path
=
FasConstant
.
UPLOAD_ROOT_PATH
+
File
.
separator
+
FasConstant
.
UPLOAD_EQUIPMENT_PATH
+
File
.
separator
...
@@ -267,7 +283,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -267,7 +283,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
throw
new
YeeException
(
"上传图片失败"
);
throw
new
YeeException
(
"上传图片失败"
);
}
}
String
picture
=
path
+
fileName
;
String
picture
=
path
+
fileName
;
pp
.
setCreateBy
(
userId
.
intValue
()
);
pp
.
setCreateBy
(
userId
.
intValue
()
+
""
);
pp
.
setPicture
(
picture
);
pp
.
setPicture
(
picture
);
if
(
equipment
.
getCreateDate
()
==
null
)
{
if
(
equipment
.
getCreateDate
()
==
null
)
{
Optional
<
Equipment
>
date
=
iEquipmentDao
.
findById
(
equipment
.
getId
());
Optional
<
Equipment
>
date
=
iEquipmentDao
.
findById
(
equipment
.
getId
());
...
@@ -398,8 +414,24 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -398,8 +414,24 @@ public class EquipmentServiceImpl implements IEquipmentService {
}
}
@Override
@Override
public
EquipDetailsResponse
findEquipDetailsById
(
Long
id
)
{
public
EquipDetailsResponse
findEquipDetailsById
(
String
toke
,
String
product
,
String
appKey
,
Long
id
)
{
return
fireEquipMapper
.
findEquipDetailsById
(
id
);
EquipDetailsResponse
equipDetailsResponse
=
fireEquipMapper
.
findEquipDetailsById
(
id
);
AgencyUserModel
user
=
remoteSecurityService
.
getUserById
(
toke
,
product
,
appKey
,
equipDetailsResponse
.
getUserId
());
equipDetailsResponse
.
setUsername
(
user
.
getRealName
());
equipDetailsResponse
.
setTel
(
user
.
getMobile
());
if
(
user
.
getCompanys
().
get
(
0
)!=
null
)
{
CompanyModel
companyModel
=
user
.
getCompanys
().
get
(
0
);
if
(
user
.
getCompanyDepartments
().
get
(
companyModel
.
getSequenceNbr
())!=
null
)
{
List
<
DepartmentModel
>
departList
=
user
.
getCompanyDepartments
().
get
(
companyModel
.
getSequenceNbr
());
if
(!
departList
.
isEmpty
())
{
equipDetailsResponse
.
setDepName
(
departList
.
get
(
0
).
getDepartmentName
());
}
}
}
return
equipDetailsResponse
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireCarServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Set
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.assertj.core.util.Sets
;
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
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
...
@@ -11,19 +31,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IFireCarService;
...
@@ -11,19 +31,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IFireCarService;
import
com.yeejoin.amos.fas.business.vo.FireCarDetailVo
;
import
com.yeejoin.amos.fas.business.vo.FireCarDetailVo
;
import
com.yeejoin.amos.fas.dao.entity.FireCar
;
import
com.yeejoin.amos.fas.dao.entity.FireCar
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
org.apache.commons.collections.CollectionUtils
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
org.assertj.core.util.Sets
;
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
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.*
;
@Service
(
"fireCarService"
)
@Service
(
"fireCarService"
)
...
@@ -109,8 +117,10 @@ public class FireCarServiceImpl implements IFireCarService {
...
@@ -109,8 +117,10 @@ public class FireCarServiceImpl implements IFireCarService {
}
}
@Override
@Override
public
FireCarDetailVo
findFireCarById
(
Long
truckId
)
{
public
FireCarDetailVo
findFireCarById
(
String
toke
,
String
product
,
String
appKey
,
Long
truckId
)
{
FireCarDetailVo
carVo
=
fireCarMapper
.
getFireCarDetailById
(
truckId
);
FireCarDetailVo
carVo
=
fireCarMapper
.
getFireCarDetailById
(
truckId
);
DepartmentModel
departmentModel
=
remoteSecurityService
.
getDepartmentByDeptId
(
toke
,
product
,
appKey
,
carVo
.
getDeptId
());
carVo
.
setDepartmentName
(
departmentModel
.
getDepartmentName
());
return
carVo
;
return
carVo
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipPointServiceImpl.java
View file @
0cb2f733
...
@@ -12,7 +12,6 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable;
...
@@ -12,7 +12,6 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.dao.entity.FireCar
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
import
org.assertj.core.util.Lists
;
import
org.assertj.core.util.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaEquipmentPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaEquipmentPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaPointInputitemMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaPointInputitemMapper
;
...
@@ -16,6 +17,10 @@ import com.yeejoin.amos.fas.dao.entity.Fmea;
...
@@ -16,6 +17,10 @@ import com.yeejoin.amos.fas.dao.entity.Fmea;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.bouncycastle.util.Arrays
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageImpl
;
...
@@ -82,6 +87,71 @@ public class FmeaServiceImpl implements IFmeaService {
...
@@ -82,6 +87,71 @@ public class FmeaServiceImpl implements IFmeaService {
public
Page
<
HashMap
<
String
,
Object
>>
queryFmeaList
(
CommonPageInfoParam
param
)
{
public
Page
<
HashMap
<
String
,
Object
>>
queryFmeaList
(
CommonPageInfoParam
param
)
{
long
total
=
fmeaMapper
.
countPageData
(
param
);
long
total
=
fmeaMapper
.
countPageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
fmeaMapper
.
queryFmeaPage
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
fmeaMapper
.
queryFmeaPage
(
param
);
StringBuffer
sb
=
new
StringBuffer
();
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
//String[] ids = sb.toString().split(",");
//String companyLeaderId = String.valueOf(map.get("companyLeaderId"));
sb
.
append
(
map
.
get
(
"companyLeaderId"
));
sb
.
append
(
map
.
get
(
","
));
//String departmentLeaderId = String.valueOf(map.get("departmentLeaderId"));
sb
.
append
(
map
.
get
(
"departmentLeaderId"
));
sb
.
append
(
map
.
get
(
","
));
//String groupLeaderId = String.valueOf(map.get("groupLeaderId"));
sb
.
append
(
map
.
get
(
"groupLeaderId"
));
sb
.
append
(
map
.
get
(
","
));
//String personLeaderId = String.valueOf(map.get("personLeaderId"));
sb
.
append
(
map
.
get
(
"personLeaderId"
));
sb
.
append
(
map
.
get
(
","
));
//String identifyUserId = String.valueOf(map.get("identifyUserId"));
sb
.
append
(
map
.
get
(
"identifyUserId"
));
sb
.
append
(
map
.
get
(
","
));
}
sb
.
deleteCharAt
(
sb
.
length
()-
1
);
FeignClientResult
<
List
<
AgencyUserModel
>>
resultSec
=
Privilege
.
agencyUserClient
.
queryByIds
(
sb
.
toString
());
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
String
companyLeaderId
=
String
.
valueOf
(
map
.
get
(
"companyLeaderId"
));
String
departmentLeaderId
=
String
.
valueOf
(
map
.
get
(
"departmentLeaderId"
));
String
groupLeaderId
=
String
.
valueOf
(
map
.
get
(
"groupLeaderId"
));
String
personLeaderId
=
String
.
valueOf
(
map
.
get
(
"personLeaderId"
));
String
identifyUserId
=
String
.
valueOf
(
map
.
get
(
"identifyUserId"
));
for
(
AgencyUserModel
user
:
resultSec
.
getResult
())
{
if
(
companyLeaderId
!=
null
&&
companyLeaderId
.
equals
(
user
.
getUserId
()))
{
map
.
put
(
"companyLeaderName"
,
user
.
getRealName
());
}
if
(
departmentLeaderId
!=
null
&&
departmentLeaderId
.
equals
(
user
.
getUserId
()))
{
map
.
put
(
"departmentLeaderName"
,
user
.
getRealName
());
}
if
(
groupLeaderId
!=
null
&&
groupLeaderId
.
equals
(
user
.
getUserId
()))
{
map
.
put
(
"groupLeaderName"
,
user
.
getRealName
());
}
if
(
personLeaderId
!=
null
&&
personLeaderId
.
equals
(
user
.
getUserId
()))
{
map
.
put
(
"personLeaderName"
,
user
.
getRealName
());
}
if
(
identifyUserId
!=
null
&&
identifyUserId
.
equals
(
user
.
getUserId
()))
{
map
.
put
(
"identifyUserName"
,
user
.
getRealName
());
}
}
}
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<
HashMap
<
String
,
Object
>>(
content
,
param
,
total
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<
HashMap
<
String
,
Object
>>(
content
,
param
,
total
);
return
result
;
return
result
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskFactorServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskFactorMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskFactorMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IFmeaDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFmeaDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
import
com.yeejoin.amos.fas.dao.entity.Fmea
;
import
com.yeejoin.amos.fas.dao.entity.Fmea
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
@Service
(
"riskFactorService"
)
@Service
(
"riskFactorService"
)
public
class
RiskFactorServiceImpl
implements
IRiskFactorService
{
public
class
RiskFactorServiceImpl
implements
IRiskFactorService
{
...
@@ -33,11 +40,41 @@ public class RiskFactorServiceImpl implements IRiskFactorService {
...
@@ -33,11 +40,41 @@ public class RiskFactorServiceImpl implements IRiskFactorService {
RiskSourceMapper
riskSourceMapper
;
RiskSourceMapper
riskSourceMapper
;
@Autowired
@Autowired
IRiskLevelDao
iRiskLevelDao
;
IRiskLevelDao
iRiskLevelDao
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Override
@Override
public
Page
<
HashMap
<
String
,
Object
>>
queryRiskFactorPage
(
CommonPageInfoParam
param
)
{
public
Page
<
HashMap
<
String
,
Object
>>
queryRiskFactorPage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
)
{
long
total
=
riskFactorMapper
.
countPageData
(
param
);
long
total
=
riskFactorMapper
.
countPageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
riskFactorMapper
.
queryRiskFactorPage
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
riskFactorMapper
.
queryRiskFactorPage
(
param
);
List
<
String
>
userIdList
=
new
ArrayList
<
String
>();
List
<
String
>
deptIdList
=
new
ArrayList
<
String
>();
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
String
userId
=
String
.
valueOf
(
map
.
get
(
"createBy"
));
String
deptId
=
String
.
valueOf
(
map
.
get
(
"deptId"
));
if
(
userId
!=
null
&&!
userIdList
.
contains
(
userId
))
{
userIdList
.
add
(
userId
);
}
if
(
deptId
!=
null
&&!
deptIdList
.
contains
(
deptId
))
{
deptIdList
.
add
(
deptId
);
}
}
List
<
AgencyUserModel
>
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdList
));
Map
<
String
,
String
>
userMap
=
new
HashMap
<
String
,
String
>();
for
(
int
i
=
0
;
i
<
users
.
size
();
i
++)
{
userMap
.
put
(
users
.
get
(
i
).
getUserId
(),
users
.
get
(
i
).
getUserName
());
}
List
<
LinkedHashMap
>
depts
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIdList
));
Map
<
String
,
String
>
deptMap
=
new
HashMap
<
String
,
String
>();
for
(
int
i
=
0
;
i
<
depts
.
size
();
i
++)
{
deptMap
.
put
(
depts
.
get
(
i
).
get
(
"sequenceNbr"
).
toString
(),
depts
.
get
(
i
).
get
(
"departmentName"
).
toString
());
}
content
.
forEach
(
e
->
{
e
.
put
(
"userName"
,
userMap
.
get
(
e
.
get
(
"createBy"
)));
e
.
put
(
"deptName"
,
deptMap
.
get
(
e
.
get
(
"deptId"
)));
});
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
param
,
total
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
param
,
total
);
return
result
;
return
result
;
}
}
...
@@ -54,8 +91,8 @@ public class RiskFactorServiceImpl implements IRiskFactorService {
...
@@ -54,8 +91,8 @@ public class RiskFactorServiceImpl implements IRiskFactorService {
String
userId
=
map
.
get
(
"user_id"
)
==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)
==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
String
deptId
=
map
.
get
(
"dept_id"
)
==
null
?
"0"
:
map
.
get
(
"dept_id"
).
toString
();
String
deptId
=
map
.
get
(
"dept_id"
)
==
null
?
"0"
:
map
.
get
(
"dept_id"
).
toString
();
param
.
setOrgCode
(
orgCode
);
param
.
setOrgCode
(
orgCode
);
param
.
setDeptId
(
Long
.
parseLong
(
deptId
));
param
.
setDeptId
(
deptId
);
param
.
setCreateBy
(
Integer
.
parseInt
(
userId
));
param
.
setCreateBy
(
userId
);
param
.
setCreateDate
(
new
Date
());
param
.
setCreateDate
(
new
Date
());
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskLevelServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.common.enums.ManageLevelEum
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskLevelMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskLevelMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskLevelService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskLevelService
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
@Service
(
"riskLevelService"
)
@Service
(
"riskLevelService"
)
public
class
RiskLevelServiceImpl
implements
IRiskLevelService
{
public
class
RiskLevelServiceImpl
implements
IRiskLevelService
{
@Autowired
@Autowired
...
@@ -26,22 +39,43 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
...
@@ -26,22 +39,43 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
IRiskLevelDao
iRiskLevelDao
;
IRiskLevelDao
iRiskLevelDao
;
@Autowired
@Autowired
IRiskSourceDao
iRiskSourceDao
;
IRiskSourceDao
iRiskSourceDao
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Override
@Override
public
Page
<
HashMap
<
String
,
Object
>>
queryRiskLevelPage
(
CommonPageInfoParam
param
)
{
public
Page
<
HashMap
<
String
,
Object
>>
queryRiskLevelPage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
)
{
long
total
=
riskLevelMapper
.
countPageData
(
param
);
long
total
=
riskLevelMapper
.
countPageData
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
riskLevelMapper
.
queryRiskLevelPage
(
param
);
List
<
HashMap
<
String
,
Object
>>
content
=
riskLevelMapper
.
queryRiskLevelPage
(
param
);
Page
<
HashMap
<
String
,
Object
>>
result
=
new
PageImpl
<>(
content
,
param
,
total
);
Set
<
String
>
userIdList
=
new
HashSet
<
String
>();
return
result
;
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
userIdList
.
add
(
String
.
valueOf
(
map
.
get
(
"createBy"
)));
}
Map
<
String
,
String
>
userMap
=
new
HashMap
<
String
,
String
>();
if
(
userIdList
.
size
()>
0
)
{
List
<
AgencyUserModel
>
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdList
));
for
(
int
i
=
0
;
i
<
users
.
size
();
i
++)
{
userMap
.
put
(
users
.
get
(
i
).
getUserId
(),
users
.
get
(
i
).
getUserName
());
}
}
}
content
.
forEach
(
e
->
{
e
.
put
(
"userName"
,
userMap
.
get
(
String
.
valueOf
(
e
.
get
(
"createBy"
))));
e
.
put
(
"manageLevelName"
,
StringUtil
.
isNotEmpty
(
e
.
get
(
"manageLevel"
))
?
ManageLevelEum
.
getNameByManageLevel
(
Integer
.
parseInt
(
e
.
get
(
"manageLevel"
).
toString
()))
:
""
);
});
return
new
PageImpl
<>(
content
,
param
,
total
);
}
@Override
@Override
public
void
editRiskLevel
(
HashMap
<
String
,
Object
>
map
)
{
public
void
editRiskLevel
(
HashMap
<
String
,
Object
>
map
)
{
RiskLevel
param
=
(
RiskLevel
)
map
.
get
(
"param"
);
RiskLevel
param
=
(
RiskLevel
)
map
.
get
(
"param"
);
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
param
.
setOrgCode
(
orgCode
);
param
.
setOrgCode
(
orgCode
);
param
.
setCreateBy
(
Long
.
parseLong
(
userId
)
);
param
.
setCreateBy
(
userId
);
param
.
setCreateDate
(
new
Date
());
param
.
setCreateDate
(
new
Date
());
iRiskLevelDao
.
save
(
param
);
iRiskLevelDao
.
save
(
param
);
}
}
...
@@ -54,7 +88,6 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
...
@@ -54,7 +88,6 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
}
}
//2.删除
//2.删除
iRiskLevelDao
.
deleteAllByIds
(
param
);
iRiskLevelDao
.
deleteAllByIds
(
param
);
}
}
/**
/**
...
@@ -87,3 +120,4 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
...
@@ -87,3 +120,4 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
0cb2f733
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.UUID
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
javax.annotation.PostConstruct
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.redis.core.HashOperations
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.cache.Redis
;
import
org.typroject.tyboot.component.cache.enumeration.CacheType
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.bo.BindRegionBo
;
import
com.yeejoin.amos.fas.business.bo.BindRegionBo
;
import
com.yeejoin.amos.fas.business.bo.RpnCalculationBo
;
import
com.yeejoin.amos.fas.business.bo.RpnCalculationBo
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.dao.mapper.*
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaEquipmentPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaPointInputitemMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper
;
import
com.yeejoin.amos.fas.business.dao.mongo.EquipCommunicationDao
;
import
com.yeejoin.amos.fas.business.dao.mongo.EquipCommunicationDao
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IDictDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEvaluationModelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentPointDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFmeaDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPPointDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRpnChangeLogDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteRuleServer
;
import
com.yeejoin.amos.fas.business.feign.RemoteRuleServer
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.feign.RemoteWebSocketServer
;
import
com.yeejoin.amos.fas.business.feign.RemoteWebSocketServer
;
...
@@ -24,7 +82,12 @@ import com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance;
...
@@ -24,7 +82,12 @@ import com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance;
import
com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService
;
import
com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.model.*
;
import
com.yeejoin.amos.fas.business.service.model.CheckInputItemRo
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyRo
;
import
com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
import
com.yeejoin.amos.fas.business.service.model.RiskSourceRuleRo
;
import
com.yeejoin.amos.fas.business.util.DateUtils
;
import
com.yeejoin.amos.fas.business.util.DateUtils
;
import
com.yeejoin.amos.fas.business.util.JexlUtil
;
import
com.yeejoin.amos.fas.business.util.JexlUtil
;
import
com.yeejoin.amos.fas.business.util.RpnUtils
;
import
com.yeejoin.amos.fas.business.util.RpnUtils
;
...
@@ -34,31 +97,24 @@ import com.yeejoin.amos.fas.common.enums.DataRefreshTypeEum;
...
@@ -34,31 +97,24 @@ import com.yeejoin.amos.fas.common.enums.DataRefreshTypeEum;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.Dict
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.EvaluationModel
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentData
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
import
com.yeejoin.amos.fas.dao.entity.Fmea
;
import
com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint
;
import
com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem
;
import
com.yeejoin.amos.fas.dao.entity.PPoint
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RpnChangeLog
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.redis.core.HashOperations
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.cache.Redis
;
import
org.typroject.tyboot.component.cache.enumeration.CacheType
;
import
javax.annotation.PostConstruct
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.concurrent.*
;
import
java.util.stream.Collectors
;
@Service
(
"riskSourceService"
)
@Service
(
"riskSourceService"
)
...
@@ -174,7 +230,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -174,7 +230,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)
==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)
==
null
?
"0"
:
map
.
get
(
"user_id"
).
toString
();
riskSource
.
setOrgCode
(
orgCode
);
riskSource
.
setOrgCode
(
orgCode
);
riskSource
.
setCreateBy
(
Integer
.
parseInt
(
userId
)
);
riskSource
.
setCreateBy
(
userId
);
Optional
<
RiskSource
>
oldRiskSource1
=
iRiskSourceDao
.
findById
(
id
);
Optional
<
RiskSource
>
oldRiskSource1
=
iRiskSourceDao
.
findById
(
id
);
RiskSource
oldRiskSource
=
null
;
RiskSource
oldRiskSource
=
null
;
if
(
oldRiskSource1
.
isPresent
())
{
if
(
oldRiskSource1
.
isPresent
())
{
...
@@ -519,13 +575,51 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -519,13 +575,51 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
@Override
@Override
public
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
)
{
public
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
String
toke
,
String
product
,
String
appKey
,
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
)
{
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
long
total
=
fmeaPointInputitemMapper
.
countByFmeaId
(
fmeaId
);
long
total
=
fmeaPointInputitemMapper
.
countByFmeaId
(
fmeaId
);
if
(
total
==
0L
)
{
if
(
total
==
0L
)
{
return
new
PageImpl
<>(
content
,
null
,
total
);
return
new
PageImpl
<>(
content
,
null
,
total
);
}
}
content
=
fmeaPointInputitemMapper
.
listByFmeaId
(
fmeaId
,
pageNumber
,
pageSize
);
content
=
fmeaPointInputitemMapper
.
listByFmeaId
(
fmeaId
,
pageNumber
,
pageSize
);
List
<
String
>
userIdList
=
new
ArrayList
<
String
>();
List
<
String
>
deptIdList
=
new
ArrayList
<
String
>();
for
(
Map
<
String
,
Object
>
map
:
content
)
{
String
userId
=
String
.
valueOf
(
map
.
get
(
"userId"
));
String
deptId
=
String
.
valueOf
(
map
.
get
(
"deptId"
));
if
(
userId
!=
null
&&!
userIdList
.
contains
(
userId
))
{
userIdList
.
add
(
userId
);
}
if
(
deptId
!=
null
&&!
deptIdList
.
contains
(
deptId
))
{
deptIdList
.
add
(
deptId
);
}
}
Map
<
String
,
String
>
userMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
deptMap
=
new
HashMap
<
String
,
String
>();
if
(
userIdList
.
size
()>
0
)
{
List
<
AgencyUserModel
>
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIdList
));
for
(
int
i
=
0
;
i
<
users
.
size
();
i
++)
{
userMap
.
put
(
users
.
get
(
i
).
getUserId
(),
users
.
get
(
i
).
getUserName
());
}
}
if
(
deptIdList
.
size
()>
0
)
{
List
<
LinkedHashMap
>
depts
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIdList
));
for
(
int
i
=
0
;
i
<
depts
.
size
();
i
++)
{
deptMap
.
put
(
depts
.
get
(
i
).
get
(
"sequenceNbr"
).
toString
(),
depts
.
get
(
i
).
get
(
"departmentName"
).
toString
());
}
}
content
.
forEach
(
e
->
{
e
.
put
(
"username"
,
userMap
.
get
(
String
.
valueOf
(
e
.
get
(
"userId"
))));
e
.
put
(
"depName"
,
deptMap
.
get
(
String
.
valueOf
(
e
.
get
(
"deptId"
))));
e
.
put
(
"tel"
,
userMap
.
get
(
String
.
valueOf
(
e
.
get
(
"deptId"
)+
"tel"
)));
});
return
new
PageImpl
<>(
content
,
null
,
total
);
return
new
PageImpl
<>(
content
,
null
,
total
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IAccidentTypeService.java
View file @
0cb2f733
...
@@ -2,12 +2,10 @@ package com.yeejoin.amos.fas.business.service.intfc;
...
@@ -2,12 +2,10 @@ package com.yeejoin.amos.fas.business.service.intfc;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.dao.entity.AccidentType
;
public
interface
IAccidentTypeService
{
public
interface
IAccidentTypeService
{
...
@@ -15,8 +13,9 @@ public interface IAccidentTypeService {
...
@@ -15,8 +13,9 @@ public interface IAccidentTypeService {
void
editAccidentType
(
HashMap
<
String
,
Object
>
map
);
void
editAccidentType
(
HashMap
<
String
,
Object
>
map
);
List
<
HashMap
<
String
,
Object
>>
queryAccidentType
(
String
orgCode
);
List
<
HashMap
<
String
,
Object
>>
queryAccidentType
(
String
orgCode
);
Page
<
HashMap
<
String
,
Object
>>
queryAccidentTypePage
(
CommonPageInfoParam
param
);
Page
<
HashMap
<
String
,
Object
>>
queryAccidentTypePage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IEquipmentService.java
View file @
0cb2f733
...
@@ -88,7 +88,7 @@ public interface IEquipmentService {
...
@@ -88,7 +88,7 @@ public interface IEquipmentService {
*/
*/
List
<
Map
<
String
,
Object
>>
findEquipVideoList
();
List
<
Map
<
String
,
Object
>>
findEquipVideoList
();
EquipDetailsResponse
findEquipDetailsById
(
Long
id
);
EquipDetailsResponse
findEquipDetailsById
(
String
toke
,
String
product
,
String
appKey
,
Long
id
);
/**
/**
* 获取所有重点装备
* 获取所有重点装备
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IFireCarService.java
View file @
0cb2f733
...
@@ -13,13 +13,10 @@ public interface IFireCarService {
...
@@ -13,13 +13,10 @@ public interface IFireCarService {
Page
<
HashMap
<
String
,
Object
>>
queryFireCar
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
);
Page
<
HashMap
<
String
,
Object
>>
queryFireCar
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
);
FireCarDetailVo
findFireCarById
(
Long
id
);
FireCarDetailVo
findFireCarById
(
String
toke
,
String
product
,
String
appKey
,
Long
id
);
FireCar
save
(
FireCar
fireCar
);
FireCar
save
(
FireCar
fireCar
);
FireCar
queryOne
(
Long
id
);
FireCar
queryOne
(
Long
id
);
String
[]
delete
(
String
[]
idArray
)
throws
Exception
;
String
[]
delete
(
String
[]
idArray
)
throws
Exception
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskFactorService.java
View file @
0cb2f733
...
@@ -14,7 +14,7 @@ public interface IRiskFactorService {
...
@@ -14,7 +14,7 @@ public interface IRiskFactorService {
* @param param
* @param param
* @return
* @return
*/
*/
Page
<
HashMap
<
String
,
Object
>>
queryRiskFactorPage
(
CommonPageInfoParam
param
);
Page
<
HashMap
<
String
,
Object
>>
queryRiskFactorPage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
);
/**
/**
* 危险因素查询不分页
* 危险因素查询不分页
*/
*/
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskLevelService.java
View file @
0cb2f733
...
@@ -10,7 +10,7 @@ import com.yeejoin.amos.fas.dao.entity.RiskLevel;
...
@@ -10,7 +10,7 @@ import com.yeejoin.amos.fas.dao.entity.RiskLevel;
public
interface
IRiskLevelService
{
public
interface
IRiskLevelService
{
Page
<
HashMap
<
String
,
Object
>>
queryRiskLevelPage
(
CommonPageInfoParam
param
);
Page
<
HashMap
<
String
,
Object
>>
queryRiskLevelPage
(
String
toke
,
String
product
,
String
appKey
,
CommonPageInfoParam
param
);
void
editRiskLevel
(
HashMap
<
String
,
Object
>
map
);
void
editRiskLevel
(
HashMap
<
String
,
Object
>
map
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskSourceService.java
View file @
0cb2f733
...
@@ -64,7 +64,7 @@ public interface IRiskSourceService {
...
@@ -64,7 +64,7 @@ public interface IRiskSourceService {
List
<
Map
<
String
,
Object
>>
listEquipmentPointById
(
Long
fmeaId
,
Long
importantEquipId
,
Long
equipmentId
,
String
equipmentPointName
);
List
<
Map
<
String
,
Object
>>
listEquipmentPointById
(
Long
fmeaId
,
Long
importantEquipId
,
Long
equipmentId
,
String
equipmentPointName
);
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
);
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
String
toke
,
String
product
,
String
appKey
,
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
);
Page
<
Map
<
String
,
Object
>>
listFeamEquipmentPoint
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
);
Page
<
Map
<
String
,
Object
>>
listFeamEquipmentPoint
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
);
...
...
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
0cb2f733
spring.application.name
=
AMOS-
FIREAUTOSYS-SUHG
spring.application.name
=
AMOS-
AUTOSYS-XKQ1
server.port
=
8083
server.port
=
8083
...
@@ -44,6 +44,8 @@ spring.http.multipart.MaxRequestSize = 50480000
...
@@ -44,6 +44,8 @@ spring.http.multipart.MaxRequestSize = 50480000
windows.img.path
=
D:
\\
windows.img.path
=
D:
\\
linux.img.path = /
linux.img.path = /
Push.fegin.name
=
PPMESSAGEPUSHSERVICE15
dutyMode.fegin.name
=
AMOSDUTYMODE
dutyMode.fegin.name
=
AMOSDUTYMODE
param.safetyIndexChange.cron
=
0 0 2 * * ?
param.safetyIndexChange.cron
=
0 0 2 * * ?
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/init/fas-create-table.sql
View file @
0cb2f733
...
@@ -11,8 +11,8 @@ CREATE TABLE `f_accident_type` (
...
@@ -11,8 +11,8 @@ CREATE TABLE `f_accident_type` (
`evaluation_sid`
bigint
(
32
)
DEFAULT
NULL
COMMENT
'evaluation_model 中 type 为s 的id'
,
`evaluation_sid`
bigint
(
32
)
DEFAULT
NULL
COMMENT
'evaluation_model 中 type 为s 的id'
,
`influence`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'失效/事故影响'
,
`influence`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'失效/事故影响'
,
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`dept_id`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
PRIMARY
KEY
(
`id`
)
USING
BTREE
...
@@ -67,8 +67,8 @@ CREATE TABLE `f_equipment` (
...
@@ -67,8 +67,8 @@ CREATE TABLE `f_equipment` (
`building`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'建筑物'
,
`building`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'建筑物'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间号'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间号'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`charge_dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'责任部门'
,
`charge_dept_id`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'责任部门'
,
`charge_user_id`
int
(
1
)
DEFAULT
'0'
COMMENT
'责任人'
,
`charge_user_id`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'责任人'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
...
@@ -102,7 +102,7 @@ CREATE TABLE `f_evaluation_model` (
...
@@ -102,7 +102,7 @@ CREATE TABLE `f_evaluation_model` (
`name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'模型名称'
,
`name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'模型名称'
,
`standard`
text
COMMENT
'模型内容'
,
`standard`
text
COMMENT
'模型内容'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`coefficient`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'系数'
,
`coefficient`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'系数'
,
`influence`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'影响'
,
`influence`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'影响'
,
...
@@ -240,7 +240,7 @@ CREATE TABLE `f_fire_station` (
...
@@ -240,7 +240,7 @@ CREATE TABLE `f_fire_station` (
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`picture`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'图片'
,
`picture`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'图片'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
...
@@ -256,7 +256,7 @@ CREATE TABLE `f_fire_station_equipment` (
...
@@ -256,7 +256,7 @@ CREATE TABLE `f_fire_station_equipment` (
`fire_station_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防站id'
,
`fire_station_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防站id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防物资id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防物资id'
,
`number`
double
DEFAULT
NULL
COMMENT
'个数'
,
`number`
double
DEFAULT
NULL
COMMENT
'个数'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`unit`
varchar
(
32
)
DEFAULT
NULL
,
`unit`
varchar
(
32
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
PRIMARY
KEY
(
`id`
)
USING
BTREE
...
@@ -276,7 +276,7 @@ CREATE TABLE `f_fire_strength` (
...
@@ -276,7 +276,7 @@ CREATE TABLE `f_fire_strength` (
`job_des`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'工作描述'
,
`job_des`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'工作描述'
,
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
`org_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'组织'
,
`org_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`day_end`
time
DEFAULT
NULL
COMMENT
'结束时间'
,
`day_end`
time
DEFAULT
NULL
COMMENT
'结束时间'
,
`day_begin`
time
DEFAULT
NULL
COMMENT
'开始时间'
,
`day_begin`
time
DEFAULT
NULL
COMMENT
'开始时间'
,
...
@@ -307,7 +307,7 @@ CREATE TABLE `f_fmea` (
...
@@ -307,7 +307,7 @@ CREATE TABLE `f_fmea` (
`department_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'部门负责人'
,
`department_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'部门负责人'
,
`group_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'班组负责人'
,
`group_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'班组负责人'
,
`person_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'个人负责人'
,
`person_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'个人负责人'
,
`identify_user`
int
(
11
)
DEFAULT
NULL
COMMENT
'辨识人'
,
`identify_user`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'辨识人'
,
`identify_method`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'辨识方法'
,
`identify_method`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'辨识方法'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
...
@@ -353,7 +353,7 @@ CREATE TABLE `f_preplan_picture` (
...
@@ -353,7 +353,7 @@ CREATE TABLE `f_preplan_picture` (
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`picture`
text
COMMENT
'图片路径地址'
,
`picture`
text
COMMENT
'图片路径地址'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
161
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'重点设备预案图'
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
161
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'重点设备预案图'
;
...
@@ -368,8 +368,8 @@ CREATE TABLE `f_risk_factor` (
...
@@ -368,8 +368,8 @@ CREATE TABLE `f_risk_factor` (
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`accident_type_id`
bigint
(
20
)
NOT
NULL
COMMENT
'失效/事故影响'
,
`accident_type_id`
bigint
(
20
)
NOT
NULL
COMMENT
'失效/事故影响'
,
`type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'分类'
,
`type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'分类'
,
`dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`dept_id`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
PRIMARY
KEY
(
`id`
)
USING
BTREE
...
@@ -387,7 +387,7 @@ CREATE TABLE `f_risk_level` (
...
@@ -387,7 +387,7 @@ CREATE TABLE `f_risk_level` (
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'结果描述'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'结果描述'
,
`color`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'图标颜色'
,
`color`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'图标颜色'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`top_limit`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'上限'
,
`top_limit`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'上限'
,
...
@@ -411,7 +411,7 @@ CREATE TABLE `f_risk_source` (
...
@@ -411,7 +411,7 @@ CREATE TABLE `f_risk_source` (
`risk_level_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险等级id'
,
`risk_level_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险等级id'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`is_region`
varchar
(
16
)
DEFAULT
NULL
,
`is_region`
varchar
(
16
)
DEFAULT
NULL
,
`status`
varchar
(
16
)
DEFAULT
NULL
COMMENT
'状态(正常NORMAL,异常ANOMALY)'
,
`status`
varchar
(
16
)
DEFAULT
NULL
COMMENT
'状态(正常NORMAL,异常ANOMALY)'
,
...
@@ -563,7 +563,7 @@ CREATE TABLE `f_water_resource` (
...
@@ -563,7 +563,7 @@ CREATE TABLE `f_water_resource` (
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_accident_type.xml
View file @
0cb2f733
...
@@ -8,8 +8,6 @@
...
@@ -8,8 +8,6 @@
count(1) AS total_num
count(1) AS total_num
FROM
FROM
f_accident_type a
f_accident_type a
left join s_user b on a.create_by = b.id
left join s_department c on a.dept_id = c.id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
</trim>
</trim>
...
@@ -21,15 +19,12 @@
...
@@ -21,15 +19,12 @@
a.name,
a.name,
a.influence,
a.influence,
a.severity,
a.severity,
c.id as deptId ,
a.dept_id as deptId ,
c.department_name as deptName,
a.create_by as createBy ,
b.name as userName ,
a.create_date as createDate,
a.create_date as createDate,
a.remark
a.remark
FROM
FROM
f_accident_type a
f_accident_type a
left join s_user b on a.create_by = b.id
left join s_department c on a.dept_id = c.id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
</trim>
</trim>
...
@@ -46,17 +41,14 @@
...
@@ -46,17 +41,14 @@
a.name,
a.name,
CONCAT(fem.influence,'-',fem.`describe`) as influence,
CONCAT(fem.influence,'-',fem.`describe`) as influence,
fem.coefficient as severity,
fem.coefficient as severity,
c.id as deptId ,
a.dept_id as deptId ,
c.department_name as deptName,
a.create_by as createBy ,
b.name as userName ,
a.create_date as createDate,
a.create_date as createDate,
a.evaluation_sid as evaluationSid,
a.evaluation_sid as evaluationSid,
a.remark
a.remark
FROM
FROM
f_accident_type a
f_accident_type a
left join f_evaluation_model fem on fem.id = a.evaluation_sid
left join f_evaluation_model fem on fem.id = a.evaluation_sid
left join s_user b on a.create_by = b.id
left join s_department c on a.dept_id = c.id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
</trim>
</trim>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_car.xml
View file @
0cb2f733
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
a.remark,
a.remark,
a.create_by createBy,
a.create_by createBy,
date_format(a.create_date , '%Y-%m-%d %H:%i:%s') as createDate,
date_format(a.create_date , '%Y-%m-%d %H:%i:%s') as createDate,
d.department_name AS departmentName,
a.performance_index AS performanceIndex,
a.performance_index AS performanceIndex,
a.floor3d,
a.floor3d,
a.org_code AS orgCode,
a.org_code AS orgCode,
...
@@ -36,7 +35,6 @@
...
@@ -36,7 +35,6 @@
rs.name riskSourceName
rs.name riskSourceName
FROM
FROM
f_fire_car a
f_fire_car a
LEFT JOIN s_department d ON d.id = a.dept_id
LEFT JOIN f_risk_source rs on rs.id = a.risk_source_id
LEFT JOIN f_risk_source rs on rs.id = a.risk_source_id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and (a.name like concat(concat("%",#{name}),"%") or a.type like concat(concat("%",#{name}),"%"))
</if>
<if
test=
"name!=null"
>
and (a.name like concat(concat("%",#{name}),"%") or a.type like concat(concat("%",#{name}),"%"))
</if>
...
@@ -65,7 +63,6 @@
...
@@ -65,7 +63,6 @@
a.create_date,
a.create_date,
'%Y-%m-%d %H:%i:%s'
'%Y-%m-%d %H:%i:%s'
) AS createDate,
) AS createDate,
d.department_name AS departmentName,
a.performance_index AS performanceIndex,
a.performance_index AS performanceIndex,
a.floor3d,
a.floor3d,
a.is_indoor as isIndoor,
a.is_indoor as isIndoor,
...
@@ -75,7 +72,6 @@
...
@@ -75,7 +72,6 @@
a.risk_source_id as riskSourceId
a.risk_source_id as riskSourceId
FROM
FROM
f_fire_car a
f_fire_car a
LEFT JOIN s_department d ON d.id = a.dept_id
WHERE 1=1
WHERE 1=1
<if
test=
"truckId!=null"
>
AND a.id = #{truckId}
</if>
<if
test=
"truckId!=null"
>
AND a.id = #{truckId}
</if>
</select>
</select>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
0cb2f733
...
@@ -297,13 +297,9 @@
...
@@ -297,13 +297,9 @@
eq.`code`,
eq.`code`,
eq.address,
eq.address,
fs.`name` stationName,
fs.`name` stationName,
sd.department_name depName,
eq.charge_user_id userId
su.`name` username,
su.telephone tel
FROM
FROM
f_equipment eq
f_equipment eq
LEFT JOIN s_user su ON su.id = eq.charge_user_id
LEFT JOIN s_department sd ON sd.id = su.department_id
LEFT JOIN f_fire_station fs ON fs.id = eq.fire_station_id
LEFT JOIN f_fire_station fs ON fs.id = eq.fire_station_id
WHERE 1=1
WHERE 1=1
<if
test=
"id!=null"
>
AND eq.id = #{id}
</if>
<if
test=
"id!=null"
>
AND eq.id = #{id}
</if>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea.xml
View file @
0cb2f733
...
@@ -45,16 +45,16 @@
...
@@ -45,16 +45,16 @@
fm.department_leader as departmentLeader,
fm.department_leader as departmentLeader,
fm.group_leader as groupLeader,
fm.group_leader as groupLeader,
fm.person_leader as personLeader,
fm.person_leader as personLeader,
(select name from s_user where id = fm.company_leader) as companyLeaderName,
fm.company_leader as companyLeaderId,
(select name from s_user where id = fm.department_leader) as departmentLeaderName,
fm.department_leader as departmentLeaderId,
(select name from s_user where id = fm.group_leader) as groupLeaderName,
fm.group_leader as groupLeaderId,
(select name from s_user where id = fm.person_leader) as personLeaderName,
fm.person_leader as personLeaderId,
fm.identify_user as identifyUserId,
rf.`name` AS riskFactorName,
rf.`name` AS riskFactorName,
fat.`name` AS accidentTypeName,
fat.`name` AS accidentTypeName,
fat.id AS accidentTypeId,
fat.id AS accidentTypeId,
concat(fems.influence,'-',fems.describe) as influence,
concat(fems.influence,'-',fems.describe) as influence,
fm.identify_user as identifyUser,
fm.identify_user as identifyUser,
(select name from s_user where id = fm.identify_user) as identifyUserName,
fm.identify_method as identifyMethod,
fm.identify_method as identifyMethod,
fr.name AS level
fr.name AS level
FROM
FROM
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea_point_inputitem.xml
View file @
0cb2f733
...
@@ -54,10 +54,6 @@
...
@@ -54,10 +54,6 @@
p_input_item as pii on pii.id = b.input_item_id
p_input_item as pii on pii.id = b.input_item_id
left join
left join
p_point as pp on pp.id = b.point_id
p_point as pp on pp.id = b.point_id
left join
s_user as su on su.id = pp.charge_person_id
left join
s_department as sd on sd.id = pp.charge_dept_id
where
where
a.fmea_id = #{fmeaId}
a.fmea_id = #{fmeaId}
group by b.point_id
group by b.point_id
...
@@ -74,9 +70,8 @@
...
@@ -74,9 +70,8 @@
pp.id as pointId,
pp.id as pointId,
pp.point_no as pointNo,
pp.point_no as pointNo,
pp.name as pointName,
pp.name as pointName,
sd.department_name as depName,
pp.charge_person_id as userId,
su.name as username,
pp.charge_dept_id as deptId,
su.telephone as tel,
group_concat(concat(pii.name, '##', a.state) SEPARATOR
<![CDATA[ '\n' ]]>
) as inputItems
group_concat(concat(pii.name, '##', a.state) SEPARATOR
<![CDATA[ '\n' ]]>
) as inputItems
from
from
f_fmea_point_inputitem a
f_fmea_point_inputitem a
...
@@ -86,10 +81,6 @@
...
@@ -86,10 +81,6 @@
p_input_item as pii on pii.id = b.input_item_id
p_input_item as pii on pii.id = b.input_item_id
left join
left join
p_point as pp on pp.id = b.point_id
p_point as pp on pp.id = b.point_id
left join
s_user as su on su.id = pp.charge_person_id
left join
s_department as sd on sd.id = pp.charge_dept_id
where
where
a.fmea_id = #{fmeaId}
a.fmea_id = #{fmeaId}
group by b.point_id
group by b.point_id
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_factor.xml
View file @
0cb2f733
...
@@ -21,14 +21,11 @@
...
@@ -21,14 +21,11 @@
d.name as accidentName,
d.name as accidentName,
a.type,
a.type,
a.dept_id as deptId,
a.dept_id as deptId,
c.department_name as deptName,
a.create_by as createBy,
b.name as userName,
a.create_date as createDate,
a.create_date as createDate,
a.remark
a.remark
FROM
FROM
f_risk_factor a
f_risk_factor a
left join s_user b on a.create_by = b.id
left join s_department c on a.dept_id = c.id
left join f_accident_type d on a.accident_type_id = d.id
left join f_accident_type d on a.accident_type_id = d.id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_level.xml
View file @
0cb2f733
...
@@ -23,12 +23,12 @@
...
@@ -23,12 +23,12 @@
a.severity,
a.severity,
a.name,
a.name,
a.color,
a.color,
b.name as userName
,
a.create_by as createBy
,
a.create_date as createDate,
a.create_date as createDate,
a.remark
a.remark,
a.manage_level as manageLevel
FROM
FROM
f_risk_level a
f_risk_level a
left join s_user b on a.create_by = b.id
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND "
>
<if
test=
"evalModelId!=null"
>
and a.evaluation_model_id = #{evalModelId}
</if>
<if
test=
"evalModelId!=null"
>
and a.evaluation_model_id = #{evalModelId}
</if>
</trim>
</trim>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_source.xml
View file @
0cb2f733
...
@@ -331,16 +331,13 @@
...
@@ -331,16 +331,13 @@
pp.id pointId,
pp.id pointId,
pp.point_no pointNo,
pp.point_no pointNo,
pp.`name` pointName,
pp.`name` pointName,
sd.department_name depName,
pp.charge_person_id userId,
su.`name` username,
pp.charge_dept_id deptId,
su.telephone tel,
GROUP_CONCAT(pii.`name`) inputItems
GROUP_CONCAT(pii.`name`) inputItems
FROM
FROM
`f_risk_source_point_inputitem` rspi
`f_risk_source_point_inputitem` rspi
LEFT JOIN p_point pp ON pp.id = rspi.point_id
LEFT JOIN p_point pp ON pp.id = rspi.point_id
LEFT JOIN p_input_item pii ON pii.id = rspi.point_inputitem_id
LEFT JOIN p_input_item pii ON pii.id = rspi.point_inputitem_id
LEFT JOIN s_user su ON su.id = pp.charge_person_id
LEFT JOIN s_department sd ON sd.id = pp.charge_dept_id
WHERE pii.`name` is not NULL
WHERE pii.`name` is not NULL
AND rspi.risk_source_id = #{riskSourceId}
AND rspi.risk_source_id = #{riskSourceId}
GROUP BY riskId,pointId,pointNo,pointName,depName,username,telephone
GROUP BY riskId,pointId,pointNo,pointName,depName,username,telephone
...
...
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