Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-process-server
This project
Loading...
Sign in
Toggle navigation
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 6b1352c7
authored
Jan 04, 2024
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
实例开启时,增加前置动作:更新 更新客户阶段的sql
1 parent
434c6d60
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
platform-process/src/main/java/cn/com/glsx/process/modules/assembler/KeHuLvChengAssembler.java
platform-process/src/main/java/cn/com/glsx/process/modules/converter/SopInstConverter.java
platform-process/src/main/java/cn/com/glsx/process/modules/assembler/KeHuLvChengAssembler.java
View file @
6b1352c
...
@@ -2,6 +2,7 @@ package cn.com.glsx.process.modules.assembler;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.process.modules.assembler;
import
cn.com.glsx.process.common.sysenum.ResultEnum
;
import
cn.com.glsx.process.common.sysenum.ResultEnum
;
import
cn.com.glsx.process.exception.AdminException
;
import
cn.com.glsx.process.exception.AdminException
;
import
cn.com.glsx.process.modules.converter.SopInstConverter
;
import
cn.com.glsx.process.modules.converter.SopTplNodeProtoConverter
;
import
cn.com.glsx.process.modules.converter.SopTplNodeProtoConverter
;
import
cn.com.glsx.process.modules.entity.*
;
import
cn.com.glsx.process.modules.entity.*
;
import
cn.com.glsx.process.modules.mapper.SopInstNodeMapper
;
import
cn.com.glsx.process.modules.mapper.SopInstNodeMapper
;
...
@@ -283,11 +284,13 @@ public class KeHuLvChengAssembler {
...
@@ -283,11 +284,13 @@ public class KeHuLvChengAssembler {
Integer
sourceId
=
lastLink
.
getSourceId
();
Integer
sourceId
=
lastLink
.
getSourceId
();
SopInstNode
updateStageNode
=
nodes
.
stream
().
filter
(
node
->
node
.
getNodeId
().
equals
(
sourceId
)).
findFirst
().
get
();
SopInstNode
updateStageNode
=
nodes
.
stream
().
filter
(
node
->
node
.
getNodeId
().
equals
(
sourceId
)).
findFirst
().
get
();
// TODO 获取阶段更新的sql
// 获取阶段更新的sql
SopInst
sopInst
=
SopInstConverter
.
INSTANCE
.
dto2do
(
instDTO
);
Map
<
String
,
String
>
stageSqlMap
=
sopDataService
.
parseSQL
(
sopInst
);
String
updateSql
=
String
.
join
(
"\n"
,
stageSqlMap
.
values
());
String
nodeContent
=
updateStageNode
.
getNodeContent
();
String
nodeContent
=
updateStageNode
.
getNodeContent
();
Map
<
String
,
Object
>
nodeContentMap
=
JSON
.
parseObject
(
nodeContent
,
Map
.
class
);
Map
<
String
,
Object
>
nodeContentMap
=
JSON
.
parseObject
(
nodeContent
,
Map
.
class
);
String
updateSql
=
nodeContentMap
.
get
(
"source"
).
toString
();
nodeContentMap
.
put
(
"source"
,
updateSql
);
nodeContentMap
.
put
(
"source"
,
updateSql
);
sopInstNodeMapper
.
updateNodeContentById
(
updateStageNode
.
getInstNodeId
(),
JSON
.
toJSONString
(
nodeContentMap
));
sopInstNodeMapper
.
updateNodeContentById
(
updateStageNode
.
getInstNodeId
(),
JSON
.
toJSONString
(
nodeContentMap
));
}
}
...
...
platform-process/src/main/java/cn/com/glsx/process/modules/converter/SopInstConverter.java
View file @
6b1352c
...
@@ -11,7 +11,7 @@ public interface SopInstConverter {
...
@@ -11,7 +11,7 @@ public interface SopInstConverter {
SopInstConverter
INSTANCE
=
Mappers
.
getMapper
(
SopInstConverter
.
class
);
SopInstConverter
INSTANCE
=
Mappers
.
getMapper
(
SopInstConverter
.
class
);
SopInst
d
o2do
(
SopInst
sopInst
);
SopInst
d
to2do
(
SopInstDTO
sopInstDTO
);
SopInstDTO
do2dto
(
SopInst
sopInst
);
SopInstDTO
do2dto
(
SopInst
sopInst
);
...
...
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