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
88318956
Commit
88318956
authored
Dec 09, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bnug
parent
bccdd858
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
4 deletions
+35
-4
PressurePumpEnum.java
...om/yeejoin/equipmanage/common/enums/PressurePumpEnum.java
+7
-1
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+17
-1
InputItemController.java
.../amos/patrol/business/controller/InputItemController.java
+11
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/PressurePumpEnum.java
View file @
88318956
package
com
.
yeejoin
.
equipmanage
.
common
.
enums
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
enum
PressurePumpEnum
{
ALONE_START_YXSC
(
"FHS_PressurePump_Start_ALONE_START_YXSC"
,
""
,
new
Date
().
getSeconds
()
+
" "
+
new
Date
().
getMinutes
()
+
"/5 * * * ?"
,
"5"
,
ALONE_START_YXSC
(
"FHS_PressurePump_Start_ALONE_START_YXSC"
,
""
,
LocalDateTime
.
now
().
getSecond
()
+
" "
+
(
LocalDateTime
.
now
().
getMinute
())
+
"/5 * * * ?"
,
"5"
,
PressurePumpValueEnum
.
PUMP_START_TIME
.
getCode
(),
PressurePumpMessageEnum
.
MESSAGE_LEVEL_QT_WJ_YXSC
.
getCode
(),
"【5】分钟"
),
ALONE_START_QT
(
"FHS_PressurePump_Start_ALONE_START_QT"
,
PressurePumpCheckEnum
.
LE
.
getCode
(),
""
,
"5"
,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
88318956
...
...
@@ -49,6 +49,7 @@ import java.math.BigInteger;
import
java.math.RoundingMode
;
import
java.nio.charset.StandardCharsets
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -1595,8 +1596,23 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
private
void
startTimeCompute
(
String
indexKey
,
TopicEntityVo
topicEntity
,
PressurePumpEnum
pressurePumpEnum
)
{
String
jobName
=
topicEntity
.
getIotCode
()+
"_"
+
indexKey
;
String
cron
=
""
;
String
triggerName
=
PUMP_TRIGGER_NAME
+
"-"
+
topicEntity
.
getIotCode
();
String
cron
=
pressurePumpEnum
.
getLeftValue
();
if
(
"FHS_PressurePump_Start_ALONE_START_YXSC"
.
equals
(
pressurePumpEnum
.
getCode
())){
Calendar
time
=
Calendar
.
getInstance
();
time
.
add
(
Calendar
.
MINUTE
,
5
);
cron
=
time
.
get
(
Calendar
.
SECOND
)
+
" "
+
time
.
get
(
Calendar
.
MINUTE
)
+
"/5 * * * ?"
;
}
else
{
cron
=
pressurePumpEnum
.
getLeftValue
();
}
EquipmentSpecific
equipmentSpecific
=
null
;
try
{
LambdaQueryWrapper
<
EquipmentSpecific
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/InputItemController.java
View file @
88318956
...
...
@@ -552,10 +552,19 @@ public class InputItemController extends AbstractBaseController {
@RequestMapping
(
value
=
"/addItemNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
addNewItemNew
(
@ApiParam
(
value
=
"检查项信息"
)
@RequestBody
InputItemParam
param
)
{
if
(
param
.
getEquipmentType
()
==
null
&&
param
.
getCustomType
()
==
null
&&
param
.
getFacilitiesType
()
==
null
&&
param
.
getKeyPartsType
()
==
null
){
throw
new
BadRequest
(
"适用类型至少需选择一项"
);
if
(
param
.
getId
()>
0
){
if
(
param
.
getEquipmentType
()==
null
&&
param
.
getCustomType
()==
null
&&
param
.
getFacilitiesType
()
==
null
&&
param
.
getKeyPartsType
()
==
null
){
throw
new
BadRequest
(
"适用类型至少需选择一项"
);
}
}
else
{
if
(
"1"
.
equals
(
param
.
getEquipmentType
())
&&
"1"
.
equals
(
param
.
getCustomType
())
&&
param
.
getFacilitiesType
()
==
null
&&
param
.
getKeyPartsType
()
==
null
){
throw
new
BadRequest
(
"适用类型至少需选择一项"
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
inputItemDao
.
findByItemNo
(
param
.
getItemNo
(),
param
.
getId
()
!=
0
?
String
.
valueOf
(
param
.
getId
())
:
null
)))
{
throw
new
BadRequest
(
"该编号已存在,请重新输入"
);
}
...
...
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