yanghb
2024-12-17 1287337fd0b0c156ec79712f9a600ebeffefe3a6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package com.zzg.system.service.system;
 
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzg.system.domain.InternalDate;
import org.apache.poi.EncryptedDocumentException;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.springframework.web.multipart.MultipartFile;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;
 
public interface IInternalDateService extends IService<InternalDate> {
 
    /**
     * 初始化数据库日期数据
     *
     * @param startDate
     * @param endDate
     * @return
     */
    String initInternalDate(String startDate, String endDate);
 
    /**
     * 根据上传的excel导入数据到数据库
     *
     * @param request
     * @param response
     * @param file
     * @return
     * @throws IOException
     * @throws FileNotFoundException
     * @throws InvalidFormatException
     * @throws EncryptedDocumentException
     */
    Map<String, Object> importInternalDate(HttpServletRequest request, HttpServletResponse response, MultipartFile file) throws FileNotFoundException, IOException, EncryptedDocumentException, InvalidFormatException;
 
    /**
     * 下载节假日模板文件
     *
     * @param response
     * @throws IOException
     */
    void downloadTemplate(HttpServletResponse response) throws IOException;
 
    /**
     * 根据给定的月份查询当月所有日期
     *
     * @param month
     * @return
     * @throws ParseException
     */
    List<InternalDate> getInternalDatesByMonth(String month) throws ParseException;
 
    /**
     * 查找interval个工作日后的日期
     *
     * @param utilDate 指定日期
     * @param interval 间隔天数
     * @return
     */
    InternalDate getInternalAfterInterval(Date utilDate, int interval);
 
    /**
     * 查找interval个工作日前的日期
     *
     * @param utilDate 指定日期
     * @param interval 间隔天数
     * @return
     */
    InternalDate getInternalBeforeInterval(String utilDate, int interval);
 
    /**
     * 判断开始时间和结束是否在指定间隔
     *
     * @param startTime
     * @param endTime
     * @param days
     * @return
     */
    boolean dateLimit(String startTime, String endTime, int days);
 
    boolean dateLimit(String startTime, String endTime, int days, boolean isWork);
}