Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
8f638d2c
提交
8f638d2c
authored
2月 02, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[清退] 代码提交
上级
090d9353
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
17 行增加
和
6 行删除
+17
-6
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+17
-6
没有找到文件。
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
8f638d2c
...
...
@@ -29,9 +29,11 @@ import com.tykj.dev.device.user.subject.service.UserService;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.DeviceLifeStatus
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
...
...
@@ -172,7 +174,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
repelTaskStatisticalService
.
saveAllRepelTaskStatistical
(
list
);
isCommission
(
taskBto
,
deviceRepel1
.
getId
());
// isEnd
(taskBto,deviceRepel1.getId());
}
@Override
...
...
@@ -226,7 +228,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
repelTaskStatisticalService
.
saveAllRepelTaskStatistical
(
list
);
TaskBto
currentTask
=
taskService
.
get
(
taskId
);
taskService
.
moveToSpecial
(
currentTask
,
StatusEnum
.
SEND_BACK_1206
);
isCommission
(
taskBto
,
deviceRepel1
.
getId
());
// isEnd
(taskBto,deviceRepel1.getId());
}
...
...
@@ -300,7 +302,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
repelTaskStatisticalService
.
saveAllRepelTaskStatistical
(
list
);
taskBto
.
setOwnUnit
(
deviceRepel
.
getUnitId
());
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1204
,-
1
);
isCommission
(
taskBto
,
deviceRepel
.
getId
());
// isEnd
(taskBto,deviceRepel.getId());
}
else
{
taskService
.
moveToEnd
(
taskBto
);
...
...
@@ -312,8 +314,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
@Override
public
void
resolveConfirm
(
Integer
taskId
,
Integer
userId
)
{
StringBuffer
ids
=
new
StringBuffer
();
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
StringBuffer
ids
=
new
StringBuffer
();
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
TaskBto
parentTask
=
taskService
.
get
(
taskBto
.
getParentTaskId
());
taskService
.
moveToSpecial
(
parentTask
,
GlobalMap
.
getStatusEnumMap
().
get
(
parentTask
.
getBillStatus
()),
0
);
...
...
@@ -342,10 +345,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
@Override
public
void
submitChooseDevice
(
Integer
taskId
,
ResolveConfirm
resolveConfirm
)
{
long
stime
=
System
.
currentTimeMillis
();
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
isNotSubmit
(
taskBto
,
StatusEnum
.
SEND_BACK_1205
);
log
.
info
(
"提交装备接口开始{}"
,
taskId
);
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
StringBuffer
ids
=
new
StringBuffer
();
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetailNoDev
(
taskBto
.
getBillId
());
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
taskBto
.
getId
(),
deviceRepelDetail
.
getRepelId
());
List
<
ModelCount
>
modelCountList
=
JacksonUtil
.
readValue
(
repelTaskStatistical
.
getModelCount
(),
new
TypeReference
<
List
<
ModelCount
>>()
{});
...
...
@@ -741,7 +745,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
private
void
isEnd
(
TaskBto
taskBto
,
Integer
repelId
){
boolean
flag
=
repelTaskStatisticalService
.
findAllRepelTaskStatistical
(
taskBto
.
getParentTaskId
(),
repelId
).
stream
().
allMatch
(
e
->
e
.
getTaskStatus
()==
1
);
if
(
flag
){
TaskBto
parentTask
=
taskService
.
get
(
taskBto
.
getParentTaskId
());
TaskBto
parentTask
=
taskService
.
get
(
taskBto
.
getParentTaskId
());
taskService
.
moveToSpecial
(
parentTask
,
StatusEnum
.
SEND_BACK_1212
,
0
);
}
}
...
...
@@ -760,4 +764,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
private
void
isNotSubmit
(
TaskBto
taskBto
,
StatusEnum
statusEnum
){
if
(
taskBto
.
getBillStatus
()!=
statusEnum
.
id
){
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"任务已被其他专管员处理"
));
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论