Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
865a701c
提交
865a701c
authored
10月 21, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(配套设备库): 修改无关联装备查看,做序列号的校验
修改无关联装备查看,做序列号的校验
上级
8eca049f
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
31 行增加
和
7 行删除
+31
-7
MatchingDeviceController.java
.../device/matching/controller/MatchingDeviceController.java
+18
-7
MatchingDeviceLibraryService.java
...device/matching/service/MatchingDeviceLibraryService.java
+6
-0
MatchingDeviceLibraryServiceImpl.java
...tching/service/impl/MatchingDeviceLibraryServiceImpl.java
+7
-0
没有找到文件。
dev-matching/src/main/java/com/tykj/dev/device/matching/controller/MatchingDeviceController.java
浏览文件 @
865a701c
...
@@ -32,6 +32,7 @@ import com.tykj.dev.device.user.subject.service.UserPublicService;
...
@@ -32,6 +32,7 @@ import com.tykj.dev.device.user.subject.service.UserPublicService;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.*
;
import
com.tykj.dev.misc.utils.*
;
import
com.tykj.dev.rfid.entity.vo.PrintVo
;
import
com.tykj.dev.rfid.entity.vo.PrintVo
;
import
com.tykj.dev.rfid.entity.vo.RfidPrintVo
;
import
com.tykj.dev.rfid.entity.vo.RfidPrintVo
;
...
@@ -214,7 +215,7 @@ public class MatchingDeviceController {
...
@@ -214,7 +215,7 @@ public class MatchingDeviceController {
matchingDeviceBillService
.
update
(
updateMatchingDeviceBill
);
matchingDeviceBillService
.
update
(
updateMatchingDeviceBill
);
//发送阅知信息
//发送阅知信息
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userId
);
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userId
);
MessageBto
messageBto
=
new
MessageBto
(
taskBto1
.
getId
(),
taskBto1
.
getBusinessType
(),
"
业务办结
"
,
ids
,
1
);
MessageBto
messageBto
=
new
MessageBto
(
taskBto1
.
getId
(),
taskBto1
.
getBusinessType
(),
"
配套设备入库完成
"
,
ids
,
1
);
messageService
.
add
(
messageBto
);
messageService
.
add
(
messageBto
);
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
"ok"
);
return
ResponseEntity
.
ok
(
"ok"
);
...
@@ -395,16 +396,20 @@ public class MatchingDeviceController {
...
@@ -395,16 +396,20 @@ public class MatchingDeviceController {
MatchingDeviceLibrary
m
=
matchingDeviceLibraryService
.
getOne
(
id
);
MatchingDeviceLibrary
m
=
matchingDeviceLibraryService
.
getOne
(
id
);
list
.
add
(
m
);
list
.
add
(
m
);
//添加关联装备详情
//添加关联装备详情
if
(
m
.
getDeviceId
()
!=
0
)
{
if
(
m
.
getDeviceId
()!=
null
){
list
.
add
(
deviceLibraryService
.
getOne
(
m
.
getDeviceId
()));
if
(
m
.
getDeviceId
()
!=
0
)
{
}
else
{
list
.
add
(
deviceLibraryService
.
getOne
(
m
.
getDeviceId
()));
list
.
add
(
null
);
}
else
{
list
.
add
(
null
);
}
}
}
//添加设备履历日志
//添加设备履历日志
List
<
DeviceLogUserVo
>
deviceLogs
=
deviceLogDao
.
getAllByDeviceIdAndType
(
id
,
1
).
stream
()
List
<
DeviceLogUserVo
>
deviceLogs
=
deviceLogDao
.
getAllByDeviceIdAndType
(
id
,
1
).
stream
()
.
map
(
DeviceLog:
:
parse2Dto
)
.
map
(
DeviceLog:
:
parse2Dto
)
.
map
(
DeviceLogDto:
:
toVo
)
.
map
(
DeviceLogDto:
:
toVo
)
.
sorted
(
Comparator
.
comparing
(
DeviceLogUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
).
reversed
()))
.
sorted
(
Comparator
.
comparing
(
DeviceLogUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
).
reversed
()))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
list
.
add
(
deviceLogs
);
list
.
add
(
deviceLogs
);
return
ResponseEntity
.
ok
(
list
);
return
ResponseEntity
.
ok
(
list
);
...
@@ -415,6 +420,8 @@ public class MatchingDeviceController {
...
@@ -415,6 +420,8 @@ public class MatchingDeviceController {
@PostMapping
(
"/update"
)
@PostMapping
(
"/update"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
update
(
@RequestBody
@Validated
MatchingDeviceEditVo
matchingDeviceEditVo
)
{
public
ResponseEntity
update
(
@RequestBody
@Validated
MatchingDeviceEditVo
matchingDeviceEditVo
)
{
//查询所有的配套设备
List
<
String
>
seqNumberList
=
matchingDeviceLibraryService
.
getAllMatchingDeviceLibraryListSeqNumberList
();
MatchingDeviceLibrary
m
=
matchingDeviceLibraryService
.
getOne
(
matchingDeviceEditVo
.
getMatchingDeviceId
());
MatchingDeviceLibrary
m
=
matchingDeviceLibraryService
.
getOne
(
matchingDeviceEditVo
.
getMatchingDeviceId
());
if
(
matchingDeviceEditVo
.
getCreateUnit
()
!=
null
&&
!
m
.
getCreateUnit
().
equals
(
matchingDeviceEditVo
.
getCreateUnit
()))
{
if
(
matchingDeviceEditVo
.
getCreateUnit
()
!=
null
&&
!
m
.
getCreateUnit
().
equals
(
matchingDeviceEditVo
.
getCreateUnit
()))
{
//添加设备日志
//添加设备日志
...
@@ -457,7 +464,11 @@ public class MatchingDeviceController {
...
@@ -457,7 +464,11 @@ public class MatchingDeviceController {
String
remark
=
"将设备的序列号由"
+
m
.
getSeqNumber
()
+
"改为"
+
matchingDeviceEditVo
.
getSeqNumber
();
String
remark
=
"将设备的序列号由"
+
m
.
getSeqNumber
()
+
"改为"
+
matchingDeviceEditVo
.
getSeqNumber
();
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
1
,
matchingDeviceEditVo
.
getMatchingDeviceId
(),
remark
,
null
,
null
);
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
1
,
matchingDeviceEditVo
.
getMatchingDeviceId
(),
remark
,
null
,
null
);
deviceLogService
.
addLog
(
deviceLogDto
);
deviceLogService
.
addLog
(
deviceLogDto
);
m
.
setSeqNumber
(
matchingDeviceEditVo
.
getSeqNumber
());
if
(
seqNumberList
.
contains
(
matchingDeviceEditVo
.
getSeqNumber
())){
throw
new
ApiException
(
"序列号"
+
matchingDeviceEditVo
.
getSeqNumber
()+
"已经存在"
);
}
else
{
m
.
setSeqNumber
(
matchingDeviceEditVo
.
getSeqNumber
());
}
}
}
if
(
matchingDeviceEditVo
.
getType
()
!=
null
&&
!
m
.
getType
().
equals
(
matchingDeviceEditVo
.
getType
()))
{
if
(
matchingDeviceEditVo
.
getType
()
!=
null
&&
!
m
.
getType
().
equals
(
matchingDeviceEditVo
.
getType
()))
{
//添加设备日志
//添加设备日志
...
...
dev-matching/src/main/java/com/tykj/dev/device/matching/service/MatchingDeviceLibraryService.java
浏览文件 @
865a701c
...
@@ -92,4 +92,10 @@ public interface MatchingDeviceLibraryService {
...
@@ -92,4 +92,10 @@ public interface MatchingDeviceLibraryService {
* @param matchingDeviceId 配套设备的id
* @param matchingDeviceId 配套设备的id
*/
*/
MatchingDeviceLibrary
printRfid
(
Integer
matchingDeviceId
);
MatchingDeviceLibrary
printRfid
(
Integer
matchingDeviceId
);
/**
* 查询所有的序列号
* @return
*/
List
<
String
>
getAllMatchingDeviceLibraryListSeqNumberList
();
}
}
dev-matching/src/main/java/com/tykj/dev/device/matching/service/impl/MatchingDeviceLibraryServiceImpl.java
浏览文件 @
865a701c
...
@@ -308,6 +308,13 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
...
@@ -308,6 +308,13 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
return
matchingDeviceLibrary
;
return
matchingDeviceLibrary
;
}
}
@Override
public
List
<
String
>
getAllMatchingDeviceLibraryListSeqNumberList
()
{
return
matchingDeviceLibraryDao
.
findAll
().
stream
().
map
(
MatchingDeviceLibrary:
:
getSeqNumber
)
.
collect
(
Collectors
.
toList
());
}
/**
/**
* @param matchingDeviceSelectVo 配套设备查询vo
* @param matchingDeviceSelectVo 配套设备查询vo
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论