修改假期,节假日定时器
This commit is contained in:
parent
5463501e0d
commit
5d999bd16b
|
|
@ -20,7 +20,8 @@ public enum AttStatus {
|
|||
产("16"),
|
||||
婚("17"),
|
||||
丧("18"),
|
||||
育("19");
|
||||
育("19"),
|
||||
陪("20");
|
||||
|
||||
private String code;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import java.time.ZoneId;
|
|||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
|
||||
/**
|
||||
|
|
@ -17,8 +18,7 @@ import org.apache.commons.lang3.time.DateFormatUtils;
|
|||
*
|
||||
* @author bonus
|
||||
*/
|
||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||
{
|
||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
public static String YYYY = "yyyy";
|
||||
|
||||
public static String MM = "MM";
|
||||
|
|
@ -41,8 +41,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
*
|
||||
* @return Date() 当前日期
|
||||
*/
|
||||
public static Date getNowDate()
|
||||
{
|
||||
public static Date getNowDate() {
|
||||
return new Date();
|
||||
}
|
||||
|
||||
|
|
@ -51,8 +50,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getDate()
|
||||
{
|
||||
public static String getDate() {
|
||||
return dateTimeNow(YYYY_MM_DD);
|
||||
}
|
||||
|
||||
|
|
@ -61,8 +59,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getMonth()
|
||||
{
|
||||
public static String getMonth() {
|
||||
return dateTimeNow(YYYY_MM);
|
||||
}
|
||||
|
||||
|
|
@ -71,27 +68,41 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getYear()
|
||||
{
|
||||
public static String getYear() {
|
||||
return dateTimeNow(YYYY);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前年, 默认格式为yyyy
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getNextYear() {
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前年份
|
||||
int currentYear = currentDate.getYear();
|
||||
|
||||
return currentYear + 1 + "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前月, 默认格式为MM
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getMm()
|
||||
{
|
||||
public static String getMm() {
|
||||
return dateTimeNow(MM);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取时分秒
|
||||
*
|
||||
* @param dateTimeString yyyy-MM-dd HH:mm:ss
|
||||
* @return Stirng HH:mm:ss
|
||||
*/
|
||||
public static final String getHhMmSs(String dateTimeString){
|
||||
public static final String getHhMmSs(String dateTimeString) {
|
||||
SimpleDateFormat originalFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date date = null;
|
||||
try {
|
||||
|
|
@ -105,10 +116,11 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
|
||||
/**
|
||||
* 获取年月日
|
||||
*
|
||||
* @param dateTimeString yyyy-MM-dd HH:mm:ss
|
||||
* @return Stirng yyyy-MM-dd
|
||||
*/
|
||||
public static final String getYyyyMmDd(String dateTimeString){
|
||||
public static final String getYyyyMmDd(String dateTimeString) {
|
||||
SimpleDateFormat originalFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date date = null;
|
||||
try {
|
||||
|
|
@ -120,8 +132,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
return targetFormat.format(date);
|
||||
}
|
||||
|
||||
public static final String getTime()
|
||||
{
|
||||
public static final String getTime() {
|
||||
return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
|
||||
}
|
||||
|
||||
|
|
@ -130,39 +141,30 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
System.err.println(getTime());
|
||||
}
|
||||
|
||||
public static final String dateTimeNow()
|
||||
{
|
||||
public static final String dateTimeNow() {
|
||||
return dateTimeNow(YYYYMMDDHHMMSS);
|
||||
}
|
||||
|
||||
public static final String dateTimeNow(final String format)
|
||||
{
|
||||
public static final String dateTimeNow(final String format) {
|
||||
return parseDateToStr(format, new Date());
|
||||
}
|
||||
|
||||
public static final String dateTime(final Date date)
|
||||
{
|
||||
public static final String dateTime(final Date date) {
|
||||
return parseDateToStr(YYYY_MM_DD, date);
|
||||
}
|
||||
|
||||
public static final Date YmdFormatDate(String date)
|
||||
{
|
||||
public static final Date YmdFormatDate(String date) {
|
||||
return new Date(date);
|
||||
}
|
||||
|
||||
public static final String parseDateToStr(final String format, final Date date)
|
||||
{
|
||||
public static final String parseDateToStr(final String format, final Date date) {
|
||||
return new SimpleDateFormat(format).format(date);
|
||||
}
|
||||
|
||||
public static final Date dateTime(final String format, final String ts)
|
||||
{
|
||||
try
|
||||
{
|
||||
public static final Date dateTime(final String format, final String ts) {
|
||||
try {
|
||||
return new SimpleDateFormat(format).parse(ts);
|
||||
}
|
||||
catch (ParseException e)
|
||||
{
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
|
@ -170,8 +172,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
/**
|
||||
* 日期路径 即年/月/日 如2018/08/08
|
||||
*/
|
||||
public static final String datePath()
|
||||
{
|
||||
public static final String datePath() {
|
||||
Date now = new Date();
|
||||
return DateFormatUtils.format(now, "yyyy/MM/dd");
|
||||
}
|
||||
|
|
@ -179,8 +180,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
/**
|
||||
* 日期路径 即年/月/日 如20180808
|
||||
*/
|
||||
public static final String dateTime()
|
||||
{
|
||||
public static final String dateTime() {
|
||||
Date now = new Date();
|
||||
return DateFormatUtils.format(now, "yyyyMMdd");
|
||||
}
|
||||
|
|
@ -188,18 +188,13 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
/**
|
||||
* 日期型字符串转化为日期 格式
|
||||
*/
|
||||
public static Date parseDate(Object str)
|
||||
{
|
||||
if (str == null)
|
||||
{
|
||||
public static Date parseDate(Object str) {
|
||||
if (str == null) {
|
||||
return null;
|
||||
}
|
||||
try
|
||||
{
|
||||
try {
|
||||
return parseDate(str.toString(), parsePatterns);
|
||||
}
|
||||
catch (ParseException e)
|
||||
{
|
||||
} catch (ParseException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -207,8 +202,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
/**
|
||||
* 获取服务器启动时间
|
||||
*/
|
||||
public static Date getServerStartDate()
|
||||
{
|
||||
public static Date getServerStartDate() {
|
||||
long time = ManagementFactory.getRuntimeMXBean().getStartTime();
|
||||
return new Date(time);
|
||||
}
|
||||
|
|
@ -216,12 +210,11 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
/**
|
||||
* 计算时间差
|
||||
*
|
||||
* @param endDate 最后时间
|
||||
* @param endDate 最后时间
|
||||
* @param startTime 开始时间
|
||||
* @return 时间差(天/小时/分钟)
|
||||
*/
|
||||
public static String timeDistance(Date endDate, Date startTime)
|
||||
{
|
||||
public static String timeDistance(Date endDate, Date startTime) {
|
||||
long nd = 1000 * 24 * 60 * 60;
|
||||
long nh = 1000 * 60 * 60;
|
||||
long nm = 1000 * 60;
|
||||
|
|
@ -242,8 +235,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
/**
|
||||
* 增加 LocalDateTime ==> Date
|
||||
*/
|
||||
public static Date toDate(LocalDateTime temporalAccessor)
|
||||
{
|
||||
public static Date toDate(LocalDateTime temporalAccessor) {
|
||||
ZonedDateTime zdt = temporalAccessor.atZone(ZoneId.systemDefault());
|
||||
return Date.from(zdt.toInstant());
|
||||
}
|
||||
|
|
@ -251,14 +243,13 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
/**
|
||||
* 增加 LocalDate ==> Date
|
||||
*/
|
||||
public static Date toDate(LocalDate temporalAccessor)
|
||||
{
|
||||
public static Date toDate(LocalDate temporalAccessor) {
|
||||
LocalDateTime localDateTime = LocalDateTime.of(temporalAccessor, LocalTime.of(0, 0, 0));
|
||||
ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
|
||||
return Date.from(zdt.toInstant());
|
||||
}
|
||||
|
||||
public static Boolean getTimeIsRange(String time, String startTime, String endTime){
|
||||
public static Boolean getTimeIsRange(String time, String startTime, String endTime) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
Date startDate = sdf.parse(startTime);
|
||||
|
|
@ -279,7 +270,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||
}
|
||||
}
|
||||
|
||||
public static String getAfterDate(String dateString){
|
||||
public static String getAfterDate(String dateString) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
LocalDate date = LocalDate.parse(dateString, formatter);
|
||||
// 减去一天
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public class AttDetailByMonthController extends BaseController {
|
|||
List<AttDetailByMonthBean> attDayReportList = attDetailByMonthService.selectAttDetailList(bean);
|
||||
Sheet departmentSheet1 = exporter.createSheet("月异常报表详情");
|
||||
List<String> departmentHeaders1 = Arrays.asList("序号", "姓名", "所属部门", "考勤月", "应考勤天数", "正常打卡天数",
|
||||
"迟到天数", "早退天数", "矿工天数", "打卡地异常天数", "出入异常天数");
|
||||
"迟到天数", "早退天数", "旷工天数", "打卡地异常天数", "出入异常天数");
|
||||
exporter.addHeaderRowAndTitle(departmentSheet1, departmentHeaders1, title);
|
||||
List<Map<String, Object>> departmentData1 = new ArrayList<>();
|
||||
for (int i = 0; i < attDayReportList.size(); i++) {
|
||||
|
|
@ -101,7 +101,7 @@ public class AttDetailByMonthController extends BaseController {
|
|||
map.put("正常打卡天数", attDayReportList.get(i).getNormalNum());
|
||||
map.put("迟到天数", attDayReportList.get(i).getLateNum());
|
||||
map.put("早退天数", attDayReportList.get(i).getEarlyNum());
|
||||
map.put("矿工天数", attDayReportList.get(i).getSkippingNum());
|
||||
map.put("旷工天数", attDayReportList.get(i).getSkippingNum());
|
||||
map.put("打卡地异常天数", attDayReportList.get(i).getAddressErrorNum());
|
||||
map.put("出入异常天数", attDayReportList.get(i).getEinErrorNum());
|
||||
departmentData1.add(map);
|
||||
|
|
@ -235,6 +235,7 @@ public class AttDetailByMonthController extends BaseController {
|
|||
attStatus.put("17", "婚假");
|
||||
attStatus.put("18", "丧假");
|
||||
attStatus.put("19", "育儿假");
|
||||
attStatus.put("20", "陪护假");
|
||||
return attStatus;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@ public class HolidayTasks {
|
|||
@Resource(name = "OrgChangeService")
|
||||
private OrgChangeService orgChangeService;
|
||||
|
||||
@Scheduled(cron = "0 0 5 1 1 *")
|
||||
//@Scheduled(fixedDelay = 300000)
|
||||
@Scheduled(cron = "0 0 5 26 12 *")//每天12月26日凌晨5点
|
||||
@Async
|
||||
public void getAttTasks(){
|
||||
getHoliday();
|
||||
|
|
@ -44,7 +43,7 @@ public class HolidayTasks {
|
|||
|
||||
public void getHoliday(){
|
||||
try {
|
||||
String year = DateUtils.getYear();
|
||||
String year = DateUtils.getNextYear();
|
||||
String data = HttpUtil.get("http://timor.tech/api/holiday/year/" + year + "?type=Y&week=Y");
|
||||
String code = JSONObject.parseObject(data).getString("code");
|
||||
if(code.equals("0")){
|
||||
|
|
@ -68,7 +67,6 @@ public class HolidayTasks {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 考勤组变更更新数据
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -422,7 +422,6 @@ public class WechatTasks {
|
|||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class IpAndPathConfig {
|
|||
*/
|
||||
public static String wechatDevUrl = "http://127.0.0.1:21907/gz_att_wechat";
|
||||
|
||||
public static String wechatTestUrl = "http://192.168.0.14:1907/gz_att_wechat";
|
||||
public static String wechatTestUrl = "http://192.168.0.14:21907/gz_att_wechat";
|
||||
|
||||
public static String wechatProdUrl = "https://jj.jypxks.com/gz_att_wechat";
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ public class WorkdayCalculator {
|
|||
Calendar.FRIDAY, Calendar.SATURDAY, Calendar.SUNDAY};
|
||||
|
||||
public static void main(String[] args) {
|
||||
getWorkDay("1,0,1,1,1,0,1", 1, getHolidays(), "2024-11-05");
|
||||
|
||||
List<String> list= getWorkDay("1,1,1,1,1,0,0", 1, getHolidays(), "2024-12-01");
|
||||
System.out.print(1);
|
||||
}
|
||||
|
||||
public static List<String> getWorkDay(String attDays, int type, List<Holiday> holidays, String pushDate) {
|
||||
|
|
@ -68,19 +70,15 @@ public class WorkdayCalculator {
|
|||
|
||||
private static List<Holiday> getHolidays() {
|
||||
List<Holiday> holidays = new ArrayList<>();
|
||||
holidays.add(new Holiday("2024-10-01", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-02", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-03", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-04", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-05", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-06", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-07", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-13", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-19", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-20", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-26", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-27", "", "1"));
|
||||
holidays.add(new Holiday("2024-10-12", "", "2"));
|
||||
holidays.add(new Holiday("2024-12-01", "", "1"));
|
||||
holidays.add(new Holiday("2024-12-07", "", "1"));
|
||||
holidays.add(new Holiday("2024-12-08", "", "1"));
|
||||
holidays.add(new Holiday("2024-12-14", "", "1"));
|
||||
holidays.add(new Holiday("2024-12-15", "", "1"));
|
||||
holidays.add(new Holiday("2024-12-21", "", "1"));
|
||||
holidays.add(new Holiday("2024-12-22", "", "1"));
|
||||
holidays.add(new Holiday("2024-12-28", "", "1"));
|
||||
holidays.add(new Holiday("2024-12-29", "", "1"));
|
||||
return holidays;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ public class ExportFileController {
|
|||
writer.merge(rowNum + listData.size(), rowNum + listData.size() + 1, 0, 0,
|
||||
"说明", false);
|
||||
writer.merge(rowNum + listData.size(), rowNum + listData.size(), 1, 2 + days.size(),
|
||||
"1.考勤记录:出勤记“√”,出差记“Δ”,年休假记“年”,探亲假记“探”,事假记“事”,法定假记“法”,病假记“病”,产假记“产”,婚假记“婚”,丧假记“丧”,育儿假记“育”,补休记“补”,旷工记“旷”,迟到记“迟”,早退记“退”,省内工地记“工”,省外工地记“外”,出差需在备注栏备注清楚出差地点。", false);
|
||||
"1.考勤记录:出勤记“√”,出差记“Δ”,年休假记“年”,探亲假记“探”,事假记“事”,法定假记“法”,病假记“病”,产假记“产”,婚假记“婚”,丧假记“丧”,育儿假记“育”,陪护假记“陪”,补休记“补”,旷工记“旷”,迟到记“迟”,早退记“退”,省内工地记“工”,省外工地记“外”,出差需在备注栏备注清楚出差地点。", false);
|
||||
writer.merge(rowNum + listData.size() + 1, rowNum + listData.size() + 1, 1, 2 + days.size(),
|
||||
"2.员工有关请假凭证,记录清楚准确,与本表于次月3日前一并报人力资源管理部门(专业分公司报送时间为30日前)。", false);
|
||||
writer.autoSizeColumn(3);
|
||||
|
|
@ -419,7 +419,7 @@ public class ExportFileController {
|
|||
List<AttDayReportBean> attDayReportList = attendanceDetailsService.getAttDayReportList(bean);
|
||||
Sheet departmentSheet1 = exporter.createSheet("日报表详情");
|
||||
List<String> departmentHeaders1 = Arrays.asList("序号", "考勤日期", "正常打卡人数", "迟到人数", "早退人数",
|
||||
"矿工人数", "请假人数", "打卡地异常人数", "出入异常人数", "轮休人数", "临时外出人数");
|
||||
"旷工人数", "请假人数", "打卡地异常人数", "出入异常人数", "轮休人数", "临时外出人数");
|
||||
|
||||
exporter.addHeaderRowAndTitle(departmentSheet1, departmentHeaders1, title);
|
||||
List<Map<String, Object>> departmentData1 = new ArrayList<>();
|
||||
|
|
@ -430,7 +430,7 @@ public class ExportFileController {
|
|||
map.put("正常打卡人数", attDayReportList.get(i).getNormalNum());
|
||||
map.put("迟到人数", attDayReportList.get(i).getLateNum());
|
||||
map.put("早退人数", attDayReportList.get(i).getEarlyNum());
|
||||
map.put("矿工人数", attDayReportList.get(i).getSkippingNum());
|
||||
map.put("旷工人数", attDayReportList.get(i).getSkippingNum());
|
||||
map.put("请假人数", attDayReportList.get(i).getLeaveNum());
|
||||
map.put("打卡地异常人数", attDayReportList.get(i).getAddressErrorNum());
|
||||
map.put("出入异常人数", attDayReportList.get(i).getEinErrorNum());
|
||||
|
|
@ -533,6 +533,8 @@ public class ExportFileController {
|
|||
attStatus.put("16", "产假");
|
||||
attStatus.put("17", "婚假");
|
||||
attStatus.put("18", "丧假");
|
||||
attStatus.put("19", "育儿假");
|
||||
attStatus.put("20", "陪护假");
|
||||
return attStatus;
|
||||
}
|
||||
|
||||
|
|
@ -554,7 +556,7 @@ public class ExportFileController {
|
|||
List<AttMonthReportBean> attDayReportList = attendanceDetailsService.getAttMonthReportList(bean);
|
||||
Sheet departmentSheet1 = exporter.createSheet("月报表详情");
|
||||
List<String> departmentHeaders1 = Arrays.asList("序号", "姓名", "所属部门", "考勤月", "应考勤天数", "正常打卡天数",
|
||||
"迟到天数", "早退天数", "矿工天数", "请假天数", "打卡地异常天数", "出入异常天数", "轮休天数", "临时外出天数");
|
||||
"迟到天数", "早退天数", "旷工天数", "请假天数", "打卡地异常天数", "出入异常天数", "轮休天数", "临时外出天数");
|
||||
exporter.addHeaderRowAndTitle(departmentSheet1, departmentHeaders1, title);
|
||||
List<Map<String, Object>> departmentData1 = new ArrayList<>();
|
||||
for (int i = 0; i < attDayReportList.size(); i++) {
|
||||
|
|
@ -567,7 +569,7 @@ public class ExportFileController {
|
|||
map.put("正常打卡天数", attDayReportList.get(i).getNormalNum());
|
||||
map.put("迟到天数", attDayReportList.get(i).getLateNum());
|
||||
map.put("早退天数", attDayReportList.get(i).getEarlyNum());
|
||||
map.put("矿工天数", attDayReportList.get(i).getSkippingNum());
|
||||
map.put("旷工天数", attDayReportList.get(i).getSkippingNum());
|
||||
map.put("请假天数", attDayReportList.get(i).getLeaveNum());
|
||||
map.put("打卡地异常天数", attDayReportList.get(i).getAddressErrorNum());
|
||||
map.put("出入异常天数", attDayReportList.get(i).getEinErrorNum());
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public class RequestReportServiceImpl implements RequestReportService {
|
|||
List<WorkReportBean> list = new ArrayList<>();
|
||||
if (StringHelper.isNotEmpty(bean.getType())) {
|
||||
if ("请假".equals(bean.getType())) {
|
||||
bean.setHolidayType(new String[]{"病假", "年休假", "探亲假", "事假", "产假", "婚假", "丧假"});
|
||||
bean.setHolidayType(new String[]{"病假", "年休假", "探亲假", "事假", "产假", "婚假", "丧假", "育儿假", "陪护假"});
|
||||
}
|
||||
list = dao.getDetailsList(bean);
|
||||
if (list.size() > 0) {
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public class WorkReportServiceImpl implements WorkReportService {
|
|||
List<WorkReportBean> list = new ArrayList<>();
|
||||
if (StringHelper.isNotEmpty(bean.getType())) {
|
||||
if ("请假".equals(bean.getType())) {
|
||||
bean.setHolidayType(new String[]{"病假", "年休假", "探亲假", "事假", "产假", "婚假", "丧假"});
|
||||
bean.setHolidayType(new String[]{"病假", "年休假", "探亲假", "事假", "产假", "婚假", "丧假", "育儿假", "陪护假"});
|
||||
}
|
||||
list = dao.getDetailsList(bean);
|
||||
if (list.size() > 0) {
|
||||
|
|
|
|||
|
|
@ -166,7 +166,11 @@
|
|||
and vat.user_id = #{userId}
|
||||
</if>
|
||||
<if test='attStatis != null and attStatis == "6"'>
|
||||
and (vat.toWorkAttStatus in (12,13,14,15,16,17,18,19) or vat.offWorkAttStatus in (12,13,14,15,16,17,18,19))
|
||||
and (vat.toWorkAttStatus in (SELECT dict_value
|
||||
FROM sys_dict_data
|
||||
where dict_type = 'att_status' and is_leave = '1') or vat.offWorkAttStatus in (SELECT dict_value
|
||||
FROM sys_dict_data
|
||||
where dict_type = 'att_status' and is_leave = '1'))
|
||||
</if>
|
||||
<if test='attStatis != null and attStatis != "6"'>
|
||||
<if test='attStatis == "1"'>
|
||||
|
|
|
|||
|
|
@ -69,7 +69,9 @@
|
|||
data_source = #{params.dataSource},
|
||||
error_remake = #{params.errorRemake},
|
||||
att_status = CASE
|
||||
WHEN att_status in (11,12,13,14,15,16,17,18,19) THEN att_status
|
||||
WHEN att_status in (SELECT dict_value
|
||||
FROM sys_dict_data
|
||||
where dict_type = 'att_status' and is_leave = '1') THEN att_status
|
||||
ELSE #{params.attStatus}
|
||||
END
|
||||
where user_id = #{params.userId} and org_id = #{params.orgId}
|
||||
|
|
@ -79,7 +81,9 @@
|
|||
data_source = #{params.dataSource},
|
||||
error_remake = #{params.errorRemake},
|
||||
att_status = CASE
|
||||
WHEN att_status in (11,12,13,14,15,16,17,18,19) THEN att_status
|
||||
WHEN att_status in (SELECT dict_value
|
||||
FROM sys_dict_data
|
||||
where dict_type = 'att_status' and is_leave = '1') THEN att_status
|
||||
ELSE #{params.attStatus}
|
||||
END
|
||||
where is_update = 0 and user_id = #{params.userId} and org_id = #{params.orgId}
|
||||
|
|
@ -106,18 +110,18 @@
|
|||
</update>
|
||||
|
||||
|
||||
<delete id="delHisData">
|
||||
delete from att_source_data where att_current_day = #{date};
|
||||
delete from att_data where att_current_day = #{date};
|
||||
delete from att_data_update where att_current_day = #{date};
|
||||
</delete>
|
||||
|
||||
<!-- <delete id="delHisData">-->
|
||||
<!-- delete from att_source_data where att_current_day = #{date};-->
|
||||
<!-- update att_data set att_current_time = null,att_status = 0,att_address = null,att_lon = null,att_lat = null where att_current_day = #{date};-->
|
||||
<!-- update att_data_update set att_current_time = null,att_status = 0,att_address = null,att_lon = null,att_lat = null where att_current_day = #{date};-->
|
||||
<!-- delete from att_data where att_current_day = #{date};-->
|
||||
<!-- delete from att_data_update where att_current_day = #{date};-->
|
||||
<!-- </delete>-->
|
||||
|
||||
<delete id="delHisData">
|
||||
delete from att_source_data where att_current_day = #{date};
|
||||
update att_data set att_current_time = null,att_status = 0,att_address = null,att_lon = null,att_lat = null where att_current_day = #{date};
|
||||
update att_data_update set att_current_time = null,att_status = 0,att_address = null,att_lon = null,att_lat = null where att_current_day = #{date};
|
||||
</delete>
|
||||
|
||||
<select id="getQsyAttendances" resultType="com.bonus.system.att.entity.AttSourceDataBean">
|
||||
select name, id_number, '0' as orgId, '0' as orgName,
|
||||
attendance_date as attCurrentDay, attendance_time as attCurrentTime,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,11 @@
|
|||
AND su.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test='attStatus != null and attStatus == "6"'>
|
||||
and (v.toWorkAttStatus in (12,13,14,15,16,17,18,19) or v.offWorkAttStatus in (12,13,14,15,16,17,18,19))
|
||||
and (v.toWorkAttStatus in (SELECT dict_value
|
||||
FROM sys_dict_data
|
||||
where dict_type = 'att_status' and is_leave = '1') or v.offWorkAttStatus in (SELECT dict_value
|
||||
FROM sys_dict_data
|
||||
where dict_type = 'att_status' and is_leave = '1'))
|
||||
</if>
|
||||
<if test='attStatus != null and attStatus != "6"'>
|
||||
<if test='attStatus == "1"'>
|
||||
|
|
@ -185,7 +189,11 @@
|
|||
AND att_current_day between #{startDate} AND #{endDate}
|
||||
</if>
|
||||
<if test='attStatus != null and attStatus == "6"'>
|
||||
and (toWorkAttStatus in (12,13,14,15,16,17,18,19) or offWorkAttStatus in (12,13,14,15,16,17,18,19))
|
||||
and (toWorkAttStatus in (SELECT dict_value
|
||||
FROM sys_dict_data
|
||||
where dict_type = 'att_status' and is_leave = '1') or offWorkAttStatus in (SELECT dict_value
|
||||
FROM sys_dict_data
|
||||
where dict_type = 'att_status' and is_leave = '1'))
|
||||
</if>
|
||||
<if test='attStatus != null and attStatus != "6"'>
|
||||
<if test='attStatus == "1"'>
|
||||
|
|
@ -282,7 +290,11 @@
|
|||
AND att_current_day between #{startDate} AND #{endDate}
|
||||
</if>
|
||||
<if test='attStatus != null and attStatus == "6"'>
|
||||
and (toWorkAttStatus in (12,13,14,15,16,17,18,19) or offWorkAttStatus in (12,13,14,15,16,17,18,19))
|
||||
and (toWorkAttStatus in (SELECT dict_value
|
||||
FROM sys_dict_data
|
||||
where dict_type = 'att_status' and is_leave = '1') or offWorkAttStatus in (SELECT dict_value
|
||||
FROM sys_dict_data
|
||||
where dict_type = 'att_status' and is_leave = '1'))
|
||||
</if>
|
||||
<if test='attStatus != null and attStatus != "6"'>
|
||||
<if test='attStatus == "1"'>
|
||||
|
|
|
|||
|
|
@ -85,37 +85,26 @@
|
|||
</update>
|
||||
|
||||
<select id="getPersonList" resultType="com.bonus.system.api.domain.SysUser">
|
||||
SELECT
|
||||
su.user_id,
|
||||
su.user_name,
|
||||
su.phone,
|
||||
su.`password`,
|
||||
IF(applied_face is null,1,su.is_face) as isFace,
|
||||
pd.org_id,
|
||||
IF
|
||||
( pd.org_id IS NOT NULL, 1, 0 ) isPd,
|
||||
su.update_time,
|
||||
su.open_id
|
||||
FROM
|
||||
sys_user su
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
suo.user_id,
|
||||
suo.org_id
|
||||
FROM
|
||||
sys_user_org suo
|
||||
INNER JOIN sys_organization so ON so.id = suo.org_id
|
||||
LEFT JOIN att_group_person_relation ag on ag.user_id = suo.user_id and ag.is_active = '1'
|
||||
WHERE
|
||||
so.is_active = '1'
|
||||
AND suo.is_active = '1'
|
||||
AND so.is_department = '1' and ag.group_id is not null
|
||||
) pd ON pd.user_id = su.user_id
|
||||
LEFT JOIN sys_user_face sw ON sw.user_id = su.user_id
|
||||
WHERE
|
||||
is_active = '1'
|
||||
GROUP BY
|
||||
user_id
|
||||
SELECT distinct
|
||||
su.user_id,
|
||||
su.user_name,
|
||||
su.phone,
|
||||
su.`password`,
|
||||
IF(applied_face is null,1,su.is_face) as isFace,
|
||||
pd.org_id,
|
||||
IF(pd.org_id IS NOT NULL, 1, 0) isPd,
|
||||
su.update_time,
|
||||
su.open_id
|
||||
FROM sys_user su
|
||||
LEFT JOIN (
|
||||
SELECT gp.user_id,gp.org_id
|
||||
FROM att_group g
|
||||
LEFT JOIN att_group_person_relation gp on g.id = gp.group_id
|
||||
WHERE g.is_active = 1 and g.att_type = 2
|
||||
) pd ON pd.user_id = su.user_id
|
||||
LEFT JOIN sys_user_face sw ON sw.user_id = su.user_id
|
||||
WHERE is_active = '1'
|
||||
GROUP BY user_id
|
||||
</select>
|
||||
|
||||
<select id="getWebFaceList" resultType="com.bonus.system.att.entity.AttFaceBean">
|
||||
|
|
|
|||
|
|
@ -100,6 +100,10 @@
|
|||
1
|
||||
WHEN la.leave_type='丧假' and la.source=2 THEN
|
||||
1
|
||||
WHEN la.leave_type='育儿假' and la.source=2 THEN
|
||||
1
|
||||
WHEN la.leave_type='陪护假' and la.source=2 THEN
|
||||
1
|
||||
ELSE
|
||||
0
|
||||
END
|
||||
|
|
@ -150,6 +154,8 @@
|
|||
when la.leave_type = '丧假' then '休假'
|
||||
when la.leave_type = '探亲假' then '休假'
|
||||
when la.leave_type = '休假报备' then '休假'
|
||||
when la.leave_type = '育儿假' then '休假'
|
||||
when la.leave_type = '陪护假' then '休假'
|
||||
else la.leave_type
|
||||
end as leaveType,
|
||||
case when la.is_agree = '1' then '是' else '否' end as isAgree,
|
||||
|
|
|
|||
|
|
@ -122,6 +122,10 @@
|
|||
1
|
||||
WHEN la.leave_type='丧假' and la.source=2 THEN
|
||||
1
|
||||
WHEN la.leave_type='育儿假' and la.source=2 THEN
|
||||
1
|
||||
WHEN la.leave_type='陪护假' and la.source=2 THEN
|
||||
1
|
||||
ELSE
|
||||
0
|
||||
END
|
||||
|
|
|
|||
Loading…
Reference in New Issue