Commit cdbb41e4 authored by huyuchen's avatar huyuchen

huych-社保自动化相关提交

parent 84573e24
...@@ -20,10 +20,10 @@ public class TEmployeeContractDateVo implements Serializable { ...@@ -20,10 +20,10 @@ public class TEmployeeContractDateVo implements Serializable {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
private Date registDate; private Date registDate;
@Schema(description = "月份后 1、2、3...") @Schema(description = "月份后 0、1、2、3...")
private int monthAfter; private int monthAfter;
@Schema(description = "年份后 1、2、3...") @Schema(description = "年份后 0、1、2、3...")
private int yearAfter; private int yearAfter;
} }
...@@ -1509,6 +1509,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1509,6 +1509,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
.atZone(ZoneId.systemDefault()) .atZone(ZoneId.systemDefault())
.toLocalDate(); .toLocalDate();
// 添加年数和月数 // 添加年数和月数
if (vo.getMonthAfter() ==0 && vo.getYearAfter() ==0) {
// 转回Date类型
return Date.from(localDate.atStartOfDay()
.atZone(ZoneId.systemDefault())
.toInstant());
} else {
localDate = localDate localDate = localDate
.plusYears(vo.getYearAfter()) .plusYears(vo.getYearAfter())
.plusMonths(vo.getMonthAfter()) .plusMonths(vo.getMonthAfter())
...@@ -1518,6 +1524,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1518,6 +1524,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
.atZone(ZoneId.systemDefault()) .atZone(ZoneId.systemDefault())
.toInstant()); .toInstant());
} }
}
/** /**
* @Description: 批量处理日志 * @Description: 批量处理日志
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment