Commit e3866599 authored by 廖旭伟's avatar 廖旭伟

病假扣分规则全天1分半天0.5分

parent 02e0afc1
...@@ -363,10 +363,16 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -363,10 +363,16 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
} }
String ruleCode = "ATTEND1009"; String ruleCode = "ATTEND1009";
if (multiple % 2 > 0) { //奇数,半天 if (multiple % 2 > 0) { //奇数,半天
ruleCode = "ATTEND1010"; ruleCode = "ATTEND1010"; //事假半天
if(entity.getLeaveType()==LeaveTypeEnum.病假.getValue()){
ruleCode = "ATTEND1101"; //病假半天
}
} }
if (multiple % 2 == 0) { //偶数,全天 if (multiple % 2 == 0) { //偶数,全天
ruleCode = "ATTEND1011"; ruleCode = "ATTEND1011"; //事假全天
if(entity.getLeaveType()==LeaveTypeEnum.病假.getValue()){
ruleCode = "ATTEND1102"; //病假全天
}
} }
PerformRulesEntity performRulesEntity = performRulesService.selectOne(new PerformRulesQuery().ruleCode(ruleCode)); PerformRulesEntity performRulesEntity = performRulesService.selectOne(new PerformRulesQuery().ruleCode(ruleCode));
if (performRulesEntity != null) { if (performRulesEntity != null) {
...@@ -375,7 +381,7 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At ...@@ -375,7 +381,7 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
recordEntity.setCategoryId(performRulesEntity.getCategoryId()); recordEntity.setCategoryId(performRulesEntity.getCategoryId());
recordEntity.setCategoryName(performRulesEntity.getCategoryName()); recordEntity.setCategoryName(performRulesEntity.getCategoryName());
recordEntity.setSubAddType(performRulesEntity.getSubAddType()); recordEntity.setSubAddType(performRulesEntity.getSubAddType());
if (ruleCode.equals("ATTEND1011")) { if (ruleCode.equals("ATTEND1011")||ruleCode.equals("ATTEND1102")) {
int m = multiple / 2; int m = multiple / 2;
recordEntity.setScore(performRulesEntity.getScore().multiply(new BigDecimal(m))); recordEntity.setScore(performRulesEntity.getScore().multiply(new BigDecimal(m)));
} else { } else {
......
...@@ -1429,3 +1429,6 @@ PRIMARY KEY (`id`) ...@@ -1429,3 +1429,6 @@ PRIMARY KEY (`id`)
,KEY `year` (`year`) USING BTREE ,KEY `year` (`year`) USING BTREE
,KEY `month` (`month`) USING BTREE ,KEY `month` (`month`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计';
INSERT INTO `mortals_xhx_perform_rules` (`ruleCode`, `categoryId`, `categoryName`, `name`, `content`, `subAddType`, `score`, `assoOwner`, `ownerScore`, `remark`, `type`, `createUserId`, `createTime`, `updateUserId`, `updateTime`) VALUES ('ATTEND1101', '1', '', '病假半天', '病假半天', '2', '0.50', '0', '0.00', '', '1', '1', NOW(), NULL, NULL);
INSERT INTO `mortals_xhx_perform_rules` (`ruleCode`, `categoryId`, `categoryName`, `name`, `content`, `subAddType`, `score`, `assoOwner`, `ownerScore`, `remark`, `type`, `createUserId`, `createTime`, `updateUserId`, `updateTime`) VALUES ('ATTEND1102', '1', '', '病假全天', '病假全天', '2', '1.00', '0', '0.00', '', '1', '1', NOW(), NULL, NULL);
\ No newline at end of file
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