|
|
@@ -18,7 +18,8 @@ import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
-/**台风函数
|
|
|
+/**
|
|
|
+ * 台风函数
|
|
|
* description: TyphoonWorkTimeFunction <br>
|
|
|
* date: 2025/8/5 10:57 <br>
|
|
|
* author: lhbj <br>
|
|
|
@@ -40,6 +41,7 @@ public class TyphoonWorkTimeFunction {
|
|
|
|
|
|
/**
|
|
|
* 台风加班时长
|
|
|
+ *
|
|
|
* @param paramMap
|
|
|
* @param workOrOt
|
|
|
* @return
|
|
|
@@ -65,34 +67,39 @@ public class TyphoonWorkTimeFunction {
|
|
|
typhoonStart = rowTy.getDate("CFStartTime");
|
|
|
typhoonEnd = rowTy.getDate("CFEndTime");
|
|
|
|
|
|
- Map<String,List<PunchCardRecordInfo>> punchCardInfoMap = ((Map<String,List<PunchCardRecordInfo>>) globalMap.get("punchCardInfoMap"));
|
|
|
+ Map<String, List<PunchCardRecordInfo>> punchCardInfoMap = ((Map<String, List<PunchCardRecordInfo>>) globalMap.get("punchCardInfoMap"));
|
|
|
|
|
|
System.out.println("punchCardInfoMap.size():" + punchCardInfoMap.size());
|
|
|
if (punchCardInfoMap != null && punchCardInfoMap.size() > 0) {
|
|
|
List<PunchCardRecordInfo> punchCardInfoList = punchCardInfoMap.get(personId + "_" + currDateStr);
|
|
|
- PunchCardRecordInfo s2Info = punchCardInfoList.get(punchCardInfoList.size()-1);
|
|
|
- PunchCardRecordInfo s1Info = punchCardInfoList.get(0);
|
|
|
- Timestamp s2 = s2Info.getPunchCardTime();
|
|
|
- Timestamp s1 = s1Info.getPunchCardTime();
|
|
|
- Map<String, List<AtsOverTimeBillEntryInfo>> atsOverTimeBillObject = (Map) globalMap.get("T_HR_ATS_OverTimeBillEntry");
|
|
|
- if (atsOverTimeBillObject != null && atsOverTimeBillObject.size() > 0) {
|
|
|
- List<AtsOverTimeBillEntryInfo> list = (List) atsOverTimeBillObject.get(personId + "_" + currDateStr);
|
|
|
- AtsOverTimeBillEntryInfo atsBillEntryInfo = null;
|
|
|
- int listSize = list != null ? list.size() : 0;
|
|
|
-02
|
|
|
- for (int i = 0; i < listSize; ++i) {
|
|
|
- atsBillEntryInfo = (AtsOverTimeBillEntryInfo) list.get(i);
|
|
|
- //计算一段班台风时间
|
|
|
-
|
|
|
- //计算一段班台风时间
|
|
|
- if (null != s1 && null != s2) {
|
|
|
+ if (punchCardInfoList != null && punchCardInfoList.size() > 0) {
|
|
|
+ PunchCardRecordInfo s2Info= punchCardInfoList.get(0);
|
|
|
+ if(punchCardInfoList.size()>1){
|
|
|
+ s2Info = punchCardInfoList.get(punchCardInfoList.size() - 1);
|
|
|
+ }
|
|
|
+ PunchCardRecordInfo s1Info = punchCardInfoList.get(0);
|
|
|
+ Timestamp s2 = s2Info.getPunchCardTime();
|
|
|
+ Timestamp s1 = s1Info.getPunchCardTime();
|
|
|
+ Map<String, List<AtsOverTimeBillEntryInfo>> atsOverTimeBillObject = (Map) globalMap.get("T_HR_ATS_OverTimeBillEntry");
|
|
|
+ if (atsOverTimeBillObject != null && atsOverTimeBillObject.size() > 0) {
|
|
|
+ List<AtsOverTimeBillEntryInfo> list = (List) atsOverTimeBillObject.get(personId + "_" + currDateStr);
|
|
|
+ AtsOverTimeBillEntryInfo atsBillEntryInfo = null;
|
|
|
+ int listSize = list != null ? list.size() : 0;
|
|
|
+
|
|
|
+ for (int i = 0; i < listSize; ++i) {
|
|
|
+ atsBillEntryInfo = (AtsOverTimeBillEntryInfo) list.get(i);
|
|
|
+ //计算一段班台风时间
|
|
|
+
|
|
|
+ //计算一段班台风时间
|
|
|
+ if (null != s1 && null != s2) {
|
|
|
|
|
|
TyphoonWordDw +=
|
|
|
Math.max(0, Math.min(Math.min(atsBillEntryInfo.getRealEndTime().getTime(), s2.getTime()), typhoonEnd.getTime())
|
|
|
- Math.max(Math.max(atsBillEntryInfo.getRealStartTime().getTime(), s1.getTime()), typhoonStart.getTime()));
|
|
|
|
|
|
+ }
|
|
|
+ System.out.println("TyphoonWordDw3:" + TyphoonWordDw);
|
|
|
}
|
|
|
- System.out.println("TyphoonWordDw3:" + TyphoonWordDw);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -109,6 +116,7 @@ public class TyphoonWorkTimeFunction {
|
|
|
|
|
|
/**
|
|
|
* 台风工作时长
|
|
|
+ *
|
|
|
* @param paramMap
|
|
|
* @param workOrOt
|
|
|
* @return
|
|
|
@@ -181,7 +189,7 @@ public class TyphoonWorkTimeFunction {
|
|
|
Timestamp s2 = row.getTimestamp("S2");
|
|
|
Timestamp s1 = row.getTimestamp("S1");
|
|
|
ScheduleShiftItemInfo scheduleShiftItemInfo = null;
|
|
|
- if(scheduleShiftItemMap.size()>0) {
|
|
|
+ if (scheduleShiftItemMap.size() > 0) {
|
|
|
//计算一段班台风时间
|
|
|
if (null != s1 && null != s2) {
|
|
|
scheduleShiftItemInfo = scheduleShiftItemMap.get("1");
|