|  |  | 
 |  |  | package com.doumee.core.constants; | 
 |  |  |  | 
 |  |  | import ch.qos.logback.core.util.COWArrayList; | 
 |  |  | import com.doumee.dao.business.web.request.LocaltionDTO; | 
 |  |  | import org.apache.commons.codec.binary.Hex; | 
 |  |  | import org.apache.commons.lang3.StringUtils; | 
 |  |  |  | 
 |  |  | 
 |  |  |  | 
 |  |  |     public static final String MINI_PROGRAMME ="MINI_PROGRAMME" ; | 
 |  |  |     public static final String FREE_RENT_TIME ="FREE_RENT_TIME" ; | 
 |  |  |     public static final String LOW_VOLTAGE ="LOW_VOLTAGE" ; | 
 |  |  |     public static final String ACCESS_TOKEN ="ACCESS_TOKEN" ; | 
 |  |  |     public static final String IMG_DIR = "IMG_DIR"; | 
 |  |  |     public static final String FILE_DIR ="FILE_DIR" ; | 
 |  |  |     public static final String PRIVATE_KEY = "PRIVATE_KEY"; | 
 |  |  |     public static final String PROJECT_FILE = "PROJECT_FILE"; | 
 |  |  |     public static final String PROJECTS = "PROJECTS"; | 
 |  |  |     public static final String DISCOUNT = "DISCOUNT"; | 
 |  |  |     public static final String ELEC_BIKE_CONTRIL_API_URL = "ELEC_BIKE_CONTRIL_API_URL"; | 
 |  |  |     public static final String FORCE_BACK_LOCK = "FORCE_BACK_LOCK"; | 
 |  |  |     public static final String FORCE_BACK_SITE = "FORCE_BACK_SITE"; | 
 |  |  |     //车辆类型数据 | 
 |  |  |     public static final String  BIKE_TYPE ="0,1,2,3,4,5,6,7,8" ; | 
 |  |  |     public static final String MINI_PROGRAMME_REALEASE ="MINI_PROGRAMME_REALEASE" ; | 
 |  |  |     public static final String TIME_OUT_TEMPID ="TIME_OUT_TEMPID" ; | 
 |  |  |  | 
 |  |  |     public static final int FOUR =4 ; | 
 |  |  |     public static final String PAUSE_BIKE_TYPE ="PAUSE_BIKE_TYPE" ; | 
 |  |  |     public static final String HEART_TIME_EXPIRE_TIME ="HEART_TIME_EXPIRE_TIME" ; | 
 |  |  |     public static final String PARK_LAT_LNG_LIST = "PARK_LAT_LNG_LIST"; | 
 |  |  |     public static final String LOW_BIKE_VOLTAGE ="LOW_BIKE_VOLTAGE" ; | 
 |  |  |     public static final String EBIKE_PREFIX ="ebike-" ; | 
 |  |  |     public static String REDIS_DEBUG_STR="test_"; | 
 |  |  |     public static final String AD = "AD"; | 
 |  |  |     public static String REPAIR = "REPAIR"; | 
 |  |  |     public static final String NOTICE_SITE_LINK_LIMIT="NOTICE_SITE_LINK_LIMIT"; | 
 |  |  |  | 
 |  |  |     public static boolean equalsInteger(Integer a, Integer b) { | 
 |  |  |         if (formatIntegerNum(a) == formatIntegerNum(b)) { | 
 |  |  |             return true; | 
 |  |  |         } | 
 |  |  |         return false; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public  interface MqttTopic{ | 
 |  |  |  | 
 |  |  | 
 |  |  |  | 
 |  |  |         REFUND(2,"结算退押金", "结算退押金"), | 
 |  |  |  | 
 |  |  |         PLATFORMREFUND(3,"平台退押金", "平台退押金") | 
 |  |  |         PLATFORM_REFUND(3,"平台退款", "平台退款"), | 
 |  |  |  | 
 |  |  |         DISCOUNT(4,"套餐购买", "套餐购买") | 
 |  |  |  | 
 |  |  |         ; | 
 |  |  |         String name; | 
 |  |  | 
 |  |  | } | 
 |  |  |         public interface RedisKeys { | 
 |  |  |             public static final String submission_period_key = "sp_"; | 
 |  |  |             public static final String import_bikes = "import_bikes"; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         public static final String ACCESS_ID = "ACCESS_ID"; | 
 |  |  | 
 |  |  |         public static final String LEASE_NOTICE_URL = "LEASE_NOTICE_URL"; | 
 |  |  |         //押金 | 
 |  |  |         public static final String RENT_DEPOSIT = "RENT_DEPOSIT"; | 
 |  |  |         //电车临停自动关锁时长(分钟) | 
 |  |  |         public static final String PAUSE_AUTO_CLOSE_TIME = "PAUSE_AUTO_CLOSE_TIME"; | 
 |  |  |  | 
 |  |  |         //温馨提示 | 
 |  |  |         public static final String TIPS = "TIPS"; | 
 |  |  |         //温馨提示 | 
 |  |  | 
 |  |  |         public static final String BUSINESS_STARTTIME = "BUSINESS_STARTTIME"; | 
 |  |  |         //小程序每日服务结束时间 | 
 |  |  |         public static final String BUSINESS_ENDTIME = "BUSINESS_ENDTIME"; | 
 |  |  |         //电车二维码前缀 | 
 |  |  |         public static final String ELECTRICITY_PREFIX = "ELECTRICITY_PREFIX"; | 
 |  |  |  | 
 |  |  |         //钉钉通知地址 | 
 |  |  |         public static final String DINGDING_URL = "DINGDING_URL"; | 
 |  |  |         //钉钉签名 | 
 |  |  |         public static void main(String[] args) { | 
 |  |  |             double[][] polygon = {{120, 30}, {121, 30}, {121, 31}, {120, 31}}; // 经纬度列表表示多边形顶点 | 
 |  |  |             boolean isInside = isPointInPolygon(122.5, 30.5, polygon); | 
 |  |  |             System.out.println("Is inside: " + isInside); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         //小程序满载预警(%)最大值 | 
 |  |  |         public static final String WARN_MAX = "WARN_MAX"; | 
 |  |  |         //小程序满载预警(%)最小值 | 
 |  |  | 
 |  |  |  | 
 |  |  |             BACK_CYCLING("已还车", 2,"已还车"), | 
 |  |  |  | 
 |  |  |             LOCKING_DEFEAT("开锁失败", 3,"开锁失败") | 
 |  |  |             LOCKING_DEFEAT("开锁失败", 3,"开锁失败"), | 
 |  |  |             RIDES_PAUSING("临停中", 4,"临停中") | 
 |  |  |             ; | 
 |  |  |             String name; | 
 |  |  |  | 
 |  |  | 
 |  |  |             return  Constants.formatDecimalNum(money).divide(new BigDecimal(100), 2, BigDecimal.ROUND_UP); | 
 |  |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     public static boolean isPointInPolygon(double px, double py, double[]... polygon) { | 
 |  |  |         int i, j; | 
 |  |  |         boolean result = false; | 
 |  |  |         for (i = 0, j = polygon.length - 1; i < polygon.length; j = i++) { | 
 |  |  |             if ((polygon[i][1] > py) != (polygon[j][1] > py) && | 
 |  |  |                     (px < (polygon[j][0] - polygon[i][0]) * (py - polygon[i][1]) / (polygon[j][1] - polygon[i][1]) + polygon[i][0])) { | 
 |  |  |                 result = !result; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         return result; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } |