| | |
| | | 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 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 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 int FOUR =4 ; |
| | | 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{ |
| | | |
| | |
| | | //钉钉通知地址 |
| | | 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"; |
| | | //小程序满载预警(%)最小值 |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | |
| | | } |