|
|
|
@ -100,9 +100,9 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{
|
|
|
|
|
//工龄小于1年的新员工,且额度有效期单位为自然年
|
|
|
|
|
if (allMonths < 12 && edyxq.equals(StartingUnitEnum.NATURAL_YEAR.getKey())) {
|
|
|
|
|
if (QuotaChangeMethodEnum.CONVERT.getKey().equals(edbgsedclfs) || CheckBoxEnum.CHECKED.getKey().equals(schdedablzs)) {
|
|
|
|
|
restTime = getRestTime(insertHoliDayParam,vocationList,QuotaChangeMethodEnum.CONVERT,releaseDate);
|
|
|
|
|
restTime = getRestTime(insertHoliDayParam,vocationList,QuotaChangeMethodEnum.CONVERT,releaseDate,userId);
|
|
|
|
|
}else {
|
|
|
|
|
restTime = getRestTime(insertHoliDayParam,vocationList,QuotaChangeMethodEnum.NO_CONVERT,releaseDate);
|
|
|
|
|
restTime = getRestTime(insertHoliDayParam,vocationList,QuotaChangeMethodEnum.NO_CONVERT,releaseDate,userId);
|
|
|
|
|
}
|
|
|
|
|
if (CheckBoxEnum.CHECKED.getKey().equals(schdedkzsxrq)) {
|
|
|
|
|
int seniority = "".equals(ljcrglyfslwz)?0:Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
@ -120,12 +120,12 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{
|
|
|
|
|
if (CheckBoxEnum.CHECKED.getKey().equals(rzdqedablzs) && betweenMonth < 12
|
|
|
|
|
&& sxrq.split("-")[0].equals(releaseDate.split("-")[0]) && releaseDate.split("-")[0].equals(qsrq.split("-")[0])) {
|
|
|
|
|
//入职不满一年,且入职当期额度按比例折算
|
|
|
|
|
restTime = getRestTime(insertHoliDayParam,vocationList,QuotaChangeMethodEnum.CONVERT,releaseDate);
|
|
|
|
|
restTime = getRestTime(insertHoliDayParam,vocationList,QuotaChangeMethodEnum.CONVERT,releaseDate,userId);
|
|
|
|
|
}else {
|
|
|
|
|
if (QuotaChangeMethodEnum.CONVERT.getKey().equals(edbgsedclfs)) {
|
|
|
|
|
restTime = getRestTime(insertHoliDayParam,vocationList,QuotaChangeMethodEnum.CONVERT,releaseDate);
|
|
|
|
|
restTime = getRestTime(insertHoliDayParam,vocationList,QuotaChangeMethodEnum.CONVERT,releaseDate,userId);
|
|
|
|
|
} else if (QuotaChangeMethodEnum.NO_CONVERT.getKey().equals(edbgsedclfs)) {
|
|
|
|
|
restTime = getRestTime(insertHoliDayParam,vocationList,QuotaChangeMethodEnum.NO_CONVERT,releaseDate);
|
|
|
|
|
restTime = getRestTime(insertHoliDayParam,vocationList,QuotaChangeMethodEnum.NO_CONVERT,releaseDate,userId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -140,7 +140,7 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{
|
|
|
|
|
int betweenYear = DateUtil.getBetWeenYears(qsrq,releaseDate.split(" ")[0]);
|
|
|
|
|
allMonths = Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
|
int intervalYear = allMonths / 12+betweenYear;
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, intervalYear, yjzd);
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, intervalYear, yjzd,userId);
|
|
|
|
|
double edktsc = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
|
int days = 0;
|
|
|
|
|
if (DateUtil.getTime(qsrq).compareTo(DateUtil.getTime(sxrq)) >=0){
|
|
|
|
@ -165,7 +165,7 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{
|
|
|
|
|
betweenMonth = DateUtil.getBetWeenMonths(qsrq,sxrq);
|
|
|
|
|
|
|
|
|
|
allMonths = betweenMonth+Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd);
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd,userId);
|
|
|
|
|
int days = DateUtil.getBetWeenDays(sxrq,releaseDate.split(" ")[0])+1;
|
|
|
|
|
if (days <0){
|
|
|
|
|
days=0;
|
|
|
|
@ -186,7 +186,7 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{
|
|
|
|
|
betweenMonth = DateUtil.getBetWeenMonths(qsrq,sxrq);
|
|
|
|
|
allMonths = betweenMonth+Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
|
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd);
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd,userId);
|
|
|
|
|
double edktsc = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
|
int days = DateUtil.getBetWeenDays(sxrq,releaseDate.split(" ")[0])+1;
|
|
|
|
|
if (days <0){
|
|
|
|
@ -213,7 +213,7 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{
|
|
|
|
|
betweenDays = 0;
|
|
|
|
|
}
|
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays;
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd);
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd,userId);
|
|
|
|
|
double edktsc = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
|
|
|
|
|
|
int days = DateUtil.getBetWeenDays(sxrq,releaseDate.split(" ")[0])+1;
|
|
|
|
@ -240,7 +240,7 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{
|
|
|
|
|
betweenDays=0;
|
|
|
|
|
}
|
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays;
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd);
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd,userId);
|
|
|
|
|
int days = DateUtil.getBetWeenDays(sxrq,releaseDate.split(" ")[0])+1;
|
|
|
|
|
if (days <0){
|
|
|
|
|
days=0;
|
|
|
|
@ -253,7 +253,7 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{
|
|
|
|
|
//自然天
|
|
|
|
|
betweenDays = DateUtil.getBetWeenDays(qsrq,sxrq)+1;
|
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays;
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays, yjzd);
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays, yjzd,userId);
|
|
|
|
|
restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
|
}
|
|
|
|
|
insertHoliDayParam.put("ktsc", restTime);
|
|
|
|
@ -263,7 +263,7 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{
|
|
|
|
|
return insertHoliDayParam;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public double getRestTime(Map<String, Object> insertHoliDayParam,List<Map<String, Object>> vocationList,QuotaChangeMethodEnum changeMethodEnum,String releaseDate){
|
|
|
|
|
public double getRestTime(Map<String, Object> insertHoliDayParam,List<Map<String, Object>> vocationList,QuotaChangeMethodEnum changeMethodEnum,String releaseDate,String userId){
|
|
|
|
|
String sxrq = insertHoliDayParam.get("sxrq").toString();
|
|
|
|
|
String qsrq = Util.null2String(vocationList.get(0).get("qsrqValue"));
|
|
|
|
|
String nextSxrq = DateUtil.nextYear(sxrq,1,DateUtil.yyyyMMdd);
|
|
|
|
@ -304,8 +304,8 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{
|
|
|
|
|
endYearMonth = endYearMonth+seniority;
|
|
|
|
|
int beginYear = beginYearMonth/12;
|
|
|
|
|
int endYear = endYearMonth/12;
|
|
|
|
|
Map<String,Object> beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd);
|
|
|
|
|
Map<String,Object> endYearmap = VocationCommonUtil.getVocationMap(vocationList, endYear, yjzd);
|
|
|
|
|
Map<String,Object> beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId);
|
|
|
|
|
Map<String,Object> 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")));
|
|
|
|
|
|
|
|
|
@ -366,7 +366,7 @@ public class ByIntervalPayMentWay implements HolidayGenerationWay{
|
|
|
|
|
}
|
|
|
|
|
beginYearMonth = beginYearMonth+seniority;
|
|
|
|
|
int beginYear = beginYearMonth/12;
|
|
|
|
|
Map<String,Object> beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd);
|
|
|
|
|
Map<String,Object> beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId);
|
|
|
|
|
double beginEdktsc = Double.valueOf(beginYearmap.get("edktsc") == null? "0" :Util.null2String(beginYearmap.get("edktsc")));
|
|
|
|
|
int days = 0;
|
|
|
|
|
if (DateUtil.getTime(qsrq).compareTo(DateUtil.getTime(sxrq)) >=0){
|
|
|
|
|