Commit 2aa496a9 authored by 廖旭伟's avatar 廖旭伟

绩效汇总权重返回值

parent 85048cf6
......@@ -7,6 +7,7 @@ import com.mortals.framework.model.OrderCol;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.module.attendance.model.vo.AttendanceSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.dept.model.DeptQuery;
......@@ -42,6 +43,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
import static com.mortals.xhx.common.key.ParamKey.SYS_PARAM_WEIGHT;
import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
......@@ -71,8 +73,8 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "month", paramService.getParamBySecondOrganize("StaffPerformSummary", "month"));
this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n)));
//this.addDict(model, "month", paramService.getParamBySecondOrganize("StaffPerformSummary", "month"));
//this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n)));
super.init(model, context);
}
......@@ -84,6 +86,19 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro
}
}
@Override
protected int doListAfter(StaffPerformSummaryEntity query, Map<String, Object> model, Context context) throws AppException {
String value = paramService.getValueByKey(SYS_PARAM_WEIGHT);
WeightPdu weightPdu;
if (ObjectUtils.isEmpty(value)){
weightPdu = new WeightPdu();
}else {
weightPdu = JSONObject.parseObject(value,WeightPdu.class);
}
this.addDict(model,"weightPdu",weightPdu);
return super.doListAfter(query,model,context);
}
@Override
protected int viewAfter(Long id, Map<String, Object> model, StaffPerformSummaryEntity entity, Context context) throws AppException {
StaffEntity staffEntity = staffService.get(entity.getStaffId());
......
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