删除无用数据表

This commit is contained in:
liuchengqian 2023-01-10 14:04:05 +08:00
parent 69c10fed80
commit 1953732ef3

View File

@ -3,10 +3,8 @@ package com.xkrs.controller;
import com.xkrs.common.encapsulation.PromptMessageEnum; import com.xkrs.common.encapsulation.PromptMessageEnum;
import com.xkrs.common.tool.TokenUtil; import com.xkrs.common.tool.TokenUtil;
import com.xkrs.dao.FirePointDao; import com.xkrs.dao.FirePointDao;
import com.xkrs.dao.ShanDongFirePointDao;
import com.xkrs.dao.SysUserDao; import com.xkrs.dao.SysUserDao;
import com.xkrs.model.entity.FirePointEntity; import com.xkrs.model.entity.FirePointEntity;
import com.xkrs.model.entity.ShanDongFirePointEntity;
import com.xkrs.model.entity.SysUserEntity; import com.xkrs.model.entity.SysUserEntity;
import com.xkrs.model.qo.AuditFireTypeQo; import com.xkrs.model.qo.AuditFireTypeQo;
import com.xkrs.model.qo.FirePointQo; import com.xkrs.model.qo.FirePointQo;
@ -19,12 +17,9 @@ import org.apache.hc.core5.util.TextUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.persistence.criteria.Predicate;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional; import javax.transaction.Transactional;
@ -51,9 +46,6 @@ public class FirePointController {
@Resource @Resource
private FirePointDao firePointDao; private FirePointDao firePointDao;
@Resource
private ShanDongFirePointDao shanDongFirePointDao;
@Resource @Resource
private StreetService streetService; private StreetService streetService;
@ -98,20 +90,6 @@ public class FirePointController {
} }
} }
/**
* 查询山东临时火点表
*
* @return
*/
@GetMapping("/queryshandongfirepointlist")
public String queryShanDongFirePointList() {
List<ShanDongFirePointEntity> shanDongFirePointList = shanDongFirePointDao.findAll(Sort.by(Sort.Direction.DESC, "satelliteTime"));
if (shanDongFirePointList.isEmpty()) {
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时还没有火点数据", locale);
}
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, shanDongFirePointList, locale);
}
/** /**
* 将山东临时火点表中的火点根据火点编号更新审核状态 * 将山东临时火点表中的火点根据火点编号更新审核状态
* 操作1如果verifyState==1将火点编号对应的火点从山东火点表转存到火点表 * 操作1如果verifyState==1将火点编号对应的火点从山东火点表转存到火点表
@ -140,26 +118,6 @@ public class FirePointController {
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功", locale); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功", locale);
} }
@GetMapping("/queryshandongfirepointbytime")
public String queryShanDongFirePointByTime(@RequestParam(required = false, value = "startTime") String startTime, @RequestParam(required = false, value = "endTime") String endTime) {
Specification<ShanDongFirePointEntity> specification = (root, criteriaQuery, criteriaBuilder) -> {
List<Predicate> list = new ArrayList<>();
if (startTime != null && !"".equals(startTime)) {
list.add(criteriaBuilder.greaterThanOrEqualTo(root.get("satelliteTime").as(String.class), startTime));
}
if (endTime != null && !"".equals(endTime)) {
list.add(criteriaBuilder.lessThanOrEqualTo(root.get("satelliteTime").as(String.class), endTime));
}
Predicate[] predicates = new Predicate[list.size()];
return criteriaBuilder.and(list.toArray(predicates));
};
List<ShanDongFirePointEntity> shanDongFirePointList = shanDongFirePointDao.findAll(specification, Sort.by(Sort.Direction.DESC, "satelliteTime"));
if (shanDongFirePointList.isEmpty()) {
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时还没有火点数据", locale);
}
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, shanDongFirePointList, locale);
}
@RequestMapping(value = "/download/vipuserfirepoint", method = RequestMethod.GET) @RequestMapping(value = "/download/vipuserfirepoint", method = RequestMethod.GET)
public String downloadVipUserFirePoint(HttpServletResponse response, HttpServletRequest request) { public String downloadVipUserFirePoint(HttpServletResponse response, HttpServletRequest request) {
return firePointService.downloadVipUserFilePoint(request, response); return firePointService.downloadVipUserFilePoint(request, response);