Commit 028824c4 authored by 赵啸非's avatar 赵啸非

添加申诉统计业务

parent a21dc9fa
......@@ -19,5 +19,9 @@ public class PerformReq extends BaseReq {
private Long id;
private Integer processStatus;
private Integer scoreType;
}
......@@ -14,6 +14,7 @@ import com.mortals.xhx.busiz.rsp.PerformInfo;
import com.mortals.xhx.busiz.rsp.PerformStatInfo;
import com.mortals.xhx.common.code.PerformTypeEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.code.SubAddTypeEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.*;
import com.mortals.xhx.module.check.model.vo.CheckAllRecordVo;
......@@ -127,12 +128,11 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
performReq.setPerformStartDate(DateUtil.beginOfMonth(DateUtil.parse(performReq.getPerformStartDate()).toJdkDate()).toDateStr());
performReq.setPerformEndDate(DateUtil.endOfMonth(DateUtil.parse(performReq.getPerformStartDate()).toJdkDate()).toDateStr());
}
CheckAllRecordQuery query = new CheckAllRecordQuery();
query.setCheckTimeStart(performReq.getPerformStartDate());
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setCreateUserId(context.getUser().getId());
if (PerformTypeEnum.全部.getValue().equals(performReq.getPerformType())) {
CheckAllRecordQuery query = new CheckAllRecordQuery();
query.setCheckTimeStart(performReq.getPerformStartDate());
query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setCreateUserId(context.getUser().getId());
List<CheckAllRecordVo> allCheckRecord = checkAllRecordService.getAllCheckRecord(query);
List<PerformInfo> collect = allCheckRecord.stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
......@@ -148,6 +148,38 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
parsePageInfo(model, pageAllInfo);
}
if(!ObjectUtils.isEmpty(performReq.getProcessStatus())){
query.setCheckStatus(performReq.getProcessStatus());
List<CheckAllRecordVo> allCheckRecord = checkAllRecordService.getAllCheckRecord(query);
List<PerformInfo> collect = allCheckRecord.stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
PageInfo pageAllInfo = new PageInfo();
pageAllInfo.setTotalResult(collect.size());
pageAllInfo.setCurrPage(1);
pageAllInfo.setPrePageResult(-1);
model.put(PAGEINFO_KEY, pageAllInfo);
parsePageInfo(model, pageAllInfo);
}
if(!ObjectUtils.isEmpty(performReq.getScoreType())){
query.setSubMethod(performReq.getScoreType());
List<CheckAllRecordVo> allCheckRecord = checkAllRecordService.getAllCheckRecord(query);
List<PerformInfo> collect = allCheckRecord.stream().map(item -> {
PerformInfo performInfo = new PerformInfo();
BeanUtils.copyProperties(item, performInfo, BeanUtil.getNullPropertyNames(item));
return performInfo;
}).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect);
PageInfo pageAllInfo = new PageInfo();
pageAllInfo.setTotalResult(collect.size());
pageAllInfo.setCurrPage(1);
pageAllInfo.setPrePageResult(-1);
model.put(PAGEINFO_KEY, pageAllInfo);
parsePageInfo(model, pageAllInfo);
}
// model.put(KEY_RESULT_DATA, result.getList());
......@@ -176,9 +208,6 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
try {
//根据状态 查询 当前是否已经存在正在进行的申诉
if (ObjectUtils.isEmpty(req.getPerformType())) throw new AppException("绩效类型不能为空!");
if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!");
if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!");
if (PerformTypeEnum.考勤绩效.getValue().equals(req.getPerformType())) {
boolean bool = attend(req);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment