|
@@ -151,9 +151,12 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
JSONArray jsonArray = JSON.parseArray(jsonObject1);
|
|
JSONArray jsonArray = JSON.parseArray(jsonObject1);
|
|
List<ProjectVO.Personnel> personnelList = jsonArray.toJavaList(ProjectVO.Personnel.class);
|
|
List<ProjectVO.Personnel> personnelList = jsonArray.toJavaList(ProjectVO.Personnel.class);
|
|
//获取专题库委托方对应信息
|
|
//获取专题库委托方对应信息
|
|
- String jsonObject2 = requestService.getClientByIds(clientIds);
|
|
|
|
- JSONArray jsonArray2 = JSON.parseArray(jsonObject2);
|
|
|
|
- List<ClientDTO> clientList = jsonArray2.toJavaList(ClientDTO.class);
|
|
|
|
|
|
+ List<ClientDTO> clientList =new ArrayList<>();
|
|
|
|
+ if(clientIds.size()>0) {
|
|
|
|
+ String jsonObject2 = requestService.getClientByIds(clientIds);
|
|
|
|
+ JSONArray jsonArray2 = JSON.parseArray(jsonObject2);
|
|
|
|
+ clientList = jsonArray2.toJavaList(ClientDTO.class);
|
|
|
|
+ }
|
|
for (Project project : dataList) {
|
|
for (Project project : dataList) {
|
|
for (ProjectVO.Personnel personnel : personnelList) {
|
|
for (ProjectVO.Personnel personnel : personnelList) {
|
|
if (project.getPersonnelId() != null) {
|
|
if (project.getPersonnelId() != null) {
|
|
@@ -302,9 +305,13 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
|
|
public Map<Object, Object> getScenarioAndTypeTotal() throws IOException {
|
|
public Map<Object, Object> getScenarioAndTypeTotal() throws IOException {
|
|
List<Project> projectList = this.getAllProjectByMySelf();
|
|
List<Project> projectList = this.getAllProjectByMySelf();
|
|
List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Arrays.asList(Constants.ENTERPRISE_APPLICATION_SCENARIO, Constants.INVESTIGATION_TYPE));
|
|
List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Arrays.asList(Constants.ENTERPRISE_APPLICATION_SCENARIO, Constants.INVESTIGATION_TYPE));
|
|
- String res = requestService.getClientByIds(projectList.stream().map(Project::getClientId).collect(Collectors.toList()));
|
|
|
|
- JSONArray jsonArray2 = JSON.parseArray(res);
|
|
|
|
- List<ClientDTO> clientList = jsonArray2.toJavaList(ClientDTO.class);
|
|
|
|
|
|
+ List<Integer> clientIds = projectList.stream().map(Project::getClientId).collect(Collectors.toList());
|
|
|
|
+ List<ClientDTO> clientList =new ArrayList<>();
|
|
|
|
+ if(clientIds.size()>0) {
|
|
|
|
+ String res = requestService.getClientByIds(clientIds);
|
|
|
|
+ JSONArray jsonArray2 = JSON.parseArray(res);
|
|
|
|
+ clientList = jsonArray2.toJavaList(ClientDTO.class);
|
|
|
|
+ }
|
|
Map<Object, Object> type = new HashMap<>();
|
|
Map<Object, Object> type = new HashMap<>();
|
|
Map<Object, Object> scenario = new HashMap<>();
|
|
Map<Object, Object> scenario = new HashMap<>();
|
|
Map<Object, Object> result = new HashMap<>();
|
|
Map<Object, Object> result = new HashMap<>();
|