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
77cc8f1e
Commit
77cc8f1e
authored
Oct 23, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
光伏预警规则编辑和回显API
parent
d6aeb144
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
0 deletions
+71
-0
IdxBizFanWarningRecordController.java
...xiop/biz/controller/IdxBizFanWarningRecordController.java
+71
-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/IdxBizFanWarningRecordController.java
View file @
77cc8f1e
...
@@ -9,8 +9,10 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
...
@@ -9,8 +9,10 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanWarningRecordDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanWarningRecordDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRuleSet
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRuleSet
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRuleSet
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRecordServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRecordServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleSetServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleSetServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvWarningRuleSetServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.beanutils.BeanMap
;
import
org.apache.commons.beanutils.BeanMap
;
...
@@ -44,6 +46,9 @@ public class IdxBizFanWarningRecordController extends BaseController {
...
@@ -44,6 +46,9 @@ public class IdxBizFanWarningRecordController extends BaseController {
@Autowired
@Autowired
IdxBizFanWarningRuleSetServiceImpl
idxBizFanWarningRuleSetService
;
IdxBizFanWarningRuleSetServiceImpl
idxBizFanWarningRuleSetService
;
@Autowired
IdxBizPvWarningRuleSetServiceImpl
idxBizPvWarningRuleSetService
;
/**
/**
* 新增
* 新增
*
*
...
@@ -190,4 +195,70 @@ public class IdxBizFanWarningRecordController extends BaseController {
...
@@ -190,4 +195,70 @@ public class IdxBizFanWarningRecordController extends BaseController {
boolean
b
=
idxBizFanWarningRuleSetService
.
updateBatchById
(
idxBizFanWarningRecordList
);
boolean
b
=
idxBizFanWarningRuleSetService
.
updateBatchById
(
idxBizFanWarningRecordList
);
return
ResponseHelper
.
buildResponse
(
b
);
return
ResponseHelper
.
buildResponse
(
b
);
}
}
/**
* 根据sequenceNbr查询
*
* @param ANALYSISPOINTID 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getInfoByPointIdPv"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据ANALYSIS_POINT_ID查询单个"
,
notes
=
"根据ANALYSIS_POINT_ID查询单个"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getInfoByPointIdPv
(
@RequestParam
String
ANALYSISPOINTID
)
{
LambdaQueryWrapper
<
IdxBizPvWarningRuleSet
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizPvWarningRuleSet:
:
getAnalysisPointId
,
ANALYSISPOINTID
);
List
<
IdxBizPvWarningRuleSet
>
idxBizPvWarningRecordList
=
idxBizPvWarningRuleSetService
.
getBaseMapper
().
selectList
(
query
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
idxBizPvWarningRecordList
.
size
();
i
++)
{
IdxBizPvWarningRuleSet
idxBizPvWarningRecord
=
idxBizPvWarningRecordList
.
get
(
i
);
if
(
idxBizPvWarningRecord
.
getWarningName
().
equals
(
"注意"
)){
map
.
putAll
(
BeanUtil
.
beanToMap
(
idxBizPvWarningRecord
));
}
else
if
(
idxBizPvWarningRecord
.
getWarningName
().
equals
(
"警告"
)){
//警告周期
map
.
put
(
"jgWarningCycle"
,
idxBizPvWarningRecord
.
getWarningCycle
());
map
.
put
(
"jgWarningIf"
,
idxBizPvWarningRecord
.
getWarningIf
());
}
else
if
(
idxBizPvWarningRecord
.
getWarningName
().
equals
(
"危险"
)){
//警告周期
map
.
put
(
"wxWarningCycle"
,
idxBizPvWarningRecord
.
getWarningCycle
());
map
.
put
(
"wxWarningIf"
,
idxBizPvWarningRecord
.
getWarningIf
());
}
}
return
ResponseHelper
.
buildResponse
(
map
);
}
/**
* 根据pointId修改信息
*
* @param analysisInfo 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/updateByPointInfoPv"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据pointId修改信息"
,
notes
=
"根据pointId修改信息"
)
public
ResponseModel
<
Boolean
>
updateByPointInfoPv
(
@RequestBody
JSONObject
analysisInfo
)
{
LambdaQueryWrapper
<
IdxBizPvWarningRuleSet
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizPvWarningRuleSet:
:
getAnalysisPointId
,
analysisInfo
.
get
(
"analysisPointId"
));
List
<
IdxBizPvWarningRuleSet
>
idxBizFanWarningRecordList
=
idxBizPvWarningRuleSetService
.
getBaseMapper
().
selectList
(
query
);
for
(
IdxBizPvWarningRuleSet
idxBizPvWarningRuleSet
:
idxBizFanWarningRecordList
)
{
BeanUtil
.
copyProperties
(
analysisInfo
,
idxBizPvWarningRuleSet
,
"sequenceNbr"
,
"warningName"
);
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
);
}
}
}
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