查找最近路段返回,接口调用日志添加

master
Zangzhipeng 1 year ago
parent c96bbb4ce2
commit cd48a61734
  1. BIN
      hiatmp-gateway/target/classes/com/hisense/hiatmp/gateway/filters/SsoFilter.class
  2. 7
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/controller/FtpController.java
  3. 187
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/controller/HighDangerController.java
  4. 9
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/mapper/HighDangerMapper.java
  5. 4
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/service/HighDangerService.java
  6. 45
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/service/impl/HighDangerBaseServiceImpl.java
  7. 10
      hiatmp-hidden-danger-server/src/main/resources/sql-mapper/HighDangerMapper.xml
  8. 2
      hiatmp-model/src/main/java/com/hisense/hiatmp/model/common/HiddenDangerDTO.java
  9. 4
      hiatmp-model/src/main/java/com/hisense/hiatmp/model/common/ManualInvestigation.java
  10. 107
      log/test.log

@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
@ -62,7 +63,10 @@ public class FtpController {
@ApiImplicitParams({
@ApiImplicitParam(paramType="form", name="file", dataType="MultipartFile", required=true, value="文件")
})
public ServerResponse uploadFileToFtp(@RequestParam("file") MultipartFile mfile) {
public ServerResponse uploadFileToFtp(@RequestParam("file") MultipartFile mfile, HttpServletRequest request) {
log.info("/uploadFileToFtp(上传文件-通过file上传到ftp)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),mfile);
List<String> list = Arrays.asList(".jpg",".jpeg",".png",".bmp",".avi"
,".mov",".rmvb",".rm",".mp4");
//获取上传文件名,包含后缀
@ -83,6 +87,7 @@ public class FtpController {
} catch (Exception e) {
e.printStackTrace();
}
log.info("/uploadFileToFtp(保存 & 暂存人工排查)接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), url);
return ServerResponse.ok(url);
}

@ -1,12 +1,10 @@
package com.hisense.hiatmp.server_api.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hisense.hiatmp.model.common.*;
import com.hisense.hiatmp.server_api.mapper.HighDangerMapper;
import com.hisense.hiatmp.server_api.mapper.OperatorMapper;
import com.hisense.hiatmp.server_api.model.BisRoadVO;
import com.hisense.hiatmp.server_api.service.HighDangerService;
import com.hisense.hiatmp.model.dmr.Point;
import com.hisense.hiatmp.server_api.utils.CoordinateUtils;
@ -16,8 +14,11 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -35,9 +36,12 @@ public class HighDangerController {
@Autowired
HighDangerService highDangerService;
// 查询各个状态的数据情况
/*
查询各个状态的数据情况
*/
@GetMapping("/getHighDangerStatusNum")
public ServerResponse<?> getHighStatusNum(@RequestParam String nuserid){
public ServerResponse<?> getHighStatusNum(@RequestParam String nuserid, HttpServletRequest request){
log.info("/getHighDangerStatusNum(查询各个状态的数据情况)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), nuserid);
String cdepartmentid = null;
Operator operatorById = operatorMapper.getOperatorById(nuserid);
if(operatorById != null){
@ -47,23 +51,29 @@ public class HighDangerController {
}
List<HighDangerBaseNum> statusCounts = highDangerMapper.getStatusCounts(cdepartmentid);
log.info("/getHighDangerStatusNum(查询各个状态的数据情况)接口数据返回,调用ip: {}, 出参:{}", request.getRemoteAddr(), statusCounts);
return ServerResponse.ok(statusCounts);
}
// 查询各状态列表
/*
查询各状态数据列表
*/
@PostMapping("/getHigDangerDealt")
public ServerResponse<?> getHighDealt(@RequestBody HighDangerBaseVO highDangerBaseVO,
@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "10") Integer pageSize,
@RequestParam(defaultValue = "") String search
@RequestParam(defaultValue = "") String search,
HttpServletRequest request
){
log.info("/getHigDangerDealt(查询首页各个状态的数据列表)接口被调用,调用ip: {}, 入参:{},{},{},{}", request.getRemoteAddr(), highDangerBaseVO,pageNum,pageSize,search);
String cdepartmentid = null;
// 获取当前操作的对象,用于查找对应的部门
Operator operatorById = operatorMapper.getOperatorById(highDangerBaseVO.getNuserid());
if(operatorById != null){
cdepartmentid = operatorById.getCdepartmentid();
}else{
log.info("");
return ServerResponse.error("未找到当前用户");
}
@ -108,6 +118,8 @@ public class HighDangerController {
}
PageInfo<HighDangerBase> pageInfo = new PageInfo<>(statusCounts);
log.info("/getHigDangerDealt(查询各个状态的数据列表)接口数据返回,调用ip: {}, 出参:{}", request.getRemoteAddr(), statusCounts);
return ServerResponse.ok(pageInfo);
}
@ -154,7 +166,6 @@ public class HighDangerController {
}else{
return ServerResponse.error("未查询到隐患排查项");
}
}
// 获取全部道路
@ -170,22 +181,30 @@ public class HighDangerController {
@PostMapping("/getNearRoadInfo")
public ServerResponse<?> getNearRoad(@RequestBody Point point,
@RequestParam(defaultValue = "1") Long pageNum,
@RequestParam(defaultValue = "10") Long pageSize){
@RequestParam(defaultValue = "10") Long pageSize,
HttpServletRequest request
){
log.info("/getNearRoadInfo(获取最近道路)接口被调用,调用ip: {}, 入参:{},{},{}", request.getRemoteAddr(), point, pageNum, pageSize);
//获取三公里内的坐标
double[] rectangle = CoordinateUtils.getRectangleCoordinates(point.getY(),point.getX(),3);
// DecimalFormat df = new DecimalFormat("#.##");
// 获取全部路段数据
BigDecimal d = new BigDecimal(point.getX()).setScale(1,BigDecimal.ROUND_DOWN);
SectionVO sectionVO = new SectionVO();
sectionVO.setPosition(String.valueOf(d));
List<SectionVO> allRoadInfo = highDangerMapper.getAllSection(sectionVO);
HashMap<String, Map<Double, String>> combinedMap = new HashMap<>();
HashMap<String, Map<Double, String>> pointMapSection = new HashMap<>();
HashMap<String, Map<Double, String>> pointMapCrossing = new HashMap<>();
HashMap<String, Object> combinedMap = new HashMap<>();
HashMap<String, Object> pointMapSection = new HashMap<>();
HashMap<String, Object> pointMapCrossing = new HashMap<>();
Point Dpoint = new Point();
// 遍历所有路段
for(SectionVO dto : allRoadInfo){
Map<Double,String> map = new HashMap<>();
Map<String,Object> map = new HashMap<>();
LinkedList<Map<String, Float>> pointList = new LinkedList<>();
// 临时存储最短距离
//Double minDistance = null;
if(dto.getPosition() == null){
@ -215,12 +234,24 @@ public class HighDangerController {
}
}*/
//}
map.put(pointDistance, dto.getPosition());
for(int i = 0; i < split.length; i += 2){
Map<String,Float> pointMap = new LinkedHashMap<>();
float x1 = Float.parseFloat(split[i]);
float y1 = Float.parseFloat(split[i + 1]);
pointMap.put("longitude", x1);
pointMap.put("latitude", y1);
pointList.add(pointMap);
}
map.put("distance", (int) Math.ceil(pointDistance));
map.put("position", pointList);
map.put("type", "1");
// 将路段和最短路线
pointMapSection.put(dto.getSectionName(), map);
//minDistance = null;
}
// log.info("接口被调用,接口传入参数:"+point+","+pageNum+","+pageSize);
// 获取所有路口信息
CrossingDTO crossingDTO = new CrossingDTO();
crossingDTO.setLonMin(rectangle[0]);
@ -230,7 +261,10 @@ public class HighDangerController {
List<CrossingDTO> allCrossing = highDangerMapper.getAllCrossing(crossingDTO);
// 遍历集合,将所有坐标点与当前坐标比较
for(CrossingDTO cross : allCrossing){
Map<Double,String> map = new HashMap<>();
Map<String,Object> map = new HashMap<>();
Map<String,Float> pointMap = new HashMap<>();
LinkedList<Map<String, Float>> pointList = new LinkedList<>();
float x = cross.getLongitude();
float y = cross.getLatitude();
/*if (!(x >= rectangle[0] && x <= rectangle[2] && y >= rectangle[1] && y <= rectangle[3])){
@ -240,13 +274,25 @@ public class HighDangerController {
Dpoint.setY(y);
// 计算两点间的距离
Double pointDistance = highDangerService.getPointDistance(Dpoint, point);
map.put(pointDistance, cross.getLongitude() + "," + cross.getLatitude());
pointMap.put("longitude", x);
pointMap.put("latitude", y);
pointList.add(pointMap);
map.put("distance", (int) Math.ceil(pointDistance));
map.put("position", pointList);
map.put("type", "2");
// map.put(pointDistance, cross.getLongitude() + "," + cross.getLatitude());
pointMapCrossing.put(cross.getCrossingName(), map);
}
log.info("接口被调用,接口传入参数:"+point+","+pageNum+","+pageSize);
combinedMap.putAll(pointMapSection);
combinedMap.putAll(pointMapCrossing);
List<Map.Entry<String, Object>> sortedList = combinedMap.entrySet().stream()
.sorted(Comparator.comparingDouble(entry -> (int) ((Map) entry.getValue()).get("distance")))
.collect(Collectors.toList());
// Map<String, Map<Double,String>> collectPage = combinedMap.entrySet().stream()
// .skip((pageNum - 1) * pageSize)
// .limit(pageSize)
@ -254,21 +300,36 @@ public class HighDangerController {
// 将路段根据计算的值进行排序
LinkedHashMap<String, Map<Double, String>> collect = new LinkedHashMap<>();
if (null != combinedMap) {
collect = highDangerService.sortMapByValue(combinedMap).entrySet().stream()
.skip((pageNum - 1) * pageSize)
.limit(pageSize)
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
return ServerResponse.ok(collect);
// LinkedHashMap<String, Map<Double, String>> collect = new LinkedHashMap<>();
// if (null != combinedMap) {
// collect = highDangerService.sortMapByValue(combinedMap).entrySet().stream()
// .skip((pageNum - 1) * pageSize)
// .limit(pageSize)
// .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
// }
log.info("/getNearRoadInfo(获取最近道路)接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), sortedList);
return ServerResponse.ok(sortedList);
}
// 查询当前排查所在路段
@GetMapping("/getDangerRoad")
public ServerResponse<?> getDangerRoad(@RequestParam String businessId){
public ServerResponse<?> getDangerRoad(@RequestParam String businessId, HttpServletRequest request){
log.info("/getDangerRoad(查询当前排查所在路段)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), businessId);
HighDangerRoad roadInfo = highDangerMapper.getRoadInfo(businessId);
LinkedList<Map<String, Float>> coordinateMapTemporary = new LinkedList<>();
String[] split = roadInfo.getCoordinate().split(",");
for(int i = 0; i < split.length; i+=2){
Map<String,Float> pointMap = new LinkedHashMap<>();
float x = Float.parseFloat(split[i]);
float y = Float.parseFloat(split[i + 1]);
pointMap.put("longitude", x);
pointMap.put("latitude", y);
coordinateMapTemporary.add(pointMap);
}
roadInfo.setCoordinateList(coordinateMapTemporary);
Date nowDate = new Date();
Date pcEndTime = roadInfo.getPcEndTime();
@ -297,6 +358,8 @@ public class HighDangerController {
roadInfo.setDeadlineType("3");
}
log.info("/getDangerRoad(查询当前排查所在路段)接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), roadInfo);
if(roadInfo != null){
return ServerResponse.ok(roadInfo);
}else {
@ -307,9 +370,11 @@ public class HighDangerController {
// 查询重点排查选项
@GetMapping("/getImportDangers")
public ServerResponse<?> getImportDangers(){
public ServerResponse<?> getImportDangers(HttpServletRequest request){
log.info("/getImportDangers(查询重点排查选项)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),"无");
List<ImportDangerDTO> importDanger = highDangerMapper.getImportDanger();
log.info("/getImportDangers(查询重点排查选项)接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), importDanger);
if(importDanger != null){
return ServerResponse.ok(importDanger);
}else {
@ -317,9 +382,11 @@ public class HighDangerController {
}
}
// 新增路段
// 新增路段 & 路口
@PostMapping("/saveSectionOrCrossing")
public ServerResponse<?> saveRoad(@RequestBody SectionOrCrossAdd sectionOrCrossAdd){
public ServerResponse<?> saveRoad(@RequestBody SectionOrCrossAdd sectionOrCrossAdd, HttpServletRequest request){
log.info("/saveSectionOrCrossing(新增路段 & 路口)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),sectionOrCrossAdd);
// 随机生成一个16位的数作为路段id
// Random random = new Random();
@ -328,6 +395,7 @@ public class HighDangerController {
//
// sectionVO.setSectionCode(String.valueOf(sectionCode));
// sectionVO.setRoadCode(String.valueOf(roadCode));
log.info("/saveSectionOrCrossing(新增路段 & 路口)接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), sectionOrCrossAdd);
if("1".equals(sectionOrCrossAdd.getAddType())){
// 插入路段表
int i = highDangerMapper.saveSection(sectionOrCrossAdd);
@ -382,9 +450,12 @@ public class HighDangerController {
// 重点排查二级页面信息
@GetMapping("/getImportDangerInfo")
public ServerResponse<?> getImportDangerInfo(@RequestParam String sid){
public ServerResponse<?> getImportDangerInfo(@RequestParam String sid, HttpServletRequest request){
log.info("/getImportDangerInfo(排查第三页--重点排查新增标签详情数据(默认数据-无用户数据后调用))接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),sid);
List<ImportDangerInfoDTO> importDangerInfo = highDangerMapper.getImportDangerInfo(sid);
log.info("/getImportDangerInfo(排查第三页--重点排查新增标签详情数据(默认数据-无用户数据后调用))接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), importDangerInfo);
if(importDangerInfo != null){
return ServerResponse.ok(importDangerInfo);
}else {
@ -406,9 +477,12 @@ public class HighDangerController {
// 获取基础数据(第一页)
@GetMapping("/getSectionInfo")
public ServerResponse<?> getSectionInfo(@RequestParam String businessId){
public ServerResponse<?> getSectionInfo(@RequestParam String businessId, HttpServletRequest request){
log.info("/getSectionInfo(获取基础数据(第一页))接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),businessId);
ThtSectionInfoDTO sectionInfo = highDangerMapper.getSectionInfo(businessId);
log.info("/getSectionInfo(获取基础数据(第一页))接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), sectionInfo);
if(sectionInfo != null){
return ServerResponse.ok(sectionInfo);
}else {
@ -418,9 +492,13 @@ public class HighDangerController {
// 获取统计数据(第二页)
@GetMapping("/getSectionTraffic")
public ServerResponse<?> getSectionTraffic(@RequestParam String businessId){
public ServerResponse<?> getSectionTraffic(@RequestParam String businessId, HttpServletRequest request){
log.info("/getSectionTraffic(获取统计数据(第二页))接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),businessId);
ThtSectionTrafficDTO sectionTraffic = highDangerMapper.getSectionTraffic(businessId);
log.info("/getSectionTraffic(获取统计数据(第二页))接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), sectionTraffic);
if(sectionTraffic != null){
return ServerResponse.ok(sectionTraffic);
}else {
@ -430,10 +508,12 @@ public class HighDangerController {
// 获取存在隐患的存在问题,多级列表
@GetMapping("/getDangerItems")
public ServerResponse<?> getDangerItems(){
public ServerResponse<?> getDangerItems(HttpServletRequest request){
log.info("/getDangerItems(排查第三页--存在隐患的存在问题(三级列表查询))接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),"无");
List<ThtDangerItems> thtDangerItems = highDangerService.listWithTree();
log.info("/getDangerItems(排查第三页--存在隐患的存在问题(三级列表查询))接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), thtDangerItems);
if(thtDangerItems != null){
return ServerResponse.ok(thtDangerItems);
}else {
@ -441,9 +521,15 @@ public class HighDangerController {
}
}
/*
排查第三页--重点排查项标签用户数据回显
*/
@GetMapping("/getImportDangerDisplay")
public ServerResponse<?> getImportDangerDisplay(@RequestParam String businessId){
public ServerResponse<?> getImportDangerDisplay(@RequestParam String businessId, HttpServletRequest request){
log.info("/getImportDangerDisplay(排查第三页--重点排查项标签)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),businessId);
List<ImportDangerDTO> item = highDangerMapper.getImportDangerDisplayItem(businessId);
log.info("/getImportDangerDisplay(排查第三页--重点排查项标签)接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), item);
if(item != null){
return ServerResponse.ok(item);
} else {
@ -451,9 +537,14 @@ public class HighDangerController {
}
}
/*
排查第三页--重点排查新增标签详情数据
*/
@GetMapping("/getImportDangerDisplayDetail")
public ServerResponse<?> getImportDangerDisplayDetail(@RequestParam String businessId){
public ServerResponse<?> getImportDangerDisplayDetail(@RequestParam String businessId, HttpServletRequest request){
log.info("/getImportDangerDisplayDetail(排查第三页--重点排查新增标签详情数据)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),businessId);
List<ThtHiddenDataCollectConfigExtra> importDangerList = highDangerMapper.getImportDangerDisplay(businessId);
log.info("/getImportDangerDisplayDetail(排查第三页--重点排查新增标签详情数据)接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), importDangerList);
if(importDangerList != null){
return ServerResponse.ok(importDangerList);
} else {
@ -461,11 +552,30 @@ public class HighDangerController {
}
}
/*
排查第三页--存在隐患列表用户数据回显
*/
@GetMapping("/getUserHiddenDangerList")
public ServerResponse<?> getUserHiddenDangerList(@RequestParam String businessId, HttpServletRequest request){
log.info("/getUserHiddenDangerList(排查第三页--存在隐患列表(用户数据回显))接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),businessId);
List<HiddenDangerDTO> userHiddenDangerList = highDangerMapper.getUserHiddenDangerList(businessId);
log.info("/getUserHiddenDangerList(排查第三页--存在隐患列表(用户数据回显))接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), userHiddenDangerList);
if(userHiddenDangerList != null){
return ServerResponse.ok(userHiddenDangerList);
}else{
return ServerResponse.error("当前隐患排查中无存在隐患信息");
}
}
// 保存 & 暂存人工排查
@Transactional
@PostMapping("/saveManualInvestigation")
public ServerResponse<?> saveManualInvestigation(@RequestBody ManualInvestigation manualInvestigation){
public ServerResponse<?> saveManualInvestigation(@RequestBody ManualInvestigation manualInvestigation,HttpServletRequest request){
log.info("/saveManualInvestigation(保存 & 暂存人工排查)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),manualInvestigation);
Date lastModDate = new Date();
manualInvestigation.setLastModeDate(lastModDate);
@ -480,6 +590,7 @@ public class HighDangerController {
// 判断数据库是否存在统计数据
ThtSectionTrafficDTO sectionTraffic = highDangerMapper.getSectionTraffic(manualInvestigation.getBusinessId());
if(sectionTraffic != null){
// 更新统计数据(步骤1)
highDangerMapper.updateSectionTraffic(manualInvestigation);
@ -505,7 +616,7 @@ public class HighDangerController {
if(highDangerMapper.isExtraExistence(manualInvestigation.getBusinessId()) != null){
highDangerMapper.deleteRoadInfo(manualInvestigation.getBusinessId());
}else{
for(Describe details : manualInvestigation.getDescribe()){
for(HiddenDangerDTO details : manualInvestigation.getDescribe()){
// 随机生成UUID
UUID uuid = UUID.randomUUID();
String uuidString = uuid.toString().replace("-", "");
@ -562,8 +673,10 @@ public class HighDangerController {
// 暂存数据
if(manualInvestigation.getTemporary() == Boolean.FALSE){
highDangerMapper.updateTemporary(manualInvestigation.getBusinessId(), "99");
log.info("/saveManualInvestigation(保存 & 暂存人工排查)接口返回, 客户端ip: {}, 返回数据:{},{}", request.getRemoteAddr(),"数据已暂存", manualInvestigation);
return ServerResponse.ok("数据已暂存",manualInvestigation);
}else{
log.info("/saveManualInvestigation(保存 & 暂存人工排查)接口返回, 客户端ip: {}, 返回数据:{},{}", request.getRemoteAddr(),"数据已保存", manualInvestigation);
highDangerMapper.updateTemporary(manualInvestigation.getBusinessId(), "20");
return ServerResponse.ok("数据已保存",manualInvestigation);
}

@ -1,12 +1,9 @@
package com.hisense.hiatmp.server_api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hisense.hiatmp.model.common.*;
import com.hisense.hiatmp.server_api.model.BisRoadVO;
import org.springframework.stereotype.Repository;
import java.math.BigDecimal;
import java.util.List;
@Repository
@ -63,9 +60,9 @@ public interface HighDangerMapper extends BaseMapper<HighDangerBase>{
void saveHiddenDataCollectConfig(ThtHiddenDataCollectConfig config);
void saveDangerExtra(Describe describe);
void saveDangerExtra(HiddenDangerDTO describe);
ThtHiddenDangerExtra isExtraExistence(String bussinessId);
List<ThtHiddenDangerExtra> isExtraExistence(String bussinessId);
void deleteRoadInfo(String businessId);
@ -77,5 +74,7 @@ public interface HighDangerMapper extends BaseMapper<HighDangerBase>{
List<ImportDangerDTO> getImportDangerDisplayItem(String businessId);
List<HiddenDangerDTO> getUserHiddenDangerList(String businessId);
}

@ -6,7 +6,7 @@ import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -25,5 +25,5 @@ public interface HighDangerService {
Boolean isPicture(MultipartFile file);
Map<String, Map<Double,String>> sortMapByValue(Map<String, Map<Double,String>> unsortedMap);
// Map<String, Map<Double,String>> sortMapByValue(HashMap<String, Object> unsortedMap);
}

@ -12,11 +12,8 @@ import org.springframework.web.multipart.MultipartFile;
import javax.imageio.ImageIO;
import java.awt.*;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.file.Path;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.List;
@ -25,6 +22,8 @@ import java.util.stream.Collectors;
@Service
public class HighDangerBaseServiceImpl implements HighDangerService {
private static final double EARTH_RADIUS = 6378137;
@Value("${file.path.local}")
private String fileLocalPath;
@ -44,9 +43,27 @@ public class HighDangerBaseServiceImpl implements HighDangerService {
@Override
public Double getPointDistance(Point point1, Point point2) {
double dx = point2.getX() - point1.getX();
double dy = point2.getY() - point1.getY();
return Math.sqrt(dx * dx + dy * dy);
double lat1 = Math.toRadians(point1.getX());
double lat2 = Math.toRadians(point2.getX());
double lng1 = Math.toRadians(point1.getY());
double lng2 = Math.toRadians(point2.getY());
// 纬度之差
double a = lat1 - lat2;
// 经度之差
double b = lng1 - lng2;
// 计算两点距离的公式
double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(b / 2), 2)));
// 弧长乘地球半径, 返回单位: 米
s = s * EARTH_RADIUS;
// double dx = point2.getX() - point1.getX();
// double dy = point2.getY() - point1.getY();
// return Math.sqrt(dx * dx + dy * dy) * EARTH_RADIUS;
return s;
}
@ -191,13 +208,13 @@ public class HighDangerBaseServiceImpl implements HighDangerService {
// }
}
public Map<String, Map<Double,String>> sortMapByValue(Map<String, Map<Double,String>> unsortedMap) {
Map<String, Map<Double,String>> sortedMap = new LinkedHashMap<>();
Comparator<Double> valueComparator = Comparator.naturalOrder();
unsortedMap.entrySet().stream()
.sorted(Map.Entry.comparingByValue((o1, o2) -> valueComparator.compare(o1.keySet().iterator().next(), o2.keySet().iterator().next())))
.forEachOrdered(entry -> sortedMap.put(entry.getKey(), entry.getValue()));
return sortedMap;
}
// public Map<String, Map<Double,String>> sortMapByValue(HashMap<String, Object> unsortedMap) {
// Map<String, Map<Double,String>> sortedMap = new LinkedHashMap<>();
// Comparator<Double> valueComparator = Comparator.naturalOrder();
// unsortedMap.entrySet().stream()
// .sorted(Map.Entry.comparingByValue((o1, o2) -> valueComparator.compare(o1.keySet().iterator().next(), o2.keySet().iterator().next())))
// .forEachOrdered(entry -> sortedMap.put(entry.getKey(), entry.getValue()));
// return sortedMap;
// }
}

@ -387,4 +387,14 @@
where e.business_id = #{businessId}
</select>
<select id="getUserHiddenDangerList" resultType="com.hisense.hiatmp.model.common.HiddenDangerDTO">
SELECT
*
FROM
tht_hidden_danger_road_info
where
business_id = #{businessId}
</select>
</mapper>

@ -6,7 +6,7 @@ import java.io.Serializable;
import java.util.Date;
@Data
public class Describe implements Serializable {
public class HiddenDangerDTO implements Serializable {
private static final long serialVersionUID = 1L;

@ -1,12 +1,10 @@
package com.hisense.hiatmp.model.common;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 排查保存 & 暂存数据
@ -43,7 +41,7 @@ public class ManualInvestigation implements Serializable {
// 存在隐患集合
String pcCount;
List<Describe> describe;
List<HiddenDangerDTO> describe;
// 暂存标识 0暂存 1提交
Boolean temporary;

@ -1,48 +1,48 @@
2024-07-12 17:15:43,491 [main] INFO com.alibaba.boot.nacos.config.util.NacosConfigPropertiesUtils - nacosConfigProperties : NacosConfigProperties{serverAddr='127.0.0.1:8848', contextPath='null', encode='null', endpoint='null', namespace='null', accessKey='null', secretKey='null', ramRoleName='null', autoRefresh=false, dataId='null', dataIds='null', group='DEFAULT_GROUP', type=null, maxRetry='null', configLongPollTimeout='null', configRetryTime='null', enableRemoteSyncConfig=false, extConfig=[], bootstrap=Bootstrap{enable=false, logEnable=false}}
2024-07-12 17:15:43,497 [main] INFO com.alibaba.boot.nacos.config.autoconfigure.NacosConfigApplicationContextInitializer - [Nacos Config Boot] : The preload configuration is not enabled
2024-07-12 17:15:43,734 [main] INFO com.ulisesbocchio.jasyptspringboot.configuration.EnableEncryptablePropertiesBeanFactoryPostProcessor - Post-processing PropertySource instances
2024-07-12 17:15:43,851 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource configurationProperties [org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource] to AOP Proxy
2024-07-12 17:15:43,852 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource bootstrap [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-12 17:15:43,852 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource systemProperties [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-12 17:15:43,852 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-12 17:15:43,852 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper
2024-07-12 17:15:43,853 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource springCloudClientHostInfo [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-12 17:15:43,893 [main] INFO com.ulisesbocchio.jasyptspringboot.filter.DefaultLazyPropertyFilter - Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter
2024-07-12 17:15:43,921 [main] INFO com.ulisesbocchio.jasyptspringboot.resolver.DefaultLazyPropertyResolver - Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver
2024-07-12 17:15:43,922 [main] INFO com.ulisesbocchio.jasyptspringboot.detector.DefaultLazyPropertyDetector - Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector
2024-07-12 17:15:44,526 [main] INFO com.ulisesbocchio.jasyptspringboot.configuration.EnableEncryptablePropertiesConfiguration - Bootstraping jasypt-string-boot auto configuration in context: application-1
2024-07-12 17:15:44,538 [main] INFO com.alibaba.boot.nacos.config.util.NacosConfigPropertiesUtils - nacosConfigProperties : NacosConfigProperties{serverAddr='127.0.0.1:8848', contextPath='null', encode='null', endpoint='null', namespace='null', accessKey='null', secretKey='null', ramRoleName='null', autoRefresh=false, dataId='null', dataIds='null', group='DEFAULT_GROUP', type=null, maxRetry='null', configLongPollTimeout='null', configRetryTime='null', enableRemoteSyncConfig=false, extConfig=[], bootstrap=Bootstrap{enable=false, logEnable=false}}
2024-07-12 17:15:44,539 [main] INFO com.alibaba.boot.nacos.config.autoconfigure.NacosConfigApplicationContextInitializer - [Nacos Config Boot] : The preload configuration is not enabled
2024-07-12 17:15:44,541 [main] INFO com.hisense.hiatmp.base.BaseApplication - No active profile set, falling back to default profiles: default
2024-07-12 17:15:45,792 [main] INFO com.ulisesbocchio.jasyptspringboot.configuration.EnableEncryptablePropertiesBeanFactoryPostProcessor - Post-processing PropertySource instances
2024-07-12 17:15:45,803 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource configurationProperties [org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource] to AOP Proxy
2024-07-12 17:15:45,804 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource servletConfigInitParams [org.springframework.core.env.PropertySource$StubPropertySource] to EncryptablePropertySourceWrapper
2024-07-12 17:15:45,804 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource servletContextInitParams [org.springframework.core.env.PropertySource$StubPropertySource] to EncryptablePropertySourceWrapper
2024-07-12 17:15:45,804 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource systemProperties [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-12 17:15:45,804 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-12 17:15:45,804 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper
2024-07-12 17:15:45,804 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource applicationConfig: [classpath:/application.properties] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-12 17:15:45,804 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource applicationConfig: [classpath:/application.yml] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-12 17:15:45,804 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource springCloudClientHostInfo [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-12 17:15:45,804 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource defaultProperties [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-12 17:15:45,842 [main] INFO com.ulisesbocchio.jasyptspringboot.filter.DefaultLazyPropertyFilter - Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter
2024-07-12 17:15:46,097 [main] INFO com.ulisesbocchio.jasyptspringboot.resolver.DefaultLazyPropertyResolver - Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver
2024-07-12 17:15:46,097 [main] INFO com.ulisesbocchio.jasyptspringboot.detector.DefaultLazyPropertyDetector - Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector
2024-07-12 17:15:46,451 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-1959"]
2024-07-12 17:15:46,462 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat]
2024-07-12 17:15:46,463 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.17]
2024-07-12 17:15:46,599 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/HiatmpPro/commond] - Initializing Spring embedded WebApplicationContext
2024-07-12 17:15:46,807 [main] INFO com.hisense.hiatmp.common.config.DataSourceConfig - 第一数据库连接池创建中.......
2024-07-12 17:15:48,347 [main] INFO springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]
2024-07-12 17:15:48,433 [main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources.
2024-07-12 17:15:48,433 [main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2024-07-12 17:15:48,438 [main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources.
2024-07-12 17:15:48,439 [main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2024-07-12 17:15:50,788 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper - Context refreshed
2024-07-12 17:15:50,810 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s)
2024-07-12 17:15:50,842 [main] INFO springfox.documentation.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references
2024-07-12 17:15:51,188 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-1959"]
2024-07-12 17:15:54,470 [main] ERROR com.alibaba.cloud.nacos.registry.NacosServiceRegistry - nacos registry, urbantraffic-hiatmp-base register failed...NacosRegistration{nacosDiscoveryProperties=NacosDiscoveryProperties{serverAddr='10.16.3.178:8848', endpoint='', namespace='', watchDelay=30000, logName='', service='urbantraffic-hiatmp-base', weight=1.0, clusterName='DEFAULT', namingLoadCacheAtStart='false', metadata={preserved.register.source=SPRING_CLOUD}, registerEnabled=true, ip='192.168.64.1', networkInterface='', port=1959, secure=false, accessKey='', secretKey=''}},
2024-07-15 13:41:41,889 [main] INFO com.alibaba.boot.nacos.config.util.NacosConfigPropertiesUtils - nacosConfigProperties : NacosConfigProperties{serverAddr='127.0.0.1:8848', contextPath='null', encode='null', endpoint='null', namespace='null', accessKey='null', secretKey='null', ramRoleName='null', autoRefresh=false, dataId='null', dataIds='null', group='DEFAULT_GROUP', type=null, maxRetry='null', configLongPollTimeout='null', configRetryTime='null', enableRemoteSyncConfig=false, extConfig=[], bootstrap=Bootstrap{enable=false, logEnable=false}}
2024-07-15 13:41:41,895 [main] INFO com.alibaba.boot.nacos.config.autoconfigure.NacosConfigApplicationContextInitializer - [Nacos Config Boot] : The preload configuration is not enabled
2024-07-15 13:41:42,077 [main] INFO com.ulisesbocchio.jasyptspringboot.configuration.EnableEncryptablePropertiesBeanFactoryPostProcessor - Post-processing PropertySource instances
2024-07-15 13:41:42,124 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource configurationProperties [org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource] to AOP Proxy
2024-07-15 13:41:42,125 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource bootstrap [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-15 13:41:42,125 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource systemProperties [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-15 13:41:42,125 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-15 13:41:42,126 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper
2024-07-15 13:41:42,126 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource springCloudClientHostInfo [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-15 13:41:42,155 [main] INFO com.ulisesbocchio.jasyptspringboot.filter.DefaultLazyPropertyFilter - Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter
2024-07-15 13:41:42,174 [main] INFO com.ulisesbocchio.jasyptspringboot.resolver.DefaultLazyPropertyResolver - Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver
2024-07-15 13:41:42,175 [main] INFO com.ulisesbocchio.jasyptspringboot.detector.DefaultLazyPropertyDetector - Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector
2024-07-15 13:41:42,493 [main] INFO com.ulisesbocchio.jasyptspringboot.configuration.EnableEncryptablePropertiesConfiguration - Bootstraping jasypt-string-boot auto configuration in context: application-1
2024-07-15 13:41:42,493 [main] INFO com.alibaba.boot.nacos.config.util.NacosConfigPropertiesUtils - nacosConfigProperties : NacosConfigProperties{serverAddr='127.0.0.1:8848', contextPath='null', encode='null', endpoint='null', namespace='null', accessKey='null', secretKey='null', ramRoleName='null', autoRefresh=false, dataId='null', dataIds='null', group='DEFAULT_GROUP', type=null, maxRetry='null', configLongPollTimeout='null', configRetryTime='null', enableRemoteSyncConfig=false, extConfig=[], bootstrap=Bootstrap{enable=false, logEnable=false}}
2024-07-15 13:41:42,493 [main] INFO com.alibaba.boot.nacos.config.autoconfigure.NacosConfigApplicationContextInitializer - [Nacos Config Boot] : The preload configuration is not enabled
2024-07-15 13:41:42,493 [main] INFO com.hisense.hiatmp.server_api.HiddenDangerApplication - No active profile set, falling back to default profiles: default
2024-07-15 13:41:43,469 [main] INFO com.ulisesbocchio.jasyptspringboot.configuration.EnableEncryptablePropertiesBeanFactoryPostProcessor - Post-processing PropertySource instances
2024-07-15 13:41:43,483 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource configurationProperties [org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource] to AOP Proxy
2024-07-15 13:41:43,483 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource servletConfigInitParams [org.springframework.core.env.PropertySource$StubPropertySource] to EncryptablePropertySourceWrapper
2024-07-15 13:41:43,483 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource servletContextInitParams [org.springframework.core.env.PropertySource$StubPropertySource] to EncryptablePropertySourceWrapper
2024-07-15 13:41:43,483 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource systemProperties [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-15 13:41:43,483 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-15 13:41:43,483 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper
2024-07-15 13:41:43,483 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource applicationConfig: [classpath:/application.properties] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-15 13:41:43,483 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource applicationConfig: [classpath:/application.yml] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-15 13:41:43,483 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource springCloudClientHostInfo [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-15 13:41:43,485 [main] INFO com.ulisesbocchio.jasyptspringboot.EncryptablePropertySourceConverter - Converting PropertySource defaultProperties [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2024-07-15 13:41:43,527 [main] INFO com.ulisesbocchio.jasyptspringboot.filter.DefaultLazyPropertyFilter - Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter
2024-07-15 13:41:43,760 [main] INFO com.ulisesbocchio.jasyptspringboot.resolver.DefaultLazyPropertyResolver - Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver
2024-07-15 13:41:43,760 [main] INFO com.ulisesbocchio.jasyptspringboot.detector.DefaultLazyPropertyDetector - Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector
2024-07-15 13:41:44,031 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8800"]
2024-07-15 13:41:44,038 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat]
2024-07-15 13:41:44,039 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.17]
2024-07-15 13:41:44,157 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/HiatmpPro/hiddenDanger] - Initializing Spring embedded WebApplicationContext
2024-07-15 13:41:44,329 [main] INFO com.hisense.hiatmp.common.config.DataSourceConfig - 第一数据库连接池创建中.......
2024-07-15 13:41:45,825 [main] INFO springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]
2024-07-15 13:41:45,884 [main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources.
2024-07-15 13:41:45,884 [main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2024-07-15 13:41:45,888 [main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources.
2024-07-15 13:41:45,888 [main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2024-07-15 13:41:47,375 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper - Context refreshed
2024-07-15 13:41:47,387 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s)
2024-07-15 13:41:47,413 [main] INFO springfox.documentation.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references
2024-07-15 13:41:47,435 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8800"]
2024-07-15 13:41:50,563 [main] ERROR com.alibaba.cloud.nacos.registry.NacosServiceRegistry - nacos registry, urbantraffic-hiatmp-hiddenDanger register failed...NacosRegistration{nacosDiscoveryProperties=NacosDiscoveryProperties{serverAddr='10.16.3.178:8848', endpoint='', namespace='', watchDelay=30000, logName='', service='urbantraffic-hiatmp-hiddenDanger', weight=1.0, clusterName='DEFAULT', namingLoadCacheAtStart='false', metadata={preserved.register.source=SPRING_CLOUD}, registerEnabled=true, ip='192.168.64.1', networkInterface='', port=8800, secure=false, accessKey='', secretKey=''}},
java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([10.16.3.178:8848]) tried: failed to req API:10.16.3.178:8848/nacos/v1/ns/instance. code:500 msg: java.net.SocketTimeoutException: connect timed out
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:464) ~[nacos-client-1.1.1.jar:?]
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:386) ~[nacos-client-1.1.1.jar:?]
@ -69,10 +69,13 @@ java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after a
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at com.hisense.hiatmp.base.BaseApplication.main(BaseApplication.java:25) [classes/:?]
2024-07-12 17:15:54,475 [main] INFO com.hisense.hiatmp.base.BaseApplication - Started BaseApplication in 11.66 seconds (JVM running for 13.342)
2024-07-12 17:15:54,477 [main] INFO com.hisense.hiatmp.common.encrypt.EncryptedDetector - ==============配置项自动加密已触发============
2024-07-12 17:15:54,477 [main] INFO com.hisense.hiatmp.common.encrypt.EncryptedDetector - ==============配置项自动加密已结束,未用脚本启动或者yml参数未配置正确,加密失败!============
2024-07-12 17:15:57,476 [http-nio-1959-exec-1] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/HiatmpPro/commond] - Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-07-12 17:15:57,594 [http-nio-1959-exec-1] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2024-07-12 17:15:57,890 [http-nio-1959-exec-1] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
at com.hisense.hiatmp.server_api.HiddenDangerApplication.main(HiddenDangerApplication.java:25) [classes/:?]
2024-07-15 13:41:50,566 [main] INFO com.hisense.hiatmp.server_api.HiddenDangerApplication - Started HiddenDangerApplication in 9.155 seconds (JVM running for 10.147)
2024-07-15 13:41:50,568 [main] INFO com.hisense.hiatmp.common.encrypt.EncryptedDetector - ==============配置项自动加密已触发============
2024-07-15 13:41:50,568 [main] INFO com.hisense.hiatmp.common.encrypt.EncryptedDetector - ==============配置项自动加密已结束,未用脚本启动或者yml参数未配置正确,加密失败!============
2024-07-15 13:41:52,174 [http-nio-8800-exec-1] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/HiatmpPro/hiddenDanger] - Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-07-15 13:41:52,438 [http-nio-8800-exec-1] INFO com.hisense.hiatmp.server_api.controller.HighDangerController - /getNearRoadInfo(获取最近道路)接口被调用,调用ip: 127.0.0.1, 入参:Point(x=120.28231, y=36.14648),1,10
2024-07-15 13:41:52,473 [http-nio-8800-exec-1] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2024-07-15 13:41:52,750 [http-nio-8800-exec-1] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2024-07-15 13:41:53,342 [http-nio-8800-exec-1] INFO com.hisense.hiatmp.server_api.controller.HighDangerController - 接口被调用,接口传入参数:Point(x=120.28231, y=36.14648),1,10
2024-07-15 13:41:53,344 [http-nio-8800-exec-1] INFO com.hisense.hiatmp.server_api.controller.HighDangerController - /getNearRoadInfo(获取最近道路)接口返回, 客户端ip: 127.0.0.1, 返回数据:[合并2222-十梅庵路与楼山路路口4444444444={distance=744, position=[{longitude=120.27665, latitude=36.13946}, {longitude=120.28283, latitude=36.109234}], type=1}, cq路口长度11123345567678990测试={distance=2163, position=[{latitude=36.124355, longitude=120.29821}], type=2}, G22青兰高速与红岛互通路口={distance=3151, position=[{latitude=36.170982, longitude=120.30777}], type=2}]

Loading…
Cancel
Save