Commit 6a15ee31 authored by 周亚武's avatar 周亚武

钉钉相关接口

parent 2833c654
...@@ -187,6 +187,10 @@ public class DingMessageController { ...@@ -187,6 +187,10 @@ public class DingMessageController {
if(jsonArray!= null && jsonArray.size() > 4){ if(jsonArray!= null && jsonArray.size() > 4){
leave_name = jsonArray.get(4).toString(); leave_name = jsonArray.get(4).toString();
switch (leave_name){ switch (leave_name){
case "事假":
leaveRecordEntity.setLeaveType(1);
leave_code = LeaveRulesEnum.事假.getLeave_code();
break;
case "调休": case "调休":
leaveRecordEntity.setLeaveType(2); leaveRecordEntity.setLeaveType(2);
leave_code = LeaveRulesEnum.调休.getLeave_code(); leave_code = LeaveRulesEnum.调休.getLeave_code();
...@@ -258,8 +262,7 @@ public class DingMessageController { ...@@ -258,8 +262,7 @@ public class DingMessageController {
leave_code = LeaveRulesEnum.探亲假.getLeave_code(); leave_code = LeaveRulesEnum.探亲假.getLeave_code();
break; break;
default: default:
leaveRecordEntity.setLeaveType(1); //默认事假 leaveRecordEntity.setLeaveType(22); //默认其他
leave_code = LeaveRulesEnum.事假.getLeave_code();
break; break;
} }
...@@ -369,6 +372,16 @@ public class DingMessageController { ...@@ -369,6 +372,16 @@ public class DingMessageController {
// } // }
switch (leave_name) { switch (leave_name) {
case "事假":
if(leaveBlance == 0){
if(!ObjectUtils.isEmpty(balanceEntity) && balanceEntity.getPersonalLeaveDays() != null){
leaveBlance = balanceEntity.getPersonalLeaveDays().floatValue() - converMillsToDays(leaveRecordEntity.getDuration());
}else {
leaveBlance = - converMillsToDays(leaveRecordEntity.getDuration()); //秒转换为天
}
}
attendanceVacationBalanceEntity.setPersonalLeaveDays(BigDecimal.valueOf(leaveBlance)); //默认事假
break;
case "调休": case "调休":
if(leaveBlance == 0){ if(leaveBlance == 0){
if(!ObjectUtils.isEmpty(balanceEntity) && balanceEntity.getCompensatedLeaveDays() != null){ if(!ObjectUtils.isEmpty(balanceEntity) && balanceEntity.getCompensatedLeaveDays() != null){
...@@ -577,7 +590,7 @@ public class DingMessageController { ...@@ -577,7 +590,7 @@ public class DingMessageController {
leaveBlance = - converMillsToDays(leaveRecordEntity.getDuration()); //秒转换为天 leaveBlance = - converMillsToDays(leaveRecordEntity.getDuration()); //秒转换为天
} }
} }
attendanceVacationBalanceEntity.setPersonalLeaveDays(BigDecimal.valueOf(leaveBlance)); //默认事假 attendanceVacationBalanceEntity.setOther(BigDecimal.valueOf(leaveBlance));
break; break;
} }
} }
......
...@@ -44,9 +44,9 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo { ...@@ -44,9 +44,9 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
@Excel(name = "电话号码") @Excel(name = "电话号码")
private String phoneNumber; private String phoneNumber;
/** /**
* 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假,11.回单位,12.因公请假,13.外出勘验,14.值班补班,15.体检,16.隔离,17.因公外出,18.公休,19.育儿假,20.调回单位,21.探亲假) * 请假类型(1.事假,2.调休,3.病假,4.年假,5.产假,6.陪产假,7.婚假,8.例假,9.哺乳假,10.丧假,11.回单位,12.因公请假,13.外出勘验,14.值班补班,15.体检,16.隔离,17.因公外出,18.公休,19.育儿假,20.调回单位,21.探亲假,22.其他)
*/ */
@Excel(name = "请假类型", readConverterExp = "1=事假,2=调休,3=病假,4=年假,5=产假,6=陪产假,7=婚假,8=例假,9=哺乳假,10=丧假,11=回单位,12=因公请假,13=外出勘验,14=值班补班,15=体检,16=隔离,17=因公外出,18=公休,19=育儿假,20=调回单位,21=探亲假") @Excel(name = "请假类型", readConverterExp = "1=事假,2=调休,3=病假,4=年假,5=产假,6=陪产假,7=婚假,8=例假,9=哺乳假,10=丧假,11=回单位,12=因公请假,13=外出勘验,14=值班补班,15=体检,16=隔离,17=因公外出,18=公休,19=育儿假,20=调回单位,21=探亲假,22=其他")
private Integer leaveType; private Integer leaveType;
/** /**
* 开始时间 * 开始时间
......
...@@ -149,7 +149,11 @@ public class AttendanceVacationBalanceEntity extends AttendanceVacationBalanceVo ...@@ -149,7 +149,11 @@ public class AttendanceVacationBalanceEntity extends AttendanceVacationBalanceVo
@Excel(name = "探亲假(天") @Excel(name = "探亲假(天")
private BigDecimal homeLeave; private BigDecimal homeLeave;
/**
* 其他
*/
@Excel(name = "其他")
private BigDecimal other;
public AttendanceVacationBalanceEntity(){} public AttendanceVacationBalanceEntity(){}
/** /**
...@@ -531,8 +535,13 @@ public class AttendanceVacationBalanceEntity extends AttendanceVacationBalanceVo ...@@ -531,8 +535,13 @@ public class AttendanceVacationBalanceEntity extends AttendanceVacationBalanceVo
this.homeLeave = homeLeave; this.homeLeave = homeLeave;
} }
public BigDecimal getOther() {
return other;
}
public void setOther(BigDecimal other) {
this.other = other;
}
@Override @Override
public int hashCode() { public int hashCode() {
...@@ -579,6 +588,7 @@ public class AttendanceVacationBalanceEntity extends AttendanceVacationBalanceVo ...@@ -579,6 +588,7 @@ public class AttendanceVacationBalanceEntity extends AttendanceVacationBalanceVo
sb.append(",childRearingLeave:").append(getChildRearingLeave()); sb.append(",childRearingLeave:").append(getChildRearingLeave());
sb.append(",transferBack:").append(getTransferBack()); sb.append(",transferBack:").append(getTransferBack());
sb.append(",homeLeave:").append(getHomeLeave()); sb.append(",homeLeave:").append(getHomeLeave());
sb.append(",other:").append(getOther());
return sb.toString(); return sb.toString();
} }
...@@ -637,5 +647,7 @@ public class AttendanceVacationBalanceEntity extends AttendanceVacationBalanceVo ...@@ -637,5 +647,7 @@ public class AttendanceVacationBalanceEntity extends AttendanceVacationBalanceVo
this.transferBack = BigDecimal.valueOf(0); this.transferBack = BigDecimal.valueOf(0);
this.homeLeave = BigDecimal.valueOf(0); this.homeLeave = BigDecimal.valueOf(0);
this.other = BigDecimal.valueOf(0);
} }
} }
\ 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