Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
db0059f3
提交
db0059f3
authored
9月 15, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
ad4060d0
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
85 行增加
和
12 行删除
+85
-12
MatchingDeviceController.java
.../device/matching/controller/MatchingDeviceController.java
+21
-5
MatchingDeviceLibraryDao.java
.../device/matching/repository/MatchingDeviceLibraryDao.java
+2
-0
MatchingDeviceLibraryService.java
...device/matching/service/MatchingDeviceLibraryService.java
+12
-0
MatchingDeviceLibraryServiceImpl.java
...tching/service/impl/MatchingDeviceLibraryServiceImpl.java
+21
-2
RepairBillSelectController.java
.../device/repair/controller/RepairBillSelectController.java
+14
-4
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+0
-0
TaskLogBto.java
...java/com/tykj/dev/device/task/subject/bto/TaskLogBto.java
+15
-0
TaskLog.java
.../java/com/tykj/dev/device/task/subject/domin/TaskLog.java
+0
-1
没有找到文件。
dev-device/device-matching/src/main/java/com/tykj/dev/device/matching/controller/MatchingDeviceController.java
浏览文件 @
db0059f3
...
...
@@ -5,6 +5,7 @@ import com.tykj.dev.device.library.repository.DeviceLogDao;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.service.DeviceLogService
;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.library.subject.vo.DeviceLogUserVo
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
...
...
@@ -180,13 +181,16 @@ public class MatchingDeviceController {
@ApiOperation
(
value
=
"查询配套装备详情"
,
notes
=
"可以通过这个接口查询配套装备详情"
)
@GetMapping
(
"/feature/detail/{id}"
)
public
ResponseEntity
getDetail
(
@PathVariable
(
"id"
)
int
id
)
{
MacthingDeviceDetailVo
macthingDeviceDetailVo
=
new
MacthingDeviceDetailVo
();
List
<
Object
>
list
=
new
ArrayList
<>
();
//添加配套设备详情
MatchingDeviceLibrary
m
=
matchingDeviceLibraryService
.
getOne
(
id
);
macthingDeviceDetailVo
.
setMatchingDeviceLibrary
(
m
);
list
.
add
(
m
);
//添加关联装备详情
if
(
m
.
getDeviceId
()
!=
0
)
{
macthingDeviceDetailVo
.
setDeviceLibrary
(
deviceLibraryService
.
getOne
(
m
.
getDeviceId
()));
list
.
add
(
deviceLibraryService
.
getOne
(
m
.
getDeviceId
()));
}
else
{
list
.
add
(
new
DeviceLibrary
());
}
//添加设备履历日志
List
<
DeviceLogUserVo
>
deviceLogs
=
deviceLogDao
.
getAllByDeviceIdAndType
(
id
,
1
).
stream
()
...
...
@@ -194,8 +198,8 @@ public class MatchingDeviceController {
.
map
(
DeviceLogDto:
:
toVo
)
.
sorted
(
Comparator
.
comparing
(
DeviceLogUserVo:
:
getCreateTime
))
.
collect
(
Collectors
.
toList
());
macthingDeviceDetailVo
.
setDeviceLogUserVos
(
deviceLogs
);
return
ResponseEntity
.
ok
(
macthingDeviceDetailVo
);
list
.
add
(
deviceLogs
);
return
ResponseEntity
.
ok
(
list
);
}
@ApiOperation
(
value
=
"更新配套设备"
,
notes
=
"可以通过这个接口更新配套设备"
)
...
...
@@ -251,4 +255,16 @@ public class MatchingDeviceController {
macthingDetailVo
.
setTaskLogUserVos
(
taskLogService
.
getByTaskId
(
taskBto
.
getId
()));
return
ResponseEntity
.
ok
(
macthingDetailVo
);
}
@ApiOperation
(
value
=
"查询所有配套设备型号"
,
notes
=
"查询所有配套设备型号"
)
@GetMapping
(
value
=
"/selectAllModel"
)
public
ResponseEntity
selectAllModel
(){
return
ResponseEntity
.
ok
(
matchingDeviceLibraryService
.
getAllModel
());
}
@ApiOperation
(
value
=
"查询所有配套设备名称"
,
notes
=
"查询所有配套设备名称"
)
@GetMapping
(
value
=
"/selectAllName"
)
public
ResponseEntity
selectAllName
(){
return
ResponseEntity
.
ok
(
matchingDeviceLibraryService
.
getAllName
());
}
}
dev-device/device-matching/src/main/java/com/tykj/dev/device/matching/repository/MatchingDeviceLibraryDao.java
浏览文件 @
db0059f3
...
...
@@ -4,6 +4,8 @@ import com.tykj.dev.device.matching.subject.domin.MatchingDeviceLibrary;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
java.util.List
;
/**
* @author dengdiyi
*/
...
...
dev-device/device-matching/src/main/java/com/tykj/dev/device/matching/service/MatchingDeviceLibraryService.java
浏览文件 @
db0059f3
...
...
@@ -5,6 +5,8 @@ import com.tykj.dev.device.matching.subject.vo.MatchingDeviceSelectVo;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
java.util.List
;
/**
* @author dengdiyi
*/
...
...
@@ -40,4 +42,14 @@ public interface MatchingDeviceLibraryService {
* 配套设备分页查询
*/
Page
<
MatchingDeviceLibrary
>
getPage
(
MatchingDeviceSelectVo
matchingDeviceSelectVo
,
Pageable
pageable
);
/**
* @return 所有类型
*/
List
<
String
>
getAllModel
();
/**
* @return 所有名称
*/
List
<
String
>
getAllName
();
}
dev-device/device-matching/src/main/java/com/tykj/dev/device/matching/service/impl/MatchingDeviceLibraryServiceImpl.java
浏览文件 @
db0059f3
...
...
@@ -18,8 +18,7 @@ import org.springframework.stereotype.Service;
import
javax.persistence.Transient
;
import
java.lang.reflect.Field
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -100,6 +99,26 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
}
}
/**
* @return 所有类型
*/
@Override
public
List
<
String
>
getAllModel
()
{
Set
<
String
>
models
=
new
HashSet
<>();
matchingDeviceLibraryDao
.
findAll
().
forEach
(
matchingDeviceLibrary
->
models
.
add
(
matchingDeviceLibrary
.
getModel
()));
return
new
ArrayList
<>(
models
);
}
/**
* @return 所有名称
*/
@Override
public
List
<
String
>
getAllName
()
{
Set
<
String
>
names
=
new
HashSet
<>();
matchingDeviceLibraryDao
.
findAll
().
forEach
(
matchingDeviceLibrary
->
names
.
add
(
matchingDeviceLibrary
.
getName
()));
return
new
ArrayList
<>(
names
);
}
/**
* @param matchingDeviceSelectVo 配套设备查询vo
* 创建通用查询条件筛选器
...
...
dev-device/device-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairBillSelectController.java
浏览文件 @
db0059f3
...
...
@@ -2,16 +2,17 @@ package com.tykj.dev.device.repair.controller;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.repair.service.RepairBillService
;
import
com.tykj.dev.device.repair.subject.domin.RepairBill
;
import
com.tykj.dev.device.repair.subject.vo.RepairBillSelectVo
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.
PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.
*
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author dengdiyi
...
...
@@ -30,4 +31,13 @@ public class RepairBillSelectController {
public
ResponseEntity
selectRepairBill
(
@RequestBody
RepairBillSelectVo
repairBillSelectVo
)
{
return
ResultUtil
.
success
(
repairBillService
.
getPage
(
repairBillSelectVo
,
repairBillSelectVo
.
getPageable
()));
}
@ApiOperation
(
value
=
"查询维修单详情"
,
notes
=
"可以通过这个接口查询维修单详情"
)
@GetMapping
(
value
=
"/archives/repair/detail/{id}"
)
public
ResponseEntity
selectRepairBillDetail
(
@PathVariable
(
"id"
)
int
id
){
List
<
Object
>
list
=
new
ArrayList
<>();
//获取维修单
RepairBill
repairBill
=
repairBillService
.
getOne
(
id
);
return
null
;
}
}
dev-device/device-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
db0059f3
差异被折叠。
点击展开。
dev-device/device-task/src/main/java/com/tykj/dev/device/task/subject/bto/TaskLogBto.java
浏览文件 @
db0059f3
...
...
@@ -4,6 +4,7 @@ import com.tykj.dev.device.library.subject.vo.FileVo;
import
com.tykj.dev.device.task.subject.domin.TaskLog
;
import
com.tykj.dev.device.task.subject.vo.TaskLogUserVo
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -15,6 +16,7 @@ import org.modelmapper.ModelMapper;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @author dengdiyi
...
...
@@ -54,13 +56,26 @@ public class TaskLogBto {
this
.
fileVoList
=
new
ArrayList
<>();
}
public
TaskLogBto
(
Integer
taskId
,
String
remark
,
Integer
createUserId
)
{
this
.
taskId
=
taskId
;
this
.
remark
=
remark
;
this
.
createUserId
=
createUserId
;
}
/**
* dto类转化为do类
*/
public
TaskLog
toDo
()
{
UserUtils
userUtils
=
SpringUtils
.
getBean
(
"userUtils"
);
TaskLog
taskLog
=
new
TaskLog
();
taskLog
.
setTaskId
(
this
.
taskId
);
taskLog
.
setRemark
(
this
.
remark
);
if
(
this
.
createUserId
!=
null
){
taskLog
.
setCreateUserId
(
this
.
createUserId
);
}
else
{
taskLog
.
setCreateUserId
(
Objects
.
requireNonNull
(
userUtils
).
getCurrentUserId
());
}
StringBuffer
stringBuffer
=
new
StringBuffer
();
stringBuffer
.
append
(
"Ǵ"
);
if
(
this
.
fileVoList
!=
null
&&
this
.
fileVoList
.
size
()
>
0
)
{
...
...
dev-device/device-task/src/main/java/com/tykj/dev/device/task/subject/domin/TaskLog.java
浏览文件 @
db0059f3
...
...
@@ -58,7 +58,6 @@ public class TaskLog {
* 创建用户id
*/
@ApiModelProperty
(
value
=
"创建用户id"
)
@CreatedBy
private
Integer
createUserId
;
/**
* 创建时间
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论