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 d0b75b48
authored
Jan 08, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[chg] 项目合并新增巡检服务单合并
1 parent
5ac12cce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
src/main/java/vion/service/impl/StoreServiceImpl.java
src/main/java/vion/service/impl/StoreServiceImpl.java
View file @
d0b75b4
...
@@ -48,6 +48,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
...
@@ -48,6 +48,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
private
final
IFileService
fileService
;
private
final
IFileService
fileService
;
private
final
IFaultLogService
faultLogService
;
private
final
IFaultLogService
faultLogService
;
private
final
IFormService
formService
;
private
final
IFormService
formService
;
private
final
IInspectService
inspectService
;
private
final
Converter
converter
;
private
final
Converter
converter
;
// 引入 taskService 会循环依赖
// 引入 taskService 会循环依赖
private
final
TaskMapper
taskMapper
;
private
final
TaskMapper
taskMapper
;
...
@@ -233,6 +234,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
...
@@ -233,6 +234,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
public
String
mergeStore
(
StoreDTO
dto
)
{
public
String
mergeStore
(
StoreDTO
dto
)
{
// targetId 合并到 sourceId
// targetId 合并到 sourceId
Long
sourceId
=
dto
.
getSourceId
();
Long
sourceId
=
dto
.
getSourceId
();
Store
store
=
this
.
getById
(
sourceId
);
Long
targetId
=
dto
.
getTargetId
();
Long
targetId
=
dto
.
getTargetId
();
// 项目关联合同合并
// 项目关联合同合并
Opt
.
ofEmptyAble
(
contractStoreService
.
lambdaQuery
().
select
(
RContractStore:
:
getContractId
).
eq
(
RContractStore:
:
getStoreId
,
targetId
).
list
())
Opt
.
ofEmptyAble
(
contractStoreService
.
lambdaQuery
().
select
(
RContractStore:
:
getContractId
).
eq
(
RContractStore:
:
getStoreId
,
targetId
).
list
())
...
@@ -253,7 +255,8 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
...
@@ -253,7 +255,8 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
taskMapper
.
update
(
new
Task
(),
Wrappers
.
lambdaUpdate
(
Task
.
class
).
set
(
Task:
:
getStoreId
,
sourceId
).
eq
(
Task:
:
getStoreId
,
targetId
));
taskMapper
.
update
(
new
Task
(),
Wrappers
.
lambdaUpdate
(
Task
.
class
).
set
(
Task:
:
getStoreId
,
sourceId
).
eq
(
Task:
:
getStoreId
,
targetId
));
fileService
.
lambdaUpdate
().
set
(
FileInfo:
:
getStoreId
,
sourceId
).
eq
(
FileInfo:
:
getStoreId
,
targetId
).
eq
(
FileInfo:
:
getSourceType
,
3
).
update
();
fileService
.
lambdaUpdate
().
set
(
FileInfo:
:
getStoreId
,
sourceId
).
eq
(
FileInfo:
:
getStoreId
,
targetId
).
eq
(
FileInfo:
:
getSourceType
,
3
).
update
();
faultLogService
.
lambdaUpdate
().
set
(
FaultLog:
:
getStoreId
,
sourceId
).
eq
(
FaultLog:
:
getStoreId
,
targetId
).
update
();
faultLogService
.
lambdaUpdate
().
set
(
FaultLog:
:
getStoreId
,
sourceId
).
eq
(
FaultLog:
:
getStoreId
,
targetId
).
update
();
formService
.
lambdaUpdate
().
set
(
Form:
:
getStoreId
,
sourceId
).
eq
(
Form:
:
getStoreId
,
targetId
).
update
(
new
Form
());
formService
.
lambdaUpdate
().
set
(
Form:
:
getStoreId
,
sourceId
).
set
(
Form:
:
getAccountId
,
store
.
getAccountId
()).
eq
(
Form:
:
getStoreId
,
targetId
).
update
(
new
Form
());
inspectService
.
lambdaUpdate
().
set
(
Inspect:
:
getStoreId
,
sourceId
).
set
(
Inspect:
:
getAccountId
,
store
.
getAccountId
()).
eq
(
Inspect:
:
getStoreId
,
targetId
).
update
(
new
Inspect
());
// 删除 targetId 对应的项目
// 删除 targetId 对应的项目
this
.
removeById
(
targetId
);
this
.
removeById
(
targetId
);
return
"合并成功"
;
return
"合并成功"
;
...
...
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