From 1953732ef361df25dafd92fa5bb632679d09fa5f Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Tue, 10 Jan 2023 14:04:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xkrs/controller/FirePointController.java | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/src/main/java/com/xkrs/controller/FirePointController.java b/src/main/java/com/xkrs/controller/FirePointController.java index 8b09c6b..8806300 100644 --- a/src/main/java/com/xkrs/controller/FirePointController.java +++ b/src/main/java/com/xkrs/controller/FirePointController.java @@ -3,10 +3,8 @@ package com.xkrs.controller; import com.xkrs.common.encapsulation.PromptMessageEnum; import com.xkrs.common.tool.TokenUtil; import com.xkrs.dao.FirePointDao; -import com.xkrs.dao.ShanDongFirePointDao; import com.xkrs.dao.SysUserDao; import com.xkrs.model.entity.FirePointEntity; -import com.xkrs.model.entity.ShanDongFirePointEntity; import com.xkrs.model.entity.SysUserEntity; import com.xkrs.model.qo.AuditFireTypeQo; import com.xkrs.model.qo.FirePointQo; @@ -19,12 +17,9 @@ import org.apache.hc.core5.util.TextUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 javax.annotation.Resource; -import javax.persistence.criteria.Predicate; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.transaction.Transactional; @@ -51,9 +46,6 @@ public class FirePointController { @Resource private FirePointDao firePointDao; - @Resource - private ShanDongFirePointDao shanDongFirePointDao; - @Resource private StreetService streetService; @@ -98,20 +90,6 @@ public class FirePointController { } } - /** - * 查询山东临时火点表 - * - * @return - */ - @GetMapping("/queryshandongfirepointlist") - public String queryShanDongFirePointList() { - List 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,将火点编号对应的火点从山东火点表转存到火点表 @@ -140,26 +118,6 @@ public class FirePointController { 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 specification = (root, criteriaQuery, criteriaBuilder) -> { - List 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 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) public String downloadVipUserFirePoint(HttpServletResponse response, HttpServletRequest request) { return firePointService.downloadVipUserFilePoint(request, response);