3.7
fxl
2023-03-07 52cffc4ab8e9787a6f233295502c7c9788dddae1
src/main/java/com/hxzkoa/udp/Dell_display.java
@@ -2,8 +2,10 @@
import java.awt.geom.Point2D;
import java.io.Console;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
import com.hxzkoa.json.tb_fence;
import com.hxzkoa.json.tb_map;
@@ -67,7 +69,7 @@
      String[] dis = message.split(",");
      // 3[tagid] :标签的ID号,唯一编号
      String tagid = dis[2];
      System.out.print("dis:"+dis);
      //System.out.print("dis:"+dis);
      // 4包序(0~255循环)
      String baoxu = dis[3];
      // 5时间戳(这条报文发出的时间)
@@ -108,7 +110,7 @@
            .toBean(JSONObject.fromObject(re_warning_bw.get("result").toString()), tb_warning.class);
      // 判断标签是否存在
      
      System.out.print("re_warning"+re_warning);
      //System.out.print("re_warning"+re_warning);
      tb_warning warning = new tb_warning();
      if (re_tag != null) {
         int powerint = Integer.parseInt(tag.getPower());
@@ -241,7 +243,7 @@
            jsonObject = JSONObject.fromObject(tag);
            JSONObject re_realAttendance_bw = HttpUtil.doPost(url_realAttendance_bw, jsonObject.toString(),
                  Config.getCharset());
            System.out.print(re_realAttendance_bw);
            //System.out.print(re_realAttendance_bw);
            if (re_realAttendance_bw!=null){
               tb_realkaoqing realkaoqing = (tb_realkaoqing) JSONObject.toBean(
                     JSONObject.fromObject(re_realAttendance_bw.get("result").toString()), tb_realkaoqing.class);
@@ -299,7 +301,8 @@
            boolean zai = IsInStartAndEndTime.belongCalendar(intime, startime, stoptime);// 判断是否在围栏生效的时间内
            // 在围栏生效时间内
            if (zai) {
               boolean ispoly = IsPtInPoly.inPoly(point, fence.getPts());// 判断ID坐标是否在围栏区域内
               Vector<Point2D.Double> pts = new Vector<Point2D.Double>();
               boolean ispoly = IsPtInPoly.inPoly(point, pts);// 判断ID坐标是否在围栏区域内
               // 如果在考勤区域内
               if (ispoly) {
                  // 判断在不在实时考勤集合中,如果不在则需要添加一条记录
@@ -403,7 +406,8 @@
               boolean zai = IsInStartAndEndTime.belongCalendar(intime, startime, stoptime);// 判断是否在围栏生效的时间内
               // 在围栏生效时间内
               if (zai) {
                  boolean ispoly = IsPtInPoly.inPoly(point, fence.getPts());// 判断ID坐标是否在围栏区域内
                  Vector<Point2D.Double> pts = new Vector<Point2D.Double>();
                  boolean ispoly = IsPtInPoly.inPoly(point, pts);// 判断ID坐标是否在围栏区域内
                  // 如果在告警区域内
                  if (ispoly) {
                     // 判断在不在实时告警集合中,如果不在则需要添加一条记录
@@ -537,7 +541,8 @@
                  tb_xunjianbaobiao xunjianbaobiao = new tb_xunjianbaobiao();
                  
                  // 判断标签坐标是否在生效的围栏区域内如果在则执行
                  if (IsPtInPoly.inPoly(point, tb_fenceList.get(i).getPts())) {
                  Vector<Point2D.Double> pts = new Vector<Point2D.Double>();
                  if (IsPtInPoly.inPoly(point, pts)) {
                     // 通过区域名称找到该巡检区域对象
                     // Tb_xunjianset xjs =