diff --git a/src/com/engine/jucailinkq/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java b/src/com/engine/jucailinkq/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java index 6621b24..34f8732 100644 --- a/src/com/engine/jucailinkq/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java +++ b/src/com/engine/jucailinkq/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java @@ -605,6 +605,12 @@ public class GetClockInPointCmd extends AbstractCommonCommand paramMap = ParamUtil.request2Map(request); // Map paramMap = Maps.newHashMap(); -// paramMap.put("startDate","2024-09-16"); -// paramMap.put("endDate","2024-09-16"); -// paramMap.put("userIds","23"); +// paramMap.put("startDate","2024-10-18"); +// paramMap.put("endDate","2024-10-18"); +// paramMap.put("userIds","22"); String startDate = Util.null2String(paramMap.get("startDate")); String startBeforeDate = DateUtil.beforeDay(startDate,2); diff --git a/src/com/engine/jucailinkq/attendance/vacation/cmd/VocationCmd.java b/src/com/engine/jucailinkq/attendance/vacation/cmd/VocationCmd.java index d3245b0..070bfa1 100644 --- a/src/com/engine/jucailinkq/attendance/vacation/cmd/VocationCmd.java +++ b/src/com/engine/jucailinkq/attendance/vacation/cmd/VocationCmd.java @@ -44,6 +44,7 @@ public class VocationCmd extends AbstractCommonCommand> { String ljcrglyfslwz = Util.null2String(vocation.get("ljcrglyfslwz")); String lsgldw = Util.null2String(vocation.get("lsgldw")); String jzrqzd = Util.null2String(vocation.get("jzrqzd")); + String jgsc = Util.null2String(vocation.get("jgsc")); String qsrqValue = Util.null2String(userMap.get(qsrq)); String yjzdValue = Util.null2String(userMap.get(yjzd)); String ljcrglyfslwzValue = Util.null2String(userMap.get(ljcrglyfslwz)); @@ -85,10 +86,15 @@ public class VocationCmd extends AbstractCommonCommand> { vocation.put("qsrqValue",qsrqValue); vocation.put("yjzdValue",yjzdValue); vocation.put("ljcrglyfslwzValue",ljcrglyfslwzValue); - if (!"".equals(lsgldw) && !"".equals(ljcrglyfslwzValue) && "0".equals(lsgldw)){ + if (!"".equals(lsgldw) && !"".equals(ljcrglyfslwzValue) && "0".equals(lsgldw) && !"0".equals(jgsc)){ //当累计单位为年时 vocation.put("ljcrglyfslwzValue",Math.round(Double.valueOf(ljcrglyfslwzValue)*12)); } + if ("0".equals(jgsc)){ + //起算日期与当前日期间隔不取 + vocation.put("ljcrglyfslwzValue","0"); + } + vocation.put("zyzValue",getUserIds(vocation)); } log.debug("VocationCmd params: [{}]",params); diff --git a/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/ByIntervalPayMentWay.java b/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/ByIntervalPayMentWay.java index 612884c..1214126 100644 --- a/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/ByIntervalPayMentWay.java +++ b/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/ByIntervalPayMentWay.java @@ -64,6 +64,8 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{ String wscl = Util.null2String(vocationList.get(0).get("wscl")); //首次获得额度控制生效日期 String schdedkzsxrq = Util.null2String(vocationList.get(0).get("schdedkzsxrq")); + //间隔时长算法 + String jgscsf = Util.null2String(vocationList.get(0).get("jgsc")); if ("".equals(qsrq)){ return Maps.newHashMap(); @@ -143,6 +145,11 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{ int betweenYear = DateUtil.getBetWeenYears(qsrq,releaseDate.split(" ")[0]); allMonths = Double.valueOf(ljcrglyfslwz).intValue(); int intervalYear = allMonths / 12+betweenYear; + if (jgscsf.equals("2")){ + //直接取工龄 + intervalYear = allMonths / 12; + } + Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, intervalYear, yjzd,userId); double edktsc = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0; int days = 0; @@ -168,6 +175,9 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{ betweenMonth = DateUtil.getBetWeenMonths(qsrq,sxrq); allMonths = betweenMonth+Double.valueOf(ljcrglyfslwz).intValue(); + if (jgscsf.equals("2")){ + allMonths = Double.valueOf(ljcrglyfslwz).intValue(); + } Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd,userId); int days = DateUtil.getBetWeenDays(sxrq,releaseDate.split(" ")[0])+1; if (days <0){ @@ -188,6 +198,9 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{ betweenMonth = DateUtil.getBetWeenMonths(qsrq,sxrq); allMonths = betweenMonth+Double.valueOf(ljcrglyfslwz).intValue(); + if (jgscsf.equals("2")){ + allMonths = Double.valueOf(ljcrglyfslwz).intValue(); + } Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd,userId); double edktsc = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0; @@ -199,7 +212,7 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{ restTime = VocationCommonUtil.computeRestDays(days, monthDays, edktsc, wscl); } else if (edyxq.equals(StartingUnitEnum.NATURAL_WEEK.getKey())){ - //起自然周 + //自然周 int dayOfWeek = TimeUtil.getDayOfWeek(releaseDate); if (dayOfWeek == 0){ dayOfWeek = 7; @@ -216,6 +229,9 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{ betweenDays = 0; } allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays; + if (jgscsf.equals("2")){ + allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30; + } Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd,userId); double edktsc = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0; @@ -243,6 +259,9 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{ betweenDays=0; } allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays; + if (jgscsf.equals("2")){ + allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30; + } Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd,userId); int days = DateUtil.getBetWeenDays(sxrq,releaseDate.split(" ")[0])+1; if (days <0){ @@ -256,6 +275,9 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{ //自然天 betweenDays = DateUtil.getBetWeenDays(qsrq,sxrq)+1; allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays; + if (jgscsf.equals("2")){ + allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30; + } Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays, yjzd,userId); restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0; } @@ -292,6 +314,8 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{ int dqtqffts = Integer.valueOf(Util.null2String(vocationList.get(0).get("dqtqffts"))); //执行发放的时间点 String ffdtffsj = Util.null2String(vocationList.get(0).get("ffdtffsj")); + //间隔时长算法 + String jgscsf = Util.null2String(vocationList.get(0).get("jgsc")); int seniority = "".equals(ljcrglyfslwz)?0:Double.valueOf(ljcrglyfslwz).intValue(); @@ -319,14 +343,29 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{ endYearMonth = endYearMonth+seniority; int beginYear = beginYearMonth/12; int endYear = endYearMonth/12; - Map beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId); - Map endYearmap = VocationCommonUtil.getVocationMap(vocationList, endYear, yjzd,userId); - double beginEdktsc = Double.valueOf(beginYearmap.get("edktsc") == null? "0" :Util.null2String(beginYearmap.get("edktsc"))); - double endEdktsc = Double.valueOf(endYearmap.get("edktsc") == null? "0" :Util.null2String(endYearmap.get("edktsc"))); //残年分割日期 String divideTime = DateUtil.beforeMonth(qsrq,seniority); divideTime = sxrq.split("-")[0]+"-"+divideTime.split("-")[1]+"-"+divideTime.split("-")[2]; + if (jgscsf.equals("2")){ + //直接取工龄字段 + beginYear = seniority/12; + endYear = beginYear+1; + + //分割日期 + int month = DateUtil.getBetWeenMonths(qsrq,sxrq); + if (month < 0){ + month = 0; + } + int historySeniority = seniority-month; + divideTime = DateUtil.beforeMonth(qsrq,historySeniority); + divideTime = sxrq.split("-")[0]+"-"+divideTime.split("-")[1]+"-"+divideTime.split("-")[2]; + } + + Map beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId); + Map endYearmap = VocationCommonUtil.getVocationMap(vocationList, endYear, yjzd,userId); + double beginEdktsc = Double.valueOf(beginYearmap.get("edktsc") == null? "0" :Util.null2String(beginYearmap.get("edktsc"))); + double endEdktsc = Double.valueOf(endYearmap.get("edktsc") == null? "0" :Util.null2String(endYearmap.get("edktsc"))); //当前后额定可休时长一样时,代表没有残年情况 if (beginEdktsc == endEdktsc){ @@ -381,6 +420,10 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{ } beginYearMonth = beginYearMonth+seniority; int beginYear = beginYearMonth/12; + if (jgscsf.equals("2")){ + //直接取工龄字段 + beginYear = seniority/12; + } Map beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId); double beginEdktsc = Double.valueOf(beginYearmap.get("edktsc") == null? "0" :Util.null2String(beginYearmap.get("edktsc"))); int days = 0; diff --git a/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/BySchedulePaymentWay.java b/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/BySchedulePaymentWay.java index 7667326..9ebc086 100644 --- a/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/BySchedulePaymentWay.java +++ b/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/BySchedulePaymentWay.java @@ -65,6 +65,8 @@ public class BySchedulePaymentWay implements HolidayGenerationWay{ String wscl = Util.null2String(vocationList.get(0).get("wscl")); //首次获得额度控制生效日期 String schdedkzsxrq = Util.null2String(vocationList.get(0).get("schdedkzsxrq")); + //间隔时长算法 + String jgscsf = Util.null2String(vocationList.get(0).get("jgsc")); if ("".equals(qsrq)){ return Maps.newHashMap(); @@ -159,6 +161,9 @@ public class BySchedulePaymentWay implements HolidayGenerationWay{ } }else if (edyxq.equals(StartingUnitEnum.STARTING_YEAR.getKey())){ int betweenYear = DateUtil.getBetWeenYears(qsrq,releaseDate.split(" ")[0]); + if (jgscsf.equals("2")){ + betweenYear = Double.valueOf(ljcrglyfslwz).intValue() / 12; + } Map vocationMap = VocationCommonUtil.getVocationMap(vocationList,betweenYear,yjzd,userId); int occurMonths = DateUtil.getTime(releaseDate).getMonthValue(); int StartMonths = DateUtil.getTime(qsrq).getMonthValue(); @@ -210,6 +215,8 @@ public class BySchedulePaymentWay implements HolidayGenerationWay{ int dqtqffts = Integer.valueOf(Util.null2String(vocationList.get(0).get("dqtqffts"))); //执行发放的时间点 String ffdtffsj = Util.null2String(vocationList.get(0).get("ffdtffsj")); + //间隔时长算法 + String jgscsf = Util.null2String(vocationList.get(0).get("jgsc")); int seniority = "".equals(ljcrglyfslwz)?0:Double.valueOf(ljcrglyfslwz).intValue(); @@ -234,16 +241,32 @@ public class BySchedulePaymentWay implements HolidayGenerationWay{ endYearMonth = endYearMonth+seniority; int beginYear = beginYearMonth/12; int endYear = endYearMonth/12; - int endYearRemainder = endYearMonth%12; - Map beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId); - Map endYearmap = VocationCommonUtil.getVocationMap(vocationList, endYear, yjzd,userId); - double beginEdktsc = Double.valueOf(beginYearmap.get("edktsc") == null? "0" :Util.null2String(beginYearmap.get("edktsc"))); - double endEdktsc = Double.valueOf(endYearmap.get("edktsc") == null? "0" :Util.null2String(endYearmap.get("edktsc"))); //残年分割日期 String divideTime = DateUtil.beforeMonth(qsrq,seniority); divideTime = sxrq.split("-")[0]+"-"+divideTime.split("-")[1]+"-"+divideTime.split("-")[2]; divideTime = DateUtil.nextMonth(divideTime,1,DateUtil.yyyyMM)+"-01"; + if (jgscsf.equals("2")){ + //直接取工龄字段 + beginYear = seniority/12; + endYear = beginYear+1; + + //分割日期 + int month = DateUtil.getBetWeenMonths(qsrq,sxrq); + if (month < 0){ + month = 0; + } + int historySeniority = seniority-month; + divideTime = DateUtil.beforeMonth(qsrq,historySeniority); + divideTime = sxrq.split("-")[0]+"-"+divideTime.split("-")[1]+"-"+divideTime.split("-")[2]; + } + + Map beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId); + Map endYearmap = VocationCommonUtil.getVocationMap(vocationList, endYear, yjzd,userId); + double beginEdktsc = Double.valueOf(beginYearmap.get("edktsc") == null? "0" :Util.null2String(beginYearmap.get("edktsc"))); + double endEdktsc = Double.valueOf(endYearmap.get("edktsc") == null? "0" :Util.null2String(endYearmap.get("edktsc"))); + + int divideTimeMonths = DateUtil.getTime(divideTime).getMonthValue(); if (beginEdktsc == endEdktsc){ @@ -292,6 +315,10 @@ public class BySchedulePaymentWay implements HolidayGenerationWay{ } beginYearMonth = beginYearMonth+seniority; int beginYear = beginYearMonth/12; + if (jgscsf.equals("2")){ + //直接取工龄字段 + beginYear = seniority/12; + } Map beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId); restTime = getRestTime(releaseDateMonths,beginYearmap); } diff --git a/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/SinglePaymentInFullWay.java b/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/SinglePaymentInFullWay.java index cf42304..018fb5d 100644 --- a/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/SinglePaymentInFullWay.java +++ b/src/com/engine/jucailinkq/attendance/vacation/job/holidaygeneration/tactics/SinglePaymentInFullWay.java @@ -54,10 +54,6 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { String dzqsrq = Util.null2String(vocationList.get(0).get("dzqsrq")); //分割日期 String fgrq = Util.null2String(vocationList.get(0).get("fgrq")); - //提前执行发放操作的天数 - String dqtqffts = Util.null2String(vocationList.get(0).get("dqtqffts")); - //执行发放的时间点 - String ffdtffsj = Util.null2String(vocationList.get(0).get("ffdtffsj")); //入职当期额度按比例折算 String rzdqedablzs = Util.null2String(vocationList.get(0).get("rzdqedablzs")); //首次获得额度按比例折算 @@ -70,6 +66,8 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { String wscl = Util.null2String(vocationList.get(0).get("wscl")); //首次获得额度控制生效日期 String schdedkzsxrq = Util.null2String(vocationList.get(0).get("schdedkzsxrq")); + //间隔时长算法 + String jgscsf = Util.null2String(vocationList.get(0).get("jgsc")); if ("".equals(qsrq)){ return Maps.newHashMap(); @@ -128,11 +126,6 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { } insertHoliDayParam.put("sxrq", divideTime); -// dataList = VocationCommonUtil.ifexist("uf_jcl_kq_jqye", insertHoliDayParam); -// //已存在数据且不覆盖 -// if (dataList.size()>0 && !"1".equals(cover)) { -// return insertHoliDayParam; -// } } insertHoliDayParam.put("ktsc", restTime); } else if (allMonths >= 12 && edyxq.equals(StartingUnitEnum.NATURAL_YEAR.getKey())) { @@ -156,6 +149,9 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { //起算年 allMonths = Double.valueOf(ljcrglyfslwz).intValue(); int intervalYear = allMonths / 12+betweenYear; + if (jgscsf.equals("2")){ + intervalYear = allMonths / 12; + } Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, intervalYear, yjzd,userId); restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0; } else if (edyxq.equals(StartingUnitEnum.NATURAL_MONTH.getKey())){ @@ -165,6 +161,10 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { betweenMonth = 0; } allMonths = betweenMonth+Double.valueOf(ljcrglyfslwz).intValue(); + if (jgscsf.equals("2")){ + allMonths = Double.valueOf(ljcrglyfslwz).intValue(); + } + Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd,userId); restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0; @@ -173,6 +173,9 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { //起算月 betweenMonth = DateUtil.getBetWeenMonths(qsrq,sxrq); allMonths = betweenMonth+Double.valueOf(ljcrglyfslwz).intValue(); + if (jgscsf.equals("2")){ + allMonths = Double.valueOf(ljcrglyfslwz).intValue(); + } Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd,userId); restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0; @@ -183,6 +186,9 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { betweenDays = 0; } allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays; + if (jgscsf.equals("2")){ + allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30; + } Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd,userId); restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0; @@ -193,6 +199,9 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { betweenDays=0; } allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays; + if (jgscsf.equals("2")){ + allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30; + } Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd,userId); restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0; @@ -200,6 +209,9 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { //自然天 betweenDays = DateUtil.getBetWeenDays(qsrq,sxrq); allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays; + if (jgscsf.equals("2")){ + allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30; + } Map vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays, yjzd,userId); restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0; } @@ -233,6 +245,8 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { String yjzd = Util.null2String(vocationList.get(0).get("yjzdValue")); //尾数处理 String wscl = Util.null2String(vocationList.get(0).get("wscl")); + //间隔时长算法 + String jgscsf = Util.null2String(vocationList.get(0).get("jgsc")); int seniority = "".equals(ljcrglyfslwz)?0:Double.valueOf(ljcrglyfslwz).intValue(); @@ -248,15 +262,32 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { endYearMonth = endYearMonth+seniority; int beginYear = beginYearMonth/12; int endYear = endYearMonth/12; - int endYearRemainder = endYearMonth%12; + + //残年分割日期 + String divideTime = DateUtil.beforeMonth(qsrq,seniority); + divideTime = sxrq.split("-")[0]+"-"+divideTime.split("-")[1]+"-"+divideTime.split("-")[2]; + if (jgscsf.equals("2")){ + //直接取工龄字段 + beginYear = seniority/12; + endYear = beginYear+1; + + //分割日期 + int month = DateUtil.getBetWeenMonths(qsrq,sxrq); + if (month < 0){ + month = 0; + } + int historySeniority = seniority-month<0?0:seniority-month; + + divideTime = DateUtil.beforeMonth(qsrq,historySeniority); + divideTime = sxrq.split("-")[0]+"-"+divideTime.split("-")[1]+"-"+divideTime.split("-")[2]; + } + + Map beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId); Map endYearmap = VocationCommonUtil.getVocationMap(vocationList, endYear, yjzd,userId); double beginEdktsc = Double.valueOf(beginYearmap.get("edktsc") == null? "0" :Util.null2String(beginYearmap.get("edktsc"))); double endEdktsc = Double.valueOf(endYearmap.get("edktsc") == null? "0" :Util.null2String(endYearmap.get("edktsc"))); - //残年分割日期 - String divideTime = DateUtil.beforeMonth(qsrq,seniority); - divideTime = sxrq.split("-")[0]+"-"+divideTime.split("-")[1]+"-"+divideTime.split("-")[2]; int yearDays = DateUtil.getDays(sxrq, Calendar.DAY_OF_YEAR); if (beginEdktsc == endEdktsc){ @@ -294,12 +325,19 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay { }else { //不折算 - int beginYearMonth = DateUtil.getBetWeenMonths(qsrq,sxrq); - if (beginYearMonth < 0){ - beginYearMonth = 0; + int beginYear = 0; + if (jgscsf.equals("2")){ + //直接取工龄字段 + beginYear = seniority/12; + }else { + //起算日期与当前日期间隔+工龄字段 + int beginYearMonth = DateUtil.getBetWeenMonths(qsrq,sxrq); + if (beginYearMonth < 0){ + beginYearMonth = 0; + } + beginYearMonth = beginYearMonth+seniority; + beginYear = beginYearMonth/12; } - beginYearMonth = beginYearMonth+seniority; - int beginYear = beginYearMonth/12; Map beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId); double beginEdktsc = Double.valueOf(beginYearmap.get("edktsc") == null? "0" :Util.null2String(beginYearmap.get("edktsc"))); restTime=beginEdktsc;