|
@@ -2,10 +2,7 @@ package com.jpsoft.smart.modules.business.service.impl;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
-import java.util.Date;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
-import java.util.UUID;
|
|
|
|
|
|
+import java.util.*;
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
import com.jpsoft.smart.modules.base.dao.AlarmConfigDAO;
|
|
import com.jpsoft.smart.modules.base.dao.AlarmConfigDAO;
|
|
@@ -14,6 +11,7 @@ import com.jpsoft.smart.modules.base.dao.PersonInfoDAO;
|
|
import com.jpsoft.smart.modules.base.entity.AlarmConfig;
|
|
import com.jpsoft.smart.modules.base.entity.AlarmConfig;
|
|
import com.jpsoft.smart.modules.base.entity.CompanyInfo;
|
|
import com.jpsoft.smart.modules.base.entity.CompanyInfo;
|
|
import com.jpsoft.smart.modules.base.entity.PersonInfo;
|
|
import com.jpsoft.smart.modules.base.entity.PersonInfo;
|
|
|
|
+import com.jpsoft.smart.modules.base.service.HolidayInfoService;
|
|
import com.jpsoft.smart.modules.common.utils.StringUtils;
|
|
import com.jpsoft.smart.modules.common.utils.StringUtils;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.aspectj.weaver.patterns.PerSingleton;
|
|
import org.aspectj.weaver.patterns.PerSingleton;
|
|
@@ -44,6 +42,9 @@ public class WorkAttendanceServiceImpl implements WorkAttendanceService {
|
|
@Autowired
|
|
@Autowired
|
|
private AlarmConfigDAO alarmConfigDAO;
|
|
private AlarmConfigDAO alarmConfigDAO;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private HolidayInfoService holidayInfoService;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public WorkAttendance get(String id) {
|
|
public WorkAttendance get(String id) {
|
|
// TODO Auto-generated method stub
|
|
// TODO Auto-generated method stub
|
|
@@ -108,6 +109,17 @@ public class WorkAttendanceServiceImpl implements WorkAttendanceService {
|
|
boolean result = false;
|
|
boolean result = false;
|
|
|
|
|
|
try {
|
|
try {
|
|
|
|
+ DateTime recordTime = new DateTime(recordDate);
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
|
+ String date = recordTime.toString("yyyy-MM-dd");
|
|
|
|
+
|
|
|
|
+ //是否节假日
|
|
|
|
+ Set<String> holidaySet = holidayInfoService.getHolidaySetByDate(recordDate,recordDate);
|
|
|
|
+
|
|
|
|
+ if (holidaySet.contains(recordDate)){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
PersonInfo personInfo = personInfoDAO.get(personId);
|
|
PersonInfo personInfo = personInfoDAO.get(personId);
|
|
CompanyInfo companyInfo = companyInfoDAO.get(personInfo.getCompanyId());
|
|
CompanyInfo companyInfo = companyInfoDAO.get(personInfo.getCompanyId());
|
|
|
|
|
|
@@ -123,10 +135,6 @@ public class WorkAttendanceServiceImpl implements WorkAttendanceService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- DateTime recordTime = new DateTime(recordDate);
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
|
- String date = recordTime.toString("yyyy-MM-dd");
|
|
|
|
-
|
|
|
|
if (configList != null) {
|
|
if (configList != null) {
|
|
for (AlarmConfig alarmConfig : configList) {
|
|
for (AlarmConfig alarmConfig : configList) {
|
|
//是否工作日
|
|
//是否工作日
|