Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
new-nms
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
Administrator
new-nms
Commits
910b156e
Commit
910b156e
authored
Feb 15, 2022
by
鲁鸿波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
维护管理调整
parent
b3639208
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
16 deletions
+66
-16
MmsAlarmController.java
...in/java/com/hongxinhui/controller/MmsAlarmController.java
+1
-1
MmsAlarm.java
newnms/src/main/java/com/hongxinhui/entity/MmsAlarm.java
+54
-8
MmsAlarmMapper.java
...s/src/main/java/com/hongxinhui/mapper/MmsAlarmMapper.java
+1
-1
MmsAlarmPageParam.java
...src/main/java/com/hongxinhui/param/MmsAlarmPageParam.java
+1
-1
MmsAlarmService.java
...src/main/java/com/hongxinhui/service/MmsAlarmService.java
+1
-1
MmsAlarmServiceImpl.java
...java/com/hongxinhui/service/impl/MmsAlarmServiceImpl.java
+6
-4
CommonAttributeSet.java
...rc/main/java/com/hongxinhui/utils/CommonAttributeSet.java
+2
-0
No files found.
newnms/src/main/java/com/hongxinhui/controller/MmsAlarmController.java
View file @
910b156e
...
...
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.*;
* 设备告警参数限制 控制器
*
* @author cyz
* @since 2022-02-1
4
* @since 2022-02-1
5
*/
@Slf4j
@RestController
...
...
newnms/src/main/java/com/hongxinhui/entity/MmsAlarm.java
View file @
910b156e
package
com
.
hongxinhui
.
entity
;
import
java.math.BigDecimal
;
import
io.geekidea.springbootplus.framework.common.entity.BaseEntity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
java.util.Date
;
...
...
@@ -21,7 +22,7 @@ import io.geekidea.springbootplus.framework.core.validator.groups.Update;
* 设备告警参数限制
*
* @author cyz
* @since 2022-02-1
4
* @since 2022-02-1
5
*/
@Data
@Accessors
(
chain
=
true
)
...
...
@@ -30,7 +31,7 @@ import io.geekidea.springbootplus.framework.core.validator.groups.Update;
public
class
MmsAlarm
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
message
=
"
不能为空"
)
@NotNull
(
message
=
"
id不能为空"
,
groups
=
{
Update
.
class
}
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
...
...
@@ -43,17 +44,17 @@ public class MmsAlarm extends BaseEntity {
@TableField
(
"modelId"
)
private
Long
modelId
;
@Not
Blank
(
message
=
"一般告警门限不能为空"
)
@Not
Null
(
message
=
"一般告警门限不能为空"
)
@ApiModelProperty
(
"一般告警门限"
)
private
String
general
;
private
BigDecimal
general
;
@Not
Blank
(
message
=
"重要告警门限不能为空"
)
@Not
Null
(
message
=
"重要告警门限不能为空"
)
@ApiModelProperty
(
"重要告警门限"
)
private
String
importance
;
private
BigDecimal
importance
;
@Not
Blank
(
message
=
"紧急告警门限不能为空"
)
@Not
Null
(
message
=
"紧急告警门限不能为空"
)
@ApiModelProperty
(
"紧急告警门限"
)
private
String
urgency
;
private
BigDecimal
urgency
;
@NotNull
(
message
=
"是否删除(0: 未删除, 1: 已删除)不能为空"
)
@ApiModelProperty
(
"是否删除(0: 未删除, 1: 已删除)"
)
...
...
@@ -84,4 +85,49 @@ public class MmsAlarm extends BaseEntity {
private
Date
updateTime
;
public
enum
FieldEnum
implements
BaseEnum
{
model
(
"model"
,
"漏缆型号"
),
modelId
(
"modelId"
,
"漏缆型号id"
),
general
(
"general"
,
"一般告警门限"
),
importance
(
"importance"
,
"重要告警门限"
),
urgency
(
"urgency"
,
"紧急告警门限"
),
deleted
(
"deleted"
,
"是否删除(0: 未删除, 1: 已删除)"
),
deletedBy
(
"deletedBy"
,
"删除者"
),
deletedTime
(
"deletedTime"
,
"删除时间"
),
createBy
(
"createBy"
,
"创建者"
),
createTime
(
"createTime"
,
"创建时间"
),
updateBy
(
"updateBy"
,
"更新者"
),
updateTime
(
"updateTime"
,
"更新时间"
),
id
(
"id"
,
"编号"
);
/**
* name
*/
@Getter
private
final
String
name
;
/**
* desc
*/
@Getter
private
final
String
desc
;
FieldEnum
(
String
name
,
String
desc
)
{
this
.
name
=
name
;
this
.
desc
=
desc
;
}
@Override
public
Integer
getCode
()
{
return
null
;
}
@Override
public
String
getDesc
()
{
return
null
;
}
}
}
newnms/src/main/java/com/hongxinhui/mapper/MmsAlarmMapper.java
View file @
910b156e
...
...
@@ -15,7 +15,7 @@ import java.io.Serializable;
* 设备告警参数限制 Mapper 接口
*
* @author cyz
* @since 2022-02-1
4
* @since 2022-02-1
5
*/
@Repository
public
interface
MmsAlarmMapper
extends
BaseMapper
<
MmsAlarm
>
{
...
...
newnms/src/main/java/com/hongxinhui/param/MmsAlarmPageParam.java
View file @
910b156e
...
...
@@ -12,7 +12,7 @@ import io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam;
* </pre>
*
* @author cyz
* @date 2022-02-1
4
* @date 2022-02-1
5
*/
@Data
@Accessors
(
chain
=
true
)
...
...
newnms/src/main/java/com/hongxinhui/service/MmsAlarmService.java
View file @
910b156e
...
...
@@ -9,7 +9,7 @@ import io.geekidea.springbootplus.framework.core.pagination.Paging;
* 设备告警参数限制 服务类
*
* @author cyz
* @since 2022-02-1
4
* @since 2022-02-1
5
*/
public
interface
MmsAlarmService
extends
BaseService
<
MmsAlarm
>
{
...
...
newnms/src/main/java/com/hongxinhui/service/impl/MmsAlarmServiceImpl.java
View file @
910b156e
...
...
@@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
* 设备告警参数限制 服务实现类
*
* @author cyz
* @since 2022-02-1
4
* @since 2022-02-1
5
*/
@Slf4j
@Service
...
...
@@ -36,8 +36,9 @@ public class MmsAlarmServiceImpl extends BaseServiceImpl<MmsAlarmMapper, MmsAlar
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
saveMmsAlarm
(
MmsAlarm
mmsAlarm
)
throws
Exception
{
//前端传或者应该获取漏缆型号(如果获取的对象信息较多的话需要建立表,否则在字典表中加数据)
//前端传或者应该获取漏缆型号
信息
(如果获取的对象信息较多的话需要建立表,否则在字典表中加数据)
//一些公用的属性赋值(删除状态,创建人,创建时间)
CommonAttributeSet
commonAttributeSet
=
new
CommonAttributeSet
().
builderInsert
();
BeanUtils
.
copyProperties
(
commonAttributeSet
,
mmsAlarm
);
return
super
.
save
(
mmsAlarm
);
...
...
@@ -46,6 +47,8 @@ public class MmsAlarmServiceImpl extends BaseServiceImpl<MmsAlarmMapper, MmsAlar
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
updateMmsAlarm
(
MmsAlarm
mmsAlarm
)
throws
Exception
{
//前端传或者应该获取漏缆型号信息(如果获取的对象信息较多的话需要建立表,否则在字典表中加数据)
//一些公用的属性赋值(修改人,修改时间)
BeanUtils
.
copyProperties
(
new
CommonAttributeSet
().
builderUpdate
(),
mmsAlarm
);
return
super
.
updateById
(
mmsAlarm
);
...
...
@@ -54,8 +57,7 @@ public class MmsAlarmServiceImpl extends BaseServiceImpl<MmsAlarmMapper, MmsAlar
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
deleteMmsAlarm
(
Long
id
)
throws
Exception
{
//删除设备告警参数限制时是否同步删除包含使用到它的地方信息
//删除设备本身维护数据时是否同步删除包含使用到它的地方信息
MmsAlarm
mmsAlarm
=
mmsAlarmMapper
.
selectById
(
id
);
//一些公用的属性赋值(删除标识,删除人,删除时间)
BeanUtils
.
copyProperties
(
new
CommonAttributeSet
().
builderDeleted
(),
mmsAlarm
);
...
...
newnms/src/main/java/com/hongxinhui/utils/CommonAttributeSet.java
View file @
910b156e
...
...
@@ -25,6 +25,7 @@ public class CommonAttributeSet extends BaseEntity {
private
Date
createTime
;
private
String
updateBy
;
private
Date
updateTime
;
private
Date
uploadTime
;
/**
* 当前登陆用户
...
...
@@ -47,6 +48,7 @@ public class CommonAttributeSet extends BaseEntity {
CommonAttributeSet
commonAttributeSet
=
new
CommonAttributeSet
();
commonAttributeSet
.
setDeleted
(
CommonEnums
.
DELETED0
.
getCode
());
commonAttributeSet
.
setCreateTime
(
DateUtils
.
getNowDate
());
commonAttributeSet
.
setUploadTime
(
DateUtils
.
getNowDate
());
User
user
=
getUser
();
if
(
null
!=
user
)
{
...
...
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