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
be0b2af0
Commit
be0b2af0
authored
Oct 14, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_bugfix@dl' into develop_bugfix@dl
parents
01431707
38bbf614
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+22
-0
EquipmentSpecificController.java
...n/equipmanage/controller/EquipmentSpecificController.java
+9
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
be0b2af0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -15,19 +16,23 @@ import com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil;
import
com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.*
;
import
com.yeejoin.amos.boot.module.common.api.enums.DataSyncTopicEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.WaterResourceTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -72,6 +77,9 @@ public class WaterResourceController extends BaseController {
@Value
(
"${auth-key-fire-water:fire_water_info}"
)
private
String
authKey
;
@Autowired
private
EmqKeeper
emqKeeper
;
/**
* 新增
*
...
...
@@ -180,9 +188,21 @@ public class WaterResourceController extends BaseController {
if
(
model
.
getSequenceNbr
()
!=
null
)
{
model
.
setResourceId
(
model
.
getSequenceNbr
());
}
// 消息转发至全域
syncWaterDataToCenter
(
model
,
"create"
);
return
ResponseHelper
.
buildResponse
(
model
);
}
private
void
syncWaterDataToCenter
(
WaterResourceDto
waterResourceDto
,
String
operateType
)
{
JSONObject
message
=
new
JSONObject
();
message
.
put
(
"topic"
,
"jcs/sync/water"
+
"/"
+
operateType
);
message
.
put
(
"data"
,
waterResourceDto
);
try
{
emqKeeper
.
getMqttClient
().
publish
(
"emq.bussSign.created"
,
message
.
toJSONString
().
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
catch
(
MqttException
e
)
{
e
.
printStackTrace
();
}
}
/**
* 获取关联装备定义物联参数字段
...
...
@@ -326,6 +346,7 @@ public class WaterResourceController extends BaseController {
}
waterResourceIndexServiceImpl
.
saveOrUpdateBatch
(
list
);
}
syncWaterDataToCenter
(
waterResourceDto
,
"update"
);
return
ResponseHelper
.
buildResponse
(
waterResourceDto
);
}
...
...
@@ -344,6 +365,7 @@ public class WaterResourceController extends BaseController {
BeanUtils
.
copyProperties
(
waterResource
,
waterResourceDto
);
waterResourceDto
.
setIsDelete
(
false
);
waterResourceServiceImpl
.
updateWithModel
(
waterResourceDto
);
syncWaterDataToCenter
(
waterResourceDto
,
"delete"
);
return
ResponseHelper
.
buildResponse
(
true
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentSpecificController.java
View file @
be0b2af0
...
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.equipmanage.common.datasync.entity.FireFightingSystem
;
import
com.yeejoin.equipmanage.common.dto.EquipmentSpecificDto
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
...
...
@@ -544,6 +545,14 @@ public class EquipmentSpecificController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
equipmentSpecific
);
}
@GetMapping
(
"/system/one"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询泡沫系统指标"
,
notes
=
"查询泡沫系统指标"
)
public
ResponseModel
getOneSystemById
(
@RequestParam
(
value
=
"id"
)
String
id
)
{
FireFightingSystemEntity
entity
=
fireFightingSystemServiceImpl
.
getOneById
(
Long
.
valueOf
(
id
));
return
CommonResponseUtil
.
success
(
entity
);
}
@GetMapping
(
value
=
"/info/paomo"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询泡沫系统指标"
,
notes
=
"查询泡沫系统指标"
)
...
...
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