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;
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;
}
......
......@@ -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;
}
......@@ -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);
}
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