From af6b8f7a1a157930fd5873fac337481e4fa810fd Mon Sep 17 00:00:00 2001 From: liuqingkun Date: Wed, 21 Jun 2023 11:45:01 +0800 Subject: [PATCH] bug fix --- .../business/controller/ReportController.java | 45 +- .../modules/business/mapper/AppealMapper.java | 6 +- .../modules/business/mapper/AppealMapper.xml | 12 + .../business/service/IAppealService.java | 8 +- .../impl/AppealMediationServiceImpl.java | 74 +- .../service/impl/AppealServiceImpl.java | 9 + .../service/impl/LargeScreenServiceImpl.java | 104 +-- .../business/utils/LocalDateTimeUtils.java | 876 +++++++++--------- .../business/vo/AppealMediationVO.java | 31 +- 9 files changed, 633 insertions(+), 532 deletions(-) diff --git a/src/main/java/org/springblade/modules/business/controller/ReportController.java b/src/main/java/org/springblade/modules/business/controller/ReportController.java index 031f796..3e1d4cb 100644 --- a/src/main/java/org/springblade/modules/business/controller/ReportController.java +++ b/src/main/java/org/springblade/modules/business/controller/ReportController.java @@ -107,20 +107,22 @@ public class ReportController extends BladeController { public R getAppealByMon(Integer timeFrame, String startTime, String endTime) { LocalDateTime start = null; LocalDateTime end = null; + LocalDateTime now = LocalDateTimeUtils.now(); if (StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime)) { DateTimeFormatter fmt = DateTimeFormatter.ofPattern(DateUtil.PATTERN_DATETIME); start = LocalDateTime.parse(startTime, fmt); end = LocalDateTime.parse(endTime, fmt); } else if (timeFrame == 1) { - start = LocalDateTimeUtils.monthStartTime(); - end = LocalDateTimeUtils.monthEndTime(); + start = LocalDateTimeUtils.last6MonStartTime(); + end = now; } else if (timeFrame == 2) { - start = LocalDateTimeUtils.quarterStartTime(); - end = LocalDateTimeUtils.quarterEndTime(); + start = LocalDateTimeUtils.last6MonStartTime(); + end = now; } else { - start = LocalDateTimeUtils.yearStartTime(); - end = LocalDateTimeUtils.yearEndTime(); + start = LocalDateTimeUtils.halfYearStartTime(); + end = now; } + return R.data(largeScreenService.getAppealByMon(start, end)); } @@ -153,8 +155,8 @@ public class ReportController extends BladeController { */ @GetMapping("/getAppealSubmitCountByLoc") public R getAppealSubmitCountByLoc(Integer timeFrame, String startTime, String endTime) throws ParseException { - Map dataList = largeScreenService.getAppealSubmitCountByLoc(timeFrame, startTime, endTime); - return R.data(getSortAndData(dataList)); + Map dataMap = largeScreenService.getAppealSubmitCountByLoc(timeFrame, startTime, endTime); + return R.data(getSortAndData(dataMap)); } /** @@ -171,8 +173,8 @@ public class ReportController extends BladeController { */ @GetMapping("/getImmediateCountByLoc") public R getImmediateCountByLoc(Integer timeFrame, String startTime, String endTime) throws ParseException { - Map dataList = largeScreenService.getImmediateCountByLoc(timeFrame, startTime, endTime); - return R.data(getSortAndData(dataList)); + Map dataMap = largeScreenService.getImmediateCountByLoc(timeFrame, startTime, endTime); + return R.data(getSortAndData(dataMap)); } /** @@ -223,6 +225,14 @@ public class ReportController extends BladeController { return R.data(largeScreenService.getAppealHot(start, end)); } + /** + * 矛盾上报排行 + * + * @param timeFrame + * @param startTime + * @param endTime + * @return + */ @GetMapping("getReportSort") public R getReportSort(Integer timeFrame, String startTime, String endTime) { LocalDateTime start = null; @@ -258,10 +268,11 @@ public class ReportController extends BladeController { for (int idx = 0; idx < list.size(); idx++) { String streetName = list.get(idx).getName(); - Object streetValue = list.get(idx).getValue(); - if (idx < 4) { + if (idx == 0) { + levelMap.put(streetName, 4); + } else if (idx == 1) { levelMap.put(streetName, 3); - } else if (idx < 8) { + } else if (idx < 6) { levelMap.put(streetName, 2); } else { levelMap.put(streetName, 1); @@ -277,7 +288,7 @@ public class ReportController extends BladeController { DataEntity entity = new DataEntity(); entity.setName(streetName); entity.setValue(0); - entity.setResolveRate("0"); + entity.setResolveRate("0%"); dataList.add(entity); } }); @@ -303,9 +314,11 @@ public class ReportController extends BladeController { for (int idx = 0; idx < list.size(); idx++) { String streetName = list.get(idx).getKey(); Object streetValue = list.get(idx).getValue(); - if (idx < 4) { + if (idx == 0) { + levelMap.put(streetName, 4); + } else if (idx == 1) { levelMap.put(streetName, 3); - } else if (idx < 8) { + } else if (idx < 6) { levelMap.put(streetName, 2); } else { levelMap.put(streetName, 1); diff --git a/src/main/java/org/springblade/modules/business/mapper/AppealMapper.java b/src/main/java/org/springblade/modules/business/mapper/AppealMapper.java index 4a49d90..bf537df 100644 --- a/src/main/java/org/springblade/modules/business/mapper/AppealMapper.java +++ b/src/main/java/org/springblade/modules/business/mapper/AppealMapper.java @@ -17,10 +17,12 @@ package org.springblade.modules.business.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; import org.springblade.modules.business.entity.Appeal; import org.springblade.modules.business.excel.AppealExcel; import java.util.List; +import java.util.Map; /** * Mapper 接口 @@ -30,5 +32,7 @@ import java.util.List; public interface AppealMapper extends BaseMapper { - List exportAppeal(String appealStatus, String startTime, String endTime, String appealType, String windowId, String username); + List exportAppeal(String appealStatus, String startTime, String endTime, String appealType, String windowId, String username); + + List> getAppealByMon(@Param("start") String start, @Param("end") String end); } diff --git a/src/main/java/org/springblade/modules/business/mapper/AppealMapper.xml b/src/main/java/org/springblade/modules/business/mapper/AppealMapper.xml index 78241dd..cbfbf25 100644 --- a/src/main/java/org/springblade/modules/business/mapper/AppealMapper.xml +++ b/src/main/java/org/springblade/modules/business/mapper/AppealMapper.xml @@ -37,4 +37,16 @@ ORDER BY a.first_reg_time DESC + + diff --git a/src/main/java/org/springblade/modules/business/service/IAppealService.java b/src/main/java/org/springblade/modules/business/service/IAppealService.java index 9d9e0bf..dbacd30 100644 --- a/src/main/java/org/springblade/modules/business/service/IAppealService.java +++ b/src/main/java/org/springblade/modules/business/service/IAppealService.java @@ -16,14 +16,18 @@ */ package org.springblade.modules.business.service; +import org.apache.ibatis.annotations.Param; import org.springblade.modules.business.entity.Appeal; import org.springblade.core.mp.base.BaseService; +import java.util.List; +import java.util.Map; + /** - * 服务类 + * 服务类 * * @author BladeX */ public interface IAppealService extends BaseService { - + List> getAppealByMon(String start, String end); } diff --git a/src/main/java/org/springblade/modules/business/service/impl/AppealMediationServiceImpl.java b/src/main/java/org/springblade/modules/business/service/impl/AppealMediationServiceImpl.java index 0472746..35f4811 100644 --- a/src/main/java/org/springblade/modules/business/service/impl/AppealMediationServiceImpl.java +++ b/src/main/java/org/springblade/modules/business/service/impl/AppealMediationServiceImpl.java @@ -18,7 +18,9 @@ package org.springblade.modules.business.service.impl; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; +import org.springblade.common.cache.DictBizCache; import org.springblade.common.constant.BusinessConstant; +import org.springblade.common.enums.DictEnum; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.Func; @@ -29,11 +31,16 @@ import org.springblade.modules.business.mapper.AppealVisitorMapper; import org.springblade.modules.business.service.*; import org.springblade.modules.business.vo.AppealMediationDetailListVO; import org.springblade.modules.business.vo.AppealMediationVO; +import org.springblade.modules.system.entity.DictBiz; +import org.springblade.modules.system.entity.User; +import org.springblade.modules.system.service.IUserService; import org.springframework.stereotype.Service; import java.sql.Wrapper; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; /** * 服务实现类 @@ -47,6 +54,7 @@ public class AppealMediationServiceImpl extends BaseServiceImpl 0) { Long mediateId = mediationList.get(mediationList.size() - 1).getId(); return getMediationDetail(appealId, mediateId.toString()); + } else { + return getMediationDetail(appealId, null); } - - return null; } @Override @@ -145,8 +153,13 @@ public class AppealMediationServiceImpl extends BaseServiceImpl visitorList = visitorMapper.selectList( - Wrappers.lambdaQuery().eq(AppealVisitor::getAppealRegId, appealReg.getId())); + List visitorList = new ArrayList<>(); + if (Func.isNotEmpty(appealReg)) { + visitorMapper.selectList( + Wrappers.lambdaQuery().eq(AppealVisitor::getAppealRegId, appealReg.getId())); + } else { + appealReg = new AppealReg(); + } // 4. 组织返回对象数据 vo.setAppealId(Long.valueOf(appealId)); @@ -156,8 +169,30 @@ public class AppealMediationServiceImpl extends BaseServiceImpl deptNames = userService.list(Wrappers.lambdaQuery() + .select(User::getName).in(User::getId, mediation.getDutyDeptIds().split(","))); + if (Func.isNotEmpty(deptNames)) { + String names = deptNames.stream().map(User::getName).collect(Collectors.joining(",")); + vo.setDutyDeptNames(names); + } + } vo.setCopyDeptIds(mediation.getCopyDeptIds()); + if (Func.isNotBlank(mediation.getCopyDeptIds())) { + List deptNames = userService.list(Wrappers.lambdaQuery() + .select(User::getName).in(User::getId, mediation.getCopyDeptIds().split(","))); + if (Func.isNotEmpty(deptNames)) { + String names = deptNames.stream().map(User::getName).collect(Collectors.joining(",")); + vo.setCopyDeptNames(names); + } + } vo.setDisputeLevel(appeal.getDisputeLevel()); vo.setFeedbackDeadline(mediation.getFeedbackDeadline()); vo.setFinishDeadline(mediation.getFinishDeadline()); diff --git a/src/main/java/org/springblade/modules/business/service/impl/AppealServiceImpl.java b/src/main/java/org/springblade/modules/business/service/impl/AppealServiceImpl.java index 83e25ae..4c10b0d 100644 --- a/src/main/java/org/springblade/modules/business/service/impl/AppealServiceImpl.java +++ b/src/main/java/org/springblade/modules/business/service/impl/AppealServiceImpl.java @@ -16,18 +16,27 @@ */ package org.springblade.modules.business.service.impl; +import lombok.RequiredArgsConstructor; import org.springblade.modules.business.entity.Appeal; import org.springblade.modules.business.mapper.AppealMapper; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.modules.business.service.IAppealService; import org.springframework.stereotype.Service; +import java.util.List; +import java.util.Map; + /** * 服务实现类 * * @author BladeX */ @Service +@RequiredArgsConstructor public class AppealServiceImpl extends BaseServiceImpl implements IAppealService { + @Override + public List> getAppealByMon(String start, String end) { + return baseMapper.getAppealByMon(start, end); + } } diff --git a/src/main/java/org/springblade/modules/business/service/impl/LargeScreenServiceImpl.java b/src/main/java/org/springblade/modules/business/service/impl/LargeScreenServiceImpl.java index 27b8378..612acd9 100644 --- a/src/main/java/org/springblade/modules/business/service/impl/LargeScreenServiceImpl.java +++ b/src/main/java/org/springblade/modules/business/service/impl/LargeScreenServiceImpl.java @@ -25,6 +25,7 @@ import org.apache.commons.lang3.StringUtils; import org.springblade.common.cache.DictBizCache; import org.springblade.common.cache.UserCache; import org.springblade.common.constant.BusinessConstant; +import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.Func; import org.springblade.modules.business.entity.Appeal; import org.springblade.modules.business.entity.AppealVisitor; @@ -38,8 +39,10 @@ import org.springblade.modules.system.entity.User; import org.springblade.modules.system.service.IDictBizService; import org.springblade.modules.system.service.IUserService; import org.springframework.stereotype.Service; +import software.amazon.ion.Decimal; import javax.swing.text.html.parser.Entity; +import java.math.BigDecimal; import java.text.DecimalFormat; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -70,9 +73,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService { Map map = new HashMap<>(); // 化解成功状态数组 - List state = new ArrayList<>(); - state.add(2); - state.add(3); + List state = Arrays.asList(BusinessConstant.APPEAL_STATUS_AGREEMENT, BusinessConstant.APPEAL_STATUS_FINISH); LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); // 总化解数 @@ -131,9 +132,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService { @Override public List getAppealList(LocalDateTime start, LocalDateTime end) { // 化解成功状态数组 - List state = new ArrayList<>(); - state.add(0); - state.add(1); + List state = Arrays.asList(BusinessConstant.APPEAL_STATUS_WAITING, BusinessConstant.APPEAL_STATUS_HANDING); LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); // 待处理、正在处理 @@ -162,35 +161,14 @@ public class LargeScreenServiceImpl implements ILargeScreenService { @Override public Map> getAppealByMon(LocalDateTime start, LocalDateTime end) { - Map> map = new HashMap<>(); - List dateList = new ArrayList<>(); - List handlerCountList = new ArrayList<>(); - List finishContList = new ArrayList<>(); - map.put("dateList", dateList); - map.put("handlerCountList", handlerCountList); - map.put("finishContList", finishContList); - - List state = new ArrayList<>(); - state.add(2); - state.add(3); - - // 当月 - Map> map0 = getStartAndEndTime(map, state, 0); - - // 前1个月 - Map> map1 = getStartAndEndTime(map0, state, 1); - - // 前2个月 - Map> map2 = getStartAndEndTime(map1, state, 2); - - // 前3个月 - Map> map3 = getStartAndEndTime(map2, state, 3); + DateTimeFormatter fmt = DateTimeFormatter.ofPattern(DateUtil.PATTERN_DATETIME); + List> result = appealService.getAppealByMon(start.format(fmt), end.format(fmt)); - // 前4个月 - Map> map4 = getStartAndEndTime(map3, state, 4); - - // 前5个月 - return getStartAndEndTime(map4, state, 5); + Map> map = new HashMap<>(); + map.put("dateList", result.stream().map(e -> e.get("mon")).collect(Collectors.toList())); + map.put("handlerCountList", result.stream().map(e -> e.get("submit")).collect(Collectors.toList())); + map.put("finishContList", result.stream().map(e -> e.get("mediation")).collect(Collectors.toList())); + return map; } @Override @@ -301,9 +279,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 化解成功状态数组 - List state = new ArrayList<>(); - state.add(2); - state.add(3); + List state = Arrays.asList(BusinessConstant.APPEAL_STATUS_AGREEMENT, BusinessConstant.APPEAL_STATUS_FINISH); LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); if (StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime)) { @@ -335,9 +311,11 @@ public class LargeScreenServiceImpl implements ILargeScreenService { entity.setName(name); entity.setValue(collect.get(name).size()); - String resolveRate = "0"; + String resolveRate = "0%"; if (entity.getValue() > 0) { - double rate = (entity.getValue() / reportList.get(name).size()) * 100; + double mediation = entity.getValue().doubleValue(); + double reportNum = new Double(reportList.get(name).size()); + double rate = (mediation / reportNum) * 100; resolveRate = calRate(rate); } entity.setResolveRate(resolveRate); @@ -380,7 +358,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService { @Override public IPage getImmediateList(String streetId, LocalDateTime start, LocalDateTime end, IPage page) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); - wrapper.select(Appeal::getId, Appeal::getFirstRegTime, Appeal::getDisputeId, Appeal::getDisputeName); + wrapper.select(Appeal::getId, Appeal::getFirstRegTime, Appeal::getDisputeId, Appeal::getDisputeName, Appeal::getSkipGrantLevel); wrapper.eq(Appeal::getStreetId, streetId); wrapper.eq(Appeal::getSkipGrant, BusinessConstant.CODE_TRUE); wrapper.between(Appeal::getFirstRegTime, start, end); @@ -438,9 +416,11 @@ public class LargeScreenServiceImpl implements ILargeScreenService { DataEntity entity = new DataEntity(); entity.setName(dictBiz.getDictValue()); entity.setValue(street.containsKey(dictBizId) ? street.get(dictBizId).size() : 0); - String resolveRate = "0"; + String resolveRate = "0%"; if (entity.getValue() > 0) { - double rate = (entity.getValue() / reportStreetList.get(dictBizId).size()) * 100; + double mediation = entity.getValue().doubleValue(); + double reportNum = new Double(reportStreetList.get(dictBizId).size()); + double rate = (mediation / reportNum) * 100; resolveRate = calRate(rate); } entity.setResolveRate(resolveRate); @@ -464,10 +444,12 @@ public class LargeScreenServiceImpl implements ILargeScreenService { DataEntity entity = new DataEntity(); entity.setName(user.getName()); entity.setValue(town.containsKey(id) ? town.get(id).size() : 0); - String resolveRate = "0"; + String resolveRate = "0%"; if (entity.getValue() > 0) { if (reportTownList.containsKey(id)) { - double rate = (entity.getValue() / reportTownList.get(id).size()) * 100; + double mediation = entity.getValue().doubleValue(); + double reportNum = new Double(reportTownList.get(id).size()); + double rate = (mediation / reportNum) * 100; resolveRate = calRate(rate); } else { resolveRate = "100%"; @@ -520,42 +502,10 @@ public class LargeScreenServiceImpl implements ILargeScreenService { return map; } - private Map> getStartAndEndTime(Map> map, List state, Integer month) { - List dateList = map.get("dateList"); - List handlerCountList = map.get("handlerCountList"); - List finishContList = map.get("finishContList"); - - // 当月开始时间 - LocalDateTime start = LocalDateTime.of(LocalDate.now().withDayOfMonth(1).minusMonths(month), LocalTime.MIDNIGHT); - - // 当月结束时间 - LocalDateTime end = start.plusMonths(1).minusSeconds(1); - DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM"); - - // 月份:2023-06 - dateList.add(start.format(dateFormatter)); - - // 登记数 - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); - wrapper.between(Appeal::getFirstRegTime, start, end); - handlerCountList.add(appealService.count(wrapper)); - - // 调解成功数 - wrapper.clear(); - wrapper.in(Appeal::getStatus, state); - wrapper.between(Appeal::getFirstRegTime, start, end); - finishContList.add(appealService.count(wrapper)); - - map.put("dateList", dateList); - map.put("handlerCountList", handlerCountList); - map.put("finishContList", finishContList); - return map; - } - private String calRate(double rate) { String resolveRate = String.format("%.2f", rate); - if ("100.00".equalsIgnoreCase(resolveRate)) { + if ("100.00".equalsIgnoreCase(resolveRate) || "100.0".equalsIgnoreCase(resolveRate)) { resolveRate = "100"; } if ("0.00".equalsIgnoreCase(resolveRate)) { diff --git a/src/main/java/org/springblade/modules/business/utils/LocalDateTimeUtils.java b/src/main/java/org/springblade/modules/business/utils/LocalDateTimeUtils.java index e3537e8..756d0b0 100644 --- a/src/main/java/org/springblade/modules/business/utils/LocalDateTimeUtils.java +++ b/src/main/java/org/springblade/modules/business/utils/LocalDateTimeUtils.java @@ -7,436 +7,454 @@ import java.util.Date; /** * LocalDateTime工具类 - * */ public class LocalDateTimeUtils { - /** - * 当前时间 - * - * @return - */ - public static LocalDateTime now() { - return LocalDateTime.now(); - } - - /** - * Date 转 LocalDateTime - * - * @return - */ - public static LocalDateTime convert(Date date) { - return LocalDateTime.ofInstant(Instant.ofEpochMilli(date.getTime()), ZoneId.systemDefault()); - } - - /** - * LocalDateTime 转 Date - * - * @return - */ - public static Date convert(LocalDateTime localDateTime) { - return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant()); - } - - /** - * 今天开始时间 - * - * @return - */ - public static LocalDateTime todayStartTime() { - return LocalDateTime.of(LocalDate.now(), LocalTime.MIN); - } - - /** - * 今天结束时间 - * - * @return - */ - public static LocalDateTime todayEndTime() { - return LocalDateTime.of(LocalDate.now(), LocalTime.MAX); - } - - /** - * 昨天开始时间 - * - * @return - */ - public static LocalDateTime yesterdayStartTime() { - return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.DAYS), LocalTime.MIN); - } - - /** - * 昨天结束时间 - * - * @return - */ - public static LocalDateTime yesterdayEndTime() { - return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.DAYS), LocalTime.MAX); - } - - /** - * 最近7天开始时间 - * - * @return - */ - public static LocalDateTime last7DaysStartTime() { - return LocalDateTime.of(LocalDate.now().minus(6L, ChronoUnit.DAYS), LocalTime.MIN); - } - - /** - * 最近7天结束时间 - * - * @return - */ - public static LocalDateTime last7DaysEndTime() { - return LocalDateTime.of(LocalDate.now(), LocalTime.MAX); - } - - /** - * 最近30天开始时间 - * - * @return - */ - public static LocalDateTime last30DaysStartTime() { - return LocalDateTime.of(LocalDate.now().minus(29L, ChronoUnit.DAYS), LocalTime.MIN); - } - - /** - * 最近30天结束时间 - * - * @return - */ - public static LocalDateTime last30DaysEndTime() { - return LocalDateTime.of(LocalDate.now(), LocalTime.MAX); - } - - /** - * 最近一年开始时间 - * - * @return - */ - public static LocalDateTime last1YearStartTime() { - return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.YEARS).plus(1L, ChronoUnit.DAYS), LocalTime.MIN); - } - - /** - * 最近一年结束时间 - * - * @return - */ - public static LocalDateTime last1YearEndTime() { - return LocalDateTime.of(LocalDate.now(), LocalTime.MAX); - } - - /** - * 本周开始时间 - * - * @return - */ - public static LocalDateTime weekStartTime() { - LocalDate now = LocalDate.now(); - return LocalDateTime.of(now.minusDays(now.getDayOfWeek().getValue() - 1), LocalTime.MIN); - } - - /** - * 本周结束时间 - * - * @return - */ - public static LocalDateTime weekEndTime() { - LocalDate now = LocalDate.now(); - return LocalDateTime.of(now.plusDays(7 - now.getDayOfWeek().getValue()), LocalTime.MAX); - } - - /** - * 本月开始时间 - * - * @return - */ - public static LocalDateTime monthStartTime() { - return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()), LocalTime.MIN); - } - - /** - * 本月结束时间 - * - * @return - */ - public static LocalDateTime monthEndTime() { - return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()), LocalTime.MAX); - } - - /** - * 本季度开始时间 - * - * @return - */ - public static LocalDateTime quarterStartTime() { - LocalDate now = LocalDate.now(); - Month month = Month.of(now.getMonth().firstMonthOfQuarter().getValue()); - return LocalDateTime.of(LocalDate.of(now.getYear(), month, 1), LocalTime.MIN); - } - - /** - * 本季度结束时间 - * - * @return - */ - public static LocalDateTime quarterEndTime() { - LocalDate now = LocalDate.now(); - Month month = Month.of(now.getMonth().firstMonthOfQuarter().getValue()).plus(2L); - return LocalDateTime.of(LocalDate.of(now.getYear(), month, month.length(now.isLeapYear())), LocalTime.MAX); - } - - /** - * 本半年开始时间 - * - * @return - */ - public static LocalDateTime halfYearStartTime() { - LocalDate now = LocalDate.now(); - Month month = (now.getMonthValue() > 6) ? Month.JULY : Month.JANUARY; - return LocalDateTime.of(LocalDate.of(now.getYear(), month, 1), LocalTime.MIN); - } - - /** - * 本半年结束时间 - * - * @return - */ - public static LocalDateTime halfYearEndTime() { - LocalDate now = LocalDate.now(); - Month month = (now.getMonthValue() > 6) ? Month.DECEMBER : Month.JUNE; - return LocalDateTime.of(LocalDate.of(now.getYear(), month, month.length(now.isLeapYear())), LocalTime.MAX); - } - - /** - * 本年开始时间 - * - * @return - */ - public static LocalDateTime yearStartTime() { - return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.firstDayOfYear()), LocalTime.MIN); - } - - /** - * 本年结束时间 - * - * @return - */ - public static LocalDateTime yearEndTime() { - return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.lastDayOfYear()), LocalTime.MAX); - } - - /** - * 上周开始时间 - * - * @return - */ - public static LocalDateTime lastWeekStartTime() { - LocalDate lastWeek = LocalDate.now().minus(1L, ChronoUnit.WEEKS); - return LocalDateTime.of(lastWeek.minusDays(lastWeek.getDayOfWeek().getValue() - 1), LocalTime.MIN); - } - - /** - * 上周结束时间 - * - * @return - */ - public static LocalDateTime lastWeekEndTime() { - LocalDate lastWeek = LocalDate.now().minus(1L, ChronoUnit.WEEKS); - return LocalDateTime.of(lastWeek.plusDays(7 - lastWeek.getDayOfWeek().getValue()), LocalTime.MAX); - } - - /** - * 上月开始时间 - * - * @return - */ - public static LocalDateTime lastMonthStartTime() { - return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.MONTHS).with(TemporalAdjusters.firstDayOfMonth()), LocalTime.MIN); - } - - /** - * 上月结束时间 - * - * @return - */ - public static LocalDateTime lastMonthEndTime() { - return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.MONTHS).with(TemporalAdjusters.lastDayOfMonth()), LocalTime.MAX); - } - - /** - * 上季度开始时间 - * - * @return - */ - public static LocalDateTime lastQuarterStartTime() { - LocalDate now = LocalDate.now(); - Month firstMonthOfQuarter = Month.of(now.getMonth().firstMonthOfQuarter().getValue()); - Month firstMonthOfLastQuarter = firstMonthOfQuarter.minus(3L); - int yearOfLastQuarter = firstMonthOfQuarter.getValue() < 4 ? now.getYear() - 1 : now.getYear(); - return LocalDateTime.of(LocalDate.of(yearOfLastQuarter, firstMonthOfLastQuarter, 1), LocalTime.MIN); - } - - /** - * 上季度结束时间 - * - * @return - */ - public static LocalDateTime lastQuarterEndTime() { - LocalDate now = LocalDate.now(); - Month firstMonthOfQuarter = Month.of(now.getMonth().firstMonthOfQuarter().getValue()); - Month firstMonthOfLastQuarter = firstMonthOfQuarter.minus(1L); - int yearOfLastQuarter = firstMonthOfQuarter.getValue() < 4 ? now.getYear() - 1 : now.getYear(); - return LocalDateTime.of(LocalDate.of(yearOfLastQuarter, firstMonthOfLastQuarter, firstMonthOfLastQuarter.maxLength()), LocalTime.MAX); - } - - /** - * 上半年开始时间 - * - * @return - */ - public static LocalDateTime lastHalfYearStartTime() { - LocalDate now = LocalDate.now(); - int lastHalfYear = (now.getMonthValue() > 6) ? now.getYear() : now.getYear() - 1; - Month firstMonthOfLastHalfYear = (now.getMonthValue() > 6) ? Month.JANUARY : Month.JULY; - return LocalDateTime.of(LocalDate.of(lastHalfYear, firstMonthOfLastHalfYear, 1), LocalTime.MIN); - } - - /** - * 上半年结束时间 - * - * @return - */ - public static LocalDateTime lastHalfYearEndTime() { - LocalDate now = LocalDate.now(); - int lastHalfYear = (now.getMonthValue() > 6) ? now.getYear() : now.getYear() - 1; - Month lastMonthOfLastHalfYear = (now.getMonthValue() > 6) ? Month.JUNE : Month.DECEMBER; - return LocalDateTime.of(LocalDate.of(lastHalfYear, lastMonthOfLastHalfYear, lastMonthOfLastHalfYear.maxLength()), LocalTime.MAX); - } - - /** - * 上一年开始时间 - * - * @return - */ - public static LocalDateTime lastYearStartTime() { - return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.YEARS).with(TemporalAdjusters.firstDayOfYear()), LocalTime.MIN); - } - - /** - * 上一年结束时间 - * - * @return - */ - public static LocalDateTime lastYearEndTime() { - return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.YEARS).with(TemporalAdjusters.lastDayOfYear()), LocalTime.MAX); - } - - /** - * 下周开始时间 - * - * @return - */ - public static LocalDateTime nextWeekStartTime() { - LocalDate nextWeek = LocalDate.now().plus(1L, ChronoUnit.WEEKS); - return LocalDateTime.of(nextWeek.minusDays(nextWeek.getDayOfWeek().getValue() - 1), LocalTime.MIN); - } - - /** - * 下周结束时间 - * - * @return - */ - public static LocalDateTime nextWeekEndTime() { - LocalDate nextWeek = LocalDate.now().plus(1L, ChronoUnit.WEEKS); - return LocalDateTime.of(nextWeek.plusDays(7 - nextWeek.getDayOfWeek().getValue()), LocalTime.MAX); - } - - /** - * 下月开始时间 - * - * @return - */ - public static LocalDateTime nextMonthStartTime() { - return LocalDateTime.of(LocalDate.now().plus(1L, ChronoUnit.MONTHS).with(TemporalAdjusters.firstDayOfMonth()), LocalTime.MIN); - } - - /** - * 下月结束时间 - * - * @return - */ - public static LocalDateTime nextMonthEndTime() { - return LocalDateTime.of(LocalDate.now().plus(1L, ChronoUnit.MONTHS).with(TemporalAdjusters.lastDayOfMonth()), LocalTime.MAX); - } - - /** - * 下季度开始时间 - * - * @return - */ - public static LocalDateTime nextQuarterStartTime() { - LocalDate now = LocalDate.now(); - Month firstMonthOfQuarter = Month.of(now.getMonth().firstMonthOfQuarter().getValue()); - Month firstMonthOfNextQuarter = firstMonthOfQuarter.plus(3L); - int yearOfNextQuarter = firstMonthOfQuarter.getValue() > 9 ? now.getYear() + 1 : now.getYear(); - return LocalDateTime.of(LocalDate.of(yearOfNextQuarter, firstMonthOfNextQuarter, 1), LocalTime.MIN); - } - - /** - * 下季度结束时间 - * - * @return - */ - public static LocalDateTime nextQuarterEndTime() { - LocalDate now = LocalDate.now(); - Month firstMonthOfQuarter = Month.of(now.getMonth().firstMonthOfQuarter().getValue()); - Month firstMonthOfNextQuarter = firstMonthOfQuarter.plus(5L); - int yearOfNextQuarter = firstMonthOfQuarter.getValue() > 9 ? now.getYear() + 1 : now.getYear(); - return LocalDateTime.of(LocalDate.of(yearOfNextQuarter, firstMonthOfNextQuarter, firstMonthOfNextQuarter.maxLength()), LocalTime.MAX); - } - - /** - * 上半年开始时间 - * - * @return - */ - public static LocalDateTime nextHalfYearStartTime() { - LocalDate now = LocalDate.now(); - int nextHalfYear = (now.getMonthValue() > 6) ? now.getYear() + 1 : now.getYear(); - Month firstMonthOfNextHalfYear = (now.getMonthValue() > 6) ? Month.JANUARY : Month.JULY; - return LocalDateTime.of(LocalDate.of(nextHalfYear, firstMonthOfNextHalfYear, 1), LocalTime.MIN); - } - - /** - * 上半年结束时间 - * - * @return - */ - public static LocalDateTime nextHalfYearEndTime() { - LocalDate now = LocalDate.now(); - int lastHalfYear = (now.getMonthValue() > 6) ? now.getYear() + 1 : now.getYear(); - Month lastMonthOfNextHalfYear = (now.getMonthValue() > 6) ? Month.JUNE : Month.DECEMBER; - return LocalDateTime.of(LocalDate.of(lastHalfYear, lastMonthOfNextHalfYear, lastMonthOfNextHalfYear.maxLength()), LocalTime.MAX); - } - - /** - * 下一年开始时间 - * - * @return - */ - public static LocalDateTime nextYearStartTime() { - return LocalDateTime.of(LocalDate.now().plus(1L, ChronoUnit.YEARS).with(TemporalAdjusters.firstDayOfYear()), LocalTime.MIN); - } - - /** - * 下一年结束时间 - * - * @return - */ - public static LocalDateTime nextYearEndTime() { - return LocalDateTime.of(LocalDate.now().plus(1L, ChronoUnit.YEARS).with(TemporalAdjusters.lastDayOfYear()), LocalTime.MAX); - } + /** + * 当前时间 + * + * @return + */ + public static LocalDateTime now() { + return LocalDateTime.now(); + } + + /** + * Date 转 LocalDateTime + * + * @return + */ + public static LocalDateTime convert(Date date) { + return LocalDateTime.ofInstant(Instant.ofEpochMilli(date.getTime()), ZoneId.systemDefault()); + } + + /** + * LocalDateTime 转 Date + * + * @return + */ + public static Date convert(LocalDateTime localDateTime) { + return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant()); + } + + /** + * 今天开始时间 + * + * @return + */ + public static LocalDateTime todayStartTime() { + return LocalDateTime.of(LocalDate.now(), LocalTime.MIN); + } + + /** + * 今天结束时间 + * + * @return + */ + public static LocalDateTime todayEndTime() { + return LocalDateTime.of(LocalDate.now(), LocalTime.MAX); + } + + /** + * 昨天开始时间 + * + * @return + */ + public static LocalDateTime yesterdayStartTime() { + return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.DAYS), LocalTime.MIN); + } + + /** + * 昨天结束时间 + * + * @return + */ + public static LocalDateTime yesterdayEndTime() { + return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.DAYS), LocalTime.MAX); + } + + /** + * 最近7天开始时间 + * + * @return + */ + public static LocalDateTime last7DaysStartTime() { + return LocalDateTime.of(LocalDate.now().minus(6L, ChronoUnit.DAYS), LocalTime.MIN); + } + + /** + * 最近7天结束时间 + * + * @return + */ + public static LocalDateTime last7DaysEndTime() { + return LocalDateTime.of(LocalDate.now(), LocalTime.MAX); + } + + /** + * 最近30天开始时间 + * + * @return + */ + public static LocalDateTime last30DaysStartTime() { + return LocalDateTime.of(LocalDate.now().minus(29L, ChronoUnit.DAYS), LocalTime.MIN); + } + + /** + * 最近30天结束时间 + * + * @return + */ + public static LocalDateTime last30DaysEndTime() { + return LocalDateTime.of(LocalDate.now(), LocalTime.MAX); + } + + /** + * 最近6月开始时间 + * + * @return + */ + public static LocalDateTime last6MonStartTime() { + return LocalDateTime.of(LocalDate.now().minus(5L, ChronoUnit.MONTHS), LocalTime.MIN); + } + + /** + * 最近6月结束时间 + * + * @return + */ + public static LocalDateTime last6MonEndTime() { + return LocalDateTime.of(LocalDate.now(), LocalTime.MAX); + } + + + /** + * 最近一年开始时间 + * + * @return + */ + public static LocalDateTime last1YearStartTime() { + return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.YEARS).plus(1L, ChronoUnit.DAYS), LocalTime.MIN); + } + + /** + * 最近一年结束时间 + * + * @return + */ + public static LocalDateTime last1YearEndTime() { + return LocalDateTime.of(LocalDate.now(), LocalTime.MAX); + } + + /** + * 本周开始时间 + * + * @return + */ + public static LocalDateTime weekStartTime() { + LocalDate now = LocalDate.now(); + return LocalDateTime.of(now.minusDays(now.getDayOfWeek().getValue() - 1), LocalTime.MIN); + } + + /** + * 本周结束时间 + * + * @return + */ + public static LocalDateTime weekEndTime() { + LocalDate now = LocalDate.now(); + return LocalDateTime.of(now.plusDays(7 - now.getDayOfWeek().getValue()), LocalTime.MAX); + } + + /** + * 本月开始时间 + * + * @return + */ + public static LocalDateTime monthStartTime() { + return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()), LocalTime.MIN); + } + + /** + * 本月结束时间 + * + * @return + */ + public static LocalDateTime monthEndTime() { + return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()), LocalTime.MAX); + } + + /** + * 本季度开始时间 + * + * @return + */ + public static LocalDateTime quarterStartTime() { + LocalDate now = LocalDate.now(); + Month month = Month.of(now.getMonth().firstMonthOfQuarter().getValue()); + return LocalDateTime.of(LocalDate.of(now.getYear(), month, 1), LocalTime.MIN); + } + + /** + * 本季度结束时间 + * + * @return + */ + public static LocalDateTime quarterEndTime() { + LocalDate now = LocalDate.now(); + Month month = Month.of(now.getMonth().firstMonthOfQuarter().getValue()).plus(2L); + return LocalDateTime.of(LocalDate.of(now.getYear(), month, month.length(now.isLeapYear())), LocalTime.MAX); + } + + /** + * 本半年开始时间 + * + * @return + */ + public static LocalDateTime halfYearStartTime() { + LocalDate now = LocalDate.now(); + Month month = (now.getMonthValue() > 6) ? Month.JULY : Month.JANUARY; + return LocalDateTime.of(LocalDate.of(now.getYear(), month, 1), LocalTime.MIN); + } + + /** + * 本半年结束时间 + * + * @return + */ + public static LocalDateTime halfYearEndTime() { + LocalDate now = LocalDate.now(); + Month month = (now.getMonthValue() > 6) ? Month.DECEMBER : Month.JUNE; + return LocalDateTime.of(LocalDate.of(now.getYear(), month, month.length(now.isLeapYear())), LocalTime.MAX); + } + + /** + * 本年开始时间 + * + * @return + */ + public static LocalDateTime yearStartTime() { + return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.firstDayOfYear()), LocalTime.MIN); + } + + /** + * 本年结束时间 + * + * @return + */ + public static LocalDateTime yearEndTime() { + return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.lastDayOfYear()), LocalTime.MAX); + } + + /** + * 上周开始时间 + * + * @return + */ + public static LocalDateTime lastWeekStartTime() { + LocalDate lastWeek = LocalDate.now().minus(1L, ChronoUnit.WEEKS); + return LocalDateTime.of(lastWeek.minusDays(lastWeek.getDayOfWeek().getValue() - 1), LocalTime.MIN); + } + + /** + * 上周结束时间 + * + * @return + */ + public static LocalDateTime lastWeekEndTime() { + LocalDate lastWeek = LocalDate.now().minus(1L, ChronoUnit.WEEKS); + return LocalDateTime.of(lastWeek.plusDays(7 - lastWeek.getDayOfWeek().getValue()), LocalTime.MAX); + } + + /** + * 上月开始时间 + * + * @return + */ + public static LocalDateTime lastMonthStartTime() { + return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.MONTHS).with(TemporalAdjusters.firstDayOfMonth()), LocalTime.MIN); + } + + /** + * 上月结束时间 + * + * @return + */ + public static LocalDateTime lastMonthEndTime() { + return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.MONTHS).with(TemporalAdjusters.lastDayOfMonth()), LocalTime.MAX); + } + + /** + * 上季度开始时间 + * + * @return + */ + public static LocalDateTime lastQuarterStartTime() { + LocalDate now = LocalDate.now(); + Month firstMonthOfQuarter = Month.of(now.getMonth().firstMonthOfQuarter().getValue()); + Month firstMonthOfLastQuarter = firstMonthOfQuarter.minus(3L); + int yearOfLastQuarter = firstMonthOfQuarter.getValue() < 4 ? now.getYear() - 1 : now.getYear(); + return LocalDateTime.of(LocalDate.of(yearOfLastQuarter, firstMonthOfLastQuarter, 1), LocalTime.MIN); + } + + /** + * 上季度结束时间 + * + * @return + */ + public static LocalDateTime lastQuarterEndTime() { + LocalDate now = LocalDate.now(); + Month firstMonthOfQuarter = Month.of(now.getMonth().firstMonthOfQuarter().getValue()); + Month firstMonthOfLastQuarter = firstMonthOfQuarter.minus(1L); + int yearOfLastQuarter = firstMonthOfQuarter.getValue() < 4 ? now.getYear() - 1 : now.getYear(); + return LocalDateTime.of(LocalDate.of(yearOfLastQuarter, firstMonthOfLastQuarter, firstMonthOfLastQuarter.maxLength()), LocalTime.MAX); + } + + /** + * 上半年开始时间 + * + * @return + */ + public static LocalDateTime lastHalfYearStartTime() { + LocalDate now = LocalDate.now(); + int lastHalfYear = (now.getMonthValue() > 6) ? now.getYear() : now.getYear() - 1; + Month firstMonthOfLastHalfYear = (now.getMonthValue() > 6) ? Month.JANUARY : Month.JULY; + return LocalDateTime.of(LocalDate.of(lastHalfYear, firstMonthOfLastHalfYear, 1), LocalTime.MIN); + } + + /** + * 上半年结束时间 + * + * @return + */ + public static LocalDateTime lastHalfYearEndTime() { + LocalDate now = LocalDate.now(); + int lastHalfYear = (now.getMonthValue() > 6) ? now.getYear() : now.getYear() - 1; + Month lastMonthOfLastHalfYear = (now.getMonthValue() > 6) ? Month.JUNE : Month.DECEMBER; + return LocalDateTime.of(LocalDate.of(lastHalfYear, lastMonthOfLastHalfYear, lastMonthOfLastHalfYear.maxLength()), LocalTime.MAX); + } + + /** + * 上一年开始时间 + * + * @return + */ + public static LocalDateTime lastYearStartTime() { + return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.YEARS).with(TemporalAdjusters.firstDayOfYear()), LocalTime.MIN); + } + + /** + * 上一年结束时间 + * + * @return + */ + public static LocalDateTime lastYearEndTime() { + return LocalDateTime.of(LocalDate.now().minus(1L, ChronoUnit.YEARS).with(TemporalAdjusters.lastDayOfYear()), LocalTime.MAX); + } + + /** + * 下周开始时间 + * + * @return + */ + public static LocalDateTime nextWeekStartTime() { + LocalDate nextWeek = LocalDate.now().plus(1L, ChronoUnit.WEEKS); + return LocalDateTime.of(nextWeek.minusDays(nextWeek.getDayOfWeek().getValue() - 1), LocalTime.MIN); + } + + /** + * 下周结束时间 + * + * @return + */ + public static LocalDateTime nextWeekEndTime() { + LocalDate nextWeek = LocalDate.now().plus(1L, ChronoUnit.WEEKS); + return LocalDateTime.of(nextWeek.plusDays(7 - nextWeek.getDayOfWeek().getValue()), LocalTime.MAX); + } + + /** + * 下月开始时间 + * + * @return + */ + public static LocalDateTime nextMonthStartTime() { + return LocalDateTime.of(LocalDate.now().plus(1L, ChronoUnit.MONTHS).with(TemporalAdjusters.firstDayOfMonth()), LocalTime.MIN); + } + + /** + * 下月结束时间 + * + * @return + */ + public static LocalDateTime nextMonthEndTime() { + return LocalDateTime.of(LocalDate.now().plus(1L, ChronoUnit.MONTHS).with(TemporalAdjusters.lastDayOfMonth()), LocalTime.MAX); + } + + /** + * 下季度开始时间 + * + * @return + */ + public static LocalDateTime nextQuarterStartTime() { + LocalDate now = LocalDate.now(); + Month firstMonthOfQuarter = Month.of(now.getMonth().firstMonthOfQuarter().getValue()); + Month firstMonthOfNextQuarter = firstMonthOfQuarter.plus(3L); + int yearOfNextQuarter = firstMonthOfQuarter.getValue() > 9 ? now.getYear() + 1 : now.getYear(); + return LocalDateTime.of(LocalDate.of(yearOfNextQuarter, firstMonthOfNextQuarter, 1), LocalTime.MIN); + } + + /** + * 下季度结束时间 + * + * @return + */ + public static LocalDateTime nextQuarterEndTime() { + LocalDate now = LocalDate.now(); + Month firstMonthOfQuarter = Month.of(now.getMonth().firstMonthOfQuarter().getValue()); + Month firstMonthOfNextQuarter = firstMonthOfQuarter.plus(5L); + int yearOfNextQuarter = firstMonthOfQuarter.getValue() > 9 ? now.getYear() + 1 : now.getYear(); + return LocalDateTime.of(LocalDate.of(yearOfNextQuarter, firstMonthOfNextQuarter, firstMonthOfNextQuarter.maxLength()), LocalTime.MAX); + } + + /** + * 上半年开始时间 + * + * @return + */ + public static LocalDateTime nextHalfYearStartTime() { + LocalDate now = LocalDate.now(); + int nextHalfYear = (now.getMonthValue() > 6) ? now.getYear() + 1 : now.getYear(); + Month firstMonthOfNextHalfYear = (now.getMonthValue() > 6) ? Month.JANUARY : Month.JULY; + return LocalDateTime.of(LocalDate.of(nextHalfYear, firstMonthOfNextHalfYear, 1), LocalTime.MIN); + } + + /** + * 上半年结束时间 + * + * @return + */ + public static LocalDateTime nextHalfYearEndTime() { + LocalDate now = LocalDate.now(); + int lastHalfYear = (now.getMonthValue() > 6) ? now.getYear() + 1 : now.getYear(); + Month lastMonthOfNextHalfYear = (now.getMonthValue() > 6) ? Month.JUNE : Month.DECEMBER; + return LocalDateTime.of(LocalDate.of(lastHalfYear, lastMonthOfNextHalfYear, lastMonthOfNextHalfYear.maxLength()), LocalTime.MAX); + } + + /** + * 下一年开始时间 + * + * @return + */ + public static LocalDateTime nextYearStartTime() { + return LocalDateTime.of(LocalDate.now().plus(1L, ChronoUnit.YEARS).with(TemporalAdjusters.firstDayOfYear()), LocalTime.MIN); + } + + /** + * 下一年结束时间 + * + * @return + */ + public static LocalDateTime nextYearEndTime() { + return LocalDateTime.of(LocalDate.now().plus(1L, ChronoUnit.YEARS).with(TemporalAdjusters.lastDayOfYear()), LocalTime.MAX); + } } diff --git a/src/main/java/org/springblade/modules/business/vo/AppealMediationVO.java b/src/main/java/org/springblade/modules/business/vo/AppealMediationVO.java index b648e83..f08a8bb 100644 --- a/src/main/java/org/springblade/modules/business/vo/AppealMediationVO.java +++ b/src/main/java/org/springblade/modules/business/vo/AppealMediationVO.java @@ -54,6 +54,11 @@ public class AppealMediationVO implements Serializable { */ private Long streetId; + /** + * 所属街道字典id + */ + private String streetName; + /** * 纠纷字典id */ @@ -64,11 +69,26 @@ public class AppealMediationVO implements Serializable { */ private String disputeName; + /** + * 纠纷等级(事件等级), 0:简单, 1:一般, 2:重大, 3:疑难 + */ + private Integer disputeLevel; + + /** + * 纠纷等级(事件等级), 0:简单, 1:一般, 2:重大, 3:疑难 + */ + private String disputeLevelName; + /** * 诉求状态 */ private Integer appealStatus; + /** + * 诉求状态 + */ + private String appealStatusName; + /** * 何单位处理过-单位id */ @@ -113,6 +133,7 @@ public class AppealMediationVO implements Serializable { * 是否越级上报, 0:否, 1:是 */ private Integer skipGrant; + /** * 越级等级, 0:中央, 1:省级, 2:市级, 3:区县 */ @@ -140,15 +161,19 @@ public class AppealMediationVO implements Serializable { */ private String dutyDeptIds; + /** + * 责任单位id列表, 以逗号分割 + */ + private String dutyDeptNames; + /** * 抄送单位id列表, 以逗号分割 */ private String copyDeptIds; - /** - * 纠纷等级(事件等级), 0:简单, 1:一般, 2:重大, 3:疑难 + * 抄送单位id列表, 以逗号分割 */ - private Integer disputeLevel; + private String copyDeptNames; /** * 反馈时限