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
f9e1923f
Commit
f9e1923f
authored
Aug 04, 2022
by
王鹿鹿
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6
parents
0dbaea7a
62f1546e
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
82 deletions
+68
-82
PersonIdentifyAspect.java
...odule/common/api/core/framework/PersonIdentifyAspect.java
+0
-1
FirefightersMapper.xml
...mmon-api/src/main/resources/mapper/FirefightersMapper.xml
+1
-0
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+2
-2
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+30
-78
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+5
-0
TagMapper.java
...om/yeejoin/amos/knowledgebase/face/orm/dao/TagMapper.java
+9
-0
TagService.java
...m/yeejoin/amos/knowledgebase/face/service/TagService.java
+10
-1
TagMapper.xml
...tem-knowledgebase/src/main/resources/mapper/TagMapper.xml
+11
-0
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/core/framework/PersonIdentifyAspect.java
View file @
f9e1923f
...
...
@@ -16,7 +16,6 @@ import org.aspectj.lang.annotation.Before;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FirefightersMapper.xml
View file @
f9e1923f
...
...
@@ -252,6 +252,7 @@ SELECT
(
cf.state_code IN ('94', '98')
OR cf.state_code IS NULL
or LENGTH(cf.state_code) = 0
)
AND cf.is_delete = FALSE
<if
test=
"jobCode != null"
>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
f9e1923f
...
...
@@ -234,11 +234,11 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
// syncDataService.syncCreatedSendAlarmReport(ent);
}
//数字换流站使用
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
""
);
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
public
void
afterCommit
()
{
//数字换流站使用
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
""
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"seqNo"
,
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
).
toLowerCase
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
ALARM_LOG_INSERT
.
getTopic
(),
jsonObject
.
toString
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
f9e1923f
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.HashMap
;
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
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.support.TransactionSynchronization
;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -39,54 +10,35 @@ 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.vo.CarPropertyVo
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentStateVo
;
import
com.yeejoin.equipmanage.common.entity.vo.IndexStateVo
;
import
com.yeejoin.equipmanage.common.enums.AlarmStatusEnum
;
import
com.yeejoin.equipmanage.common.enums.AlarmTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.CarForGisEnum
;
import
com.yeejoin.equipmanage.common.enums.EquipAndCarEnum
;
import
com.yeejoin.equipmanage.common.enums.EquipmentIndexLabelsEnum
;
import
com.yeejoin.equipmanage.common.enums.EquipmentRiskTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.NBalarmEnum
;
import
com.yeejoin.equipmanage.common.enums.RiskLeverForAutoSys
;
import
com.yeejoin.equipmanage.common.enums.TemperatureAlarm
;
import
com.yeejoin.equipmanage.common.enums.TopicEnum
;
import
com.yeejoin.equipmanage.common.enums.TrueOrFalseEnum
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.common.enums.*
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.common.vo.CarIndexGisVo
;
import
com.yeejoin.equipmanage.common.vo.EquipmentIndexLabelsVo
;
import
com.yeejoin.equipmanage.common.vo.EquipmentVo
;
import
com.yeejoin.equipmanage.common.vo.IotDataVO
;
import
com.yeejoin.equipmanage.common.vo.Token
;
import
com.yeejoin.equipmanage.common.vo.TopicEntityVo
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.fegin.SystemctlFeign
;
import
com.yeejoin.equipmanage.mapper.CarMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmLogMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificIndexMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.equipmanage.mapper.FireFightingSystemMapper
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.service.ICarPropertyService
;
import
com.yeejoin.equipmanage.service.IEquipmentAlarmReportDayService
;
import
com.yeejoin.equipmanage.service.IEquipmentIndexService
;
import
com.yeejoin.equipmanage.service.IEquipmentService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmLogService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificIndexService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
com.yeejoin.equipmanage.service.IMainIotMonitorSerivce
;
import
com.yeejoin.equipmanage.service.ISyncDataService
;
import
com.yeejoin.equipmanage.service.MqttReceiveService
;
import
com.yeejoin.equipmanage.service.MqttSendGateway
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.utils.BeanUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.support.TransactionSynchronization
;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
//import net.sf.json.JSONObject;
...
...
@@ -97,7 +49,6 @@ import lombok.extern.slf4j.Slf4j;
* <pre>
* @description: 增量数据处理
* </pre>
*
* @date 2020/11/3 13:39
*/
@Slf4j
...
...
@@ -226,7 +177,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
JSONObject
json
=
JSONObject
.
parseObject
(
message
);
Iterator
it
=
json
.
entrySet
().
iterator
();
List
<
IotDataVO
>
iotDatalist
=
new
ArrayList
<
IotDataVO
>();
List
<
IotDataVO
>
iotDatalist
=
new
ArrayList
<
>();
String
traceId
=
""
;
while
(
it
.
hasNext
())
{
IotDataVO
iotDataVO
=
new
IotDataVO
();
...
...
@@ -391,7 +342,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
});
boolean
updateBatchById
=
false
;
if
(!
carIndexsList
.
isEmpty
())
{
if
(!
carIndexsList
.
isEmpty
())
{
carPropertyService
.
updateBatchById
(
carIndexsList
);
updateBatchById
=
true
;
}
...
...
@@ -443,7 +394,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
// 添加性能指标项
//flag 无意义 getSpeIndex 方法其他地方共用 做了额外封装 为0时走原逻辑
int
flag
=
0
;
equipmentStateVo
.
setSpeindexList
(
fireFightingSystemService
.
getSpeIndex
(
index
.
getEquipmentSpecificId
(),
flag
));
equipmentStateVo
.
setSpeindexList
(
fireFightingSystemService
.
getSpeIndex
(
index
.
getEquipmentSpecificId
(),
flag
));
Map
<
String
,
Object
>
topicObject
=
new
HashMap
<>();
topicObject
.
put
(
"equipCode"
,
equipmentStateVo
.
getEquipCode
());
if
(
TrueOrFalseEnum
.
real
.
value
.
toUpperCase
().
equals
(
index
.
getValue
().
toUpperCase
()))
{
...
...
@@ -452,6 +403,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
topicObject
.
put
(
"color"
,
""
);
}
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentStateVo
));
topicObject
.
put
(
"uuid"
,
UUID
.
randomUUID
().
toString
());
map
.
put
(
canvasTopic
,
topicObject
);
// 发送数据至画布
...
...
@@ -493,11 +445,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
//告警弹窗需要根据人员单位判断是否展示 后端返回单位Code 前端判断
LambdaQueryWrapper
<
EquipmentSpecific
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
BaseEntity:
:
getId
,
equipmentSpecificAlarmLog
.
getEquipmentSpecificId
());
wrapper
.
eq
(
BaseEntity:
:
getId
,
equipmentSpecificAlarmLog
.
getEquipmentSpecificId
());
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificMapper
.
selectOne
(
wrapper
);
if
(!
ValidationUtil
.
isEmpty
(
equipmentSpecific
)
&&
!
ValidationUtil
.
isEmpty
(
equipmentSpecific
.
getBizOrgCode
()))
{
if
(!
ValidationUtil
.
isEmpty
(
equipmentSpecific
)
&&
!
ValidationUtil
.
isEmpty
(
equipmentSpecific
.
getBizOrgCode
()))
{
Map
<
String
,
String
>
equipMap
=
new
HashMap
<>();
equipMap
.
put
(
"bizOrgCode"
,
equipmentSpecific
.
getBizOrgCode
());
equipMap
.
put
(
"bizOrgCode"
,
equipmentSpecific
.
getBizOrgCode
());
model
.
setExtras
(
equipMap
);
}
model
.
setRelationId
(
String
.
valueOf
(
equipmentSpecificAlarmLog
.
getId
()));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
f9e1923f
...
...
@@ -1141,6 +1141,11 @@ public class ExcelServiceImpl {
List
<
FireTeam
>
excelEntityList
=
new
ArrayList
<>();
excelDtoList
.
forEach
(
item
->
{
if
(
StringUtils
.
isEmpty
(
item
.
getCompanyCode
())
||
StringUtils
.
isEmpty
(
item
.
getName
())
||
StringUtils
.
isEmpty
(
item
.
getTypeCode
())
||
StringUtils
.
isEmpty
(
item
.
getAddress
())
||
StringUtils
.
isEmpty
(
item
.
getLatitude
())
||
StringUtils
.
isEmpty
(
item
.
getLongitude
()))
{
throw
new
BadRequest
(
"请检查必填项是否为空"
);
}
FireTeam
fireTeam
=
new
FireTeam
();
fireTeam
=
Bean
.
toPo
(
item
,
fireTeam
);
fireTeam
=
Bean
.
toPo
(
getCurrentInfo
(),
fireTeam
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/orm/dao/TagMapper.java
View file @
f9e1923f
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.knowledgebase.face.orm.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.knowledgebase.face.orm.entity.KnowledgeTag
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -17,4 +18,11 @@ public interface TagMapper extends BaseMapper<KnowledgeTag> {
List
<
KnowledgeTag
>
queryTagByNameInPublishedDoc
(
String
tagName
);
/**
* 统计标签被引用数量
* @param sequenceNbr
* @param quoteType
* @return
*/
Integer
queryCountByTagSeq
(
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
,
@Param
(
"quoteType"
)
String
quoteType
);
}
\ 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/TagService.java
View file @
f9e1923f
...
...
@@ -57,7 +57,13 @@ public class TagService extends BaseService<KnowledgeTagModel, KnowledgeTag, Tag
private
DocContentService
docContentService
;
@Autowired
private
ConfigLoader
configLoader
;
@Autowired
private
TagMapper
tagMapper
;
/**
* 统计方式-文档是否发布
*/
public
static
final
String
QUOTE_TYPE_PUBLISHED
=
"PUBLISHED"
;
/**
* 创建标签
...
...
@@ -169,7 +175,10 @@ public class TagService extends BaseService<KnowledgeTagModel, KnowledgeTag, Tag
for
(
KnowledgeTag
tag
:
tagList
)
{
KnowledgeTagModel
tagModel
=
Bean
.
toModel
(
tag
,
new
KnowledgeTagModel
());
//加入引用数量
tagModel
.
setReferenceNumber
(
getAllReference
(
tagModel
.
getSequenceNbr
()));
// tagModel.setReferenceNumber(getAllReference(tagModel.getSequenceNbr()));
//被引用且已发布数量
Integer
num
=
tagMapper
.
queryCountByTagSeq
(
tagModel
.
getSequenceNbr
(),
QUOTE_TYPE_PUBLISHED
);
tagModel
.
setReferenceNumber
(
num
);
//获取拼音首字母
String
pinyin
;
try
{
...
...
amos-boot-system-knowledgebase/src/main/resources/mapper/TagMapper.xml
View file @
f9e1923f
...
...
@@ -18,4 +18,15 @@
WHERE DOC_STATUS = "PUBLISHED"))
AND TAG_NAME LIKE CONCAT('%', #{tagName},'%')
</select>
<select
id=
"queryCountByTagSeq"
resultType=
"java.lang.Integer"
>
SELECT
count( ti.SEQUENCE_NBR )
FROM
knowledge_tag_instance ti
LEFT JOIN knowledge_doc_content dc ON dc.SEQUENCE_NBR = ti.TARGET_SEQ
WHERE
ti.TAG_SEQ = #{sequenceNbr}
AND dc.DOC_STATUS = #{quoteType}
</select>
</mapper>
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