Commit 462392e6 authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents 403d0b5b 05a2dddc
...@@ -224,100 +224,24 @@ export default { ...@@ -224,100 +224,24 @@ export default {
type: [], type: [],
resource: "", resource: "",
}, },
config: { config: {},//部门绩效总分top10
data: [ personConfig: {},//个人绩效总分top10
{
name: "部门1",
value: 95,
},
{
name: "部门2",
value: 90,
},
{
name: "部门3",
value: 98,
},
{
name: "部门4",
value: 91,
},
{
name: "部门5",
value: 80,
},
{
name: "部门6",
value: 92,
},
{
name: "部门7",
value: 93,
},
{
name: "部门8",
value: 94,
},
{
name: "部门9",
value: 90,
},
{
name: "部门10",
value: 100,
},
],
},
personConfig: {
data: [
{
name: "个人1",
value: 95,
},
{
name: "个人2",
value: 90,
},
{
name: "个人3",
value: 98,
},
{
name: "个人4",
value: 91,
},
{
name: "个人5",
value: 80,
},
{
name: "个人6",
value: 92,
},
{
name: "个人7",
value: 93,
},
{
name: "个人8",
value: 94,
},
{
name: "个人9",
value: 90,
},
{
name: "个人10",
value: 100,
},
],
},
cricleData: [ cricleData: [
{ value: 756, name: "考勤绩效" }, { value: 756, name: "考勤绩效" },
{ value: 690, name: "评价绩效" }, { value: 690, name: "评价绩效" },
{ value: 559, name: "办件绩效" }, { value: 559, name: "办件绩效" },
{ value: 1278, name: "效能绩效" }, { value: 1278, name: "效能绩效" },
], ],
// 个人绩效总分排名
staffQuery:{
page:1,
size:10,
},
// 部门
depQuery:{
page:1,
size:10,
},
}; };
}, },
...@@ -326,9 +250,48 @@ export default { ...@@ -326,9 +250,48 @@ export default {
this.drawRulePie(); this.drawRulePie();
this.drawCorePie(); this.drawCorePie();
this.drawRecordPie(); this.drawRecordPie();
this.staffStatList()
this.depStatList()
}, },
methods: { methods: {
// 个人绩效总分排名
staffStatList(){
this.$post("/staff/perform/stat/list", this.staffQuery).then((res) => {
const {code,data} = res
if(code == 1){
const row = data.data || []
const depArr = []
row.forEach(element => {
depArr.push({
name:element.staffName,
value:element.totalScore
})
});
this.personConfig = {data:depArr}
console.log(row,"个人")
}
});
},
// 部门绩效总分排名
depStatList(){
this.$post("/dept/perform/stat/list", this.depQuery).then((res) => {
const {code,data} = res
if(code == 1){
const row = data.data || []
const depArr = []
row.forEach(element => {
depArr.push({
name:element.deptName,
value:element.totalScore
})
});
this.config = {data:depArr}
// console.log(row,depArr,"部门")
}
});
},
drawLeiDa() { drawLeiDa() {
// 基于dom,初始化echarts实例 // 基于dom,初始化echarts实例
let myChart = this.$echarts.init(document.getElementById("leida")); let myChart = this.$echarts.init(document.getElementById("leida"));
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
+ {{ type == 1 ? "新增考核部门" : "新增考核个人" }}</el-button + {{ type == 1 ? "新增考核部门" : "新增考核个人" }}</el-button
> >
</div> </div>
<div class="mid_content"> <div class="mid_content" style="height: auto;">
<div class="goal_box" v-for="(val, i) in dataList" :key="i"> <div class="goal_box" v-for="(val, i) in dataList" :key="i">
<div class="goal_title"> <div class="goal_title">
<img src="../../../../assets/images/u17641.svg" alt="" /> <img src="../../../../assets/images/u17641.svg" alt="" />
...@@ -321,7 +321,7 @@ export default { ...@@ -321,7 +321,7 @@ export default {
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529); box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529);
-moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529); -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529);
-webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529); -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529);
margin: 0 20px 20px 0; margin: 10px 20px 10px 20px;
padding: 20px; padding: 20px;
.goal_title { .goal_title {
width: 100%; width: 100%;
......
...@@ -224,7 +224,7 @@ export default { ...@@ -224,7 +224,7 @@ export default {
const x = [] const x = []
const y = [] const y = []
row.forEach(element => { row.forEach(element => {
x.push(element.deptName) x.push(element.staffName)
y.push(element.totalScore) y.push(element.totalScore)
}); });
this.depStatObj.totalScore.x = x this.depStatObj.totalScore.x = x
...@@ -241,13 +241,30 @@ export default { ...@@ -241,13 +241,30 @@ export default {
const x = [] const x = []
const y = [] const y = []
row.forEach(element => { row.forEach(element => {
x.push(element.deptName) x.push(element.staffName)
y.push(element.attendScoreAdd) y.push(element.attendScoreAdd)
}); });
this.depStatObj.attendScoreAdd.x = x this.depStatObj.attendScoreAdd.x = x
this.depStatObj.attendScoreAdd.y = y this.depStatObj.attendScoreAdd.y = y
} }
}); });
// 减分
const top10Sub = {...this.boardQuery,size:10,orderColList:[{colName:'totalSubScore',sortKind:'desc'}]}
this.$post("/staff/perform/stat/list", top10Sub).then((res) => {
const {code,data,dict} = res
if(code == 1){
const row = data.data || []
// this.statArr = row
const x = []
const y = []
row.forEach(element => {
x.push(element.staffName)
y.push(element.totalSubScore)
});
this.depStatObj.totalSubScore.x = x
this.depStatObj.totalSubScore.y = y
}
});
}, },
// 部门绩效分数统计 // 部门绩效分数统计
statList(){ statList(){
...@@ -274,7 +291,7 @@ export default { ...@@ -274,7 +291,7 @@ export default {
}); });
// 加分top10 // 加分top10
const top10 = {...this.boardQuery,size:10,orderColList:[{colName:'totalAddScore',sortKind:'desc'}]} const top10 = {...this.boardQuery,size:10,orderColList:[{colName:'totalAddScore',sortKind:'desc'}]}
this.$post("/staff/perform/stat/list", top10).then((res) => { this.$post("/dept/perform/stat/list", top10).then((res) => {
const {code,data,dict} = res const {code,data,dict} = res
if(code == 1){ if(code == 1){
const row = data.data || [] const row = data.data || []
...@@ -292,7 +309,7 @@ export default { ...@@ -292,7 +309,7 @@ export default {
}); });
// 减分 // 减分
const top10Sub = {...this.boardQuery,size:10,orderColList:[{colName:'totalSubScore',sortKind:'desc'}]} const top10Sub = {...this.boardQuery,size:10,orderColList:[{colName:'totalSubScore',sortKind:'desc'}]}
this.$post("/staff/perform/stat/list", top10Sub).then((res) => { this.$post("/dept/perform/stat/list", top10Sub).then((res) => {
const {code,data,dict} = res const {code,data,dict} = res
if(code == 1){ if(code == 1){
const row = data.data || [] const row = data.data || []
...@@ -334,7 +351,7 @@ export default { ...@@ -334,7 +351,7 @@ export default {
const x = [] const x = []
const y = [] const y = []
row.forEach(element => { row.forEach(element => {
x.push(element.deptName) x.push(element.staffName)
y.push(element[this.value]) y.push(element[this.value])
}); });
this.depStatObj.alignment.x = x this.depStatObj.alignment.x = x
......
...@@ -40,6 +40,9 @@ public abstract class BaseReq implements Serializable { ...@@ -40,6 +40,9 @@ public abstract class BaseReq implements Serializable {
* 规则编码 * 规则编码
*/ */
private String ruleCode; private String ruleCode;
private Long ruleId;
private String phone; private String phone;
......
...@@ -67,7 +67,7 @@ public class ApiWebPerformController extends AbstractBaseControll ...@@ -67,7 +67,7 @@ public class ApiWebPerformController extends AbstractBaseControll
if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!"); if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!");
if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!"); if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!");
boolean bool = attend(req); boolean bool = attend(req);
if (!bool) throw new AppException(busiDesc + "失败!"); if (bool) throw new AppException(busiDesc + "失败!");
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
return Rest.fail(e.getMessage()); return Rest.fail(e.getMessage());
...@@ -92,7 +92,7 @@ public class ApiWebPerformController extends AbstractBaseControll ...@@ -92,7 +92,7 @@ public class ApiWebPerformController extends AbstractBaseControll
if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!"); if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!");
if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!"); if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!");
boolean bool = review(req); boolean bool = review(req);
if (!bool) throw new AppException(busiDesc + "失败!"); if (bool) throw new AppException(busiDesc + "失败!");
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
return Rest.fail(e.getMessage()); return Rest.fail(e.getMessage());
...@@ -117,7 +117,7 @@ public class ApiWebPerformController extends AbstractBaseControll ...@@ -117,7 +117,7 @@ public class ApiWebPerformController extends AbstractBaseControll
if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!"); if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!");
if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!"); if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!");
boolean bool = complain(req); boolean bool = complain(req);
if (!bool) throw new AppException(busiDesc + "失败!"); if (bool) throw new AppException(busiDesc + "失败!");
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
return Rest.fail(e.getMessage()); return Rest.fail(e.getMessage());
...@@ -142,7 +142,7 @@ public class ApiWebPerformController extends AbstractBaseControll ...@@ -142,7 +142,7 @@ public class ApiWebPerformController extends AbstractBaseControll
if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!"); if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!");
if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!"); if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!");
boolean bool = gowork(req); boolean bool = gowork(req);
if (!bool) throw new AppException(busiDesc + "失败!"); if (bool) throw new AppException(busiDesc + "失败!");
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
return Rest.fail(e.getMessage()); return Rest.fail(e.getMessage());
...@@ -167,7 +167,7 @@ public class ApiWebPerformController extends AbstractBaseControll ...@@ -167,7 +167,7 @@ public class ApiWebPerformController extends AbstractBaseControll
if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!"); if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!");
if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!"); if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!");
boolean bool = effect(req); boolean bool = effect(req);
if (!bool) throw new AppException(busiDesc + "失败!"); if (bool) throw new AppException(busiDesc + "失败!");
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
return Rest.fail(e.getMessage()); return Rest.fail(e.getMessage());
...@@ -192,7 +192,7 @@ public class ApiWebPerformController extends AbstractBaseControll ...@@ -192,7 +192,7 @@ public class ApiWebPerformController extends AbstractBaseControll
if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!"); if (ObjectUtils.isEmpty(req.getPhone())) throw new AppException("手机号码不能为空!");
if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!"); if (ObjectUtils.isEmpty(req.getRuleCode())) throw new AppException("绩效规则编码不能为空!");
boolean bool = other(req); boolean bool = other(req);
if (!bool) throw new AppException(busiDesc + "失败!"); if (bool) throw new AppException(busiDesc + "失败!");
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
return Rest.fail(e.getMessage()); return Rest.fail(e.getMessage());
......
...@@ -245,15 +245,14 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -245,15 +245,14 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
private boolean attend(InspectSaveReq req) throws AppException { private boolean attend(InspectSaveReq req) throws AppException {
//考勤保存 //考勤保存
//通过手机号码查询员工属性 PerformRulesEntity rule = getRule(req.getRuleId().toString());
PerformRulesEntity rule = getRule(req.getRuleCode()); //StaffEntity staffEntity = getStaff(req.getPhone());
StaffEntity staffEntity = getStaff(req.getPhone());
PerformAttendRecordEntity recordEntity = new PerformAttendRecordEntity(); PerformAttendRecordEntity recordEntity = new PerformAttendRecordEntity();
recordEntity.initAttrValue(); recordEntity.initAttrValue();
BeanUtils.copyProperties(req, recordEntity); BeanUtils.copyProperties(req, recordEntity);
recordEntity.setStaffId(staffEntity.getId()); // recordEntity.setStaffId(staffEntity.getId());
recordEntity.setStaffName(staffEntity.getName()); // recordEntity.setStaffName(staffEntity.getName());
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
...@@ -274,15 +273,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -274,15 +273,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
private boolean review(InspectSaveReq req) throws AppException { private boolean review(InspectSaveReq req) throws AppException {
//评价保存 //评价保存
StaffEntity staffEntity = getStaff(req.getPhone()); // StaffEntity staffEntity = getStaff(req.getPhone());
PerformRulesEntity rule = getRule(req.getRuleCode()); PerformRulesEntity rule = getRule(req.getRuleId().toString());
PerformReviewRecordEntity recordEntity = new PerformReviewRecordEntity(); PerformReviewRecordEntity recordEntity = new PerformReviewRecordEntity();
recordEntity.initAttrValue(); recordEntity.initAttrValue();
BeanUtils.copyProperties(req, recordEntity); BeanUtils.copyProperties(req, recordEntity);
recordEntity.setStaffId(staffEntity.getId()); // recordEntity.setStaffId(staffEntity.getId());
recordEntity.setStaffName(staffEntity.getName()); // recordEntity.setStaffName(staffEntity.getName());
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore()); recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId()); recordEntity.setRuleId(rule.getId());
...@@ -299,15 +298,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -299,15 +298,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
private boolean complain(InspectSaveReq req) throws AppException { private boolean complain(InspectSaveReq req) throws AppException {
//投诉保存 //投诉保存
StaffEntity staffEntity = getStaff(req.getPhone()); // StaffEntity staffEntity = getStaff(req.getPhone());
PerformRulesEntity rule = getRule(req.getRuleCode()); PerformRulesEntity rule = getRule(req.getRuleId().toString());
PerformComplainRecordEntity recordEntity = new PerformComplainRecordEntity(); PerformComplainRecordEntity recordEntity = new PerformComplainRecordEntity();
recordEntity.initAttrValue(); recordEntity.initAttrValue();
BeanUtils.copyProperties(req, recordEntity); BeanUtils.copyProperties(req, recordEntity);
recordEntity.setStaffId(staffEntity.getId()); // recordEntity.setStaffId(staffEntity.getId());
recordEntity.setStaffName(staffEntity.getName()); // recordEntity.setStaffName(staffEntity.getName());
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore()); recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId()); recordEntity.setRuleId(rule.getId());
...@@ -324,15 +323,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -324,15 +323,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
private boolean gowork(InspectSaveReq req) throws AppException { private boolean gowork(InspectSaveReq req) throws AppException {
//办件保存 //办件保存
StaffEntity staffEntity = getStaff(req.getPhone()); // StaffEntity staffEntity = getStaff(req.getPhone());
PerformRulesEntity rule = getRule(req.getRuleCode()); PerformRulesEntity rule = getRule(req.getRuleId().toString());
PerformGoworkRecordEntity recordEntity = new PerformGoworkRecordEntity(); PerformGoworkRecordEntity recordEntity = new PerformGoworkRecordEntity();
recordEntity.initAttrValue(); recordEntity.initAttrValue();
BeanUtils.copyProperties(req, recordEntity); BeanUtils.copyProperties(req, recordEntity);
recordEntity.setStaffId(staffEntity.getId()); // recordEntity.setStaffId(staffEntity.getId());
recordEntity.setStaffName(staffEntity.getName()); // recordEntity.setStaffName(staffEntity.getName());
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore()); recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId()); recordEntity.setRuleId(rule.getId());
...@@ -349,15 +348,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -349,15 +348,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
private boolean effect(InspectSaveReq req) throws AppException { private boolean effect(InspectSaveReq req) throws AppException {
//效能保存 //效能保存
StaffEntity staffEntity = getStaff(req.getPhone()); //StaffEntity staffEntity = getStaff(req.getPhone());
PerformRulesEntity rule = getRule(req.getRuleCode()); PerformRulesEntity rule = getRule(req.getRuleId().toString());
PerformEffectRecordEntity recordEntity = new PerformEffectRecordEntity(); PerformEffectRecordEntity recordEntity = new PerformEffectRecordEntity();
recordEntity.initAttrValue(); recordEntity.initAttrValue();
BeanUtils.copyProperties(req, recordEntity); BeanUtils.copyProperties(req, recordEntity);
recordEntity.setStaffId(staffEntity.getId()); //recordEntity.setStaffId(staffEntity.getId());
recordEntity.setStaffName(staffEntity.getName()); //recordEntity.setStaffName(staffEntity.getName());
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore()); recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId()); recordEntity.setRuleId(rule.getId());
...@@ -374,15 +373,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -374,15 +373,15 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
private boolean other(InspectSaveReq req) throws AppException { private boolean other(InspectSaveReq req) throws AppException {
//其它保存 //其它保存
StaffEntity staffEntity = getStaff(req.getPhone()); // StaffEntity staffEntity = getStaff(req.getPhone());
PerformRulesEntity rule = getRule(req.getRuleCode()); PerformRulesEntity rule = getRule(req.getRuleId().toString());
PerformOtherRecordEntity recordEntity = new PerformOtherRecordEntity(); PerformOtherRecordEntity recordEntity = new PerformOtherRecordEntity();
recordEntity.initAttrValue(); recordEntity.initAttrValue();
BeanUtils.copyProperties(req, recordEntity); BeanUtils.copyProperties(req, recordEntity);
recordEntity.setStaffId(staffEntity.getId()); //recordEntity.setStaffId(staffEntity.getId());
recordEntity.setStaffName(staffEntity.getName()); // recordEntity.setStaffName(staffEntity.getName());
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore()); recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId()); recordEntity.setRuleId(rule.getId());
...@@ -397,14 +396,16 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -397,14 +396,16 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
} }
private PerformRulesEntity getRule(String ruleCode) {
PerformRulesEntity rule = rulesService.getCache(ruleCode); private PerformRulesEntity getRule(String ruleId) {
PerformRulesEntity rule = rulesService.getCache(ruleId);
if (ObjectUtils.isEmpty(rule)) if (ObjectUtils.isEmpty(rule))
throw new AppException(String.format("当前手机号码未找到匹配的员工!rule:%s", ruleCode)); throw new AppException(String.format("当前手机号码未找到匹配的员工!rule:%s", ruleId));
return rule; return rule;
} }
private StaffEntity getStaff(String phone) { private StaffEntity getStaff(String phone) {
StaffEntity staffEntity = staffService.selectOne(new StaffQuery().phoneNumber(phone)); StaffEntity staffEntity = staffService.selectOne(new StaffQuery().phoneNumber(phone));
if (ObjectUtils.isEmpty(staffEntity)) if (ObjectUtils.isEmpty(staffEntity))
......
...@@ -167,9 +167,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -167,9 +167,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
performInfo.setPerformType(PerformTypeEnum.考勤绩效.getValue()); performInfo.setPerformType(PerformTypeEnum.考勤绩效.getValue());
//判断是否存在申诉 //判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId())); PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if(!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity(); Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult()); updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
}
return performInfo; return performInfo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
...@@ -190,8 +191,11 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -190,8 +191,11 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
performInfo.setPerformType(PerformTypeEnum.评价差评绩效.getValue()); performInfo.setPerformType(PerformTypeEnum.评价差评绩效.getValue());
//判断是否存在申诉 //判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId())); PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity(); Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult()); updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
}
return performInfo; return performInfo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
...@@ -212,8 +216,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -212,8 +216,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
//判断是否存在申诉 //判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId())); PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity(); Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult()); updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
}
return performInfo; return performInfo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect); model.put(KEY_RESULT_DATA, collect);
...@@ -232,8 +238,12 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -232,8 +238,12 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
performInfo.setPerformType(PerformTypeEnum.办件绩效.getValue()); performInfo.setPerformType(PerformTypeEnum.办件绩效.getValue());
//判断是否存在申诉 //判断是否存在申诉
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId())); PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(item.getId()));
if (!ObjectUtils.isEmpty(entity)) {
Boolean bool = entity.newEntity(); Boolean bool = entity.newEntity();
updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult()); updateAppealStatus(performInfo, bool, entity.getProcessStatus(), entity.getAppealResult());
}
return performInfo; return performInfo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
model.put(KEY_RESULT_DATA, collect); model.put(KEY_RESULT_DATA, collect);
......
package com.mortals.xhx.module.perform.service.impl; package com.mortals.xhx.module.perform.service.impl;
import com.mortals.xhx.common.code.CheckStatusEnum; import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.SubMethodEnum; import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
...@@ -18,12 +19,12 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,12 +19,12 @@ import lombok.extern.slf4j.Slf4j;
import java.util.Date; import java.util.Date;
/** /**
* PerformAttendRecordService * PerformAttendRecordService
* 考勤绩效记录信息 service实现 * 考勤绩效记录信息 service实现
* *
* @author zxfei * @author zxfei
* @date 2023-07-10 * @date 2023-07-10
*/ */
@Service("performAttendRecordService") @Service("performAttendRecordService")
@Slf4j @Slf4j
public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<PerformAttendRecordDao, PerformAttendRecordEntity, Long> implements PerformAttendRecordService { public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<PerformAttendRecordDao, PerformAttendRecordEntity, Long> implements PerformAttendRecordService {
...@@ -35,28 +36,29 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -35,28 +36,29 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
protected void saveAfter(PerformAttendRecordEntity entity, Context context) throws AppException { protected void saveAfter(PerformAttendRecordEntity entity, Context context) throws AppException {
CheckAttendRecordEntity checkAttendRecordEntity = new CheckAttendRecordEntity(); CheckAttendRecordEntity checkAttendRecordEntity = new CheckAttendRecordEntity();
checkAttendRecordEntity.initAttrValue(); checkAttendRecordEntity.initAttrValue();
BeanUtils.copyProperties(entity,checkAttendRecordEntity, BeanUtil.getNullPropertyNames(entity)); BeanUtils.copyProperties(entity, checkAttendRecordEntity, BeanUtil.getNullPropertyNames(entity));
checkAttendRecordEntity.setId(null); checkAttendRecordEntity.setId(null);
checkAttendRecordEntity.setRecordId(entity.getId()); checkAttendRecordEntity.setRecordId(entity.getId());
if(entity.getSubMethod()== SubMethodEnum.系统自动.getValue()){ if (entity.getSubMethod() == SubMethodEnum.系统自动.getValue()) {
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理 checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.已处理.getValue()); //自动扣分相设置为已处理
}else { } else {
checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 checkAttendRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
} }
checkAttendRecordService.save(checkAttendRecordEntity,context); checkAttendRecordEntity.setCheckTime(new Date());
checkAttendRecordService.save(checkAttendRecordEntity, context);
} }
@Override @Override
public void updateProcessStatus(Long id, Integer status) throws AppException { public void updateProcessStatus(Long id, Integer status) throws AppException {
if(id==null){ if (id == null) {
throw new AppException("考勤绩效记录Id不能为空"); throw new AppException("考勤绩效记录Id不能为空");
} }
PerformAttendRecordEntity entity = this.get(id); PerformAttendRecordEntity entity = this.get(id);
if(entity==null){ if (entity == null) {
throw new AppException("无效的考勤绩效记录Id"); throw new AppException("无效的考勤绩效记录Id");
} }
if(status==null){ if (status == null) {
status=1; //处理状态(1.未核查,2.已核查) status = 1; //处理状态(1.未核查,2.已核查)
} }
PerformAttendRecordEntity update = new PerformAttendRecordEntity(); PerformAttendRecordEntity update = new PerformAttendRecordEntity();
update.setId(id); update.setId(id);
......
...@@ -43,6 +43,7 @@ public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Pe ...@@ -43,6 +43,7 @@ public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Pe
}else { }else {
checkComplainRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 checkComplainRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
} }
checkComplainRecordEntity.setCheckTime(new Date());
checkComplainRecordService.save(checkComplainRecordEntity,context); checkComplainRecordService.save(checkComplainRecordEntity,context);
} }
......
...@@ -43,6 +43,7 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -43,6 +43,7 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
}else { }else {
checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 checkEffectRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
} }
checkEffectRecordEntity.setCheckTime(new Date());
checkEffectRecordService.save(checkEffectRecordEntity,context); checkEffectRecordService.save(checkEffectRecordEntity,context);
} }
......
...@@ -43,6 +43,7 @@ public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -43,6 +43,7 @@ public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
}else { }else {
checkGoworkRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 checkGoworkRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
} }
checkGoworkRecordEntity.setCheckTime(new Date());
checkGoworkRecordService.save(checkGoworkRecordEntity,context); checkGoworkRecordService.save(checkGoworkRecordEntity,context);
} }
......
...@@ -43,6 +43,7 @@ public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<Perfo ...@@ -43,6 +43,7 @@ public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<Perfo
}else { }else {
checkOtherRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 checkOtherRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
} }
checkOtherRecordEntity.setCheckTime(new Date());
checkOtherRecordService.save(checkOtherRecordEntity,context); checkOtherRecordService.save(checkOtherRecordEntity,context);
} }
......
...@@ -42,6 +42,9 @@ public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<Perf ...@@ -42,6 +42,9 @@ public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
}else { }else {
checkReviewRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理 checkReviewRecordEntity.setCheckStatus(CheckStatusEnum.未处理.getValue()); //非自动扣分相设置为未处理
} }
//checkReviewRecordEntity.s
checkReviewRecordService.save(checkReviewRecordEntity,context); checkReviewRecordService.save(checkReviewRecordEntity,context);
} }
......
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