Commit 4fbf688f authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 72d91482 eb1764ef
......@@ -29,11 +29,31 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
<p v-if="form.view == '查看'">{{ form.deptName }}</p>
<el-select
v-else
v-model="form.deptId"
......@@ -87,7 +107,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="异常时间:">
<el-form-item label="异常时间:" prop="errorTime">
<p v-if="form.view == '查看'">{{ form.errorTime }}</p>
<el-date-picker
v-else
......@@ -103,7 +123,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="实际打卡时间:">
<el-form-item label="实际打卡时间:" prop="actualAttendTime">
<p v-if="form.view == '查看'">{{ form.actualAttendTime }}</p>
<el-date-picker
......@@ -368,6 +388,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -415,9 +445,12 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
errorTime: [{ required: true, message: "请选择异常时间" }],
actualAttendTime: [{ required: true, message: "请选择实际打卡时间" }],
},
staffArr: [],
deptArr: [],
salaArr: [],
kaoqinArr: [],
fileList: [],
kaoqinCateArr: [],
......@@ -465,9 +498,9 @@ export default {
this.$forceUpdate(this.form);
},
staffChange(val) {
console.log(val);
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -608,6 +641,8 @@ export default {
subAddType: "",
subMethod: "",
workNum: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -29,6 +29,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
......@@ -155,7 +176,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="投诉时间:">
<el-form-item label="投诉时间:" prop="complainTime">
<p v-if="form.view == '查看'">{{ form.complainTime }}</p>
<el-date-picker
......@@ -415,6 +436,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -455,11 +486,13 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
complainTime: [{ required: true, message: "请选择投诉时间" }],
},
staffArr: [],
deptArr: [],
kaoqinArr: [],
fileList: [],
salaArr: [],
kaoqinCateArr: [],
ruleArr: [],
sourceArr: [
......@@ -531,6 +564,7 @@ export default {
staffChange(val) {
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -609,6 +643,8 @@ export default {
remark: "",
filePaths: "",
fileNames: "",
salaId: null,
salaName: "",
};
this.open = true;
......@@ -693,6 +729,8 @@ export default {
score: "",
processStatus: 1,
remark: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -29,6 +29,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
......@@ -101,7 +122,7 @@
<el-row>
<el-col :span="22">
<el-form-item label="发生时间:">
<el-form-item label="发生时间:" prop="happenTime">
<p v-if="form.view == '查看'">{{ form.happenTime }}</p>
<el-date-picker
......@@ -131,7 +152,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="报警时间:">
<el-form-item label="报警时间:" prop="alarmTime">
<p v-if="form.view == '查看'">{{ form.alarmTime }}</p>
<el-date-picker
......@@ -385,6 +406,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -425,6 +456,8 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
alarmTime: [{ required: true, message: "请选择创建时间" }],
happenTime: [{ required: true, message: "请选择创建时间" }],
},
staffArr: [
{
......@@ -436,6 +469,7 @@ export default {
deptArr: [],
kaoqinArr: [],
fileList: [],
salaArr: [],
kaoqinCateArr: [],
ruleArr: [],
sourceArr: [
......@@ -504,6 +538,7 @@ export default {
console.log(val);
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -644,6 +679,8 @@ export default {
processStatus: 1,
remark: "",
categoryId: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -29,6 +29,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
......@@ -108,7 +129,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="办件时间:">
<el-form-item label="办件时间:" prop="goworkTime">
<p v-if="form.view == '查看'">{{ form.goworkTime }}</p>
<el-date-picker
......@@ -355,6 +376,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -395,6 +426,7 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
goworkTime: [{ required: true, message: "请选择办件时间" }],
},
staffArr: [],
deptArr: [],
......@@ -402,6 +434,7 @@ export default {
fileList: [],
kaoqinCateArr: [],
ruleArr: [],
salaArr: [],
sourceArr: [
{
label: "窗口评价系统",
......@@ -469,9 +502,9 @@ export default {
this.$forceUpdate(this.form);
},
staffChange(val) {
console.log(val);
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -606,6 +639,8 @@ export default {
score: "",
processStatus: 1,
remark: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -29,6 +29,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
......@@ -67,7 +88,7 @@
<el-row>
<el-col :span="22">
<el-form-item label="发生时间:">
<el-form-item label="发生时间:" prop="happenTime">
<p v-if="form.view == '查看'">{{ form.happenTime }}</p>
<el-date-picker
v-else
......@@ -315,6 +336,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -355,6 +386,7 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
happenTime: [{ required: true, message: "请选择发生时间" }],
},
staffArr: [],
deptArr: [],
......@@ -362,6 +394,7 @@ export default {
fileList: [],
kaoqinCateArr: [],
ruleArr: [],
salaArr: [],
sourceArr: [
{
label: "窗口评价系统",
......@@ -432,6 +465,7 @@ export default {
console.log(val);
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -569,6 +603,8 @@ export default {
categoryId: "",
happenTime: "",
filePaths: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -29,6 +29,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属大厅:">
<p v-if="form.view == '查看'">{{ form.salaName }}</p>
<el-select
v-else
v-model="form.salaId"
style="width: 100%;"
disabled
>
<el-option
v-for="item in salaArr"
:key="item.id"
:label="item.deptName"
:value="item.id"
>
</el-option
></el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="所属部门:">
......@@ -120,7 +141,7 @@
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="评价时间">
<el-form-item label="评价时间" prop="reviewTime">
<p v-if="form.view == '查看'">{{ form.reviewTime }}</p>
<el-date-picker
......@@ -370,6 +391,16 @@ export default {
this.staffArr = [];
}
});
// 获取大厅列表
this.$get("/dept/getSalaList")
.then((res) => {
if (res.code == 1) {
this.salaArr = res.data.data;
}
})
.catch((error) => {
this.$message.error(error.message);
});
// 获取部门列表
this.$post("/dept/list", { page: 1, size: -1 }).then((res) => {
if (res.code == 1) {
......@@ -410,12 +441,14 @@ export default {
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
createTime: [{ required: true, message: "请选择创建时间" }],
reviewTime: [{ required: true, message: "请选择评价时间" }],
},
staffArr: [],
deptArr: [],
kaoqinArr: [],
fileList: [],
kaoqinCateArr: [],
salaArr: [],
ruleArr: [],
sourceArr: [
{
......@@ -487,6 +520,7 @@ export default {
console.log(val);
let arr = this.staffArr.filter((v) => v.id == val);
this.form.deptId = arr && arr.length > 0 ? arr[0].deptId : "";
this.form.salaId = arr && arr.length > 0 ? arr[0].salaId : "";
},
/** 编辑 */
edit(row) {
......@@ -627,6 +661,8 @@ export default {
windowNum: "",
workNum: "",
categoryId: "",
salaId: null,
salaName: "",
};
this.resetForm("form");
},
......
......@@ -73,7 +73,7 @@
>
</el-switch>
</div>
<div class="history">
<!-- <div class="history">
<span>投诉授权:</span>
<el-switch
:active-value="1"
......@@ -81,7 +81,7 @@
v-model="form.reviewCheck"
>
</el-switch>
</div>
</div> -->
<div class="history">
<span>办件授权:</span>
<el-switch
......@@ -100,15 +100,15 @@
>
</el-switch>
</div>
<!-- <div class="history">
<span>其他授权:</span>
<div class="history">
<span>自评授权:</span>
<el-switch
:active-value="1"
:inactive-value="0"
v-model="form.otherCheck"
>
</el-switch>
</div> -->
</div>
</div>
<form-buttons
......
......@@ -36,6 +36,8 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
@Autowired
private CheckReviewRecordService checkReviewRecordService;
@Autowired
private CheckComplainRecordService checkComplainRecordService;
@Autowired
private CheckWindowWorkmanPerformService checkWindowWorkmanPerformService;
@Override
......@@ -64,6 +66,7 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
}
if(query.getCheckType() == CheckTypeEnum.评价绩效.getValue()){
checkReviewRecordService.summaryCheck(query);
checkComplainRecordService.summaryCheck(query);
}
if(query.getCheckType() == CheckTypeEnum.其它绩效.getValue()){
checkWindowWorkmanPerformService.summaryCheck(query);
......@@ -74,6 +77,7 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
checkEffectRecordService.summaryCheck(query);
checkGoworkRecordService.summaryCheck(query);
checkReviewRecordService.summaryCheck(query);
checkComplainRecordService.summaryCheck(query);
checkWindowWorkmanPerformService.summaryCheck(query);
log.info("绩效分数汇总完成");
}
......
package com.mortals.xhx.module.check.service.impl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.IUser;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.base.system.message.MessageService;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.common.utils.AuditUtil;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.dao.CheckComplainRecordDao;
......@@ -48,6 +52,9 @@ import java.util.Calendar;
import java.util.Date;
import java.util.List;
import static com.mortals.xhx.common.key.ParamKey.SYS_PARAM_WEIGHT;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
/**
* CheckComplainRecordService
* 评价绩效投诉核查信息 service实现
......@@ -79,6 +86,10 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
@Autowired
private PerformRulesService rulesService;
@Autowired
private ParamService paramService;
@Autowired
private ICacheService cacheService;
@Override
protected void saveBefore(CheckComplainRecordEntity entity, Context context) throws AppException {
......@@ -99,7 +110,10 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
if (!ObjectUtils.isEmpty(entity.getStaffId())) {
StaffEntity staffCache = staffService.getCache(entity.getStaffId().toString());
entity.setStaffName(staffCache == null ? "" : staffCache.getName());
entity.setDeptId(staffCache == null ? null : staffCache.getDeptId());
entity.setDeptName(staffCache == null ? "" : staffCache.getDeptName());
entity.setSalaId(staffCache == null ? null : staffCache.getSalaId());
entity.setSalaName(staffCache == null ? "" : staffCache.getSalaName());
}
}
......@@ -111,7 +125,9 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
query.setStaffId(entity.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
summaryCheck(query);
query.setCheckType(CheckTypeEnum.评价绩效.getValue());
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE, query);
//summaryCheck(query);
} catch (Exception e) {
log.error("汇总已审核的核查记录出错", e);
}
......@@ -179,7 +195,11 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
sendCheckDingTalk(entity);
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(temp.getStaffId());
summaryCheck(query);
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
query.setCheckType(CheckTypeEnum.评价绩效.getValue());
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE, query);
//summaryCheck(query);
} catch (Exception e) {
log.error("汇总已审核的核查记录出错", e);
}
......@@ -199,6 +219,13 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
}
List<StaffCheckSummaryVo> summaryVoList = dao.summaryCheck(query);
if (CollectionUtils.isNotEmpty(summaryVoList)) {
String value = paramService.getValueByKey(SYS_PARAM_WEIGHT);
WeightPdu weightPdu;
if (ObjectUtils.isEmpty(value)){
weightPdu = new WeightPdu();
}else {
weightPdu = JSONObject.parseObject(value,WeightPdu.class);
}
for (StaffCheckSummaryVo vo : summaryVoList) {
StaffEntity staffEntity = staffService.get(vo.getStaffId());
if(staffEntity.getStatus() == StaffSatusEnum.离职.getValue()) {
......@@ -215,10 +242,11 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
if(staffEntity.getAttendCheck()==0 && staffEntity.getEffectCheck()==0 && staffEntity.getGoworkCheck()==0 && staffEntity.getComplainCheck()==0){
continue;
}
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo, staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setComplainScore(vo.getSumScore());
staffPerformSummaryEntity.setReviewScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
summaryQuery.setStaffId(vo.getStaffId());
summaryQuery.setYear(vo.getYear());
......@@ -252,8 +280,9 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
erro = erro.add(staffPerformSummaryEntity.getEffectScore());
erro = erro.add(staffPerformSummaryEntity.getComplainScore());
staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.add(erro));
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(erro));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
......@@ -267,8 +296,9 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
......@@ -426,4 +456,39 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
totalScore = totalScore.subtract(totalSubScore);
statEntity.setTotalScore(totalScore);
}
private void computeSummary(StaffPerformSummaryEntity staffPerformSummaryEntity, WeightPdu weightPdu, StaffEntity staffEntity){
BigDecimal total = new BigDecimal(100);
BigDecimal reviewScore = total.add(staffPerformSummaryEntity.getReviewScore()); //评价
reviewScore = reviewScore.multiply(weightPdu.reviewWeight());
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
attendScore = attendScore.multiply(weightPdu.attendWeight());
BigDecimal otherScore = staffPerformSummaryEntity.getOtherScore(); //自评不用加100
if(otherScore.compareTo(BigDecimal.ZERO)==0){
otherScore = new BigDecimal(100);
}
otherScore = otherScore.multiply(weightPdu.selfWeight());
BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件
goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
effectScore = effectScore.multiply(weightPdu.effectWeight());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal summary = new BigDecimal(0);
if(staffEntity.getReviewCheck()==1) {
summary = summary.add(reviewScore);
}
if(staffEntity.getAttendCheck()==1) {
summary = summary.add(attendScore);
}
if(staffEntity.getOtherCheck()==1) {
summary = summary.add(otherScore);
}
if(staffEntity.getEffectCheck()==1){
summary = summary.add(effectScore);
}
if(staffEntity.getGoworkCheck()==1) {
summary = summary.add(goworkScore);
}
staffPerformSummaryEntity.setTotalScore(summary);
}
}
\ No newline at end of file
......@@ -63,7 +63,10 @@ public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Pe
if (!ObjectUtils.isEmpty(entity.getStaffId())) {
StaffEntity staffCache = staffService.getCache(entity.getStaffId().toString());
entity.setStaffName(staffCache == null ? "" : staffCache.getName());
entity.setDeptId(staffCache == null ? null : staffCache.getDeptId());
entity.setDeptName(staffCache == null ? "" : staffCache.getDeptName());
entity.setSalaId(staffCache == null ? null : staffCache.getSalaId());
entity.setSalaName(staffCache == null ? "" : staffCache.getSalaName());
}
entity.setDeductTime(new Date());
......
......@@ -65,7 +65,10 @@ public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
if (!ObjectUtils.isEmpty(entity.getStaffId())) {
StaffEntity staffCache = staffService.getCache(entity.getStaffId().toString());
entity.setStaffName(staffCache == null ? "" : staffCache.getName());
entity.setDeptId(staffCache == null ? null : staffCache.getDeptId());
entity.setDeptName(staffCache == null ? "" : staffCache.getDeptName());
entity.setSalaId(staffCache == null ? null : staffCache.getSalaId());
entity.setSalaName(staffCache == null ? "" : staffCache.getSalaName());
}
entity.setDeductTime(new Date());
if(ObjectUtils.isEmpty(entity.getDeductPerson())){
......@@ -76,6 +79,7 @@ public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
@Override
protected void saveAfter(PerformReviewRecordEntity entity, Context context) throws AppException {
CheckReviewRecordEntity checkReviewRecordEntity = new CheckReviewRecordEntity();
checkReviewRecordEntity.initAttrValue();
BeanUtils.copyProperties(entity, checkReviewRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkReviewRecordEntity.setId(null);
checkReviewRecordEntity.setRecordId(entity.getId());
......
......@@ -73,7 +73,7 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
/**
* 投诉绩效指标分数
*/
@Excel(name = "投诉绩效指标分数")
//@Excel(name = "投诉绩效指标分数")
private BigDecimal complainScore;
/**
* 办件绩效分数
......@@ -88,7 +88,7 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
/**
* 其它绩效分数
*/
@Excel(name = "其它绩效分数")
@Excel(name = "自评绩效分数")
private BigDecimal otherScore;
/**
* 累计异常分数
......
......@@ -10,7 +10,11 @@
ANY_VALUE(DATE_FORMAT(checkTime,'%m')) as `month`,
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_complain_record
(
SELECT staffId,staffName,workNum,salaId,salaName,deptId,deptName,checkTime,subAddType,score,checkStatus,auditStatus FROM mortals_xhx_check_complain_record
UNION
SELECT staffId,staffName,workNum,salaId,salaName,deptId,deptName,checkTime,subAddType,score,checkStatus,auditStatus FROM mortals_xhx_check_review_record
) as a
WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
......
......@@ -10,7 +10,11 @@
ANY_VALUE(DATE_FORMAT(checkTime,'%m')) as `month`,
SUM(CASE subAddType WHEN 1 THEN score ELSE score*-1 END) as sumScore
FROM
mortals_xhx_check_review_record
(
SELECT staffId,staffName,workNum,salaId,salaName,deptId,deptName,checkTime,subAddType,score,checkStatus,auditStatus FROM mortals_xhx_check_complain_record
UNION
SELECT staffId,staffName,workNum,salaId,salaName,deptId,deptName,checkTime,subAddType,score,checkStatus,auditStatus FROM mortals_xhx_check_review_record
) as a
WHERE checkStatus = 2 and auditStatus = 1
<if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<if test="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
......
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