fix
This commit is contained in:
parent
3cb75b0b50
commit
d14f05bd3a
@ -7,6 +7,7 @@ import com.lz.modules.app.dto.ResultProgressDto;
|
|||||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
import com.lz.modules.app.enums.ResultRecordStatusEnum;
|
import com.lz.modules.app.enums.ResultRecordStatusEnum;
|
||||||
|
import com.lz.modules.app.enums.ResultRecordTypeEnum;
|
||||||
import com.lz.modules.app.resp.OwnResultResp;
|
import com.lz.modules.app.resp.OwnResultResp;
|
||||||
import com.lz.modules.app.resp.ReportChartResp;
|
import com.lz.modules.app.resp.ReportChartResp;
|
||||||
import com.lz.modules.app.service.DepartmentsService;
|
import com.lz.modules.app.service.DepartmentsService;
|
||||||
@ -50,8 +51,8 @@ public class ReportResultController extends AbstractController{
|
|||||||
@RequestMapping("chart")
|
@RequestMapping("chart")
|
||||||
public R reportChart(String monthTime){
|
public R reportChart(String monthTime){
|
||||||
ReportChartResp data = new ReportChartResp();
|
ReportChartResp data = new ReportChartResp();
|
||||||
ResultProgressDto target = chartService.resultProgress(1,monthTime);
|
ResultProgressDto target = chartService.resultProgress(ResultRecordTypeEnum.TARGET.getType(),monthTime);
|
||||||
ResultProgressDto result = chartService.resultProgress(2,monthTime);
|
ResultProgressDto result = chartService.resultProgress(ResultRecordTypeEnum.RESULT.getType(),monthTime);
|
||||||
|
|
||||||
//人员等级分布
|
//人员等级分布
|
||||||
//部门等级占比
|
//部门等级占比
|
||||||
@ -59,7 +60,7 @@ public class ReportResultController extends AbstractController{
|
|||||||
|
|
||||||
data.setTarget(target);
|
data.setTarget(target);
|
||||||
data.setResult(result);
|
data.setResult(result);
|
||||||
return R.ok();
|
return R.ok().put("data",data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,38 @@
|
|||||||
|
package com.lz.modules.app.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: djc
|
||||||
|
* @Desc:
|
||||||
|
* @Date: 2020/9/15 10:01
|
||||||
|
*/
|
||||||
|
public enum ResultRecordTypeEnum {
|
||||||
|
|
||||||
|
TARGET(1,"月初目标"),
|
||||||
|
RESULT(2,"月末结果");
|
||||||
|
|
||||||
|
private int type;
|
||||||
|
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
|
||||||
|
ResultRecordTypeEnum(int type, String desc) {
|
||||||
|
this.type = type;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesc(String desc) {
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,12 +9,14 @@ import com.lz.modules.sys.entity.app.ResultRecord;
|
|||||||
import com.lz.modules.sys.service.app.ChartService;
|
import com.lz.modules.sys.service.app.ChartService;
|
||||||
import com.lz.modules.sys.service.app.ResultRecordService;
|
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: djc
|
* @Author: djc
|
||||||
* @Desc:
|
* @Desc:
|
||||||
* @Date: 2020/9/14 16:54
|
* @Date: 2020/9/14 16:54
|
||||||
*/
|
*/
|
||||||
|
@Service
|
||||||
public class ChartServiceImpl implements ChartService {
|
public class ChartServiceImpl implements ChartService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ResultRecordService resultRecordService;
|
private ResultRecordService resultRecordService;
|
||||||
@ -35,6 +37,7 @@ public class ChartServiceImpl implements ChartService {
|
|||||||
.eq("type", type)
|
.eq("type", type)
|
||||||
.like("month_time",monthTime)
|
.like("month_time",monthTime)
|
||||||
.in("status", ResultRecordStatusEnum.REFUSE.getStatus(),ResultRecordStatusEnum.AGREE.getStatus()));
|
.in("status", ResultRecordStatusEnum.REFUSE.getStatus(),ResultRecordStatusEnum.AGREE.getStatus()));
|
||||||
|
|
||||||
resultProgressDto.setNoCommit(total-commit);
|
resultProgressDto.setNoCommit(total-commit);
|
||||||
resultProgressDto.setFinished(finished);
|
resultProgressDto.setFinished(finished);
|
||||||
resultProgressDto.setReview(commit-finished);
|
resultProgressDto.setReview(commit-finished);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user