Commit 1c3b1811 authored by 赵啸非's avatar 赵啸非

添加修改假期余额属性类

parent 7526f14a
package com.mortals.xhx.module.attendance.service.impl;
import com.mortals.xhx.common.code.TypeEnum;
import com.mortals.xhx.module.attendance.model.AttendanceVacationBalanceEntity;
import com.mortals.xhx.module.attendance.model.AttendanceVacationBalanceQuery;
import com.mortals.xhx.module.attendance.model.AttendanceVacationRecordQuery;
import com.mortals.xhx.module.attendance.service.AttendanceVacationBalanceService;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -6,14 +14,35 @@ import com.mortals.framework.model.Context;
import com.mortals.xhx.module.attendance.dao.AttendanceVacationRecordDao;
import com.mortals.xhx.module.attendance.model.AttendanceVacationRecordEntity;
import com.mortals.xhx.module.attendance.service.AttendanceVacationRecordService;
/**
* AttendanceVacationRecordService
* 员工假期记录信息 service实现
*
* @author zxfei
* @date 2023-04-12
*/
* AttendanceVacationRecordService
* 员工假期记录信息 service实现
*
* @author zxfei
* @date 2023-04-12
*/
@Service("attendanceVacationRecordService")
public class AttendanceVacationRecordServiceImpl extends AbstractCRUDServiceImpl<AttendanceVacationRecordDao, AttendanceVacationRecordEntity, Long> implements AttendanceVacationRecordService {
@Autowired
private AttendanceVacationBalanceService attendanceVacationBalanceService;
@Override
protected void saveAfter(AttendanceVacationRecordEntity entity, Context context) throws AppException {
super.saveAfter(entity, context);
if (entity.getSubAddType() == 1) {
AttendanceVacationBalanceEntity attendanceVacationBalanceEntity = attendanceVacationBalanceService.selectOne(new AttendanceVacationBalanceQuery().staffId(entity.getStaffId()));
if (!ObjectUtils.isEmpty(attendanceVacationBalanceEntity)) {
//todo 反射属性 设置实体属性更新值
//attendanceVacationBalanceEntity.setAnnualLeaveDays(attendanceVacationBalanceEntity.getAnnualLeaveDays()+);
attendanceVacationBalanceService.update(attendanceVacationBalanceEntity);
}
}
}
}
\ 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