master
liuqingkun 3 years ago
parent eb3e45c6bd
commit af6b8f7a1a
  1. 45
      src/main/java/org/springblade/modules/business/controller/ReportController.java
  2. 6
      src/main/java/org/springblade/modules/business/mapper/AppealMapper.java
  3. 12
      src/main/java/org/springblade/modules/business/mapper/AppealMapper.xml
  4. 8
      src/main/java/org/springblade/modules/business/service/IAppealService.java
  5. 74
      src/main/java/org/springblade/modules/business/service/impl/AppealMediationServiceImpl.java
  6. 9
      src/main/java/org/springblade/modules/business/service/impl/AppealServiceImpl.java
  7. 104
      src/main/java/org/springblade/modules/business/service/impl/LargeScreenServiceImpl.java
  8. 876
      src/main/java/org/springblade/modules/business/utils/LocalDateTimeUtils.java
  9. 31
      src/main/java/org/springblade/modules/business/vo/AppealMediationVO.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<String, Object> dataList = largeScreenService.getAppealSubmitCountByLoc(timeFrame, startTime, endTime);
return R.data(getSortAndData(dataList));
Map<String, Object> 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<String, Object> dataList = largeScreenService.getImmediateCountByLoc(timeFrame, startTime, endTime);
return R.data(getSortAndData(dataList));
Map<String, Object> 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);

@ -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<Appeal> {
List<AppealExcel> exportAppeal(String appealStatus, String startTime, String endTime, String appealType, String windowId, String username);
List<AppealExcel> exportAppeal(String appealStatus, String startTime, String endTime, String appealType, String windowId, String username);
List<Map<String, Object>> getAppealByMon(@Param("start") String start, @Param("end") String end);
}

@ -37,4 +37,16 @@
</if>
ORDER BY a.first_reg_time DESC
</select>
<select id="getAppealByMon" resultType="map">
SELECT mon, COUNT(1) submit, SUM(if(`status` IN (2, 3), 1, 0)) mediation
FROM (
SELECT DATE_FORMAT(ma.first_reg_time, '%Y-%m') mon, ma.`status`
FROM mp_appeal ma
WHERE ma.is_deleted = FALSE AND IFNULL(ma.first_reg_time, 0) &lt;&gt; 0
and ma.first_reg_time between #{start} and #{end}
) t
GROUP BY mon
ORDER BY mon
</select>
</mapper>

@ -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<Appeal> {
List<Map<String, Object>> getAppealByMon(String start, String end);
}

@ -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<AppealMediationM
private final IAppealRegService appealRegService;
private final AppealVisitorMapper visitorMapper;
private final IAppealMediationFileService fileService;
private final IUserService userService;
@Override
public AppealMediationVO getNewestReg(String appealId) {
@ -70,9 +78,9 @@ public class AppealMediationServiceImpl extends BaseServiceImpl<AppealMediationM
if (Func.isNotEmpty(mediationList) && mediationList.size() > 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<AppealMediationM
// 若指定调解记录, 获取该记录对应的登记, 否则取最后一次登记记录
AppealReg appealReg = Func.isEmpty(mediation) ? appealRegService.getLastReg(appealId) : appealRegService.getById(mediation.getAppealRegId());
// 获取登记的来访人员
List<AppealVisitor> visitorList = visitorMapper.selectList(
Wrappers.<AppealVisitor>lambdaQuery().eq(AppealVisitor::getAppealRegId, appealReg.getId()));
List<AppealVisitor> visitorList = new ArrayList<>();
if (Func.isNotEmpty(appealReg)) {
visitorMapper.selectList(
Wrappers.<AppealVisitor>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<AppealMediationM
vo.setSkipGrant(appeal.getSkipGrant());
vo.setPersonNum(visitorList.size());
vo.setStreetId(appeal.getStreetId());
DictBiz street = DictBizCache.getById(appeal.getStreetId());
vo.setStreetName(Func.isEmpty(street) ? "" : street.getDictValue());
vo.setDisputeId(appeal.getDisputeId());
vo.setDisputeName(appeal.getDisputeName());
vo.setDisputeLevel(appeal.getDisputeLevel());
if (Func.isNotEmpty(appeal.getDisputeLevel())) {
// 纠纷等级(事件等级), 0:简单, 1:一般, 2:重大, 3:疑难
switch (appeal.getDisputeLevel()) {
case 0:
vo.setDisputeLevelName("简单");
break;
case 1:
vo.setDisputeLevelName("一般");
break;
case 2:
vo.setDisputeLevelName("重大");
break;
case 3:
vo.setDisputeLevelName("疑难");
break;
}
} else {
vo.setDisputeLevelName("");
}
vo.setDisposeDept(appealReg.getDisposeDept());
vo.setDisposeDeptName(appealReg.getDisposeDeptName());
vo.setProtocol(appealReg.getProtocol());
@ -168,6 +203,21 @@ public class AppealMediationServiceImpl extends BaseServiceImpl<AppealMediationM
vo.setRegTime(appealReg.getRegTime());
vo.setProblemDesc(appeal.getProblemDesc());
vo.setAppealStatus(appeal.getStatus());
// 诉求状态,诉求状态(办理状态)0:待处理, 1:正在处理, 2:达成协议, 3:调解成功
switch (appeal.getStatus()) {
case 0:
vo.setAppealStatusName("待处理");
break;
case 1:
vo.setAppealStatusName("正在处理");
break;
case 2:
vo.setAppealStatusName("达成协议");
break;
case 3:
vo.setAppealStatusName("调解成功");
break;
}
vo.setTalkingHisList(detailList);
if (Func.isNotEmpty(mediation)) {
@ -176,7 +226,23 @@ public class AppealMediationServiceImpl extends BaseServiceImpl<AppealMediationM
vo.setAttitude(mediation.getAttitude());
vo.setTalkingAdvice(mediation.getTalkingAdvice());
vo.setDutyDeptIds(mediation.getDutyDeptIds());
if (Func.isNotBlank(mediation.getDutyDeptIds())) {
List<User> deptNames = userService.list(Wrappers.<User>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<User> deptNames = userService.list(Wrappers.<User>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());

@ -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<AppealMapper, Appeal> implements IAppealService {
@Override
public List<Map<String, Object>> getAppealByMon(String start, String end) {
return baseMapper.getAppealByMon(start, end);
}
}

@ -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<String, Object> map = new HashMap<>();
// 化解成功状态数组
List<Integer> state = new ArrayList<>();
state.add(2);
state.add(3);
List<Integer> state = Arrays.asList(BusinessConstant.APPEAL_STATUS_AGREEMENT, BusinessConstant.APPEAL_STATUS_FINISH);
LambdaQueryWrapper<Appeal> wrapper = new LambdaQueryWrapper<>();
// 总化解数
@ -131,9 +132,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
@Override
public List<Appeal> getAppealList(LocalDateTime start, LocalDateTime end) {
// 化解成功状态数组
List<Integer> state = new ArrayList<>();
state.add(0);
state.add(1);
List<Integer> state = Arrays.asList(BusinessConstant.APPEAL_STATUS_WAITING, BusinessConstant.APPEAL_STATUS_HANDING);
LambdaQueryWrapper<Appeal> wrapper = new LambdaQueryWrapper<>();
// 待处理、正在处理
@ -162,35 +161,14 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
@Override
public Map<String, List<Object>> getAppealByMon(LocalDateTime start, LocalDateTime end) {
Map<String, List<Object>> map = new HashMap<>();
List<Object> dateList = new ArrayList<>();
List<Object> handlerCountList = new ArrayList<>();
List<Object> finishContList = new ArrayList<>();
map.put("dateList", dateList);
map.put("handlerCountList", handlerCountList);
map.put("finishContList", finishContList);
List<Integer> state = new ArrayList<>();
state.add(2);
state.add(3);
// 当月
Map<String, List<Object>> map0 = getStartAndEndTime(map, state, 0);
// 前1个月
Map<String, List<Object>> map1 = getStartAndEndTime(map0, state, 1);
// 前2个月
Map<String, List<Object>> map2 = getStartAndEndTime(map1, state, 2);
// 前3个月
Map<String, List<Object>> map3 = getStartAndEndTime(map2, state, 3);
DateTimeFormatter fmt = DateTimeFormatter.ofPattern(DateUtil.PATTERN_DATETIME);
List<Map<String, Object>> result = appealService.getAppealByMon(start.format(fmt), end.format(fmt));
// 前4个月
Map<String, List<Object>> map4 = getStartAndEndTime(map3, state, 4);
// 前5个月
return getStartAndEndTime(map4, state, 5);
Map<String, List<Object>> 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<Integer> state = new ArrayList<>();
state.add(2);
state.add(3);
List<Integer> state = Arrays.asList(BusinessConstant.APPEAL_STATUS_AGREEMENT, BusinessConstant.APPEAL_STATUS_FINISH);
LambdaQueryWrapper<Appeal> 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<Appeal> getImmediateList(String streetId, LocalDateTime start, LocalDateTime end, IPage<Appeal> page) {
LambdaQueryWrapper<Appeal> 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<String, List<Object>> getStartAndEndTime(Map<String, List<Object>> map, List<Integer> state, Integer month) {
List<Object> dateList = map.get("dateList");
List<Object> handlerCountList = map.get("handlerCountList");
List<Object> 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<Appeal> 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)) {

@ -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);
}
}

@ -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;
/**
* 反馈时限

Loading…
Cancel
Save