| | |
| | | return sb.toString(); |
| | | } |
| | | |
| | | // 001000XY001000 |
| | | public static String zeroFill(String msg, Integer len) { |
| | | len = Optional.ofNullable(len).orElse(16); |
| | | if (msg.length() == len){ |
| | | return msg; |
| | | } else if (msg.length() > len){ |
| | | return msg.substring(0, 16); |
| | | return msg; |
| | | } else { |
| | | StringBuilder msgBuilder = new StringBuilder(msg); |
| | | for (int i = 0; i<len-msg.length(); i++){ |
| | |
| | | |
| | | private static final boolean PRINT_LOG = false; |
| | | |
| | | private static final double DEFAULT_POSITION_MATCH_TOLERANCE = 0.2D; |
| | | private static final double DEFAULT_POSITION_MATCH_TOLERANCE = 0.05D; |
| | | |
| | | @Autowired |
| | | private AgvService agvService; |
| | |
| | | } |
| | | |
| | | private double resolvePositionTolerance() { |
| | | return Math.max(DEFAULT_POSITION_MATCH_TOLERANCE, hikOrderProperties.getDefaultAllowedDeviationXY()); |
| | | double scale = hikOrderProperties.getCoordinateScale(); |
| | | return Math.max(DEFAULT_POSITION_MATCH_TOLERANCE, hikOrderProperties.getDefaultAllowedDeviationXY()) / scale; |
| | | } |
| | | |
| | | private Collection<Code> getAllCodes() { |
| | |
| | | if (route.getEndCode() != null) { |
| | | affectedCodeIds.add(route.getEndCode()); |
| | | } |
| | | Code startCode = codeService.getCacheById(route.getStartCode()); |
| | | Code endCode = codeService.getCacheById(route.getEndCode()); |
| | | codeGapService.createCodeGapByCode(startCode, endCode, getLoginUserId()); |
| | | codeService.refreshCornerByCodeIds(affectedCodeIds); |
| | | return R.ok("Update Success").add(route); |
| | | } |
| | |
| | | AgvModel model = agvModelService.getByAgvId(agvId); |
| | | // hik robot |
| | | if (hikOrderPublishService.support(model)) { |
| | | return redis.getObject(RedisConstant.HK_AGV_DATA_FLAG, agv.getUuid()) != null; |
| | | return redis.getObject(RedisConstant.HK_AGV_ONLINE_FLAG, agv.getUuid()) != null; |
| | | // zoneyung robot |
| | | } else { |
| | | return redis.getObject(RedisConstant.AGV_ONLINE_FLAG, agv.getUuid()) != null; |
| | |
| | | static-path-pattern: /** |
| | | datasource: |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | url: jdbc:mysql://localhost:3306/rcs_ctu_stable?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://localhost:3306/rcs_ctu_stable_hik?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: xltys1995 |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | |
| | | zone-set-id: default |
| | | map-id: default |
| | | map-description: RCS Map |
| | | coordinate-scale: 1.0 |
| | | coordinate-scale: 0.001 |
| | | metric-scale: 0.001 |
| | | default-allowed-deviation-xy: 0.05 |
| | | default-allowed-deviation-theta: 0.08726646259971647 |