|
@@ -129,8 +129,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(vo.getParams().get("endTime"))) {
|
|
|
SimpleDateFormat dateFormatT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
|
|
|
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- Date parse = dateFormatT.parse(dateFormat.format(vo.getParams().get("endTime")) + " 23:59:59:999");
|
|
|
+ Date parse = dateFormatT.parse(vo.getParams().get("endTime").toString() + " 23:59:59:999");
|
|
|
lw.le(PlanYears::getPlanDemandSubTime, parse);
|
|
|
}
|
|
|
}
|
|
@@ -172,18 +171,15 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(vo.getParams())) {
|
|
|
if (!ObjectUtils.isEmpty(vo.getParams().get("beginTime"))) {
|
|
|
- String beginTime = vo.getParams().get("beginTime").toString();
|
|
|
- Date date = new Date();
|
|
|
- date.setYear(Integer.parseInt(beginTime.substring(0, 4)));
|
|
|
- date.setMonth(Integer.parseInt(beginTime.substring(5, 7)));
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM");
|
|
|
- Date ofMonth = dateFormat.parse(date + "-01");
|
|
|
+ Date ofMonth = dateFormat.parse(vo.getParams().get("beginTime").toString() + "-01");
|
|
|
lw.ge(PlanYears::getPlanDemandSubTime, ofMonth);
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(vo.getParams().get("endTime"))) {
|
|
|
- SimpleDateFormat dateFormatT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
|
|
|
+ SimpleDateFormat dateFormaH = new SimpleDateFormat("yyyy-MM");
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- Date ofMonth = DateUtils.getLastDayOfMonth(dateFormat.parse(vo.getParams().get("endTime").toString()));
|
|
|
+ SimpleDateFormat dateFormatT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
|
|
|
+ Date ofMonth = DateUtils.getLastDayOfMonth(dateFormaH.parse(vo.getParams().get("endTime").toString()));
|
|
|
Date parse = dateFormatT.parse(dateFormat.format(ofMonth) + " 23:59:59:999");
|
|
|
lw.le(PlanYears::getPlanDemandSubTime, parse);
|
|
|
}
|
|
@@ -955,7 +951,20 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<PlanYears> queryPage(PlanYearsStandardVo vo) {
|
|
|
+ public List<PlanYears> queryPage(PlanYearsStandardVo vo) throws ParseException {
|
|
|
+ Map<String, Object> params = vo.getParams();
|
|
|
+ if (!ObjectUtils.isEmpty(vo.getParams())) {
|
|
|
+ if (!ObjectUtils.isEmpty(vo.getParams().get("beginTime"))) {
|
|
|
+ params.put("beginTime", vo.getParams().get("beginTime").toString() + "-01");
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.isEmpty(vo.getParams().get("endTime"))) {
|
|
|
+ SimpleDateFormat dateFormaH = new SimpleDateFormat("yyyy-MM");
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Date ofMonth = DateUtils.getLastDayOfMonth(dateFormaH.parse(vo.getParams().get("endTime").toString()));
|
|
|
+ params.put("endTime", dateFormat.format(ofMonth) + " 23:59:59:999");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ vo.setParams(params);
|
|
|
List<PlanYears> planYears = planYearsMapper.query(vo);
|
|
|
if (!ObjectUtils.isEmpty(planYears)) {
|
|
|
planYears.stream().map(o -> {
|