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.StaffEntity;
|
||||
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.ReportChartResp;
|
||||
import com.lz.modules.app.service.DepartmentsService;
|
||||
@ -50,8 +51,8 @@ public class ReportResultController extends AbstractController{
|
||||
@RequestMapping("chart")
|
||||
public R reportChart(String monthTime){
|
||||
ReportChartResp data = new ReportChartResp();
|
||||
ResultProgressDto target = chartService.resultProgress(1,monthTime);
|
||||
ResultProgressDto result = chartService.resultProgress(2,monthTime);
|
||||
ResultProgressDto target = chartService.resultProgress(ResultRecordTypeEnum.TARGET.getType(),monthTime);
|
||||
ResultProgressDto result = chartService.resultProgress(ResultRecordTypeEnum.RESULT.getType(),monthTime);
|
||||
|
||||
//人员等级分布
|
||||
//部门等级占比
|
||||
@ -59,7 +60,7 @@ public class ReportResultController extends AbstractController{
|
||||
|
||||
data.setTarget(target);
|
||||
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.ResultRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Author: djc
|
||||
* @Desc:
|
||||
* @Date: 2020/9/14 16:54
|
||||
*/
|
||||
@Service
|
||||
public class ChartServiceImpl implements ChartService {
|
||||
@Autowired
|
||||
private ResultRecordService resultRecordService;
|
||||
@ -35,6 +37,7 @@ public class ChartServiceImpl implements ChartService {
|
||||
.eq("type", type)
|
||||
.like("month_time",monthTime)
|
||||
.in("status", ResultRecordStatusEnum.REFUSE.getStatus(),ResultRecordStatusEnum.AGREE.getStatus()));
|
||||
|
||||
resultProgressDto.setNoCommit(total-commit);
|
||||
resultProgressDto.setFinished(finished);
|
||||
resultProgressDto.setReview(commit-finished);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user