Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
d1aa3d7d
Commit
d1aa3d7d
authored
Jul 14, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
合并解决冲突
parents
19b5cd85
fa8d7e5e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
92 changed files
with
1074 additions
and
253 deletions
+1074
-253
DutyPersonShiftDto.java
...n/amos/boot/module/common/api/dto/DutyPersonShiftDto.java
+2
-0
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+2
-2
BaseTreeNode.java
...ejoin/equipmanage/common/entity/publics/BaseTreeNode.java
+18
-0
BuildingVideoListVO.java
...oin/equipmanage/common/entity/vo/BuildingVideoListVO.java
+8
-0
TreeNodeUtil.java
...va/com/yeejoin/equipmanage/common/utils/TreeNodeUtil.java
+5
-3
PowerTransferMapper.java
.../amos/boot/module/jcs/api/mapper/PowerTransferMapper.java
+9
-0
PowerTransferMapper.xml
...jcs-api/src/main/resources/mapper/PowerTransferMapper.xml
+60
-0
pom.xml
...oot-module-api/amos-boot-module-knowledgebase-api/pom.xml
+6
-2
ExcelParserOld.java
...in/amos/knowledgebase/face/util/excel/ExcelParserOld.java
+0
-0
SqlStatement.java
...eejoin/amos/knowledgebase/face/util/sql/SqlStatement.java
+26
-13
pom.xml
...s-boot-module-api/amos-boot-module-precontrol-api/pom.xml
+5
-1
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+18
-0
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+42
-0
ESOrgUsrService.java
.../boot/module/common/biz/service/impl/ESOrgUsrService.java
+33
-3
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+1
-0
EquipmentAlarmController.java
...join/equipmanage/controller/EquipmentAlarmController.java
+23
-9
EquipmentSpecificController.java
...n/equipmanage/controller/EquipmentSpecificController.java
+6
-0
MaintenanceResourceDataController.java
...pmanage/controller/MaintenanceResourceDataController.java
+13
-1
JcsFeign.java
...src/main/java/com/yeejoin/equipmanage/fegin/JcsFeign.java
+11
-1
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+3
-1
IEquipmentSpecificSerivce.java
...eejoin/equipmanage/service/IEquipmentSpecificSerivce.java
+3
-0
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+1
-1
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+9
-17
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+13
-0
JCSRemoteService.java
...om/yeejoin/equipmanage/service/impl/JCSRemoteService.java
+11
-0
MaintenanceResourceServiceImpl.java
...ipmanage/service/impl/MaintenanceResourceServiceImpl.java
+2
-22
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+15
-6
StockServiceImpl.java
...om/yeejoin/equipmanage/service/impl/StockServiceImpl.java
+23
-1
RelationRedisUtil.java
...java/com/yeejoin/equipmanage/utils/RelationRedisUtil.java
+3
-1
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+9
-0
FirestationJacketController.java
...odule/jcs/biz/controller/FirestationJacketController.java
+2
-2
PowerTransferController.java
...ot/module/jcs/biz/controller/PowerTransferController.java
+34
-1
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+37
-2
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+28
-3
ESAlertCalledService.java
...oot/module/jcs/biz/service/impl/ESAlertCalledService.java
+46
-4
RuleAlertCalledService.java
...t/module/jcs/biz/service/impl/RuleAlertCalledService.java
+5
-1
pom.xml
...oot-module-biz/amos-boot-module-knowledgebase-biz/pom.xml
+6
-0
DocLibraryResource.java
...oin/amos/knowledgebase/controller/DocLibraryResource.java
+20
-5
DocStatisticsResource.java
.../amos/knowledgebase/controller/DocStatisticsResource.java
+0
-0
StatisticsRecordMapper.java
...os/knowledgebase/face/orm/dao/StatisticsRecordMapper.java
+42
-23
DocCategoryService.java
...n/amos/knowledgebase/face/service/DocCategoryService.java
+10
-8
DocLibraryService.java
...in/amos/knowledgebase/face/service/DocLibraryService.java
+0
-0
ESDocService.java
...yeejoin/amos/knowledgebase/face/service/ESDocService.java
+8
-7
StatisticsRecordService.java
...s/knowledgebase/face/service/StatisticsRecordService.java
+0
-0
LatentDangerController.java
...entdanger/business/controller/LatentDangerController.java
+7
-0
LatentDangerMapper.java
.../latentdanger/business/dao/mapper/LatentDangerMapper.java
+2
-0
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+16
-1
ILatentDangerService.java
...ntdanger/business/service/intfc/ILatentDangerService.java
+2
-0
CheckServiceImpl.java
...s/maintenance/business/service/impl/CheckServiceImpl.java
+27
-1
CheckController.java
...join/amos/patrol/business/controller/CheckController.java
+1
-0
LatentDangerController.java
...os/patrol/business/controller/LatentDangerController.java
+1
-0
LatentDangerPatrolBo.java
.../business/entity/mybatis/extend/LatentDangerPatrolBo.java
+3
-0
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+41
-1
LatentDangerServiceImpl.java
...patrol/business/service/impl/LatentDangerServiceImpl.java
+25
-13
CheckController.java
...amos/supervision/business/controller/CheckController.java
+23
-0
PlanTaskDetailMapper.java
...supervision/business/dao/mapper/PlanTaskDetailMapper.java
+8
-0
IPlanDao.java
...in/amos/supervision/business/dao/repository/IPlanDao.java
+5
-0
PlanAuditServiceImpl.java
...pervision/business/service/impl/PlanAuditServiceImpl.java
+4
-4
PlanServiceImpl.java
...os/supervision/business/service/impl/PlanServiceImpl.java
+26
-0
PlanTaskServiceImpl.java
...upervision/business/service/impl/PlanTaskServiceImpl.java
+38
-4
pom.xml
amos-boot-module/amos-boot-module-biz/pom.xml
+5
-1
pom.xml
amos-boot-system-equip/pom.xml
+7
-1
application.properties
...ot-system-equip/src/main/resources/application.properties
+5
-0
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+15
-1
MaintenanceResourceDataMapper.xml
...c/main/resources/mapper/MaintenanceResourceDataMapper.xml
+15
-4
MaintenanceResourceMapper.xml
...p/src/main/resources/mapper/MaintenanceResourceMapper.xml
+1
-0
VideoMapper.xml
...ot-system-equip/src/main/resources/mapper/VideoMapper.xml
+28
-2
dbTemplate_fire_equip.xml
...as/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+23
-3
pom.xml
amos-boot-system-jcs/pom.xml
+1
-4
application.properties
...boot-system-jcs/src/main/resources/application.properties
+3
-4
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+39
-0
pom.xml
amos-boot-system-knowledgebase/pom.xml
+7
-5
application.properties
...m-knowledgebase/src/main/resources/application.properties
+1
-5
StatisticsRecordMapper.xml
...base/src/main/resources/mapper/StatisticsRecordMapper.xml
+0
-0
pom.xml
amos-boot-system-latentdanger/pom.xml
+1
-4
application.properties
...em-latentdanger/src/main/resources/application.properties
+1
-6
LatentDangerMapper.xml
...anger/src/main/resources/db/mapper/LatentDangerMapper.xml
+13
-0
pom.xml
amos-boot-system-maintenance/pom.xml
+1
-4
application.properties
...tem-maintenance/src/main/resources/application.properties
+2
-5
dbTemplate_plan_task.xml
...nce/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+1
-1
pom.xml
amos-boot-system-patrol/pom.xml
+1
-4
application.properties
...t-system-patrol/src/main/resources/application.properties
+1
-5
LatentDangerMapper.xml
...atrol/src/main/resources/db/mapper/LatentDangerMapper.xml
+3
-0
LatentDangerPatrolMapper.xml
...src/main/resources/db/mapper/LatentDangerPatrolMapper.xml
+21
-14
dbTemplate_check.xml
...-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
+2
-2
pom.xml
amos-boot-system-precontrol/pom.xml
+7
-1
pom.xml
amos-boot-system-supervision/pom.xml
+1
-4
application.properties
...tem-supervision/src/main/resources/application.properties
+2
-5
dbTemplate_plan_task.xml
...ion/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+3
-1
plan_task_detail.xml
...rvision/src/main/resources/db/mapper/plan_task_detail.xml
+6
-0
pom.xml
amos-boot-utils/amos-boot-utils-jpush/pom.xml
+8
-1
pom.xml
pom.xml
+3
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/DutyPersonShiftDto.java
View file @
d1aa3d7d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -22,6 +23,7 @@ public class DutyPersonShiftDto extends BaseDto {
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"值班日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
dutyDate
;
@ApiModelProperty
(
value
=
"值班班次id"
)
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
d1aa3d7d
...
...
@@ -353,7 +353,7 @@
SELECT
COUNT(a.id) num
FROM important_companys a
where a.longitude is not null and a.latitude is not null
where a.longitude is not null and a.latitude is not null
and a.keySiteCompany = 1
<if
test=
'par.distance!=null'
>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
=
#{par.distance}
...
...
@@ -945,7 +945,7 @@ LEFT JOIN (
*
FROM
cb_org_usr
WHERE is_delete = false AND biz_org_code LIKE CONCAT(#{bizOrgCode} '%') AND( biz_org_type = 'COMPANY' || biz_org_type = 'DEPARTMENT')
WHERE is_delete = false AND biz_org_code LIKE CONCAT(#{bizOrgCode}
,
'%') AND( biz_org_type = 'COMPANY' || biz_org_type = 'DEPARTMENT')
</select>
<select
id=
"companyDeptListWithPersonCount"
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/publics/BaseTreeNode.java
View file @
d1aa3d7d
...
...
@@ -29,6 +29,12 @@ public class BaseTreeNode {
private
String
companyId
;
private
String
ownerUnitId
;
private
Integer
type
;
public
BaseTreeNode
()
{
}
...
...
@@ -52,7 +58,19 @@ public class BaseTreeNode {
public
void
setParentId
(
String
parentId
)
{
this
.
parentId
=
parentId
;
}
public
void
setOwnerUnitId
(
String
ownerUnitId
)
{
this
.
ownerUnitId
=
ownerUnitId
;
}
public
String
getOwnerUnitId
()
{
return
ownerUnitId
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
Integer
getType
()
{
return
type
;
}
public
List
<
BaseTreeNode
>
getChildren
()
{
if
(
this
.
children
==
null
)
{
return
Lists
.
newArrayList
();
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/BuildingVideoListVO.java
View file @
d1aa3d7d
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -65,4 +66,11 @@ public class BuildingVideoListVO {
@ApiModelProperty
(
"机构编码"
)
private
String
bizOrgCode
;
private
String
type
;
private
String
ip
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/TreeNodeUtil.java
View file @
d1aa3d7d
...
...
@@ -313,6 +313,7 @@ public class TreeNodeUtil {
// 循环处理子节点数据
for
(
T
t
:
newTreeNodes
)
{
//递归
listNodes
.
removeAll
(
collect
);
assembleTree2
(
t
,
listNodes
);
}
return
newTreeNodes
;
...
...
@@ -328,7 +329,7 @@ public class TreeNodeUtil {
if
(!
CollectionUtils
.
isEmpty
(
node
.
getChildren
()))
{
for
(
Object
t
:
node
.
getChildren
())
{
//递归
//listNodes.remove(t
);
listNodes
.
removeAll
(
node
.
getChildren
()
);
assembleTreeSon
((
T
)
t
,
listNodes
);
}
}
...
...
@@ -339,17 +340,18 @@ public class TreeNodeUtil {
if
(
node
!=
null
&&
!
CollectionUtils
.
isEmpty
(
listNodes
))
{
// 循环节点数据,如果是子节点则添加起来
listNodes
.
stream
().
filter
(
t
->
t
.
getParentId
().
equals
(
node
.
getId
())
&&
t
.
getCompanyId
().
equals
(
node
.
getCompanyId
()
==
null
?
node
.
getParentId
():
node
.
getCompanyId
()
)
).
forEachOrdered
(
node:
:
addChild
);
listNodes
.
stream
().
filter
(
t
->
t
.
getOwnerUnitId
()!=
null
&&
t
.
getOwnerUnitId
().
equals
(
node
.
getOwnerUnitId
()==
null
?
node
.
getId
():
node
.
getOwnerUnitId
())&&
t
.
getParentId
().
equals
(
node
.
getId
())
&&
t
.
getCompanyId
().
equals
(
node
.
getCompanyId
()
==
null
?
node
.
getParentId
():
node
.
getCompanyId
()
)
).
forEachOrdered
(
node:
:
addChild
);
// 循环处理子节点数据,递归
if
(!
CollectionUtils
.
isEmpty
(
node
.
getChildren
()))
{
for
(
Object
t
:
node
.
getChildren
())
{
//递归
//listNodes.remove(t
);
listNodes
.
removeAll
(
node
.
getChildren
()
);
assembleTreeSon
((
T
)
t
,
listNodes
);
}
}
}
}
static
<
T
extends
BaseTreeNode
>
void
assembleTree_1
(
T
node
,
List
<
T
>
listNodes
)
{
if
(
node
!=
null
&&
!
CollectionUtils
.
isEmpty
(
listNodes
))
{
// 循环节点数据,如果是子节点则添加起来
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/PowerTransferMapper.java
View file @
d1aa3d7d
...
...
@@ -69,6 +69,9 @@ public interface PowerTransferMapper extends BaseMapper<PowerTransfer> {
Map
<
String
,
Integer
>
getCarNum
(
@Param
(
"id"
)
Long
id
);
List
<
Map
<
String
,
Integer
>>
getCarUserNum
(
@Param
(
"dutyDate"
)
String
dutyDate
,
@Param
(
"id"
)
Long
id
);
Map
<
String
,
Integer
>
getCompanyNum
(
@Param
(
"id"
)
Long
id
);
List
<
PowerData
>
getPowerDataList
(
@Param
(
"id"
)
Long
id
);
...
...
@@ -122,4 +125,10 @@ public interface PowerTransferMapper extends BaseMapper<PowerTransfer> {
IPage
<
PowerTransferResourceDto
>
getPowerTransferCarResource
(
Page
<
PowerTransferResourceDto
>
page
,
@Param
(
"alertCalledId"
)
Long
alertCalledId
);
/**
* 查询未结案的航空器报警航班号
* @param alertTypeCode
* @return
*/
List
<
String
>
selectFlightNumber
(
@Param
(
"alertTypeCode"
)
String
alertTypeCode
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/PowerTransferMapper.xml
View file @
d1aa3d7d
...
...
@@ -145,6 +145,58 @@
</select>
<select
id=
"getCarUserNum"
resultType=
"Map"
>
select * from (
SELECT
MAX(
CASE
WHEN cd.FIELD_CODE ='carId' THEN
cd.FIELD_VALUE
END
) AS 'carId',
MAX(
CASE
WHEN cd.FIELD_CODE = 'userName' THEN
cd.FIELD_VALUE
END
) AS 'userName'
FROM
cb_dynamic_form_instance cd
LEFT JOIN (
SELECT
dp.instance_id,
ds.`name`
FROM
cb_duty_person_shift dp
LEFT JOIN cb_duty_shift ds ON dp.shift_id = ds.sequence_nbr
WHERE
dp.duty_date = #{dutyDate} and dp.is_delete=0
) cds ON cd.instance_id = cds.instance_id
where cd.group_code ='dutyCar' and cds.instance_id is not null and
cd.is_delete=0
group by cd.instance_id
) result
where carId is not null and userName is not null and carId in (
SELECT
c.resources_id
FROM
jc_power_transfer a
LEFT JOIN jc_power_transfer_company b ON a.sequence_nbr = b.power_transfer_id
LEFT JOIN jc_power_transfer_company_resources c ON c.power_transfer_company_id = b.sequence_nbr
WHERE
a.alert_called_id = ${id}
)
</select>
<select
id=
"getCompanyNum"
resultType=
"Map"
>
select COUNT(*) companyNum from
(SELECT DISTINCT
...
...
@@ -324,5 +376,13 @@
transfer.alert_called_id = #{alertCalledId}
AND is_distribution_agencies = 0
</select>
<select
id=
"selectFlightNumber"
resultType=
"java.lang.String"
>
SELECT DISTINCT(jaf.field_value) FROM `jc_alert_called` jac
left join jc_alert_form_value jaf on jac.sequence_nbr = jaf.alert_called_id
WHERE jac.alert_status = 0
and jac.alert_type_code = #{alertTypeCode}
and jaf.field_code = "flightNumber"
and jaf.field_value_code is not NULL
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-knowledgebase-api/pom.xml
View file @
d1aa3d7d
...
...
@@ -33,10 +33,14 @@
<version>
3.3.6
</version>
<exclusions>
<exclusion>
<groupId>
org.slf4j
</groupId>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
</exclusion>
</exclusions>
<exclusion>
<artifactId>
log4j
</artifactId>
<groupId>
log4j
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.docx4j
</groupId>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-knowledgebase-api/src/main/java/com/yeejoin/amos/knowledgebase/face/util/excel/ExcelParserOld.java
0 → 100644
View file @
d1aa3d7d
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-api/amos-boot-module-knowledgebase-api/src/main/java/com/yeejoin/amos/knowledgebase/face/util/sql/SqlStatement.java
View file @
d1aa3d7d
...
...
@@ -39,6 +39,7 @@ class SqlStatement extends BaseSqlCondition {
private
static
final
Map
<
String
,
String
[]>
valueTagFieldSqlMap
;
private
static
final
Pattern
numberPattern
=
Pattern
.
compile
(
"^[-\\+]?[\\d]+[.]?[\\d]*$"
);
private
static
final
Pattern
datePattern
=
Pattern
.
compile
(
"^[\\d]{4}-[\\d]{2}-[\\d]{2} [\\d]{2}:[\\d]{2}:[\\d]{2}$"
);
private
static
final
Pattern
datePattern16
=
Pattern
.
compile
(
"^[\\d]{4}/[\\d]{2}/[\\d]{2} [\\d]{2}:[\\d]{2}$"
);
/**
* 字段类型
...
...
@@ -101,36 +102,48 @@ class SqlStatement extends BaseSqlCondition {
return
false
;
}
boolean
emptyVal
=
ValidationUtil
.
isEmpty
(
values
);
if
(
fieldType
!=
FieldType
.
textTag
)
{
if
(
fieldType
!=
FieldType
.
textTag
&&
values
.
size
()
>
0
)
{
String
val1
=
values
.
get
(
0
);
String
val2
=
""
;
switch
(
valueType
)
{
case
text:
//格式化
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val
ues
.
get
(
0
)
))
{
values
.
add
(
0
,
stringParamFormat
(
val
ues
.
get
(
0
)
));
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val
1
))
{
values
.
add
(
0
,
stringParamFormat
(
val
1
));
values
.
remove
(
1
);
}
break
;
case
date:
// 校验并格式化
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
((
values
.
get
(
0
))))
{
paramValidate
(
datePattern
,
values
.
get
(
0
));
values
.
add
(
0
,
stringParamFormat
(
values
.
get
(
0
)));
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val1
))
{
if
(
val1
.
contains
(
"/"
)
&&
val1
.
length
()
==
16
)
{
paramValidate
(
datePattern16
,
val1
);
}
else
{
paramValidate
(
datePattern
,
val1
);
}
values
.
add
(
0
,
stringParamFormat
(
val1
));
values
.
remove
(
1
);
}
if
(!
emptyVal
&&
values
.
size
()
>
1
&&
!
ValidationUtil
.
isEmpty
((
values
.
get
(
1
))))
{
paramValidate
(
datePattern
,
values
.
get
(
1
));
values
.
add
(
1
,
stringParamFormat
(
values
.
get
(
1
)));
val2
=
values
.
get
(
1
);
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val2
))
{
if
(
val2
.
contains
(
"/"
)
&&
val1
.
length
()
==
16
)
{
paramValidate
(
datePattern16
,
val2
);
}
else
{
paramValidate
(
datePattern
,
val2
);
}
values
.
add
(
1
,
stringParamFormat
(
val2
));
values
.
remove
(
2
);
}
break
;
case
range:
case
single:
// 校验
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
(
values
.
get
(
0
))
))
{
paramValidate
(
numberPattern
,
val
ues
.
get
(
0
)
);
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val1
))
{
paramValidate
(
numberPattern
,
val
1
);
}
if
(!
emptyVal
&&
values
.
size
()
>
1
&&
!
ValidationUtil
.
isEmpty
((
values
.
get
(
1
))))
{
paramValidate
(
numberPattern
,
values
.
get
(
1
));
val2
=
values
.
get
(
1
);
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val2
))
{
paramValidate
(
numberPattern
,
val2
);
}
break
;
default
:
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-precontrol-api/pom.xml
View file @
d1aa3d7d
...
...
@@ -40,7 +40,11 @@
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
</exclusion>
</exclusions>
<exclusion>
<artifactId>
log4j
</artifactId>
<groupId>
log4j
</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.docx4j/docx4j-ImportXHTML -->
<dependency>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
d1aa3d7d
...
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.dto.PermissionModelDto
;
import
com.yeejoin.amos.boot.biz.common.enums.HomePageEnum
;
...
...
@@ -35,11 +36,14 @@ import com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyResources
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.*
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -1569,6 +1573,20 @@ public class CommandController extends BaseController {
carTaskDto
.
getCode
(),
carTaskDto
.
getType
(),
carTaskDto
.
getRemarks
());
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
userId
=
reginParams
.
getUserModel
().
getUserId
();
// 执行任务完成反馈,同步修改待办任务状态
if
(
carTaskDto
.
getType
()
==
2
&&
FireCarStatusEnum
.
已完成
.
getCode
().
equals
(
carTaskDto
.
getCode
())){
MessageModel
model
=
new
MessageModel
();
model
.
setRelationId
(
String
.
valueOf
(
carTaskDto
.
getAlertCalledId
()));
model
.
setIsRead
(
true
);
model
.
setMsgType
(
"jcs119"
);
if
(!
ObjectUtils
.
isEmpty
(
userId
)){
model
.
setUserId
(
userId
);
}
Systemctl
.
messageClient
.
update
(
model
);
}
return
ResponseHelper
.
buildResponse
(
null
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
d1aa3d7d
...
...
@@ -845,6 +845,21 @@ public class OrgUsrController extends BaseController {
@PathVariable
String
authKey
)
{
// 获取登陆人角色
ReginParams
reginParams
=
getSelectedOrgInfo
();
if
(
authKey
.
equals
(
"fire_building_info"
)){
if
(
StringUtils
.
isNotEmpty
(
orgType
)
&&
orgType
.
equals
(
"COMPANY"
)){
//查询当前登录人所属单位/部门
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
reginParams
.
getPersonIdentity
().
getCompanyId
());
//判断登陆人是否已经是顶级节点单位
if
(
orgUsr
.
getParentId
()
!=
null
){
orgUsr
=
iOrgUsrService
.
selectParentOrgUsr
(
orgUsr
);
String
bizOrgCode
=
orgUsr
.
getBizOrgCode
()
!=
null
?
orgUsr
.
getBizOrgCode
()
:
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
personIdentity
.
setBizOrgCode
(
bizOrgCode
);
reginParams
.
setPersonIdentity
(
personIdentity
);
}
}
}
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
List
<
OrgMenuDto
>
menus
=
iOrgUsrService
.
companyTreeByUserAndType
(
reginParams
,
orgType
);
...
...
@@ -919,4 +934,30 @@ public class OrgUsrController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
getByOrgCode
(
bizOrgCode
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"无权限单位树"
,
notes
=
"无权限单位树"
)
@GetMapping
(
value
=
"/listCompanyTree"
)
public
ResponseModel
<
List
<
OrgUsr
>>
listCompanyTree
(
@RequestParam
(
required
=
false
)
String
orgType
)
throws
Exception
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
String
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
List
<
OrgUsr
>
listByBizOrgTypeCode
=
iOrgUsrService
.
getListByBizOrgTypeCode
(
orgType
,
bizOrgCode
);
return
ResponseHelper
.
buildResponse
(
listByBizOrgTypeCode
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据amosId返回单位code"
,
notes
=
"根据amosId返回单位code"
)
@GetMapping
(
value
=
"/getBizByAmos"
)
public
ResponseModel
<
String
>
getBizByAmos
()
throws
Exception
{
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
String
userId
=
selectedOrgInfo
.
getUserModel
().
getUserId
();
String
parentId
=
iOrgUsrService
.
getParentId
(
userId
);
OrgUsr
orgUsr
=
iOrgUsrService
.
getById
(
parentId
);
return
ResponseHelper
.
buildResponse
(
orgUsr
.
getBizOrgCode
());
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/ESOrgUsrService.java
View file @
d1aa3d7d
...
...
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.ArrayList
;
import
java.util.LinkedHashSet
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -69,9 +70,12 @@ public class ESOrgUsrService {
public
void
saveAll
(
List
<
OrgUsr
>
orgUsrs
)
throws
Exception
{
if
(!
ValidationUtil
.
isEmpty
(
orgUsrs
))
{
for
(
OrgUsr
orgUsr
:
orgUsrs
)
{
this
.
saveAlertCalledToES
(
orgUsr
);
}
// for (OrgUsr orgUsr : orgUsrs) {
// this.saveAlertCalledToES(orgUsr);
// }
this
.
saveAlertCalledToES
(
orgUsrs
);
}
}
...
...
@@ -90,6 +94,32 @@ public class ESOrgUsrService {
return
esOrgUsrDto
;
}
public
List
<
ESOrgUsrDto
>
saveAlertCalledToES
(
List
<
OrgUsr
>
orgUsrs
)
throws
Exception
{
List
<
ESOrgUsrDto
>
listes
=
new
ArrayList
<>();
try
{
for
(
OrgUsr
orgUsr
:
orgUsrs
)
{
ESOrgUsrDto
esOrgUsrDto
=
new
ESOrgUsrDto
();
String
seqStr
=
String
.
valueOf
(
orgUsr
.
getSequenceNbr
());
Long
seq
=
Long
.
parseLong
(
seqStr
);
esOrgUsrDto
.
setSequenceNbr
(
seq
);
esOrgUsrDto
.
setBizOrgName
(
orgUsr
.
getBizOrgName
());
listes
.
add
(
esOrgUsrDto
);
}
esOrgUsrDtoRepository
.
saveAll
(
listes
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
listes
;
}
public
ESOrgUsrDto
saveAlertCalledToESNew
(
OrgUsr
orgUsr
)
throws
Exception
{
ESOrgUsrDto
esOrgUsrDto
=
new
ESOrgUsrDto
();
String
seqStr
=
String
.
valueOf
(
orgUsr
.
getSequenceNbr
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -1742,6 +1742,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
String
authKey
=
PermissionInterceptorContext
.
getDataAuthRule
();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
PermissionInterceptorContext
.
clean
();
if
(
StringUtils
.
isNotEmpty
(
type
)
&&
type
.
equals
(
"COMPANY"
)){
//查询当前登录人所属单位/部门
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentAlarmController.java
View file @
d1aa3d7d
...
...
@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.MediaType
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -51,8 +52,8 @@ public class EquipmentAlarmController extends AbstractBaseController {
@Autowired
IEquipmentSpecificAlarmService
iEquipmentSpecificAlarmService
;
@Value
(
"${equip.enabled}"
)
private
Boolean
equioEnabled
;
/**
* 列表列名
*
...
...
@@ -157,11 +158,17 @@ public class EquipmentAlarmController extends AbstractBaseController {
request12
.
setName
(
"isRemoveShield"
);
request12
.
setValue
(
StringUtil
.
isNotEmpty
(
isRemoveShield
)
?
StringUtils
.
trimToNull
(
isRemoveShield
)
:
null
);
queryRequests
.
add
(
request12
);
if
(!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())){
if
(
equioEnabled
)
{
if
(!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
()))
{
CommonRequest
request13
=
new
CommonRequest
();
request13
.
setName
(
"bizOrgCode"
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
queryRequests
.
add
(
request13
);
}
}
else
{
CommonRequest
request13
=
new
CommonRequest
();
request13
.
setName
(
"bizOrgCode"
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
queryRequests
.
add
(
request13
);
request13
.
setValue
(
""
);
}
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
Map
<
String
,
Object
>>
list
=
iEquipmentSpecificAlarmService
.
listPage
(
param
);
...
...
@@ -279,13 +286,20 @@ public class EquipmentAlarmController extends AbstractBaseController {
request13
.
setName
(
"isRemovedFire"
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
isRemovedFire
)
?
StringUtils
.
trimToNull
(
isRemovedFire
)
:
null
);
queryRequests
.
add
(
request13
);
if
(!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())){
if
(
equioEnabled
){
if
(!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())){
CommonRequest
request14
=
new
CommonRequest
();
request14
.
setName
(
"bizOrgCode"
);
request14
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
queryRequests
.
add
(
request14
);
}
}
else
{
CommonRequest
request14
=
new
CommonRequest
();
request14
.
setName
(
"bizOrgCode"
);
request14
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
queryRequests
.
add
(
request14
);
request14
.
setValue
(
""
);
}
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
org
.
springframework
.
data
.
domain
.
Page
<
AlarmListDataVO
>
list
=
iEquipmentSpecificAlarmService
.
listAlarmsPage
(
param
);
return
CommonResponseUtil
.
success
(
list
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentSpecificController.java
View file @
d1aa3d7d
...
...
@@ -333,7 +333,13 @@ public class EquipmentSpecificController extends AbstractBaseController {
public
ResponseModel
videoOnEquipmentSpecific
(
@RequestBody
VideoOnEquipmentSpecificVo
videoOnEquipmentSpecificVo
)
{
return
CommonResponseUtil
.
success
(
equipmentSpecificSerivce
.
videoOnEquipmentSpecific
(
videoOnEquipmentSpecificVo
));
}
@RequestMapping
(
value
=
"/delVideoOnEquipmentSpecific/{equipmentSpecificId}/{videoId}"
,
method
=
RequestMethod
.
POST
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"摄像头解绑设备"
,
notes
=
"摄像头绑定设备"
)
public
ResponseModel
delVideoOnEquipmentSpecific
(
@PathVariable
Long
equipmentSpecificId
,
@PathVariable
Long
videoId
)
{
return
CommonResponseUtil
.
success
(
equipmentSpecificSerivce
.
delVideoOnEquipmentSpecific
(
equipmentSpecificId
,
videoId
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{buildingId}/list"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/MaintenanceResourceDataController.java
View file @
d1aa3d7d
...
...
@@ -8,6 +8,8 @@ import java.util.List;
import
javax.servlet.http.HttpServletResponse
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -197,7 +199,17 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
page
=
maintenanceResourceDataService
.
page
(
pageBean
,
queryWrapper
);
page
.
getRecords
().
stream
().
forEach
(
e
->
e
.
setLocation
(
e
.
getBuildingName
()
==
null
?
""
:
e
.
getBuildingName
()+
e
.
getLocation
()
==
null
?
""
:
e
.
getLocation
())
);
page
.
getRecords
().
stream
().
forEach
(
e
->{
String
add
=
""
;
if
(!
ValidationUtil
.
isEmpty
(
e
.
getBuildingName
())){
add
=
add
+
e
.
getBuildingName
();
};
if
(!
ValidationUtil
.
isEmpty
(
e
.
getLocation
())){
add
=
add
+
e
.
getLocation
();
}
e
.
setLocation
(
add
);
}
);
return
page
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/fegin/JcsFeign.java
View file @
d1aa3d7d
...
...
@@ -43,7 +43,7 @@ public interface JcsFeign {
@RequestParam
(
value
=
"belongFightingSystemId"
)
Long
belongFightingSystemId
,
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
,
@RequestParam
(
value
=
"classifyId"
)
String
classifyId
,
@RequestParam
(
value
=
"
classifyId
"
)
List
<
String
>
ids
@RequestParam
(
value
=
"
ids
"
)
List
<
String
>
ids
);
@RequestMapping
(
value
=
"/equip/fireSystem_waterResource/list"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
...
...
@@ -172,4 +172,14 @@ public interface JcsFeign {
ResponseModel
<
Long
>
getMaintenanceId
(
@RequestParam
(
value
=
"userId"
)
String
userId
);
/**
* 查询有权限的公司部门列表
*
* @param authKey 权限key
* @param orgTypes(多个逗号分隔) 为空默认查询公司和部门,COMPANY: 公司树 DEPARTMENT部门树
* @return ResponseModel<OrgUsrDto>
*/
@GetMapping
(
value
=
"/org-usr/listCompanyTree"
)
FeignClientResult
<
List
<
OrgUsrDto
>>
getlistCompanyTree
(
@RequestParam
(
required
=
false
)
String
orgType
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
d1aa3d7d
...
...
@@ -171,7 +171,9 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
IPage
<
MaintenanceResourceDataVo
>
getEquipClassifyDataPage
(
Page
page
,
Long
fireFightSysId
,
String
fireFacilityName
,
String
classifyId
,
Long
fireFacilityId
,
List
<
Long
>
buildingId
,
List
<
String
>
bandWbCompany
);
List
<
UserDto
>
getEquipSpecificLocationInfo
(
Long
equipmentSpecificId
,
String
[]
fieldName
);
Map
<
String
,
Double
>
getEquipLocationInfo
(
Long
equipmentSpecificId
);
Map
<
String
,
Object
>
getEquipSpeInfo
(
@Param
(
"equipmentSpecificId"
)
Long
equipmentSpecificId
);
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentSpecificSerivce.java
View file @
d1aa3d7d
...
...
@@ -16,6 +16,7 @@ import com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
import
com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
...
...
@@ -169,6 +170,7 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
EquipmentDetailVo
getAirEquipSpecificDetail
(
Long
stockDetailId
);
List
<
UserDto
>
getEquipSpecificLocationInfo
(
Long
equipmentSpecificId
,
String
[]
fieldName
);
Map
<
String
,
Double
>
getEquipLocationInfo
(
Long
equipmentSpecificId
);
/**
* 根据specificId删除相关数据
...
...
@@ -214,5 +216,6 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
* @return
*/
Boolean
videoOnEquipmentSpecific
(
VideoOnEquipmentSpecificVo
videoOnEquipmentSpecificVo
);
Boolean
delVideoOnEquipmentSpecific
(
Long
equipmentSpecificId
,
Long
videoId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -1300,7 +1300,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
Map
<
String
,
Long
>
countMap
=
iVideoService
.
getVideoCountMap
();
// 1.获取公司list
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
get
CompanyDeptListWithAuth
(
authKey
,
"COMPANY"
);
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
get
listCompanyTree
(
"COMPANY"
);
if
(
orgUsrLists
.
isEmpty
())
{
return
new
ArrayList
<>();
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -451,23 +451,15 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
log
.
error
(
"查询机场人员为空,检查机场人员是否绑定单位!"
);
}
confirmAlamVo
.
setFireLocation
(
ent
.
getLocation
());
List
<
UserDto
>
infoList
=
equipmentSpecificSerivce
.
getEquipSpecificLocationInfo
(
ent
.
getEquipmentSpecificId
(),
FIELD_NAME
.
split
(
","
));
if
(
CollectionUtils
.
isNotEmpty
(
infoList
))
{
infoList
.
stream
().
forEach
(
dto
->
{
// String name = dto.getPersonName();
// confirmAlamVo.setFireLocation(name);
String
code
=
dto
.
getFieldCode
();
String
value
=
dto
.
getFieldValue
();
switch
(
code
)
{
case
"longitude"
:
confirmAlamVo
.
setFloorLongitude
(
getVal
(
value
));
break
;
case
"latitude"
:
confirmAlamVo
.
setFloorLatitude
(
getVal
(
value
));
break
;
default
:
}
});
Map
<
String
,
Double
>
equipLocationInfo
=
equipmentSpecificSerivce
.
getEquipLocationInfo
(
ent
.
getEquipmentSpecificId
());
if
(!
ObjectUtils
.
isEmpty
(
equipLocationInfo
))
{
if
(
equipLocationInfo
.
containsKey
(
"longitude"
)){
confirmAlamVo
.
setFloorLongitude
(
equipLocationInfo
.
get
(
"longitude"
));
}
if
(
equipLocationInfo
.
containsKey
(
"latitude"
)){
confirmAlamVo
.
setFloorLatitude
(
equipLocationInfo
.
get
(
"latitude"
));
}
}
try
{
ruleConfirmAlamService
.
confirmAlam
(
confirmAlamVo
,
appKey
,
product
,
token
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
d1aa3d7d
...
...
@@ -1197,6 +1197,10 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
return
equipmentSpecificMapper
.
getEquipSpecificLocationInfo
(
equipmentSpecificId
,
fieldName
);
}
public
Map
<
String
,
Double
>
getEquipLocationInfo
(
Long
equipmentSpecificId
)
{
return
equipmentSpecificMapper
.
getEquipLocationInfo
(
equipmentSpecificId
);
}
@Override
@Async
(
"equipAsyncExecutor"
)
public
void
equipSpecificDataSync
(
Long
equipmentId
)
{
...
...
@@ -1764,6 +1768,15 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
}
@Override
public
Boolean
delVideoOnEquipmentSpecific
(
Long
equipmentSpecificId
,
Long
videoId
)
{
QueryWrapper
<
VideoEquipmentSpecific
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"equipment_specific_id"
,
equipmentSpecificId
);
queryWrapper
.
eq
(
"video_id"
,
videoId
);
videoEquipmentSpecificService
.
remove
(
queryWrapper
);
return
true
;
}
private
Boolean
bingEquipmentRelationshipToVideo
(
List
<
Long
>
videoIdList
,
Long
equipmentSpecificId
)
{
List
<
VideoEquipmentSpecific
>
videoSpecificList
=
new
ArrayList
<>();
videoIdList
.
parallelStream
().
forEach
(
x
->
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/JCSRemoteService.java
View file @
d1aa3d7d
...
...
@@ -41,4 +41,15 @@ public class JCSRemoteService {
return
feignClientResult
.
getResult
();
}
/**
*
* 查询无权限的公司部门列表
*
* @param orgTypes(多个逗号分隔) 为空默认查询公司和部门,COMPANY: 公司树 DEPARTMENT部门树
* @return List<OrgUsrDto>
*/
public
List
<
OrgUsrDto
>
getlistCompanyTree
(
String
orgType
)
{
FeignClientResult
<
List
<
OrgUsrDto
>>
feignClientResult
=
jcsFeignClient
.
getlistCompanyTree
(
orgType
);
return
feignClientResult
.
getResult
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MaintenanceResourceServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -128,6 +128,7 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
List
<
MaintenanceResourceData
>
maintenanceResourceData
=
maintenanceResourceDataMapper
.
selectMaintenanceResourceDataListByclassifyId
();
//获取第三层分类节点
List
<
MaintenanceResourceDto
>
maintenanceResourceDtos
=
this
.
baseMapper
.
selectAllType
();
List
<
MaintenanceResourceDto
>
list
=
new
ArrayList
<>();
maintenanceResourceData
.
stream
().
forEach
(
e
->
{
MaintenanceResourceDto
e1
=
new
MaintenanceResourceDto
();
...
...
@@ -136,7 +137,7 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
e1
.
setCompanyId
(
e
.
getMaintenanceCompanyId
().
toString
());
e1
.
setType
(
MaintenanceResourceEnum
.
CLASSIFY
.
getValue
());
e1
.
setParentId
(
e
.
getFireFightSysId
().
toString
());
e1
.
set
Code
(
e
.
getClassifyCode
());
e1
.
set
OwnerUnitId
(
e
.
getOwnerUnitId
().
toString
());
list
.
add
(
e1
);
});
// List<MaintenanceResourceDto> list = this.selectAll();
...
...
@@ -144,27 +145,6 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
//获取维保单位和业主单位
List
<
MaintenanceResourceDto
>
companyTree
=
getCompanyList
(
appKey
,
product
,
token
);
if
(!
CollectionUtils
.
isEmpty
(
companyTree
))
{
/* List<MaintenanceResourceDto> result = new ArrayList<>();
result.addAll(list);
for (int i = 0; i < list.size(); i++) {
for (int j = 0; j < companyTree.size(); j++) {
if (list.get(i).getParentId().equals(companyTree.get(j).getParentId()) && list.get(i).getId().equals(companyTree.get(j).getId()) ){
result.remove(list.get(i));
}
}
}*/
/* result.addAll(companyTree);
result.forEach(e->{if (e.getContractId() == null){
e.setContractId(QRCodeUtil.generateQRCode());
}
});
List<MaintenanceResourceDto> dataList = new ArrayList<>();
Map<String, Optional<MaintenanceResourceDto>> collect = result.stream().collect(groupingBy(MaintenanceResourceDto::getContractId, minBy(Comparator.comparing(MaintenanceResourceDto::getParentId))));
collect.entrySet().forEach(entry -> {
entry.getValue().ifPresent(v -> {
dataList.add(v);
});
});*/
list
.
addAll
(
companyTree
);
list
.
addAll
(
maintenanceResourceDtos
);
//避免造成其他代码bug,替换新的组装树
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -9,8 +9,13 @@ import java.util.Iterator;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
import
java.util.logging.Logger
;
import
java.util.stream.Collectors
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
liquibase.pro.packaged.W
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -34,12 +39,6 @@ import com.yeejoin.equipmanage.common.datasync.entity.FireEquipmentDefectAlarm;
import
com.yeejoin.equipmanage.common.datasync.entity.FireEquipmentFaultAlarm
;
import
com.yeejoin.equipmanage.common.datasync.entity.FireEquipmentFireAlarm
;
import
com.yeejoin.equipmanage.common.dto.TemperatureAlarmDto
;
import
com.yeejoin.equipmanage.common.entity.CarProperty
;
import
com.yeejoin.equipmanage.common.entity.EquipmentAlarmReportDay
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarm
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex
;
import
com.yeejoin.equipmanage.common.entity.FireFightingSystemEntity
;
import
com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
...
...
@@ -491,6 +490,16 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
model
.
setIsSendWeb
(
true
);
model
.
setCategory
(
1
);
//告警弹窗需要根据人员单位判断是否展示 后端返回单位Code 前端判断
LambdaQueryWrapper
<
EquipmentSpecific
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
BaseEntity:
:
getId
,
equipmentSpecificAlarmLog
.
getEquipmentSpecificId
());
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificMapper
.
selectOne
(
wrapper
);
if
(!
ValidationUtil
.
isEmpty
(
equipmentSpecific
)
&&
!
ValidationUtil
.
isEmpty
(
equipmentSpecific
.
getBizOrgCode
())){
Map
<
String
,
String
>
equipMap
=
new
HashMap
<>();
equipMap
.
put
(
"bizOrgCode"
,
equipmentSpecific
.
getBizOrgCode
());
model
.
setExtras
(
equipMap
);
}
model
.
setRelationId
(
String
.
valueOf
(
equipmentSpecificAlarmLog
.
getId
()));
Token
token
=
remoteSecurityService
.
getServerToken
();
systemctlFeign
.
create
(
token
.
getAppKey
(),
token
.
getProduct
(),
token
.
getToke
(),
model
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/StockServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -508,6 +508,21 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
relationRedisUtil
.
delSysRedisKey
(
fireFightSysIdsBuffer
.
toString
());
}
if
(
redisUtils
.
hasKey
(
"equipAndCarIotCodes"
))
{
redisUtils
.
del
(
"equipAndCarIotCodes"
);
}
// TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
// @Override
// public void afterCommit() {
// List<EquipmentSpecificVo> data = equipmentSpecificMapper.getEquipOrCarByIotCode(null);
// if (redisUtils.hasKey("equipAndCarIotCodes")) {
// redisUtils.del("equipAndCarIotCodes");
// }
// redisUtils.set("equipAndCarIotCodes", JSONObject.toJSONString(data));
// }
// });
}
catch
(
Exception
e
)
{
//处理异常 返回 成功失败条数
e
.
printStackTrace
();
...
...
@@ -517,7 +532,14 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
return
date
;
}
String
[]
split
=
errBufferName
.
toString
().
split
(
","
);
String
date
=
"上传成功:"
+(
equipmentDetailDownloadVOS
.
size
()-(
split
!=
null
?
split
.
length
:
0
))+
"条---上传失败:"
+(
split
!=
null
?
split
.
length
:
0
)+
"条(失败编号:"
+
errBufferName
+
"详情:"
+
erryy
+
")"
;
String
date
=
""
;
if
(
split
!=
null
&&
split
.
length
>
0
&&!
""
.
equals
(
split
[
0
])){
date
=
"上传成功:"
+(
equipmentDetailDownloadVOS
.
size
()-(
split
!=
null
?
split
.
length
:
0
))+
"条---上传失败:"
+(
split
!=
null
?
split
.
length
:
0
)+
"条(失败编号:"
+
errBufferName
+
"详情:"
+
erryy
+
")"
;
}
else
{
date
=
"上传成功:"
+(
equipmentDetailDownloadVOS
.
size
())+
"条---上传失败:"
+
"0条(失败编号:"
+
errBufferName
+
"详情:"
+
erryy
+
")"
;
}
log
.
error
(
date
);
// 刷新redis中iotCode值
List
<
EquipmentSpecificVo
>
data
=
equipmentSpecificMapper
.
getEquipOrCarByIotCode
(
null
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/utils/RelationRedisUtil.java
View file @
d1aa3d7d
...
...
@@ -44,7 +44,9 @@ public class RelationRedisUtil {
List
<
String
>
collect
=
list
.
stream
().
map
(
FireFightingSystemEntity:
:
getSystemTypeCode
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
collect
))
{
for
(
String
key
:
collect
)
{
redisUtil
.
del
(
key
);
if
(
key
!=
null
&&
redisUtil
.
hasKey
(
key
)){
redisUtil
.
del
(
key
);
}
}
return
Boolean
.
TRUE
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
d1aa3d7d
...
...
@@ -10,6 +10,7 @@ import java.util.stream.Stream;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
...
...
@@ -553,4 +554,11 @@ public class AlertCalledController extends BaseController {
public
ResponseModel
<
Object
>
toCompletePoliceSituationMatch
(
@RequestParam
Long
id
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
toCompletePoliceSituationMatch
(
id
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/selectFlightNumber"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询未结案的航空器报警存在的航班号"
,
notes
=
"查询未结案的航空器报警存在的航班号"
)
public
ResponseModel
<
Object
>
toCompletePoliceSituationMatch
()
throws
MqttException
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectFlightNumber
());
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirestationJacketController.java
View file @
d1aa3d7d
...
...
@@ -119,9 +119,9 @@ public class FirestationJacketController extends BaseController {
QueryWrapper
<
FirestationJacket
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"firefighters_id"
,
sequenceNbr
);
queryWrapper
.
eq
(
"is_delete"
,
0
);
FirestationJacket
firestationJacket
=
iFirestationJacketService
.
getOne
(
queryWrapper
);
List
<
FirestationJacket
>
firestationJacket
=
iFirestationJacketService
.
list
(
queryWrapper
);
if
(
firestationJacket
!=
null
){
if
(
firestationJacket
!=
null
&&
firestationJacket
.
size
()>
0
){
return
CommonResponseUtil2
.
failure
(
"微型消防站有配装装备,不能删除!"
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/PowerTransferController.java
View file @
d1aa3d7d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
java.util.Arrays
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.UserCar
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.UserCarMapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -12,7 +18,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -49,7 +57,9 @@ public class PowerTransferController extends BaseController {
@Autowired
FireTeamServiceImpl
fireTeamService
;
@Autowired
EquipFeignClient
equipFeignClient
;
EquipFeignClient
docequipFeignClient
;
@Autowired
UserCarMapper
userCarMapper
;
/**
* 新增力量调派
...
...
@@ -174,6 +184,29 @@ public class PowerTransferController extends BaseController {
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"力量调派-任务派发"
,
notes
=
"力量调派-任务派发"
)
public
ResponseModel
<
Boolean
>
createPowerTransfer
(
@RequestBody
PowerTransferDto
powerTransferDto
)
{
List
<
PowerTransferCompanyDto
>
powerTransferCompanyDotList
=
powerTransferDto
.
getPowerTransferCompanyDotList
();
StringBuilder
content
=
new
StringBuilder
();
powerTransferCompanyDotList
.
forEach
(
e
->{
if
(
e
.
getPowerTransferCompanyResourcesDtoList
()!=
null
){
e
.
getPowerTransferCompanyResourcesDtoList
().
forEach
(
c
->
{
LambdaQueryWrapper
<
UserCar
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
UserCar:
:
getCarId
,
c
.
getResourcesId
());
wrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
false
);
Integer
count
=
userCarMapper
.
selectCount
(
wrapper
);
if
(
count
<
1
){
content
.
append
(
c
.
getResourcesName
()+
":"
+
c
.
getResourcesNum
()+
" "
);
}
}
);
}
});
if
(!
ValidationUtil
.
isEmpty
(
content
)){
throw
new
BadRequest
(
"车辆:"
+
content
+
"未绑定人员,无法调派"
);
}
AgencyUserModel
userInfo
=
getUserInfo
();
powerTransferDto
.
setTaskSenderId
(
Long
.
parseLong
(
userInfo
.
getUserId
()));
powerTransferDto
.
setTaskSenderName
(
userInfo
.
getRealName
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -17,6 +17,7 @@ import org.apache.commons.lang3.ObjectUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.joda.time.DateTime
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -147,6 +148,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
@Value
(
"${mqtt.topic.command.knowledgebase.alert.match}"
)
private
String
topicMatch
;
@Value
(
"${mqtt.topic.command.alert.noticeAviation}"
)
private
String
noticeAviation
;
@Autowired
private
OrgUsrServiceImpl
iOrgUsrService
;
...
...
@@ -454,6 +457,13 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
emqKeeper
.
getMqttClient
().
publish
(
topicData
,
json
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
// 航空报警器报警通知
if
(
AlertStageEnums
.
HKJY
.
getCode
().
equals
(
alertCalled
.
getAlertTypeCode
()))
{
List
<
String
>
flightNumber
=
powerTransferMapper
.
selectFlightNumber
(
AlertStageEnums
.
HKJY
.
getCode
());
String
flightNumIds
=
JSONObject
.
toJSONString
(
flightNumber
);
emqKeeper
.
getMqttClient
().
publish
(
noticeAviation
,
flightNumIds
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
/**
* 同步保存ES
*/
...
...
@@ -479,6 +489,11 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}
public
List
<
String
>
selectFlightNumber
()
throws
MqttException
{
return
powerTransferMapper
.
selectFlightNumber
(
AlertStageEnums
.
HKJY
.
getCode
());
}
...
...
@@ -684,11 +699,31 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
Map
<
String
,
Integer
>
map
=
powerTransferMapper
.
getCarNum
(
id
);
// Map<String,Integer> mapc=powerTransferMapper.getCompanyNum(id);
// Map<String,Integer> mapu= alertSubmittedMapper.getUseNum(id);
Date
currentTime
=
new
Date
();
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
dateString
=
formatter
.
format
(
currentTime
);
List
<
Map
<
String
,
Integer
>>
list
=
powerTransferMapper
.
getCarUserNum
(
dateString
,
id
);
AlertCalled
al
=
alertCalledMapper
.
selectById
(
id
);
// 统计参与人员
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
listdate
.
add
(
new
KeyValueLabel
(
"调动人力"
,
"useNum"
,
"0"
,
"人"
));
// if(al.getAlertStatus()){
// listdate.add(new KeyValueLabel("调动人力", "useNum", "0", "人"));
// }
if
(
list
!=
null
&&
list
.
size
()>
0
){
listdate
.
add
(
new
KeyValueLabel
(
"调动人力"
,
"useNum"
,
list
.
size
(),
"人"
));
}
else
{
listdate
.
add
(
new
KeyValueLabel
(
"调动人力"
,
"useNum"
,
"0"
,
"人"
));
}
// listdate.add(new KeyValueLabel("调动人力", "useNum", "0", "人"));
// 统计参与车辆
listdate
.
add
(
new
KeyValueLabel
(
"调
动人力"
,
"carNum"
,
map
.
get
(
"carNum"
),
"辆
"
));
listdate
.
add
(
new
KeyValueLabel
(
"调
派车辆"
,
"carNum"
,
map
.
get
(
"carNum"
),
"辆/次
"
));
// 统计参与队伍
listdate
.
add
(
new
KeyValueLabel
(
"调动单位"
,
"companyNum"
,
map
.
get
(
"companyNum"
),
"个"
));
return
listdate
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -36,6 +36,7 @@ import com.yeejoin.amos.boot.module.common.api.service.ISourceFileService;
import
com.yeejoin.amos.boot.module.jcs.api.entity.*
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.JcSituationDetailMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.UserCarMapper
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.xwpf.usermodel.XWPFTable
;
...
...
@@ -186,6 +187,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
@Value
(
"${mqtt.topic.command.power.deployment}"
)
private
String
powertopic
;
@Value
(
"${mqtt.topic.command.alert.noticeAviation}"
)
private
String
noticeAviation
;
@Autowired
EquipFeignClient
equipFeignClient
;
...
...
@@ -348,7 +351,22 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
ruleAlertCalledService
.
fireAlertCalledRule
(
alertCalledVo
,
map
.
get
(
"alertWay"
),
map
.
get
(
"mobiles"
),
map
.
get
(
"usIds"
),
map
.
get
(
"feedBack"
));
//通知实战指挥页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
emqKeeper
.
getMqttClient
().
publish
(
powertopic
,
"0"
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
true
);
}
catch
(
MqttException
e
)
{
// 航空报警器警情结案推送
if
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
())
&&
AlertStageEnums
.
HKJY
.
getCode
().
equals
(
alertCalled
.
getAlertTypeCode
()))
{
List
<
String
>
list
=
powerTransferMapper
.
selectFlightNumber
(
AlertStageEnums
.
HKJY
.
getCode
());
emqKeeper
.
getMqttClient
().
publish
(
noticeAviation
,
JSONObject
.
toJSONString
(
list
).
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
// 警情结案时,修改该警情关联待办任务状态
if
(
AlertBusinessTypeEnum
.
警情结案
.
getCode
().
equals
(
alertSubmittedDto
.
getBusinessTypeCode
()))
{
MessageModel
model
=
new
MessageModel
();
model
.
setRelationId
(
String
.
valueOf
(
alertCalled
.
getSequenceNbr
()));
model
.
setIsRead
(
true
);
model
.
setMsgType
(
"jcs119"
);
Systemctl
.
messageClient
.
update
(
model
);
}
}
catch
(
MqttException
e
)
{
throw
new
RuntimeException
();
}
return
true
;
...
...
@@ -1224,11 +1242,16 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
int
listLength
=
dangerList
.
size
();
for
(
int
i
=
0
;
i
<
fSizs
;
i
++)
{
if
(
i
==
0
)
{
TableStyle
tableStyle
=
new
TableStyle
();
tableStyle
.
setAlign
(
Enum
.
forString
(
"center"
));
reverseList
.
get
(
i
).
getCellDatas
().
get
(
0
).
setCellStyle
(
tableStyle
);
Style
style
=
new
Style
();
style
.
setFontFamily
(
"宋体"
);
style
.
setFontSize
(
12
);
style
.
setBold
(
true
);
reverseList
.
get
(
i
).
getCellDatas
().
get
(
0
).
getRenderData
().
setStyle
(
style
);
reverseList
.
get
(
i
).
getCellDatas
().
get
(
0
).
getRenderData
().
setText
(
"增\n援\n力\n量"
);
}
else
{
reverseList
.
get
(
i
).
getCellDatas
().
forEach
(
cellRenderData
->
{
Style
style
=
new
Style
();
...
...
@@ -1247,13 +1270,15 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
for
(
int
i
=
fSizs
;
i
<
listLength
;
i
++)
{
TableStyle
tableStyle
=
new
TableStyle
();
tableStyle
.
setAlign
(
Enum
.
forInt
(
2
));
tableStyle
.
setAlign
(
Enum
.
forString
(
"center"
));
reverseList
.
get
(
i
).
getCellDatas
().
get
(
0
).
setCellStyle
(
tableStyle
);
reverseList
.
get
(
i
).
getCellDatas
().
get
(
0
).
getRenderData
().
setText
(
"增\n援\n力\n量"
);
Style
style
=
new
Style
();
style
.
setFontFamily
(
"宋体"
);
style
.
setFontSize
(
12
);
style
.
setBold
(
true
);
reverseList
.
get
(
i
).
getCellDatas
().
get
(
0
).
getRenderData
().
setStyle
(
style
);
// reverseList.get(i).getCellDatas().forEach(cellRenderData -> {
// Style style = new Style();
...
...
@@ -1696,7 +1721,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<
String
,
String
>();
besidesMap
.
put
(
"responseLevelString"
,
responseLevelString
);
besidesMap
.
put
(
"alterId"
,
alertCalledId
);
if
(
userList
.
size
()>
0
)
{
if
(
!
ValidationUtil
.
isEmpty
(
userList
)
)
{
pushPowerTransferToAppAndWeb
(
AlertBusinessTypeEnum
.
力量调派
.
getCode
(),
besidesMap
,
smsParams
,
userList
,
null
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ESAlertCalledService.java
View file @
d1aa3d7d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.LinkedList
;
import
java.util.List
;
...
...
@@ -86,11 +87,14 @@ public class ESAlertCalledService {
List
<
AlertCalled
>
alertCalleds
=
alertCalledService
.
list
(
wrapper
);
if
(!
ValidationUtil
.
isEmpty
(
alertCalleds
))
{
for
(
AlertCalled
alertCalled
:
alertCalleds
)
{
saveAlertCalledToES
(
alertCalled
);
}
// for (AlertCalled alertCalled : alertCalleds)
// {
// saveAlertCalledToES(alertCalled);
// }
saveAlertCalledToES
(
alertCalleds
);
}
return
true
;
}
...
...
@@ -151,6 +155,44 @@ public class ESAlertCalledService {
return
esAlertCalled
;
}
public
List
<
ESAlertCalled
>
saveAlertCalledToES
(
List
<
AlertCalled
>
alertCalleds
)
throws
Exception
{
List
<
ESAlertCalled
>
list1
=
new
ArrayList
<>();
for
(
AlertCalled
alertCalled
:
alertCalleds
)
{
ESAlertCalled
esAlertCalled
=
new
ESAlertCalled
();
esAlertCalled
.
setSequenceNbr
(
alertCalled
.
getSequenceNbr
());
esAlertCalled
.
setAlertType
(
alertCalled
.
getAlertType
());
esAlertCalled
.
setAlertTypeCode
(
alertCalled
.
getAlertTypeCode
());
esAlertCalled
.
setCallTime
(
alertCalled
.
getCallTime
());
esAlertCalled
.
setCallTimeLong
(
alertCalled
.
getCallTime
()!=
null
?
alertCalled
.
getCallTime
().
getTime
():
null
);
esAlertCalled
.
setContactUser
(
alertCalled
.
getContactUser
());
esAlertCalled
.
setContactPhone
(
alertCalled
.
getContactPhone
());
esAlertCalled
.
setAddress
(
alertCalled
.
getAddress
());
esAlertCalled
.
setAlertStage
(
alertCalled
.
getAlertStage
());
esAlertCalled
.
setAlertStatus
(
alertCalled
.
getAlertStatus
());
if
(
alertCalled
.
getAlertStatus
())
{
esAlertCalled
.
setAlertStatusStr
(
AlertStatusEnum
.
CLOSED
.
getCode
());
}
else
{
esAlertCalled
.
setAlertStatusStr
(
AlertStatusEnum
.
UNCLOSED
.
getCode
());
}
esAlertCalled
.
setResponseLevelCode
(
alertCalled
.
getResponseLevelCode
());
esAlertCalled
.
setUnitInvolved
(
alertCalled
.
getUnitInvolved
());
esAlertCalled
.
setCoordinateX
(
alertCalled
.
getCoordinateX
());
esAlertCalled
.
setCoordinateY
(
alertCalled
.
getCoordinateY
());
list1
.
add
(
esAlertCalled
);
}
esAlertCalledRepository
.
saveAll
(
list1
);
return
list1
;
}
/**
*
* <pre>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/RuleAlertCalledService.java
View file @
d1aa3d7d
...
...
@@ -6,6 +6,7 @@ import java.util.List;
import
java.util.Set
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.enums.RuleTypeEnum
;
import
com.yeejoin.amos.component.rule.config.ClazzUtils
;
import
com.yeejoin.amos.feign.rule.Rule
;
...
...
@@ -90,7 +91,10 @@ public class RuleAlertCalledService {
FactBaseModel
factBaseModel
=
new
FactBaseModel
();
factBaseModel
.
setPackageId
(
"西咸机场119接处警规则/alertCalledRule"
);
HashMap
<
String
,
byte
[]>
map
=
new
HashMap
<>();
map
.
put
(
"com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo"
,
ClazzUtils
.
serializableObject
(
alertCalledRo
));
// map.put("com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo", ClazzUtils.serializableObject(alertCalledRo));
map
.
put
(
"com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo"
,
JSONObject
.
toJSON
(
alertCalledRo
).
toString
().
getBytes
());
factBaseModel
.
setFactMap
(
map
);
Rule
.
ruleClient
.
fireRule
(
factBaseModel
);
return
true
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/pom.xml
View file @
d1aa3d7d
...
...
@@ -17,6 +17,12 @@
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-knowledgebase-api
</artifactId>
<version>
${amos-biz-boot.version}
</version>
<exclusions>
<exclusion>
<artifactId>
log4j
</artifactId>
<groupId>
log4j
</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/controller/DocLibraryResource.java
View file @
d1aa3d7d
package
com
.
yeejoin
.
amos
.
knowledgebase
.
controller
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.alibaba.fastjson.JSONArray
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -212,18 +214,31 @@ public class DocLibraryResource {
docLibraryService
.
export
(
id
,
type
,
response
);
}
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "导入excel文档")
// @RequestMapping(value = "/import", method = RequestMethod.POST)
// public ResponseModel importExcel(@RequestPart(value = "file") MultipartFile file,
// @RequestPart(value = "module") String moduleStr) {
// ExcelImportConfig excelConfig;
// try {
// excelConfig = JSON.parseObject(moduleStr, ExcelImportConfig.class);
// } catch (Exception e) {
// throw new BadRequest("模板配置信息格式有误");
// }
// return ResponseHelper.buildResponse(docLibraryService.importExcel(file, excelConfig));
// }
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导入excel文档"
)
@RequestMapping
(
value
=
"/import"
,
method
=
RequestMethod
.
POST
)
public
ResponseModel
importExcel
(
@RequestPart
(
value
=
"file"
)
MultipartFile
file
,
@RequestPart
(
value
=
"module"
)
String
moduleStr
)
{
ExcelImportConfig
excelConfig
;
public
ResponseModel
importExcel
(
@RequestPart
(
value
=
"file"
)
MultipartFile
file
,
@RequestPart
(
value
=
"module"
)
String
moduleStr
)
{
List
<
ExcelImportConfig
>
excelConfigList
;
try
{
excelConfig
=
JSON
.
parseObject
(
moduleStr
,
ExcelImportConfig
.
class
);
excelConfig
List
=
JSONArray
.
parseArray
(
moduleStr
,
ExcelImportConfig
.
class
);
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
"模板配置信息格式有误"
);
}
return
ResponseHelper
.
buildResponse
(
docLibraryService
.
importExcel
(
file
,
excelConfig
));
return
ResponseHelper
.
buildResponse
(
docLibraryService
.
importExcel
(
file
,
excelConfig
List
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/controller/DocStatisticsResource.java
View file @
d1aa3d7d
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/orm/dao/StatisticsRecordMapper.java
View file @
d1aa3d7d
...
...
@@ -3,12 +3,13 @@ package com.yeejoin.amos.knowledgebase.face.orm.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.knowledgebase.face.orm.entity.KnowlegeStatisticsRecord
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 标签分组 Mapper 接口
* 标签分组 Mapper 接口
* </p>
*
* @author 子杨
...
...
@@ -16,26 +17,43 @@ import java.util.Map;
*/
public
interface
StatisticsRecordMapper
extends
BaseMapper
<
KnowlegeStatisticsRecord
>
{
/**
* 表清空
* @return
*/
void
deleteAll
();
/**
* 查询灾情总计
* @return
*/
Map
<
String
,
Object
>
selectDisasterCount
();
/**
* 按类型分组查询
*/
List
<
Map
<
String
,
Object
>>
selectCategoryByName
(
String
recordName
);
/**
* 按类型查询/按时间分段总计
*/
List
<
Map
<
String
,
Object
>>
selectCountByNameAndDateRange
(
Map
<
String
,
Object
>
queryMap
);
/**
* 表清空
*
* @return
*/
void
deleteAll
();
/**
* 查询灾情总计
*
* @return
*/
Map
<
String
,
Object
>
selectDisasterCount
();
/**
* 按类型分组查询
*/
List
<
Map
<
String
,
Object
>>
selectCategoryByName
(
String
recordName
);
/**
* 按类型查询/按时间分段总计
*/
List
<
Map
<
String
,
Object
>>
selectCountByNameAndDateRange
(
Map
<
String
,
Object
>
queryMap
);
List
<
Map
<
String
,
Object
>>
tagStatisticsMonth
(
String
tag
,
Date
startDate
,
Date
endDate
);
List
<
Map
<
String
,
Object
>>
tagStatisticsYear
(
String
tag
,
Date
startDate
,
Date
endDate
);
List
<
Map
<
String
,
Object
>>
docStatisticsMonth
(
String
categoryName
,
Date
startDate
,
Date
endDate
);
List
<
Map
<
String
,
Object
>>
docStatisticsYear
(
String
categoryName
,
Date
startDate
,
Date
endDate
);
List
<
Map
<
String
,
Object
>>
tagChartStatistics
(
String
tag
,
Date
startDate
,
Date
endDate
,
String
splitSQL
);
List
<
Map
<
String
,
Object
>>
tagTimeChartStatistics
(
Date
startDate
,
Date
endDate
,
String
splitSQL
);
List
<
Map
<
String
,
Object
>>
docChartStatistics
(
Date
startDate
,
Date
endDate
);
List
<
Map
<
String
,
Object
>>
docBurnChartStatistics
(
Date
startDate
,
Date
endDate
);
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/DocCategoryService.java
View file @
d1aa3d7d
package
com
.
yeejoin
.
amos
.
knowledgebase
.
face
.
service
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.SortedSet
;
import
java.util.TreeSet
;
import
java.util.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
@@ -257,4 +250,13 @@ public class DocCategoryService extends BaseService<KnowledgeDocCategoryModel, K
List
<
KnowledgeDocCategoryModel
>
categoryModelList
=
this
.
queryForList
(
null
,
true
,
categoryName
,
parentId
);
return
categoryModelList
.
isEmpty
()
?
null
:
categoryModelList
.
get
(
0
);
}
public
Map
<
String
,
Long
>
getGroupNameValue
(
List
<
Long
>
ids
)
{
List
<
KnowledgeDocCategoryModel
>
list
=
this
.
queryBatchSeq
(
ids
);
Map
<
String
,
Long
>
result
=
new
HashMap
<>();
for
(
KnowledgeDocCategoryModel
knowledgeDocCategoryModel:
list
)
{
result
.
put
(
knowledgeDocCategoryModel
.
getCategoryName
(),
knowledgeDocCategoryModel
.
getSequenceNbr
());
}
return
result
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/DocLibraryService.java
View file @
d1aa3d7d
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/ESDocService.java
View file @
d1aa3d7d
...
...
@@ -96,8 +96,9 @@ public class ESDocService {
}
catch
(
Exception
e
)
{
return
new
AggregatedPageImpl
<>(
list
,
PageRequest
.
of
(
current
,
size
),
0
);
e
.
printStackTrace
(
);
}
return
new
AggregatedPageImpl
<>(
list
,
PageRequest
.
of
(
current
,
size
),
0
);
}
/**
...
...
@@ -129,12 +130,12 @@ public class ESDocService {
for
(
String
key
:
keys
)
{
boolMust
.
must
(
QueryBuilders
.
boolQuery
().
minimumShouldMatch
(
1
)
.
should
(
QueryBuilders
.
matchQuery
(
"docTitle"
,
key
))
.
should
(
QueryBuilders
.
matchQuery
(
"docInfo"
,
key
))
.
should
(
QueryBuilders
.
matchQuery
(
"author"
,
key
))
.
should
(
QueryBuilders
.
matchQuery
(
"textContent"
,
key
))
.
should
(
QueryBuilders
.
matchQuery
(
"docTags.tagInfo"
,
key
))
.
should
(
QueryBuilders
.
matchQuery
(
"contentTags.tagInfo"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"docTitle"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"docInfo"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"author"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"textContent"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"docTags.tagInfo"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"contentTags.tagInfo"
,
key
))
);
}
// 创建查询构造器
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/StatisticsRecordService.java
View file @
d1aa3d7d
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/controller/LatentDangerController.java
View file @
d1aa3d7d
...
...
@@ -436,4 +436,11 @@ public class LatentDangerController extends BaseController {
}
return
ResponseHelper
.
buildResponse
(
null
);
}
@ApiOperation
(
value
=
"隐患跳转巡检任务页面"
,
notes
=
"隐患跳转巡检任务页面"
)
@GetMapping
(
value
=
"/web/patrol/{id}/{bizId}"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
selectByIdandBizId
(
@PathVariable
String
bizId
,
@PathVariable
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iLatentDangerService
.
selectByIdandBizId
(
id
,
bizId
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/dao/mapper/LatentDangerMapper.java
View file @
d1aa3d7d
...
...
@@ -90,4 +90,6 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
String
orgCode
);
List
<
LatentDanger
>
updateStatusByUserIdAndPlandIdLike
(
String
userId
,
String
planId
);
String
selectByIdandBizId
(
Long
id
,
String
bizId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/LatentDangerServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -9,7 +9,9 @@ import java.util.*;
import
java.util.stream.Collectors
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.opengis.metadata.acquisition.Plan
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -2488,10 +2490,18 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
DangerExecuteSubmitDto
executeSubmitDto
)
throws
Exception
{
List
<
String
>
userIds
=
workflowExecuteService
.
getUserIdsByWorkflow
(
latentDanger
.
getInstanceId
(),
executeSubmitDto
.
getCheckLeaderId
());
// 修改待办任务状态
updateTaskStatus
(
latentDanger
);
ruleDangerService
.
addDangerSubmitRule
(
latentDanger
,
userIds
,
RuleTypeEnum
.
隐患审核
.
getCode
(),
ExecuteTypeEnum
.
getNameByCode
(
executeType
));
}
private
void
updateTaskStatus
(
LatentDanger
latentDanger
){
MessageModel
model
=
new
MessageModel
();
model
.
setRelationId
(
String
.
valueOf
(
latentDanger
.
getId
()));
model
.
setMsgType
(
"danger"
);
model
.
setIsRead
(
true
);
Systemctl
.
messageClient
.
update
(
model
);
}
@Override
public
IPage
<
LatentDanger
>
reviewListDanger
(
PageParam
pageParam
,
String
userId
)
throws
Exception
{
String
type
=
pageParam
.
get
(
"type"
).
toString
();
...
...
@@ -2707,4 +2717,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
this
.
savePatrol
(
dangerDtos
,
userId
,
userRealName
,
departmentId
,
departmentName
,
companyId
,
orgCode
,
role
,
"1"
);
}
public
String
selectByIdandBizId
(
Long
id
,
String
bizId
){
return
latentDangerMapper
.
selectByIdandBizId
(
id
,
bizId
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/intfc/ILatentDangerService.java
View file @
d1aa3d7d
...
...
@@ -203,4 +203,6 @@ public interface ILatentDangerService {
public
Map
<
String
,
Integer
>
currentLandgerCount
(
String
companyId
,
String
loginOrgCode
);
void
updateStatusByUserIdAndPlandIdLike
(
String
userId
,
String
planId
,
ReginParams
reginParams
)
throws
Exception
;
String
selectByIdandBizId
(
Long
id
,
String
bizId
)
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/CheckServiceImpl.java
View file @
d1aa3d7d
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.base.Joiner
;
...
...
@@ -11,8 +11,11 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.CheckMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PlanMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskDetailMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.RouteMapper
;
...
...
@@ -115,6 +118,9 @@ public class CheckServiceImpl implements ICheckService {
@Autowired
IRouteDao
iRouteDao
;
@Autowired
PlanServiceImpl
planService
;
final
String
CHECK_UPDATE_TOPIC
=
"maintenance/date/update"
;
...
...
@@ -273,6 +279,15 @@ public class CheckServiceImpl implements ICheckService {
jsonObject
.
put
(
"maintenanceTime"
,
check
.
getCheckTime
());
mqttGateway
.
publish
(
CHECK_UPDATE_TOPIC
,
jsonObject
.
toJSONString
());
}
Plan
plan
=
planService
.
queryPlanById
(
planTask
.
getPlanId
());
if
(!
ObjectUtils
.
isEmpty
(
plan
)
&&
plan
.
getIsSingleExecution
()){
// 单人执行
updateTaskStatus
(
plan
.
getId
(),
reginParams
.
getUserModel
().
getUserId
());
}
else
{
// 多人执行
updateTaskStatus
(
plan
.
getId
(),
null
);
}
//7.返回不合格记录
return
new
CheckDto
(
check
.
getId
(),
unqualifiedCheckItemList
);
}
catch
(
Exception
e
)
{
...
...
@@ -280,6 +295,17 @@ public class CheckServiceImpl implements ICheckService {
throw
new
Exception
(
e
.
getMessage
(),
e
);
}
}
private
void
updateTaskStatus
(
Long
planId
,
String
userId
){
MessageModel
model
=
new
MessageModel
();
model
.
setRelationId
(
String
.
valueOf
(
planId
));
model
.
setIsRead
(
true
);
model
.
setMsgType
(
"maintenance"
);
if
(!
ObjectUtils
.
isEmpty
(
userId
)){
model
.
setUserId
(
userId
);
}
log
.
info
(
"修改待办任务参数-->{}"
,
JSON
.
toJSON
(
model
));
Systemctl
.
messageClient
.
update
(
model
);
}
private
void
checkCanFinishTask
(
String
mtUserSeq
,
PlanTask
planTask
,
Long
pointId
)
throws
Exception
{
int
status
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CheckController.java
View file @
d1aa3d7d
...
...
@@ -273,6 +273,7 @@ public class CheckController extends AbstractBaseController {
//数字换流站页面刷新
try
{
webMqttComponent
.
publish
(
patrolTopic
,
""
);
}
catch
(
Exception
e
){
log
.
error
(
"数字换流站页面推送失败-----------"
+
e
.
getMessage
());
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/LatentDangerController.java
View file @
d1aa3d7d
...
...
@@ -139,6 +139,7 @@ public class LatentDangerController extends AbstractBaseController {
}
return
iLatentDangerService
.
detail
(
id
,
user
.
getUserId
(),
isFinish
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/entity/mybatis/extend/LatentDangerPatrolBo.java
View file @
d1aa3d7d
...
...
@@ -48,4 +48,7 @@ public class LatentDangerPatrolBo extends LatentDangerPatrolBoExtend {
* 记录修改时间
*/
private
Date
updateDate
;
//input id
private
Long
inputId
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/CheckServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -15,6 +15,11 @@ import java.util.stream.Collectors;
import
javax.annotation.Resource
;
import
javax.transaction.Transactional
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.patrol.dao.entity.Plan
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.assertj.core.util.Sets
;
...
...
@@ -137,6 +142,9 @@ public class CheckServiceImpl implements ICheckService {
@Autowired
private
IPointClassifyDao
iPointClassifyDao
;
@Autowired
private
PlanServiceImpl
planService
;
// @Value("${file.ip}")
// private String fileIp;
//
...
...
@@ -211,6 +219,7 @@ public class CheckServiceImpl implements ICheckService {
PlanTask
planTask
=
null
;
Check
check
=
new
Check
();
HashMap
<
String
,
Object
>
routeParam
=
new
HashMap
<
String
,
Object
>();
Map
detail
=
null
;
Boolean
isOffline
=
requestParam
.
getIsOffline
();
...
...
@@ -343,7 +352,15 @@ public class CheckServiceImpl implements ICheckService {
}
else
{
check
.
setScore
(
Integer
.
parseInt
(
XJConstant
.
POINT_NOT_SCORE
));
}
check
=
checkDao
.
save
(
check
);
// check = checkDao.save(check);
try
{
check
=
checkDao
.
save
(
check
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
List
<
CheckShot
>
imgList
=
new
ArrayList
<>();
...
...
@@ -409,6 +426,15 @@ public class CheckServiceImpl implements ICheckService {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
planTaskMapper
.
reformStatistics
(
user
.
getUserId
(),
sdf
.
format
(
new
Date
()),
requestParam
.
getOrgCode
());
}
// 任务完成、同步修改待办任务状态
Plan
plan
=
planService
.
queryPlanById
(
check
.
getPlanId
());
if
(!
ObjectUtils
.
isEmpty
(
plan
)
&&
plan
.
getIsSingleExecution
()){
// 单人执行
updateTaskStatus
(
plan
.
getId
(),
user
.
getUserId
());
}
else
{
// 多人执行
updateTaskStatus
(
plan
.
getId
(),
null
);
}
return
new
CheckDto
(
check
.
getId
(),
unqualifiedcheckItemList
);
}
catch
(
Exception
e
)
{
...
...
@@ -416,7 +442,21 @@ public class CheckServiceImpl implements ICheckService {
return
null
;
}
}
private
void
updateTaskStatus
(
Long
id
,
String
userId
){
try
{
MessageModel
model
=
new
MessageModel
();
model
.
setRelationId
(
String
.
valueOf
(
id
));
model
.
setIsRead
(
true
);
model
.
setMsgType
(
"patrolSystem"
);
if
(!
ObjectUtils
.
isEmpty
(
userId
)){
model
.
setUserId
(
userId
);
}
FeignClientResult
<
MessageModel
>
update
=
Systemctl
.
messageClient
.
update
(
model
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
@Override
public
void
delCheckById
(
List
<
Long
>
list
)
{
// List<Long> pointIdList = checkDao.getPointIdList(list);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/LatentDangerServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -602,6 +602,9 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
Date
startDate1
=
new
Date
();;
int
dangerListSize
=
latentDangerMapper
.
countByBathBusinessKeys
(
bussinessKeys
,
latentDangerListParam
);
if
(
latentDangerListParam
.
getBelongType
().
equals
(
1
)){
latentDangerListParam
.
setUserId
(
user
.
getUserId
());
}
List
<
LatentDangerBo
>
dangerList
=
latentDangerMapper
.
getByBathBusinessKeys
(
bussinessKeys
,
latentDangerListParam
);
Date
endDate1
=
new
Date
();
logger
.
info
(
"-------------------------sql时间"
+(
endDate1
.
getTime
()-
startDate1
.
getTime
()));
...
...
@@ -835,6 +838,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
// detailVo.setCurrentUserCanExcute(true);
// }
// }
detailVo
.
setCurrentFlowRecordId
(
latentDangerBo
.
getCurrentFlowRecordId
());
detailVo
.
setCurrentFlowRecordIdWeb
(
String
.
valueOf
(
latentDangerBo
.
getCurrentFlowRecordId
()));
if
(!
StringUtils
.
isEmpty
(
latentDangerBo
.
getReformJson
()))
{
...
...
@@ -851,8 +855,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
private
void
buildOfDifferentDangerType
(
LatentDangerBo
latentDangerBo
,
LatentDangerDetailVo
detailVo
)
{
if
(
latentDangerBo
.
getDangerType
().
equals
(
LatentDangerTypeEnum
.
计划检查
.
getCode
())
||
latentDangerBo
.
getDangerType
().
equals
(
LatentDangerTypeEnum
.
无计划检查
.
getCode
()))
{
if
(
latentDangerBo
.
getDangerType
().
equals
(
LatentDangerTypeEnum
.
计划检查
.
getCode
()
.
toString
()
)
||
latentDangerBo
.
getDangerType
().
equals
(
LatentDangerTypeEnum
.
无计划检查
.
getCode
()
.
toString
()
))
{
LatentDangerPatrolBo
patrolBo
=
latentDangerPatrolMapper
.
getByDangerId
(
latentDangerBo
.
getId
());
if
(
patrolBo
!=
null
)
{
LatentDangerDetailRiskVo
riskVo
=
new
LatentDangerDetailRiskVo
();
...
...
@@ -870,19 +874,23 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
if
(
StringUtil
.
isNotEmpty
(
checkUser
))
{
riskVo
.
setCheckUser
(
checkUser
.
getRealName
());
}
RiskFactorBo
riskFactorBo
=
StringUtil
.
isNotEmpty
(
patrolBo
.
getClassifyOriginalId
())
?
riskFactorMapper
.
getById
(
Long
.
valueOf
(
patrolBo
.
getClassifyOriginalId
()))
:
null
;
if
(
riskFactorBo
!=
null
&&
riskFactorBo
.
getEquipmentDepartmentId
()
!=
null
)
{
DepartmentModel
department
=
remoteSecurityService
.
getDepartmentByDeptId
(
RequestContext
.
getToken
(),
getProduct
(),
RequestContext
.
getAppKey
(),
riskFactorBo
.
getEquipmentDepartmentId
().
toString
());
if
(
department
!=
null
)
{
riskVo
.
setBelongDepartmentName
(
department
.
getDepartmentName
());
}
}
// RiskFactorBo riskFactorBo = StringUtil.isNotEmpty(patrolBo.getClassifyOriginalId()) ? riskFactorMapper.getById(Long.valueOf(patrolBo.getClassifyOriginalId())) : null;
// if (riskFactorBo != null && riskFactorBo.getEquipmentDepartmentId() != null) {
// DepartmentModel department = remoteSecurityService.getDepartmentByDeptId(RequestContext.getToken(), getProduct(),RequestContext.getAppKey(),riskFactorBo.getEquipmentDepartmentId().toString());
// if (department != null) {
// riskVo.setBelongDepartmentName(department.getDepartmentName());
// }
// }
// List<CheckShot> checkShots = iCheckShotDao.findAllByCheckIdAndCheckInputId(patrolBo.getCheckId(),
// latentDangerBo.getBizId());
List
<
CheckShot
>
checkShots
=
iCheckShotDao
.
findAllByCheckIdAndCheckInputId
(
patrolBo
.
getCheckId
(),
latentDangerBo
.
getBiz
Id
());
patrolBo
.
getInput
Id
());
if
(!
CollectionUtils
.
isEmpty
(
checkShots
))
{
List
<
String
>
photos
=
Lists
.
transform
(
checkShots
,
e
->
{
if
(
e
!=
null
)
{
return
fileServerAddress
+
e
.
getPhotoData
().
replaceAll
(
"\\\\"
,
"/"
);
// return fileServerAddress + e.getPhotoData().replaceAll("\\\\", "/");
return
e
.
getPhotoData
().
replaceAll
(
"\\\\"
,
"/"
);
}
else
{
return
""
;
}
...
...
@@ -1264,9 +1272,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
latentDangerBo
.
setReformType
(
LatentDangerReformTypeEnum
.
常规整改
.
getCode
().
toString
());
JSONObject
reformJsonObj
=
JSONObject
.
parseObject
(
latentDangerBo
.
getReformJson
());
if
(
ValidationUtil
.
isEmpty
(
reformJsonObj
))
{
reformJsonObj
=
executeParam
.
getFlowJson
();
// reformJsonObj = executeParam.getFlowJson();
reformJsonObj
.
put
(
"governPhotoObj"
,
executeParam
.
getFlowJson
().
get
(
"photoUrls"
));
}
else
{
reformJsonObj
.
putAll
(
executeParam
.
getFlowJson
());
// reformJsonObj.putAll(executeParam.getFlowJson());
reformJsonObj
.
put
(
"governPhotoObj"
,
executeParam
.
getFlowJson
().
get
(
"photoUrls"
));
}
latentDangerBo
.
setReformJson
(
reformJsonObj
.
toJSONString
());
latentDangerBo
.
setInferOtherThings
(
executeParam
.
getInferOtherThings
());
...
...
@@ -1290,6 +1301,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
reformJsonObject
=
new
JSONObject
();
}
reformJsonObject
.
put
(
"governUserId"
,
governUserId
);
reformJsonObject
.
put
(
"reviewPhotoObj"
,
reformJsonObject
.
get
(
"photoUrls"
));
latentDangerBo
.
setReformJson
(
reformJsonObject
.
toJSONString
());
// 消防巡查需求:评审通过后指定治理人
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/CheckController.java
View file @
d1aa3d7d
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.supervision.business.constants.XJConstant
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskDetailMapper
;
import
com.yeejoin.amos.supervision.business.dto.CheckDto
;
import
com.yeejoin.amos.supervision.business.dto.CheckInputItemDto
;
import
com.yeejoin.amos.supervision.business.param.*
;
...
...
@@ -19,6 +23,7 @@ import com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone;
import
com.yeejoin.amos.supervision.core.common.response.GraphInitDataResponse
;
import
com.yeejoin.amos.supervision.core.framework.PersonIdentify
;
import
com.yeejoin.amos.supervision.core.util.StringUtil
;
import
com.yeejoin.amos.supervision.dao.entity.PlanTask
;
import
com.yeejoin.amos.supervision.mqtt.WebMqttComponent
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -82,6 +87,10 @@ public class CheckController extends AbstractBaseController {
@Value
(
"${amosRefresh.patrol.topic}"
)
private
String
patrolTopic
;
@Autowired
PlanTaskDetailMapper
planTaskDetailMapper
;
@Autowired
private
WebMqttComponent
webMqttComponent
;
...
...
@@ -557,6 +566,20 @@ public class CheckController extends AbstractBaseController {
String
orgCode
=
getOrgCode
(
reginParams
);
requestParam
.
setOrgCode
(
orgCode
);
List
<
CheckInputItemDto
>
checkInputItemDtoList
=
checkService
.
saveCheckRecord
(
requestParam
,
reginParams
);
// 查询检查计划任务信息
PlanTask
planTasks
=
planTaskDetailMapper
.
selectById
(
requestParam
.
getPlanTaskId
());
log
.
info
(
"检查任务信息-->{}"
,
JSON
.
toJSON
(
planTasks
));
if
(!
ObjectUtils
.
isEmpty
(
planTasks
)){
// 如果计划已超时或者已结束-----更新待办任务状态
if
(
XJConstant
.
TASK_STATUS_TIMEOUT
==
planTasks
.
getFinishStatus
()
||
XJConstant
.
TASK_STATUS_FINISH
==
planTasks
.
getFinishStatus
()){
MessageModel
model
=
new
MessageModel
();
model
.
setRelationId
(
String
.
valueOf
(
planTasks
.
getPlanId
()));
model
.
setMsgType
(
"supervision"
);
model
.
setIsRead
(
true
);
log
.
info
(
"修改待办任务参数-->{}"
,
JSON
.
toJSON
(
model
));
Systemctl
.
messageClient
.
update
(
model
);
}
}
return
ResponseHelper
.
buildResponse
(
checkInputItemDtoList
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/PlanTaskDetailMapper.java
View file @
d1aa3d7d
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.supervision.business.dao.mapper;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.supervision.dao.entity.PlanTask
;
import
com.yeejoin.amos.supervision.dao.entity.PlanTaskDetail
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -19,4 +20,11 @@ public interface PlanTaskDetailMapper extends BaseMapper {
* @param planTaskDetailId 主键id
*/
void
updateDanger
(
@Param
(
value
=
"planTaskDetailId"
)
long
planTaskDetailId
);
/**
* 任务id查询任务信息
* @param id
* @return
*/
PlanTask
selectById
(
@Param
(
"id"
)
Long
id
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/IPlanDao.java
View file @
d1aa3d7d
...
...
@@ -22,6 +22,11 @@ public interface IPlanDao extends BaseDao<Plan, Long> {
@Modifying
@Transactional
@Query
(
value
=
"select * from p_plan WHERE status NOT IN (0,5,6,7,8)"
,
nativeQuery
=
true
)
List
<
Plan
>
queryOutTimePlan
();
@Modifying
@Transactional
@Query
(
value
=
"select * from p_plan WHERE route_id = ?1 and status = ?2"
,
nativeQuery
=
true
)
List
<
Plan
>
queryPlanByRouteId
(
long
routeId
,
String
status
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanAuditServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.supervision.business.service.impl;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.service.IWorkflowExcuteService
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanAuditDao
;
...
...
@@ -26,10 +27,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.*
;
@Service
(
"planAuditService"
)
public
class
PlanAuditServiceImpl
implements
IPlanAuditService
{
...
...
@@ -77,6 +75,8 @@ public class PlanAuditServiceImpl implements IPlanAuditService {
workflowExcuteService
.
CompleteTask
(
instanceId
,
conditionValue
,
reginParams
);
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
String
userId
=
reginParams
.
getUserModel
().
getUserId
();
plan
.
setNextGenDate
(
DateUtils
.
dateTimeToDate
(
new
Date
()));
planService
.
updateGenDate
(
plan
);
// 更新计划状态,指定执行人
updatePlanStatus
(
condition
,
plan
,
instanceId
,
conditionValue
);
// 更新流水表
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -12,12 +12,16 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.client.MessageClient
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.supervision.business.constants.XJConstant
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PlanMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.supervision.business.dao.repository.*
;
import
com.yeejoin.amos.supervision.business.param.PlanInfoPageParam
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPlanService
;
import
com.yeejoin.amos.supervision.business.util.Toke
;
import
com.yeejoin.amos.supervision.common.enums.*
;
import
com.yeejoin.amos.boot.biz.common.enums.RuleTypeEnum
;
import
com.yeejoin.amos.supervision.core.async.AsyncTask
;
...
...
@@ -238,6 +242,11 @@ public class PlanServiceImpl implements IPlanService {
}
}
public
void
updateGenDate
(
Plan
plan
){
planMapper
.
updateById
(
plan
);
}
/**
* 根据工作流获取下一审核人角色下的所有用户ID =》规则推送消息
* @return
...
...
@@ -260,9 +269,13 @@ public class PlanServiceImpl implements IPlanService {
rulePlanService
.
addPlanRule
(
plan
,
userIds
,
RuleTypeEnum
.
计划提交
,
null
);
// 计划提交
}
else
{
if
(
PlanStatusEnum
.
EXAMINE_THREE
.
getValue
()
!=
status
){
// 待办任务状态更新
updateTaskStatus
(
plan
);
// rulePlanService.addPlanAuditRule(plan, userIds, RuleTypeEnum.计划审核, ExecuteStateNameEnum.getNameByCode(excuteState)); // 计划审核
rulePlanService
.
addPlanAuditRule
(
plan
,
userIds
,
RuleTypeEnum
.
计划审核任务
,
ExecuteStateNameEnum
.
getNameByCode
(
excuteState
));
// 计划审核任务通知
}
else
{
// 待办任务状态更新
updateTaskStatus
(
plan
);
rulePlanService
.
addPlanAuditRule
(
plan
,
userIds
,
RuleTypeEnum
.
计划审核完成
,
ExecuteStateNameEnum
.
getNameByCode
(
excuteState
));
// 计划审核完成
}
}
...
...
@@ -273,6 +286,19 @@ public class PlanServiceImpl implements IPlanService {
return
userIds
;
}
private
void
updateTaskStatus
(
Plan
plan
){
Toke
toke
=
remoteSecurityService
.
getServerToken
();
RequestContext
.
setToken
(
toke
.
getToke
());
RequestContext
.
setProduct
(
toke
.
getProduct
());
RequestContext
.
setAppKey
(
toke
.
getAppKey
());
MessageModel
model
=
new
MessageModel
();
model
.
setRelationId
(
String
.
valueOf
(
plan
.
getId
()));
model
.
setMsgType
(
"supervision"
);
model
.
setIsRead
(
true
);
log
.
info
(
"修改待办任务参数-->{}"
,
JSON
.
toJSON
(
model
));
Systemctl
.
messageClient
.
update
(
model
);
}
private
void
insertAuditLog
(
ReginParams
reginParams
,
Plan
param
,
ReginParams
.
PersonIdentity
personIdentity
,
PlanAudit
audit
)
{
PlanAuditLog
planAuditLog
=
new
PlanAuditLog
();
planAuditLog
.
setPlanAuditId
(
audit
.
getId
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanTaskServiceImpl.java
View file @
d1aa3d7d
...
...
@@ -377,6 +377,31 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
strDate
=
df
.
format
(
now
);
String
tomorrow
=
DateUtil
.
getIntervalDateStr
(
now
,
1
,
"yyyy-MM-dd"
);
// 下一天
//除草稿状态外其他状态过了计划结束时间都需要根据任务状态更新计划状态。
List
<
Plan
>
planLists
=
iplanDao
.
queryOutTimePlan
();
if
(
CollectionUtils
.
isNotEmpty
(
planLists
)){
for
(
Plan
plan
:
planLists
)
{
// 当前时间在计划结束时间之前,则计划还未超时
Date
date
=
new
Date
();
Time
time
=
new
Time
(
date
.
getTime
());
String
planEndTime
=
plan
.
getPlanEnd
()
+
" "
+
plan
.
getDayEnd
().
toString
();
try
{
Date
parse
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
parse
(
planEndTime
);
if
(
time
.
before
(
new
Time
(
parse
.
getTime
()))){
continue
;
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
HashMap
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
param
.
put
(
"id"
,
plan
.
getId
());
param
.
put
(
"status"
,
PlanStatusEnum
.
COMPLETED
.
getValue
());
planMapper
.
updPlanStatusOrGenDate
(
param
);
}
}
// 根据计划状态5,6和next_gen_date查询需要生成任务的计划
List
<
Plan
>
planList
=
iplanDao
.
queryScheduledPlan
(
strDate
,
String
.
valueOf
(
PlanStatusEnum
.
EXAMINE_DEVELOPED
.
getValue
()),
...
...
@@ -414,6 +439,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
int
num
=
0
;
//根据计划id查询关联的任务
List
<
PlanTask
>
planTaskByRouteId
=
planTaskMapper
.
getPlanTaskByRouteId
(
plan
.
getId
());
if
(!
ValidationUtil
.
isEmpty
(
planTaskByRouteId
)){
HashMap
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
param
.
put
(
"pointId"
,
plan
.
getId
());
...
...
@@ -427,6 +453,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
else
{
paramMap
.
put
(
"status"
,
PlanStatusEnum
.
COMPLETED
.
getValue
());
}
}
else
{
paramMap
.
put
(
"status"
,
PlanStatusEnum
.
OUT_TIME
.
getValue
());
planMapper
.
updPlanStatusOrGenDate
(
paramMap
);
continue
;
}
if
(
plan
.
getIsFixedDate
().
equals
(
"2"
)){
paramMap
.
put
(
"status"
,
PlanStatusEnum
.
OUT_TIME
.
getValue
());
...
...
@@ -437,7 +467,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
planTaskMapper
.
updateTaskDetailStatusByPlanId
(
plan
.
getId
());
continue
;
}
planMapper
.
updPlanStatusOrGenDate
(
paramMap
);
if
(!
ObjectUtils
.
isEmpty
(
paramMap
.
get
(
"status"
))
&&
paramMap
.
get
(
"status"
).
equals
(
PlanStatusEnum
.
OUT_TIME
.
getValue
())){
// 计划超时,修改计划下任务状态
...
...
@@ -854,13 +884,17 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
log
.
info
(
String
.
format
(
"计划对象:%s"
,
JSON
.
toJSON
(
plan
)));
// 规则推送消息
rulePlanService
.
addPlanRule
(
plan
,
null
,
RuleTypeEnum
.
消息型计划生成
,
extraUserIds
);
// 根据bug4150 将此处的计划生成的枚举值变成了消息,既TASK ->
// NOTIFY
String
userIdString
=
plan
.
getUserId
();
FeignClientResult
amosIdListByUserIds
=
jcsFeignClient
.
getAmosIdListByUserIds
(
userIdString
);
List
<
String
>
result
=
(
List
<
String
>)
amosIdListByUserIds
.
getResult
();
// 规则推送消息
extraUserIds
.
removeAll
(
result
);
//给执行人只发送待办 不发通知
rulePlanService
.
addPlanRule
(
plan
,
null
,
RuleTypeEnum
.
消息型计划生成
,
extraUserIds
);
// 根据bug4150 将此处的计划生成的枚举值变成了消息,既TASK ->
// NOTIFY
if
(
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isNotEmpty
(
result
))
{
// String[] userIdArr = userIdString.split(",");
// List<String> userIdList = Arrays.asList(userIdArr);
...
...
amos-boot-module/amos-boot-module-biz/pom.xml
View file @
d1aa3d7d
...
...
@@ -39,7 +39,11 @@
<artifactId>
servlet-api
</artifactId>
<groupId>
javax.servlet
</groupId>
</exclusion>
</exclusions>
<exclusion>
<artifactId>
log4j
</artifactId>
<groupId>
log4j
</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
...
...
amos-boot-system-equip/pom.xml
View file @
d1aa3d7d
...
...
@@ -14,7 +14,13 @@
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-equip-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<exclusions>
<exclusion>
<artifactId>
log4j-to-slf4j
</artifactId>
<groupId>
org.apache.logging.log4j
</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
...
...
amos-boot-system-equip/src/main/resources/application.properties
View file @
d1aa3d7d
...
...
@@ -85,6 +85,11 @@ dcs.token-key=dcs_token_key
dcs.client.secret
=
fire_system
dcs.x.hw.id
=
NR_REST_APP
dcs.x.hw.appKey
=
s+YkvQhwilx91TRJHhNDmw==
# 故障告警/消防告警/跑马灯权限标识 true 机场 / false 电力
equip.enabled
=
true
management.endpoints.enabled-by-default
=
false
# 权限标识-物联区域
auth-key-area
=
area_info
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
d1aa3d7d
...
...
@@ -1240,7 +1240,7 @@
'其他' AS fireFightSysName,
'equip' AS fireFacilityType,
ws.source_id AS buildingId,
ws.
`name`
AS buildingName,
ws.
full_name
AS buildingName,
ed.area AS location
FROM
wl_equipment_specific es
...
...
@@ -1299,6 +1299,20 @@
</if>
</where>
</select>
<select
id=
"getEquipLocationInfo"
resultType=
"map"
>
SELECT
wed.longitude as longitude,
wed.latitude as latitude
FROM
wl_stock_detail sd
LEFT JOIN wl_equipment_detail wed ON sd.equipment_detail_id = wed.id
<where>
<if
test=
"equipmentSpecificId != null"
>
sd.equipment_specific_id = #{equipmentSpecificId}
</if>
</where>
</select>
<select
id=
"getEquipSpeInfo"
resultType=
"Map"
>
SELECT
...
...
amos-boot-system-equip/src/main/resources/mapper/MaintenanceResourceDataMapper.xml
View file @
d1aa3d7d
...
...
@@ -59,7 +59,7 @@
create_date
FROM
mt_maintenance_resource_data
GROUP BY maintenance_company_id,classify_id
GROUP BY maintenance_company_id,classify_id
,owner_unit_id,fire_fight_sys_id
</select>
<select
id=
"selectMaintenanceResourceDataList"
...
...
@@ -252,7 +252,17 @@
m.maintenance_company_name,
m.owner_unit_id,
m.owner_unit_name,
m.fire_fight_sys_id,
<choose>
<when
test=
"fireFightSysId != null and fireFightSysId != '' "
>
m.fire_fight_sys_id,
</when>
<otherwise>
'' as fire_fight_sys_id,
</otherwise>
</choose>
m.fire_fight_sys_name,
m.classify_id,
m.classify_name,
...
...
@@ -279,7 +289,8 @@
</if>
</where>
GROUP BY
m.classify_code
-- m.classify_code
m.classify_id
</select>
<select
id=
"getFireFacilityPage"
resultType=
"com.yeejoin.equipmanage.common.dto.MaintenanceResourceDataDto"
>
SELECT
...
...
@@ -316,7 +327,7 @@
<if
test=
"ownerUnitId != null"
>
AND m.owner_unit_id = #{ownerUnitId}
</if>
<if
test=
"fireFightSysId != null"
>
<if
test=
"fireFightSysId != null
and fireFightSysId != ''
"
>
AND m.fire_fight_sys_id = #{fireFightSysId}
</if>
<if
test=
"classifyId != null"
>
...
...
amos-boot-system-equip/src/main/resources/mapper/MaintenanceResourceMapper.xml
View file @
d1aa3d7d
...
...
@@ -132,6 +132,7 @@
fire_fight_sys_id AS id,
fire_fight_sys_name name ,
owner_unit_id as parentId,
owner_unit_id as ownerUnitId,
IFNULL(classify_type,3) as type
FROM
`mt_maintenance_resource_data`
...
...
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
d1aa3d7d
...
...
@@ -50,6 +50,13 @@
<if
test=
"video!=null and video.bizOrgCode!=null and video.bizOrgCode!=''"
>
and wlv.biz_org_code LIKE CONCAT(#{video.bizOrgCode}, '%')
</if>
<if
test=
"video!=null and video.ip!=null and video.ip!=''"
>
and wlv.ip like concat('%',#{video.ip},'%')
</if>
<if
test=
"video!=null and video.type!=null and video.type!=''"
>
and wlv.type=#{video.type}
</if>
group by wlv.id
order by wlv.create_date desc
</select>
...
...
@@ -108,10 +115,19 @@
<if
test=
"dto.code!=null and dto.code!=''"
>
and v.code like concat('%',#{dto.code},'%')
</if>
<if
test=
" dto.ip!=null and dto.ip!=''"
>
and v.ip like concat('%',#{dto.ip},'%')
</if>
<if
test=
"dto.type!=null and dto.type!=''"
>
and v.type = #{dto.type}
</if>
GROUP BY id
order by v.create_date
</when>
<when
test=
"dto.buildingId == null || dto.buildingId ==''"
>
<when
test=
'dto.buildingId == null || dto.buildingId ==""'
>
<where>
<if
test=
"dto.bizOrgCode!=null and dto.bizOrgCode!=''"
>
v.biz_org_code LIKE CONCAT(#{dto.bizOrgCode}, '%')
...
...
@@ -122,6 +138,16 @@
<if
test=
"dto.equipmentName!=null and dto.equipmentName!=''"
>
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
<if
test=
" dto.ip!=null and dto.ip!=''"
>
and v.ip like concat('%',#{dto.ip},'%')
</if>
<if
test=
"dto.type!=null and dto.type!=''"
>
and v.type =#{dto.type}
</if>
</where>
GROUP BY id
order by v.create_date
...
...
@@ -160,7 +186,7 @@
select
vid.id,
vid.token,
vid.
remark
,
vid.
name as name
,
vid.url,
vid.code,
vid.preset_position as presetPosition,
...
...
amos-boot-system-fas/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
d1aa3d7d
...
...
@@ -199,9 +199,29 @@
<if
test=
"equipmentName!=null"
>
AND d.equipmentName LIKE '%${equipmentName}%'
</if>
<if
test=
"startTime!=null"
>
AND d.create_date BETWEEN '${startTime}' AND '${endTime}'
</if>
<!-- <if test="startTime!=null and endTime!=null ">-->
<!-- AND d.create_date BETWEEN '${startTime}' AND '${endTime}'-->
<!-- </if>-->
<choose>
<when
test=
"startTime!=null and endTime!=null "
>
AND d.create_date BETWEEN '${startTime}' AND '${endTime}'
</when>
<otherwise>
<if
test=
"startTime!=null"
>
AND d.create_date
>
= '${startTime}'
</if>
<if
test=
"endTime!=null "
>
AND d.create_date
<
= '${endTime}'
</if>
</otherwise>
</choose>
<if
test=
"buildId!=null"
>
AND d.buildId in (#{buildId})
<!-- AND d.buildId in
...
...
amos-boot-system-jcs/pom.xml
View file @
d1aa3d7d
...
...
@@ -26,10 +26,7 @@
<groupId>
org.liquibase
</groupId>
<artifactId>
liquibase-core
</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-security</artifactId>-->
<!-- </dependency>-->
</dependencies>
<build>
...
...
amos-boot-system-jcs/src/main/resources/application.properties
View file @
d1aa3d7d
...
...
@@ -29,11 +29,7 @@ spring.datasource.hikari.max-lifetime=120000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
##liquibase
...
...
@@ -79,6 +75,8 @@ mqtt.topic.alert.iot=iot-system-alarm
mqtt.topic.alert.iot.web
=
iot-system-alarm-web
#警情预案匹配的消息topic名称
mqtt.topic.command.knowledgebase.alert.match
=
knowledgeAlertMatch
#航空报警器警情通知
mqtt.topic.command.alert.noticeAviation
=
aviationAlarm
security.systemctl.name
=
AMOS-API-SYSTEMCTL
...
...
@@ -122,6 +120,7 @@ mybatis.interceptor.enabled = false
## 消防救援保障部ID
fire-rescue
=
1432549862557130753
management.endpoints.enabled-by-default
=
false
#阿里云实时语音识别参数
speech-config.access-key-id
=
LTAI5t62oH95jgbjRiNXPsho
speech-config.access-key-secret
=
shy9SpogYgcdDoyTB3bvP21VSRmz8n
...
...
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
d1aa3d7d
...
...
@@ -3222,5 +3222,44 @@
REPLACE INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1165, '1165', '集结待命', 'XYJBR', NULL, NULL, NULL, NULL, NULL, b'0', 1);
</sql>
</changeSet>
<changeSet
author=
"chenzhao"
id=
"2022-07-1-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_data_dictionary"
/>
</preConditions>
<comment>
修改数据字典parent
</comment>
<sql>
ALTER TABLE cb_data_dictionary MODIFY COLUMN parent VARCHAR(100)
</sql>
</changeSet>
<changeSet
author=
"chenzhao"
id=
"2022-07-4-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_data_dictionary"
/>
</preConditions>
<comment>
修改数据字典
</comment>
<sql>
UPDATE `cb_data_dictionary` SET `code` = '1210', `name` = '消防指挥员', `type` = 'GWMC', `type_desc` = '消防人员岗位', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1210;
UPDATE `cb_data_dictionary` SET `code` = '141', `name` = '消防战斗员', `type` = 'GWMC', `type_desc` = NULL, `parent` = '140', `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 141;
</sql>
</changeSet>
<changeSet
author=
"chenzhao"
id=
"2022-07-4-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_data_dictionary"
/>
</preConditions>
<comment>
增加数据字典数据
</comment>
<sql>
REPLACE INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1353, 1, '急救类', 'GWMC', NULL, NULL, NULL, NULL, NULL, b'0', 1);
REPLACE INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1354, 2, '医生', 'GWMC', NULL, '1353', NULL, NULL, NULL, b'0', 1);
REPLACE INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1355, 3, '公卫医生', 'GWMC', NULL, '1353', NULL, NULL, NULL, b'0', 1);
REPLACE INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1356, 4, '护士长', 'GWMC', NULL, '1353', NULL, NULL, NULL, b'0', 1);
REPLACE INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1357, 5, '护士', 'GWMC', NULL, '1353', NULL, NULL, NULL, b'0', 1);
REPLACE INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1358, 6, '急救驾驶员', 'GWMC', NULL, '1353', NULL, NULL, NULL, b'0', 1);
</sql>
</changeSet>
</databaseChangeLog>
amos-boot-system-knowledgebase/pom.xml
View file @
d1aa3d7d
...
...
@@ -14,11 +14,13 @@
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-knowledgebase-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
<exclusions>
<exclusion>
<artifactId>
log4j
</artifactId>
<groupId>
log4j
</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
...
...
amos-boot-system-knowledgebase/src/main/resources/application.properties
View file @
d1aa3d7d
...
...
@@ -22,8 +22,4 @@ mybatis-plus.mapper-locations=classpath:mapper/*
## redis失效时间
redis.cache.failure.time
=
10800
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
management.endpoints.enabled-by-default
=
false
amos-boot-system-knowledgebase/src/main/resources/mapper/StatisticsRecordMapper.xml
View file @
d1aa3d7d
This diff is collapsed.
Click to expand it.
amos-boot-system-latentdanger/pom.xml
View file @
d1aa3d7d
...
...
@@ -23,10 +23,7 @@
<artifactId>
pagehelper
</artifactId>
<version>
5.1.10
</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-security</artifactId>-->
<!-- </dependency>-->
</dependencies>
<build>
<plugins>
...
...
amos-boot-system-latentdanger/src/main/resources/application.properties
View file @
d1aa3d7d
...
...
@@ -64,9 +64,4 @@ latentDanger.feign.name=AMOS-LATENT-DANGER
Knowledgebase.fegin.name
=
AMOS-API-KNOWLEDGEBASE
## 消防救援保障部ID
fire-rescue
=
1432549862557130753
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
management.endpoints.enabled-by-default
=
false
amos-boot-system-latentdanger/src/main/resources/db/mapper/LatentDangerMapper.xml
View file @
d1aa3d7d
...
...
@@ -1104,4 +1104,16 @@ WHERE
AND deleted = 0
)
</select>
<select
id=
"selectByIdandBizId"
resultType=
"string"
>
SELECT
pc.plan_task_id as taskId
FROM
p_latent_danger p
LEFT JOIN p_check_input pci ON pci.id = p.biz_id
LEFT JOIN p_check pc ON pci.check_id = pc.id
WHERE
p.id = #{id} and p.biz_id = #{bizId}
</select>
</mapper>
\ No newline at end of file
amos-boot-system-maintenance/pom.xml
View file @
d1aa3d7d
...
...
@@ -13,10 +13,7 @@
<artifactId>
amos-boot-module-maintenance-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
...
...
amos-boot-system-maintenance/src/main/resources/application.properties
View file @
d1aa3d7d
...
...
@@ -67,8 +67,4 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
management.endpoints.enabled-by-default
=
false
\ No newline at end of file
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
d1aa3d7d
...
...
@@ -238,7 +238,7 @@
</if>
<choose>
<when
test=
"identityType==1"
>
And (a.orgCode LIKE CONCAT( #{orgCode}, '
-
%' ) or a.orgCode= #{orgCode} )
And (a.orgCode LIKE CONCAT( #{orgCode}, '%' ) or a.orgCode= #{orgCode} )
<if
test=
"companyId != null and companyId != ''"
>
and a.owner_id = #{companyId}
</if>
</when>
<when
test=
"identityType==2"
>
...
...
amos-boot-system-patrol/pom.xml
View file @
d1aa3d7d
...
...
@@ -16,10 +16,7 @@
<artifactId>
amos-boot-module-patrol-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
...
...
amos-boot-system-patrol/src/main/resources/application.properties
View file @
d1aa3d7d
...
...
@@ -58,8 +58,4 @@ rule.definition.default-agency=STATE_GRID
jcs.fegin.name
=
JCS
emergency.command.section.id
=
1418223840361709569
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
management.endpoints.enabled-by-default
=
false
amos-boot-system-patrol/src/main/resources/db/mapper/LatentDangerMapper.xml
View file @
d1aa3d7d
...
...
@@ -898,6 +898,9 @@
<if
test=
"latentDangerListParam.dangerName != null and latentDangerListParam.dangerName !=''"
>
AND pld.danger_name LIKE concat('%',#{latentDangerListParam.dangerName},'%')
</if>
<if
test=
"latentDangerListParam.belongType != null and latentDangerListParam.belongType == 1"
>
AND pld.discoverer_user_id =#{latentDangerListParam.userId}
</if>
<if
test=
"latentDangerListParam.dangerId != null and latentDangerListParam.dangerId !=''"
>
and pld.id=#{latentDangerListParam.dangerId}
</if>
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/LatentDangerPatrolMapper.xml
View file @
d1aa3d7d
...
...
@@ -127,8 +127,9 @@
</delete>
<select
id=
"getByDangerId"
resultType=
"com.yeejoin.amos.patrol.business.entity.mybatis.extend.LatentDangerPatrolBo"
>
select
a.*,
select
pci.check_id,
pci.input_id,
b.name as itemName,
b.original_id as itemOriginalId,
b.basis_json as itemBasis,
...
...
@@ -139,32 +140,38 @@
c.charge_dept_id as pointDepartMentId,
c.original_id as pointOriginalId,
d.name as routeName,
e
.check_time as checkTime,
e
.user_id as checkUserId,
e
.dep_id as checkDepartmentId,
pc
.check_time as checkTime,
pc
.user_id as checkUserId,
pc
.dep_id as checkDepartmentId,
f.name as planName,
f.plan_type as planType,
f.execute_rate as executeRate,
g.original_id as classifyOriginalId,
g.name as classifyName
from
p_latent_danger_patrol as a
left join
p_input_item as b on a.item_id = b.id
p_latent_danger as a
LEFT JOIN p_check_input pci ON pci.id = a.biz_id
LEFT JOIN p_check pc ON pci.check_id = pc.id
left join
p_
point as c on a.point_id = c
.id
p_
input_item as b on pci.input_id = b
.id
left join
p_
route as d on a.route_id = d
.id
p_
point as c on pc.point_id = c
.id
left join
p_check as e on a.check_id = e.id
p_route as d on pc.route_id = d.id
left join
p_plan as f on
e
.plan_id = f.id
p_plan as f on
pc
.plan_id = f.id
left join
p_point_classify as g on
a.point_classify_id = g.
id
p_point_classify as g on
pc.point_id= g.point_
id
where
a.deleted = 0
and
a.
latent_danger_id
= #{dangerId}
a.
id
= #{dangerId}
</select>
<select
id=
"listByMap"
resultType=
"com.yeejoin.amos.patrol.business.entity.mybatis.extend.LatentDangerPatrolBo"
>
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
d1aa3d7d
...
...
@@ -45,7 +45,7 @@
<if
test=
"isFixed!=null"
>
and b.is_fixed = #{isFixed}
</if>
<if
test=
"isOK!=null"
>
and a.is_OK = #{isOK}
</if>
<if
test=
"planId!=null"
>
and a.plan_Id = #{planId}
</if>
<if
test=
"planTaskId!=null"
>
and a.plan_task_
detail_
id = #{planTaskId}
</if>
<if
test=
"planTaskId!=null"
>
and a.plan_task_id = #{planTaskId}
</if>
<if
test=
"userId!=null"
>
and find_in_set(#{userId}, a.user_id) > 0
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"catalogId!=null"
>
and b.Catalog_Id = #{catalogId}
</if>
...
...
@@ -120,7 +120,7 @@
<if
test=
"isFixed!=null"
>
and b.is_fixed = #{isFixed}
</if>
<if
test=
"isOK!=null"
>
and a.is_OK = #{isOK}
</if>
<if
test=
"planId!=null"
>
and a.plan_Id = #{planId}
</if>
<if
test=
"planTaskId!=null"
>
and a.plan_task_
detail_
id = #{planTaskId}
</if>
<if
test=
"planTaskId!=null"
>
and a.plan_task_id = #{planTaskId}
</if>
<if
test=
"userId!=null"
>
and find_in_set(#{userId}, a.user_id) > 0
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"catalogId!=null"
>
and b.Catalog_Id = #{catalogId}
</if>
...
...
amos-boot-system-precontrol/pom.xml
View file @
d1aa3d7d
...
...
@@ -18,7 +18,13 @@
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-precontrol-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<exclusions>
<exclusion>
<artifactId>
log4j
</artifactId>
<groupId>
log4j
</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
...
...
amos-boot-system-supervision/pom.xml
View file @
d1aa3d7d
...
...
@@ -33,10 +33,7 @@
<groupId>
cn.jpush.api
</groupId>
<artifactId>
jpush-client
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
...
...
amos-boot-system-supervision/src/main/resources/application.properties
View file @
d1aa3d7d
...
...
@@ -73,8 +73,4 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
endpoints.enabled
=
false
management.security.enabled
=
true
security.user.name
=
admin
security.user.password
=
admin
management.endpoints.enabled-by-default
=
false
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
d1aa3d7d
...
...
@@ -405,7 +405,9 @@
<if
test=
"companyId != null and companyId != ''"
>
and ppn.original_id = #{companyId}
</if>
<if
test=
"taskType != null and taskType != ''"
>
and ppn.check_type_id = #{taskType}
</if>
<if
test=
"planTaskId != null and planTaskId > 0 "
>
and ptd.task_no = #{planTaskId}
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
<!-- <if test="orderBy != null and orderBy != ''">order by ${orderBy}</if>-->
order by p.id
<if
test=
"offset != null and pageSize != null"
>
limit #{offset},#{pageSize}
</if>
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/plan_task_detail.xml
View file @
d1aa3d7d
...
...
@@ -34,4 +34,9 @@
WHERE
pptd.id = a.id
</update>
<select
id=
"selectById"
resultType=
"com.yeejoin.amos.supervision.dao.entity.PlanTask"
>
SELECT * FROM p_plan_task where id = #{id}
</select>
</mapper>
\ No newline at end of file
amos-boot-utils/amos-boot-utils-jpush/pom.xml
View file @
d1aa3d7d
...
...
@@ -22,5 +22,12 @@
<artifactId>
jpush-client
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
pom.xml
View file @
d1aa3d7d
...
...
@@ -28,6 +28,7 @@
<amos.version>
1.7.8
</amos.version>
<rule.version>
1.7.9-SNAPSHOT
</rule.version>
<itext.version>
7.1.1
</itext.version>
<elasticsearch.version>
7.15.2
</elasticsearch.version>
</properties>
<dependencies>
...
...
@@ -215,7 +216,7 @@
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-systemctl
</artifactId>
<version>
1.
6.5
</version>
<version>
1.
7.8
</version>
</dependency>
<dependency>
<groupId>
io.swagger
</groupId>
...
...
@@ -243,7 +244,7 @@
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-component-rule
</artifactId>
<version>
${rule.version}
</version>
<version>
1.7.9-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
...
...
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