Commit 4f4dbfb9 authored by 廖旭伟's avatar 廖旭伟

异常分值分布情况

parent 83228dac
package com.mortals.xhx.module.staff.web;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
......@@ -8,6 +9,7 @@ import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.staff.model.StaffPerformStatEntity;
import com.mortals.xhx.module.staff.model.vo.StaffSummaryTopQuery;
import com.mortals.xhx.module.staff.service.StaffPerformStatService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -89,7 +92,41 @@ public class StaffPerformStatController extends BaseCRUDJsonBodyMappingControlle
int code = 1;
try {
List<StaffPerformStatEntity> result = this.getService().getExceptionList(query);
model.put("data", result);
List<JSONObject> data = new ArrayList<>();
if(CollectionUtils.isNotEmpty(result)) {
StaffPerformStatEntity entity = result.get(0);
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("name", "考勤绩效");
jsonObject1.put("add", entity.getAttendScoreAdd());
jsonObject1.put("sub", entity.getAttendScoreSub());
data.add(jsonObject1);
JSONObject jsonObject2 = new JSONObject();
jsonObject2.put("name", "评价绩效");
jsonObject2.put("add", entity.getReviewScoreAdd());
jsonObject2.put("sub", entity.getReviewScoreSub());
data.add(jsonObject2);
JSONObject jsonObject3 = new JSONObject();
jsonObject3.put("name", "投诉绩效");
jsonObject3.put("add", entity.getComplainScoreAdd());
jsonObject3.put("sub", entity.getComplainScoreSub());
data.add(jsonObject3);
JSONObject jsonObject4 = new JSONObject();
jsonObject4.put("name", "办件绩效");
jsonObject4.put("add", entity.getGoworkScoreAdd());
jsonObject4.put("sub", entity.getGoworkScoreSub());
data.add(jsonObject4);
JSONObject jsonObject5 = new JSONObject();
jsonObject5.put("name", "效能绩效");
jsonObject5.put("add", entity.getEffectScoreAdd());
jsonObject5.put("sub", entity.getEffectScoreSub());
data.add(jsonObject5);
JSONObject jsonObject6 = new JSONObject();
jsonObject6.put("name", "其它绩效");
jsonObject6.put("add", entity.getOtherScoreAdd());
jsonObject6.put("sub", entity.getOtherScoreSub());
data.add(jsonObject6);
}
model.put("data", data);
model.put("message_info", busiDesc + "成功");
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
......
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