@ -385,7 +385,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
String newClockTime = newClockTimeMap . get ( "signdate" ) + " " + newClockTimeMap . get ( "signtime" ) ;
int index = clcokInTimeData . indexOf ( resetClcokDTO ) ;
if ( newtimeType . equals ( ClockPointEnum . BEFORE ) ) {
if ( ! getBeforeClockTime ( needClockDateList , time) . equals ( "" ) & & DateUtil . getTime ( newClockTime ) . compareTo ( DateUtil . getTime ( getBeforeClockTime ( needClockDateList , time) ) ) < = 0 ) {
if ( ! getBeforeClockTime ( needClockDateList , res tT ime) . equals ( "" ) & & DateUtil . getTime ( newClockTime ) . compareTo ( DateUtil . getTime ( getBeforeClockTime ( needClockDateList , res tT ime) ) ) < = 0 ) {
newClockTimeMap = null ;
}
@ -398,7 +398,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
}
}
} else if ( newtimeType . equals ( ClockPointEnum . AFTER ) ) {
if ( ! getNextClockTime ( needClockDateList , time) . equals ( "" ) & & DateUtil . getTime ( newClockTime ) . compareTo ( DateUtil . getTime ( getNextClockTime ( needClockDateList , time) ) ) > = 0 ) {
if ( ! getNextClockTime ( needClockDateList , res tT ime) . equals ( "" ) & & DateUtil . getTime ( newClockTime ) . compareTo ( DateUtil . getTime ( getNextClockTime ( needClockDateList , res tT ime) ) ) > = 0 ) {
newClockTimeMap = null ;
}
}
@ -507,7 +507,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
}
}
if ( ! getBeforeClockTime ( needClockDateList , time) . equals ( "" ) & & DateUtil . getTime ( newClockTime ) . compareTo ( DateUtil . getTime ( getBeforeClockTime ( needClockDateList , time) ) ) < = 0 ) {
if ( ! getBeforeClockTime ( needClockDateList , res tT ime) . equals ( "" ) & & DateUtil . getTime ( newClockTime ) . compareTo ( DateUtil . getTime ( getBeforeClockTime ( needClockDateList , res tT ime) ) ) < = 0 ) {
newClockTimeMap = null ;
}
@ -544,7 +544,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
newClockTimeMap = null ;
}
}
if ( ! getNextClockTime ( needClockDateList , time) . equals ( "" ) & & DateUtil . getTime ( newClockTime ) . compareTo ( DateUtil . getTime ( getNextClockTime ( needClockDateList , time) ) ) > = 0 ) {
if ( ! getNextClockTime ( needClockDateList , res tT ime) . equals ( "" ) & & DateUtil . getTime ( newClockTime ) . compareTo ( DateUtil . getTime ( getNextClockTime ( needClockDateList , res tT ime) ) ) > = 0 ) {
newClockTimeMap = null ;
}
}
@ -818,7 +818,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
/ * *
* 当 休 息 时 段 的 开 始 和 结 束 时 间 都 要 打 卡 时 才 进 行 弹 性
* /
if ( toRestClockPointDTO ! = null & & endRestClockPointDTO ! = null & & toRestClockPointDTO . getClockTime ( ) ! = null & & endRestClockPointDTO . getClockTime ( ) ! = null ) {
if ( toRestClockPointDTO ! = null & & endRestClockPointDTO ! = null & & toRestClockPointDTO . getClockTime ( ) ! = null ) {
String toRestClassTime = toRestClockPointDTO . getClassTime ( ) ;
String endRestClassTime = endRestClockPointDTO . getClassTime ( ) ;
Map < ClockPointEnum , Map < String , Object > > toRestNearestClcokInTime = Utils . getNearestClcokInTimeCmd ( DateUtil . beforeMinutes ( dtkssj , dtzddxfz ) , clockInTimeList ) ;
@ -881,6 +881,34 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
ClockPointEnum endResttimeType = getStartClassTimeType ( endRestSchedule . get ( 0 ) , ksdkNearestClcokInTime , endRestClockPointDTO . getElasticTime ( ) , endRestClockPointDTO . getElasticTime ( ) ) ;
endRestClockPointDTO . setClockTime ( ksdkNearestClcokInTime . get ( endResttimeType ) ) ;
endRestClockPointDTO . setTimeType ( endResttimeType ) ;
if ( endRestClockPointDTO . getTimeType ( ) = = ClockPointEnum . EMPTY | | endRestClockPointDTO . getClockTime ( ) = = null ) {
//当弹性结束未匹配到打卡,弹性失效,进行还原
restSchedule . put ( "dtkssj" , toRestClockPointDTO . getClassTime ( ) . split ( " " ) [ 1 ] ) ;
restSchedule . put ( "dtjssj" , endRestClockPointDTO . getClassTime ( ) . split ( " " ) [ 1 ] ) ;
//重新设置打卡时间
toRestIndex = needClockDateList . indexOf ( toRestClockPointDTO . getElasticTime ( ) ) ;
needClockDateList . remove ( toRestIndex ) ;
needClockDateList . add ( toRestIndex , toRestClockPointDTO . getClassTime ( ) ) ;
endRestIndex = needClockDateList . indexOf ( endRestClockPointDTO . getElasticTime ( ) ) ;
needClockDateList . remove ( endRestIndex ) ;
needClockDateList . add ( endRestIndex , endRestClockPointDTO . getClassTime ( ) ) ;
if ( toRestClockPointDTO . getClockTime ( ) ! = null ) {
String time = toRestClockPointDTO . getClockTime ( ) . get ( "signdate" ) + " " + toRestClockPointDTO . getClockTime ( ) . get ( "signtime" ) ;
if ( DateUtil . getTime ( time ) . compareTo ( DateUtil . getTime ( toRestClockPointDTO . getClassTime ( ) ) ) > 0 ) {
toRestClockPointDTO . setTimeType ( ClockPointEnum . AFTER ) ;
} else if ( DateUtil . getTime ( time ) . compareTo ( DateUtil . getTime ( toRestClockPointDTO . getClassTime ( ) ) ) = = 0 ) {
toRestClockPointDTO . setTimeType ( ClockPointEnum . EQUAL ) ;
} else {
toRestClockPointDTO . setTimeType ( ClockPointEnum . BEFORE ) ;
}
}
toRestClockPointDTO . setElasticTime ( null ) ;
endRestClockPointDTO . setElasticTime ( null ) ;
}
}
}