Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangkb
indicators
Commits
eac10354
Commit
eac10354
authored
Jan 19, 2021
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规则级别去重
parent
8014ff75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
TaskRuleCtrl.java
.../com/keymobile/indicators/api/hytobacco/TaskRuleCtrl.java
+11
-8
ConfigInfoMapper.xml
src/main/resources/mybatis/mapping/ConfigInfoMapper.xml
+1
-1
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/TaskRuleCtrl.java
View file @
eac10354
...
@@ -26,10 +26,7 @@ import org.springframework.data.domain.Page;
...
@@ -26,10 +26,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.rmi.dgc.Lease
;
import
java.rmi.dgc.Lease
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
@Api
(
tags
={
"数据填报-任务规则管理(任务下发)"
})
@Api
(
tags
={
"数据填报-任务规则管理(任务下发)"
})
@RestController
@RestController
...
@@ -112,8 +109,9 @@ public class TaskRuleCtrl {
...
@@ -112,8 +109,9 @@ public class TaskRuleCtrl {
}
}
@ApiOperation
(
"根据机构编号获取对应的规则名类别"
)
@ApiOperation
(
"根据机构编号获取对应的规则名类别"
)
@GetMapping
(
"findRuleLevelsByOrgNo"
)
@GetMapping
(
"findRuleLevelsByOrgNo"
)
public
List
<
String
>
findRuleLevelsByOrgNo
(
@RequestParam
(
"orgNo"
)
String
orgNo
,
@RequestParam
(
value
=
"sysAdmin"
,
required
=
false
)
Boolean
sysAdmin
){
public
Set
<
String
>
findRuleLevelsByOrgNo
(
@RequestParam
(
"orgNo"
)
String
orgNo
,
@RequestParam
(
value
=
"sysAdmin"
,
required
=
false
)
Boolean
sysAdmin
){
List
<
String
>
levels
=
new
ArrayList
<>();
// List<String> levels = new ArrayList<>();
Set
<
String
>
levels
=
new
HashSet
<>();
String
key
=
""
;
String
key
=
""
;
if
(
BooleanUtils
.
isTrue
(
sysAdmin
)){
if
(
BooleanUtils
.
isTrue
(
sysAdmin
)){
// //省对应的规则级别
// //省对应的规则级别
...
@@ -135,7 +133,10 @@ public class TaskRuleCtrl {
...
@@ -135,7 +133,10 @@ public class TaskRuleCtrl {
}
}
if
(!
value
.
toString
().
equals
(
""
)){
if
(!
value
.
toString
().
equals
(
""
)){
String
[]
split
=
value
.
toString
().
split
(
Constants
.
SEP_COMMA
);
String
[]
split
=
value
.
toString
().
split
(
Constants
.
SEP_COMMA
);
levels
=
Arrays
.
asList
(
split
);
for
(
String
s
:
split
)
{
levels
.
add
(
s
);
}
// levels = Arrays.asList(split);
}
}
}
else
if
(
StringUtils
.
isNotBlank
(
orgNo
)){
}
else
if
(
StringUtils
.
isNotBlank
(
orgNo
)){
// switch (orgNo.length()){
// switch (orgNo.length()){
...
@@ -153,7 +154,9 @@ public class TaskRuleCtrl {
...
@@ -153,7 +154,9 @@ public class TaskRuleCtrl {
if
(
configInfoById
!=
null
){
if
(
configInfoById
!=
null
){
String
cfValue
=
configInfoById
.
getCfValue
();
String
cfValue
=
configInfoById
.
getCfValue
();
String
[]
split
=
cfValue
.
split
(
Constants
.
SEP_COMMA
);
String
[]
split
=
cfValue
.
split
(
Constants
.
SEP_COMMA
);
levels
=
Arrays
.
asList
(
split
);
for
(
String
s
:
split
)
{
levels
.
add
(
s
);
}
}
}
}
}
...
...
src/main/resources/mybatis/mapping/ConfigInfoMapper.xml
View file @
eac10354
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
where id = #{id}
where id = #{id}
</select>
</select>
<select
id=
"findConfigInfoByLikeKey"
resultType=
"com.keymobile.indicators.model.entity.ConfigInfo"
>
<select
id=
"findConfigInfoByLikeKey"
resultType=
"com.keymobile.indicators.model.entity.ConfigInfo"
>
select
*
select
distinct cf_value
from config_info
from config_info
where id like concat(#{key},'%')
where id like concat(#{key},'%')
</select>
</select>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment