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
2259e2ec
Commit
2259e2ec
authored
Jul 15, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开关图片地址接口
parent
6d74c814
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
4 deletions
+85
-4
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+12
-0
SwitchPicture.java
...join/amos/boot/module/jxiop/biz/entity/SwitchPicture.java
+27
-0
SwitchPictureMapper.java
...os/boot/module/jxiop/biz/mapper2/SwitchPictureMapper.java
+8
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+22
-4
SwitchPictureMapper.xml
...src/main/resources/mapper/cluster/SwitchPictureMapper.xml
+16
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
2259e2ec
...
...
@@ -423,4 +423,16 @@ public class MonitorFanIdxController extends BaseController {
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"开关图片API"
)
@GetMapping
(
"/switchUrl"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getElectricQuantityList
(
@RequestParam
(
value
=
"stationId"
)
String
stationId
,
@RequestParam
(
value
=
"equipName"
)
String
equipName
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
gatewayId
=
stationBasic
.
getBoosterGatewayId
();
return
ResponseHelper
.
buildResponse
(
monitorFanIndicatorImpl
.
getSwitchUrl
(
gatewayId
,
equipName
));
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/SwitchPicture.java
0 → 100644
View file @
2259e2ec
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"switch_picture_url"
)
public
class
SwitchPicture
{
@TableField
(
value
=
"sequence_nbr"
)
public
long
sequenceNumber
;
@TableField
(
value
=
"station_id"
)
public
String
stationId
;
@TableField
(
value
=
"switch_num"
)
public
String
switchNum
;
@TableField
(
value
=
"on_url"
)
public
String
onUrl
;
@TableField
(
value
=
"off_url"
)
public
String
offUrl
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/SwitchPictureMapper.java
0 → 100644
View file @
2259e2ec
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.SwitchPicture
;
public
interface
SwitchPictureMapper
extends
BaseMapper
<
SwitchPicture
>
{
SwitchPicture
getSwitchUrl
(
String
stationId
,
String
switchNum
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
2259e2ec
...
...
@@ -19,11 +19,9 @@ import com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.AlarmEvent
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.SjglZsjZsbtz
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TemporaryData
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.TpriDmpDatabook
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.AlarmEventMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SwitchPictureMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SystemEnumMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.TemporaryDataMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils
;
...
...
@@ -68,6 +66,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
@Autowired
SystemEnumMapper
systemEnumMapper
;
@Autowired
SwitchPictureMapper
switchPictureMapper
;
@Autowired
SjglZsjZsbtzServiceImpl
sjglZsjZsbtzServiceImpl
;
...
...
@@ -973,5 +973,23 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
}
}
public
Map
<
String
,
Object
>
getSwitchUrl
(
String
gatewayId
,
String
equipName
){
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" WHERE systemType = '开关' and frontModule =~ /"
+
equipName
+
"/ and displayName =~/合位$/"
;
List
<
IndicatorsDto
>
listData
=
influxDButils
.
getListData
(
sql
,
IndicatorsDto
.
class
);
Map
<
String
,
Object
>
photoUrls
=
new
HashMap
<>();
for
(
IndicatorsDto
listDatum
:
listData
)
{
String
url
=
""
;
SwitchPicture
switchUrl
=
switchPictureMapper
.
getSwitchUrl
(
gatewayId
,
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]);
if
(
listDatum
.
getValue
().
equals
(
"true"
)){
url
=
switchUrl
.
getOnUrl
();
}
else
{
url
=
switchUrl
.
getOffUrl
();
}
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"url"
,
url
);
}
return
photoUrls
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/cluster/SwitchPictureMapper.xml
0 → 100644
View file @
2259e2ec
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SwitchPictureMapper"
>
<select
id=
"getSwitchUrl"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.SwitchPicture"
>
select
*
from
switch_picture_url
where
station_id = #{stationId} and switch_num = #{switchNum}
</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