fix
This commit is contained in:
parent
9b8c07648e
commit
92520e8bd8
@ -48,6 +48,7 @@ import com.lz.modules.sys.service.app.ResultRecordService;
|
|||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@ -134,6 +135,8 @@ public class ResultRecordController extends AbstractController {
|
|||||||
private ResourceService resourceService;
|
private ResourceService resourceService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ChartResultService chartResultService;
|
private ChartResultService chartResultService;
|
||||||
|
@Autowired
|
||||||
|
private FlowStartService flowStartService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ResultTaskService resultTaskService;
|
private ResultTaskService resultTaskService;
|
||||||
@ -632,6 +635,38 @@ public class ResultRecordController extends AbstractController {
|
|||||||
resultRecordDetailDto.setWeight(weight);
|
resultRecordDetailDto.setWeight(weight);
|
||||||
resultRecordDetailDto.setRecortModelDtos(resultRecortModelDtos);
|
resultRecordDetailDto.setRecortModelDtos(resultRecortModelDtos);
|
||||||
|
|
||||||
|
//增加导出所需数据
|
||||||
|
List<String> depIds = Lists.newArrayList(resultRecord.getDepartmentId());
|
||||||
|
Map<Long, List<String>> map = departmentsService.selectDepartmentTreeByDepIds(depIds);
|
||||||
|
|
||||||
|
List<String> names = map.get(Long.valueOf(resultRecord.getDepartmentId()));
|
||||||
|
if(CollectionUtils.isNotEmpty(names)){
|
||||||
|
Collections.reverse(names);
|
||||||
|
int size = names.size();
|
||||||
|
if(size>0 && StringUtils.isNotBlank(names.get(0))){
|
||||||
|
resultRecordDetailDto.setDepartmentOne(names.get(0));
|
||||||
|
}
|
||||||
|
if(size>1 && StringUtils.isNotBlank(names.get(1))){
|
||||||
|
resultRecordDetailDto.setDepartmentTwo(names.get(1));
|
||||||
|
}
|
||||||
|
if(size>2 && StringUtils.isNotBlank(names.get(2))){
|
||||||
|
resultRecordDetailDto.setDepartmentThree(names.get(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FlowStart flowStart = flowStartService.selectFlowStartById(resultRecord.getStartId());
|
||||||
|
if(flowStart != null){
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||||
|
String startDate = sdf.format(flowStart.getStartTime());
|
||||||
|
if(flowStart.getCycleType().intValue() != 0){
|
||||||
|
String endDate = sdf.format(flowStart.getEndTime());
|
||||||
|
resultRecordDetailDto.setAssessCycle(startDate + "至" + endDate );
|
||||||
|
}else{
|
||||||
|
resultRecordDetailDto.setAssessCycle(startDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return R.ok().put("data", resultRecordDetailDto);
|
return R.ok().put("data", resultRecordDetailDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -85,6 +85,20 @@ public class ResultRecordDetailDto {
|
|||||||
List<ResultRecortModelDto> recortModelDtos;
|
List<ResultRecortModelDto> recortModelDtos;
|
||||||
@ApiModelProperty(value = "当前指标权重之和", name = "weight")
|
@ApiModelProperty(value = "当前指标权重之和", name = "weight")
|
||||||
BigDecimal weight;
|
BigDecimal weight;
|
||||||
|
|
||||||
|
//新增导出所需数据
|
||||||
|
@ApiModelProperty(value = "考核周期", name = "assessCycle")
|
||||||
|
private String assessCycle;
|
||||||
|
//一级部门
|
||||||
|
@ApiModelProperty(value = "一级部门", name = "departmentOne")
|
||||||
|
private String departmentOne;
|
||||||
|
//二级部门
|
||||||
|
@ApiModelProperty(value = "二级部门", name = "departmentTwo")
|
||||||
|
private String departmentTwo;
|
||||||
|
//三级部门
|
||||||
|
@ApiModelProperty(value = "三级部门", name = "departmentThree")
|
||||||
|
private String departmentThree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user