调整直取工龄时,分段派发额度的逻辑,直接根据直取工龄值计算分隔月份

main
seaon 5 months ago
parent 350fed1406
commit cb6a246ca8

@ -10,6 +10,7 @@ import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import weaver.general.Util; import weaver.general.Util;
import java.time.format.DateTimeFormatter;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -232,34 +233,30 @@ public class BySchedulePaymentWay implements HolidayGenerationWay{
double restTime=0.0; double restTime=0.0;
//折算 //折算
if (changeMethodEnum == QuotaChangeMethodEnum.CONVERT){ if (changeMethodEnum == QuotaChangeMethodEnum.CONVERT){
int beginYearMonth = DateUtil.getBetWeenMonths(qsrq,sxrq); int beginYear=0;//生效日期对应的年度
if (beginYearMonth < 0){ int endYear=0;//失效日期对应的年度
beginYearMonth = 0; String divideTime = "";//工龄变更日期
}
beginYearMonth = beginYearMonth+seniority;
int endYearMonth = DateUtil.getBetWeenMonths(qsrq,nextSxrq);
endYearMonth = endYearMonth+seniority;
int beginYear = beginYearMonth/12;
int endYear = endYearMonth/12;
//残年分割日期
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")){ if (jgscsf.equals("2")){
//直接取工龄字段 beginYear = Double.valueOf(ljcrglyfslwz).intValue();
beginYear = seniority/12;
endYear = beginYear+1; endYear = beginYear+1;
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
//分割日期 double divdemonths = Double.valueOf(ljcrglyfslwz) - Double.valueOf(ljcrglyfslwz).intValue();
// int month = DateUtil.getBetWeenMonths(qsrq,sxrq); divideTime = DateUtil.nextMonth(sxrq,(int)Math.ceil(divdemonths*12),dateTimeFormatter);
// if (month < 0){ }else {
// month = 0; int beginYearMonth = DateUtil.getBetWeenMonths(qsrq, sxrq);
// } if (beginYearMonth < 0) {
// int historySeniority = seniority-month; beginYearMonth = 0;
// divideTime = DateUtil.beforeMonth(qsrq,historySeniority); }
divideTime = sxrq.split("-")[0]+"-"+qsrq.split("-")[1]+"-"+qsrq.split("-")[2]; beginYearMonth = beginYearMonth + seniority;
divideTime = DateUtil.nextMonth(divideTime,1,DateUtil.yyyyMM)+"-01"; int endYearMonth = DateUtil.getBetWeenMonths(qsrq, nextSxrq);
endYearMonth = endYearMonth + seniority;
beginYear = beginYearMonth / 12;
endYear = endYearMonth / 12;
//残年分割日期
divideTime = DateUtil.beforeMonth(qsrq, seniority);
divideTime = sxrq.split("-")[0] + "-" + divideTime.split("-")[1] + "-" + divideTime.split("-")[2];
divideTime = DateUtil.nextMonth(divideTime, 1, DateUtil.yyyyMM) + "-01";
} }
Map<String,Object> beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId); Map<String,Object> beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId);

Loading…
Cancel
Save