Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
c7f296d0
提交
c7f296d0
authored
9月 16, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加维修
上级
59a978b2
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
177 行增加
和
28 行删除
+177
-28
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+1
-1
RepairBillSelectController.java
.../device/repair/controller/RepairBillSelectController.java
+66
-1
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+59
-19
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+1
-1
BusinessEnum.java
...com/tykj/dev/device/task/subject/common/BusinessEnum.java
+6
-1
TaskSelectController.java
...ev/device/taskselect/controller/TaskSelectController.java
+12
-1
pom.xml
dev-device/device-usereport/pom.xml
+5
-0
DeviceUseReportController.java
...evice/usereport/controller/DeviceUseReportController.java
+12
-1
DeviceUseReportServiceImpl.java
...ce/usereport/service/impl/DeviceUseReportServiceImpl.java
+9
-1
pom.xml
dev-device/pom.xml
+4
-0
application.properties
dev-union/src/main/resources/application.properties
+2
-2
没有找到文件。
dev-device/device-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
c7f296d0
...
@@ -237,6 +237,6 @@ public class DeviceLibraryController {
...
@@ -237,6 +237,6 @@ public class DeviceLibraryController {
public
ResponseEntity
selectNewChangeDevice
(
@PathVariable
(
"id"
)
int
id
)
{
public
ResponseEntity
selectNewChangeDevice
(
@PathVariable
(
"id"
)
int
id
)
{
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
id
);
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
id
);
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
getAllByTypeAndNameAndModel
(
deviceLibrary
.
getType
(),
deviceLibrary
.
getName
(),
deviceLibrary
.
getModel
());
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
getAllByTypeAndNameAndModel
(
deviceLibrary
.
getType
(),
deviceLibrary
.
getName
(),
deviceLibrary
.
getModel
());
return
ResultUtil
.
success
(
deviceLibraries
);
return
ResultUtil
.
success
(
deviceLibraries
.
stream
().
filter
(
deviceLibrary1
->
!
deviceLibrary1
.
getId
().
equals
(
id
)&&
deviceLibrary1
.
getLifeStatus
()==
2
).
collect
(
Collectors
.
toList
())
);
}
}
}
}
dev-device/device-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairBillSelectController.java
浏览文件 @
c7f296d0
package
com
.
tykj
.
dev
.
device
.
repair
.
controller
;
package
com
.
tykj
.
dev
.
device
.
repair
.
controller
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.repair.repository.RepairSendBillDao
;
import
com.tykj.dev.device.repair.service.RepairBillService
;
import
com.tykj.dev.device.repair.service.RepairBillService
;
import
com.tykj.dev.device.repair.service.RepairDetailService
;
import
com.tykj.dev.device.repair.subject.domin.RepairBill
;
import
com.tykj.dev.device.repair.subject.domin.RepairBill
;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
com.tykj.dev.device.repair.subject.domin.RepairSendBill
;
import
com.tykj.dev.device.repair.subject.vo.RepairBillSelectVo
;
import
com.tykj.dev.device.repair.subject.vo.RepairBillSelectVo
;
import
com.tykj.dev.device.task.subject.common.RepairStatusEnum
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -26,6 +33,15 @@ public class RepairBillSelectController {
...
@@ -26,6 +33,15 @@ public class RepairBillSelectController {
@Autowired
@Autowired
private
RepairBillService
repairBillService
;
private
RepairBillService
repairBillService
;
@Autowired
private
RepairSendBillDao
repairSendBillDao
;
@Autowired
private
DeviceLibraryService
deviceLibraryService
;
@Autowired
private
RepairDetailService
repairDetailService
;
@ApiOperation
(
value
=
"查询维修单"
,
notes
=
"可以通过这个接口查询维修单"
)
@ApiOperation
(
value
=
"查询维修单"
,
notes
=
"可以通过这个接口查询维修单"
)
@PostMapping
(
value
=
"/archives/repair/summary"
)
@PostMapping
(
value
=
"/archives/repair/summary"
)
public
ResponseEntity
selectRepairBill
(
@RequestBody
RepairBillSelectVo
repairBillSelectVo
)
{
public
ResponseEntity
selectRepairBill
(
@RequestBody
RepairBillSelectVo
repairBillSelectVo
)
{
...
@@ -38,6 +54,55 @@ public class RepairBillSelectController {
...
@@ -38,6 +54,55 @@ public class RepairBillSelectController {
List
<
Object
>
list
=
new
ArrayList
<>();
List
<
Object
>
list
=
new
ArrayList
<>();
//获取维修单
//获取维修单
RepairBill
repairBill
=
repairBillService
.
getOne
(
id
);
RepairBill
repairBill
=
repairBillService
.
getOne
(
id
);
return
null
;
list
.
add
(
repairBill
);
//获取装备列表
RepairSendBill
repairSendBill
=
repairSendBillDao
.
findByDeviceRepairBillId
(
repairBill
.
getId
());
list
.
add
(
repairSendBill
);
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
if
(
repairSendBill
.
getRepairReciveCheckDetail
()!=
null
)
{
String
[]
strings1
=
repairSendBill
.
getRepairReciveCheckDetail
().
split
(
"x"
);
for
(
String
s
:
strings1
)
{
if
(
s
.
length
()
>=
2
&&
"1"
.
equals
(
s
.
substring
(
s
.
length
()
-
1
)))
{
Integer
deviceId
=
Integer
.
parseInt
(
s
.
substring
(
0
,
s
.
length
()
-
1
));
Integer
checkResult
=
Integer
.
parseInt
(
s
.
substring
(
s
.
length
()
-
1
));
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
deviceId
);
deviceLibraryEntity
.
setCheckResult
(
checkResult
);
deviceLibraries
.
add
(
deviceLibraryEntity
);
}
}
}
//获取维修详情
List
<
RepairDetail
>
repairDetails
=
getRepairDetail
(
repairBill
.
getId
());
//设置装备备注
deviceLibraries
.
forEach
(
deviceLibrary
->
{
for
(
RepairDetail
r:
repairDetails
)
{
if
(
r
.
getDeviceId
().
equals
(
deviceLibrary
.
getId
())){
deviceLibrary
.
setRemark
(
r
.
getRemark
());
}
}
});
list
.
add
(
deviceLibraries
);
return
ResponseEntity
.
ok
(
list
);
}
/**
* @param repairBillId 维修单id
* @return 维修详情列表
* 根据维修单Id查询维修详情,排序返回
*/
private
List
<
RepairDetail
>
getRepairDetail
(
int
repairBillId
){
List
<
RepairDetail
>
repairDetails
=
repairDetailService
.
findByBillId
(
repairBillId
);
List
<
RepairDetail
>
orderList
=
new
ArrayList
<>();
repairDetails
.
forEach
(
repairDetail
->
{
if
(!
repairDetail
.
getRepairStatus
().
equals
(
RepairStatusEnum
.
CHANGE_NEW
.
id
))
{
orderList
.
add
(
repairDetail
);
if
(
repairDetail
.
getRepairStatus
().
equals
(
RepairStatusEnum
.
SCRAPPED
.
id
))
{
if
(
repairDetail
.
getNewDeviceDetailId
()!=
null
&&
repairDetail
.
getNewDeviceDetailId
()
>
0
)
{
orderList
.
add
(
repairDetailService
.
getOne
(
repairDetail
.
getNewDeviceDetailId
()));
}
}
}
});
return
orderList
;
}
}
}
}
dev-device/device-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
c7f296d0
...
@@ -29,11 +29,13 @@ import com.tykj.dev.device.task.subject.common.StatusEnum;
...
@@ -29,11 +29,13 @@ import com.tykj.dev.device.task.subject.common.StatusEnum;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
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.BeanHelper
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.socket.MyWebSocket
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.modelmapper.ModelMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
...
@@ -862,9 +864,12 @@ public class RepairController {
...
@@ -862,9 +864,12 @@ public class RepairController {
Integer
oldStatus
=
repairDetail1
.
getRepairStatus
();
Integer
oldStatus
=
repairDetail1
.
getRepairStatus
();
//修改当前任务维修详情单该装备状态
//修改当前任务维修详情单该装备状态
repairDetail1
.
setRepairStatus
(
repairStatusChangeVo
.
getNewStatus
());
repairDetail1
.
setRepairStatus
(
repairStatusChangeVo
.
getNewStatus
());
//如果修改为已报废,更改新装备详情id为0
//如果修改为已报废,更改新装备详情id为0
,更新装备状态
if
(
repairStatusChangeVo
.
getNewStatus
()==
4
){
if
(
repairStatusChangeVo
.
getNewStatus
()==
4
){
repairDetail1
.
setNewDeviceDetailId
(
0
);
repairDetail1
.
setNewDeviceDetailId
(
0
);
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
repairDetail1
.
getDeviceId
());
deviceLibrary
.
setLifeStatus
(
5
);
deviceLibraryService
.
update
(
deviceLibrary
);
}
}
deviceRepairDetailService
.
update
(
repairDetail1
);
deviceRepairDetailService
.
update
(
repairDetail1
);
//修改父任务中所有维修详情单中的该装备的状态
//修改父任务中所有维修详情单中的该装备的状态
...
@@ -901,23 +906,33 @@ public class RepairController {
...
@@ -901,23 +906,33 @@ public class RepairController {
//获取换新装备
//获取换新装备
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
changeNewDeviceVo
.
getDeviceId
());
DeviceLibrary
deviceLibrary
=
deviceLibraryService
.
getOne
(
changeNewDeviceVo
.
getDeviceId
());
//判断当前装备是否已报废
//判断当前装备是否已报废
if
(
repairDetail1
.
getNewDeviceDetailId
()==
0
){
if
(
repairDetail1
.
getNewDeviceDetailId
()
!=
null
&&
repairDetail1
.
getNewDeviceDetailId
()
==
0
){
//添加新的维修装备详情
//添加新的维修装备详情
RepairDetail
repairDetail
=
new
RepairDetail
();
RepairDetail
repairDetail
=
new
RepairDetail
();
BeanUtils
.
copyProperties
(
repairDetail1
,
repairDetail
);
repairDetail
.
setModel
(
deviceLibrary
.
getModel
());
repairDetail
.
setName
(
deviceLibrary
.
getName
());
repairDetail
.
setType
(
deviceLibrary
.
getType
());
repairDetail
.
setDeviceRepairBillId
(
repairDetail1
.
getDeviceRepairBillId
());
repairDetail
.
setOwnUnit
(
repairDetail1
.
getOwnUnit
());
repairDetail
.
setLocationUnit
(
repairDetail1
.
getLocationUnit
());
repairDetail
.
setRepairStatus
(
RepairStatusEnum
.
CHANGE_NEW
.
id
);
repairDetail
.
setRepairStatus
(
RepairStatusEnum
.
CHANGE_NEW
.
id
);
repairDetail
.
setDeviceId
(
changeNewDeviceVo
.
getDeviceId
());
repairDetail
.
setDeviceId
(
changeNewDeviceVo
.
getDeviceId
());
repairDetail
.
setNewDeviceDetailId
(
null
);
repairDetail
.
setNewDeviceDetailId
(
null
);
repairDetail
.
setRfidSurfaceId
(
deviceLibrary
.
getRfidSurfaceId
());
repairDetail
.
setRfidSurfaceId
(
deviceLibrary
.
getRfidSurfaceId
());
repairDetail
.
setSeqNumber
(
deviceLibrary
.
getSeqNumber
());
repairDetail
.
setSeqNumber
(
deviceLibrary
.
getSeqNumber
());
//当前业务和父任务添加该详情
//当前业务和父任务添加该详情
deviceRepairDetailService
.
save
(
repairDetail
);
RepairDetail
repairDetail8
=
deviceRepairDetailService
.
save
(
repairDetail
);
repairDetail1
.
setNewDeviceDetailId
(
repairDetail8
.
getId
());
deviceRepairDetailService
.
update
(
repairDetail1
);
fathers
.
forEach
(
integer
->
{
fathers
.
forEach
(
integer
->
{
RepairBill
repairBill
=
deviceRepairBillService
.
getOne
(
taskService
.
get
(
integer
).
getBillId
());
RepairBill
repairBill
=
deviceRepairBillService
.
getOne
(
taskService
.
get
(
integer
).
getBillId
());
RepairDetail
repairDetail2
=
new
RepairDetail
();
RepairDetail
repairDetail2
=
new
RepairDetail
();
BeanUtils
.
copyProperties
(
repairDetail
,
repairDetail2
);
RepairDetail
repairDetail3
=
new
RepairDetail
();
BeanUtils
.
copyProperties
(
repairDetail
,
repairDetail3
);
BeanUtils
.
copyProperties
(
repairDetail3
,
repairDetail2
);
repairDetail2
.
setId
(
null
);
repairDetail2
.
setId
(
null
);
repairDetail2
.
setDeviceRepairBillId
(
repairBill
.
getId
());
repairDetail2
.
setDeviceRepairBillId
(
repairBill
.
getId
());
deviceRepairDetailService
.
save
(
repairDetail2
);
});
});
//改变装备的所属
//改变装备的所属
deviceLibrary
.
setOwnUnit
(
repairDetail
.
getOwnUnit
());
deviceLibrary
.
setOwnUnit
(
repairDetail
.
getOwnUnit
());
...
@@ -942,10 +957,19 @@ public class RepairController {
...
@@ -942,10 +957,19 @@ public class RepairController {
//获取装备列表
//获取装备列表
RepairSendBill
repairSendBill
=
deviceRepairSendBillDao
.
findByDeviceRepairBillId
(
repairBill
.
getId
());
RepairSendBill
repairSendBill
=
deviceRepairSendBillDao
.
findByDeviceRepairBillId
(
repairBill
.
getId
());
repairBillDetailVo
.
setRepairSendBill
(
repairSendBill
);
repairBillDetailVo
.
setRepairSendBill
(
repairSendBill
);
List
<
Integer
>
ids
=
StringSplitUtil
.
split
(
repairSendBill
.
getRepairDeviceCheckDetail
());
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibraries
=
ids
.
stream
()
if
(
repairSendBill
.
getRepairDeviceCheckDetail
()!=
null
)
{
.
map
(
integer
->
deviceLibraryService
.
getOne
(
integer
))
String
[]
strings1
=
repairSendBill
.
getRepairDeviceCheckDetail
().
split
(
"x"
);
.
collect
(
Collectors
.
toList
());
for
(
String
s
:
strings1
)
{
if
(
s
.
length
()
>=
2
&&
"1"
.
equals
(
s
.
substring
(
s
.
length
()
-
1
)))
{
Integer
deviceId
=
Integer
.
parseInt
(
s
.
substring
(
0
,
s
.
length
()
-
1
));
Integer
checkResult
=
Integer
.
parseInt
(
s
.
substring
(
s
.
length
()
-
1
));
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
deviceId
);
deviceLibraryEntity
.
setCheckResult
(
checkResult
);
deviceLibraries
.
add
(
deviceLibraryEntity
);
}
}
}
//获取维修详情
//获取维修详情
List
<
RepairDetail
>
repairDetails
=
getRepairDetail
(
repairBill
.
getId
());
List
<
RepairDetail
>
repairDetails
=
getRepairDetail
(
repairBill
.
getId
());
repairBillDetailVo
.
setRepairDetails
(
repairDetails
);
repairBillDetailVo
.
setRepairDetails
(
repairDetails
);
...
@@ -958,18 +982,25 @@ public class RepairController {
...
@@ -958,18 +982,25 @@ public class RepairController {
}
}
});
});
if
(
repairSendBill
.
getRepairReciveCheckDetail
()!=
null
){
if
(
repairSendBill
.
getRepairReciveCheckDetail
()!=
null
){
List
<
Integer
>
integerList
=
StringSplitUtil
.
split
(
repairSendBill
.
getRepairReciveCheckDetail
());
List
<
DeviceLibrary
>
deviceLibraries1
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibraryList
=
integerList
.
stream
()
String
[]
strings
=
repairSendBill
.
getRepairReciveCheckDetail
().
split
(
"x"
);
.
map
(
integer
->
deviceLibraryService
.
getOne
(
integer
))
for
(
String
s
:
strings
)
{
.
collect
(
Collectors
.
toList
());
if
(
s
.
length
()
>=
2
&&
"1"
.
equals
(
s
.
substring
(
s
.
length
()
-
1
)))
{
deviceLibraryList
.
forEach
(
deviceLibrary
->
{
Integer
deviceId
=
Integer
.
parseInt
(
s
.
substring
(
0
,
s
.
length
()
-
1
));
Integer
checkResult
=
Integer
.
parseInt
(
s
.
substring
(
s
.
length
()
-
1
));
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
deviceId
);
deviceLibraryEntity
.
setCheckResult
(
checkResult
);
deviceLibraries1
.
add
(
deviceLibraryEntity
);
}
}
deviceLibraries1
.
forEach
(
deviceLibrary
->
{
for
(
RepairDetail
r:
repairDetails
)
{
for
(
RepairDetail
r:
repairDetails
)
{
if
(
r
.
getDeviceId
().
equals
(
deviceLibrary
.
getId
())){
if
(
r
.
getDeviceId
().
equals
(
deviceLibrary
.
getId
())){
deviceLibrary
.
setRemark
(
r
.
getRemark
());
deviceLibrary
.
setRemark
(
r
.
getRemark
());
}
}
}
}
});
});
repairBillDetailVo
.
setReceiveDevices
(
deviceLibrar
yList
);
repairBillDetailVo
.
setReceiveDevices
(
deviceLibrar
ies1
);
}
}
repairBillDetailVo
.
setDeviceLibraries
(
deviceLibraries
);
repairBillDetailVo
.
setDeviceLibraries
(
deviceLibraries
);
break
;
break
;
...
@@ -989,10 +1020,19 @@ public class RepairController {
...
@@ -989,10 +1020,19 @@ public class RepairController {
repairBackBill
.
setReceiveUserB
(
userPublicService
.
getOne
(
repairBackBill
.
getReceiveUserbId
()).
getName
());
repairBackBill
.
setReceiveUserB
(
userPublicService
.
getOne
(
repairBackBill
.
getReceiveUserbId
()).
getName
());
}
}
//获取装备列表
//获取装备列表
List
<
Integer
>
integers
=
StringSplitUtil
.
split
(
repairBackBill
.
getBackCheckDetail
());
List
<
DeviceLibrary
>
deviceLibraryList
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibraryList
=
integers
.
stream
()
if
(
repairBackBill
.
getBackCheckDetail
()!=
null
)
{
.
map
(
integer
->
deviceLibraryService
.
getOne
(
integer
))
String
[]
strings1
=
repairBackBill
.
getBackCheckDetail
().
split
(
"x"
);
.
collect
(
Collectors
.
toList
());
for
(
String
s
:
strings1
)
{
if
(
s
.
length
()
>=
2
&&
"1"
.
equals
(
s
.
substring
(
s
.
length
()
-
1
)))
{
Integer
deviceId
=
Integer
.
parseInt
(
s
.
substring
(
0
,
s
.
length
()
-
1
));
Integer
checkResult
=
Integer
.
parseInt
(
s
.
substring
(
s
.
length
()
-
1
));
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
deviceId
);
deviceLibraryEntity
.
setCheckResult
(
checkResult
);
deviceLibraryList
.
add
(
deviceLibraryEntity
);
}
}
}
//获取维修详情
//获取维修详情
List
<
RepairDetail
>
repairDetailList
=
getRepairDetail
(
repairBackBill
.
getDeviceRepairBillId
());
List
<
RepairDetail
>
repairDetailList
=
getRepairDetail
(
repairBackBill
.
getDeviceRepairBillId
());
repairBillDetailVo
.
setRepairDetails
(
repairDetailList
);
repairBillDetailVo
.
setRepairDetails
(
repairDetailList
);
...
...
dev-device/device-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
c7f296d0
...
@@ -601,7 +601,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -601,7 +601,7 @@ public class TaskServiceImpl implements TaskService {
predicateBuilder
.
eq
(
"billStatus"
,
StatusEnum
.
ARCHIVE
.
id
);
predicateBuilder
.
eq
(
"billStatus"
,
StatusEnum
.
ARCHIVE
.
id
);
}
}
if
(
taskSelectVo
.
getSelectNum
()==
1
){
if
(
taskSelectVo
.
getSelectNum
()==
1
){
predicateBuilder
.
eq
(
"createUserId"
,
userUtils
.
getCurrentU
nit
Id
());
predicateBuilder
.
eq
(
"createUserId"
,
userUtils
.
getCurrentU
ser
Id
());
}
}
return
predicateBuilder
.
build
();
return
predicateBuilder
.
build
();
}
}
...
...
dev-device/device-task/src/main/java/com/tykj/dev/device/task/subject/common/BusinessEnum.java
浏览文件 @
c7f296d0
...
@@ -84,7 +84,12 @@ public enum BusinessEnum {
...
@@ -84,7 +84,12 @@ public enum BusinessEnum {
/**
/**
* 标签修改
* 标签修改
*/
*/
TAG
(
20
,
"标签修改"
);
TAG
(
20
,
"标签修改"
),
/**
* 工作交接
*/
WORK_HANDOVER
(
21
,
"工作交接"
)
;
public
Integer
id
;
public
Integer
id
;
...
...
dev-device/device-taskselect/src/main/java/com/tykj/dev/device/taskselect/controller/TaskSelectController.java
浏览文件 @
c7f296d0
...
@@ -139,7 +139,6 @@ public class TaskSelectController {
...
@@ -139,7 +139,6 @@ public class TaskSelectController {
list
.
add
(
deviceLibraryService
.
getAllotList
(
new
DeviceLibrarySelectVo
()).
stream
().
filter
(
deviceLibraryEntity
->
packingIdList
.
contains
(
deviceLibraryEntity
.
getPackingId
())).
sorted
(
Comparator
.
comparing
(
DeviceLibrary:
:
getPackingId
)).
collect
(
Collectors
.
toList
()));
list
.
add
(
deviceLibraryService
.
getAllotList
(
new
DeviceLibrarySelectVo
()).
stream
().
filter
(
deviceLibraryEntity
->
packingIdList
.
contains
(
deviceLibraryEntity
.
getPackingId
())).
sorted
(
Comparator
.
comparing
(
DeviceLibrary:
:
getPackingId
)).
collect
(
Collectors
.
toList
()));
return
ResponseEntity
.
ok
(
new
ResultObj
(
list
,
"查询成功"
));
return
ResponseEntity
.
ok
(
new
ResultObj
(
list
,
"查询成功"
));
}
}
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
billId
);
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
billId
);
if
(
allotBillEntity
.
getSendUseraId
()!=
null
)
{
if
(
allotBillEntity
.
getSendUseraId
()!=
null
)
{
allotBillEntity
.
setSenderUserA
(
userPublicService
.
getOne
(
allotBillEntity
.
getSendUseraId
()).
getName
());
allotBillEntity
.
setSenderUserA
(
userPublicService
.
getOne
(
allotBillEntity
.
getSendUseraId
()).
getName
());
...
@@ -156,6 +155,18 @@ public class TaskSelectController {
...
@@ -156,6 +155,18 @@ public class TaskSelectController {
list
.
add
(
allotBillEntity
);
list
.
add
(
allotBillEntity
);
String
str2
=
allotBillEntity
.
getAllotCheckDetail
();
String
str2
=
allotBillEntity
.
getAllotCheckDetail
();
List
<
DeviceLibrary
>
deviceLibraryEntities
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibraryEntities
=
new
ArrayList
<>();
if
(
str2
!=
null
)
{
String
[]
strings1
=
str2
.
split
(
"x"
);
for
(
String
s
:
strings1
)
{
if
(
s
.
length
()
>=
2
&&
"1"
.
equals
(
s
.
substring
(
s
.
length
()
-
1
)))
{
Integer
id
=
Integer
.
parseInt
(
s
.
substring
(
0
,
s
.
length
()
-
1
));
Integer
checkResult
=
Integer
.
parseInt
(
s
.
substring
(
s
.
length
()
-
1
));
DeviceLibrary
deviceLibraryEntity
=
deviceLibraryService
.
getOne
(
id
);
deviceLibraryEntity
.
setCheckResult
(
checkResult
);
deviceLibraryEntities
.
add
(
deviceLibraryEntity
);
}
}
}
list
.
add
(
deviceLibraryEntities
);
list
.
add
(
deviceLibraryEntities
);
return
ResponseEntity
.
ok
(
new
ResultObj
(
list
,
"查询成功"
));
return
ResponseEntity
.
ok
(
new
ResultObj
(
list
,
"查询成功"
));
case
4
:
case
4
:
...
...
dev-device/device-usereport/pom.xml
浏览文件 @
c7f296d0
...
@@ -42,5 +42,9 @@
...
@@ -42,5 +42,9 @@
<groupId>
com.tykj.dev
</groupId>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
device-user
</artifactId>
<artifactId>
device-user
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
device-repair
</artifactId>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
dev-device/device-usereport/src/main/java/com/tykj/dev/device/usereport/controller/DeviceUseReportController.java
浏览文件 @
c7f296d0
package
com
.
tykj
.
dev
.
device
.
usereport
.
controller
;
package
com
.
tykj
.
dev
.
device
.
usereport
.
controller
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.file.entity.WrodParameter
;
import
com.tykj.dev.device.usereport.service.DeviceUseReportService
;
import
com.tykj.dev.device.usereport.service.DeviceUseReportService
;
import
com.tykj.dev.device.usereport.subject.domin.DeviceUseReport
;
import
com.tykj.dev.device.usereport.subject.domin.DeviceUseReport
;
import
com.tykj.dev.device.usereport.subject.vo.DeviceUseReportCreateVo
;
import
com.tykj.dev.device.usereport.subject.vo.DeviceUseReportCreateVo
;
...
@@ -16,7 +17,9 @@ import org.springframework.data.domain.Page;
...
@@ -16,7 +17,9 @@ import org.springframework.data.domain.Page;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
/**
/**
* @author dengdiyi
* @author dengdiyi
...
@@ -67,7 +70,15 @@ public class DeviceUseReportController {
...
@@ -67,7 +70,15 @@ public class DeviceUseReportController {
@ApiOperation
(
value
=
"装备使用报告下载"
,
notes
=
"装备使用报告下载"
)
@ApiOperation
(
value
=
"装备使用报告下载"
,
notes
=
"装备使用报告下载"
)
@GetMapping
(
"/download/{id}"
)
@GetMapping
(
"/download/{id}"
)
public
ResponseEntity
getDownloadUrl
(
@PathVariable
(
"id"
)
int
id
){
public
ResponseEntity
getDownloadUrl
(
@PathVariable
(
"id"
)
int
id
){
DeviceUseReport
d
=
deviceUseReportService
.
getOne
(
id
);
DeviceUseReportDetailVo
deviceUseReportDetailVo
=
(
DeviceUseReportDetailVo
)
selectDetail
(
id
).
getBody
();
WrodParameter
wrodParameter
=
new
WrodParameter
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
Objects
.
requireNonNull
(
deviceUseReportDetailVo
).
getCreateTime
());
StringBuffer
stringBuffer
=
new
StringBuffer
();
stringBuffer
.
append
(
calendar
.
get
(
Calendar
.
YEAR
)).
append
(
"年"
).
append
(
calendar
.
get
(
Calendar
.
MONTH
)).
append
(
"月"
).
append
(
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
)).
append
(
"日"
);
wrodParameter
.
setTime
(
stringBuffer
.
toString
());
wrodParameter
.
setUnitsName
(
deviceUseReportDetailVo
.
getUnit
());
wrodParameter
.
setTotal
(
deviceUseReportDetailVo
.
getDeviceNumber
().
toString
());
return
null
;
return
null
;
}
}
}
}
dev-device/device-usereport/src/main/java/com/tykj/dev/device/usereport/service/impl/DeviceUseReportServiceImpl.java
浏览文件 @
c7f296d0
...
@@ -10,6 +10,8 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
...
@@ -10,6 +10,8 @@ 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.DeviceLibrarySelectVo
;
import
com.tykj.dev.device.packing.repository.PackingLibraryDao
;
import
com.tykj.dev.device.packing.repository.PackingLibraryDao
;
import
com.tykj.dev.device.packing.subject.domin.PackingLibrary
;
import
com.tykj.dev.device.packing.subject.domin.PackingLibrary
;
import
com.tykj.dev.device.repair.repository.RepairDetailDao
;
import
com.tykj.dev.device.repair.subject.domin.RepairDetail
;
import
com.tykj.dev.device.sendback.repository.SendBackBillDetailDao
;
import
com.tykj.dev.device.sendback.repository.SendBackBillDetailDao
;
import
com.tykj.dev.device.sendback.subject.domin.SendBackBillDetail
;
import
com.tykj.dev.device.sendback.subject.domin.SendBackBillDetail
;
import
com.tykj.dev.device.storage.repository.StorageBillDao
;
import
com.tykj.dev.device.storage.repository.StorageBillDao
;
...
@@ -67,6 +69,9 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -67,6 +69,9 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
@Autowired
@Autowired
private
PackingLibraryDao
packingLibraryDao
;
private
PackingLibraryDao
packingLibraryDao
;
@Autowired
private
RepairDetailDao
repairDetailDao
;
@Override
@Override
public
DeviceUseReport
addEntity
(
DeviceUseReport
deviceUseReportEntity
)
{
public
DeviceUseReport
addEntity
(
DeviceUseReport
deviceUseReportEntity
)
{
return
deviceUseReportDao
.
save
(
deviceUseReportEntity
);
return
deviceUseReportDao
.
save
(
deviceUseReportEntity
);
...
@@ -201,7 +206,10 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -201,7 +206,10 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
sendBackNum
=
sendBackNum
+
s
.
getSendedCount
();
sendBackNum
=
sendBackNum
+
s
.
getSendedCount
();
}
}
}
}
// ToDo 维修数量
List
<
RepairDetail
>
repairDetails
=
repairDetailDao
.
findAll
().
stream
()
.
filter
(
repairDetail
->
repairDetail
.
getOwnUnit
().
equals
(
userUtils
.
getCurrentUserUnitName
())&&
repairDetail
.
getRepairStatus
()!=
3
&&
repairDetail
.
getCreateTime
().
after
(
date
)&&
repairDetail
.
getCreateTime
().
before
(
date2
))
.
collect
(
Collectors
.
toList
());
repairNum
=
repairDetails
.
size
();
//拼接组合字段
//拼接组合字段
deviceUseReportEntity
.
setReportDetail
(
num
+
"x"
+
inLibraryNum
+
"x"
+
repairNum
+
"x"
+
allotNum
+
"x"
+
sendBackNum
+
"x"
+
destoryNum
+
"x"
+
packingNum
+
"x"
+
retiredNum
+
"x"
);
deviceUseReportEntity
.
setReportDetail
(
num
+
"x"
+
inLibraryNum
+
"x"
+
repairNum
+
"x"
+
allotNum
+
"x"
+
sendBackNum
+
"x"
+
destoryNum
+
"x"
+
packingNum
+
"x"
+
retiredNum
+
"x"
);
return
deviceUseReportDao
.
save
(
deviceUseReportEntity
);
return
deviceUseReportDao
.
save
(
deviceUseReportEntity
);
...
...
dev-device/pom.xml
浏览文件 @
c7f296d0
...
@@ -142,6 +142,10 @@
...
@@ -142,6 +142,10 @@
</exclusion>
</exclusion>
</exclusions>
</exclusions>
</dependency>
</dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
device-file
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
com.tykj.dev
</groupId>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
misc
</artifactId>
<artifactId>
misc
</artifactId>
...
...
dev-union/src/main/resources/application.properties
浏览文件 @
c7f296d0
...
@@ -4,7 +4,7 @@ server.port=8087
...
@@ -4,7 +4,7 @@ server.port=8087
logging.file
=
/opt/eqlog/equip.log
logging.file
=
/opt/eqlog/equip.log
spring.servlet.multipart.max-file-size
=
400MB
spring.servlet.multipart.max-file-size
=
400MB
spring.servlet.multipart.max-request-size
=
400MB
spring.servlet.multipart.max-request-size
=
400MB
spring.jpa.hibernate.ddl-auto
=
updat
e
spring.jpa.hibernate.ddl-auto
=
non
e
spring.jpa.show-sql
=
false
spring.jpa.show-sql
=
false
spring.jpa.open-in-view
=
true
spring.jpa.open-in-view
=
true
spring.main.allow-bean-definition-overriding
=
true
spring.main.allow-bean-definition-overriding
=
true
...
@@ -14,7 +14,7 @@ spring.datasource.password=root
...
@@ -14,7 +14,7 @@ spring.datasource.password=root
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
#spring.datasource.driver-class-name=com.oscar.Driver
#spring.datasource.driver-class-name=com.oscar.Driver
#spring.datasource.url=jdbc:oscar://192.168.0.80:2003/OSRDB
#spring.datasource.url=jdbc:oscar://192.168.0.80:2003/OSRDB
spring.datasource.url
=
jdbc:mysql://192.168.1
.249:3306/management
?useSSL=false&serverTimezone=UTC&autoReconnect=true&characterEncoding=utf-8
spring.datasource.url
=
jdbc:mysql://192.168.1
00.249:3306/device
?useSSL=false&serverTimezone=UTC&autoReconnect=true&characterEncoding=utf-8
#spring.datasource.username=SYSDBA
#spring.datasource.username=SYSDBA
#spring.datasource.password=szoscar55
#spring.datasource.password=szoscar55
#spring.jpa.database-platform=org.hibernate.dialect.OscarDialect
#spring.jpa.database-platform=org.hibernate.dialect.OscarDialect
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论