1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package com.yiboshi.science.rest.v1;
import com.yiboshi.arch.base.ResponseDataModel;
import com.yiboshi.science.entity.ComExpertSpec;
import com.yiboshi.science.entity.SelectListItem;
import com.yiboshi.science.param.dto.ComExpertSpecDTO;
import com.yiboshi.science.param.query.ComExpertSpecQueryVO;
import com.yiboshi.science.rest.BaseController;
import com.yiboshi.science.service.ComExpertSpecService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@Api(tags = "com-expert-spec", description = "项目分配表")
@RestController
@RequestMapping("/v1/science-admin/com-expert-spec")
public class ComExpertSpecController extends BaseController<ComExpertSpecService, ComExpertSpecQueryVO, ComExpertSpecDTO, ComExpertSpec> {
@Autowired
private ComExpertSpecService comExpertSpecService;
@ApiOperation(value = "根据类型参数列表", httpMethod = "GET", notes = "根据类型参数列表")
@GetMapping
@RequestMapping("/getExpertListBySpecId")
public ResponseDataModel<List<SelectListItem>> getExpertListBySpecId(@RequestBody Map<String, Object> specId) {
return ResponseDataModel.ok(comExpertSpecService.getExpertListBySpecId(specId));
}
@ApiOperation(value = "根据类型参数列表", httpMethod = "GET", notes = "根据类型参数列表")
@GetMapping
@RequestMapping("/getExpertListBySpecIdProjId")
public ResponseDataModel<List<SelectListItem>> getExpertListBySpecIdProjId(@RequestParam String projIds, String specIds) {
String[] split = projIds.split(",");
List<String> ProjList = Arrays.asList(split);
List<String> SpecList = null;
if (null != specIds) {
split = specIds.split(",");
SpecList = Arrays.asList(split);
}
return ResponseDataModel.ok(comExpertSpecService.getExpertListBySpecIdProjId(SpecList, ProjList));
}
@ApiOperation(value = "根据类型参数列表", httpMethod = "GET", notes = "根据类型参数列表")
@GetMapping
@RequestMapping("/getExpertListByExpertSpecIds")
public ResponseDataModel<List<SelectListItem>> getExpertListByExpertSpecIds(String specIds, String parentIds, String personName) {
String[] split;
List<String> SpecList = null;
if (null != specIds) {
split = specIds.split(",");
SpecList = Arrays.asList(split);
}
List<String> ParentList = null;
if (null != parentIds) {
split = parentIds.split(",");
ParentList = Arrays.asList(split);
}
return ResponseDataModel.ok(comExpertSpecService.getExpertListByExpertSpecIds(SpecList, ParentList, personName));
}
}