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
d6f52bfc
Commit
d6f52bfc
authored
Oct 20, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
e94f4f04
e6723d0b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
2 deletions
+80
-2
SocketConfig.java
...c/main/java/com/yeejoin/amos/kgd/config/SocketConfig.java
+1
-1
IdxBizFanWarningRecordController.java
...xiop/biz/controller/IdxBizFanWarningRecordController.java
+78
-0
application.properties
...boot-system-kgd/src/main/resources/application.properties
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-kgd-api/src/main/java/com/yeejoin/amos/kgd/config/SocketConfig.java
View file @
d6f52bfc
...
...
@@ -26,7 +26,7 @@ public class SocketConfig {
@Value
(
"${amos.system.socket.port}"
)
private
Integer
port
;
@Value
(
"${amos.system.
socket.hostAndPort
}"
)
@Value
(
"${amos.system.
maas.url
}"
)
private
String
hostAndPort
;
private
static
final
ThreadPoolExecutor
threadpool
=
new
ThreadPoolExecutor
(
15
,
15
,
...
...
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 @
d6f52bfc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRuleSet
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRecordServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleSetServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.beanutils.BeanMap
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -14,7 +23,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
*
...
...
@@ -30,6 +41,9 @@ public class IdxBizFanWarningRecordController extends BaseController {
@Autowired
IdxBizFanWarningRecordServiceImpl
idxBizFanWarningRecordServiceImpl
;
@Autowired
IdxBizFanWarningRuleSetServiceImpl
idxBizFanWarningRuleSetService
;
/**
* 新增
*
...
...
@@ -112,4 +126,68 @@ public class IdxBizFanWarningRecordController extends BaseController {
public
ResponseModel
<
List
<
IdxBizFanWarningRecordDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
idxBizFanWarningRecordServiceImpl
.
queryForIdxBizFanWarningRecordList
());
}
/**
* 根据sequenceNbr查询
*
* @param ANALYSISPOINTID 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getInfoByPointId"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据ANALYSIS_POINT_ID查询单个"
,
notes
=
"根据ANALYSIS_POINT_ID查询单个"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getInfoByPointId
(
@RequestParam
String
ANALYSISPOINTID
)
{
LambdaQueryWrapper
<
IdxBizFanWarningRuleSet
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanWarningRuleSet:
:
getAnalysisPointId
,
ANALYSISPOINTID
);
List
<
IdxBizFanWarningRuleSet
>
idxBizFanWarningRecordList
=
idxBizFanWarningRuleSetService
.
getBaseMapper
().
selectList
(
query
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
idxBizFanWarningRecordList
.
size
();
i
++)
{
IdxBizFanWarningRuleSet
idxBizFanWarningRecord
=
idxBizFanWarningRecordList
.
get
(
i
);
if
(
idxBizFanWarningRecord
.
getWarningName
().
equals
(
"注意"
)){
map
.
putAll
(
BeanUtil
.
beanToMap
(
idxBizFanWarningRecord
));
}
else
if
(
idxBizFanWarningRecord
.
getWarningName
().
equals
(
"警告"
)){
//警告周期
map
.
put
(
"jgWarningCycle"
,
idxBizFanWarningRecord
.
getWarningCycle
());
map
.
put
(
"jgWarningIf"
,
idxBizFanWarningRecord
.
getWarningIf
());
}
else
if
(
idxBizFanWarningRecord
.
getWarningName
().
equals
(
"危险"
)){
//警告周期
map
.
put
(
"wxWarningCycle"
,
idxBizFanWarningRecord
.
getWarningCycle
());
map
.
put
(
"wxWarningIf"
,
idxBizFanWarningRecord
.
getWarningIf
());
}
}
return
ResponseHelper
.
buildResponse
(
map
);
}
/**
* 根据pointId修改信息
*
* @param analysisInfo 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/updateByPointInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据pointId修改信息"
,
notes
=
"根据pointId修改信息"
)
public
ResponseModel
<
Boolean
>
updateByPointInfo
(
@RequestBody
JSONObject
analysisInfo
)
{
LambdaQueryWrapper
<
IdxBizFanWarningRuleSet
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanWarningRuleSet:
:
getAnalysisPointId
,
analysisInfo
.
get
(
"analysisPointId"
));
List
<
IdxBizFanWarningRuleSet
>
idxBizFanWarningRecordList
=
idxBizFanWarningRuleSetService
.
getBaseMapper
().
selectList
(
query
);
for
(
IdxBizFanWarningRuleSet
idxBizFanWarningRuleSet
:
idxBizFanWarningRecordList
)
{
BeanUtil
.
copyProperties
(
analysisInfo
,
idxBizFanWarningRuleSet
,
"sequenceNbr"
,
"warningName"
);
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
);
}
}
amos-boot-system-kgd/src/main/resources/application.properties
View file @
d6f52bfc
...
...
@@ -56,8 +56,8 @@ spring.http.encoding.enabled=true
spring.http.encoding.force
=
true
amos.system.socket.hostAndPort
=
172.16.3.221:10005
amos.system.socket.port
=
7777
amos.system.maas.url
=
172.16.3.221:10005
amos.system.user.user-name
=
kgd_gdd
amos.system.user.password
=
a1234560
amos.system.user.app-key
=
AMOS_STUDIO
...
...
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