This commit is contained in:
杜建超 2020-10-16 11:23:08 +08:00
parent bb47c84dda
commit ca86e83244
6 changed files with 36 additions and 13 deletions

View File

@ -37,13 +37,13 @@ public class EvaluationGroup implements java.io.Serializable {
private Long managerIds;
//参与部门id逗号隔开
@ApiModelProperty(value = "参与部门id逗号隔开", name = "depIds")
private Long depIds;
private String depIds;
//参与考核员工staff_id逗号隔开
@ApiModelProperty(value = "参与考核员工staff_id逗号隔开", name = "staffIds")
private Long staffIds;
private String staffIds;
//排除人员ids逗号隔开
@ApiModelProperty(value = "排除人员ids逗号隔开", name = "outIds")
private Long outIds;
private String outIds;
/**
*
* @return
@ -138,14 +138,14 @@ public class EvaluationGroup implements java.io.Serializable {
* 参与部门id逗号隔开
* @return
*/
public Long getDepIds() {
public String getDepIds() {
return depIds;
}
/**
* 参与部门id逗号隔开
* @param depIds
*/
public void setDepIds(Long depIds) {
public void setDepIds(String depIds) {
this.depIds = depIds;
}
@ -153,14 +153,14 @@ public class EvaluationGroup implements java.io.Serializable {
* 参与考核员工staff_id逗号隔开
* @return
*/
public Long getStaffIds() {
public String getStaffIds() {
return staffIds;
}
/**
* 参与考核员工staff_id逗号隔开
* @param staffIds
*/
public void setStaffIds(Long staffIds) {
public void setStaffIds(String staffIds) {
this.staffIds = staffIds;
}
@ -169,14 +169,14 @@ public class EvaluationGroup implements java.io.Serializable {
* 排除人员ids逗号隔开
* @return
*/
public Long getOutIds() {
public String getOutIds() {
return outIds;
}
/**
* 排除人员ids逗号隔开
* @param outIds
*/
public void setOutIds(Long outIds) {
public void setOutIds(String outIds) {
this.outIds = outIds;
}

View File

@ -1,16 +1,23 @@
package com.lz.modules.performance.controller;
import com.lz.common.utils.R;
import com.lz.modules.flow.entity.EvaluationGroup;
import com.lz.modules.flow.service.EvaluationGroupService;
import com.lz.modules.performance.req.ChartResultReq;
import com.lz.modules.performance.res.ChartStatisticalRes;
import com.lz.modules.performance.res.TaskListRes;
import com.lz.modules.performance.service.ChartResultService;
import com.lz.modules.sys.controller.AbstractController;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
/**
* @Author: djc
* @Desc:
@ -20,12 +27,21 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/performance")
@Api(value="报表接口", tags={"报表统计"})
public class ChartController extends AbstractController{
@Autowired
private ChartResultService chartResultService;
@Autowired
private EvaluationGroupService evaluationGroupService;
@PostMapping("chart/result")
@ApiOperation("获取绩效报表统计")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ChartStatisticalRes.class)})
public R chartResult(@RequestBody @ApiParam(name = "body",value = "body请求体",required = true) ChartResultReq req){
List<ChartStatisticalRes> data = new ArrayList<>();
chartResultService.chartReport(req);
EvaluationGroup evaluationGroup = evaluationGroupService.selectEvaluationGroupById(1L);
String depIds = evaluationGroup.getDepIds();
String staffIds = evaluationGroup.getStaffIds();
String outIds = evaluationGroup.getOutIds();
return R.ok();
}

View File

@ -33,7 +33,7 @@ public class UserTaskController extends AbstractController{
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = TaskListRes.class)})
public R list(@RequestBody @ApiParam(name = "body",value = "body请求体",required = true) AssessTaskReq req){
PageUtils pageUtils = assessTaskService.assessTaskList(req, getUserId());
return R.ok().put("page",pageUtils);
return R.ok().put("data",pageUtils);
}

View File

@ -1,5 +1,7 @@
package com.lz.modules.performance.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@ -10,14 +12,19 @@ import java.io.Serializable;
* @Date: 2020/10/14 16:50
*/
@Data
@ApiModel(value = "绩效报表请求实体")
public class ChartResultReq {
//考核类型 月度 季度
@ApiModelProperty(value = "考核类型 月度,自定义",name = "type")
private int type;
@ApiModelProperty(value = "如果为月度不为空",name = "month")
private String month;
@ApiModelProperty(value = "自定义起始时间",name = "startTime")
private String startTime;
@ApiModelProperty(value = "自定义结束时间",name = "endTime")
private String endTime;
}

View File

@ -8,5 +8,5 @@ import com.lz.modules.performance.req.ChartResultReq;
* @Date: 2020/10/14 16:52
*/
public interface ChartResultService {
void ChartReport(ChartResultReq req);
void chartReport(ChartResultReq req);
}

View File

@ -21,7 +21,7 @@ public class ChartResultServiceImpl implements ChartResultService {
@Autowired
private ResultRecordService resultRecordService;
@Override
public void ChartReport(ChartResultReq req) {
public void chartReport(ChartResultReq req) {
AssessListReq query = new AssessListReq();
BeanUtils.copyProperties(req,query);
List<ChartStatisticalRes> chartStatisticalRes = resultRecordService.countNumByFlowProcess(query);