Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
e003c2b7
提交
e003c2b7
authored
2月 10, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(装备模块): 装备可以进行修改型号
装备可以进行修改型号
上级
d54ea284
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
98 行增加
和
7 行删除
+98
-7
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+40
-7
DeviceLibraryUpdateVo.java
.../dev/device/library/subject/vo/DeviceLibraryUpdateVo.java
+3
-0
PackingVo.java
...ava/com/tykj/dev/device/library/subject/vo/PackingVo.java
+55
-0
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
e003c2b7
...
@@ -722,6 +722,7 @@ public class DeviceLibraryController {
...
@@ -722,6 +722,7 @@ public class DeviceLibraryController {
@CacheEvict
(
value
=
"devicesLibraryList"
,
key
=
"'device'"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"devicesLibraryList"
,
key
=
"'device'"
,
allEntries
=
true
)
public
ResponseEntity
updateDeviceLibrary
(
@RequestBody
@Validated
DeviceEditVo
deviceEditVo
)
{
public
ResponseEntity
updateDeviceLibrary
(
@RequestBody
@Validated
DeviceEditVo
deviceEditVo
)
{
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
deviceEditVo
.
getDeviceId
());
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
deviceEditVo
.
getDeviceId
());
deviceLibraryEntity
.
setConfigName
();
//更新装备信息
//更新装备信息
if
(
deviceEditVo
.
getUpdateVoList
()
!=
null
)
{
if
(
deviceEditVo
.
getUpdateVoList
()
!=
null
)
{
DeviceLibraryUpdateVo
libraryUpdateVo
=
deviceEditVo
.
getUpdateVoList
();
DeviceLibraryUpdateVo
libraryUpdateVo
=
deviceEditVo
.
getUpdateVoList
();
...
@@ -752,13 +753,15 @@ public class DeviceLibraryController {
...
@@ -752,13 +753,15 @@ public class DeviceLibraryController {
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setMatchingRange
(
libraryUpdateVo
.
getMatchingRange
());
deviceLibraryEntity
.
setMatchingRange
(
libraryUpdateVo
.
getMatchingRange
());
}
}
if
(
libraryUpdateVo
.
getModel
()
!=
null
&&
!
libraryUpdateVo
.
getModel
().
equals
(
deviceLibraryEntity
.
getModel
()))
{
// if (libraryUpdateVo.getModel() != null && !libraryUpdateVo.getModel().equals(deviceLibraryEntity.getModel())) {
//添加装备日志
// //添加装备日志
String
remark
=
"将装备的型号由"
+
deviceLibraryEntity
.
getModel
()
+
"改为"
+
libraryUpdateVo
.
getModel
();
// //修改型号就要修改列装id
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
remark
,
null
,
null
,
null
);
// String remark = "将装备的型号由" + deviceLibraryEntity.getModel() + "改为" + libraryUpdateVo.getModel();
deviceLogService
.
addLog
(
deviceLogDto
);
// DeviceLogDto deviceLogDto = new DeviceLogDto(deviceEditVo.getDeviceId(), remark, null,null,null);
deviceLibraryEntity
.
setModel
(
libraryUpdateVo
.
getModel
());
// deviceLogService.addLog(deviceLogDto);
}
// deviceLibraryEntity.setModel(libraryUpdateVo.getModel());
// }
if
(
libraryUpdateVo
.
getName
()
!=
null
&&
!
libraryUpdateVo
.
getName
().
equals
(
deviceLibraryEntity
.
getName
()))
{
if
(
libraryUpdateVo
.
getName
()
!=
null
&&
!
libraryUpdateVo
.
getName
().
equals
(
deviceLibraryEntity
.
getName
()))
{
//添加装备日志
//添加装备日志
String
remark
=
"将装备的名称由"
+
deviceLibraryEntity
.
getName
()
+
"改为"
+
libraryUpdateVo
.
getName
();
String
remark
=
"将装备的名称由"
+
deviceLibraryEntity
.
getName
()
+
"改为"
+
libraryUpdateVo
.
getName
();
...
@@ -838,6 +841,36 @@ public class DeviceLibraryController {
...
@@ -838,6 +841,36 @@ public class DeviceLibraryController {
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLibraryEntity
.
setTryOutDevice
(
libraryUpdateVo
.
getTryOutDevice
());
deviceLibraryEntity
.
setTryOutDevice
(
libraryUpdateVo
.
getTryOutDevice
());
}
}
if
(
libraryUpdateVo
.
getPackingVo
().
getPackingId
()
!=
null
&&
!
libraryUpdateVo
.
getPackingVo
().
getPackingId
().
equals
(
deviceLibraryEntity
.
getPackingId
()))
{
//添加装备日志
//修改型号就要修改列装id
PackingVo
packingVo
=
libraryUpdateVo
.
getPackingVo
();
String
remarkModel
=
"将装备的型号由"
+
deviceLibraryEntity
.
getModel
()
+
"改为"
+
packingVo
.
getModel
();
String
remarkType
=
""
;
String
remarkName
=
""
;
String
remarkMatchingRange
=
""
;
deviceLibraryEntity
.
setModel
(
packingVo
.
getModel
());
deviceLibraryEntity
.
setPackingId
(
packingVo
.
getPackingId
());
if
(!
deviceLibraryEntity
.
getName
().
equals
(
packingVo
.
getName
())){
remarkName
=
"将装备的名称由"
+
deviceLibraryEntity
.
getName
()
+
"改为"
+
packingVo
.
getName
();
deviceLibraryEntity
.
setName
(
packingVo
.
getName
());
}
//修改形态
if
(!
deviceLibraryEntity
.
getType
().
equals
(
packingVo
.
getType
())){
remarkType
=
"将装备的形态由"
+
deviceLibraryEntity
.
getTypeName
()
+
"改为"
+
packingVo
.
getTypeName
();
deviceLibraryEntity
.
setType
(
packingVo
.
getType
());
}
//修改配用范围
if
(!
deviceLibraryEntity
.
getMatchingRange
().
equals
(
packingVo
.
getMatchingRange
())){
remarkMatchingRange
=
"将装备的配用范围由"
+
deviceLibraryEntity
.
getMatchingRangeName
()
+
"改为"
+
packingVo
.
getMatchingRangeName
();
deviceLibraryEntity
.
setMatchingRange
(
packingVo
.
getMatchingRange
());
}
String
lastRemark
=
(
remarkModel
+
remarkType
+
remarkName
+
remarkMatchingRange
).
replaceAll
(
"\\\""
,
""
);
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
deviceEditVo
.
getDeviceId
(),
lastRemark
,
null
,
null
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
}
deviceLibraryService
.
update
(
deviceLibraryEntity
);
deviceLibraryService
.
update
(
deviceLibraryEntity
);
}
}
//添加绑定配件
//添加绑定配件
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceLibraryUpdateVo.java
浏览文件 @
e003c2b7
...
@@ -57,5 +57,8 @@ public class DeviceLibraryUpdateVo {
...
@@ -57,5 +57,8 @@ public class DeviceLibraryUpdateVo {
@ApiModelProperty
(
value
=
"是否是试用装备"
,
notes
=
"0 是正式 1 是测试"
)
@ApiModelProperty
(
value
=
"是否是试用装备"
,
notes
=
"0 是正式 1 是测试"
)
private
Integer
tryOutDevice
=
0
;
private
Integer
tryOutDevice
=
0
;
@ApiModelProperty
(
value
=
"列装vo"
)
private
PackingVo
packingVo
;
}
}
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/PackingVo.java
0 → 100644
浏览文件 @
e003c2b7
package
com
.
tykj
.
dev
.
device
.
library
.
subject
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author zsp
* @create 2022/1/26 10:41
*/
@Data
@ApiModel
(
"列装库vo"
)
public
class
PackingVo
{
@ApiModelProperty
(
value
=
"列装的id"
)
private
Integer
packingId
;
/**
* 型号
*/
@ApiModelProperty
(
value
=
"型号"
)
private
String
model
;
/**
* 名称
*/
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
/**
* 配用范围
*/
@ApiModelProperty
(
value
=
"配用范围"
,
notes
=
"1 省以下纵向 2 中央到省 3 省以下横向 4 其他"
)
private
Integer
matchingRange
;
/**
* 配用范围
*/
@ApiModelProperty
(
value
=
"配用范围"
,
notes
=
"省以下纵向 中央到省 省以下横向 其他"
)
private
String
matchingRangeName
;
/**
* 形态
*/
@ApiModelProperty
(
value
=
"形态"
)
private
Integer
type
;
/**
* 形态
*/
@ApiModelProperty
(
value
=
"形态"
)
private
String
typeName
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论