Commit 5fae7a1d authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents a4fed91e 3496333d
...@@ -54,6 +54,8 @@ export default { ...@@ -54,6 +54,8 @@ export default {
{ {
idList: this.selection, idList: this.selection,
name: this.$route.query["name"], name: this.$route.query["name"],
startTimeEnd: this.query.startTimeEnd,
startTimeStart: this.query.startTimeStart,
}, },
{ type: "excel" } { type: "excel" }
) )
...@@ -94,13 +96,13 @@ export default { ...@@ -94,13 +96,13 @@ export default {
label: "请假类型", label: "请假类型",
}, },
{ {
name: "createTimeStart1", name: "startTimeStart",
type: "date", type: "date",
label: "开始时间", label: "开始时间",
fuzzy: false, fuzzy: false,
}, },
{ {
name: "createTimeEnd1", name: "startTimeEnd",
type: "date", type: "date",
label: "结束时间", label: "结束时间",
fuzzy: false, fuzzy: false,
......
...@@ -180,10 +180,7 @@ ...@@ -180,10 +180,7 @@
</div> </div>
</el-dialog> </el-dialog>
<div class="mask" v-if="progress"> <div class="mask" v-if="progress">
<el-progress <el-progress :stroke-width="26" :percentage="percent"></el-progress>
:stroke-width="26"
:percentage="percent"
></el-progress>
</div> </div>
</div> </div>
</template> </template>
...@@ -349,7 +346,6 @@ export default { ...@@ -349,7 +346,6 @@ export default {
if (this.selection.length > 0) { if (this.selection.length > 0) {
params["idList"] = this.selection; params["idList"] = this.selection;
} }
this.percent = 70;
if (this.checkList.length > 0) { if (this.checkList.length > 0) {
params["properties"] = this.checkList; params["properties"] = this.checkList;
} }
......
...@@ -30,7 +30,9 @@ public enum LeaveTypeEnum { ...@@ -30,7 +30,9 @@ public enum LeaveTypeEnum {
育儿假(19, "育儿假"), 育儿假(19, "育儿假"),
调回单位(20, "调回单位"), 调回单位(20, "调回单位"),
探亲假(21, "探亲假"), 探亲假(21, "探亲假"),
其他(22, "其他"),
; ;
private Integer value; private Integer value;
private String desc; private String desc;
......
...@@ -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,18 +262,19 @@ public class DingMessageController { ...@@ -258,18 +262,19 @@ 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;
} }
} }
} else if (result.getFormComponentValues().size() > 1) { //请假理由 }
if (result.getFormComponentValues().size() > 1) { //请假理由
GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultFormComponentValues resonEntity = result.getFormComponentValues().get(1); GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultFormComponentValues resonEntity = result.getFormComponentValues().get(1);
leaveRecordEntity.setReason(resonEntity.getValue()); leaveRecordEntity.setReason(resonEntity.getValue());
}else if (result.getFormComponentValues().size() > 2) { //上传的附件 }
if (result.getFormComponentValues().size() > 2) { //上传的附件
GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultFormComponentValues picEntity = result.getFormComponentValues().get(2); GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultFormComponentValues picEntity = result.getFormComponentValues().get(2);
if(picEntity.getName().equals("图片") && picEntity.getValue() != null){ if(picEntity.getName().equals("图片") && picEntity.getValue() != null){
leaveRecordEntity.setAttachmentPath(picEntity.getValue()); leaveRecordEntity.setAttachmentPath(picEntity.getValue());
...@@ -312,7 +317,9 @@ public class DingMessageController { ...@@ -312,7 +317,9 @@ public class DingMessageController {
log.info("钉钉返回的result:"+result.getResult()+"---auditresult:"+leaveRecordEntity.getAuditResult()); log.info("钉钉返回的result:"+result.getResult()+"---auditresult:"+leaveRecordEntity.getAuditResult());
leaveRecordEntity.setAuditDesc(result.getOperationRecords().get(0).getRemark()); leaveRecordEntity.setAuditDesc(result.getOperationRecords().get(0).getRemark());
if (result.getOperationRecords().get(0).getRemark() != null && !result.getOperationRecords().get(0).getRemark().equals("")) {
leaveRecordEntity.setReason(result.getOperationRecords().get(0).getRemark()); leaveRecordEntity.setReason(result.getOperationRecords().get(0).getRemark());
}
//更新请假记录表 //更新请假记录表
AttendanceLeaveRecordEntity recordEntity = attendanceLeaveRecordService.selectOne(new AttendanceLeaveRecordQuery().remark(processInstanceId)); AttendanceLeaveRecordEntity recordEntity = attendanceLeaveRecordService.selectOne(new AttendanceLeaveRecordQuery().remark(processInstanceId));
if(ObjectUtils.isEmpty(recordEntity)){ if(ObjectUtils.isEmpty(recordEntity)){
...@@ -365,6 +372,16 @@ public class DingMessageController { ...@@ -365,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){
...@@ -573,7 +590,7 @@ public class DingMessageController { ...@@ -573,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;
} }
} }
......
...@@ -36,6 +36,7 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo { ...@@ -36,6 +36,7 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
/** /**
* 所属部门 * 所属部门
*/ */
@Excel(name = "部门")
private String deptName; private String deptName;
/** /**
* 电话号码 * 电话号码
...@@ -43,25 +44,32 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo { ...@@ -43,25 +44,32 @@ 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;
/** /**
* 开始时间 * 开始时间
*/ */
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date startTime; private Date startTime;
/** /**
* 结束时间 * 结束时间
*/ */
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date endTime; private Date endTime;
/** /**
* 时长,单位秒 * 时长,单位秒
*/ */
@Excel(name = "时长,单位秒")
private Integer duration; private Integer duration;
/**
* 钉钉原始请假时间记录
*/
@Excel(name = "请假时间")
private String sourceDingTime;
/** /**
* 请假事由 * 请假事由
*/ */
...@@ -110,10 +118,7 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo { ...@@ -110,10 +118,7 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
* 处理状态 * 处理状态
*/ */
private Integer processStatus; private Integer processStatus;
/**
* 钉钉原始请假时间记录
*/
private String sourceDingTime;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
......
...@@ -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
...@@ -231,7 +231,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -231,7 +231,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
temp.setGoTimes(0); //默认只要有请假,当天就不算全勤 temp.setGoTimes(0); //默认只要有请假,当天就不算全勤
LeaveTypeEnum leaveTypeEnum = LeaveTypeEnum.getByValue(item.getLeaveType()); LeaveTypeEnum leaveTypeEnum = LeaveTypeEnum.getByValue(item.getLeaveType());
if (leaveTypeEnum == null) { if (leaveTypeEnum == null) {
leaveTypeEnum = LeaveTypeEnum.事假; //默认为事假 leaveTypeEnum = LeaveTypeEnum.其他; //默认为事假
} }
attendanceSummary = leaveTypeEnum.getDesc() + "*1"; attendanceSummary = leaveTypeEnum.getDesc() + "*1";
switch (leaveTypeEnum) { switch (leaveTypeEnum) {
...@@ -298,8 +298,11 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -298,8 +298,11 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
case 探亲假: case 探亲假:
temp.setHomeLeave(leaveTime); temp.setHomeLeave(leaveTime);
break; break;
case 其他:
temp.setOtherDays(leaveTime);
break;
default: default:
temp.setPersonalLeave(leaveTime); temp.setOtherDays(leaveTime);
break; break;
} }
this.dao.update(temp); this.dao.update(temp);
......
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