Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
d62126c3
提交
d62126c3
authored
11月 03, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(维修管理): 添加日志排除已领取的bug
添加日志排除已领取的bug
上级
05506bf6
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
14 行增加
和
5 行删除
+14
-5
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+11
-5
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+3
-0
没有找到文件。
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
d62126c3
...
...
@@ -46,6 +46,7 @@ import com.tykj.dev.rfid.service.InputOutputDeviceService;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
...
...
@@ -65,6 +66,7 @@ import java.util.stream.Collectors;
@RequestMapping
(
value
=
"/repair"
)
@AutoDocument
@Api
(
tags
=
"维修模块"
,
description
=
"维修模块"
)
@Slf4j
public
class
RepairController
{
@Autowired
...
...
@@ -1909,8 +1911,11 @@ public class RepairController {
throw
new
ApiException
(
"区县没有维修完成列表"
);
}
repairDetails
.
forEach
(
RepairDetail:
:
setConfigName
);
log
.
info
(
"repairDetails:{}"
,
repairDetails
);
List
<
String
>
units
=
unitsService
.
findSuperiorUnitsList
().
stream
().
map
(
Units:
:
getName
).
collect
(
Collectors
.
toList
());
units
.
addAll
(
unitsService
.
findBySubordinateNotOneself
(
userUtils
.
getCurrentUnitId
()).
stream
().
map
(
Units:
:
getName
).
collect
(
Collectors
.
toList
()));
units
.
addAll
(
unitsService
.
findBySubordinateNotOneself
(
userUtils
.
getCurrentUnitId
()).
stream
()
.
map
(
Units:
:
getName
).
collect
(
Collectors
.
toList
()));
log
.
info
(
"units:{}"
,
units
);
//所在单位在当前单位下级的
// List<RepairDetail> repairDetails2 = repairDetails.stream().filter(repairDetail -> units.contains(repairDetail.getLocationUnit()) && (!hasYear || repairDetail.getUpdateTime().getYear() == year - 1900)).collect(Collectors.toList());
// List<RepairDetail> repairDetails2 = repairDetails.stream()
...
...
@@ -1923,12 +1928,14 @@ public class RepairController {
&&
(!
hasYear
||
repairDetail
.
getUpdateTime
().
getYear
()
==
year
-
1900
))
.
filter
(
repairDetail
->
repairDetail
.
getRepairBackBillId
()!=
null
)
.
collect
(
Collectors
.
toList
());
log
.
info
(
"repairDetails2:{}"
,
repairDetails2
);
List
<
EquipmentReceivedVo
>
equipmentReceivedVos
=
new
ArrayList
<>();
TaskUserVo
taskUserVo
=
null
;
TaskUserVo
taskUserVo1
=
null
;
for
(
RepairDetail
repairDetail
:
repairDetails2
)
{
if
(
repairDetail
.
getRepairBackBillId
()!=
null
){
TaskBto
taskBto
=
taskService
.
getParentTaskIsNull
(
repairDetail
.
getRepairBackBillId
(),
10
);
log
.
info
(
"维修退回taskBto:{}"
,
taskBto
);
if
(
taskBto
!=
null
){
taskUserVo
=
taskBto
.
toVo
();
}
...
...
@@ -1936,6 +1943,7 @@ public class RepairController {
if
(
repairDetail
.
getDeviceRepairBillId
()
!=
null
&&
repairDetail
.
getDeviceRepairBillId
()
!=
0
){
TaskBto
taskBto1
=
taskService
.
getParentTaskIsNull
(
repairDetail
.
getDeviceRepairBillId
(),
5
);
if
(
taskBto1
!=
null
){
log
.
info
(
"送修taskBto1:{}"
,
taskBto1
);
taskUserVo1
=
taskBto1
.
toVo
();
}
}
...
...
@@ -1958,9 +1966,7 @@ public class RepairController {
}
else
{
throw
new
ApiException
(
"区县没有维修完成列表"
);
}
repairDetails
.
forEach
(
repairDetail
->
{
repairDetail
.
setConfigName
();
});
repairDetails
.
forEach
(
RepairDetail:
:
setConfigName
);
List
<
RepairDetail
>
repairDetails2
=
repairDetails
.
stream
().
filter
(
repairDetail
->
!
hasYear
||
repairDetail
.
getUpdateTime
().
getYear
()
==
year
-
1900
).
collect
(
Collectors
.
toList
());
//按照时间排序
List
<
RepairDetail
>
repairDetailList
=
repairDetails2
.
stream
().
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getUpdateTime
)).
collect
(
Collectors
.
toList
());
...
...
@@ -2049,7 +2055,7 @@ public class RepairController {
@ApiOperation
(
value
=
"查询待领取装备阅知详情"
,
notes
=
"可以通过这个接口查询待领取装备阅知详情"
)
@GetMapping
(
value
=
"/read/detail/{string}"
)
public
ResponseEntity
getDetail
(
@PathVariable
(
"string"
)
String
string
)
{
public
ResponseEntity
<
List
<
RepairDetail
>>
getDetail
(
@PathVariable
(
"string"
)
String
string
)
{
List
<
RepairDetail
>
repairDetails
=
new
ArrayList
<>();
List
<
Integer
>
ids
=
StringSplitUtil
.
userIdSplit
(
string
);
ids
.
forEach
(
integer
->
{
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
d62126c3
...
...
@@ -34,6 +34,7 @@ import com.tykj.dev.misc.exception.ApiException;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.socket.MyWebSocket
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -52,6 +53,7 @@ import java.util.stream.Collectors;
* @author dengdiyi
*/
@Service
@Slf4j
public
class
TaskServiceImpl
implements
TaskService
{
@Autowired
...
...
@@ -420,6 +422,7 @@ public class TaskServiceImpl implements TaskService {
@Override
public
TaskBto
getParentTaskIsNull
(
Integer
billId
,
Integer
businessType
)
{
List
<
Task
>
tasks
=
taskDao
.
findAllByBillIdAndBusinessType
(
billId
,
businessType
);
log
.
info
(
"tasks:{}"
,
tasks
);
tasks
=
tasks
.
stream
().
filter
(
task
->
task
.
getParentTaskId
()
==
null
).
collect
(
Collectors
.
toList
());
if
(
tasks
.
size
()==
0
){
return
new
TaskBto
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论