fix
This commit is contained in:
parent
38decf8e91
commit
c6d78c73c5
@ -27,10 +27,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.*;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.function.Function;
|
||||||
import java.util.concurrent.ExecutorService;
|
|
||||||
import java.util.concurrent.Executors;
|
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -111,15 +109,7 @@ public class ChartController extends AbstractController{
|
|||||||
return R.ok().put("data",ownResultResps);
|
return R.ok().put("data",ownResultResps);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void main(String[] args) {
|
|
||||||
ExecutorService executor = Executors.newFixedThreadPool(10);
|
|
||||||
List<ResultRecord> resultRecords = Lists.newArrayList();
|
|
||||||
CompletableFuture<List<ResultRecord>> listCompletableFuture = CompletableFuture.supplyAsync(() -> resultRecordService.list(), executor);
|
|
||||||
try {
|
|
||||||
resultRecords = listCompletableFuture.get();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,8 +14,8 @@ import lombok.Data;
|
|||||||
@ApiModel("获取报表等级详情实体")
|
@ApiModel("获取报表等级详情实体")
|
||||||
public class ChartResultReq extends BasePage{
|
public class ChartResultReq extends BasePage{
|
||||||
|
|
||||||
@ApiModelProperty(value = "部门id",name = "departmentId")
|
@ApiModelProperty(value = "部门ids,逗号隔开",name = "departmentIds")
|
||||||
private String departmentId;
|
private String departmentIds;
|
||||||
|
|
||||||
@ApiModelProperty(value = "考核id",name = "startId")
|
@ApiModelProperty(value = "考核id",name = "startId")
|
||||||
private Long startId;
|
private Long startId;
|
||||||
|
|||||||
@ -122,7 +122,7 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
}else {
|
}else {
|
||||||
ResultRecord resultRecord = resultRecordMapper.selectOneByStartId(flowStart.getId(),mandepartmentIds);
|
ResultRecord resultRecord = resultRecordMapper.selectOneByStartId(flowStart.getId(),mandepartmentIds);
|
||||||
int i = resultRecordMapper.countStartAndGroupNum(flowStart.getId(),mandepartmentIds);
|
int i = resultRecordMapper.countStartAndGroupNum(flowStart.getId(),mandepartmentIds);
|
||||||
res.setJoinNum(resultRecord == null? StringUtil.EMPTY : resultRecord.getStaffName() + i + "等人");
|
res.setJoinNum(resultRecord == null? StringUtil.EMPTY : resultRecord.getStaffName() + "等"+ i + "人");
|
||||||
}
|
}
|
||||||
|
|
||||||
data.add(res);
|
data.add(res);
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
import com.lz.common.exception.RRException;
|
import com.lz.common.exception.RRException;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.common.utils.R;
|
import com.lz.common.utils.R;
|
||||||
@ -182,7 +183,16 @@ public class ChartResultServiceImpl implements ChartResultService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils selectChartDetailList(ChartResultReq req) {
|
public PageUtils selectChartDetailList(ChartResultReq req) {
|
||||||
List<String> allDeparmentIds = staffService.selectAllDeparmentIdsByDepartmentParentId(req.getDepartmentId());
|
String departmentIds = req.getDepartmentIds();
|
||||||
|
Set<String> allDepart = Sets.newHashSet();
|
||||||
|
if(StringUtil.isNotBlank(departmentIds)){
|
||||||
|
String[] split = departmentIds.split(",");
|
||||||
|
for(String s:split){
|
||||||
|
List<String> deparmentIds = staffService.selectAllDeparmentIdsByDepartmentParentId(s);
|
||||||
|
allDepart.addAll(deparmentIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<String> allDeparmentIds = new ArrayList<>(allDepart);
|
||||||
//自己管理的和所有的部门交集
|
//自己管理的和所有的部门交集
|
||||||
log.info("selectChartDetailList 查询部门:" + JSON.toJSONString(allDeparmentIds));
|
log.info("selectChartDetailList 查询部门:" + JSON.toJSONString(allDeparmentIds));
|
||||||
List<String> mandepartmentIds = assessService.roleDepartments(req.getLoginUserId());
|
List<String> mandepartmentIds = assessService.roleDepartments(req.getLoginUserId());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user