Merge remote-tracking branch 'origin/master'
| | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.concurrent.ExecutionException; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | log.info("相机:" + cameraId + "未开启报警引导功能"); |
| | | return; |
| | | } |
| | | |
| | | SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); |
| | | GuideTask guideTask = new GuideTask(); |
| | | //相机ID |
| | |
| | | */ |
| | | private String getNearbyCamera(double[] targetPosition) { |
| | | String minDistanceCameraId = ""; |
| | | //获取所有大光电 |
| | | List<ArdCameras> ardCamerasList = ardCamerasMapper.selectArdCamerasList(new ArdCameras("1")); |
| | | //统计所有大光电可视范围内与报警点的距离 |
| | | Map<String, Double> distanceMap = new HashMap<>(); |
| | | Map<String, Integer> guideMap = new HashMap<>(); |
| | | for (ArdCameras camera : ardCamerasList) { |
| | | double[] camPosition = new double[]{camera.getLongitude(), camera.getLatitude()}; |
| | | double distance = GisTool.getDistance(targetPosition, camPosition); |
| | | if (distance != 0.0 && distance <= camera.getCamMaxVisibleDistance()) { |
| | | distanceMap.put(camera.getId(), distance); |
| | | if (StringUtils.isNull(camera.getCamAlarmGuideEnable())) { |
| | | camera.setCamAlarmGuideEnable(0); |
| | | try { |
| | | //获取所有大光电 |
| | | List<ArdCameras> ardCamerasList = ardCamerasMapper.selectArdCamerasList(new ArdCameras("1")); |
| | | //统计所有大光电可视范围内与报警点的距离 |
| | | Map<String, Double> distanceMap = new HashMap<>(); |
| | | Map<String, Integer> guideMap = new HashMap<>(); |
| | | for (ArdCameras camera : ardCamerasList) { |
| | | if (camera.getCamMaxVisibleDistance() == null) { |
| | | continue; |
| | | } |
| | | guideMap.put(camera.getId(), camera.getCamAlarmGuideEnable()); |
| | | double[] camPosition = new double[]{camera.getLongitude(), camera.getLatitude()}; |
| | | double distance = GisTool.getDistance(targetPosition, camPosition); |
| | | if (distance != 0.0 && distance <= camera.getCamMaxVisibleDistance()) { |
| | | distanceMap.put(camera.getId(), distance); |
| | | if (StringUtils.isNull(camera.getCamAlarmGuideEnable())) { |
| | | camera.setCamAlarmGuideEnable(0); |
| | | } |
| | | guideMap.put(camera.getId(), camera.getCamAlarmGuideEnable()); |
| | | } |
| | | } |
| | | if (distanceMap.size() > 0) { |
| | | log.debug("尝试查找最近光电"); |
| | | //获取距离字典中最近的一个相机ID |
| | | minDistanceCameraId = ArdTool.getKeyByMinValue(distanceMap); |
| | | log.debug("查找到最近光电:" + minDistanceCameraId); |
| | | if (guideMap.get(minDistanceCameraId).equals(0)) { |
| | | log.debug("该光电未开启报警引导"); |
| | | return " "; |
| | | } |
| | | } |
| | | } |
| | | if (distanceMap.size() > 0) { |
| | | log.debug("尝试查找最近光电"); |
| | | //获取距离字典中最近的一个相机ID |
| | | minDistanceCameraId = ArdTool.getKeyByMinValue(distanceMap); |
| | | log.debug("查找到最近光电:" + minDistanceCameraId); |
| | | if (guideMap.get(minDistanceCameraId).equals(0)) { |
| | | log.debug("该光电未开启报警引导"); |
| | | return " "; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | log.error("获取附近开启报警引导功能光电异常:"+ex.getMessage()); |
| | | } |
| | | return minDistanceCameraId; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 雷达引导入队 |
| | | */ |
| | |
| | | public void addTaskToQueue(String cameraId, GuideTask task) { |
| | | /*通过相机ID获取引导队列,并将引导任务加入队列*/ |
| | | PriorityBlockingQueue<GuideTask> guideTaskQueue = GuidePriorityQueue.cameraQueueMap.get(cameraId); |
| | | if(StringUtils.isNull(guideTaskQueue)) |
| | | { |
| | | if (StringUtils.isNull(guideTaskQueue)) { |
| | | log.info("相机未登录,没有队列,无法入队引导"); |
| | | return; |
| | | } |
| | | log.debug("新任务入队:"+task.getAlarmId()); |
| | | log.debug("新任务入队:" + task.getAlarmId()); |
| | | guideTaskQueue.add(task); |
| | | /*获取该相机的当前执行线程*/ |
| | | TaskThread currentTaskThread = threadMap.get(cameraId); |
| | | //如果队列当前线程正在运行,若入队任务优先级大于当前任务优先级,则终止当前线程 |
| | | if (currentTaskThread != null && task.getPriority() > currentTaskThread.getCurrentTask().getPriority()) { |
| | | currentTaskThread.getThread().interrupt(); |
| | | if (currentTaskThread != null){ |
| | | if (task.getPriority() > currentTaskThread.getCurrentTask().getPriority()) { |
| | | currentTaskThread.getThread().interrupt(); |
| | | } |
| | | if (!currentTaskThread.getThread().isAlive()) { |
| | | Thread newThread = createThread(cameraId, guideTaskQueue); |
| | | threadMap.put(cameraId, new TaskThread(newThread, task)); |
| | | newThread.start(); |
| | | } |
| | | } |
| | | //如果队列当前没有线程正在运行,则启动新线程 |
| | | if (currentTaskThread == null || !currentTaskThread.getThread().isAlive()) { |
| | | else { |
| | | Thread newThread = createThread(cameraId, guideTaskQueue); |
| | | threadMap.put(cameraId, new TaskThread(newThread, task)); |
| | | newThread.start(); |
| | |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | GuideTask task = queue.take(); |
| | | log.debug("取出队列数据:"+task.getAlarmId()); |
| | | log.debug("取出队列数据:" + task.getAlarmId()); |
| | | taskExecutor.processTask(task); |
| | | // 更新线程的当前任务 |
| | | TaskThread currentTaskThread = threadMap.get(queueName); |
| | |
| | | |
| | | import com.ruoyi.common.annotation.SdkOperate; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.common.utils.file.MimeTypeUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.device.camera.domain.CameraCmd; |
| | | import com.ruoyi.device.camera.service.IArdCamerasService; |
| | |
| | | //存储到minio |
| | | String BucketName = "pic"; |
| | | String ObjectName = "capture/" + IdUtils.simpleUUID() + ".jpeg"; |
| | | String ContentType = "image/JPEG"; |
| | | InputStream input = new ByteArrayInputStream(array); |
| | | String url = ""; |
| | | try { |
| | | boolean b = minioUtil.uploadObject(BucketName, ObjectName, input, input.available(), ContentType); |
| | | boolean b = minioUtil.uploadObject(BucketName, ObjectName, input, input.available(), MimeTypeUtils.IMAGE_JPEG); |
| | | if (b) { |
| | | url = minioUtil.getBucketObjectUrl(BucketName, ObjectName); |
| | | log.debug("上传文件成功!" + url); |
| | |
| | | log.debug("录像停止"); |
| | | //存入minio |
| | | String BucketName = cmd.getRecordBucketName(); |
| | | String ObjectName = cmd.getRecordObjectName(); |
| | | String ContentType = "video/MP4"; |
| | | String ObjectName = cmd.getRecordObjectName()+".mp4"; |
| | | FileInputStream stream = new FileInputStream(path); |
| | | String time = new SimpleDateFormat("yyyyMMdd").format(new Date()); |
| | | String recordName = cameraId + "/" + time + "/" + ObjectName + ".mp4"; |
| | | boolean b = minioUtil.uploadObject(BucketName, recordName, stream, stream.available(), ContentType); |
| | | boolean b = minioUtil.uploadObject(BucketName, ObjectName, stream, stream.available(), "video/MP4"); |
| | | if (b) { |
| | | url = endpoint + "/" + BucketName + "/" + recordName; |
| | | url = minioUtil.getBucketObjectUrl(BucketName, ObjectName); |
| | | log.debug("上传文件成功!" + url); |
| | | } |
| | | return url; |
| | |
| | | } |
| | | } |
| | | //创建引导队列 |
| | | Comparator<GuideTask> comparator = GuidePriorityQueue.getComparator(); |
| | | PriorityBlockingQueue<GuideTask> priorityQueue = new PriorityBlockingQueue<>(1000, comparator); |
| | | GuidePriorityQueue.cameraQueueMap.put(camera.getId(), priorityQueue); |
| | | if(!GuidePriorityQueue.cameraQueueMap.containsKey(camera.getId())) |
| | | { |
| | | Comparator<GuideTask> comparator = GuidePriorityQueue.getComparator(); |
| | | PriorityBlockingQueue<GuideTask> priorityQueue = new PriorityBlockingQueue<>(1000, comparator); |
| | | GuidePriorityQueue.cameraQueueMap.put(camera.getId(), priorityQueue); |
| | | } |
| | | |
| | | } else { |
| | | log.debug(camera.getIp() + ":" + camera.getPort() + "登录失败"); |
| | | camera.setChanNum(0); |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | |
| | | @Excel(name = "派警名称") |
| | | private String name; |
| | | |
| | | /** 描述 */ |
| | | @Excel(name = "描述") |
| | | private String text; |
| | | |
| | | /** 经度 */ |
| | | @Excel(name = "经度") |
| | | private Double longitude; |
| | |
| | | private String userId; |
| | | |
| | | /** 派警关联用户信息 */ |
| | | private List<String> ardDispatchPoliceUserList; |
| | | private List<SysUser> sysUserList; |
| | | |
| | | public void setId(String id) |
| | | { |
| | |
| | | return userId; |
| | | } |
| | | |
| | | public List<String> getArdDispatchPoliceUserList() { |
| | | return ardDispatchPoliceUserList; |
| | | public List<SysUser> getSysUserList() { |
| | | return sysUserList; |
| | | } |
| | | |
| | | public void setArdDispatchPoliceUserList(List<String> ardDispatchPoliceUserList) { |
| | | this.ardDispatchPoliceUserList = ardDispatchPoliceUserList; |
| | | public void setSysUserList(List<SysUser> sysUserList) { |
| | | this.sysUserList = sysUserList; |
| | | } |
| | | |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | } |
| | | } |
| | |
| | | * @author ard |
| | | * @date 2023-08-21 |
| | | */ |
| | | public class ArdDispatchPoliceUser extends BaseEntity |
| | | public class ArdDispatchPoliceUser |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | /** 关联用户ID */ |
| | | @Excel(name = "关联用户ID") |
| | | private String userId; |
| | | |
| | | |
| | | |
| | | public void setDispatchId(String dispatchId) |
| | | { |
| | |
| | | return userId; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("dispatchId", getDispatchId()) |
| | | .append("userId", getUserId()) |
| | | .toString(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | |
| | | * |
| | | * @param ardDispatchPolice 派警管理对象 |
| | | */ |
| | | /** |
| | | * 新增派警关联用户信息 |
| | | * |
| | | * @param ardDispatchPolice 派警管理对象 |
| | | */ |
| | | public void insertArdDispatchPoliceUser(ArdDispatchPolice ardDispatchPolice) { |
| | | List<String> ardDispatchPoliceUserList = ardDispatchPolice.getArdDispatchPoliceUserList(); |
| | | List<SysUser> sysUserList = ardDispatchPolice.getSysUserList(); |
| | | String id = ardDispatchPolice.getId(); |
| | | if (StringUtils.isNotNull(ardDispatchPoliceUserList)) { |
| | | if (StringUtils.isNotNull(sysUserList)) { |
| | | List<ArdDispatchPoliceUser> list = new ArrayList<ArdDispatchPoliceUser>(); |
| | | for (String userId : ardDispatchPoliceUserList) { |
| | | for (SysUser user :sysUserList) |
| | | { |
| | | ArdDispatchPoliceUser ardDispatchPoliceUser=new ArdDispatchPoliceUser(); |
| | | ardDispatchPoliceUser.setUserId(userId); |
| | | ardDispatchPoliceUser.setDispatchId(id); |
| | | ardDispatchPoliceUser.setUserId(user.getUserId()); |
| | | list.add(ardDispatchPoliceUser); |
| | | } |
| | | if (list.size() > 0) { |
| | |
| | | |
| | | import com.ruoyi.common.utils.ConfigUtils; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.common.utils.file.ImageUtils; |
| | | import com.sun.imageio.plugins.common.ImageUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | public class ReadAccessDatabase { |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | // 多个数据库文件路径 |
| | | String[] dbPaths = { |
| | | "D:\\Workspaces\\ard\\安瑞达工作资料\\mdb\\道路中心线.mdb" |
| | |
| | | |
| | | /** |
| | | * @ClassName WebSocketUtils |
| | | * @Description: |
| | | * @Description: websocket工具类 |
| | | * @Author 刘苏义 |
| | | * @Date 2023/1/27 7:46 |
| | | * @Version 1.0 |
| | |
| | | <resultMap type="ArdDispatchPolice" id="ArdDispatchPoliceResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="text" column="text"/> |
| | | <result property="longitude" column="longitude"/> |
| | | <result property="latitude" column="latitude"/> |
| | | <result property="deptId" column="dept_id"/> |
| | |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <!-- 子查询,关联 ard_dispatch_police_user 表 --> |
| | | <collection property="ardDispatchPoliceUserList" ofType="java.lang.String" select="getUserIdsByMainTableId" |
| | | column="id"/> |
| | | </resultMap> |
| | | <select id="getUserIdsByMainTableId" resultType="java.lang.String"> |
| | | SELECT user_id |
| | | FROM ard_dispatch_police_user |
| | | WHERE dispatch_id = #{id} |
| | | </select> |
| | | <resultMap id="ArdDispatchPoliceArdDispatchPoliceUserResult" type="ArdDispatchPolice" |
| | | extends="ArdDispatchPoliceResult"> |
| | | <collection property="ardDispatchPoliceUserList" notNullColumn="sub_dispatch_id" javaType="java.util.List" |
| | | resultMap="ArdDispatchPoliceUserResult"/> |
| | | <collection property="sysUserList" javaType="java.util.List" resultMap="SysUserListResult"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="ArdDispatchPoliceUser" id="ArdDispatchPoliceUserResult"> |
| | | <result property="dispatchId" column="sub_dispatch_id"/> |
| | | <resultMap id="ArdDispatchPoliceArdDispatchPoliceUserResult" type="ArdDispatchPolice" |
| | | extends="ArdDispatchPoliceResult"> |
| | | <collection property="sysUserList" notNullColumn="sub_dispatch_id" javaType="java.util.List" |
| | | resultMap="SysUserListResult"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="SysUser" id="SysUserListResult"> |
| | | <result property="userId" column="sub_user_id"/> |
| | | <result property="nickName" column="sub_nick_name"/> |
| | | <result property="deptId" column="sub_dept_id"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdDispatchPoliceVo"> |
| | | SELECT ID, |
| | | NAME, |
| | | longitude, |
| | | latitude, |
| | | dept_id, |
| | | user_id, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time |
| | | FROM ard_dispatch_police |
| | | SELECT adp.ID, |
| | | adp.NAME, |
| | | adp.text, |
| | | adp.longitude, |
| | | adp.latitude, |
| | | adp.dept_id, |
| | | adp.user_id, |
| | | adp.create_by, |
| | | adp.create_time, |
| | | adp.update_by, |
| | | adp.update_time, |
| | | u.user_id as sub_user_id, |
| | | u.nick_name as sub_nick_name, |
| | | u.dept_id as sub_dept_id |
| | | FROM ard_dispatch_police adp |
| | | left join ard_dispatch_police_user b on b.dispatch_id = adp.id |
| | | left join sys_user u on b.user_id = u.user_id |
| | | </sql> |
| | | |
| | | <select id="selectArdDispatchPoliceList" parameterType="ArdDispatchPolice" resultMap="ArdDispatchPoliceResult"> |
| | |
| | | resultMap="ArdDispatchPoliceArdDispatchPoliceUserResult"> |
| | | select a.id, |
| | | a.name, |
| | | a.text, |
| | | a.longitude, |
| | | a.latitude, |
| | | a.dept_id, |
| | |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | b.dispatch_id as sub_dispatch_id, |
| | | b.user_id as sub_user_id |
| | | b.user_id as sub_user_id, |
| | | b.nick_name as sub_nick_name, |
| | | b.dept_id as sub_dept_id |
| | | from ard_dispatch_police a |
| | | left join ard_dispatch_police_user b on b.dispatch_id = a.id |
| | | where a.id = #{id} |
| | |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="name != null">name,</if> |
| | | <if test="text != null">text,</if> |
| | | <if test="longitude != null">longitude,</if> |
| | | <if test="latitude != null">latitude,</if> |
| | | <if test="deptId != null">dept_id,</if> |
| | |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="name != null">#{name},</if> |
| | | <if test="text != null">#{text},</if> |
| | | <if test="longitude != null">#{longitude},</if> |
| | | <if test="latitude != null">#{latitude},</if> |
| | | <if test="deptId != null">#{deptId},</if> |
| | |
| | | update ard_dispatch_police |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="name != null">name = #{name},</if> |
| | | <if test="text != null">text = #{text},</if> |
| | | <if test="longitude != null">longitude = #{longitude},</if> |
| | | <if test="latitude != null">latitude = #{latitude},</if> |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | |
| | | @Resource |
| | | AuthorizeService authorizeService; |
| | | //生成临时授权只有一天 |
| | | // @PostMapping("/makeTempLicense") |
| | | // public JSONObject makeTempLicense() { |
| | | // JSONObject jsonObject = authorizeService.makeTempLicense(); |
| | | // return jsonObject; |
| | | // } |
| | | @PostMapping("/makeTempLicense") |
| | | public JSONObject makeTempLicense() { |
| | | JSONObject jsonObject = authorizeService.makeTempLicense(); |
| | | return jsonObject; |
| | | } |
| | | //获取机器码 |
| | | @ApiOperation("获取机器码") |
| | | @PostMapping("/getMachineCode") |
| | |
| | | return data; |
| | | } |
| | | |
| | | //获取授权 |
| | | //加密 |
| | | @PostMapping(value = "/getLicense") |
| | | public String getLicense(@RequestBody String data) { |
| | | String EncryptedStr = authorizeService.getLicense(data); |
| | | String EncryptedStr = authorizeService.encryption(data); |
| | | return EncryptedStr; |
| | | } |
| | | //解析授权 |
| | | //解密 |
| | | @PostMapping(value = "/parsLicense") |
| | | public String parsLicense(@RequestBody String data) { |
| | | String DecryptStr = authorizeService.parsLicense(data); |
| | | String DecryptStr = authorizeService.decryption(data); |
| | | return DecryptStr; |
| | | } |
| | | } |
| | |
| | | public static final String IMAGE_BMP = "image/bmp"; |
| | | |
| | | public static final String IMAGE_GIF = "image/gif"; |
| | | |
| | | public static final String Video_MP4 = "video/mp4"; |
| | | |
| | | public static final String[] IMAGE_EXTENSION = { "bmp", "gif", "jpg", "jpeg", "png" }; |
| | | |
| | |
| | | import java.util.List; |
| | | import java.util.Properties; |
| | | import com.ruoyi.common.utils.Arith; |
| | | import com.ruoyi.common.utils.file.ImageUtils; |
| | | import com.ruoyi.common.utils.ip.IpUtils; |
| | | import com.ruoyi.framework.web.domain.server.Cpu; |
| | | import com.ruoyi.framework.web.domain.server.Jvm; |
| | |
| | | ISysUserService sysUserService; |
| | | @Resource |
| | | RongCloudService rongCloudService; |
| | | |
| | | /** |
| | | * 定时获取app用户在线状态 |
| | | * 刘苏义 |
| | | * 2023/8/9 9:17:48 |
| | | */ |
| | | public void getAppUserOnlineStateTask() { |
| | | |
| | | try { |
| | | List<SysUser> SysUserList = sysUserService.selectAllAppUserList(new SysUser()); |
| | | if (SysUserList.size() > 0) { |
| | | for (SysUser sysUser : SysUserList) { |
| | | Boolean appOnlineState = sysUser.getAppOnlineState().equals("1"); |
| | | Boolean online = rongCloudService.checkOnline(sysUser.getUserId()); |
| | | if (online) { |
| | | sysUser.setAppOnlineState("1"); |
| | | } else { |
| | | sysUser.setAppOnlineState("0"); |
| | | if (!appOnlineState.equals(online)) { |
| | | sysUser.setAppOnlineState(online ? "1" : "0"); |
| | | sysUserService.updateUserProfile(sysUser); |
| | | } |
| | | sysUserService.updateUserProfile(sysUser); |
| | | } |
| | | } |
| | | } catch (Exception ex) { |
| | |
| | | JSONObject getMachineCode();//获取机器码 |
| | | JSONObject uploadLicense(MultipartFile file);//上传授权文件 |
| | | |
| | | String getLicense(String data);//加密 |
| | | String parsLicense(String data);//解密 |
| | | String encryption(String data);//加密 |
| | | String decryption(String data);//解密 |
| | | } |
| | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 验证授权 |
| | | * |
| | | * @return JSONObject |
| | | */ |
| | | @Override |
| | | public JSONObject verifyAuthorization() { |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 制作临时授权 |
| | | * |
| | | * @return JSONObject |
| | | */ |
| | | @Override |
| | | public JSONObject makeTempLicense() { |
| | | String savedDir = System.getProperty("user.dir") + "\\ardLicense"; |
| | |
| | | return data; |
| | | } |
| | | |
| | | /** |
| | | * 获取机器码 |
| | | * |
| | | * @return JSONObject |
| | | */ |
| | | @Override |
| | | public JSONObject getMachineCode() { |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 上传授权文件 |
| | | * |
| | | * @return JSONObject |
| | | */ |
| | | @Override |
| | | public JSONObject uploadLicense(MultipartFile file) { |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 加密授权数据 |
| | | * |
| | | * @return JSONObject |
| | | */ |
| | | @Override |
| | | public String getLicense(String data) { |
| | | public String encryption(String data) { |
| | | String codeString = ""; |
| | | try { |
| | | if (data != "") { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 解密授权数据 |
| | | * |
| | | * @return JSONObject |
| | | */ |
| | | @Override |
| | | public String parsLicense(String data) { |
| | | public String decryption(String data) { |
| | | String codeString = ""; |
| | | try { |
| | | if (data != "") { |