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
e09a59dd
Commit
e09a59dd
authored
Aug 28, 2020
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
2be163f3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
7 deletions
+29
-7
TaskCtrl.java
...java/com/keymobile/indicators/api/hytobacco/TaskCtrl.java
+1
-1
TaskRuleCtrl.java
.../com/keymobile/indicators/api/hytobacco/TaskRuleCtrl.java
+23
-5
Constants.java
...ain/java/com/keymobile/indicators/constant/Constants.java
+4
-0
TaskMapper.xml
src/main/resources/mybatis/mapping/TaskMapper.xml
+1
-1
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/TaskCtrl.java
View file @
e09a59dd
...
@@ -79,7 +79,7 @@ public class TaskCtrl {
...
@@ -79,7 +79,7 @@ public class TaskCtrl {
@ApiOperation
(
"获取我的任务(数据填报、数据审核)"
)
@ApiOperation
(
"获取我的任务(数据填报、数据审核)"
)
@PostMapping
(
"findMyTask"
)
@PostMapping
(
"findMyTask"
)
public
List
<
Task
>
findMyTask
(
@RequestBody
QueryAllTaskParam
param
)
{
public
List
<
Task
>
findMyTask
(
@RequestBody
QueryAllTaskParam
param
)
{
param
.
setUserId
(
SystemUserUtil
.
getCurrentUserId
());
//
param.setUserId(SystemUserUtil.getCurrentUserId());
LogManager
.
logInfo
(
Constants
.
LOG_CONTEXT_API
,
"{}查询了我任务的"
,
LogManager
.
logInfo
(
Constants
.
LOG_CONTEXT_API
,
"{}查询了我任务的"
,
SystemUserUtil
.
getCurrentUser
());
SystemUserUtil
.
getCurrentUser
());
return
taskService
.
findAllTask
(
param
);
return
taskService
.
findAllTask
(
param
);
...
...
src/main/java/com/keymobile/indicators/api/hytobacco/TaskRuleCtrl.java
View file @
e09a59dd
...
@@ -17,11 +17,13 @@ import io.swagger.annotations.Api;
...
@@ -17,11 +17,13 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.BooleanUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
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.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -102,16 +104,31 @@ public class TaskRuleCtrl {
...
@@ -102,16 +104,31 @@ public class TaskRuleCtrl {
}
}
@ApiOperation
(
"根据机构编号获取对应的规则名类别"
)
@ApiOperation
(
"根据机构编号获取对应的规则名类别"
)
@GetMapping
(
"findRuleLevelsByOrgNo"
)
@GetMapping
(
"findRuleLevelsByOrgNo"
)
public
List
<
String
>
findRuleLevelsByOrgNo
(
@RequestParam
(
"orgNo"
)
String
orgNo
){
public
List
<
String
>
findRuleLevelsByOrgNo
(
@RequestParam
(
"orgNo"
)
String
orgNo
,
@RequestParam
(
value
=
"sysAdmin"
,
required
=
false
)
Boolean
sysAdmin
){
List
<
String
>
levels
=
new
ArrayList
<>();
List
<
String
>
levels
=
new
ArrayList
<>();
String
key
=
""
;
String
key
=
""
;
if
(
StringUtils
.
isNotBlank
(
orgNo
)){
if
(
BooleanUtils
.
isTrue
(
sysAdmin
)){
//省对应的规则级别
ConfigInfo
prinvinceConfigInfo
=
configInfoService
.
getConfigInfoById
(
Constants
.
RULE_NAME_PRINVINCE
);
//市对应的规则级别
ConfigInfo
cityConfigInfo
=
configInfoService
.
getConfigInfoById
(
Constants
.
RULE_NAME_CITY
);
//县对应的规则级别
ConfigInfo
countyConfigInfo
=
configInfoService
.
getConfigInfoById
(
Constants
.
RULE_NAME_COUNTY
);
StringBuffer
value
=
new
StringBuffer
(
prinvinceConfigInfo
.
getCfValue
());
value
.
append
(
Constants
.
SEP_COMMA
);
value
.
append
(
cityConfigInfo
.
getCfValue
());
value
.
append
(
Constants
.
SEP_COMMA
);
value
.
append
(
countyConfigInfo
.
getCfValue
());
String
[]
split
=
value
.
toString
().
split
(
Constants
.
SEP_COMMA
);
levels
=
Arrays
.
asList
(
split
);
}
else
if
(
StringUtils
.
isNotBlank
(
orgNo
)){
switch
(
orgNo
.
length
()){
switch
(
orgNo
.
length
()){
case
2
:
key
=
"RULE_NAME_PRINVINCE"
;
case
2
:
key
=
Constants
.
RULE_NAME_PRINVINCE
;
break
;
break
;
case
4
:
key
=
"RULE_NAME_CITY"
;
case
4
:
key
=
Constants
.
RULE_NAME_CITY
;
break
;
break
;
case
6
:
key
=
"RULE_NAME_COUNTY"
;
case
6
:
key
=
Constants
.
RULE_NAME_COUNTY
;
break
;
break
;
default
:
key
=
null
;
default
:
key
=
null
;
}
}
...
@@ -120,6 +137,7 @@ public class TaskRuleCtrl {
...
@@ -120,6 +137,7 @@ public class TaskRuleCtrl {
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
);
levels
=
Arrays
.
asList
(
split
);
}
}
}
}
...
...
src/main/java/com/keymobile/indicators/constant/Constants.java
View file @
e09a59dd
...
@@ -179,4 +179,8 @@ public class Constants {
...
@@ -179,4 +179,8 @@ public class Constants {
public
static
final
String
PRIVINCE_TO_COUNTY
=
"省对县"
;
public
static
final
String
PRIVINCE_TO_COUNTY
=
"省对县"
;
public
static
final
String
CITY_TO_COUNTY
=
"市对县"
;
public
static
final
String
CITY_TO_COUNTY
=
"市对县"
;
public
static
final
String
RULE_NAME_PRINVINCE
=
"RULE_NAME_PRINVINCE"
;
public
static
final
String
RULE_NAME_CITY
=
"RULE_NAME_CITY"
;
public
static
final
String
RULE_NAME_COUNTY
=
"RULE_NAME_COUNTY"
;
}
}
src/main/resources/mybatis/mapping/TaskMapper.xml
View file @
e09a59dd
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
and ref_ind_dept = #{refIndDept}
and ref_ind_dept = #{refIndDept}
</if>
</if>
<if
test=
"userId != null"
>
<if
test=
"userId != null
and userId ==''
"
>
<choose>
<choose>
<when
test=
"queryType == 1"
>
<when
test=
"queryType == 1"
>
and enter_users like concat('%,', #{userId}, ',%')
and enter_users like concat('%,', #{userId}, ',%')
...
...
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