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
0032aa18
Commit
0032aa18
authored
Oct 24, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预警规则批量配置开发
parent
23e058a3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
8 deletions
+73
-8
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+3
-8
IdxBizFanWarningRecordController.java
...xiop/biz/controller/IdxBizFanWarningRecordController.java
+70
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/BigScreenAnalyseController.java
View file @
0032aa18
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -13,10 +14,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.feign.RiskWarningFeign;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallInfoDTO
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthLevel
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvHealthLevel
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IndicatorData
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthLevelMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanWarningRecordMapper
;
...
...
@@ -31,10 +29,7 @@ import io.swagger.annotations.ApiOperation;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanWarningRecordController.java
View file @
0032aa18
...
...
@@ -25,6 +25,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -261,4 +262,73 @@ public class IdxBizFanWarningRecordController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/stringToMap"
)
@ApiOperation
(
httpMethod
=
"get"
,
value
=
"字符串转为对象格式"
,
notes
=
"字符串转为对象格式"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
list
(
@RequestParam
(
"analysisPointIds"
)
String
ids
)
{
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"analysisPointIds"
,
ids
);
return
ResponseHelper
.
buildResponse
(
data
);
}
/**
* 根据pointId修改信息
*
* @param analysisInfo 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/updateByPointInfoBatchPv"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据pointId修改信息"
,
notes
=
"根据pointId修改信息"
)
public
ResponseModel
<
Boolean
>
updateByPointInfoBatchPv
(
@RequestBody
JSONObject
analysisInfo
)
{
LambdaQueryWrapper
<
IdxBizPvWarningRuleSet
>
query
=
new
LambdaQueryWrapper
<>();
List
<
String
>
analysisPointIds
=
Arrays
.
asList
(
analysisInfo
.
get
(
"analysisPointIds"
).
toString
().
split
(
","
));
query
.
in
(
IdxBizPvWarningRuleSet:
:
getAnalysisPointId
,
analysisPointIds
);
List
<
IdxBizPvWarningRuleSet
>
idxBizFanWarningRecordList
=
idxBizPvWarningRuleSetService
.
getBaseMapper
().
selectList
(
query
);
for
(
IdxBizPvWarningRuleSet
idxBizPvWarningRuleSet
:
idxBizFanWarningRecordList
)
{
BeanUtil
.
copyProperties
(
analysisInfo
,
idxBizPvWarningRuleSet
,
"analysisPointIds"
);
if
(
idxBizPvWarningRuleSet
.
getWarningName
().
equals
(
"警告"
))
{
//警告周期
idxBizPvWarningRuleSet
.
setWarningIf
(
analysisInfo
.
get
(
"jgWarningIf"
).
toString
());
idxBizPvWarningRuleSet
.
setWarningCycle
(
analysisInfo
.
get
(
"jgWarningCycle"
).
toString
());
}
else
if
(
idxBizPvWarningRuleSet
.
getWarningName
().
equals
(
"危险"
))
{
//警告周期
idxBizPvWarningRuleSet
.
setWarningIf
(
analysisInfo
.
get
(
"wxWarningIf"
).
toString
());
idxBizPvWarningRuleSet
.
setWarningCycle
(
analysisInfo
.
get
(
"wxWarningCycle"
).
toString
());
}
}
boolean
b
=
idxBizPvWarningRuleSetService
.
updateBatchById
(
idxBizFanWarningRecordList
);
return
ResponseHelper
.
buildResponse
(
b
);
}
/**
* 根据pointId修改信息
*
* @param analysisInfo 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/updateByPointInfoBatchFan"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据pointId修改信息"
,
notes
=
"根据pointId修改信息"
)
public
ResponseModel
<
Boolean
>
updateByPointInfoBatchFan
(
@RequestBody
JSONObject
analysisInfo
)
{
LambdaQueryWrapper
<
IdxBizFanWarningRuleSet
>
query
=
new
LambdaQueryWrapper
<>();
List
<
String
>
analysisPointIds
=
Arrays
.
asList
(
analysisInfo
.
get
(
"analysisPointIds"
).
toString
().
split
(
","
));
query
.
in
(
IdxBizFanWarningRuleSet:
:
getAnalysisPointId
,
analysisPointIds
);
List
<
IdxBizFanWarningRuleSet
>
idxBizFanWarningRecordList
=
idxBizFanWarningRuleSetService
.
getBaseMapper
().
selectList
(
query
);
for
(
IdxBizFanWarningRuleSet
idxBizFanWarningRuleSet
:
idxBizFanWarningRecordList
)
{
BeanUtil
.
copyProperties
(
analysisInfo
,
idxBizFanWarningRuleSet
,
"analysisPointIds"
);
if
(
idxBizFanWarningRuleSet
.
getWarningName
().
equals
(
"警告"
))
{
//警告周期
idxBizFanWarningRuleSet
.
setWarningIf
(
analysisInfo
.
get
(
"jgWarningIf"
).
toString
());
idxBizFanWarningRuleSet
.
setWarningCycle
(
analysisInfo
.
get
(
"jgWarningCycle"
).
toString
());
}
else
if
(
idxBizFanWarningRuleSet
.
getWarningName
().
equals
(
"危险"
))
{
//警告周期
idxBizFanWarningRuleSet
.
setWarningIf
(
analysisInfo
.
get
(
"wxWarningIf"
).
toString
());
idxBizFanWarningRuleSet
.
setWarningCycle
(
analysisInfo
.
get
(
"wxWarningCycle"
).
toString
());
}
}
boolean
b
=
idxBizFanWarningRuleSetService
.
updateBatchById
(
idxBizFanWarningRecordList
);
return
ResponseHelper
.
buildResponse
(
b
);
}
}
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