@ -161,6 +161,7 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic
String leaveMode = Util . null2String ( mainTableData . get ( "cxjqj" ) ) ;
String leaveType = Util . null2String ( mainTableData . get ( "jqlx" ) ) ;
String leaveDuration = Util . null2String ( mainTableData . get ( "qjsc" ) ) ;
String dailyRepeat = Util . null2String ( mainTableData . get ( "mtcfsdjq" ) ) ;
//获取请假日期集合
List < String > leaveDateList = DateUtil . getDatesBetween ( startDate , endDate ) ;
//已编辑内容中的假期额度使用信息
@ -219,8 +220,14 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic
Map < String , List < Map < String , Object > > > scheduleInfoMap = ( removeNonWorkDayRange | | removeNonWorkTimeRange ) ? getScheduleInfoWithEmpId ( leaveEmpIdList , DateUtil . beforeDay ( startDate , 1 ) , DateUtil . AfterDay ( endDate , 1 ) ) : new HashMap < > ( ) ;
//收集未关联假期余额的请假明细数据
List < Map < String , String > > simpleLeaveDetailList = createSimpleLeaveDetailList ( leaveEmpIdList , leaveDateList , removeNonWorkDayRange , scheduleInfoMap ,
restDayInfo , leaveMode , startTime , endTime , leaveDuration , countBdlxList ) ;
List < Map < String , String > > simpleLeaveDetailList ;
if ( leaveMode . equals ( AskAndEvctionWayEnum . TIME_INTERVAL . getKey ( ) ) & & ! "1" . equals ( dailyRepeat ) ) {
simpleLeaveDetailList = createSimpleLeaveDetailListWithNoDaily ( leaveEmpIdList , leaveDateList , removeNonWorkDayRange , scheduleInfoMap ,
restDayInfo , startDate , endDate , startTime , endTime , countBdlxList ) ;
} else {
simpleLeaveDetailList = createSimpleLeaveDetailList ( leaveEmpIdList , leaveDateList , removeNonWorkDayRange , scheduleInfoMap ,
restDayInfo , leaveMode , startTime , endTime , leaveDuration , countBdlxList ) ;
}
//收集已关联假期余额的请假明细数据
List < Map < String , String > > completeLeaveDetailList = new ArrayList < > ( ) ;
//按照人员id分组处理请假明细信息, 关联假期余额数据
@ -337,16 +344,13 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic
String startTime , String endTime , String leaveDuration , List < String > countBdlxList ) {
List < Map < String , String > > simpleLeaveDetailList = new ArrayList < > ( ) ;
Map < String , String > simpleLeaveDetailItem ;
//实际需要请假的日期集合
List < String > realLeaveDateList ;
for ( String leaveEmpId : leaveEmpIdList ) {
//需要自动移除日期区间内的休息日时,去除请假日期区间中的休息日
List < Map < String , Object > > scheduleInfoList = scheduleInfoMap . get ( leaveEmpId ) ;
Map < String , String > dateToBcxxMap = scheduleInfoList = = null ? new HashMap < > ( )
: scheduleInfoList . stream ( ) . collect ( Collectors . toMap ( e - > Util . null2String ( e . get ( "bcrq" ) ) , e - > Util . null2String ( e . get ( "bcxx" ) ) ) ) ;
Map < String , String > dateToHxbzMap = scheduleInfoList = = null ? new HashMap < > ( )
: scheduleInfoList . stream ( ) . collect ( Collectors . toMap ( e - > Util . null2String ( e . get ( "bcrq" ) ) , e - > Util . null2String ( e . get ( "hxbz" ) ) ) ) ;
List < Map < String , Object > > scheduleInfoList = scheduleInfoMap . getOrDefault ( leaveEmpId , new ArrayList < > ( ) ) ;
Map < String , String > dateToBcxxMap = scheduleInfoList . stream ( ) . collect ( Collectors . toMap ( e - > Util . null2String ( e . get ( "bcrq" ) ) , e - > Util . null2String ( e . get ( "bcxx" ) ) ) ) ;
List < String > restDateList = new ArrayList < > ( ) ;
if ( removeNonWorkDayRange ) {
//排班结果中休息的日期
List < String > restDateListFromSchedule = scheduleInfoList . stream ( )
@ -357,15 +361,12 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic
//排班结果中未出现的日期
List < String > nonSetDateListFromSchedule = leaveDateList . stream ( ) . filter ( f - > ! allDateListFromSchedule . contains ( f ) ) . collect ( Collectors . toList ( ) ) ;
//企业日历中人员对应日期的休息日
List< String > restDateList = restDayInfo . get ( leaveEmpId ) ;
restDateList = restDayInfo . get ( leaveEmpId ) ;
//筛选排班信息无法辨别的日期,依靠企业日历的日期信息
restDateList = restDateList . stream ( ) . filter ( nonSetDateListFromSchedule : : contains ) . collect ( Collectors . toList ( ) ) ;
List < String > finalRestDateList = restDateList ;
realLeaveDateList = leaveDateList . stream ( ) . filter ( f - > ! finalRestDateList . contains ( f ) & & ! restDateListFromSchedule . contains ( f ) ) . collect ( Collectors . toList ( ) ) ;
} else {
realLeaveDateList = leaveDateList ;
restDateList . addAll ( restDateListFromSchedule ) ;
}
for ( String leaveDate : rea lL eaveDateList) {
for ( String leaveDate : leaveDateList ) {
//请假方式为“指定时间区间”时
if ( leaveMode . equals ( AskAndEvctionWayEnum . TIME_INTERVAL . getKey ( ) ) ) {
simpleLeaveDetailItem = new HashMap < > ( ) ;
@ -376,15 +377,13 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic
simpleLeaveDetailItem . put ( "kssj" , startTime ) ;
simpleLeaveDetailItem . put ( "jssj" , endTime ) ;
//获取当天班次id
String currentDayBcId = Util . null2String ( dateToBcxxMap . get ( leaveDate ) ) . split ( "-" ) [ 0 ] ;
boolean currentDayHxbz = ! "" . equals ( Util . null2String ( dateToHxbzMap . get ( leaveDate ) ) ) ;
String currentDayBcId = restDateList . contains ( leaveDate ) ? "" : Util . null2String ( dateToBcxxMap . get ( leaveDate ) ) . split ( "-" ) [ 0 ] ;
//获取前一天班次id
String yesterday = DateUtil . beforeDay ( leaveDate , 1 ) ;
String yesterdayBcId = Util. null2String ( dateToBcxxMap . get ( DateUtil. beforeDay ( leaveDate , 1 ) ) ) . split ( "-" ) [ 0 ] ;
String yesterdayBcId = restDateList. contains ( yesterday ) ? "" : Util. null2String ( dateToBcxxMap . get ( yesterday ) ) . split ( "-" ) [ 0 ] ;
//获取次日班次id
String nextDay = DateUtil . AfterDay ( leaveDate , 1 ) ;
String nextDayBcId = Util . null2String ( dateToBcxxMap . get ( nextDay ) ) . split ( "-" ) [ 0 ] ;
boolean nextDayHxbz = ! "" . equals ( Util . null2String ( dateToHxbzMap . get ( nextDay ) ) ) ;
String nextDayBcId = restDateList . contains ( nextDay ) ? "" : Util . null2String ( dateToBcxxMap . get ( nextDay ) ) . split ( "-" ) [ 0 ] ;
String sql = "" ;
List < Map < String , Object > > bcDetailData ;
@ -395,64 +394,41 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic
endDate = nextDay ;
simpleLeaveDetailItem . put ( "jsrq" , nextDay ) ;
}
String toDealStartTime = startTime ;
if ( ! "" . equals ( yesterdayBcId ) ) {
sql = "select id, bdlx, gsrq, kssj as dtkssj, jssj as dtjssj from uf_jcl_kq_bcxx_dt1 where mainid = " + yesterdayBcId + " order by gsrq desc, kssj desc" ;
sql = "select id, bdlx, gsrq, kssj as dtkssj, jssj as dtjssj from uf_jcl_kq_bcxx_dt1 where mainid = " + yesterdayBcId ;
bcDetailData = DbTools . getSqlToList ( sql ) ;
bcDetailData = bcDetailData . stream ( ) . filter ( e - > countBdlxList . contains ( Util . null2String ( e . get ( "bdlx" ) ) ) ) . collect ( Collectors . toList ( ) ) ;
//获取需要累计的班段时长区间和请假区间存在交集的分钟数
scMinutes = Utils . removeTime ( leaveDate + " " + startTime , endDate + " " + endTime , bcDetailData , yesterday ) ;
//更新可匹配请假时长开始时间
String gsrq = Util . null2String ( bcDetailData . get ( 0 ) . get ( "gsrq" ) ) ;
toDealStartTime = "2" . equals ( gsrq ) & & startTime . compareTo ( Util . null2String ( bcDetailData . get ( 0 ) . get ( "dtjssj" ) ) ) < 0
? Util . null2String ( bcDetailData . get ( 0 ) . get ( "dtjssj" ) ) : startTime ;
}
if ( ! "" . equals ( currentDayBcId ) ) {
sql = "select id, bdlx, gsrq, kssj as dtkssj, jssj as dtjssj from uf_jcl_kq_bcxx_dt1 where mainid = " + currentDayBcId + " order by gsrq desc, kssj desc" ;
sql = "select id, bdlx, gsrq, kssj as dtkssj, jssj as dtjssj from uf_jcl_kq_bcxx_dt1 where mainid = " + currentDayBcId ;
bcDetailData = DbTools . getSqlToList ( sql ) ;
bcDetailData = bcDetailData . stream ( ) . filter ( e - > countBdlxList . contains ( Util . null2String ( e . get ( "bdlx" ) ) ) ) . collect ( Collectors . toList ( ) ) ;
//获取需要累计的班段时长区间和请假区间存在交集的分钟数
scMinutes = scMinutes + Utils . removeTime ( leaveDate + " " + toDealStartTime , endDate + " " + endTime , bcDetailData , leaveDate ) ;
//更新可匹配请假时长开始时间
String gsrq = Util . null2String ( bcDetailData . get ( 0 ) . get ( "gsrq" ) ) ;
if ( "2" . equals ( gsrq ) ) {
leaveDate = nextDay ;
toDealStartTime = Util . null2String ( bcDetailData . get ( 0 ) . get ( "dtjssj" ) ) ;
} else if ( "1" . equals ( gsrq ) ) {
toDealStartTime = toDealStartTime . compareTo ( Util . null2String ( bcDetailData . get ( 0 ) . get ( "dtjssj" ) ) ) < 0
? Util . null2String ( bcDetailData . get ( 0 ) . get ( "dtjssj" ) ) : toDealStartTime ;
}
} else if ( currentDayHxbz ) {
scMinutes = scMinutes + DateUtil . getBetWeenMinutes ( leaveDate + " " + toDealStartTime , nextDay + " " + "00:00" ) ;
scMinutes = scMinutes + Utils . removeTime ( leaveDate + " " + startTime , endDate + " " + endTime , bcDetailData , leaveDate ) ;
}
if ( ! "" . equals ( nextDayBcId ) ) {
sql = "select id, bdlx, gsrq, kssj as dtkssj, jssj as dtjssj from uf_jcl_kq_bcxx_dt1 where mainid = " + nextDayBcId + " order by gsrq desc, kssj desc" ;
sql = "select id, bdlx, gsrq, kssj as dtkssj, jssj as dtjssj from uf_jcl_kq_bcxx_dt1 where mainid = " + nextDayBcId ;
bcDetailData = DbTools . getSqlToList ( sql ) ;
bcDetailData = bcDetailData . stream ( ) . filter ( e - > countBdlxList . contains ( Util . null2String ( e . get ( "bdlx" ) ) ) ) . collect ( Collectors . toList ( ) ) ;
//获取需要累计的班段时长区间和请假区间存在交集的分钟数
scMinutes = scMinutes + Utils . removeTime ( leaveDate + " " + toDealStartTime , endDate + " " + endTime , bcDetailData , nextDay ) ;
} else if ( nextDayHxbz ) {
if ( "" . equals ( currentDayBcId ) ) {
scMinutes = scMinutes + DateUtil . getBetWeenMinutes ( nextDay + " " + "00:00" , nextDay + " " + endTime ) ;
} else {
int nextDayMinutes = leaveDate . compareTo ( nextDay ) > = 0 ? DateUtil . getBetWeenMinutes ( leaveDate + " " + toDealStartTime , nextDay + " " + endTime )
: DateUtil . getBetWeenMinutes ( nextDay + " " + "00:00" , nextDay + " " + endTime ) ;
scMinutes = scMinutes + Math . max ( nextDayMinutes , 0 ) ;
}
scMinutes = scMinutes + Utils . removeTime ( leaveDate + " " + startTime , endDate + " " + endTime , bcDetailData , nextDay ) ;
}
//增加加班计划中的数据,加班计划明细中的数据作为“加班计划”班段类型数据的补充
if ( countBdlxList . contains ( ClassSegmentTypeEnum . OVERTIME_PLAN . getKey ( ) ) ) {
sql = "select b.jbry,b.ksrq,b.kssj,b.jblx,b.jsrq,b.jssj,b.jbsc,b.gsrq from uf_jcl_kq_jbjh a left join uf_jcl_kq_jbjh_dt1 b on a.id=b.mainid where b.jbry =? and b.ksrq>=? and b.jsrq<=? and (b.jbcx=0 or b.jbcx is null) and a.jlzt=1" ;
List < Map < String , Object > > overtimePlanList = DbTools . getSqlToList ( sql , leaveEmpId , leaveDate, leaveDate ) ;
List < Map < String , Object > > overtimePlanList = DbTools . getSqlToList ( sql , leaveEmpId , DateUtil . beforeDay ( leaveDate , 1 ) , DateUtil . AfterDay ( endDate , 1 ) ) ;
int scMinutesInOvertimePlan = Utils . removeTimeWithOvertimePlan ( leaveDate + " " + startTime , endDate + " " + endTime , overtimePlanList ) ;
scMinutes = scMinutes + scMinutesInOvertimePlan ;
}
//组装初步的请假时长
simpleLeaveDetailItem . put ( "qjsc" , String . format ( "%.2f" , scMinutes / 60.0 ) ) ;
simpleLeaveDetailList . add ( simpleLeaveDetailItem ) ;
} else if ( leaveMode . equals ( AskAndEvctionWayEnum . HOUR . getKey ( ) ) ) {
if ( scMinutes > 0 ) {
simpleLeaveDetailList . add ( simpleLeaveDetailItem ) ;
}
} else if ( leaveMode . equals ( AskAndEvctionWayEnum . HOUR . getKey ( ) ) & & ! restDateList . contains ( leaveDate ) ) {
simpleLeaveDetailItem = new HashMap < > ( ) ;
//组装初步的请假明细数据
simpleLeaveDetailItem . put ( "qjr" , leaveEmpId ) ;
@ -460,7 +436,7 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic
simpleLeaveDetailItem . put ( "jsrq" , leaveDate ) ;
simpleLeaveDetailItem . put ( "qjsc" , leaveDuration ) ;
simpleLeaveDetailList . add ( simpleLeaveDetailItem ) ;
} else if ( leaveMode . equals ( AskAndEvctionWayEnum . ALLDAY . getKey ( ) ) ) {
} else if ( leaveMode . equals ( AskAndEvctionWayEnum . ALLDAY . getKey ( ) ) & & ! restDateList . contains ( leaveDate ) ) {
simpleLeaveDetailItem = new HashMap < > ( ) ;
//组装初步的请假明细数据
simpleLeaveDetailItem . put ( "qjr" , leaveEmpId ) ;
@ -468,7 +444,7 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic
simpleLeaveDetailItem . put ( "jsrq" , leaveDate ) ;
simpleLeaveDetailItem . put ( "qtj" , "1" ) ;
simpleLeaveDetailList . add ( simpleLeaveDetailItem ) ;
} else if ( leaveMode . equals ( AskAndEvctionWayEnum . HALFDAY . getKey ( ) ) ) {
} else if ( leaveMode . equals ( AskAndEvctionWayEnum . HALFDAY . getKey ( ) ) & & ! restDateList . contains ( leaveDate ) ) {
simpleLeaveDetailItem = new HashMap < > ( ) ;
//组装初步的请假明细数据
simpleLeaveDetailItem . put ( "qjr" , leaveEmpId ) ;
@ -482,6 +458,83 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic
return simpleLeaveDetailList ;
}
/ * *
* @param leaveEmpIdList 请 假 人 员 id 集 合
* @param leaveDateList 请 假 日 期 集 合
* @param removeNonWorkDayRange 是 否 移 除 非 工 作 日 时 长
* @param scheduleInfoMap 排 班 信 息
* @param restDayInfo 休 息 日 信 息
* @param startDate 开 始 日 期
* @param endDate 结 束 日 期
* @param startTime 开 始 时 间
* @param endTime 结 束 时 间
* @param countBdlxList 收 集 需 要 统 计 时 长 的 班 段 类 型
* @return 组 装 初 步 的 请 假 明 细 , 这 边 只 处 理 “ 每 天 重 复 时 段 请 假 ” 未 勾 选 , 且 请 假 方 式 为 “ 指 定 时 间 区 间 ”
* /
private List < Map < String , String > > createSimpleLeaveDetailListWithNoDaily ( List < String > leaveEmpIdList , List < String > leaveDateList , boolean removeNonWorkDayRange ,
Map < String , List < Map < String , Object > > > scheduleInfoMap , Map < String , List < String > > restDayInfo ,
String startDate , String endDate , String startTime , String endTime , List < String > countBdlxList ) {
List < Map < String , String > > simpleLeaveDetailList = new ArrayList < > ( ) ;
Map < String , String > simpleLeaveDetailItem ;
String sql = "" ;
List < Map < String , Object > > bcDetailData ;
String targetDateBcId = "" ;
int scMinutes = 0 ;
leaveDateList . add ( 0 , DateUtil . beforeDay ( startDate , 1 ) ) ;
leaveDateList . add ( DateUtil . AfterDay ( endDate , 1 ) ) ;
for ( String leaveEmpId : leaveEmpIdList ) {
//需要自动移除日期区间内的休息日时,去除请假日期区间中的休息日
List < Map < String , Object > > scheduleInfoList = scheduleInfoMap . getOrDefault ( leaveEmpId , new ArrayList < > ( ) ) ;
Map < String , String > dateToBcxxMap = scheduleInfoList . stream ( ) . collect ( Collectors . toMap ( e - > Util . null2String ( e . get ( "bcrq" ) ) , e - > Util . null2String ( e . get ( "bcxx" ) ) ) ) ;
List < String > restDateList = new ArrayList < > ( ) ;
if ( removeNonWorkDayRange ) {
//排班结果中休息的日期
List < String > restDateListFromSchedule = scheduleInfoList . stream ( )
. filter ( f - > Util . null2String ( f . get ( "sfxx" ) ) . equals ( CheckBoxEnum . CHECKED . getKey ( ) ) )
. map ( e - > Util . null2String ( e . get ( "bcrq" ) ) )
. collect ( Collectors . toList ( ) ) ;
List < String > allDateListFromSchedule = scheduleInfoList . stream ( ) . map ( e - > Util . null2String ( e . get ( "bcrq" ) ) ) . collect ( Collectors . toList ( ) ) ;
//排班结果中未出现的日期
List < String > nonSetDateListFromSchedule = leaveDateList . stream ( ) . filter ( f - > ! allDateListFromSchedule . contains ( f ) ) . collect ( Collectors . toList ( ) ) ;
//企业日历中人员对应日期的休息日
restDateList = restDayInfo . get ( leaveEmpId ) ;
//筛选排班信息无法辨别的日期,依靠企业日历的日期信息
restDateList = restDateList . stream ( ) . filter ( nonSetDateListFromSchedule : : contains ) . collect ( Collectors . toList ( ) ) ;
restDateList . addAll ( restDateListFromSchedule ) ;
}
simpleLeaveDetailItem = new HashMap < > ( ) ;
//组装初步的请假明细数据
simpleLeaveDetailItem . put ( "qjr" , leaveEmpId ) ;
simpleLeaveDetailItem . put ( "ksrq" , startDate ) ;
simpleLeaveDetailItem . put ( "jsrq" , endDate ) ;
simpleLeaveDetailItem . put ( "kssj" , startTime ) ;
simpleLeaveDetailItem . put ( "jssj" , endTime ) ;
for ( String date : leaveDateList ) {
targetDateBcId = restDateList . contains ( date ) ? "" : Util . null2String ( dateToBcxxMap . get ( date ) ) . split ( "-" ) [ 0 ] ;
if ( ! "" . equals ( targetDateBcId ) ) {
sql = "select id, bdlx, gsrq, kssj as dtkssj, jssj as dtjssj from uf_jcl_kq_bcxx_dt1 where mainid = " + targetDateBcId ;
bcDetailData = DbTools . getSqlToList ( sql ) ;
bcDetailData = bcDetailData . stream ( ) . filter ( e - > countBdlxList . contains ( Util . null2String ( e . get ( "bdlx" ) ) ) ) . collect ( Collectors . toList ( ) ) ;
//获取需要累计的班段时长区间和请假区间存在交集的分钟数
scMinutes = scMinutes + Utils . removeTime ( startDate + " " + startTime , endDate + " " + endTime , bcDetailData , date ) ;
}
}
//增加加班计划中的数据,加班计划明细中的数据作为“加班计划”班段类型数据的补充
if ( countBdlxList . contains ( ClassSegmentTypeEnum . OVERTIME_PLAN . getKey ( ) ) ) {
sql = "select b.jbry,b.ksrq,b.kssj,b.jblx,b.jsrq,b.jssj,b.jbsc,b.gsrq from uf_jcl_kq_jbjh a left join uf_jcl_kq_jbjh_dt1 b on a.id=b.mainid where b.jbry =? and b.ksrq>=? and b.jsrq<=? and (b.jbcx=0 or b.jbcx is null) and a.jlzt=1" ;
List < Map < String , Object > > overtimePlanList = DbTools . getSqlToList ( sql , leaveEmpId , DateUtil . beforeDay ( startDate , 1 ) , DateUtil . AfterDay ( endDate , 1 ) ) ;
int scMinutesInOvertimePlan = Utils . removeTimeWithOvertimePlan ( startDate + " " + startTime , endDate + " " + endTime , overtimePlanList ) ;
scMinutes = scMinutes + scMinutesInOvertimePlan ;
}
//组装初步的请假时长
simpleLeaveDetailItem . put ( "qjsc" , String . format ( "%.2f" , scMinutes / 60.0 ) ) ;
if ( scMinutes > 0 ) {
simpleLeaveDetailList . add ( simpleLeaveDetailItem ) ;
}
}
return simpleLeaveDetailList ;
}
/ * *
* @param qjry 请 假 人 员 id
* @param detailTableData 请 假 明 细
@ -534,7 +587,7 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic
* @param canUseCheckJqyeInfo 勾 选 的 假 期 类 型 可 使 用 的 假 期 余 额 信 息
* @param canUseFirstJqyeInfo 优 先 使 用 的 假 期 类 型 可 使 用 的 假 期 余 额 信 息
* @param editedUseJqed 触 发 接 口 前 已 编 辑 的 假 期 额 度 使 用 信 息
* @param editedUseJqlxWithEmp 触 发 接 口 前 已 编 辑 的 假 期 类 型 id_ 人 员 id 条 件 下 已 使 用 的 时 长
* @param editedUseJqlxWithEmp 触 发 接 口 前 , 本 次 提 交 的 日 期 集 合 中 已 编 辑 的 假 期 类 型 id_ 人 员 id 条 件 下 已 使 用 的 时 长
* @param leaveDetailList 请 假 明 细 集 合
* @param checkItemId 勾 选 的 假 期 类 型 id
* @param firstItemId 优 先 使 用 的 假 期 类 型 id
@ -566,12 +619,14 @@ public class AskForLeaveServiceImpl extends Service implements AskForLeaveServic
totalLeaveDuration = totalLeaveDuration + leaveDuration ;
}
//减去编辑已使用时长
Double checkItemEditedUseSc = editedUseJqlxWithEmp . get ( checkItemId + "_" + empId ) ;
Double firstItemEditedUseSc = editedUseJqlxWithEmp . get ( firstItemId + "_" + empId ) ;
totalLeaveDuration = Utils . subtract ( totalLeaveDuration , checkItemEditedUseSc = = null ? 0 : checkItemEditedUseSc ) ;
totalLeaveDuration = Utils . subtract ( totalLeaveDuration , firstItemEditedUseSc = = null ? 0 : firstItemEditedUseSc ) ;
//如果总时长为0, 则退出
if ( totalLeaveDuration < = 0 ) {
Double checkItemEditedUseSc = editedUseJqlxWithEmp . getOrDefault ( checkItemId + "_" + empId , ( double ) 0 ) ;
Double firstItemEditedUseSc = editedUseJqlxWithEmp . getOrDefault ( firstItemId + "_" + empId , ( double ) 0 ) ;
// totalLeaveDuration = Utils.subtract(totalLeaveDuration, checkItemEditedUseSc == null ? 0 : checkItemEditedUseSc);
// totalLeaveDuration = Utils.subtract(totalLeaveDuration, firstItemEditedUseSc == null ? 0 : firstItemEditedUseSc);
// //如果总时长为0, 则退出
if ( Utils . add ( checkItemEditedUseSc , firstItemEditedUseSc ) > 0 ) {
String message = empName + "在该请假类型的本次请假日期范围内,已存在开始日期相同的请假明细,请重新选择日期范围!" ;
errorMessage . add ( message ) ;
return result ;
}
Map < String , Double > leaveDurationMap = new HashMap < > ( ) ;