leutu
2024-08-20 6c914caa1e16d709d16c39b6ae55bd8b5c8f0283
src/main/java/com/skyline/electricity/timer/Consumer.java
@@ -19,7 +19,6 @@
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.*;
@Slf4j
@@ -73,12 +72,7 @@
        System.out.println("【user]:"+JSONObject.toJSONString(sysUser));
        List<RetInfo> list = new ArrayList<>();
        //查询用户所处围栏
        List<FencePosition> fencePositionList = null ;
        try{
            fencePositionList = (List<FencePosition>)this.detectService.checkInFence(jsonObject.get("w84lat").toString(),jsonObject.get("w84lon").toString());
        }catch (Exception e){
            System.out.println(e.getMessage());
        }
        List<FencePosition> fencePositionList = (List<FencePosition>)this.detectService.checkInFence(jsonObject.get("w84lat").toString(),jsonObject.get("w84lon").toString());
        System.out.println("【FencePosition]:"+JSONObject.toJSONString(fencePositionList));
        RetInfo alertinfo = new RetInfo();
        initAlertInfos(jsonObject, personNo, sysUser, alertinfo);
@@ -120,10 +114,8 @@
        alertinfo.setMobile(sysUser.getMobile());
        alertinfo.setBaseFloor(jsonObject.get("baseFloor").toString());
        String time = Long.toString(new Date().getTime());
        alertinfo.setStartTime(time.substring(0,time.length()-3));
        alertinfo.setHb(jsonObject.getIntValue("hb"));
        alertinfo.setStartTime(jsonObject.get("timestamp").toString());
        alertinfo.setHb(jsonObject.getInteger("hb").intValue());
    }
    private boolean checkHight(String basefloor,double start){
@@ -137,7 +129,9 @@
           Information information = new Information();
           information.setFence_type(r.getType());
           information.setName(r.getFence_name());
           information.setStartTime(r.getStartTime());
           //information.setStartTime(r.getStartTime());
           //避免时间同步问题
           information.setStartTime((new Date()).getTime()+"");
           information.setStatus(r.getStatus());
           information.setUserId(r.getUserId());
           information.setWtId(r.getWtId());