generated from dxfeng/secondev-chapanda-feishu
BUG--兼容只有开始时间的情况
This commit is contained in:
parent
1ccfcc18ec
commit
c9b9b5b26b
|
|
@ -289,33 +289,40 @@ public class CheckRepeatResume {
|
|||
* @return
|
||||
*/
|
||||
public static RecruitDataMap<Object> getDateRange(String date, boolean isStudy) {
|
||||
RecruitDataMap<Object> dataRangeMap = new RecruitDataMap<>();
|
||||
RecruitDataMap<Object> dataRangeMap = new RecruitDataMap();
|
||||
if (StringUtils.isBlank(date)) {
|
||||
return dataRangeMap;
|
||||
}
|
||||
String[] split = date.split("-");
|
||||
if (split.length == 2) {
|
||||
String start = getFormatDate(split[0]);
|
||||
String end = getFormatDate(split[1]);
|
||||
if (start.length() == 4) {
|
||||
if (isStudy) {
|
||||
start += "-09-01";
|
||||
} else {
|
||||
start = "";
|
||||
}
|
||||
}
|
||||
if (end.length() == 4) {
|
||||
if (isStudy) {
|
||||
end += "-07-01";
|
||||
} else {
|
||||
end = "";
|
||||
} else {
|
||||
String[] split = date.split("-");
|
||||
String end;
|
||||
if (split.length > 0) {
|
||||
end = getFormatDate(split[0]);
|
||||
if (end.length() == 4) {
|
||||
if (isStudy) {
|
||||
end = end + "-09-01";
|
||||
} else {
|
||||
end = "";
|
||||
}
|
||||
}
|
||||
|
||||
dataRangeMap.put("kssj", end);
|
||||
}
|
||||
|
||||
dataRangeMap.put("kssj", start);
|
||||
dataRangeMap.put("jssj", end);
|
||||
if (split.length > 1) {
|
||||
end = getFormatDate(split[1]);
|
||||
if (end.length() == 4) {
|
||||
if (isStudy) {
|
||||
end = end + "-07-01";
|
||||
} else {
|
||||
end = "";
|
||||
}
|
||||
}
|
||||
|
||||
dataRangeMap.put("jssj", end);
|
||||
}
|
||||
|
||||
return dataRangeMap;
|
||||
}
|
||||
return dataRangeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue