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 77415feb
authored
Dec 28, 2023
by
林永健
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改条件查询接口
1 parent
550021ef
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
5 deletions
platform-process-api/src/main/java/cn/com/glsx/process/modules/entity/SopDataFilterAction.java
platform-process-api/src/main/java/cn/com/glsx/process/modules/model/SopDataActionDTO.java
platform-process-api/src/main/java/cn/com/glsx/process/modules/model/SopDataActionSearch.java
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopDataService.java
platform-process/src/main/resources/mapper/SopDataFilterActionMapper.xml
platform-process/src/test/java/cn/com/glsx/test/service/TestSopService.java
platform-process-api/src/main/java/cn/com/glsx/process/modules/entity/SopDataFilterAction.java
View file @
77415fe
...
@@ -20,7 +20,7 @@ public class SopDataFilterAction {
...
@@ -20,7 +20,7 @@ public class SopDataFilterAction {
/**
/**
* 类型
* 类型
*/
*/
private
Integer
type
;
private
String
type
;
/**
/**
* 圈人方式标识
* 圈人方式标识
...
...
platform-process-api/src/main/java/cn/com/glsx/process/modules/model/SopDataActionDTO.java
View file @
77415fe
...
@@ -12,7 +12,7 @@ public class SopDataActionDTO {
...
@@ -12,7 +12,7 @@ public class SopDataActionDTO {
private
Integer
id
;
private
Integer
id
;
private
String
name
;
private
String
name
;
private
Integer
type
;
private
String
type
;
private
String
dataTypeCode
;
private
String
dataTypeCode
;
private
String
sql
;
private
String
sql
;
private
String
paramRemark
;
private
String
paramRemark
;
...
...
platform-process-api/src/main/java/cn/com/glsx/process/modules/model/SopDataActionSearch.java
View file @
77415fe
...
@@ -15,5 +15,6 @@ public class SopDataActionSearch {
...
@@ -15,5 +15,6 @@ public class SopDataActionSearch {
private
List
<
Integer
>
ids
;
private
List
<
Integer
>
ids
;
private
String
type
;
private
String
type
;
private
String
dataTypeCode
;
}
}
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopDataService.java
View file @
77415fe
...
@@ -23,6 +23,14 @@ public class SopDataService {
...
@@ -23,6 +23,14 @@ public class SopDataService {
public
List
<
SopDataActionDTO
>
listCondition
(
SopDataActionSearch
search
)
{
public
List
<
SopDataActionDTO
>
listCondition
(
SopDataActionSearch
search
)
{
List
<
SopDataActionDTO
>
res
=
sopDataFilterActionMapper
.
findAll
(
search
);
List
<
SopDataActionDTO
>
res
=
sopDataFilterActionMapper
.
findAll
(
search
);
res
.
forEach
(
r
->
{
if
(
StringUtils
.
hasLength
(
search
.
getType
()))
{
r
.
setType
(
search
.
getType
());
}
if
(
StringUtils
.
hasLength
(
search
.
getDataTypeCode
()))
{
r
.
setDataTypeCode
(
search
.
getDataTypeCode
());
}
});
return
res
;
return
res
;
}
}
...
...
platform-process/src/main/resources/mapper/SopDataFilterActionMapper.xml
View file @
77415fe
...
@@ -44,7 +44,10 @@
...
@@ -44,7 +44,10 @@
</foreach>
</foreach>
</if>
</if>
<if
test=
"search.type != null"
>
<if
test=
"search.type != null"
>
a.type = #{search.type}
FIND_IN_SET(#{search.type}, a.type)
</if>
<if
test=
"search.dataTypeCode != null"
>
FIND_IN_SET(#{search.detaTypeCode}, a.data_type_code)
</if>
</if>
</where>
</where>
</select>
</select>
...
...
platform-process/src/test/java/cn/com/glsx/test/service/TestSopService.java
View file @
77415fe
...
@@ -56,8 +56,7 @@ public class TestSopService {
...
@@ -56,8 +56,7 @@ public class TestSopService {
@Test
@Test
public
void
testListCondition
()
{
public
void
testListCondition
()
{
List
<
SopDataActionDTO
>
res
=
sopDataService
.
listCondition
(
SopDataActionSearch
.
builder
().
build
());
System
.
out
.
println
(
JSON
.
toJSONString
(
sopDataService
.
listCondition
(
SopDataActionSearch
.
builder
().
type
(
"1"
).
build
())));
System
.
out
.
println
(
JSON
.
toJSONString
(
res
));
}
}
@Test
@Test
...
...
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