|
|
@ -54,10 +54,6 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay {
|
|
|
|
String dzqsrq = Util.null2String(vocationList.get(0).get("dzqsrq"));
|
|
|
|
String dzqsrq = Util.null2String(vocationList.get(0).get("dzqsrq"));
|
|
|
|
//分割日期
|
|
|
|
//分割日期
|
|
|
|
String fgrq = Util.null2String(vocationList.get(0).get("fgrq"));
|
|
|
|
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"));
|
|
|
|
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 wscl = Util.null2String(vocationList.get(0).get("wscl"));
|
|
|
|
//首次获得额度控制生效日期
|
|
|
|
//首次获得额度控制生效日期
|
|
|
|
String schdedkzsxrq = Util.null2String(vocationList.get(0).get("schdedkzsxrq"));
|
|
|
|
String schdedkzsxrq = Util.null2String(vocationList.get(0).get("schdedkzsxrq"));
|
|
|
|
|
|
|
|
//间隔时长算法
|
|
|
|
|
|
|
|
String jgscsf = Util.null2String(vocationList.get(0).get("jgsc"));
|
|
|
|
|
|
|
|
|
|
|
|
if ("".equals(qsrq)){
|
|
|
|
if ("".equals(qsrq)){
|
|
|
|
return Maps.newHashMap();
|
|
|
|
return Maps.newHashMap();
|
|
|
@ -128,11 +126,6 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
insertHoliDayParam.put("sxrq", divideTime);
|
|
|
|
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);
|
|
|
|
insertHoliDayParam.put("ktsc", restTime);
|
|
|
|
} else if (allMonths >= 12 && edyxq.equals(StartingUnitEnum.NATURAL_YEAR.getKey())) {
|
|
|
|
} else if (allMonths >= 12 && edyxq.equals(StartingUnitEnum.NATURAL_YEAR.getKey())) {
|
|
|
@ -156,6 +149,9 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay {
|
|
|
|
//起算年
|
|
|
|
//起算年
|
|
|
|
allMonths = Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
allMonths = Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
int intervalYear = allMonths / 12+betweenYear;
|
|
|
|
int intervalYear = allMonths / 12+betweenYear;
|
|
|
|
|
|
|
|
if (jgscsf.equals("2")){
|
|
|
|
|
|
|
|
intervalYear = allMonths / 12;
|
|
|
|
|
|
|
|
}
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, intervalYear, yjzd,userId);
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, intervalYear, yjzd,userId);
|
|
|
|
restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
} else if (edyxq.equals(StartingUnitEnum.NATURAL_MONTH.getKey())){
|
|
|
|
} else if (edyxq.equals(StartingUnitEnum.NATURAL_MONTH.getKey())){
|
|
|
@ -165,6 +161,10 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay {
|
|
|
|
betweenMonth = 0;
|
|
|
|
betweenMonth = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
allMonths = betweenMonth+Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
allMonths = betweenMonth+Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
|
|
|
|
if (jgscsf.equals("2")){
|
|
|
|
|
|
|
|
allMonths = Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd,userId);
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd,userId);
|
|
|
|
restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
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);
|
|
|
|
betweenMonth = DateUtil.getBetWeenMonths(qsrq,sxrq);
|
|
|
|
allMonths = betweenMonth+Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
allMonths = betweenMonth+Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
|
|
|
|
if (jgscsf.equals("2")){
|
|
|
|
|
|
|
|
allMonths = Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd,userId);
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allMonths, yjzd,userId);
|
|
|
|
restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
@ -183,6 +186,9 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay {
|
|
|
|
betweenDays = 0;
|
|
|
|
betweenDays = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays;
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays;
|
|
|
|
|
|
|
|
if (jgscsf.equals("2")){
|
|
|
|
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30;
|
|
|
|
|
|
|
|
}
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd,userId);
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd,userId);
|
|
|
|
restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
|
|
|
|
|
|
|
@ -193,6 +199,9 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay {
|
|
|
|
betweenDays=0;
|
|
|
|
betweenDays=0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays;
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays;
|
|
|
|
|
|
|
|
if (jgscsf.equals("2")){
|
|
|
|
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30;
|
|
|
|
|
|
|
|
}
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd,userId);
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays/7, yjzd,userId);
|
|
|
|
restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
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);
|
|
|
|
betweenDays = DateUtil.getBetWeenDays(qsrq,sxrq);
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays;
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30+betweenDays;
|
|
|
|
|
|
|
|
if (jgscsf.equals("2")){
|
|
|
|
|
|
|
|
allWorkDays = Double.valueOf(ljcrglyfslwz).intValue()*30;
|
|
|
|
|
|
|
|
}
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays, yjzd,userId);
|
|
|
|
Map<String, Object> vocationMap = VocationCommonUtil.getVocationMap(vocationList, allWorkDays, yjzd,userId);
|
|
|
|
restTime = vocationMap.size()>0?Double.valueOf(vocationMap.get("edktsc").toString()):0;
|
|
|
|
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 yjzd = Util.null2String(vocationList.get(0).get("yjzdValue"));
|
|
|
|
//尾数处理
|
|
|
|
//尾数处理
|
|
|
|
String wscl = Util.null2String(vocationList.get(0).get("wscl"));
|
|
|
|
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();
|
|
|
|
int seniority = "".equals(ljcrglyfslwz)?0:Double.valueOf(ljcrglyfslwz).intValue();
|
|
|
|
|
|
|
|
|
|
|
@ -248,15 +262,32 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay {
|
|
|
|
endYearMonth = endYearMonth+seniority;
|
|
|
|
endYearMonth = endYearMonth+seniority;
|
|
|
|
int beginYear = beginYearMonth/12;
|
|
|
|
int beginYear = beginYearMonth/12;
|
|
|
|
int endYear = endYearMonth/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<String,Object> beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId);
|
|
|
|
Map<String,Object> beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId);
|
|
|
|
Map<String,Object> endYearmap = VocationCommonUtil.getVocationMap(vocationList, endYear, 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 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")));
|
|
|
|
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);
|
|
|
|
int yearDays = DateUtil.getDays(sxrq, Calendar.DAY_OF_YEAR);
|
|
|
|
|
|
|
|
|
|
|
|
if (beginEdktsc == endEdktsc){
|
|
|
|
if (beginEdktsc == endEdktsc){
|
|
|
@ -294,12 +325,19 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay {
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
//不折算
|
|
|
|
//不折算
|
|
|
|
|
|
|
|
int beginYear = 0;
|
|
|
|
|
|
|
|
if (jgscsf.equals("2")){
|
|
|
|
|
|
|
|
//直接取工龄字段
|
|
|
|
|
|
|
|
beginYear = seniority/12;
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
//起算日期与当前日期间隔+工龄字段
|
|
|
|
int beginYearMonth = DateUtil.getBetWeenMonths(qsrq,sxrq);
|
|
|
|
int beginYearMonth = DateUtil.getBetWeenMonths(qsrq,sxrq);
|
|
|
|
if (beginYearMonth < 0){
|
|
|
|
if (beginYearMonth < 0){
|
|
|
|
beginYearMonth = 0;
|
|
|
|
beginYearMonth = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
beginYearMonth = beginYearMonth+seniority;
|
|
|
|
beginYearMonth = beginYearMonth+seniority;
|
|
|
|
int beginYear = beginYearMonth/12;
|
|
|
|
beginYear = beginYearMonth/12;
|
|
|
|
|
|
|
|
}
|
|
|
|
Map<String,Object> beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId);
|
|
|
|
Map<String,Object> beginYearmap = VocationCommonUtil.getVocationMap(vocationList, beginYear, yjzd,userId);
|
|
|
|
double beginEdktsc = Double.valueOf(beginYearmap.get("edktsc") == null? "0" :Util.null2String(beginYearmap.get("edktsc")));
|
|
|
|
double beginEdktsc = Double.valueOf(beginYearmap.get("edktsc") == null? "0" :Util.null2String(beginYearmap.get("edktsc")));
|
|
|
|
restTime=beginEdktsc;
|
|
|
|
restTime=beginEdktsc;
|
|
|
|