This commit is contained in:
parent
751e65774f
commit
a043e18ba6
@ -36,7 +36,7 @@ public class AttendanceGroup extends TenantEntity {
|
||||
/**
|
||||
* 状态(1:启用,0:禁用)
|
||||
*/
|
||||
private Long status;
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 考勤类型(0:固定班制,1:排班制)
|
||||
|
@ -40,7 +40,7 @@ public class AttendanceGroupBo extends BaseEntity {
|
||||
/**
|
||||
* 状态(1:启用,0:禁用)
|
||||
*/
|
||||
private Long status;
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 考勤类型(0:固定班制,1:排班制)
|
||||
|
@ -22,6 +22,10 @@ public class StatusConstant {
|
||||
public static final Integer SINGLEDATE = 0;
|
||||
public static final Integer DATERANGE = 1;
|
||||
|
||||
//启用禁用:0禁用 1启用
|
||||
public static final Integer DISABLE = 0;
|
||||
public static final Integer ENABLE = 1;
|
||||
|
||||
public static final Integer NORMAL = 1;
|
||||
|
||||
|
||||
|
@ -140,6 +140,7 @@ public class AttendanceGroupServiceImpl implements IAttendanceGroupService {
|
||||
@Override
|
||||
public Boolean insertByBo(AttendanceGroupBo bo) {
|
||||
AttendanceGroup add = MapstructUtils.convert(bo, AttendanceGroup.class);
|
||||
add.setStatus(StatusConstant.ENABLE);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
|
||||
@ -261,9 +262,19 @@ public class AttendanceGroupServiceImpl implements IAttendanceGroupService {
|
||||
//1.固定班制
|
||||
//取出考勤组id
|
||||
Long groupId = update.getId();
|
||||
//根据考勤组id修改attendance_week_set表中的数据
|
||||
weekSetMapper.update(null, Wrappers.<AttendanceWeekSet>lambdaUpdate().eq(AttendanceWeekSet::getGroupId, groupId));
|
||||
//根据考勤组id查询出考勤周期id
|
||||
//根据考勤组id查询出attendance_week_set表中的数据
|
||||
List<AttendanceWeekSet> weekSets = weekSetMapper.selectList(Wrappers.<AttendanceWeekSet>lambdaQuery().eq(AttendanceWeekSet::getGroupId, groupId));
|
||||
//根据weekSets修改考勤周期表中的数据
|
||||
weekSets.forEach(
|
||||
weekSet -> {
|
||||
AttendanceWeekSet attendanceWeekSet = new AttendanceWeekSet();
|
||||
BeanUtils.copyProperties(weekSet, attendanceWeekSet);
|
||||
attendanceWeekSet.setGroupId(update.getId());
|
||||
attendanceWeekSet.setDayOfWeek(weekSet.getDayOfWeek());
|
||||
attendanceWeekSet.setShiftId(weekSet.getShiftId());
|
||||
weekSetMapper.updateById(attendanceWeekSet);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user