Commit 78bd2bfb by dengshichuan

Merge branch 'tzq' into 'develop'

绩效bug修复

See merge request 8timerv2/8timerapiv200!195
parents cb7abb67 b24b2b32
...@@ -125,7 +125,7 @@ public class YgglMainLzb extends Model<YgglMainLzb> { ...@@ -125,7 +125,7 @@ public class YgglMainLzb extends Model<YgglMainLzb> {
@ApiModelProperty(value="工作性质 1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="101") @ApiModelProperty(value="工作性质 1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="101")
private Integer jobType; private Integer jobType;
@ApiModelProperty(value="员工状态 1试用、2正式、3离职中、4已离职",example="101") @ApiModelProperty(value="员工状态 0试用、1正式、2离职中、3已离职",example="1")
private Integer jobStatus; private Integer jobStatus;
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间") @ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
......
...@@ -259,14 +259,14 @@ public class JxglController { ...@@ -259,14 +259,14 @@ public class JxglController {
if (CollectionUtil.isNotEmpty(aITs)) { if (CollectionUtil.isNotEmpty(aITs)) {
Integer weightSum = 0; // Integer weightSum = 0;
for (JxglAppraisalIndicatorsT aIT : aITs) { for (JxglAppraisalIndicatorsT aIT : aITs) {
if (aIT.getType() == null) { if (aIT.getType() == null) {
throw new CustomException("指标类型未设置"); throw new CustomException("指标类型未设置");
} }
Integer weightNum = aIT.getWeight() == null ? 0 : aIT.getWeight(); Integer weightNum = aIT.getWeight() == null ? 0 : aIT.getWeight();
weightSum += weightNum; // weightSum += weightNum;
aIT.setWeight(weightNum); aIT.setWeight(weightNum);
aIT.setAppraisalTId(jxglAppraisalT.getId()); aIT.setAppraisalTId(jxglAppraisalT.getId());
...@@ -284,8 +284,8 @@ public class JxglController { ...@@ -284,8 +284,8 @@ public class JxglController {
} }
if (!weightSum.equals(100)) // if (!weightSum.equals(100))
throw new CustomException("权重总和要等于 100%"); // throw new CustomException("权重总和要等于 100%");
} }
return ResultUtil.success(); return ResultUtil.success();
...@@ -1667,6 +1667,7 @@ public class JxglController { ...@@ -1667,6 +1667,7 @@ public class JxglController {
Integer bWeights = 0; Integer bWeights = 0;
Double total = 0D; Double total = 0D;
String level = null; String level = null;
if (CollectionUtil.isNotEmpty(listProcessNode)) { if (CollectionUtil.isNotEmpty(listProcessNode)) {
aWeights = listProcessNode.stream().filter(p -> p.getProcessType() == ProcessType.SELF_ASSESSMENT.getType()).map(JxglProcessNode::getWeight).findFirst().orElse(null); aWeights = listProcessNode.stream().filter(p -> p.getProcessType() == ProcessType.SELF_ASSESSMENT.getType()).map(JxglProcessNode::getWeight).findFirst().orElse(null);
bWeights = listProcessNode.stream().filter(p -> p.getProcessType() == ProcessType.SUPERIOR_SCORE.getType()).map(JxglProcessNode::getWeight).findFirst().orElse(null); bWeights = listProcessNode.stream().filter(p -> p.getProcessType() == ProcessType.SUPERIOR_SCORE.getType()).map(JxglProcessNode::getWeight).findFirst().orElse(null);
...@@ -1680,16 +1681,34 @@ public class JxglController { ...@@ -1680,16 +1681,34 @@ public class JxglController {
} }
if (selfAssessment != null && superiorAssessment != null) { if (selfAssessment != null && superiorAssessment != null) {
System.out.println(aWeights); Integer min = 0;
System.out.println(selfAssessment); Integer max = 0;
System.out.println(bWeights);
System.out.println(superiorAssessment); // System.out.println(aWeights);
// System.out.println(selfAssessment);
// System.out.println(bWeights);
// System.out.println(superiorAssessment);
total = aWeights*0.01*selfAssessment + bWeights*0.01*superiorAssessment; total = aWeights*0.01*selfAssessment + bWeights*0.01*superiorAssessment;
List<JxglPerformanceRating> listPR = bS.getPerformanceRatings(); List<JxglPerformanceRating> listPR = bS.getPerformanceRatings();
for (JxglPerformanceRating pR : listPR) { for (JxglPerformanceRating pR : listPR) {
min = min > pR.getSectionMinScore() ? pR.getSectionMinScore() : min;
max = max < pR.getSectionMaxScore() ? pR.getSectionMaxScore() : max;
level = pR.getSectionMaxScore() <= total && pR.getSectionMinScore() < total ? pR.getName() : null; level = pR.getSectionMaxScore() <= total && pR.getSectionMinScore() < total ? pR.getName() : null;
} }
if (level == null) {
for (JxglPerformanceRating pR : listPR) {
if (total < min && pR.getSectionMinScore().equals(min)) {
level = pR.getName();
break;
}
if (total > max && pR.getSectionMaxScore().equals(max)) {
level = pR.getName();
break;
}
}
}
// 更新 考核-总分 等级 // 更新 考核-总分 等级
jxglAppraisalMapper.updateById(JxglAppraisal.builder().id(appraisal.getId()) jxglAppraisalMapper.updateById(JxglAppraisal.builder().id(appraisal.getId())
......
...@@ -1289,8 +1289,8 @@ public class SalaryManagementController { ...@@ -1289,8 +1289,8 @@ public class SalaryManagementController {
if(autacq.equals("5")) {autacq="派遣";}else if(autacq.equals("5")) {autacq="派遣";}else
if(autacq.equals("6")) {autacq="外包";}else {autacq="退休返聘";} if(autacq.equals("6")) {autacq="外包";}else {autacq="退休返聘";}
}else if(fieldname.equals("job_status")) { }else if(fieldname.equals("job_status")) {
if(autacq.equals("0")) {autacq="正式";}else if(autacq.equals("0")) {autacq="试用";}else
if(autacq.equals("1")) {autacq="试用";}else if(autacq.equals("1")) {autacq="正式";}else
if(autacq.equals("2")) {autacq="离职中";}else {autacq="已离职";} if(autacq.equals("2")) {autacq="离职中";}else {autacq="已离职";}
}else if(fieldname.equals("rz_time") || fieldname.equals("zz_time")) { }else if(fieldname.equals("rz_time") || fieldname.equals("zz_time")) {
autacq = autacq.substring(0, 10); autacq = autacq.substring(0, 10);
......
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
<select id="PayslipDetails" resultMap="PayslipDetailsMap"> <select id="PayslipDetails" resultMap="PayslipDetailsMap">
select emp.`name` as empname, select emp.`name` as empname,
case emp.job_status case emp.job_status
when 0 then '正式' when 0 then '试用'
when 1 then '试用' when 1 then '正式'
when 2 then '离职中' when 2 then '离职中'
else '已离职' end as empjobstatus, else '已离职' end as empjobstatus,
gztzt.fs_type as fstype, gztzt.fs_type as fstype,
......
...@@ -185,8 +185,8 @@ ...@@ -185,8 +185,8 @@
when 6 then '外包' when 6 then '外包'
else '退休返聘' end as empjobtype, else '退休返聘' end as empjobtype,
case emp.job_status case emp.job_status
when 0 then '正式' when 0 then '试用'
when 1 then '试用' when 1 then '正式'
when 2 then '离职中' when 2 then '离职中'
else '已离职' end as empjobstatus, else '已离职' end as empjobstatus,
SUBSTR(emp.rz_time,1,10) emprztime , SUBSTR(emp.rz_time,1,10) emprztime ,
...@@ -241,8 +241,8 @@ ...@@ -241,8 +241,8 @@
when 6 then '外包' when 6 then '外包'
else '退休返聘' end as empjobtype, else '退休返聘' end as empjobtype,
case emp.job_status case emp.job_status
when 0 then '正式' when 0 then '试用'
when 1 then '试用' when 1 then '正式'
when 2 then '离职中' when 2 then '离职中'
else '已离职' end as empjobstatus, else '已离职' end as empjobstatus,
SUBSTR(emp.rz_time,1,10) emprztime , SUBSTR(emp.rz_time,1,10) emprztime ,
......
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