Commit 5787188f authored by 赵啸非's avatar 赵啸非

添加申诉统计业务

parent 18ebfae2
......@@ -218,7 +218,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
Context context = this.getContext();
req.setStaffId(context.getUser().getCustomerId());
// req.setStaffId(context.getUser().getCustomerId());
try {
//根据状态 查询 当前是否已经存在正在进行的申诉
if (ObjectUtils.isEmpty(context) || ObjectUtils.isEmpty(context.getUser())) {
......@@ -227,22 +227,22 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
if (ObjectUtils.isEmpty(req.getPerformType())) throw new AppException("绩效类型不能为空!");
if (PerformTypeEnum.考勤绩效.getValue().equals(req.getPerformType())) {
boolean bool = attend(req);
boolean bool = attend(req,context);
if (bool) throw new AppException(busiDesc + "失败!");
} else if (PerformTypeEnum.评价差评绩效.getValue().equals(req.getPerformType())) {
boolean bool = review(req);
boolean bool = review(req,context);
if (bool) throw new AppException(busiDesc + "失败!");
} else if (PerformTypeEnum.评价投诉绩效.getValue().equals(req.getPerformType())) {
boolean bool = complain(req);
boolean bool = complain(req,context);
if (bool) throw new AppException(busiDesc + "失败!");
} else if (PerformTypeEnum.办件绩效.getValue().equals(req.getPerformType())) {
boolean bool = gowork(req);
boolean bool = gowork(req,context);
if (bool) throw new AppException(busiDesc + "失败!");
} else if (PerformTypeEnum.效能绩效.getValue().equals(req.getPerformType())) {
boolean bool = effect(req);
boolean bool = effect(req,context);
if (bool) throw new AppException(busiDesc + "失败!");
} else if (PerformTypeEnum.其它绩效.getValue().equals(req.getPerformType())) {
boolean bool = other(req);
boolean bool = other(req,context);
if (bool) throw new AppException(busiDesc + "失败!");
} else {
throw new AppException("不支持当前绩效类型");
......@@ -260,7 +260,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
private boolean attend(InspectSaveReq req) throws AppException {
private boolean attend(InspectSaveReq req,Context context) throws AppException {
//考勤保存
PerformRulesEntity rule = getRule(req.getRuleId().toString());
StaffEntity staffEntity = getStaff(req.getStaffId().toString());
......@@ -274,7 +274,6 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setDeptId(staffEntity.getDeptId());
recordEntity.setDeptName(staffEntity.getDeptName());
recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId());
......@@ -282,7 +281,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setCreateUserId(1L);
recordEntity.setCreateUserId(context.getUser().getCustomerId());
recordEntity.setCreateTime(new Date());
PerformAttendRecordEntity save = attendRecordService.save(recordEntity);
......@@ -291,7 +290,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
}
private boolean review(InspectSaveReq req) throws AppException {
private boolean review(InspectSaveReq req,Context context) throws AppException {
//评价保存
StaffEntity staffEntity = getStaff(req.getStaffId().toString());
PerformRulesEntity rule = getRule(req.getRuleId().toString());
......@@ -312,14 +311,14 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setCreateUserId(1L);
recordEntity.setCreateUserId(context.getUser().getCustomerId());
recordEntity.setCreateTime(new Date());
PerformReviewRecordEntity save = reviewRecordService.save(recordEntity);
return save.newEntity();
}
private boolean complain(InspectSaveReq req) throws AppException {
private boolean complain(InspectSaveReq req,Context context) throws AppException {
//投诉保存
StaffEntity staffEntity = getStaff(req.getStaffId().toString());
PerformRulesEntity rule = getRule(req.getRuleId().toString());
......@@ -343,14 +342,14 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setDeductTime(new Date());
recordEntity.setCreateUserId(1L);
recordEntity.setCreateUserId(context.getUser().getCustomerId());
recordEntity.setCreateTime(new Date());
PerformComplainRecordEntity save = complainRecordService.save(recordEntity);
return save.newEntity();
}
private boolean gowork(InspectSaveReq req) throws AppException {
private boolean gowork(InspectSaveReq req,Context context) throws AppException {
//办件保存
StaffEntity staffEntity = getStaff(req.getStaffId().toString());
PerformRulesEntity rule = getRule(req.getRuleId().toString());
......@@ -378,7 +377,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
}
private boolean effect(InspectSaveReq req) throws AppException {
private boolean effect(InspectSaveReq req,Context context) throws AppException {
//效能保存
StaffEntity staffEntity = getStaff(req.getStaffId().toString());
PerformRulesEntity rule = getRule(req.getRuleId().toString());
......@@ -399,13 +398,13 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setCreateUserId(1L);
recordEntity.setCreateUserId(context.getUser().getCustomerId());
recordEntity.setCreateTime(new Date());
PerformEffectRecordEntity save = effectRecordService.save(recordEntity);
return save.newEntity();
}
private boolean other(InspectSaveReq req) throws AppException {
private boolean other(InspectSaveReq req,Context context) throws AppException {
//其它保存
StaffEntity staffEntity = getStaff(req.getStaffId().toString());
......@@ -427,7 +426,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setCreateUserId(1L);
recordEntity.setCreateUserId(context.getUser().getCustomerId());
recordEntity.setCreateTime(new Date());
PerformOtherRecordEntity save = otherRecordService.save(recordEntity);
return save.newEntity();
......
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