Commit 72d39efe authored by 赵啸非's avatar 赵啸非

添加申诉统计业务

parent 47c319f5
...@@ -8,10 +8,7 @@ import com.mortals.framework.model.Context; ...@@ -8,10 +8,7 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.xhx.busiz.req.*; import com.mortals.xhx.busiz.req.*;
import com.mortals.xhx.busiz.rsp.AppealStatInfo; import com.mortals.xhx.busiz.rsp.*;
import com.mortals.xhx.busiz.rsp.InspectStatInfo;
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.PerformTypeEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum; import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.code.SubAddTypeEnum; import com.mortals.xhx.common.code.SubAddTypeEnum;
...@@ -76,6 +73,20 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -76,6 +73,20 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
private CheckAllRecordService checkAllRecordService; private CheckAllRecordService checkAllRecordService;
@Autowired
private CheckAttendRecordService checkAttendRecordService;
@Autowired
private CheckReviewRecordService checkReviewRecordService;
@Autowired
private CheckComplainRecordService checkComplainRecordService;
@Autowired
private CheckEffectRecordService checkEffectRecordService;
@Autowired
private CheckGoworkRecordService checkGoworkRecordService;
@Autowired
private CheckOtherRecordService checkOtherRecordService;
/** /**
* 个人巡查效统计 * 个人巡查效统计
...@@ -395,7 +406,50 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -395,7 +406,50 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
return save.newEntity(); return save.newEntity();
} }
/**
* 详细
*/
@PostMapping(value = "info")
public Rest<PerformDetailInfo> performInfo(@RequestBody PerformReq performReq) {
Context context = this.getContext();
String busiDesc = "个人巡查详细";
log.info("【{}】【请求体】--> {}", busiDesc, JSONObject.toJSONString(performReq));
Rest<PerformDetailInfo> rest = Rest.ok(busiDesc + " 【成功】");
try {
if (ObjectUtils.isEmpty(performReq.getId())) {
throw new AppException("详细查询id不能为空!");
}
PerformDetailInfo performDetailInfo = new PerformDetailInfo();
if (PerformTypeEnum.考勤绩效.getValue().equals(performReq.getPerformType())) {
CheckAttendRecordEntity checkEntity = checkAttendRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.评价差评绩效.getValue().equals(performReq.getPerformType())) {
CheckReviewRecordEntity checkEntity = checkReviewRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.评价投诉绩效.getValue().equals(performReq.getPerformType())) {
CheckComplainRecordEntity checkEntity = checkComplainRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.办件绩效.getValue().equals(performReq.getPerformType())) {
CheckGoworkRecordEntity checkEntity = checkGoworkRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.效能绩效.getValue().equals(performReq.getPerformType())) {
CheckEffectRecordEntity checkEntity = checkEffectRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.其它绩效.getValue().equals(performReq.getPerformType())) {
CheckOtherRecordEntity checkEntity = checkOtherRecordService.get(performReq.getId(), context);
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else {
throw new AppException("不支持当前绩效类型");
}
rest.setData(performDetailInfo);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error(busiDesc, e);
rest = Rest.fail(super.convertException(e));
}
return rest;
}
private PerformRulesEntity getRule(String ruleId) { private PerformRulesEntity getRule(String ruleId) {
PerformRulesEntity rule = rulesService.getCache(ruleId); PerformRulesEntity rule = rulesService.getCache(ruleId);
......
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