package com.persagy.calendar.service;

import java.util.List;

import com.persagy.calendar.pojo.dto.WorkCalendarDate;
import com.persagy.db.service.ISuperService;

/**
 * 工作历作息时间表
 * 
 * @version 1.0.0
 * @company persagy 
 * @author zhangqiankun
 * @date 2020-10-03 13:54:22
 */
public interface IWorkCalendarDateService extends ISuperService<WorkCalendarDate> {
	
	boolean createWorkCalendarDate(WorkCalendarDate workCalendarDate);
	
	boolean updateWorkCalendarDate(WorkCalendarDate workCalendarDate);
	
	boolean deleteWorkCalendarDate(String id);
	
	/**
	 * 同项目下，同天、同类型+code只允许存在一条自定义信息
	 * @param calendarDate 将本身已存在的作息时间ID赋值给了此对象，方便使用
	 * @param dictTypeLevel
	 */
	boolean checkWorkDateValid(WorkCalendarDate calendarDate, Integer dictTypeLevel);

	/**
	 * 不存在新增，存在更新
	 * @param calendarDate
	 * @return
	 */
	boolean replaceIntoCalendarDate(WorkCalendarDate calendarDate);

	/**
	 * 批量创建自定义作息时间信息
	 * @param datas
	 * @return
	 */
	boolean batchCreateCalendarDate(List<WorkCalendarDate> datas);
	
}

