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
2f4fdd5d
Commit
2f4fdd5d
authored
Mar 03, 2023
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:添加稳压泵启停状态图详情接口,及bug修改
parent
bc61b69b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
9 deletions
+46
-9
EmergencyController.java
...m/yeejoin/equipmanage/controller/EmergencyController.java
+20
-1
IEmergencyService.java
...va/com/yeejoin/equipmanage/service/IEmergencyService.java
+2
-0
IPressurePumpService.java
...com/yeejoin/equipmanage/service/IPressurePumpService.java
+7
-0
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+0
-0
PressurePumpServiceImpl.java
...oin/equipmanage/service/impl/PressurePumpServiceImpl.java
+15
-7
OrgUsrMapper.xml
...t-system-equip/src/main/resources/mapper/OrgUsrMapper.xml
+2
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EmergencyController.java
View file @
2f4fdd5d
...
@@ -577,7 +577,7 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -577,7 +577,7 @@ public class EmergencyController extends AbstractBaseController {
@PersonIdentify
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getPressurePumpStatusChart"
)
@GetMapping
(
value
=
"/getPressurePumpStatusChart"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"四横八纵-稳压泵启停状态图"
,
notes
=
"四横八纵-稳压泵启停状态图"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"四横八纵-稳压泵启停状态图"
,
notes
=
"四横八纵-稳压泵启停状态图
,取舍补点
"
)
public
ResponseModel
getPressurePumpStatusChart
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
,
public
ResponseModel
getPressurePumpStatusChart
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
...
@@ -595,6 +595,25 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -595,6 +595,25 @@ public class EmergencyController extends AbstractBaseController {
@PersonIdentify
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getPressurePumpStatusDetailChart"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"四横八纵-稳压泵启停状态图"
,
notes
=
"四横八纵-稳压泵启停状态图,分钟级补点"
)
public
ResponseModel
getPressurePumpStatusDetailChart
(
@RequestParam
String
startTime
,
@RequestParam
String
endTime
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
Collections
.
EMPTY_MAP
);
}
}
}
return
CommonResponseUtil
.
success
(
iEmergencyService
.
getPressurePumpStatusDetailChart
(
startTime
,
endTime
,
bizOrgCode
));
}
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getPressurePumpDiagnosticAnalysis"
)
@GetMapping
(
value
=
"/getPressurePumpDiagnosticAnalysis"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"四横八纵-稳压泵诊断分析"
,
notes
=
"四横八纵-稳压泵诊断分析"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"四横八纵-稳压泵诊断分析"
,
notes
=
"四横八纵-稳压泵诊断分析"
)
public
ResponseModel
getPressurePumpDiagnosticAnalysis
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
ResponseModel
getPressurePumpDiagnosticAnalysis
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEmergencyService.java
View file @
2f4fdd5d
...
@@ -57,6 +57,8 @@ public interface IEmergencyService {
...
@@ -57,6 +57,8 @@ public interface IEmergencyService {
Map
<
String
,
Object
>
getPressurePumpStatusChart
(
String
startTime
,
String
endTime
,
String
bizOrgCode
);
Map
<
String
,
Object
>
getPressurePumpStatusChart
(
String
startTime
,
String
endTime
,
String
bizOrgCode
);
Map
<
String
,
Object
>
getPressurePumpStatusDetailChart
(
String
startTime
,
String
endTime
,
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getPressurePumpDiagnosticAnalysis
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getPressurePumpDiagnosticAnalysis
(
String
bizOrgCode
);
Page
<
Map
<
String
,
Object
>>
alarmList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
,
List
<
String
>
types
,
List
<
String
>
emergencyLevels
,
String
name
,
Integer
cleanStatus
,
Integer
handleStatus
);
Page
<
Map
<
String
,
Object
>>
alarmList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
,
List
<
String
>
types
,
List
<
String
>
emergencyLevels
,
String
name
,
Integer
cleanStatus
,
Integer
handleStatus
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IPressurePumpService.java
View file @
2f4fdd5d
...
@@ -178,4 +178,11 @@ public interface IPressurePumpService {
...
@@ -178,4 +178,11 @@ public interface IPressurePumpService {
* @return
* @return
*/
*/
List
<
OrgUsrDto
>
getOrgUsrDtoInfo
(
Map
<
String
,
String
>
map
);
List
<
OrgUsrDto
>
getOrgUsrDtoInfo
(
Map
<
String
,
String
>
map
);
/**
* 获取公司顶级bizOrgCode
* @param bizOrgCode
* @return
*/
String
getCompanyBizOrgCode
(
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
2f4fdd5d
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/PressurePumpServiceImpl.java
View file @
2f4fdd5d
...
@@ -58,13 +58,8 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
...
@@ -58,13 +58,8 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
@Async
@Async
public
void
saveDataToRedis
(
List
<
IotDataVO
>
iotDatalist
,
String
iotCode
,
String
bizOrgCode
)
{
public
void
saveDataToRedis
(
List
<
IotDataVO
>
iotDatalist
,
String
iotCode
,
String
bizOrgCode
)
{
// 获取公司顶级bizOrgCode
// 获取公司顶级bizOrgCode
Map
<
String
,
String
>
params
=
new
HashMap
<>();
bizOrgCode
=
getCompanyBizOrgCode
(
bizOrgCode
);
params
.
put
(
"bizOrgType"
,
PressurePumpRelateEnum
.
BIZ_ORG_TYPE_COMPANY
.
getValue
());
if
(
StringUtils
.
isNotBlank
(
bizOrgCode
))
{
params
.
put
(
"bizOrgCode"
,
bizOrgCode
);
List
<
OrgUsrDto
>
orgUsrDtoList
=
getOrgUsrDtoInfo
(
params
);
if
(
CollectionUtils
.
isNotEmpty
(
orgUsrDtoList
))
{
bizOrgCode
=
orgUsrDtoList
.
get
(
0
).
getBizOrgCode
();
if
(
StringUtils
.
isNotBlank
(
bizOrgCode
))
{
String
pressurePumpValue
=
PressurePumpRelateEnum
.
PRESSURE_PUMP
.
getValue
();
String
pressurePumpValue
=
PressurePumpRelateEnum
.
PRESSURE_PUMP
.
getValue
();
// 获取配置JSON信息集合
// 获取配置JSON信息集合
List
<
Map
>
list
=
getNameKeyInfoList
(
pressurePumpValue
);
List
<
Map
>
list
=
getNameKeyInfoList
(
pressurePumpValue
);
...
@@ -84,6 +79,17 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
...
@@ -84,6 +79,17 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
}
}
}
}
}
}
@Override
public
String
getCompanyBizOrgCode
(
String
bizOrgCode
)
{
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"bizOrgType"
,
PressurePumpRelateEnum
.
BIZ_ORG_TYPE_COMPANY
.
getValue
());
params
.
put
(
"bizOrgCode"
,
bizOrgCode
);
List
<
OrgUsrDto
>
orgUsrDtoList
=
getOrgUsrDtoInfo
(
params
);
if
(
CollectionUtils
.
isNotEmpty
(
orgUsrDtoList
))
{
bizOrgCode
=
orgUsrDtoList
.
get
(
orgUsrDtoList
.
size
()
-
1
).
getBizOrgCode
();
}
return
bizOrgCode
;
}
}
@Override
@Override
...
@@ -303,6 +309,8 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
...
@@ -303,6 +309,8 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
PressurePumpCountVo
countVo
=
new
PressurePumpCountVo
();
PressurePumpCountVo
countVo
=
new
PressurePumpCountVo
();
countVo
.
setTime
(
time
);
countVo
.
setTime
(
time
);
countVo
.
setValue
(
dataMap
.
get
(
time
).
size
());
countVo
.
setValue
(
dataMap
.
get
(
time
).
size
());
// 获取公司顶级bizOrgCode
bizOrgCode
=
getCompanyBizOrgCode
(
bizOrgCode
);
// 获取的数据存储到redis
// 获取的数据存储到redis
String
topic
=
String
.
join
(
":"
,
infoCode
,
bizOrgCode
,
countRedisKey
,
fieldKey
,
iotCode
,
time
);
String
topic
=
String
.
join
(
":"
,
infoCode
,
bizOrgCode
,
countRedisKey
,
fieldKey
,
iotCode
,
time
);
countVo
.
setIotCode
(
topic
);
countVo
.
setIotCode
(
topic
);
...
...
amos-boot-system-equip/src/main/resources/mapper/OrgUsrMapper.xml
View file @
2f4fdd5d
...
@@ -64,8 +64,9 @@
...
@@ -64,8 +64,9 @@
biz_org_type = #{bizOrgType}
biz_org_type = #{bizOrgType}
</if>
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND locate(
#{bizOrgCode}, biz_org_code
) > 0
AND locate(
biz_org_code, #{bizOrgCode}
) > 0
</if>
</if>
</where>
</where>
ORDER BY sequence_nbr
</select>
</select>
</mapper>
</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