Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
91b2b287
提交
91b2b287
authored
9月 15, 2020
作者:
Matrix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改了装备模块不兼容的泛型部分
上级
de6f5485
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
73 行增加
和
71 行删除
+73
-71
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+13
-13
DeviceDestroyController.java
...ev/device/destroy/controller/DeviceDestroyController.java
+5
-5
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+35
-36
ResultUtil.java
...isc/src/main/java/com/tykj/dev/misc/utils/ResultUtil.java
+12
-11
RfidController.java
...ain/java/com/tykj/dev/rfid/controller/RfidController.java
+8
-6
没有找到文件。
dev-device/device-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
91b2b287
...
...
@@ -80,27 +80,27 @@ public class DeviceCheckController {
@GetMapping
(
"/area/{fatherId}"
)
@ApiOperation
(
value
=
"查询指定区域下的所有区域信息"
)
public
Res
ultObj
findAreaUnderId
(
@PathVariable
Integer
fatherId
)
{
return
new
ResultObj
(
areaRepo
.
findByFatherId
(
fatherId
));
public
Res
ponseEntity
<
ResultObj
>
findAreaUnderId
(
@PathVariable
Integer
fatherId
)
{
return
ResponseEntity
.
ok
(
new
ResultObj
(
areaRepo
.
findByFatherId
(
fatherId
)
));
}
@ApiOperation
(
value
=
"根据id查询核查统计数据"
,
notes
=
"可以通过这个接口查询核查统计数据"
)
@GetMapping
(
"/stat/{id}"
)
public
Res
ultObj
findStatById
(
@PathVariable
Integer
id
)
{
public
Res
ponseEntity
<
ResultObj
>
findStatById
(
@PathVariable
Integer
id
)
{
//还要查询出所有的
CheckStatVo
statVoList
=
statRepo
.
findById
(
id
)
.
map
(
DeviceCheckStat:
:
toVo
)
.
orElse
(
CheckStatVo
.
empty
());
return
new
ResultObj
(
statVoList
);
return
ResponseEntity
.
ok
(
new
ResultObj
(
statVoList
)
);
}
@ApiOperation
(
value
=
"根据id查询核查详情数据"
,
notes
=
"可以通过这个接口查询核查详情数据"
)
@GetMapping
(
"/detail/{id}"
)
public
Res
ultObj
findDetail
(
@PathVariable
Integer
id
)
{
public
Res
ponseEntity
<
ResultObj
>
findDetail
(
@PathVariable
Integer
id
)
{
CheckDetailVo
detailVoList
=
detailRepo
.
findById
(
id
)
.
map
(
transUtil:
:
CheckDetailDo2Vo
)
.
orElse
(
null
);
return
new
ResultObj
(
detailVoList
);
return
ResponseEntity
.
ok
(
new
ResultObj
(
detailVoList
)
);
}
/**
...
...
@@ -113,7 +113,7 @@ public class DeviceCheckController {
*/
@ApiOperation
(
value
=
"发起核查"
,
notes
=
"发起核查流程"
)
@PostMapping
(
"/check/bill"
)
public
Res
ultObj
startManualCheck
(
@RequestBody
CheckBillVo
billVo
)
{
public
Res
ponseEntity
<
ResultObj
>
startManualCheck
(
@RequestBody
CheckBillVo
billVo
)
{
// 1. 添加发起核查bill记录
DeviceCheckBillEntity
billDo
=
transUtil
.
checkBillVo2Do
(
billVo
);
billRepo
.
save
(
billDo
);
...
...
@@ -156,7 +156,7 @@ public class DeviceCheckController {
taskService
.
start
(
checkedTask
);
}
return
new
ResultObj
(
String
.
format
(
"[%s]单位成功发起对 %s 单位的核查任务分发"
,
startUnit
.
getName
(),
checkedUnitNames
));
return
ResponseEntity
.
ok
(
new
ResultObj
(
String
.
format
(
"[%s]单位成功发起对 %s 单位的核查任务分发"
,
startUnit
.
getName
(),
checkedUnitNames
)
));
}
...
...
@@ -170,7 +170,7 @@ public class DeviceCheckController {
*/
@ApiOperation
(
value
=
"专管员A核查详情单"
)
@PutMapping
(
"/detail/A/{id}"
)
public
ResponseEntity
checkUserA
(
@PathVariable
Integer
id
,
public
ResponseEntity
<
ResultObj
>
checkUserA
(
@PathVariable
Integer
id
,
@RequestParam
int
assignUserId
,
@RequestParam
String
checkResult
,
@RequestBody
DevLibVo
devLibVo
)
{
...
...
@@ -191,13 +191,13 @@ public class DeviceCheckController {
*/
@ApiOperation
(
value
=
"专管员B核查详情单"
)
@PutMapping
(
"/detail/B/{id}"
)
public
ResponseEntity
checkUserB
(
@PathVariable
Integer
id
,
public
ResponseEntity
<
ResultObj
>
checkUserB
(
@PathVariable
Integer
id
,
@RequestParam
int
checkStatus
,
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
int
checkUserAId
,
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
int
checkUserBId
)
{
if
(
checkStatus
==
0
)
{
return
ResponseEntity
.
status
(
400
).
body
(
"checkStatus不应该为0!"
);
return
ResponseEntity
.
status
(
400
).
body
(
new
ResultObj
(
"checkStatus不应该为0!"
)
);
}
//先更新checkUser
...
...
@@ -237,7 +237,7 @@ public class DeviceCheckController {
@ApiOperation
(
value
=
"核查组A/B确认核查详情单"
)
@PutMapping
(
"/detail/C/{id}"
)
public
ResponseEntity
checkUserC
(
@PathVariable
Integer
id
,
public
ResponseEntity
<
ResultObj
>
checkUserC
(
@PathVariable
Integer
id
,
@RequestParam
boolean
pass
)
{
TaskBto
currentTask
=
taskService
.
get
(
id
,
CONFIRM_CHECK_DETAIL
.
id
);
DeviceCheckDetailEntity
currentDetail
=
detailRepo
.
findById
(
id
).
get
();
...
...
@@ -289,7 +289,7 @@ public class DeviceCheckController {
@ApiOperation
(
value
=
"统计数据确认"
)
@PostMapping
(
"/stat/verify"
)
public
ResponseEntity
statConfirm
(
@RequestParam
int
statId
)
{
public
ResponseEntity
<
ResultObj
>
statConfirm
(
@RequestParam
int
statId
)
{
//将当前的统计task完结
TaskBto
currentTask
=
taskService
.
get
(
CONFIRM_CHECK_STAT
.
id
,
statId
);
currentTask
=
taskService
.
moveToEnd
(
currentTask
);
...
...
dev-device/device-destroy/src/main/java/com/tykj/dev/device/destroy/controller/DeviceDestroyController.java
浏览文件 @
91b2b287
package
com
.
tykj
.
dev
.
device
.
destroy
.
controller
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill
;
import
com.tykj.dev.device.destroy.entity.enums.DestroyStatus
;
import
com.tykj.dev.device.destroy.entity.vo.*
;
import
com.tykj.dev.device.destroy.service.DeviceDestroyBillService
;
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.vo.DeviceLibrarySelectVo
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.task.service.TaskLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
...
...
@@ -14,15 +18,12 @@ import com.tykj.dev.device.task.subject.bto.TaskLogBto;
import
com.tykj.dev.device.task.subject.common.BusinessEnum
;
import
com.tykj.dev.device.task.subject.common.StatusEnum
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.AuthenticationUtils
;
import
com.tykj.dev.misc.utils.ListUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill
;
import
com.tykj.dev.device.destroy.entity.enums.DestroyStatus
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -33,7 +34,6 @@ import org.springframework.data.domain.Page;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
com.tykj.dev.device.destroy.service.DeviceDestroyBillService
;
import
javax.transaction.Transactional
;
import
javax.validation.constraints.NotNull
;
...
...
@@ -113,7 +113,7 @@ public class DeviceDestroyController {
@ApiOperation
(
value
=
"查询可销毁装备列表"
,
notes
=
"通过这个接口查询可销毁装备接口"
)
@PostMapping
(
value
=
"/devices"
)
public
ResponseEntity
<
List
<
DeviceLibrary
>>
selectDevices
(
@RequestBody
CanDestroyDeviceSelectVo
canDestoryDeviceSelectVo
)
{
public
ResponseEntity
selectDevices
(
@RequestBody
CanDestroyDeviceSelectVo
canDestoryDeviceSelectVo
)
{
DeviceLibrarySelectVo
deviceLibrarySelectVo
=
new
DeviceLibrarySelectVo
();
BeanUtils
.
copyProperties
(
canDestoryDeviceSelectVo
,
deviceLibrarySelectVo
);
deviceLibrarySelectVo
.
setLifeStatus
(
Arrays
.
asList
(
2
,
5
,
12
));
...
...
dev-device/device-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
91b2b287
...
...
@@ -17,7 +17,6 @@ import org.springframework.http.ResponseEntity;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -39,76 +38,76 @@ public class DeviceLibraryController {
@Autowired
private
DeviceLogDao
deviceLogDao
;
@ApiOperation
(
value
=
"模糊查询装备分页"
,
notes
=
"可以通过这个接口查询装备"
)
@ApiOperation
(
value
=
"模糊查询装备分页"
,
notes
=
"可以通过这个接口查询装备"
)
@PostMapping
(
"/selectDevicePage"
)
public
ResponseEntity
<
Page
<
DeviceLibrary
>>
selectDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
public
ResponseEntity
selectDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
Page
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getPage
(
deviceLibrarySelectVo
,
deviceLibrarySelectVo
.
getPageable
());
return
ResultUtil
.
success
(
deviceLibraryEntities
);
}
@ApiOperation
(
value
=
"模糊查询装备列表"
,
notes
=
"可以通过这个接口查询装备列表"
)
@ApiOperation
(
value
=
"模糊查询装备列表"
,
notes
=
"可以通过这个接口查询装备列表"
)
@PostMapping
(
"/selectDeviceList"
)
public
ResponseEntity
<
List
<
DeviceLibrary
>>
selectDeviceList
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
public
ResponseEntity
selectDeviceList
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getList
(
deviceLibrarySelectVo
);
return
ResultUtil
.
success
(
deviceLibraryEntities
);
}
@ApiOperation
(
value
=
"查询所有装备列表"
,
notes
=
"可以通过这个接口查询所有装备列表"
)
@ApiOperation
(
value
=
"查询所有装备列表"
,
notes
=
"可以通过这个接口查询所有装备列表"
)
@PostMapping
(
"/selectAllDeviceList"
)
public
ResponseEntity
<
List
<
DeviceLibrary
>>
selectAllDeviceList
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
public
ResponseEntity
selectAllDeviceList
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getAllList
(
deviceLibrarySelectVo
);
return
ResultUtil
.
success
(
deviceLibraryEntities
);
}
@ApiOperation
(
value
=
"查询检查装备列表"
,
notes
=
"可以通过这个接口查询装备列表"
)
@ApiOperation
(
value
=
"查询检查装备列表"
,
notes
=
"可以通过这个接口查询装备列表"
)
@GetMapping
(
"/selectCheckDeviceList"
)
public
ResponseEntity
<
List
<
DeviceLibrary
>>
selectDeviceList
()
{
public
ResponseEntity
selectDeviceList
()
{
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getCheckList
();
return
ResultUtil
.
success
(
deviceLibraryEntities
);
}
@ApiOperation
(
value
=
"模糊查询可配发的在库装备列表"
,
notes
=
"可以通过这个接口查询可配发装备"
)
@ApiOperation
(
value
=
"模糊查询可配发的在库装备列表"
,
notes
=
"可以通过这个接口查询可配发装备"
)
@PostMapping
(
"/selectAllotDeviceList"
)
public
ResponseEntity
<
List
<
DeviceLibrary
>>
selectAllotDeviceList
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
public
ResponseEntity
selectAllotDeviceList
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
List
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getAllotList
(
deviceLibrarySelectVo
);
return
ResultUtil
.
success
(
deviceLibraryEntities
);
}
@ApiOperation
(
value
=
"模糊查询核心装备分页"
,
notes
=
"可以通过这个接口查询装备列表"
)
@ApiOperation
(
value
=
"模糊查询核心装备分页"
,
notes
=
"可以通过这个接口查询装备列表"
)
@PostMapping
(
"/core/feature/summary"
)
public
ResponseEntity
<
Page
<
DeviceLibrary
>>
selectCoreDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
Page
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getCoreDevicePage
(
deviceLibrarySelectVo
,
deviceLibrarySelectVo
.
getPageable
());
public
ResponseEntity
selectCoreDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
Page
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getCoreDevicePage
(
deviceLibrarySelectVo
,
deviceLibrarySelectVo
.
getPageable
());
return
ResultUtil
.
success
(
deviceLibraryEntities
);
}
@ApiOperation
(
value
=
"查询存在的装备名称"
,
notes
=
"可以通过这个接口查询存在的装备名称"
)
@ApiOperation
(
value
=
"查询存在的装备名称"
,
notes
=
"可以通过这个接口查询存在的装备名称"
)
@GetMapping
(
"/selectAllName"
)
public
ResponseEntity
<
List
<
String
>>
selectAllName
()
{
public
ResponseEntity
selectAllName
()
{
return
ResultUtil
.
success
(
deviceLibraryService
.
getAllName
());
}
@ApiOperation
(
value
=
"模糊查询标签管理装备分页"
,
notes
=
"可以通过这个接口查询装备列表"
)
@ApiOperation
(
value
=
"模糊查询标签管理装备分页"
,
notes
=
"可以通过这个接口查询装备列表"
)
@PostMapping
(
"/selectTagDevicePage"
)
public
ResponseEntity
<
Page
<
DeviceLibrary
>>
selectTagDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
Page
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getTagPage
(
deviceLibrarySelectVo
,
deviceLibrarySelectVo
.
getPageable
());
public
ResponseEntity
selectTagDevicePage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
Page
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getTagPage
(
deviceLibrarySelectVo
,
deviceLibrarySelectVo
.
getPageable
());
return
ResultUtil
.
success
(
deviceLibraryEntities
);
}
@ApiOperation
(
value
=
"模糊查询核心装备统计分页"
,
notes
=
"可以通过这个接口查询装备列表"
)
@ApiOperation
(
value
=
"模糊查询核心装备统计分页"
,
notes
=
"可以通过这个接口查询装备列表"
)
@PostMapping
(
"/core/stat/summary"
)
public
ResponseEntity
<
Page
<
DeviceStatisticsVo
>>
getDeviceStatisticsPage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
Page
<
DeviceStatisticsVo
>
deviceStatisticsVos
=
deviceLibraryService
.
getDeviceStatisticsPage
(
deviceLibrarySelectVo
,
deviceLibrarySelectVo
.
getPageable
());
public
ResponseEntity
getDeviceStatisticsPage
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
Page
<
DeviceStatisticsVo
>
deviceStatisticsVos
=
deviceLibraryService
.
getDeviceStatisticsPage
(
deviceLibrarySelectVo
,
deviceLibrarySelectVo
.
getPageable
());
return
ResultUtil
.
success
(
deviceStatisticsVos
);
}
@ApiOperation
(
value
=
"查询核心装备详情的详情"
,
notes
=
"可以通过这个接口查询核心装备详情的详情"
)
@ApiOperation
(
value
=
"查询核心装备详情的详情"
,
notes
=
"可以通过这个接口查询核心装备详情的详情"
)
@GetMapping
(
"/core/feature/detail/{id}"
)
public
ResponseEntity
<
DeviceDetailVo
>
getDeviceDetail
(
@PathVariable
(
"id"
)
int
id
)
{
public
ResponseEntity
getDeviceDetail
(
@PathVariable
(
"id"
)
int
id
)
{
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
id
);
DeviceDetailVo
deviceDetailVo
=
new
DeviceDetailVo
();
List
<
DeviceLibrary
>
libraryEntities
=
new
ArrayList
<>();
//查询日志
List
<
DeviceLogUserVo
>
deviceLogEntities
=
deviceLogDao
.
getAllByDeviceIdAndType
(
id
,
0
).
stream
()
List
<
DeviceLogUserVo
>
deviceLogEntities
=
deviceLogDao
.
getAllByDeviceIdAndType
(
id
,
0
).
stream
()
.
map
(
DeviceLog:
:
parse2Dto
)
.
map
(
DeviceLogDto:
:
toVo
)
.
sorted
(
Comparator
.
comparing
(
DeviceLogUserVo:
:
getCreateTime
))
...
...
@@ -134,17 +133,17 @@ public class DeviceLibraryController {
}
}
@ApiOperation
(
value
=
"更新装备库"
,
notes
=
"可以通过这个接口更新装备库"
)
@ApiOperation
(
value
=
"更新装备库"
,
notes
=
"可以通过这个接口更新装备库"
)
@PostMapping
(
"/updateDeviceLibrary"
)
public
ResponseEntity
<
String
>
updateDeviceLibrary
(
@RequestBody
DeviceEditVo
deviceEditVo
)
{
public
ResponseEntity
updateDeviceLibrary
(
@RequestBody
DeviceEditVo
deviceEditVo
)
{
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
deviceEditVo
.
getDeviceId
());
//更新装备信息
if
(
deviceEditVo
.
getUpdateVoList
()!=
null
)
{
if
(
deviceEditVo
.
getUpdateVoList
()
!=
null
)
{
DeviceLibraryUpdateVo
libraryUpdateVo
=
deviceEditVo
.
getUpdateVoList
();
if
(
libraryUpdateVo
.
getInvisibleRange
()
!=
null
)
{
if
(
libraryUpdateVo
.
getInvisibleRange
()
!=
null
)
{
deviceLibraryEntity
.
setInvisibleRange
(
libraryUpdateVo
.
getInvisibleRange
());
}
if
(
libraryUpdateVo
.
getLifeStatus
()
!=
null
)
{
if
(
libraryUpdateVo
.
getLifeStatus
()
!=
null
)
{
deviceLibraryEntity
.
setLifeStatus
(
libraryUpdateVo
.
getLifeStatus
());
}
if
(
libraryUpdateVo
.
getLocationUnit
()!=
null
){
...
...
@@ -217,19 +216,19 @@ public class DeviceLibraryController {
return
ResultUtil
.
success
(
"更新成功"
);
}
@ApiOperation
(
value
=
"通过表面号查询配件"
,
notes
=
"通过表面号查询配件"
)
@ApiOperation
(
value
=
"通过表面号查询配件"
,
notes
=
"通过表面号查询配件"
)
@GetMapping
(
"/selectPart/{rfid}"
)
public
ResponseEntity
<
List
<
DeviceLibrary
>>
selectPart
(
@PathVariable
(
"rfid"
)
String
rfid
)
{
public
ResponseEntity
selectPart
(
@PathVariable
(
"rfid"
)
String
rfid
)
{
List
<
DeviceLibrary
>
libraryEntities
=
deviceLibraryDao
.
getAllByRfidSurfaceId
(
rfid
);
List
<
DeviceLibrary
>
deviceLibraryEntityList
=
libraryEntities
.
stream
().
filter
(
deviceLibraryEntity
->
deviceLibraryEntity
.
getIsPart
()
==
1
).
collect
(
Collectors
.
toList
());
List
<
DeviceLibrary
>
deviceLibraryEntityList
=
libraryEntities
.
stream
().
filter
(
deviceLibraryEntity
->
deviceLibraryEntity
.
getIsPart
()
==
1
).
collect
(
Collectors
.
toList
());
return
ResultUtil
.
success
(
deviceLibraryEntityList
);
}
@ApiOperation
(
value
=
"通过表面号查询装备"
,
notes
=
"通过表面号查询装备"
)
@ApiOperation
(
value
=
"通过表面号查询装备"
,
notes
=
"通过表面号查询装备"
)
@GetMapping
(
"/selectDevice/{rfid}"
)
public
ResponseEntity
<
List
<
DeviceLibrary
>>
selectDevice
(
@PathVariable
(
"rfid"
)
String
rfid
)
{
public
ResponseEntity
selectDevice
(
@PathVariable
(
"rfid"
)
String
rfid
)
{
List
<
DeviceLibrary
>
libraryEntities
=
deviceLibraryDao
.
getAllByRfidSurfaceId
(
rfid
);
List
<
DeviceLibrary
>
deviceLibraryEntityList
=
libraryEntities
.
stream
().
filter
(
deviceLibraryEntity
->
deviceLibraryEntity
.
getIsPart
()
==
0
).
collect
(
Collectors
.
toList
());
List
<
DeviceLibrary
>
deviceLibraryEntityList
=
libraryEntities
.
stream
().
filter
(
deviceLibraryEntity
->
deviceLibraryEntity
.
getIsPart
()
==
0
).
collect
(
Collectors
.
toList
());
return
ResultUtil
.
success
(
deviceLibraryEntityList
);
}
}
dev-misc/src/main/java/com/tykj/dev/misc/utils/ResultUtil.java
浏览文件 @
91b2b287
package
com
.
tykj
.
dev
.
misc
.
utils
;
import
com.tykj.dev.misc.base.ResultObj
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -18,10 +19,10 @@ public class ResultUtil<T> {
*
* @param data 获取的数据
*/
public
static
<
T
>
ResponseEntity
<
T
>
success
(
T
data
)
{
public
static
<
T
>
ResponseEntity
<
ResultObj
>
success
(
T
data
)
{
HttpHeaders
httpHeaders
=
new
HttpHeaders
();
httpHeaders
.
add
(
HttpHeaders
.
CONTENT_TYPE
,
"application/json;charset=UTF-8"
);
return
new
ResponseEntity
<>(
data
,
httpHeaders
,
HttpStatus
.
OK
);
return
new
ResponseEntity
<>(
new
ResultObj
(
data
),
httpHeaders
,
HttpStatus
.
OK
);
}
/**
...
...
@@ -29,22 +30,22 @@ public class ResultUtil<T> {
*
* @param data 获取的数据
*/
public
static
<
T
>
ResponseEntity
<
T
>
success
(
T
data
,
HttpHeaders
headers
)
{
return
new
ResponseEntity
<>(
data
,
headers
,
HttpStatus
.
OK
);
public
static
<
T
>
ResponseEntity
<
ResultObj
>
success
(
T
data
,
HttpHeaders
headers
)
{
return
new
ResponseEntity
<>(
new
ResultObj
(
data
),
headers
,
HttpStatus
.
OK
);
}
/**
* 失败返回结果
*/
public
static
<
T
>
ResponseEntity
<
T
>
failed
()
{
public
static
<
T
>
ResponseEntity
<
ResultObj
>
failed
()
{
return
new
ResponseEntity
<>(
HttpStatus
.
INTERNAL_SERVER_ERROR
);
}
/**
* 失败返回结果
*/
public
static
<
T
>
ResponseEntity
<
T
>
failed
(
T
content
)
{
return
new
ResponseEntity
<>(
content
,
HttpStatus
.
INTERNAL_SERVER_ERROR
);
public
static
<
T
>
ResponseEntity
<
ResultObj
>
failed
(
T
content
)
{
return
new
ResponseEntity
<>(
new
ResultObj
(
content
),
HttpStatus
.
INTERNAL_SERVER_ERROR
);
}
/**
...
...
@@ -57,15 +58,15 @@ public class ResultUtil<T> {
/**
* 失败返回结果
*/
public
static
<
T
>
ResponseEntity
<
T
>
failed
(
HttpStatus
httpStatus
,
T
content
)
{
return
new
ResponseEntity
<>(
content
,
httpStatus
);
public
static
<
T
>
ResponseEntity
<
ResultObj
>
failed
(
HttpStatus
httpStatus
,
T
content
)
{
return
new
ResponseEntity
<>(
new
ResultObj
(
content
),
httpStatus
);
}
/**
* 参数验证失败返回结果
*/
public
static
<
T
>
ResponseEntity
<
T
>
validateFailed
(
T
content
)
{
return
failed
(
HttpStatus
.
INTERNAL_SERVER_ERROR
,
content
);
public
static
<
T
>
ResponseEntity
<
ResultObj
>
validateFailed
(
T
content
)
{
return
failed
(
HttpStatus
.
INTERNAL_SERVER_ERROR
,
content
);
}
...
...
dev-rfid/src/main/java/com/tykj/dev/rfid/controller/RfidController.java
浏览文件 @
91b2b287
...
...
@@ -7,6 +7,7 @@ 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.vo.DeviceLibrarySelectVo
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.task.service.TaskLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
...
...
@@ -14,7 +15,6 @@ import com.tykj.dev.device.task.subject.bto.TaskLogBto;
import
com.tykj.dev.device.task.subject.common.BusinessEnum
;
import
com.tykj.dev.device.task.subject.common.StatusEnum
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.AuthenticationUtils
;
...
...
@@ -26,15 +26,14 @@ import com.tykj.dev.rfid.entity.domin.RfidChangeLog;
import
com.tykj.dev.rfid.entity.enums.RfidChangeStatus
;
import
com.tykj.dev.rfid.entity.vo.*
;
import
com.tykj.dev.rfid.service.LibraryWarningLogService
;
import
com.tykj.dev.rfid.service.RfidService
;
import
com.tykj.dev.rfid.service.RfidChangeBillService
;
import
com.tykj.dev.rfid.service.RfidChangeLogService
;
import
com.tykj.dev.rfid.service.RfidService
;
import
com.tykj.dev.rfid.timeTask.InventoryScheduled
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -45,7 +44,10 @@ import javax.transaction.Transactional;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @author huangxiahao
...
...
@@ -187,9 +189,9 @@ public class RfidController {
return
selectRfidChangeDetail
(
rfidChangeBill
.
getId
());
}
@ApiOperation
(
value
=
"标签管理概览"
,
notes
=
"通过这个借口可以查看标签管理的概览"
)
@ApiOperation
(
value
=
"标签管理概览"
,
notes
=
"通过这个借口可以查看标签管理的概览"
)
@PostMapping
(
value
=
"/summary"
)
public
ResponseEntity
<
Page
<
DeviceLibrary
>>
getTagSummary
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
public
ResponseEntity
getTagSummary
(
@RequestBody
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
Page
<
DeviceLibrary
>
deviceLibraryEntities
=
deviceLibraryService
.
getPage
(
deviceLibrarySelectVo
,
deviceLibrarySelectVo
.
getPageable
());
return
ResultUtil
.
success
(
deviceLibraryEntities
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论