删除无用代码

This commit is contained in:
liuchengqian 2023-03-10 14:46:24 +08:00
parent a87056e2d4
commit 42b3a80f14
3 changed files with 1 additions and 113 deletions

View File

@ -1,8 +1,6 @@
package com.xkrs.controller; package com.xkrs.controller;
import com.xkrs.common.encapsulation.PromptMessageEnum; import com.xkrs.common.encapsulation.PromptMessageEnum;
import com.xkrs.dao.SysUserDao;
import com.xkrs.helper.FirePointQueryManager;
import com.xkrs.service.FirePointService; import com.xkrs.service.FirePointService;
import com.xkrs.service.StreetService; import com.xkrs.service.StreetService;
import com.xkrs.service.impl.FirePointServiceImpl; import com.xkrs.service.impl.FirePointServiceImpl;
@ -29,31 +27,9 @@ public class FirePointController {
@Resource @Resource
private FirePointService firePointService; private FirePointService firePointService;
@Resource
private SysUserDao sysUserDao;
@Resource @Resource
private StreetService streetService; private StreetService streetService;
@Resource
private FirePointQueryManager firePointQueryManager;
// /**
// * Complete
// */
// @RequestMapping(value = "/download/vipuserfirepoint", method = RequestMethod.GET)
// public String downloadVipUserFirePoint(HttpServletResponse response, HttpServletRequest request) {
// return firePointService.downloadVipUserFilePoint(request, response);
// }
// /**
// * Complete
// */
// @RequestMapping(value = "/download/firepoint", method = RequestMethod.GET)
// public String downloadFirePoint(HttpServletResponse response, HttpServletRequest request, @RequestParam(value = "ids") String ids) {
// return firePointService.downloadFirePoint(request, response, ids);
// }
/** /**
* 查询火点播报无token * 查询火点播报无token
* *

View File

@ -2,10 +2,6 @@ package com.xkrs.service;
public interface FirePointService { public interface FirePointService {
// String downloadVipUserFilePoint(HttpServletRequest request, HttpServletResponse response);
// String downloadFirePoint(HttpServletRequest request, HttpServletResponse response, String ids);
/** /**
* 查询火点播报无token * 查询火点播报无token
* *

View File

@ -1,18 +1,14 @@
package com.xkrs.service.impl; package com.xkrs.service.impl;
import com.xkrs.common.encapsulation.PromptMessageEnum; import com.xkrs.common.encapsulation.PromptMessageEnum;
import com.xkrs.service.FirePointService;
import com.xkrs.dao.CountyCodeWeiXinDao;
import com.xkrs.dao.FirePointOrdinaryDao; import com.xkrs.dao.FirePointOrdinaryDao;
import com.xkrs.dao.StreetDao;
import com.xkrs.dao.SysUserDao; import com.xkrs.dao.SysUserDao;
import com.xkrs.helper.FirePointQueryManager; import com.xkrs.helper.FirePointQueryManager;
import com.xkrs.model.bean.FirePointQueryResultBean; import com.xkrs.model.bean.FirePointQueryResultBean;
import com.xkrs.model.entity.FirePointOrdinaryEntity; import com.xkrs.model.entity.FirePointOrdinaryEntity;
import com.xkrs.model.entity.SysUserEntity; import com.xkrs.model.entity.SysUserEntity;
import com.xkrs.model.helper.PushHelper;
import com.xkrs.model.vo.AllFirePointVo; import com.xkrs.model.vo.AllFirePointVo;
import com.xkrs.service.StreetService; import com.xkrs.service.FirePointService;
import com.xkrs.utilsnew.DateTimeUtils; import com.xkrs.utilsnew.DateTimeUtils;
import com.xkrs.utilsnew.FirePointConvertUtils; import com.xkrs.utilsnew.FirePointConvertUtils;
import com.xkrs.utilsnew.TokenUtil; import com.xkrs.utilsnew.TokenUtil;
@ -34,9 +30,6 @@ import java.util.Locale;
import static com.xkrs.common.encapsulation.OutputEncapsulation.outputEncapsulationObject; import static com.xkrs.common.encapsulation.OutputEncapsulation.outputEncapsulationObject;
/**
* @author XinYi Song
*/
@CacheConfig(cacheNames = "FirePointServiceCache") @CacheConfig(cacheNames = "FirePointServiceCache")
@Service @Service
public class FirePointServiceImpl implements FirePointService { public class FirePointServiceImpl implements FirePointService {
@ -48,88 +41,12 @@ public class FirePointServiceImpl implements FirePointService {
@Resource @Resource
private SysUserDao sysUserDao; private SysUserDao sysUserDao;
@Resource
private StreetDao streetDao;
@Resource
private CountyCodeWeiXinDao countyCodeWeiXinDao;
@Resource
private StreetService streetService;
@Resource
private PushHelper pushHelper;
@Resource @Resource
private FirePointQueryManager firePointQueryManager; private FirePointQueryManager firePointQueryManager;
@Resource @Resource
private FirePointOrdinaryDao firePointOrdinaryDao; private FirePointOrdinaryDao firePointOrdinaryDao;
// /**
// * 下载VIP用户火点数据
// *
// *
// *
// @Query(value = "select a.really_name 姓名, a.county_name 所在市, a.telephone 手机号, a.vip_level vip, b.satellite_time 扫描时间, " + "round(cast(b.longitude as numeric) ,6) 经度, round(cast(b.latitude as numeric) ,6) 纬度, b.fire_point_address 详细地址 from sys_user a left join fire_point b on " + "case when left(a.county_code, 4) = '0000' then left(b.county_code, 4) = left(a.county_code, 4) " + "when left(a.county_code, 2) = '00' then left(b.county_code, 2) = left(a.county_code, 2) " + "else left(b.county_code, 2) = left(a.county_code, 2) end where a.vip_level > 0 and satellite_time > ?1", nativeQuery = true)
// List<Map<String, String>> downloadFirePointByVip(String yesterday);
//
// */
// @Override
// public String downloadVipUserFilePoint(HttpServletRequest request, HttpServletResponse response) {
// LocalDate now = LocalDate.now();
// List<Map<String, String>> list = firePointDao.downloadFirePointByVip(dateTimeToString(LocalDateTime.of(now.minusDays(1), LocalTime.MIN)));
// if (list.size() == 0) {
// return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "无数据!", locale);
// }
// int year = now.getYear();
// int month = now.getMonth().getValue();
// int day = now.getDayOfMonth();
// String fileName = String.format("%s_%s_%s_VIP用户火点信息列表.xlsx", year, month, day);
// response.setContentType("application/octet-stream; charset=UTF8");
// response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8));
// response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
// try {
// downloadXlsx(list, response.getOutputStream());
// } catch (IOException e) {
// log.error("download vip user's fire point fail: {}", e.getMessage());
// }
// return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "ok", locale);
// }
// @Override
// public String downloadFirePoint(HttpServletRequest request, HttpServletResponse response, String ids) {
//
// List<String> idList = ListUtils.toStringList(ids, ",");
// if (idList.isEmpty()) {
// return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "无数据!", locale);
// }
// List<Map<String, String>> list = new ArrayList<>();
// List<FirePointEntity> sourceList = firePointDao.findAllById(ListUtils.stringListToLongList(idList));
// for (FirePointEntity source : sourceList) {
// Map<String, String> record = new HashMap<>();
// record.put("所在区县", source.getCountyName());
// record.put("所在街道", source.getStreetName());
// record.put("发现时间", source.getSatelliteTime());
// record.put("地物类型", source.getLandType());
// record.put("经度", String.valueOf(source.getLongitude()));
// record.put("纬度", String.valueOf(source.getLatitude()));
// record.put("详细地址", source.getFirePointAddress());
// list.add(record);
// }
// LocalDate now = LocalDate.now();
// String fileName = String.format("%s_%s_%s_火点信息列表.xlsx", now.getYear(), now.getMonth().getValue(), now.getDayOfMonth());
// response.setContentType("application/octet-stream; charset=UTF8");
// response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8));
// response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
// try {
// downloadXlsx(list, response.getOutputStream());
// } catch (IOException e) {
// log.error("download fire point fail: {}", e.getMessage());
// }
// return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "ok", locale);
// }
/** /**
* 查询火点播报无token * 查询火点播报无token
* *
@ -171,7 +88,6 @@ public class FirePointServiceImpl implements FirePointService {
/** /**
* 查询今天的火点信息 * 查询今天的火点信息
*/ */
// @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null")
@Override @Override
public String selectTodayFirePoint(String token, String countyCode) { public String selectTodayFirePoint(String token, String countyCode) {