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
d6a37c25
Commit
d6a37c25
authored
Aug 19, 2020
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加返回数据--审核人机构路径
parent
dd137283
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
TaskCtrl.java
...java/com/keymobile/indicators/api/hytobacco/TaskCtrl.java
+11
-3
Task.java
...com/keymobile/indicators/model/entity/dataenter/Task.java
+4
-0
SystemAuthService.java
...a/com/keymobile/indicators/service/SystemAuthService.java
+5
-1
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/TaskCtrl.java
View file @
d6a37c25
...
...
@@ -26,9 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.*
;
@Api
(
tags
={
"数据填报-填报任务管理(任务清单、数据填报、数据审核)"
})
@RestController
...
...
@@ -38,6 +36,8 @@ public class TaskCtrl {
@Autowired
private
TaskService
taskService
;
@Autowired
private
SystemAuthService
systemAuthService
;
@ApiOperation
(
"(启动)根据规则生成相关填报任务"
)
@GetMapping
(
"generateTaskByRule"
)
...
...
@@ -89,6 +89,14 @@ public class TaskCtrl {
@GetMapping
(
"getById"
)
public
Task
getById
(
@ApiParam
(
"任务id"
)
@RequestParam
String
id
)
{
Task
task
=
taskService
.
getById
(
id
,
true
,
true
);
String
auditUsers
=
task
.
getAuditUsers
();
if
(
auditUsers
!=
null
&&
auditUsers
.
length
()>
2
){
String
[]
split
=
auditUsers
.
substring
(
1
,
auditUsers
.
length
()
-
1
).
split
(
Constants
.
SEP_COMMA
);
List
<
String
>
auditUserIds
=
Arrays
.
asList
(
split
);
JSONObject
orgPath
=
systemAuthService
.
getOrgPath
(
auditUserIds
);
Map
<
String
,
String
>
map
=
orgPath
.
toJavaObject
(
Map
.
class
);
task
.
setOrgPathMap
(
map
);
}
return
task
;
}
...
...
src/main/java/com/keymobile/indicators/model/entity/dataenter/Task.java
View file @
d6a37c25
...
...
@@ -9,6 +9,7 @@ import javax.persistence.Table;
import
javax.persistence.Transient
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 数据填报具体任务
...
...
@@ -140,4 +141,7 @@ public class Task extends BaseModel {
@Transient
@ApiModelProperty
(
"任务关联的指标列表"
)
private
List
<
TaskRuleIndicator
>
ruleIndicators
;
@Transient
@ApiModelProperty
(
"审核人机构路径"
)
private
Map
<
String
,
String
>
orgPathMap
;
}
src/main/java/com/keymobile/indicators/service/SystemAuthService.java
View file @
d6a37c25
...
...
@@ -46,5 +46,9 @@ public interface SystemAuthService {
*/
@GetMapping
(
"/org/getByNos"
)
List
<
JSONObject
>
getOrgByNos
(
@RequestParam
(
"nos"
)
List
<
String
>
nos
);
/**
*感觉用户id获取机构路径
* **/
@GetMapping
(
"/user/getOrgPath"
)
JSONObject
getOrgPath
(
@RequestParam
(
"userIds"
)
List
<
String
>
userIds
);
}
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