Commit 3c1ce241 authored by 李灿灿's avatar 李灿灿

时间区间判断重复,逻辑优化

parent d6d861c7
......@@ -659,6 +659,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
)
.or(e -> e.le(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.ge(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(param.getPolicyEnd())))
.or(s -> s.ge(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.le(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(param.getPolicyEnd())))
.or(s -> s.ge(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.le(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(param.getPolicyEnd())))
)
//有效
.and(
......@@ -1598,6 +1602,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
)
.or(e -> e.le(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.ge(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(param.getPolicyEnd())))
.or(s -> s.ge(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.le(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(param.getPolicyEnd())))
.or(s -> s.ge(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.le(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(param.getPolicyEnd())))
)
//有效
.and(
......@@ -2285,6 +2293,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
)
.or(e -> e.le(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.ge(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(param.getPolicyEnd())))
.or(s -> s.ge(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.le(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(param.getPolicyEnd())))
.or(s -> s.ge(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.le(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(param.getPolicyEnd())))
)
//有效
.and(
......
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