From a4343fc2cb73ed178e3dc0bf7daa6842fcea9d9b Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Sun, 14 Sep 2025 11:55:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90v3.8.3=E3=80=91=E5=BA=95=E5=B1=82core?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E4=BA=9B=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jeecg/common/api/CommonAPI.java | 12 + .../jeecg/common/api/dto/AiragFlowDTO.java | 36 + .../jeecg/common/constant/CommonConstant.java | 52 +- .../common/constant/PasswordConstant.java | 15 + .../common/constant/ProvinceCityArea.java | 2 +- .../constant/enums/MessageTypeEnum.java | 28 +- .../common/constant/enums/NoticeTypeEnum.java | 11 +- .../constant/enums/SysAnnmentTypeEnum.java | 20 +- .../common/system/query/QueryGenerator.java | 26 +- .../org/jeecg/common/system/util/JwtUtil.java | 36 +- .../java/org/jeecg/common/util/DateUtils.java | 42 + .../jeecg/common/util/FileDownloadUtils.java | 154 ++ .../java/org/jeecg/common/util/PmsUtil.java | 2 + .../java/org/jeecg/common/util/RestUtil.java | 57 + .../common/util/ShiroThreadPoolExecutor.java | 37 + .../org/jeecg/common/util/TokenUtils.java | 4 + .../org/jeecg/common/util/oConvertUtils.java | 27 +- .../java/org/jeecg/config/AutoPoiConfig.java | 3 +- .../org/jeecg/config/AutoPoiDictConfig.java | 1 + .../jeecg/config/JeecgGaodeBaseConfig.java | 29 + .../java/org/jeecg/config/StaticConfig.java | 2 + .../java/org/jeecg/config/Swagger3Config.java | 2 +- .../config/mybatis/MybatisPlusSaasConfig.java | 20 +- .../org/jeecg/config/oss/MinioConfig.java | 2 + .../jeecg/config/oss/OssConfiguration.java | 2 + .../org/jeecg/config/shiro/ShiroConfig.java | 8 +- .../org/jeecg/config/shiro/ShiroRealm.java | 4 +- .../jeecg/config/shiro/filters/JwtFilter.java | 2 +- .../test/controller/JeecgDemoController.java | 2 +- .../dlglong/controller/DlMockController.java | 26 + .../jeecg/modules/dlglong/json/CarLngLat.json | 14 + .../jeecg/modules/dlglong/json/CarTrace.json | 1778 +++++++++++++++++ .../jeecg-system-local-api/pom.xml | 2 +- .../jeecg/modules/openapi/entity/OpenApi.java | 1 - .../controller/SysAnnouncementController.java | 14 +- .../impl/SysAnnouncementServiceImpl.java | 73 +- .../openapi/test/SampleOpenApiTest.java | 6 +- 37 files changed, 2488 insertions(+), 64 deletions(-) create mode 100644 jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/api/dto/AiragFlowDTO.java create mode 100644 jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/PasswordConstant.java create mode 100644 jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ShiroThreadPoolExecutor.java create mode 100644 jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/JeecgGaodeBaseConfig.java create mode 100644 jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/json/CarLngLat.json create mode 100644 jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/json/CarTrace.json diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/api/CommonAPI.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/api/CommonAPI.java index e087a61e1..17bf0d029 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/api/CommonAPI.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/api/CommonAPI.java @@ -1,5 +1,6 @@ package org.jeecg.common.api; +import org.jeecg.common.api.dto.AiragFlowDTO; import org.jeecg.common.system.vo.*; import java.util.List; @@ -144,4 +145,15 @@ public interface CommonAPI { List translateDictFromTableByKeys(String table, String text, String code, String keys, String dataSource); //update-end---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------ + /** + * 16 运行AIRag流程 + * for [QQYUN-13634]在baseapi里面封装方法,方便其他模块调用 + * + * @param airagFlowDTO + * @return 流程执行结果,可能是String或者Map + * @author chenrui + * @date 2025/9/2 11:43 + */ + Object runAiragFlow(AiragFlowDTO airagFlowDTO); + } diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/api/dto/AiragFlowDTO.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/api/dto/AiragFlowDTO.java new file mode 100644 index 000000000..44d11345d --- /dev/null +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/api/dto/AiragFlowDTO.java @@ -0,0 +1,36 @@ +package org.jeecg.common.api.dto; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.Map; + +/** + * 调用AI流程入参 + * for [QQYUN-13634]在baseapi里面封装方法,方便其他模块调用 + * @author chenrui + * @date 2025/9/2 14:11 + */ +@Builder +@AllArgsConstructor +@NoArgsConstructor +@Data +public class AiragFlowDTO implements Serializable { + + + private static final long serialVersionUID = 7431775881170684867L; + + /** + * 流程id + */ + private String flowId; + + + /** + * 输入参数 + */ + private Map inputParams; +} diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java index 10c761573..78f2bb6e8 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java @@ -642,11 +642,12 @@ public interface CommonConstant { /** - * 自定义首页关联关系(ROLE:表示角色 USER:表示用户) + * 自定义首页关联关系(ROLE:表示角色 USER:表示用户 DEFAULT:默认首页) * */ String HOME_RELATION_ROLE = "ROLE"; String HOME_RELATION_USER = "USER"; + String HOME_RELATION_DEFAULT = "DEFAULT"; /** * 是否置顶(0否 1是) @@ -659,4 +660,53 @@ public interface CommonConstant { String FLOW_FOCUS_NOTICE_PREFIX = "flow:runtimeData:focus:notice:"; //任务缓办时间缓存前缀 String FLOW_TASK_DELAY_PREFIX = "flow:runtimeData:task:delay:"; + /** + * 用户代理类型:离职:quit 代理:agent + */ + String USER_AGENT_TYPE_QUIT = "quit"; + String USER_AGENT_TYPE_AGENT = "agent"; + /** + * 督办流程首节点任务taskKey + */ + String SUPERVISE_FIRST_TASK_KEY = "Task_1bhxpt0"; + + /** + * wps模板预览数据缓存前缀 + */ + String EOA_WPS_TEMPLATE_VIEW_DATA ="eoa:wps:templateViewData:"; + + /** + * wps模板预览版本号缓存前缀 + */ + String EOA_WPS_TEMPLATE_VIEW_VERSION ="eoa:wps:templateViewVersion:"; + /** + * 表单设计器oa新增字段 + * x_oa_timeout_date:逾期时间 + * x_oa_archive_status:归档状态 + */ + String X_OA_TIMEOUT_DATE ="x_oa_timeout_date"; + String X_OA_ARCHIVE_STATUS ="x_oa_archive_status"; + /** + * 流程状态 + * 待提交: 1 + * 处理中: 2 + * 已完成: 3 + * 已作废: 4 + * 已挂起: 5 + */ + String BPM_STATUS_1 ="1"; + String BPM_STATUS_2 ="2"; + String BPM_STATUS_3 ="3"; + String BPM_STATUS_4 ="4"; + String BPM_STATUS_5 ="5"; + + /** + * 默认租户产品包 + */ + String TENANT_PACK_DEFAULT = "default"; + + /** + * 部门名称redisKey(全路径) + */ + String DEPART_NAME_REDIS_KEY_PRE = "sys:cache:departPathName:"; } diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/PasswordConstant.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/PasswordConstant.java new file mode 100644 index 000000000..77b94286f --- /dev/null +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/PasswordConstant.java @@ -0,0 +1,15 @@ +package org.jeecg.common.constant; + +/** +* @Description: 密码常量类 +* +* @author: wangshuai +* @date: 2025/8/27 20:10 +*/ +public interface PasswordConstant { + + /** + * 导入用户默认密码 + */ + String DEFAULT_PASSWORD = "123456"; +} diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/ProvinceCityArea.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/ProvinceCityArea.java index 2758940a4..c597e2532 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/ProvinceCityArea.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/ProvinceCityArea.java @@ -121,7 +121,7 @@ public class ProvinceCityArea { public void getAreaByCode(String code,List ls){ for(Area area: areaList){ - if(area.getId().equals(code)){ + if(null != area && area.getId().equals(code)){ String pid = area.getPid(); ls.add(0,area.getText()); getAreaByCode(pid,ls); diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/MessageTypeEnum.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/MessageTypeEnum.java index c53d382e3..83690fbfc 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/MessageTypeEnum.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/MessageTypeEnum.java @@ -8,21 +8,30 @@ import java.util.List; /** * 消息类型 + * * @author: jeecg-boot */ @EnumDict("messageType") public enum MessageTypeEnum { - /** 系统消息 */ - XT("system", "系统消息"), - /** 邮件消息 */ - YJ("email", "邮件消息"), - /** 钉钉消息 */ + /** + * 系统消息 + */ + XT("system", "系统消息"), + /** + * 邮件消息 + */ + YJ("email", "邮件消息"), + /** + * 钉钉消息 + */ DD("dingtalk", "钉钉消息"), - /** 企业微信 */ + /** + * 企业微信 + */ QYWX("wechat_enterprise", "企业微信"); - MessageTypeEnum(String type, String note){ + MessageTypeEnum(String type, String note) { this.type = type; this.note = note; } @@ -56,12 +65,13 @@ public enum MessageTypeEnum { /** * 获取字典数据 + * * @return */ - public static List getDictList(){ + public static List getDictList() { List list = new ArrayList<>(); DictModel dictModel = null; - for(MessageTypeEnum e: MessageTypeEnum.values()){ + for (MessageTypeEnum e : MessageTypeEnum.values()) { dictModel = new DictModel(); dictModel.setValue(e.getType()); dictModel.setText(e.getNote()); diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/NoticeTypeEnum.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/NoticeTypeEnum.java index 39fa6e146..d98626abd 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/NoticeTypeEnum.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/NoticeTypeEnum.java @@ -14,7 +14,16 @@ public enum NoticeTypeEnum { NOTICE_TYPE_PLAN("日程消息","plan"), //暂时没用到 NOTICE_TYPE_MEETING("会议消息","meeting"), - NOTICE_TYPE_SYSTEM("系统消息","system"); + NOTICE_TYPE_SYSTEM("系统消息","system"), + /** + * 协同工作 + * for [JHHB-136]【vue3】协同工作系统消息需要添加一个类型 + */ + NOTICE_TYPE_COLLABORATION("协同工作", "collab"), + /** + * 督办 + */ + NOTICE_TYPE_SUPERVISE("督办管理", "supe"); /** * 文件类型名称 diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/SysAnnmentTypeEnum.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/SysAnnmentTypeEnum.java index e923f14f9..5b452703a 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/SysAnnmentTypeEnum.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/enums/SysAnnmentTypeEnum.java @@ -23,7 +23,25 @@ public enum SysAnnmentTypeEnum { /** * 邀请用户跳转到个人设置 */ - TENANT_INVITE("tenant_invite", "url", "/system/usersetting"); + TENANT_INVITE("tenant_invite", "url", "/system/usersetting"), + /** + * 协同工作-待办通知 + * for [JHHB-136]【vue3】协同工作系统消息需要添加一个类型 + */ + EOA_CO_NOTIFY("eoa_co_notify", "url", "/collaboration/pending"), + /** + * 协同工作-催办通知 + * for [JHHB-136]【vue3】协同工作系统消息需要添加一个类型 + */ + EOA_CO_REMIND("eoa_co_remind", "url", "/collaboration/pending"), + /** + * 督办管理-催办 + */ + EOA_SUP_REMIND("eoa_sup_remind", "url", "/superivse/list"), + /** + * 督办管理-通知 + */ + EOA_SUP_NOTIFY("eoa_sup_notify", "url", "/superivse/list"); /** * 业务类型(email:邮件 bpm:流程) diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/query/QueryGenerator.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/query/QueryGenerator.java index 1afd78720..966f18b8e 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/query/QueryGenerator.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/query/QueryGenerator.java @@ -414,9 +414,11 @@ public class QueryGenerator { } // update-begin-author:sunjianlei date:20220119 for: 【JTC-573】 过滤空条件查询,防止 sql 拼接多余的 and List filterConditions = conditions.stream().filter( - rule -> oConvertUtils.isNotEmpty(rule.getField()) - && oConvertUtils.isNotEmpty(rule.getRule()) - && oConvertUtils.isNotEmpty(rule.getVal()) + rule -> (oConvertUtils.isNotEmpty(rule.getField()) + && oConvertUtils.isNotEmpty(rule.getRule()) + && oConvertUtils.isNotEmpty(rule.getVal()) + ) + || "empty".equals(rule.getRule()) ).collect(Collectors.toList()); if (filterConditions.size() == 0) { return; @@ -427,9 +429,12 @@ public class QueryGenerator { queryWrapper.and(andWrapper -> { for (int i = 0; i < filterConditions.size(); i++) { QueryCondition rule = filterConditions.get(i); - if (oConvertUtils.isNotEmpty(rule.getField()) - && oConvertUtils.isNotEmpty(rule.getRule()) - && oConvertUtils.isNotEmpty(rule.getVal())) { + if ( + ( + oConvertUtils.isNotEmpty(rule.getField()) && oConvertUtils.isNotEmpty(rule.getRule()) && oConvertUtils.isNotEmpty(rule.getVal()) + ) + || "empty".equals(rule.getRule()) + ) { log.debug("SuperQuery ==> " + rule.toString()); @@ -716,7 +721,11 @@ public class QueryGenerator { * @param value 查询条件值 */ public static void addEasyQuery(QueryWrapper queryWrapper, String name, QueryRuleEnum rule, Object value) { - if (name==null || value == null || rule == null || oConvertUtils.isEmpty(value)) { + if ( + ( + name==null || value == null || rule == null || oConvertUtils.isEmpty(value) + ) + && !QueryRuleEnum.EMPTY.equals(rule)) { return; } name = oConvertUtils.camelToUnderline(name); @@ -728,6 +737,9 @@ public class QueryGenerator { case GE: queryWrapper.ge(name, value); break; + case EMPTY: + queryWrapper.isNull(name); + break; case LT: queryWrapper.lt(name, value); break; diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java index c6fa09dd1..4755380fa 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java @@ -49,24 +49,24 @@ public class JwtUtil { * @param code * @param errorMsg */ - public static void responseError(ServletResponse response, Integer code, String errorMsg) { - HttpServletResponse httpServletResponse = (HttpServletResponse) response; - // issues/I4YH95浏览器显示乱码问题 - httpServletResponse.setHeader("Content-type", "text/html;charset=UTF-8"); - Result jsonResult = new Result(code, errorMsg); - jsonResult.setSuccess(false); - OutputStream os = null; - try { - os = httpServletResponse.getOutputStream(); - httpServletResponse.setCharacterEncoding("UTF-8"); - httpServletResponse.setStatus(code); - os.write(new ObjectMapper().writeValueAsString(jsonResult).getBytes("UTF-8")); - os.flush(); - os.close(); - } catch (IOException e) { + public static void responseError(HttpServletResponse response, Integer code, String errorMsg) { + try { + Result jsonResult = new Result(code, errorMsg); + jsonResult.setSuccess(false); + + // 设置响应头和内容类型 + response.setStatus(code); + response.setHeader("Content-type", "text/html;charset=UTF-8"); + response.setContentType("application/json;charset=UTF-8"); + // 使用 ObjectMapper 序列化为 JSON 字符串 + ObjectMapper objectMapper = new ObjectMapper(); + String json = objectMapper.writeValueAsString(jsonResult); + response.getWriter().write(json); + response.getWriter().flush(); + } catch (IOException e) { log.error(e.getMessage(), e); - } - } + } + } /** * 校验token是否正确 @@ -99,7 +99,7 @@ public class JwtUtil { DecodedJWT jwt = JWT.decode(token); return jwt.getClaim("username").asString(); } catch (JWTDecodeException e) { - log.warn(e.getMessage(), e); + log.error(e.getMessage(), e); return null; } } diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/DateUtils.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/DateUtils.java index 4e929a144..ebf13d0b7 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/DateUtils.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/DateUtils.java @@ -13,6 +13,8 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.temporal.ChronoUnit; +import java.util.List; +import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; @@ -814,4 +816,44 @@ public class DateUtils extends PropertyEditorSupport { return calendar1.get(Calendar.YEAR) == calendar2.get(Calendar.YEAR); } + /** + * 获取两个日期之间的所有日期列表,包含开始和结束日期 + * + * @param begin + * @param end + * @return + */ + public static List getDateRangeList(Date begin, Date end) { + List dateList = new ArrayList<>(); + if (begin == null || end == null) { + return dateList; + } + + // 清除时间部分,只比较日期 + Calendar beginCal = Calendar.getInstance(); + beginCal.setTime(begin); + beginCal.set(Calendar.HOUR_OF_DAY, 0); + beginCal.set(Calendar.MINUTE, 0); + beginCal.set(Calendar.SECOND, 0); + beginCal.set(Calendar.MILLISECOND, 0); + + Calendar endCal = Calendar.getInstance(); + endCal.setTime(end); + endCal.set(Calendar.HOUR_OF_DAY, 0); + endCal.set(Calendar.MINUTE, 0); + endCal.set(Calendar.SECOND, 0); + endCal.set(Calendar.MILLISECOND, 0); + + if (endCal.before(beginCal)) { + return dateList; + } + + dateList.add(beginCal.getTime()); + while (beginCal.before(endCal)) { + beginCal.add(Calendar.DAY_OF_YEAR, 1); + dateList.add(beginCal.getTime()); + } + return dateList; + } + } \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FileDownloadUtils.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FileDownloadUtils.java index d9d6ff86b..dfca916d7 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FileDownloadUtils.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FileDownloadUtils.java @@ -1,14 +1,22 @@ package org.jeecg.common.util; +import cn.hutool.core.io.IoUtil; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; +import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; import org.apache.commons.io.FilenameUtils; +import org.apache.commons.io.IOUtils; +import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.exception.JeecgBootException; +import org.jeecg.common.util.filter.SsrfFileTypeFilter; import javax.servlet.http.HttpServletResponse; import java.io.*; +import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.util.List; import java.util.zip.ZipEntry; @@ -203,4 +211,150 @@ public class FileDownloadUtils { dir.mkdirs(); } } + + + /** + * 下载单个文件到ZIP流 + * 核心功能:获取文件流,写入ZIP条目 + * @param fileUrl 文件URL(可以是HTTP URL或本地路径) + * @param fileName ZIP内的文件名 + * @param zous ZIP输出流 + */ + public static void downLoadSingleFile(String fileUrl, String fileName, String uploadUrl,ZipArchiveOutputStream zous) { + InputStream inputStream = null; + try { + // 创建ZIP条目:每个文件在ZIP中都是一个独立条目 + ZipArchiveEntry entry = new ZipArchiveEntry(fileName); + zous.putArchiveEntry(entry); + + // 获取文件输入流:区分普通文件和快捷方式 + if (fileUrl.endsWith(".url")) { + // 处理快捷方式:生成.url文件内容 + inputStream = FileDownloadUtils.createInternetShortcut(fileName, fileUrl, ""); + } else { + // 普通文件下载:从URL或本地路径获取流 + inputStream = getDownInputStream(fileUrl,uploadUrl); + } + + if (inputStream != null) { + // 将文件流写入ZIP + IOUtils.copy(inputStream, zous); + } + // 关闭当前ZIP条目 + zous.closeArchiveEntry(); + } catch (IOException e) { + log.error("文件下载失败: {}", e); + } finally { + // 确保输入流关闭 + IoUtil.close(inputStream); + } + } + + /** + * 获取下载文件输入流 + * 功能:根据URL类型(HTTP或本地)获取文件流 + * @param fileUrl 文件URL(支持HTTP和本地路径) + * @return 文件输入流,失败返回null + */ + public static InputStream getDownInputStream(String fileUrl, String uploadUrl) { + try { + // 处理HTTP URL:通过网络下载 + if (oConvertUtils.isNotEmpty(fileUrl) && fileUrl.startsWith(CommonConstant.STR_HTTP)) { + URL url = new URL(fileUrl); + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection.setConnectTimeout(5000); // 连接超时5秒 + connection.setReadTimeout(30000); // 读取超时30秒 + return connection.getInputStream(); + } else { + // 处理本地文件:直接读取文件系统 + String downloadFilePath = uploadUrl + File.separator + fileUrl; + // 安全检查:防止下载危险文件类型 + SsrfFileTypeFilter.checkDownloadFileType(downloadFilePath); + return new BufferedInputStream(new FileInputStream(downloadFilePath)); + } + } catch (IOException e) { + // 异常时返回null,上层会处理空流情况 + return null; + } + } + + /** + * 获取文件扩展名 + * 功能:从文件名中提取扩展名 + * @param fileName 文件名 + * @return 文件扩展名(不含点),如"txt"、"png" + */ + public static String getFileExtension(String fileName) { + int dotIndex = fileName.lastIndexOf('.'); + return (dotIndex == -1) ? "" : fileName.substring(dotIndex + 1); + } + + /** + * 创建快捷方式(.url文件内容) + * 功能:生成Internet快捷方式文件内容 + * @param name 快捷方式名称 + * @param url 目标URL地址 + * @param icon 图标路径(可选) + * @return 包含.url文件内容的输入流 + */ + public static InputStream createInternetShortcut(String name, String url, String icon) { + StringWriter sw = new StringWriter(); + try { + // 按照Windows快捷方式格式写入内容 + sw.write("[InternetShortcut]\n"); + sw.write("URL=" + url + "\n"); + if (oConvertUtils.isNotEmpty(icon)) { + sw.write("IconFile=" + icon + "\n"); + } + // 将字符串内容转换为输入流 + return new ByteArrayInputStream(sw.toString().getBytes(StandardCharsets.UTF_8)); + } finally { + IoUtil.close(sw); + } + } + /** + * 从URL中提取文件名 + * 功能:从HTTP URL或本地路径中提取纯文件名 + * @param fileUrl 文件URL + * @return 文件名(不含路径) + */ + public static String getFileNameFromUrl(String fileUrl) { + try { + // 处理HTTP URL:从路径部分提取文件名 + if (fileUrl.startsWith(CommonConstant.STR_HTTP)) { + URL url = new URL(fileUrl); + String path = url.getPath(); + return path.substring(path.lastIndexOf('/') + 1); + } + + // 处理本地文件路径:从文件路径提取文件名 + return fileUrl.substring(fileUrl.lastIndexOf(File.separator) + 1); + } catch (Exception e) { + // 如果解析失败,使用时间戳作为文件名 + return "file_" + System.currentTimeMillis(); + } + } + /** + * 生成ZIP中的文件名 + * 功能:避免文件名冲突,为多个文件添加序号 + * @param fileUrl 文件URL(用于提取原始文件名) + * @param index 文件序号(从0开始) + * @param total 文件总数 + * @return 处理后的文件名(带序号) + */ + public static String generateFileName(String fileUrl, int index, int total) { + // 从URL中提取原始文件名 + String originalFileName = getFileNameFromUrl(fileUrl); + + // 如果只有一个文件,直接使用原始文件名 + if (total == 1) { + return originalFileName; + } + + // 多个文件时,使用序号+原始文件名 + String extension = getFileExtension(originalFileName); + String nameWithoutExtension = originalFileName.replace("." + extension, ""); + + return String.format("%s_%d.%s", nameWithoutExtension, index + 1, extension); + } } diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/PmsUtil.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/PmsUtil.java index 6711b8828..1dfb3523c 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/PmsUtil.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/PmsUtil.java @@ -2,6 +2,7 @@ package org.jeecg.common.util; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.io.BufferedWriter; @@ -16,6 +17,7 @@ import java.util.List; */ @Slf4j @Component +@Lazy(false) public class PmsUtil { diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/RestUtil.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/RestUtil.java index f045c7daf..f12d1d55c 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/RestUtil.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/RestUtil.java @@ -221,6 +221,63 @@ public class RestUtil { return RT.exchange(url, method, request, responseType); } + /** + * 发送请求(支持自定义超时时间) + * + * @param url 请求地址 + * @param method 请求方式 + * @param headers 请求头 可空 + * @param variables 请求url参数 可空 + * @param params 请求body参数 可空 + * @param responseType 返回类型 + * @param timeout 超时时间(毫秒),如果为0或负数则使用默认超时 + * @return ResponseEntity + */ + public static ResponseEntity request(String url, HttpMethod method, HttpHeaders headers, + JSONObject variables, Object params, Class responseType, int timeout) { + log.info(" RestUtil --- request --- url = "+ url + ", timeout = " + timeout); + + if (StringUtils.isEmpty(url)) { + throw new RuntimeException("url 不能为空"); + } + if (method == null) { + throw new RuntimeException("method 不能为空"); + } + if (headers == null) { + headers = new HttpHeaders(); + } + + // 创建自定义RestTemplate(如果需要设置超时) + RestTemplate restTemplate = RT; + if (timeout > 0) { + SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory(); + requestFactory.setConnectTimeout(timeout); + requestFactory.setReadTimeout(timeout); + restTemplate = new RestTemplate(requestFactory); + // 解决乱码问题 + restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(StandardCharsets.UTF_8)); + } + + // 请求体 + String body = ""; + if (params != null) { + if (params instanceof JSONObject) { + body = ((JSONObject) params).toJSONString(); + } else { + body = params.toString(); + } + } + + // 拼接 url 参数 + if (variables != null && !variables.isEmpty()) { + url += ("?" + asUrlVariables(variables)); + } + + // 发送请求 + HttpEntity request = new HttpEntity<>(body, headers); + return restTemplate.exchange(url, method, request, responseType); + } + /** * 获取JSON请求头 */ diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ShiroThreadPoolExecutor.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ShiroThreadPoolExecutor.java new file mode 100644 index 000000000..bf19e6995 --- /dev/null +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ShiroThreadPoolExecutor.java @@ -0,0 +1,37 @@ +package org.jeecg.common.util; + +import org.apache.shiro.SecurityUtils; +import org.apache.shiro.mgt.SecurityManager; +import org.apache.shiro.subject.Subject; +import org.apache.shiro.util.ThreadContext; + +import java.util.concurrent.*; + +/** + * @date 2025-09-04 + * @author scott + * + * @Description: 支持shiro的API,获取当前登录人方法的线程池 + */ +public class ShiroThreadPoolExecutor extends ThreadPoolExecutor { + + public ShiroThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue workQueue) { + super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue); + } + + @Override + public void execute(Runnable command) { + Subject subject = SecurityUtils.getSubject(); + SecurityManager securityManager = SecurityUtils.getSecurityManager(); + super.execute(() -> { + try { + ThreadContext.bind(securityManager); + ThreadContext.bind(subject); + command.run(); + } finally { + ThreadContext.unbindSubject(); + ThreadContext.unbindSecurityManager(); + } + }); + } +} \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/TokenUtils.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/TokenUtils.java index 83efa1914..988df832a 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/TokenUtils.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/TokenUtils.java @@ -65,6 +65,10 @@ public class TokenUtils { if (tenantId == null) { tenantId = oConvertUtils.getString(request.getHeader(CommonConstant.TENANT_ID)); } + + if (oConvertUtils.isNotEmpty(tenantId) && "undefined".equals(tenantId)) { + return null; + } return tenantId; } diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/oConvertUtils.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/oConvertUtils.java index 33e6fda0a..ee755af6f 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/oConvertUtils.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/oConvertUtils.java @@ -474,6 +474,23 @@ public class oConvertUtils { return true; } + /** + * 判断字符串是否为JSON格式 + * @param str + * @return + */ + public static boolean isJson(String str) { + if (str == null || str.trim().isEmpty()) { + return false; + } + try { + com.alibaba.fastjson.JSON.parse(str); + return true; + } catch (Exception e) { + return false; + } + } + /** * 获取Map对象 */ @@ -1132,7 +1149,15 @@ public class oConvertUtils { * @date 2020/9/12 15:50 */ public static boolean isIn(T obj, T... objs) { - return isIn(obj, objs); + if (isEmpty(objs)) { + return false; + } + for (T obj1 : objs) { + if (isEqual(obj, obj1)) { + return true; + } + } + return false; } /** diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/AutoPoiConfig.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/AutoPoiConfig.java index 26a7dd351..277526448 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/AutoPoiConfig.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/AutoPoiConfig.java @@ -3,13 +3,14 @@ package org.jeecg.config; import org.jeecgframework.core.util.ApplicationContextUtil; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; /** * @Author: Scott * @Date: 2018/2/7 * @description: autopoi 配置类 */ - +@Lazy(false) @Configuration public class AutoPoiConfig { diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/AutoPoiDictConfig.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/AutoPoiDictConfig.java index 93f571c68..c7ba9301d 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/AutoPoiDictConfig.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/AutoPoiDictConfig.java @@ -25,6 +25,7 @@ import lombok.extern.slf4j.Slf4j; * @Version:1.0 */ @Slf4j +@Lazy(false) @Service public class AutoPoiDictConfig implements AutoPoiDictServiceI { final static String EXCEL_SPLIT_TAG = "_"; diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/JeecgGaodeBaseConfig.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/JeecgGaodeBaseConfig.java new file mode 100644 index 000000000..5f49b225f --- /dev/null +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/JeecgGaodeBaseConfig.java @@ -0,0 +1,29 @@ +package org.jeecg.config; + +import org.jeecg.config.vo.GaoDeApi; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; + +/** + * 高德账号配置 + */ +@Lazy(false) +@Configuration("jeecgGaodeBaseConfig") +@ConfigurationProperties(prefix = "jeecg.jmreport") +public class JeecgGaodeBaseConfig { + + /** + * 高德开放API配置 + */ + private GaoDeApi gaoDeApi; + + public GaoDeApi getGaoDeApi() { + return gaoDeApi; + } + + public void setGaoDeApi(GaoDeApi gaoDeApi) { + this.gaoDeApi = gaoDeApi; + } + +} diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/StaticConfig.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/StaticConfig.java index ab6fd496b..abf348818 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/StaticConfig.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/StaticConfig.java @@ -2,12 +2,14 @@ package org.jeecg.config; import lombok.Data; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; /** * 设置静态参数初始化 * @author: jeecg-boot */ +@Lazy(false) @Component @Data public class StaticConfig { diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger3Config.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger3Config.java index 8d5e4cdbe..c535a4fc7 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger3Config.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger3Config.java @@ -88,7 +88,7 @@ public class Swagger3Config implements WebMvcConfigurer { return new OpenAPI() .info(new Info() .title("JeecgBoot 后台服务API接口文档") - .version("3.8.2") + .version("3.8.3") .contact(new Contact().name("北京国炬信息技术有限公司").url("www.jeccg.com").email("jeecgos@163.com")) .description( "后台API接口") .termsOfService("NO terms of service") diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisPlusSaasConfig.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisPlusSaasConfig.java index ec51cbf59..a370ff972 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisPlusSaasConfig.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisPlusSaasConfig.java @@ -1,16 +1,18 @@ package org.jeecg.config.mybatis; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; - import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; import com.baomidou.mybatisplus.extension.plugins.inner.DynamicTableNameInnerInterceptor; import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor; import com.baomidou.mybatisplus.extension.toolkit.JdbcUtils; import lombok.extern.slf4j.Slf4j; import me.zhyd.oauth.log.Log; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.LongValue; import org.jeecg.common.config.TenantContext; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.TenantConstant; @@ -22,14 +24,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; -import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; -import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; -import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor; - -import net.sf.jsqlparser.expression.Expression; -import net.sf.jsqlparser.expression.LongValue; import javax.sql.DataSource; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; /** * 单数据源配置(jeecg.datasource.open = false时生效) diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/oss/MinioConfig.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/oss/MinioConfig.java index 3a19ab480..48091328b 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/oss/MinioConfig.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/oss/MinioConfig.java @@ -8,11 +8,13 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; /** * Minio文件上传配置文件 * @author: jeecg-boot */ +@Lazy(false) @Slf4j @Configuration @ConditionalOnProperty(prefix = "jeecg.minio", name = "minio_url") diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/oss/OssConfiguration.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/oss/OssConfiguration.java index 0734b95b9..9899e1b00 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/oss/OssConfiguration.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/oss/OssConfiguration.java @@ -5,11 +5,13 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; /** * 云存储 配置 * @author: jeecg-boot */ +@Lazy(false) @Configuration @ConditionalOnProperty(prefix = "jeecg.oss", name = "endpoint") public class OssConfiguration { diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index d9929e262..9c26c5d43 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -126,6 +126,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/**/*.ttf", "anon"); filterChainDefinitionMap.put("/**/*.woff", "anon"); filterChainDefinitionMap.put("/**/*.woff2", "anon"); + filterChainDefinitionMap.put("/**/*.glb", "anon"); filterChainDefinitionMap.put("/**/*.wasm", "anon"); //update-end--Author:scott Date:20221116 for:排除静态资源后缀 @@ -177,7 +178,9 @@ public class ShiroConfig { filterChainDefinitionMap.put("/sys/version/app3version", "anon"); //仪表盘(按钮通信) filterChainDefinitionMap.put("/dragChannelSocket/**","anon"); - + //App vue3版本查询版本接口 + filterChainDefinitionMap.put("/sys/version/app3version", "anon"); + //性能监控——安全隐患泄露TOEKN(durid连接池也有) //filterChainDefinitionMap.put("/actuator/**", "anon"); //测试模块排除 @@ -187,7 +190,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/error", "anon"); // 企业微信证书排除 filterChainDefinitionMap.put("/WW_verify*", "anon"); - + // 添加自己的过滤器并且取名为jwt Map filterMap = new HashMap(1); //如果cloudServer为空 则说明是单体 需要加载跨域配置【微服务跨域切换】 @@ -228,6 +231,7 @@ public class ShiroConfig { registration.addUrlPatterns("/airag/chat/send"); registration.addUrlPatterns("/airag/app/debug"); registration.addUrlPatterns("/airag/app/prompt/generate"); + registration.addUrlPatterns("/airag/chat/receive/**"); //支持异步 registration.setAsyncSupported(true); registration.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.ASYNC); diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroRealm.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroRealm.java index a9caf128c..3e57e1f4d 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroRealm.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroRealm.java @@ -106,8 +106,8 @@ public class ShiroRealm extends AuthorizingRealm { try { loginUser = this.checkUserTokenIsEffect(token); } catch (AuthenticationException e) { + log.error("—————校验 check token 失败——————————"+ e.getMessage(), e); JwtUtil.responseError(SpringContextUtils.getHttpServletResponse(),401,e.getMessage()); - e.printStackTrace(); return null; } return new SimpleAuthenticationInfo(loginUser, token, getName()); @@ -122,7 +122,7 @@ public class ShiroRealm extends AuthorizingRealm { // 解密获得username,用于和数据库进行对比 String username = JwtUtil.getUsername(token); if (username == null) { - throw new AuthenticationException("token非法无效!"); + throw new AuthenticationException("Token非法无效!"); } // 查询用户信息 diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/filters/JwtFilter.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/filters/JwtFilter.java index 095f0db6f..94c2346d4 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/filters/JwtFilter.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/filters/JwtFilter.java @@ -56,7 +56,7 @@ public class JwtFilter extends BasicHttpAuthenticationFilter { executeLogin(request, response); return true; } catch (Exception e) { - JwtUtil.responseError(response,401,CommonConstant.TOKEN_IS_INVALID_MSG); + JwtUtil.responseError((HttpServletResponse)response,401,CommonConstant.TOKEN_IS_INVALID_MSG); return false; //throw new AuthenticationException("Token失效,请重新登录", e); } diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/test/controller/JeecgDemoController.java b/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/test/controller/JeecgDemoController.java index d81b126de..f987bfdf3 100644 --- a/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/test/controller/JeecgDemoController.java +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/test/controller/JeecgDemoController.java @@ -64,7 +64,7 @@ public class JeecgDemoController extends JeecgController list(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(jeecgDemo, req.getParameterMap()); diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/controller/DlMockController.java b/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/controller/DlMockController.java index e3f99a383..7f31db0ad 100644 --- a/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/controller/DlMockController.java +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/controller/DlMockController.java @@ -409,4 +409,30 @@ public class DlMockController { return null; } + /** + * 获取车辆最后一个位置 + * + * @return + */ + @PostMapping("/findLatestCarLngLat") + public List findLatestCarLngLat() { + // 模拟JSON数据路径 + String path = "classpath:org/jeecg/modules/dlglong/json/CarLngLat.json"; + // 读取JSON数据 + return readJsonData(path); + } + + /** + * 获取车辆最后一个位置 + * + * @return + */ + @PostMapping("/findCarTrace") + public List findCarTrace() { + // 模拟JSON数据路径 + String path = "classpath:org/jeecg/modules/dlglong/json/CarTrace.json"; + // 读取JSON数据 + return readJsonData(path); + } + } diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/json/CarLngLat.json b/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/json/CarLngLat.json new file mode 100644 index 000000000..127c00a4e --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/json/CarLngLat.json @@ -0,0 +1,14 @@ +[ + { + "id": "6891ba44421aa907bcb7390c", + "alarm": "0", + "altitude": "13", + "direction": "0", + "latitude": "38.918739", + "longitude": "117.758737", + "speed": "11", + "status": "4980739", + "timestamp": "2025-08-05T16:01:07", + "imei": "18441136860" + } +] \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/json/CarTrace.json b/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/json/CarTrace.json new file mode 100644 index 000000000..ed0ce4ee1 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-demo/src/main/java/org/jeecg/modules/dlglong/json/CarTrace.json @@ -0,0 +1,1778 @@ +[ + { + "id": "6891ac07421aa907bcb5b08a", + "alarm": "0", + "altitude": "6", + "direction": "108", + "latitude": "38.912509", + "longitude": "117.796087", + "speed": "0", + "status": "4980739", + "timestamp": "2025-08-05T15:00:23", + "imei": "18441136860" + }, + { + "id": "6891ac19421aa907bcb5b2a0", + "alarm": "0", + "altitude": "0", + "direction": "359", + "latitude": "38.912574", + "longitude": "117.796246", + "speed": "151", + "status": "4980739", + "timestamp": "2025-08-05T15:00:42", + "imei": "18441136860" + }, + { + "id": "6891ac20421aa907bcb5b38c", + "alarm": "0", + "altitude": "1", + "direction": "331", + "latitude": "38.912708", + "longitude": "117.796200", + "speed": "188", + "status": "4980739", + "timestamp": "2025-08-05T15:00:45", + "imei": "18441136860" + }, + { + "id": "6891ac21421aa907bcb5b392", + "alarm": "0", + "altitude": "2", + "direction": "306", + "latitude": "38.912811", + "longitude": "117.796072", + "speed": "199", + "status": "4980739", + "timestamp": "2025-08-05T15:00:48", + "imei": "18441136860" + }, + { + "id": "6891ac22421aa907bcb5b3c9", + "alarm": "0", + "altitude": "1", + "direction": "282", + "latitude": "38.912860", + "longitude": "117.795919", + "speed": "153", + "status": "4980739", + "timestamp": "2025-08-05T15:00:51", + "imei": "18441136860" + }, + { + "id": "6891ac25421aa907bcb5b3fe", + "alarm": "0", + "altitude": "0", + "direction": "281", + "latitude": "38.912873", + "longitude": "117.795827", + "speed": "147", + "status": "4980739", + "timestamp": "2025-08-05T15:00:53", + "imei": "18441136860" + }, + { + "id": "6891ac26421aa907bcb5b41d", + "alarm": "0", + "altitude": "0", + "direction": "286", + "latitude": "38.912896", + "longitude": "117.795728", + "speed": "156", + "status": "4980739", + "timestamp": "2025-08-05T15:00:55", + "imei": "18441136860" + }, + { + "id": "6891ac43421aa907bcb5b767", + "alarm": "0", + "altitude": "3", + "direction": "287", + "latitude": "38.913222", + "longitude": "117.794465", + "speed": "169", + "status": "4980739", + "timestamp": "2025-08-05T15:01:23", + "imei": "18441136860" + }, + { + "id": "6891ac60421aa907bcb5ba78", + "alarm": "0", + "altitude": "0", + "direction": "297", + "latitude": "38.913716", + "longitude": "117.792630", + "speed": "211", + "status": "4980739", + "timestamp": "2025-08-05T15:01:52", + "imei": "18441136860" + }, + { + "id": "6891ac61421aa907bcb5baa1", + "alarm": "0", + "altitude": "0", + "direction": "298", + "latitude": "38.913739", + "longitude": "117.792569", + "speed": "220", + "status": "4980739", + "timestamp": "2025-08-05T15:01:54", + "imei": "18441136860" + }, + { + "id": "6891ac79421aa907bcb5bd69", + "alarm": "0", + "altitude": "0", + "direction": "290", + "latitude": "38.914169", + "longitude": "117.790894", + "speed": "223", + "status": "4980739", + "timestamp": "2025-08-05T15:02:18", + "imei": "18441136860" + }, + { + "id": "6891ac80421aa907bcb5be10", + "alarm": "0", + "altitude": "0", + "direction": "288", + "latitude": "38.914280", + "longitude": "117.790513", + "speed": "205", + "status": "4980739", + "timestamp": "2025-08-05T15:02:24", + "imei": "18441136860" + }, + { + "id": "6891ac87421aa907bcb5befe", + "alarm": "0", + "altitude": "0", + "direction": "291", + "latitude": "38.914388", + "longitude": "117.790056", + "speed": "214", + "status": "4980739", + "timestamp": "2025-08-05T15:02:31", + "imei": "18441136860" + }, + { + "id": "6891ac91421aa907bcb5c034", + "alarm": "0", + "altitude": "0", + "direction": "291", + "latitude": "38.914568", + "longitude": "117.789287", + "speed": "238", + "status": "4980739", + "timestamp": "2025-08-05T15:02:42", + "imei": "18441136860" + }, + { + "id": "6891aca5421aa907bcb5c268", + "alarm": "0", + "altitude": "0", + "direction": "299", + "latitude": "38.914671", + "longitude": "117.789005", + "speed": "235", + "status": "4980739", + "timestamp": "2025-08-05T15:02:46", + "imei": "18441136860" + }, + { + "id": "6891aca5421aa907bcb5c272", + "alarm": "0", + "altitude": "0", + "direction": "290", + "latitude": "38.914747", + "longitude": "117.788792", + "speed": "245", + "status": "4980739", + "timestamp": "2025-08-05T15:02:49", + "imei": "18441136860" + }, + { + "id": "6891aca6421aa907bcb5c27f", + "alarm": "0", + "altitude": "0", + "direction": "287", + "latitude": "38.914832", + "longitude": "117.788419", + "speed": "241", + "status": "4980739", + "timestamp": "2025-08-05T15:02:54", + "imei": "18441136860" + }, + { + "id": "6891acaa421aa907bcb5c302", + "alarm": "0", + "altitude": "0", + "direction": "288", + "latitude": "38.915058", + "longitude": "117.787520", + "speed": "232", + "status": "4980739", + "timestamp": "2025-08-05T15:03:07", + "imei": "18441136860" + }, + { + "id": "6891acbc421aa907bcb5c4f6", + "alarm": "0", + "altitude": "0", + "direction": "287", + "latitude": "38.915380", + "longitude": "117.786287", + "speed": "266", + "status": "4980739", + "timestamp": "2025-08-05T15:03:24", + "imei": "18441136860" + }, + { + "id": "6891acda421aa907bcb5c850", + "alarm": "0", + "altitude": "0", + "direction": "290", + "latitude": "38.916054", + "longitude": "117.783758", + "speed": "306", + "status": "4980739", + "timestamp": "2025-08-05T15:03:54", + "imei": "18441136860" + }, + { + "id": "6891acf8421aa907bcb5cbac", + "alarm": "0", + "altitude": "3", + "direction": "289", + "latitude": "38.916751", + "longitude": "117.781290", + "speed": "239", + "status": "4980739", + "timestamp": "2025-08-05T15:04:24", + "imei": "18441136860" + }, + { + "id": "6891ad0c421aa907bcb5cdfe", + "alarm": "0", + "altitude": "2", + "direction": "284", + "latitude": "38.917203", + "longitude": "117.779720", + "speed": "243", + "status": "4980739", + "timestamp": "2025-08-05T15:04:45", + "imei": "18441136860" + }, + { + "id": "6891ad16421aa907bcb5cf04", + "alarm": "0", + "altitude": "2", + "direction": "288", + "latitude": "38.917360", + "longitude": "117.779126", + "speed": "206", + "status": "4980739", + "timestamp": "2025-08-05T15:04:55", + "imei": "18441136860" + }, + { + "id": "6891ad1b421aa907bcb5cf9b", + "alarm": "0", + "altitude": "2", + "direction": "288", + "latitude": "38.917456", + "longitude": "117.778784", + "speed": "150", + "status": "4980739", + "timestamp": "2025-08-05T15:05", + "imei": "18441136860" + }, + { + "id": "6891ad35421aa907bcb5d257", + "alarm": "0", + "altitude": "2", + "direction": "310", + "latitude": "38.917487", + "longitude": "117.778685", + "speed": "15", + "status": "4980739", + "timestamp": "2025-08-05T15:05:25", + "imei": "18441136860" + }, + { + "id": "6891ad53421aa907bcb5d5c6", + "alarm": "0", + "altitude": "0", + "direction": "259", + "latitude": "38.917490", + "longitude": "117.778425", + "speed": "55", + "status": "4980739", + "timestamp": "2025-08-05T15:05:55", + "imei": "18441136860" + }, + { + "id": "6891ad66421aa907bcb5d82c", + "alarm": "0", + "altitude": "0", + "direction": "271", + "latitude": "38.917605", + "longitude": "117.777968", + "speed": "62", + "status": "4980739", + "timestamp": "2025-08-05T15:06:15", + "imei": "18441136860" + }, + { + "id": "6891ad71421aa907bcb5d935", + "alarm": "0", + "altitude": "0", + "direction": "277", + "latitude": "38.917659", + "longitude": "117.777747", + "speed": "47", + "status": "4980739", + "timestamp": "2025-08-05T15:06:25", + "imei": "18441136860" + }, + { + "id": "6891ad8f421aa907bcb5dc99", + "alarm": "0", + "altitude": "0", + "direction": "286", + "latitude": "38.917755", + "longitude": "117.777344", + "speed": "70", + "status": "4980739", + "timestamp": "2025-08-05T15:06:55", + "imei": "18441136860" + }, + { + "id": "6891adad421aa907bcb5dfe0", + "alarm": "0", + "altitude": "0", + "direction": "300", + "latitude": "38.917934", + "longitude": "117.776802", + "speed": "42", + "status": "4980739", + "timestamp": "2025-08-05T15:07:25", + "imei": "18441136860" + }, + { + "id": "6891adcb421aa907bcb5e345", + "alarm": "0", + "altitude": "1", + "direction": "294", + "latitude": "38.918072", + "longitude": "117.776239", + "speed": "47", + "status": "4980739", + "timestamp": "2025-08-05T15:07:55", + "imei": "18441136860" + }, + { + "id": "6891ade9421aa907bcb5e6af", + "alarm": "0", + "altitude": "0", + "direction": "300", + "latitude": "38.918297", + "longitude": "117.775698", + "speed": "17", + "status": "4980739", + "timestamp": "2025-08-05T15:08:25", + "imei": "18441136860" + }, + { + "id": "6891ae07421aa907bcb5ea30", + "alarm": "0", + "altitude": "2", + "direction": "269", + "latitude": "38.918466", + "longitude": "117.775217", + "speed": "38", + "status": "4980739", + "timestamp": "2025-08-05T15:08:56", + "imei": "18441136860" + }, + { + "id": "6891ae25421aa907bcb5ed9e", + "alarm": "0", + "altitude": "2", + "direction": "82", + "latitude": "38.918501", + "longitude": "117.775119", + "speed": "45", + "status": "4980739", + "timestamp": "2025-08-05T15:09:26", + "imei": "18441136860" + }, + { + "id": "6891ae44421aa907bcb5f0fb", + "alarm": "0", + "altitude": "0", + "direction": "299", + "latitude": "38.918493", + "longitude": "117.775043", + "speed": "55", + "status": "4980739", + "timestamp": "2025-08-05T15:09:56", + "imei": "18441136860" + }, + { + "id": "6891ae62421aa907bcb5f456", + "alarm": "0", + "altitude": "0", + "direction": "289", + "latitude": "38.918600", + "longitude": "117.774730", + "speed": "28", + "status": "4980739", + "timestamp": "2025-08-05T15:10:26", + "imei": "18441136860" + }, + { + "id": "6891ae80421aa907bcb5f7b4", + "alarm": "0", + "altitude": "0", + "direction": "285", + "latitude": "38.918719", + "longitude": "117.774311", + "speed": "41", + "status": "4980739", + "timestamp": "2025-08-05T15:10:56", + "imei": "18441136860" + }, + { + "id": "6891ae9e421aa907bcb5fb38", + "alarm": "0", + "altitude": "0", + "direction": "285", + "latitude": "38.918780", + "longitude": "117.773846", + "speed": "59", + "status": "4980739", + "timestamp": "2025-08-05T15:11:26", + "imei": "18441136860" + }, + { + "id": "6891aebc421aa907bcb5fe91", + "alarm": "0", + "altitude": "0", + "direction": "290", + "latitude": "38.918967", + "longitude": "117.773336", + "speed": "54", + "status": "4980739", + "timestamp": "2025-08-05T15:11:56", + "imei": "18441136860" + }, + { + "id": "6891aedb421aa907bcb601fd", + "alarm": "0", + "altitude": "0", + "direction": "271", + "latitude": "38.919048", + "longitude": "117.772947", + "speed": "37", + "status": "4980739", + "timestamp": "2025-08-05T15:12:26", + "imei": "18441136860" + }, + { + "id": "6891aef9421aa907bcb60576", + "alarm": "0", + "altitude": "0", + "direction": "285", + "latitude": "38.919166", + "longitude": "117.772536", + "speed": "42", + "status": "4980739", + "timestamp": "2025-08-05T15:12:57", + "imei": "18441136860" + }, + { + "id": "6891af17421aa907bcb608c2", + "alarm": "0", + "altitude": "0", + "direction": "271", + "latitude": "38.919273", + "longitude": "117.772170", + "speed": "23", + "status": "4980739", + "timestamp": "2025-08-05T15:13:27", + "imei": "18441136860" + }, + { + "id": "6891af35421aa907bcb60c08", + "alarm": "0", + "altitude": "0", + "direction": "291", + "latitude": "38.919404", + "longitude": "117.771347", + "speed": "120", + "status": "4980739", + "timestamp": "2025-08-05T15:13:57", + "imei": "18441136860" + }, + { + "id": "6891af42421aa907bcb60da8", + "alarm": "0", + "altitude": "0", + "direction": "282", + "latitude": "38.919534", + "longitude": "117.770881", + "speed": "106", + "status": "4980739", + "timestamp": "2025-08-05T15:14:11", + "imei": "18441136860" + }, + { + "id": "6891af53421aa907bcb60f41", + "alarm": "0", + "altitude": "0", + "direction": "282", + "latitude": "38.919682", + "longitude": "117.770310", + "speed": "111", + "status": "4980739", + "timestamp": "2025-08-05T15:14:27", + "imei": "18441136860" + }, + { + "id": "6891af71421aa907bcb6128a", + "alarm": "0", + "altitude": "0", + "direction": "324", + "latitude": "38.920091", + "longitude": "117.769289", + "speed": "66", + "status": "4980739", + "timestamp": "2025-08-05T15:14:57", + "imei": "18441136860" + }, + { + "id": "6891af8f421aa907bcb615d2", + "alarm": "0", + "altitude": "0", + "direction": "289", + "latitude": "38.920133", + "longitude": "117.769014", + "speed": "35", + "status": "4980739", + "timestamp": "2025-08-05T15:15:27", + "imei": "18441136860" + }, + { + "id": "6891afb0421aa907bcb61966", + "alarm": "0", + "altitude": "0", + "direction": "117", + "latitude": "38.920194", + "longitude": "117.768915", + "speed": "45", + "status": "4980739", + "timestamp": "2025-08-05T15:15:57", + "imei": "18441136860" + }, + { + "id": "6891afcb421aa907bcb61c85", + "alarm": "0", + "altitude": "0", + "direction": "294", + "latitude": "38.920175", + "longitude": "117.769037", + "speed": "43", + "status": "4980739", + "timestamp": "2025-08-05T15:16:27", + "imei": "18441136860" + }, + { + "id": "6891afe9421aa907bcb62001", + "alarm": "0", + "altitude": "0", + "direction": "263", + "latitude": "38.920245", + "longitude": "117.768672", + "speed": "28", + "status": "4980739", + "timestamp": "2025-08-05T15:16:58", + "imei": "18441136860" + }, + { + "id": "6891b008421aa907bcb62386", + "alarm": "0", + "altitude": "0", + "direction": "308", + "latitude": "38.920298", + "longitude": "117.768405", + "speed": "58", + "status": "4980739", + "timestamp": "2025-08-05T15:17:28", + "imei": "18441136860" + }, + { + "id": "6891b026421aa907bcb626d9", + "alarm": "0", + "altitude": "0", + "direction": "294", + "latitude": "38.920379", + "longitude": "117.768092", + "speed": "45", + "status": "4980739", + "timestamp": "2025-08-05T15:17:58", + "imei": "18441136860" + }, + { + "id": "6891b044421aa907bcb62a57", + "alarm": "0", + "altitude": "0", + "direction": "296", + "latitude": "38.920440", + "longitude": "117.767817", + "speed": "29", + "status": "4980739", + "timestamp": "2025-08-05T15:18:28", + "imei": "18441136860" + }, + { + "id": "6891b062421aa907bcb62dc9", + "alarm": "0", + "altitude": "0", + "direction": "296", + "latitude": "38.920501", + "longitude": "117.767475", + "speed": "37", + "status": "4980739", + "timestamp": "2025-08-05T15:18:58", + "imei": "18441136860" + }, + { + "id": "6891b080421aa907bcb6313b", + "alarm": "0", + "altitude": "0", + "direction": "271", + "latitude": "38.920615", + "longitude": "117.767131", + "speed": "42", + "status": "4980739", + "timestamp": "2025-08-05T15:19:28", + "imei": "18441136860" + }, + { + "id": "6891b09e421aa907bcb634a1", + "alarm": "0", + "altitude": "0", + "direction": "296", + "latitude": "38.920780", + "longitude": "117.766697", + "speed": "74", + "status": "4980739", + "timestamp": "2025-08-05T15:19:58", + "imei": "18441136860" + }, + { + "id": "6891b0bc421aa907bcb63817", + "alarm": "0", + "altitude": "0", + "direction": "288", + "latitude": "38.920963", + "longitude": "117.766133", + "speed": "23", + "status": "4980739", + "timestamp": "2025-08-05T15:20:29", + "imei": "18441136860" + }, + { + "id": "6891b0da421aa907bcb63b93", + "alarm": "0", + "altitude": "0", + "direction": "283", + "latitude": "38.921017", + "longitude": "117.765836", + "speed": "16", + "status": "4980739", + "timestamp": "2025-08-05T15:20:59", + "imei": "18441136860" + }, + { + "id": "6891b0f9421aa907bcb63f22", + "alarm": "0", + "altitude": "0", + "direction": "292", + "latitude": "38.921078", + "longitude": "117.765546", + "speed": "12", + "status": "4980739", + "timestamp": "2025-08-05T15:21:29", + "imei": "18441136860" + }, + { + "id": "6891b117421aa907bcb642bb", + "alarm": "0", + "altitude": "1", + "direction": "291", + "latitude": "38.921196", + "longitude": "117.765203", + "speed": "155", + "status": "4980739", + "timestamp": "2025-08-05T15:21:59", + "imei": "18441136860" + }, + { + "id": "6891b116421aa907bcb642b5", + "alarm": "0", + "altitude": "1", + "direction": "291", + "latitude": "38.921196", + "longitude": "117.765203", + "speed": "155", + "status": "4980739", + "timestamp": "2025-08-05T15:21:59", + "imei": "18441136860" + }, + { + "id": "6891b127421aa907bcb644b8", + "alarm": "0", + "altitude": "1", + "direction": "259", + "latitude": "38.921292", + "longitude": "117.764639", + "speed": "63", + "status": "4980739", + "timestamp": "2025-08-05T15:22:16", + "imei": "18441136860" + }, + { + "id": "6891b135421aa907bcb64640", + "alarm": "0", + "altitude": "4", + "direction": "288", + "latitude": "38.921346", + "longitude": "117.764356", + "speed": "105", + "status": "4980739", + "timestamp": "2025-08-05T15:22:29", + "imei": "18441136860" + }, + { + "id": "6891b153421aa907bcb6498b", + "alarm": "0", + "altitude": "2", + "direction": "318", + "latitude": "38.921464", + "longitude": "117.764129", + "speed": "0", + "status": "4980739", + "timestamp": "2025-08-05T15:22:59", + "imei": "18441136860" + }, + { + "id": "6891b15f421aa907bcb64afc", + "alarm": "0", + "altitude": "1", + "direction": "290", + "latitude": "38.921533", + "longitude": "117.763930", + "speed": "166", + "status": "4980739", + "timestamp": "2025-08-05T15:23:12", + "imei": "18441136860" + }, + { + "id": "6891b167421aa907bcb64bdc", + "alarm": "0", + "altitude": "2", + "direction": "282", + "latitude": "38.921567", + "longitude": "117.763717", + "speed": "189", + "status": "4980739", + "timestamp": "2025-08-05T15:23:16", + "imei": "18441136860" + }, + { + "id": "6891b167421aa907bcb64be4", + "alarm": "0", + "altitude": "3", + "direction": "281", + "latitude": "38.921594", + "longitude": "117.763518", + "speed": "207", + "status": "4980739", + "timestamp": "2025-08-05T15:23:19", + "imei": "18441136860" + }, + { + "id": "6891b171421aa907bcb64cfe", + "alarm": "0", + "altitude": "4", + "direction": "286", + "latitude": "38.921758", + "longitude": "117.762770", + "speed": "239", + "status": "4980739", + "timestamp": "2025-08-05T15:23:29", + "imei": "18441136860" + }, + { + "id": "6891b17a421aa907bcb64dc3", + "alarm": "0", + "altitude": "3", + "direction": "291", + "latitude": "38.921850", + "longitude": "117.762398", + "speed": "237", + "status": "4980739", + "timestamp": "2025-08-05T15:23:34", + "imei": "18441136860" + }, + { + "id": "6891b17a421aa907bcb64dd0", + "alarm": "0", + "altitude": "4", + "direction": "290", + "latitude": "38.921919", + "longitude": "117.762192", + "speed": "217", + "status": "4980739", + "timestamp": "2025-08-05T15:23:37", + "imei": "18441136860" + }, + { + "id": "6891b180421aa907bcb64ea1", + "alarm": "0", + "altitude": "10", + "direction": "281", + "latitude": "38.922091", + "longitude": "117.761597", + "speed": "236", + "status": "4980739", + "timestamp": "2025-08-05T15:23:45", + "imei": "18441136860" + }, + { + "id": "6891b183421aa907bcb64ef7", + "alarm": "0", + "altitude": "10", + "direction": "288", + "latitude": "38.922133", + "longitude": "117.761383", + "speed": "225", + "status": "4980739", + "timestamp": "2025-08-05T15:23:48", + "imei": "18441136860" + }, + { + "id": "6891b18b421aa907bcb64fd3", + "alarm": "0", + "altitude": "7", + "direction": "290", + "latitude": "38.922323", + "longitude": "117.760873", + "speed": "160", + "status": "4980739", + "timestamp": "2025-08-05T15:23:56", + "imei": "18441136860" + }, + { + "id": "6891b18f421aa907bcb6502d", + "alarm": "0", + "altitude": "6", + "direction": "293", + "latitude": "38.922373", + "longitude": "117.760713", + "speed": "154", + "status": "4980739", + "timestamp": "2025-08-05T15:23:59", + "imei": "18441136860" + }, + { + "id": "6891b18f421aa907bcb6503c", + "alarm": "0", + "altitude": "7", + "direction": "291", + "latitude": "38.922392", + "longitude": "117.760667", + "speed": "153", + "status": "4980739", + "timestamp": "2025-08-05T15:24", + "imei": "18441136860" + }, + { + "id": "6891b1ae421aa907bcb653d0", + "alarm": "0", + "altitude": "12", + "direction": "308", + "latitude": "38.922567", + "longitude": "117.760217", + "speed": "25", + "status": "4980739", + "timestamp": "2025-08-05T15:24:30", + "imei": "18441136860" + }, + { + "id": "6891b1ca421aa907bcb65756", + "alarm": "0", + "altitude": "9", + "direction": "141", + "latitude": "38.922419", + "longitude": "117.760110", + "speed": "155", + "status": "4980739", + "timestamp": "2025-08-05T15:24:54", + "imei": "18441136860" + }, + { + "id": "6891b1cb421aa907bcb6575e", + "alarm": "0", + "altitude": "12", + "direction": "113", + "latitude": "38.922342", + "longitude": "117.760247", + "speed": "177", + "status": "4980739", + "timestamp": "2025-08-05T15:24:57", + "imei": "18441136860" + }, + { + "id": "6891b1cc421aa907bcb65773", + "alarm": "0", + "altitude": "13", + "direction": "114", + "latitude": "38.922285", + "longitude": "117.760423", + "speed": "215", + "status": "4980739", + "timestamp": "2025-08-05T15:25", + "imei": "18441136860" + }, + { + "id": "6891b1d0421aa907bcb657f5", + "alarm": "0", + "altitude": "13", + "direction": "111", + "latitude": "38.922178", + "longitude": "117.760743", + "speed": "225", + "status": "4980739", + "timestamp": "2025-08-05T15:25:05", + "imei": "18441136860" + }, + { + "id": "6891b1ea421aa907bcb65b20", + "alarm": "0", + "altitude": "5", + "direction": "111", + "latitude": "38.921658", + "longitude": "117.762550", + "speed": "196", + "status": "4980739", + "timestamp": "2025-08-05T15:25:30", + "imei": "18441136860" + }, + { + "id": "6891b1ec421aa907bcb65b56", + "alarm": "0", + "altitude": "4", + "direction": "123", + "latitude": "38.921601", + "longitude": "117.762702", + "speed": "159", + "status": "4980739", + "timestamp": "2025-08-05T15:25:33", + "imei": "18441136860" + }, + { + "id": "6891b208421aa907bcb65e9d", + "alarm": "0", + "altitude": "0", + "direction": "344", + "latitude": "38.921453", + "longitude": "117.762702", + "speed": "41", + "status": "4980739", + "timestamp": "2025-08-05T15:26", + "imei": "18441136860" + }, + { + "id": "6891b226421aa907bcb66229", + "alarm": "0", + "altitude": "0", + "direction": "344", + "latitude": "38.921460", + "longitude": "117.762732", + "speed": "0", + "status": "4980739", + "timestamp": "2025-08-05T15:26:30", + "imei": "18441136860" + }, + { + "id": "6891b244421aa907bcb66567", + "alarm": "0", + "altitude": "6", + "direction": "86", + "latitude": "38.921464", + "longitude": "117.763045", + "speed": "42", + "status": "4980739", + "timestamp": "2025-08-05T15:27", + "imei": "18441136860" + }, + { + "id": "6891b24c421aa907bcb66650", + "alarm": "0", + "altitude": "6", + "direction": "139", + "latitude": "38.921384", + "longitude": "117.763350", + "speed": "85", + "status": "4980739", + "timestamp": "2025-08-05T15:27:09", + "imei": "18441136860" + }, + { + "id": "6891b262421aa907bcb668b6", + "alarm": "0", + "altitude": "13", + "direction": "102", + "latitude": "38.921151", + "longitude": "117.763953", + "speed": "93", + "status": "4980739", + "timestamp": "2025-08-05T15:27:31", + "imei": "18441136860" + }, + { + "id": "6891b26f421aa907bcb66a05", + "alarm": "0", + "altitude": "5", + "direction": "119", + "latitude": "38.921102", + "longitude": "117.764227", + "speed": "59", + "status": "4980739", + "timestamp": "2025-08-05T15:27:43", + "imei": "18441136860" + }, + { + "id": "6891b280421aa907bcb66bd3", + "alarm": "0", + "altitude": "7", + "direction": "103", + "latitude": "38.920987", + "longitude": "117.764662", + "speed": "89", + "status": "4980739", + "timestamp": "2025-08-05T15:28:01", + "imei": "18441136860" + }, + { + "id": "6891b293421aa907bcb66dcb", + "alarm": "0", + "altitude": "6", + "direction": "122", + "latitude": "38.920849", + "longitude": "117.765211", + "speed": "82", + "status": "4980739", + "timestamp": "2025-08-05T15:28:19", + "imei": "18441136860" + }, + { + "id": "6891b29f421aa907bcb66f17", + "alarm": "0", + "altitude": "0", + "direction": "139", + "latitude": "38.920807", + "longitude": "117.765318", + "speed": "3", + "status": "4980739", + "timestamp": "2025-08-05T15:28:31", + "imei": "18441136860" + }, + { + "id": "6891b2bd421aa907bcb67272", + "alarm": "0", + "altitude": "0", + "direction": "115", + "latitude": "38.920696", + "longitude": "117.765721", + "speed": "84", + "status": "4980739", + "timestamp": "2025-08-05T15:29:01", + "imei": "18441136860" + }, + { + "id": "6891b2db421aa907bcb675aa", + "alarm": "0", + "altitude": "0", + "direction": "112", + "latitude": "38.920628", + "longitude": "117.766225", + "speed": "48", + "status": "4980739", + "timestamp": "2025-08-05T15:29:31", + "imei": "18441136860" + }, + { + "id": "6891b2f9421aa907bcb678be", + "alarm": "0", + "altitude": "0", + "direction": "91", + "latitude": "38.920513", + "longitude": "117.766651", + "speed": "22", + "status": "4980739", + "timestamp": "2025-08-05T15:30:01", + "imei": "18441136860" + }, + { + "id": "6891b317421aa907bcb67c08", + "alarm": "0", + "altitude": "0", + "direction": "116", + "latitude": "38.920318", + "longitude": "117.767246", + "speed": "64", + "status": "4980739", + "timestamp": "2025-08-05T15:30:31", + "imei": "18441136860" + }, + { + "id": "6891b335421aa907bcb67f4c", + "alarm": "0", + "altitude": "0", + "direction": "112", + "latitude": "38.920089", + "longitude": "117.768061", + "speed": "105", + "status": "4980739", + "timestamp": "2025-08-05T15:31:01", + "imei": "18441136860" + }, + { + "id": "6891b353421aa907bcb682a1", + "alarm": "0", + "altitude": "0", + "direction": "103", + "latitude": "38.919889", + "longitude": "117.768786", + "speed": "50", + "status": "4980739", + "timestamp": "2025-08-05T15:31:32", + "imei": "18441136860" + }, + { + "id": "6891b372421aa907bcb685f4", + "alarm": "0", + "altitude": "3", + "direction": "103", + "latitude": "38.919870", + "longitude": "117.768861", + "speed": "0", + "status": "4980739", + "timestamp": "2025-08-05T15:32:02", + "imei": "18441136860" + }, + { + "id": "6891b388421aa907bcb6885c", + "alarm": "0", + "altitude": "0", + "direction": "103", + "latitude": "38.919798", + "longitude": "117.769121", + "speed": "157", + "status": "4980739", + "timestamp": "2025-08-05T15:32:25", + "imei": "18441136860" + }, + { + "id": "6891b38b421aa907bcb688b5", + "alarm": "0", + "altitude": "0", + "direction": "103", + "latitude": "38.919763", + "longitude": "117.769273", + "speed": "174", + "status": "4980739", + "timestamp": "2025-08-05T15:32:28", + "imei": "18441136860" + }, + { + "id": "6891b390421aa907bcb6892a", + "alarm": "0", + "altitude": "0", + "direction": "108", + "latitude": "38.919721", + "longitude": "117.769517", + "speed": "183", + "status": "4980739", + "timestamp": "2025-08-05T15:32:32", + "imei": "18441136860" + }, + { + "id": "6891b390421aa907bcb68923", + "alarm": "0", + "altitude": "0", + "direction": "108", + "latitude": "38.919721", + "longitude": "117.769517", + "speed": "183", + "status": "4980739", + "timestamp": "2025-08-05T15:32:32", + "imei": "18441136860" + }, + { + "id": "6891b395421aa907bcb689af", + "alarm": "0", + "altitude": "0", + "direction": "116", + "latitude": "38.919618", + "longitude": "117.769846", + "speed": "171", + "status": "4980739", + "timestamp": "2025-08-05T15:32:38", + "imei": "18441136860" + }, + { + "id": "6891b39c421aa907bcb68a7b", + "alarm": "0", + "altitude": "0", + "direction": "169", + "latitude": "38.919504", + "longitude": "117.770035", + "speed": "70", + "status": "4980739", + "timestamp": "2025-08-05T15:32:44", + "imei": "18441136860" + }, + { + "id": "6891b3ae421aa907bcb68c53", + "alarm": "0", + "altitude": "0", + "direction": "202", + "latitude": "38.919011", + "longitude": "117.769814", + "speed": "127", + "status": "4980739", + "timestamp": "2025-08-05T15:33:02", + "imei": "18441136860" + }, + { + "id": "6891b3cc421aa907bcb68f7d", + "alarm": "0", + "altitude": "0", + "direction": "199", + "latitude": "38.917641", + "longitude": "117.769228", + "speed": "228", + "status": "4980739", + "timestamp": "2025-08-05T15:33:32", + "imei": "18441136860" + }, + { + "id": "6891b3d4421aa907bcb6904a", + "alarm": "0", + "altitude": "0", + "direction": "199", + "latitude": "38.917157", + "longitude": "117.768983", + "speed": "222", + "status": "4980739", + "timestamp": "2025-08-05T15:33:41", + "imei": "18441136860" + }, + { + "id": "6891b3ea421aa907bcb6928c", + "alarm": "0", + "altitude": "0", + "direction": "196", + "latitude": "38.915855", + "longitude": "117.768404", + "speed": "245", + "status": "4980739", + "timestamp": "2025-08-05T15:34:02", + "imei": "18441136860" + }, + { + "id": "6891b3ef421aa907bcb692f1", + "alarm": "0", + "altitude": "0", + "direction": "202", + "latitude": "38.915584", + "longitude": "117.768304", + "speed": "191", + "status": "4980739", + "timestamp": "2025-08-05T15:34:07", + "imei": "18441136860" + }, + { + "id": "6891b3f1421aa907bcb6934a", + "alarm": "0", + "altitude": "0", + "direction": "230", + "latitude": "38.915478", + "longitude": "117.768214", + "speed": "161", + "status": "4980739", + "timestamp": "2025-08-05T15:34:10", + "imei": "18441136860" + }, + { + "id": "6891b3f4421aa907bcb693b3", + "alarm": "0", + "altitude": "0", + "direction": "289", + "latitude": "38.915481", + "longitude": "117.768061", + "speed": "174", + "status": "4980739", + "timestamp": "2025-08-05T15:34:13", + "imei": "18441136860" + }, + { + "id": "6891b408421aa907bcb695b1", + "alarm": "0", + "altitude": "0", + "direction": "287", + "latitude": "38.915871", + "longitude": "117.766697", + "speed": "269", + "status": "4980739", + "timestamp": "2025-08-05T15:34:33", + "imei": "18441136860" + }, + { + "id": "6891b427421aa907bcb698c8", + "alarm": "0", + "altitude": "0", + "direction": "290", + "latitude": "38.916719", + "longitude": "117.763654", + "speed": "310", + "status": "4980739", + "timestamp": "2025-08-05T15:35:03", + "imei": "18441136860" + }, + { + "id": "6891b445421aa907bcb69be3", + "alarm": "0", + "altitude": "0", + "direction": "296", + "latitude": "38.917464", + "longitude": "117.761383", + "speed": "250", + "status": "4980739", + "timestamp": "2025-08-05T15:35:33", + "imei": "18441136860" + }, + { + "id": "6891b463421aa907bcb69f05", + "alarm": "0", + "altitude": "0", + "direction": "289", + "latitude": "38.918068", + "longitude": "117.759545", + "speed": "168", + "status": "4980739", + "timestamp": "2025-08-05T15:36:03", + "imei": "18441136860" + }, + { + "id": "6891b481421aa907bcb6a22c", + "alarm": "0", + "altitude": "0", + "direction": "48", + "latitude": "38.918354", + "longitude": "117.758981", + "speed": "0", + "status": "4980739", + "timestamp": "2025-08-05T15:36:33", + "imei": "18441136860" + }, + { + "id": "6891b49f421aa907bcb6a563", + "alarm": "0", + "altitude": "0", + "direction": "302", + "latitude": "38.918705", + "longitude": "117.758866", + "speed": "11", + "status": "4980739", + "timestamp": "2025-08-05T15:37:03", + "imei": "18441136860" + }, + { + "id": "6891b4ba421aa907bcb6a81e", + "alarm": "0", + "altitude": "0", + "direction": "293", + "latitude": "38.918728", + "longitude": "117.758592", + "speed": "68", + "status": "4980739", + "timestamp": "2025-08-05T15:37:31", + "imei": "18441136860" + }, + { + "id": "6891b4bd421aa907bcb6a885", + "alarm": "0", + "altitude": "0", + "direction": "304", + "latitude": "38.918739", + "longitude": "117.758553", + "speed": "57", + "status": "4980739", + "timestamp": "2025-08-05T15:37:33", + "imei": "18441136860" + }, + { + "id": "6891b4db421aa907bcb6abac", + "alarm": "0", + "altitude": "0", + "direction": "128", + "latitude": "38.918724", + "longitude": "117.758599", + "speed": "0", + "status": "4980739", + "timestamp": "2025-08-05T15:38:03", + "imei": "18441136860" + }, + { + "id": "6891b70b421aa907bcb6e55e", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918739", + "longitude": "117.758553", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:47:17", + "imei": "18441136860" + }, + { + "id": "6891b70b421aa907bcb6e55f", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918739", + "longitude": "117.758553", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:47:19", + "imei": "18441136860" + }, + { + "id": "6891b70c421aa907bcb6e574", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918739", + "longitude": "117.758553", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:47:23", + "imei": "18441136860" + }, + { + "id": "6891b725421aa907bcb6e808", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918739", + "longitude": "117.758553", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:47:49", + "imei": "18441136860" + }, + { + "id": "6891b743421aa907bcb6eb02", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918739", + "longitude": "117.758553", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:48:19", + "imei": "18441136860" + }, + { + "id": "6891b75b421aa907bcb6ed7a", + "alarm": "0", + "altitude": "9", + "direction": "0", + "latitude": "38.918713", + "longitude": "117.758515", + "speed": "22", + "status": "4980739", + "timestamp": "2025-08-05T15:48:43", + "imei": "18441136860" + }, + { + "id": "6891b762421aa907bcb6ee25", + "alarm": "0", + "altitude": "4", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980739", + "timestamp": "2025-08-05T15:48:49", + "imei": "18441136860" + }, + { + "id": "6891b780421aa907bcb6f13c", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918800", + "longitude": "117.758630", + "speed": "0", + "status": "4980739", + "timestamp": "2025-08-05T15:49:20", + "imei": "18441136860" + }, + { + "id": "6891b862421aa907bcb70801", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:53:00", + "imei": "18441136860" + }, + { + "id": "6891b862421aa907bcb70802", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:53:02", + "imei": "18441136860" + }, + { + "id": "6891b863421aa907bcb7080c", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:53:06", + "imei": "18441136860" + }, + { + "id": "6891b87d421aa907bcb70ab5", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:53:32", + "imei": "18441136860" + }, + { + "id": "6891b89b421aa907bcb70df6", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:54:02", + "imei": "18441136860" + }, + { + "id": "6891b8b9421aa907bcb71133", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:54:32", + "imei": "18441136860" + }, + { + "id": "6891b8d7421aa907bcb7146f", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:55:02", + "imei": "18441136860" + }, + { + "id": "6891b8f5421aa907bcb7177c", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:55:32", + "imei": "18441136860" + }, + { + "id": "6891b913421aa907bcb71a91", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:56:02", + "imei": "18441136860" + }, + { + "id": "6891b931421aa907bcb71d86", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:56:32", + "imei": "18441136860" + }, + { + "id": "6891b94f421aa907bcb72082", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:57:02", + "imei": "18441136860" + }, + { + "id": "6891b96d421aa907bcb72382", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:57:32", + "imei": "18441136860" + }, + { + "id": "6891b98b421aa907bcb72685", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:58:02", + "imei": "18441136860" + }, + { + "id": "6891b9a9421aa907bcb729b1", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:58:32", + "imei": "18441136860" + }, + { + "id": "6891b9c7421aa907bcb72cb6", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:59:02", + "imei": "18441136860" + }, + { + "id": "6891b9e5421aa907bcb72fde", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T15:59:32", + "imei": "18441136860" + }, + { + "id": "6891ba03421aa907bcb732af", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T16:00:02", + "imei": "18441136860" + }, + { + "id": "6891ba21421aa907bcb735a1", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T16:00:32", + "imei": "18441136860" + }, + { + "id": "6891ba3f421aa907bcb73879", + "alarm": "0", + "altitude": "0", + "direction": "0", + "latitude": "38.918747", + "longitude": "117.758576", + "speed": "0", + "status": "4980737", + "timestamp": "2025-08-05T16:01:02", + "imei": "18441136860" + }, + { + "id": "6891ba44421aa907bcb7390c", + "alarm": "0", + "altitude": "13", + "direction": "0", + "latitude": "38.918739", + "longitude": "117.758737", + "speed": "11", + "status": "4980739", + "timestamp": "2025-08-05T16:01:07", + "imei": "18441136860" + } +] \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-api/jeecg-system-local-api/pom.xml b/jeecg-boot/jeecg-module-system/jeecg-system-api/jeecg-system-local-api/pom.xml index 1caa08124..bedc2dc5b 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-api/jeecg-system-local-api/pom.xml +++ b/jeecg-boot/jeecg-module-system/jeecg-system-api/jeecg-system-local-api/pom.xml @@ -5,7 +5,7 @@ jeecg-system-api org.jeecgframework.boot - 3.8.2 + 3.8.3 4.0.0 diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/openapi/entity/OpenApi.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/openapi/entity/OpenApi.java index 202aa7276..05b4fe720 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/openapi/entity/OpenApi.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/openapi/entity/OpenApi.java @@ -10,7 +10,6 @@ import lombok.experimental.Accessors; import java.io.Serializable; import java.util.Date; -import java.util.List; /** * 接口表 diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java index bbfa8042e..7903f9319 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java @@ -322,7 +322,7 @@ public class SysAnnouncementController { try { // 同步企业微信、钉钉的消息通知 Response dtResponse = dingtalkService.sendActionCardMessage(sysAnnouncement, null, true); - wechatEnterpriseService.sendTextCardMessage(sysAnnouncement, true); + wechatEnterpriseService.sendTextCardMessage(sysAnnouncement, null,true); if (dtResponse != null && dtResponse.isSuccess()) { String taskId = dtResponse.getResult(); @@ -726,6 +726,18 @@ public class SysAnnouncementController { return Result.ok("公告消息访问次数+1次"); } + /** + * 批量下载文件 + * @param id + * @param request + * @param response + */ + @GetMapping("/downLoadFiles") + public void downLoadFiles(@RequestParam(name="id") String id, + HttpServletRequest request, + HttpServletResponse response){ + sysAnnouncementService.downLoadFiles(id,request,response); + } /** * 根据异常信息确定友好的错误提示 */ diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysAnnouncementServiceImpl.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysAnnouncementServiceImpl.java index 8e7da070a..39aa36870 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysAnnouncementServiceImpl.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysAnnouncementServiceImpl.java @@ -1,14 +1,19 @@ package org.jeecg.modules.system.service.impl; +import cn.hutool.core.io.IoUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.compress.archivers.zip.Zip64Mode; +import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.common.util.FileDownloadUtils; import org.jeecg.common.util.oConvertUtils; +import org.jeecg.config.JeecgBaseConfig; import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.modules.system.entity.SysAnnouncement; import org.jeecg.modules.system.entity.SysAnnouncementSend; @@ -23,6 +28,10 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.net.URLEncoder; import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.SynchronousQueue; @@ -51,7 +60,9 @@ public class SysAnnouncementServiceImpl extends ServiceImpl