Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
71b86ebb
提交
71b86ebb
authored
9月 14, 2021
作者:
133
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bug' of git.yfzx.zjtys.com.cn:matrix/device-back
上级
f255e863
4f6439a5
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
44 行增加
和
7 行删除
+44
-7
DeviceLog.java
.../com/tykj/dev/device/library/subject/domin/DeviceLog.java
+1
-1
pom.xml
dev-matching/pom.xml
+4
-0
MatchingDeviceController.java
.../device/matching/controller/MatchingDeviceController.java
+27
-6
MatchingDeviceBill.java
...dev/device/matching/subject/domin/MatchingDeviceBill.java
+9
-0
MatchingDeviceBillSaveVo.java
.../device/matching/subject/vo/MatchingDeviceBillSaveVo.java
+3
-0
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/subject/domin/DeviceLog.java
浏览文件 @
71b86ebb
...
...
@@ -43,7 +43,7 @@ public class DeviceLog {
/**
* 日志类型(默认0为装备日志,1为设备日志)
*/
@ApiModelProperty
(
value
=
"日志类型(默认0为装备日志,1为设备日志)"
)
@ApiModelProperty
(
value
=
"日志类型(默认0为装备日志,1为
配套
设备日志)"
)
private
Integer
type
=
0
;
/**
* 装备id
...
...
dev-matching/pom.xml
浏览文件 @
71b86ebb
...
...
@@ -28,6 +28,10 @@
<groupId>
com.tykj.dev
</groupId>
<artifactId>
misc
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-file
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
config
</artifactId>
...
...
dev-matching/src/main/java/com/tykj/dev/device/matching/controller/MatchingDeviceController.java
浏览文件 @
71b86ebb
...
...
@@ -2,6 +2,8 @@ package com.tykj.dev.device.matching.controller;
import
com.tykj.dev.config.cache.ConfigCache
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLogDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.service.DeviceLogService
;
...
...
@@ -43,10 +45,7 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.Min
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -104,6 +103,9 @@ public class MatchingDeviceController {
@Autowired
private
RfidService
rfidService
;
@ApiOperation
(
value
=
"添加配套设备"
,
notes
=
"可以通过这个接口添加配套设备"
)
@PostMapping
(
value
=
"/add"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -116,6 +118,7 @@ public class MatchingDeviceController {
}
//添加账单
MatchingDeviceBill
matchingDeviceBillEntity
=
matchingDeviceBillSaveVo
.
toDo
();
matchingDeviceBillEntity
.
setFileRets
(
FilesUtil
.
stringFileToList
(
matchingDeviceBillSaveVo
.
getFileRets
()));
MatchingDeviceBill
m
=
matchingDeviceBillService
.
addEntity
(
matchingDeviceBillEntity
);
StringBuffer
stringBuffer
=
new
StringBuffer
();
stringBuffer
.
append
(
"x"
);
...
...
@@ -142,10 +145,10 @@ public class MatchingDeviceController {
stringBuffer
.
append
(
d
.
getId
());
stringBuffer
.
append
(
"x"
);
//存装备日志
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
1
,
d
.
getId
(),
"发起新增配套"
,
fileVoList
,
taskBto
.
getId
());
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
1
,
d
.
getId
(),
"发起新增配套"
,
fileVoList
,
taskBto
1
.
getId
());
deviceLogService
.
addLog
(
deviceLogDto
);
}
rfidService
.
printString
(
printVos
);
//
rfidService.printString(printVos);
//set账单新增设备详情
m
.
setDeviceDetail
(
stringBuffer
.
toString
());
matchingDeviceBillService
.
update
(
m
);
...
...
@@ -245,6 +248,8 @@ public class MatchingDeviceController {
return
ResponseEntity
.
ok
(
list
);
}
@ApiOperation
(
value
=
"更新配套设备"
,
notes
=
"可以通过这个接口更新配套设备"
)
@PostMapping
(
"/update"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -312,6 +317,7 @@ public class MatchingDeviceController {
TaskBto
taskBto
=
taskService
.
get
(
billId
,
BusinessEnum
.
ADD_MATCHING_DEVICE
.
id
);
//获取账单
MatchingDeviceBill
matchingDeviceBillEntity
=
matchingDeviceBillService
.
getOne
(
billId
);
matchingDeviceBillEntity
.
setFileRetList
(
FilesUtil
.
stringFileToList
(
matchingDeviceBillEntity
.
getFileRets
()));
macthingDetailVo
.
setMatchingDeviceBill
(
matchingDeviceBillEntity
);
//获取设备
List
<
Integer
>
integerList
=
StringSplitUtil
.
userIdSplit
(
matchingDeviceBillEntity
.
getDeviceDetail
());
...
...
@@ -329,6 +335,21 @@ public class MatchingDeviceController {
return
ResponseEntity
.
ok
(
macthingDetailVo
);
}
@ApiOperation
(
value
=
"根据任务id查询相关单据"
,
notes
=
"根据任务id查询相关单据"
)
@GetMapping
(
value
=
"/fileMap/{taskId}"
)
public
ResponseEntity
selectFileRetMap
(
@PathVariable
(
"taskId"
)
int
taskId
)
{
Map
<
String
,
List
<
FileRet
>>
map
=
new
HashMap
<>();
//获取业务
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
//获取账单
MatchingDeviceBill
matchingDeviceBillEntity
=
matchingDeviceBillService
.
getOne
(
taskBto
.
getBillId
());
//获取设备
map
.
put
(
"配发单"
,
FilesUtil
.
stringFileToList
(
matchingDeviceBillEntity
.
getFileRets
()));
return
ResponseEntity
.
ok
(
map
);
}
@ApiOperation
(
value
=
"查询所有配套设备型号"
,
notes
=
"查询所有配套设备型号"
)
@GetMapping
(
value
=
"/selectAllModel"
)
public
ResponseEntity
selectAllModel
()
{
...
...
dev-matching/src/main/java/com/tykj/dev/device/matching/subject/domin/MatchingDeviceBill.java
浏览文件 @
71b86ebb
package
com
.
tykj
.
dev
.
device
.
matching
.
subject
.
domin
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import
javax.persistence.*
;
import
java.util.Date
;
import
java.util.List
;
/**
* entity class for matching_device_bill
...
...
@@ -99,4 +101,11 @@ public class MatchingDeviceBill {
@ApiModelProperty
(
value
=
"区块链记录id"
)
private
String
recordId
;
@Column
(
name
=
"file_rets"
,
columnDefinition
=
"TEXT"
)
private
String
fileRets
;
@Transient
@ApiModelProperty
(
value
=
"配发文件集合对象"
)
private
List
<
FileRet
>
fileRetList
;
}
dev-matching/src/main/java/com/tykj/dev/device/matching/subject/vo/MatchingDeviceBillSaveVo.java
浏览文件 @
71b86ebb
package
com
.
tykj
.
dev
.
device
.
matching
.
subject
.
vo
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.matching.subject.domin.MatchingDeviceBill
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -37,6 +38,8 @@ public class MatchingDeviceBillSaveVo {
@ApiModelProperty
(
value
=
"审核人id"
)
private
Integer
userbId
;
private
List
<
FileRet
>
fileRets
;
@Valid
@NotEmpty
(
message
=
"matchingDeviceSaveVoList不能为空"
)
@ApiModelProperty
(
value
=
"配套设备列表"
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论