Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
03db68f2
Commit
03db68f2
authored
Apr 21, 2022
by
tianbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
1ced89e5
a858c20c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
11 deletions
+66
-11
MsgLogDto.java
...a/com/yeejoin/amos/boot/module/tzs/api/dto/MsgLogDto.java
+11
-4
MsgLog.java
...a/com/yeejoin/amos/boot/module/tzs/api/entity/MsgLog.java
+13
-0
EarlyWarningLevelEnum.java
...amos/boot/module/tzs/api/enums/EarlyWarningLevelEnum.java
+6
-3
TerminalTypeEnum.java
...join/amos/boot/module/tzs/api/enums/TerminalTypeEnum.java
+20
-0
CylinderInfoDto.java
...oin/amos/boot/module/tzs/flc/api/dto/CylinderInfoDto.java
+2
-0
CylinderInfoController.java
...module/tzs/flc/biz/controller/CylinderInfoController.java
+4
-2
CylinderInfoServiceImpl.java
...ule/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
+10
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/MsgLogDto.java
View file @
03db68f2
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
...
...
@@ -15,10 +16,10 @@ import java.util.Date;
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"MsgLogDto"
,
description
=
"消息流水表"
)
public
class
MsgLogDto
extends
BaseDto
{
@ApiModel
(
value
=
"MsgLogDto"
,
description
=
"消息流水表"
)
public
class
MsgLogDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"关联编号"
)
...
...
@@ -27,6 +28,9 @@ public class MsgLogDto extends BaseDto {
@ApiModelProperty
(
value
=
"消息类型(超期预警、许可超期、风险预警)"
)
private
String
msgType
;
@ApiModelProperty
(
value
=
"消息类型名称"
)
private
String
msgTypeName
;
@ApiModelProperty
(
value
=
"消息内容"
)
private
String
body
;
...
...
@@ -39,4 +43,7 @@ public class MsgLogDto extends BaseDto {
@ApiModelProperty
(
value
=
"发送日期"
)
private
Date
sendTime
;
@ApiModelProperty
(
value
=
"站端类型: WEB,APP"
)
private
String
terminalType
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/MsgLog.java
View file @
03db68f2
...
...
@@ -6,6 +6,8 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
javax.naming.ldap.PagedResultsControl
;
import
java.util.Date
;
/**
...
...
@@ -35,6 +37,11 @@ public class MsgLog extends BaseEntity {
private
String
msgType
;
/**
* 消息类型名称
*/
private
String
msgTypeName
;
/**
* 消息内容
*/
@TableField
(
"body"
)
...
...
@@ -58,4 +65,10 @@ public class MsgLog extends BaseEntity {
@TableField
(
"send_time"
)
private
Date
sendTime
;
/**
* 站端类型: WEB,APP
*/
private
String
terminalType
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/enums/EarlyWarningLevelEnum.java
View file @
03db68f2
...
...
@@ -15,10 +15,11 @@ import java.util.Optional;
public
enum
EarlyWarningLevelEnum
{
/**
* 预警等级枚举
*
*/
FIRST_LEVEL
(
"一级预警"
,
"1"
,
"即将超期
"
),
SECOND_LEVEL
(
"二级预警"
,
"2"
,
"即将超期
"
),
THREE_LEVEL
(
"三级预警"
,
"3"
,
"已超期
"
);
EARLY_WARNING_FIRST_LEVEL
(
"一级预警"
,
"1"
,
"即将超期"
,
"earlyWarning_firstLevel
"
),
EARLY_WARNING_SECOND_LEVEL
(
"二级预警"
,
"2"
,
"即将超期"
,
"earlyWarning_secondLevel
"
),
EARLY_WARNING_THREE_LEVEL
(
"三级预警"
,
"3"
,
"已超期"
,
"earlyWarning_threeLevel
"
);
private
String
name
;
...
...
@@ -26,6 +27,8 @@ public enum EarlyWarningLevelEnum {
private
String
status
;
private
String
code
;
public
static
EarlyWarningLevelEnum
getEumByLevel
(
String
level
)
{
Optional
<
EarlyWarningLevelEnum
>
op
=
Arrays
.
stream
(
EarlyWarningLevelEnum
.
values
()).
filter
(
e
->
e
.
getLevel
().
equals
(
level
)).
findFirst
();
return
op
.
orElseThrow
(()
->
new
RuntimeException
(
"未知的类型"
));
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/enums/TerminalTypeEnum.java
0 → 100644
View file @
03db68f2
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* @author DELL
*/
@AllArgsConstructor
@Getter
public
enum
TerminalTypeEnum
{
/**
* 终端类型
*/
TERMINAL_TYPE_WEB
(
"WEB"
),
TERMINAL_TYPE_APP
(
"APP"
);
private
String
code
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/dto/CylinderInfoDto.java
View file @
03db68f2
...
...
@@ -122,4 +122,6 @@ public class CylinderInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"最近预警时间"
)
private
Date
earlyWarningLevelCalDate
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/CylinderInfoController.java
View file @
03db68f2
...
...
@@ -22,6 +22,7 @@ import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.elasticsearch.common.recycler.Recycler
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
...
@@ -888,8 +889,9 @@ public class CylinderInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"气瓶处置日志"
)
@GetMapping
(
value
=
"/msg/{sequenceCode}/list"
)
public
ResponseModel
<
List
<
MsgLog
>>
getMsgList
(
@PathVariable
String
sequenceCode
){
return
ResponseHelper
.
buildResponse
(
cylinderInfoServiceImpl
.
getMsgList
(
sequenceCode
));
public
ResponseModel
<
List
<
MsgLog
>>
getMsgList
(
@PathVariable
String
sequenceCode
,
@RequestParam
(
value
=
"terminalType"
,
required
=
false
)
String
terminalType
){
return
ResponseHelper
.
buildResponse
(
cylinderInfoServiceImpl
.
getMsgList
(
sequenceCode
,
terminalType
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
View file @
03db68f2
...
...
@@ -12,8 +12,10 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.dto.*;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.*
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.mapper.CylinderInfoMapper
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.service.ICylinderInfoService
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
...
...
@@ -88,6 +90,9 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
@Autowired
MsgLogServiceImpl
msgLogService
;
@Autowired
private
RuleTrigger
ruleTrigger
;
/**
* 分页查询
*/
...
...
@@ -599,7 +604,8 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
result
.
getRecords
().
forEach
(
r
->
{
try
{
int
interval
=
DateUtils
.
dateBetweenIncludeToday
(
r
.
getNextInspectionDate
(),
now
);
// TODO 循环调用规则 触发计算等级及发送消息
// TODO 循环调用规则 触发计算等级
// ruleTrigger.publish(equipmentInputItemRo, packageld, null);
}
catch
(
ParseException
e
)
{
log
.
error
(
JSON
.
toJSONString
(
r
)
+
"格式化失败"
);
}
...
...
@@ -615,9 +621,10 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
return
this
.
baseMapper
.
getDetail
(
sequenceCode
);
}
public
List
<
MsgLog
>
getMsgList
(
String
sequenceCode
)
{
public
List
<
MsgLog
>
getMsgList
(
String
sequenceCode
,
String
terminalType
)
{
LambdaQueryWrapper
<
MsgLog
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
MsgLog:
:
getRelationCode
,
sequenceCode
);
wrapper
.
eq
(
StringUtils
.
isNotEmpty
(
terminalType
),
MsgLog:
:
getTerminalType
,
terminalType
);
wrapper
.
orderByDesc
(
MsgLog:
:
getSendTime
);
return
msgLogService
.
list
(
wrapper
);
}
...
...
@@ -637,6 +644,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
cylinderInfo
.
setNextInspectionDate
(
c
.
getNextInspectionDate
());
cylinderInfos
.
add
(
cylinderInfo
);
// TODO 循环调用规则 触发计算等级及发送消息
// ruleTrigger.publish(equipmentInputItemRo, packageld, null);
});
if
(!
cylinderInfos
.
isEmpty
()){
this
.
updateBatchById
(
cylinderInfos
);
...
...
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