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 ea9ec968
authored
Dec 26, 2023
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
查询模板列表(倒序返回)、"更新模板实例节点输入参数"接口
1 parent
050a939f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
4 deletions
platform-process-api/src/main/java/cn/com/glsx/process/modules/mapper/SopInstNodeMapper.java
platform-process/src/main/java/cn/com/glsx/process/modules/controller/SopInstNodeController.java
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopInstNodeService.java
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopTplService.java
platform-process/src/main/resources/mapper/SopInstNodeMapper.xml
platform-process-api/src/main/java/cn/com/glsx/process/modules/mapper/SopInstNodeMapper.java
View file @
ea9ec96
...
@@ -18,4 +18,6 @@ public interface SopInstNodeMapper extends CommonBaseMapper<SopInstNode> {
...
@@ -18,4 +18,6 @@ public interface SopInstNodeMapper extends CommonBaseMapper<SopInstNode> {
int
resetInstNodeDailyCount
(
@Param
(
"instId"
)
String
instId
);
int
resetInstNodeDailyCount
(
@Param
(
"instId"
)
String
instId
);
PageInfo
<
SopTaskDTO
>
findPageListByInstId
(
@Param
(
"instId"
)
String
instId
);
PageInfo
<
SopTaskDTO
>
findPageListByInstId
(
@Param
(
"instId"
)
String
instId
);
int
updateNodeParamById
(
SopInstNode
node
);
}
}
\ No newline at end of file
\ No newline at end of file
platform-process/src/main/java/cn/com/glsx/process/modules/controller/SopInstNodeController.java
0 → 100644
View file @
ea9ec96
package
cn
.
com
.
glsx
.
process
.
modules
.
controller
;
import
cn.com.glsx.process.modules.BaseController
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.service.SopInstNodeService
;
import
com.glsx.plat.core.annotation.ResponseResultBody
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
@Slf4j
@Tag
(
name
=
"SOP门店模板实例节点开放接口"
)
@RestController
@RequestMapping
(
value
=
"/sop/api/sopInstNodes"
)
@ResponseResultBody
public
class
SopInstNodeController
extends
BaseController
{
@Resource
private
SopInstNodeService
sopInstNodeService
;
@Operation
(
summary
=
"更新SOP模板实例节点输入参数"
,
description
=
"更新SOP模板实例节点输入参数"
)
@PostMapping
(
"/updateParam"
)
public
String
updateNodeParam
(
@RequestBody
SopInstNode
node
)
{
log
.
info
(
"更新节点输入参数 入参:instNodeId {} nodeParam {}"
,
node
.
getInstNodeId
(),
node
.
getNodeParam
());
sopInstNodeService
.
updateNodeParam
(
node
);
return
"success"
;
}
}
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopInstNodeService.java
View file @
ea9ec96
package
cn
.
com
.
glsx
.
process
.
modules
.
service
;
package
cn
.
com
.
glsx
.
process
.
modules
.
service
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
cn.com.glsx.process.common.sysenum.ResultEnum
;
import
org.springframework.stereotype.Service
;
import
cn.com.glsx.process.exception.AdminException
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.entity.SopInstNode
;
import
cn.com.glsx.process.modules.mapper.SopInstNodeMapper
;
import
cn.com.glsx.process.modules.mapper.SopInstNodeMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
@Service
@Service
public
class
SopInstNodeService
{
public
class
SopInstNodeService
{
...
@@ -14,6 +17,15 @@ public class SopInstNodeService {
...
@@ -14,6 +17,15 @@ public class SopInstNodeService {
@Autowired
@Autowired
private
SopInstNodeMapper
sopInstNodeMapper
;
private
SopInstNodeMapper
sopInstNodeMapper
;
@Transactional
public
void
updateNodeParam
(
SopInstNode
node
)
{
if
(
Objects
.
isNull
(
node
.
getInstNodeId
()))
{
throw
new
AdminException
(
ResultEnum
.
PARAM_ERROR
.
getCode
(),
"实例节点id必传!"
);
}
sopInstNodeMapper
.
updateNodeParamById
(
node
);
}
/**
/**
* 根据id查询
* 根据id查询
*
*
...
...
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopTplService.java
View file @
ea9ec96
...
@@ -75,7 +75,7 @@ public class SopTplService {
...
@@ -75,7 +75,7 @@ public class SopTplService {
* @return
* @return
*/
*/
public
List
<
SopTpl
>
list
()
{
public
List
<
SopTpl
>
list
()
{
return
sopTplMapper
.
select
All
(
);
return
sopTplMapper
.
select
ByExample
(
Example
.
builder
(
SopTpl
.
class
).
orderByDesc
(
"updateTime"
).
build
()
);
}
}
@Transactional
@Transactional
...
...
platform-process/src/main/resources/mapper/SopInstNodeMapper.xml
View file @
ea9ec96
...
@@ -44,4 +44,8 @@
...
@@ -44,4 +44,8 @@
update sop_inst_node set daily_count=0 where inst_id=#{instId}
update sop_inst_node set daily_count=0 where inst_id=#{instId}
</update>
</update>
<update
id=
"updateNodeParamById"
>
update sop_inst_node set node_param = CAST(#{nodeParam} AS JSON) where inst_node_id = #{instNodeId}
</update>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
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