Commit 4d398ce0 by zhangkb

Merge branch 'hy-tobacco' of ssh://132.232.112.242:7022/zhangkb/indicators into hy-tobacco

parents 6d7d9152 d6a37c25
...@@ -26,9 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -26,9 +26,7 @@ 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.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.List;
@Api(tags={"数据填报-填报任务管理(任务清单、数据填报、数据审核)"}) @Api(tags={"数据填报-填报任务管理(任务清单、数据填报、数据审核)"})
@RestController @RestController
...@@ -38,6 +36,8 @@ public class TaskCtrl { ...@@ -38,6 +36,8 @@ public class TaskCtrl {
@Autowired @Autowired
private TaskService taskService; private TaskService taskService;
@Autowired
private SystemAuthService systemAuthService;
@ApiOperation("(启动)根据规则生成相关填报任务") @ApiOperation("(启动)根据规则生成相关填报任务")
@GetMapping("generateTaskByRule") @GetMapping("generateTaskByRule")
...@@ -89,6 +89,14 @@ public class TaskCtrl { ...@@ -89,6 +89,14 @@ public class TaskCtrl {
@GetMapping("getById") @GetMapping("getById")
public Task getById(@ApiParam("任务id") @RequestParam String id) { public Task getById(@ApiParam("任务id") @RequestParam String id) {
Task task = taskService.getById(id, true, true); 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; return task;
} }
......
...@@ -9,6 +9,7 @@ import javax.persistence.Table; ...@@ -9,6 +9,7 @@ import javax.persistence.Table;
import javax.persistence.Transient; import javax.persistence.Transient;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 数据填报具体任务 * 数据填报具体任务
...@@ -140,4 +141,7 @@ public class Task extends BaseModel { ...@@ -140,4 +141,7 @@ public class Task extends BaseModel {
@Transient @Transient
@ApiModelProperty("任务关联的指标列表") @ApiModelProperty("任务关联的指标列表")
private List<TaskRuleIndicator> ruleIndicators; private List<TaskRuleIndicator> ruleIndicators;
@Transient
@ApiModelProperty("审核人机构路径")
private Map<String,String> orgPathMap;
} }
...@@ -46,5 +46,9 @@ public interface SystemAuthService { ...@@ -46,5 +46,9 @@ public interface SystemAuthService {
*/ */
@GetMapping("/org/getByNos") @GetMapping("/org/getByNos")
List<JSONObject> getOrgByNos(@RequestParam("nos")List<String> nos); List<JSONObject> getOrgByNos(@RequestParam("nos")List<String> nos);
/**
*感觉用户id获取机构路径
* **/
@GetMapping("/user/getOrgPath")
JSONObject getOrgPath(@RequestParam("userIds")List<String> userIds);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment