Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e0388d33
authored
Jan 22, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[add] 预工单确认为工单后,预工单文件同步一份到工单
1 parent
ce684107
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
7 deletions
src/main/java/vion/service/impl/TaskServiceImpl.java
src/main/java/vion/service/impl/TaskServiceImpl.java
View file @
e0388d3
...
@@ -70,14 +70,16 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
...
@@ -70,14 +70,16 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
.
leftJoin
(
ServiceOrder
.
class
,
ServiceOrder:
:
getTaskId
,
Task:
:
getId
)
.
leftJoin
(
ServiceOrder
.
class
,
ServiceOrder:
:
getTaskId
,
Task:
:
getId
)
.
between
(
ArrayUtil
.
isAllNotNull
(
data
.
getStartdate
(),
data
.
getEnddate
()),
Task:
:
getRepairTime
,
data
.
getStartdate
(),
data
.
getEnddate
())
.
between
(
ArrayUtil
.
isAllNotNull
(
data
.
getStartdate
(),
data
.
getEnddate
()),
Task:
:
getRepairTime
,
data
.
getStartdate
(),
data
.
getEnddate
())
.
lt
(
data
.
getCurDate
()
!=
null
,
Task:
:
getExpDate
,
data
.
getCurDate
());
.
lt
(
data
.
getCurDate
()
!=
null
,
Task:
:
getExpDate
,
data
.
getCurDate
());
// todo 优化
if
(
taskIdSet
.
size
()
==
1
&&
CollUtil
.
get
(
taskIdSet
,
0
).
equals
(-
99L
)
)
{
if
(
taskIdSet
.
size
()
==
1
)
{
// 不是管理员,并且第一次处理工单,但当前处理人是他
Long
taskId
=
CollUtil
.
get
(
taskIdSet
,
0
);
}
else
if
(
taskIdSet
.
size
()
==
1
&&
CollUtil
.
get
(
taskIdSet
,
0
).
equals
(
0L
))
{
// 不是管理员,并且第一次处理工单,但当前处理人是他 || 管理员逻辑
// 管理员逻辑
if
(
taskId
.
equals
(-
99L
)
||
taskId
.
equals
(
0L
))
{
}
else
{
return
this
.
selectJoinListPage
(
Page
.
of
(
data
.
getPageNum
(),
data
.
getPageSize
()),
TaskVO
.
class
,
wrapper
);
wrapper
.
in
(
Task:
:
getId
,
taskIdSet
);
}
}
}
wrapper
.
in
(
Task:
:
getId
,
taskIdSet
);
return
this
.
selectJoinListPage
(
Page
.
of
(
data
.
getPageNum
(),
data
.
getPageSize
()),
TaskVO
.
class
,
wrapper
);
return
this
.
selectJoinListPage
(
Page
.
of
(
data
.
getPageNum
(),
data
.
getPageSize
()),
TaskVO
.
class
,
wrapper
);
}
}
...
@@ -175,6 +177,32 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
...
@@ -175,6 +177,32 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
task
.
setCreateUser
(
user
.
getId
());
task
.
setCreateUser
(
user
.
getId
());
task
.
setUuid
(
IdUtil
.
nanoId
());
task
.
setUuid
(
IdUtil
.
nanoId
());
this
.
save
(
task
);
this
.
save
(
task
);
// 预工单文件在工单创建时,复制一份到工单文件夹下
Opt
.
ofNullable
(
data
.
getTaskTempId
())
.
map
(
taskTempId
->
fileService
.
lambdaQuery
()
.
eq
(
FileInfo:
:
getSourceId
,
taskTempId
)
.
eq
(
FileInfo:
:
getSourceType
,
2
)
.
eq
(
FileInfo:
:
getStoreId
,
0L
)
.
list
()
)
.
filter
(
CollUtil:
:
isNotEmpty
)
.
ifPresent
(
fileInfoList
->
fileInfoList
.
forEach
(
fileInfo
->
{
String
path
=
fileUrl
+
FileUtil
.
FILE_SEPARATOR
+
task
.
getStoreId
()
+
FileUtil
.
FILE_SEPARATOR
+
task
.
getId
()
+
FileUtil
.
FILE_SEPARATOR
+
fileInfo
.
getName
();
File
tarFile
=
FileUtil
.
copy
(
fileInfo
.
getUrl
(),
path
,
true
);
FileInfo
newFileInfo
=
new
FileInfo
();
newFileInfo
.
setStoreId
(
task
.
getStoreId
());
newFileInfo
.
setSourceId
(
task
.
getId
());
newFileInfo
.
setSourceType
(
3
);
newFileInfo
.
setName
(
fileInfo
.
getName
());
newFileInfo
.
setUrl
(
path
);
newFileInfo
.
setType
(
fileInfo
.
getType
());
newFileInfo
.
setSha256
(
fileInfo
.
getSha256
());
newFileInfo
.
setUploader
(
fileInfo
.
getUploader
());
fileService
.
save
(
newFileInfo
);
}));
List
<
FaultLog
>
saveList
=
new
ArrayList
<>();
List
<
FaultLog
>
saveList
=
new
ArrayList
<>();
// 预工单提交,客户名称不在系统用户表内。单独处理客户提交的预工单日志
// 预工单提交,客户名称不在系统用户表内。单独处理客户提交的预工单日志
FaultLog
faultLog
=
new
FaultLog
();
FaultLog
faultLog
=
new
FaultLog
();
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment