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 265d7033
authored
Sep 12, 2023
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]新增1个接口:根据门店旅程实例id查询详情
1 parent
294ce56e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
platform-process/src/main/java/cn/com/glsx/process/modules/controller/SopInstController.java
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopInstService.java
platform-process/src/main/java/cn/com/glsx/process/modules/controller/SopInstController.java
View file @
265d703
...
...
@@ -2,6 +2,7 @@ package cn.com.glsx.process.modules.controller;
import
cn.com.glsx.process.modules.BaseController
;
import
cn.com.glsx.process.modules.entity.SopInst
;
import
cn.com.glsx.process.modules.model.SopInstDTO
;
import
cn.com.glsx.process.modules.model.SopInstSearch
;
import
cn.com.glsx.process.modules.service.SopInstService
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -11,6 +12,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -32,4 +34,10 @@ public class SopInstController extends BaseController {
return
sopInstService
.
selectByGroupId
(
search
);
}
@Operation
(
summary
=
"根据id查询SOP门店模板实例详情"
,
description
=
"根据id查询SOP门店模板实例详情"
)
@GetMapping
(
"/{instId}"
)
public
SopInstDTO
findById
(
@PathVariable
(
"instId"
)
String
instId
)
{
return
sopInstService
.
findById
(
instId
);
}
}
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopInstService.java
View file @
265d703
...
...
@@ -37,8 +37,9 @@ public class SopInstService {
* @param instId
* @return
*/
private
SopInst
findById
(
Integer
instId
)
{
return
sopInstMapper
.
selectByPrimaryKey
(
instId
);
public
SopInstDTO
findById
(
String
instId
)
{
SopInst
sopInst
=
sopInstMapper
.
selectByPrimaryKey
(
instId
);
return
getSopInstOtherInfo
(
sopInst
);
}
/**
...
...
@@ -104,8 +105,21 @@ public class SopInstService {
return
null
;
}
Assert
.
state
(
sopInsts
.
size
()
<
2
,
"根据查询条件找到多条记录,请检查参数是否有误!"
);
return
getSopInstOtherInfo
(
sopInsts
.
get
(
0
));
}
/**
* 补充门店旅程实例其它信息
*
* @param sopInst
* @return
*/
private
SopInstDTO
getSopInstOtherInfo
(
SopInst
sopInst
)
{
if
(
sopInst
==
null
)
{
return
null
;
}
SopInstDTO
sopInstDTO
=
SopInstConverter
.
INSTANCE
.
do2dto
(
sopInst
s
.
get
(
0
)
);
SopInstDTO
sopInstDTO
=
SopInstConverter
.
INSTANCE
.
do2dto
(
sopInst
);
String
instId
=
sopInstDTO
.
getInstId
();
SopInstNode
nodeQuery
=
new
SopInstNode
();
nodeQuery
.
setInstId
(
instId
);
...
...
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