Commit 7c96dd84 by liyanlin

增加婚假

parent 18c4e916
......@@ -189,7 +189,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
List<Period> takeLeavePeriodList = takeLeaveEventMapper.selectList(new LambdaQueryWrapper<TakeLeaveEvent>()
.eq(TakeLeaveEvent::getApplyTechnicianId, storeClassesTechnician.getTechnicianManage().getId())
.eq(TakeLeaveEvent::getStatus, TakeLeaveEvent.STATUS_APPROVAL_PASS)
.in(TakeLeaveEvent::getType, Lists.newArrayList(2, 3, 4, 5, 6, 7)))
.in(TakeLeaveEvent::getType, Lists.newArrayList(2, 3, 4, 5, 6, 7, 8)))
.stream()
.map(takeLeaveEvent -> new Period(takeLeaveEvent.getStartTime(), takeLeaveEvent.getEndTime()))
.collect(Collectors.toList());
......
......@@ -15,6 +15,7 @@ import com.gogirl.domain.store.store.StoreTechnician;
import com.gogirl.infrastructure.common.exception.RRException;
import com.gogirl.infrastructure.common.util.JsonUtilByFsJson;
import com.gogirl.infrastructure.common.util.ListUtil;
import com.gogirl.infrastructure.common.util.StringUtils;
import com.gogirl.infrastructure.mapper.store.oa.OverTimeRecordLogMapper;
import com.gogirl.infrastructure.mapper.store.oa.OverTimeRecordMapper;
import com.gogirl.infrastructure.mapper.store.oa.TakeLeaveEventMapper;
......@@ -31,6 +32,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -69,6 +71,11 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
throw new RRException("重复时间提交");
}
if (Arrays.stream(new Integer[]{TakeLeaveEvent.TYPE_ILL_REST, TakeLeaveEvent.TYPE_BIRTHDAY, TakeLeaveEvent.TYPE_MARRY})
.anyMatch(x -> x.equals(cmd.getType())) && StringUtils.isEmpty(cmd.getAnnexUrl())) {
throw new RRException("附件不可为空");
}
TakeLeaveEvent takeLeaveEvent = applyTakeLeaveCommandAssembler.apply(cmd);
takeLeaveEvent.setStatus(TakeLeaveEvent.STATUS_UN_APPROVAL);
......
......@@ -29,12 +29,38 @@ public class TakeLeaveEvent implements Serializable {
/**
* type
*/
/**
* 加班
*/
public static final Integer TYPE_OVER_TIME = 1;
/**
* 调休
*/
public static final Integer TYPE_ADJUST_REST = 2;
/**
* 事假
*/
public static final Integer TYPE_PERSONAL_REST = 3;
/**
* 病假
*/
public static final Integer TYPE_ILL_REST = 4;
/**
* 外勤
*/
public static final Integer TYPE_OUT = 5;
public static final Integer TYPE_MARRY = 6;
/**
* 年假
*/
public static final Integer TYPE_ANNUAL = 6;
/**
* 生日假
*/
public static final Integer TYPE_BIRTHDAY = 7;
/**
* 婚假
*/
public static final Integer TYPE_MARRY = 8;
@TableId(type = IdType.AUTO)
@JsonSerialize(using = ToStringSerializer.class)
......
......@@ -19,7 +19,7 @@ public class ApplyTakeLeaveCommand implements Serializable {
@ApiModelProperty("请假美甲师id")
private Integer applyTechnicianId;
@ApiModelProperty("1-加班 2-调休 3-事假 4-病假 5-外出 6-婚假")
@ApiModelProperty("1-加班 2-调休 3-事假 4-病假 5-外出 6-年假 7-生日假 8-婚假")
private Integer type;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
......
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