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
9198f561
Commit
9198f561
authored
Sep 04, 2020
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改下发对象的获取,审核人的获取
parent
9ddbd2a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
40 deletions
+23
-40
TaskRuleCtrl.java
.../com/keymobile/indicators/api/hytobacco/TaskRuleCtrl.java
+14
-27
TaskRuleServiceImpl.java
...ndicators/service/dataenter/impl/TaskRuleServiceImpl.java
+2
-1
TaskServiceImpl.java
...le/indicators/service/dataenter/impl/TaskServiceImpl.java
+7
-12
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/TaskRuleCtrl.java
View file @
9198f561
...
@@ -7,6 +7,7 @@ import com.keymobile.indicators.model.entity.ConfigInfo;
...
@@ -7,6 +7,7 @@ import com.keymobile.indicators.model.entity.ConfigInfo;
import
com.keymobile.indicators.model.entity.RoleModel
;
import
com.keymobile.indicators.model.entity.RoleModel
;
import
com.keymobile.indicators.model.entity.dataenter.TaskRule
;
import
com.keymobile.indicators.model.entity.dataenter.TaskRule
;
import
com.keymobile.indicators.model.entity.dataenter.TaskRuleGroupObj
;
import
com.keymobile.indicators.model.entity.dataenter.TaskRuleGroupObj
;
import
com.keymobile.indicators.model.entity.dataenter.TaskRuleTargetRoles
;
import
com.keymobile.indicators.result.Result
;
import
com.keymobile.indicators.result.Result
;
import
com.keymobile.indicators.service.ConfigInfoService
;
import
com.keymobile.indicators.service.ConfigInfoService
;
import
com.keymobile.indicators.service.SystemAuthService
;
import
com.keymobile.indicators.service.SystemAuthService
;
...
@@ -153,35 +154,21 @@ public class TaskRuleCtrl {
...
@@ -153,35 +154,21 @@ public class TaskRuleCtrl {
@ApiOperation
(
"根据规则类型获取可配置的角色"
)
@ApiOperation
(
"根据规则类型获取可配置的角色"
)
@GetMapping
(
"findTaskRoles"
)
@GetMapping
(
"findTaskRoles"
)
public
List
<
RoleModel
>
findTaskRoles
(
@ApiParam
(
"
规则类型:1 省 2 市 3 县
"
)
public
List
<
RoleModel
>
findTaskRoles
(
@ApiParam
(
"
机构编码
"
)
@RequestParam
(
value
=
"
ruleType"
,
required
=
false
)
Integer
ruleType
)
{
@RequestParam
(
value
=
"
orgNo"
)
String
orgNo
)
{
List
<
RoleModel
>
result
=
new
ArrayList
<>();
List
<
RoleModel
>
result
=
new
ArrayList
<>();
ConfigInfo
configInfo
=
null
;
TaskRuleTargetRoles
taskRuleTargetRoles
=
taskRuleService
.
getByOrgNo
(
orgNo
);
switch
(
ruleType
)
{
System
.
out
.
println
(
"taskRuleTargetRoles:"
+
taskRuleTargetRoles
);
case
1
:
if
(
taskRuleTargetRoles
!=
null
)
{
configInfo
=
String
roleNamesStr
=
taskRuleTargetRoles
.
getEnterRoleNames
();
configInfoService
.
getConfigInfoById
(
Constants
.
RULE_PROVINCE_ENTER_ROLE
);
String
roleIdsStr
=
taskRuleTargetRoles
.
getEnterRoleIds
();
break
;
case
2
:
List
<
String
>
roleNames
=
Arrays
.
asList
(
StringUtils
.
split
(
roleNamesStr
,
Constants
.
SEP_COMMA
));
configInfo
=
List
<
String
>
roleIds
=
Arrays
.
asList
(
StringUtils
.
split
(
roleIdsStr
,
Constants
.
SEP_COMMA
));
configInfoService
.
getConfigInfoById
(
Constants
.
RULE_CITY_ENTER_ROLE
);
for
(
int
i
=
0
;
i
<
roleIds
.
size
();
i
++)
{
break
;
case
3
:
configInfo
=
configInfoService
.
getConfigInfoById
(
Constants
.
RULE_COUNTY_ENTER_ROLE
);
break
;
default
:
break
;
}
if
(
configInfo
!=
null
)
{
String
value
=
configInfo
.
getCfValue
();
List
<
String
>
ids
=
Arrays
.
asList
(
StringUtils
.
split
(
value
,
Constants
.
SEP_COMMA
));
List
<
JSONObject
>
roles
=
systemAuthService
.
getRolesByIds
(
ids
);
for
(
int
i
=
0
;
i
<
roles
.
size
();
i
++)
{
JSONObject
role
=
roles
.
get
(
i
);
RoleModel
r
=
new
RoleModel
();
RoleModel
r
=
new
RoleModel
();
r
.
setId
(
role
.
getString
(
"id"
));
r
.
setId
(
role
Ids
.
get
(
i
));
r
.
setName
(
role
.
getString
(
"disname"
));
r
.
setName
(
role
Names
.
get
(
i
));
result
.
add
(
r
);
result
.
add
(
r
);
}
}
}
}
...
...
src/main/java/com/keymobile/indicators/service/dataenter/impl/TaskRuleServiceImpl.java
View file @
9198f561
...
@@ -167,7 +167,8 @@ public class TaskRuleServiceImpl implements TaskRuleService {
...
@@ -167,7 +167,8 @@ public class TaskRuleServiceImpl implements TaskRuleService {
List
<
JSONObject
>
roles
=
systemAuthService
.
getRolesByIds
(
ids
);
List
<
JSONObject
>
roles
=
systemAuthService
.
getRolesByIds
(
ids
);
if
(
CollectionUtils
.
isNotEmpty
(
roles
))
{
if
(
CollectionUtils
.
isNotEmpty
(
roles
))
{
targetRoles
.
setAuditRoleNames
(
toGetRoleNames
(
roles
,
aids
));
targetRoles
.
setAuditRoleNames
(
toGetRoleNames
(
roles
,
aids
));
targetRoles
.
setEnterRoleIds
(
toGetRoleNames
(
roles
,
eids
));
// targetRoles.setEnterRoleIds(toGetRoleNames(roles, eids));
targetRoles
.
setEnterRoleNames
(
toGetRoleNames
(
roles
,
eids
));
}
}
}
}
}
}
...
...
src/main/java/com/keymobile/indicators/service/dataenter/impl/TaskServiceImpl.java
View file @
9198f561
...
@@ -77,6 +77,9 @@ public class TaskServiceImpl implements TaskService {
...
@@ -77,6 +77,9 @@ public class TaskServiceImpl implements TaskService {
@Autowired
@Autowired
private
NoticeInfoService
noticeInfoService
;
private
NoticeInfoService
noticeInfoService
;
@Autowired
private
TaskRuleTargetRolesMapper
taskRuleTargetRolesMapper
;
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Task
createTask
(
Task
task
)
{
public
Task
createTask
(
Task
task
)
{
...
@@ -281,16 +284,8 @@ public class TaskServiceImpl implements TaskService {
...
@@ -281,16 +284,8 @@ public class TaskServiceImpl implements TaskService {
Task
task
=
taskMapper
.
getById
(
taskId
);
Task
task
=
taskMapper
.
getById
(
taskId
);
String
ruleLevel
=
task
.
getRuleLevel
();
String
ruleLevel
=
task
.
getRuleLevel
();
String
orgNo
=
task
.
getOrgNo
();
String
orgNo
=
task
.
getOrgNo
();
ConfigInfo
configInfo
=
null
;
TaskRuleTargetRoles
taskRuleTargetRoles
=
taskRuleTargetRolesMapper
.
getByOrgNo
(
orgNo
);
if
(
StringUtils
.
isNotBlank
(
orgNo
)){
if
(
orgNo
.
length
()==
2
){
configInfo
=
configInfoService
.
getConfigInfoById
(
Constants
.
RULE_PROVINCE_AUDIT_ROLE
);
}
else
if
(
orgNo
.
length
()==
4
){
configInfo
=
configInfoService
.
getConfigInfoById
(
Constants
.
RULE_CITY_AUDIT_ROLE
);
}
else
if
(
orgNo
.
length
()==
6
){
configInfo
=
configInfoService
.
getConfigInfoById
(
Constants
.
RULE_COUNTY_AUDIT_ROLE
);
}
}
// ConfigInfo configInfo = null;
// ConfigInfo configInfo = null;
// if (Constants.PRIVINCE_TO_CITY.equals(ruleLevel)) {
// if (Constants.PRIVINCE_TO_CITY.equals(ruleLevel)) {
// configInfo = configInfoService.getConfigInfoById(Constants.RULE_PROVINCE_AUDIT_ROLE);
// configInfo = configInfoService.getConfigInfoById(Constants.RULE_PROVINCE_AUDIT_ROLE);
...
@@ -299,9 +294,9 @@ public class TaskServiceImpl implements TaskService {
...
@@ -299,9 +294,9 @@ public class TaskServiceImpl implements TaskService {
// } else if (Constants.CITY_TO_COUNTY.equals(ruleLevel)) {
// } else if (Constants.CITY_TO_COUNTY.equals(ruleLevel)) {
// configInfo = configInfoService.getConfigInfoById(Constants.RULE_COUNTY_AUDIT_ROLE);
// configInfo = configInfoService.getConfigInfoById(Constants.RULE_COUNTY_AUDIT_ROLE);
// }
// }
if
(
configInfo
!=
null
)
{
if
(
taskRuleTargetRoles
!=
null
)
{
String
indDept
=
task
.
getRefIndDept
();
String
indDept
=
task
.
getRefIndDept
();
List
<
RoleRefUserModel
>
users
=
getUserByRoleIdStr
(
configInfo
.
getCfValue
());
List
<
RoleRefUserModel
>
users
=
getUserByRoleIdStr
(
taskRuleTargetRoles
.
getAuditRoleIds
());
if
(
CollectionUtils
.
isNotEmpty
(
users
))
{
if
(
CollectionUtils
.
isNotEmpty
(
users
))
{
StringBuilder
userIds
=
new
StringBuilder
(
Constants
.
SEP_COMMA
);
StringBuilder
userIds
=
new
StringBuilder
(
Constants
.
SEP_COMMA
);
StringBuilder
userNames
=
new
StringBuilder
(
Constants
.
SEP_COMMA
);
StringBuilder
userNames
=
new
StringBuilder
(
Constants
.
SEP_COMMA
);
...
...
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