Explorar o código

提交数据报表查询相关接口

hxl13994548489 hai 11 meses
pai
achega
ad48f30093

+ 70 - 0
commons/src/main/java/com/jzg/commons/entity/report/dto/ReportUploadExcelTaskDto.java

@@ -0,0 +1,70 @@
+package com.jzg.commons.entity.report.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2025/9/15 18:18
+ *  @Description: 导入任务列表
+ */
+@Data
+@Schema(description = "导入任务列表")
+@AllArgsConstructor
+@NoArgsConstructor
+public class ReportUploadExcelTaskDto implements Serializable {
+    /**
+     * 主键
+     */
+    @Schema(description = "主键")
+    private String id;
+    /**
+     * 导入数据名称
+     */
+    @Schema(description = "导入数据名称")
+    private String taskName;
+
+    /**
+     * 导入人
+     */
+    @Schema(description = "导入人id")
+    private String uploadUserId;
+
+    /**
+     * 导入人名字
+     */
+    @Schema(description = "导入人名字")
+    private String uploadUserName;
+
+    /**
+     * 导入时间
+     */
+    @Schema(description = "导入时间")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date uploadDate;
+
+    /**
+     * 任务状态 0.失败 1 进行中  2. 完成
+     */
+    @Schema(description = "导入状态")
+    private Integer taskStatus;
+
+    /**
+     * 已读未读状态  0.未读 1.已读
+     */
+    @Schema(description = "已读未读状态  0.未读 1.已读")
+    private Integer readStatus;
+}

+ 161 - 0
commons/src/main/java/com/jzg/commons/entity/report/po/ReportUploadExcelTask.java

@@ -0,0 +1,161 @@
+package com.jzg.commons.entity.report.po;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2025/9/16 15:30
+ *  @Description: 导入任务表
+ */
+@TableName(value ="report_upload_excel_task")
+@Data
+@Schema(description = "导入任务表")
+@AllArgsConstructor
+@NoArgsConstructor
+public class ReportUploadExcelTask implements Serializable {
+    /**
+     * 主键
+     */
+    @Schema(description = "主键")
+    @TableId(type = IdType.ASSIGN_ID)
+    private String id;
+
+    /**
+     * 导入数据名称
+     */
+    @Schema(description = "导入数据名称")
+    private String taskName;
+
+    /**
+     * 导入路由
+     */
+    @Schema(description = "导入路由")
+    private String routerPathKey;
+
+    /**
+     * 导入人
+     */
+    @Schema(description = "导入人id")
+    private String uploadUserId;
+
+    /**
+     * 导入人名字
+     */
+    @Schema(description = "导入人名字")
+    private String uploadUserName;
+
+    /**
+     * 导入时间
+     */
+    @Schema(description = "导入时间")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date uploadDate;
+
+    /**
+     * 任务状态 0.失败 1 进行中  2. 完成
+     */
+    @Schema(description = "导入状态")
+    private Integer taskStatus;
+
+    /**
+     * 已读未读状态  0.未读 1.已读
+     */
+    @Schema(description = "已读未读状态  0.未读 1.已读")
+    private Integer readStatus;
+
+    /**
+     * 导入数据信息
+     */
+    @Schema(description = "导入数据信息")
+    private String uploadMsg;
+
+    /**
+     * 文件路径
+     */
+    @Schema(description = "文件路径")
+    private String filePath;
+
+    /**
+     *   导入时间
+     */
+    @Schema(description = "导入时间")
+    private String uploadMinutes;
+
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        ReportUploadExcelTask other = (ReportUploadExcelTask) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getTaskName() == null ? other.getTaskName() == null : this.getTaskName().equals(other.getTaskName()))
+            && (this.getRouterPathKey() == null ? other.getRouterPathKey() == null : this.getRouterPathKey().equals(other.getRouterPathKey()))
+            && (this.getUploadUserId() == null ? other.getUploadUserId() == null : this.getUploadUserId().equals(other.getUploadUserId()))
+            && (this.getUploadUserName() == null ? other.getUploadUserName() == null : this.getUploadUserName().equals(other.getUploadUserName()))
+            && (this.getUploadDate() == null ? other.getUploadDate() == null : this.getUploadDate().equals(other.getUploadDate()))
+            && (this.getTaskStatus() == null ? other.getTaskStatus() == null : this.getTaskStatus().equals(other.getTaskStatus()))
+            && (this.getReadStatus() == null ? other.getReadStatus() == null : this.getReadStatus().equals(other.getReadStatus()))
+            && (this.getUploadMsg() == null ? other.getUploadMsg() == null : this.getUploadMsg().equals(other.getUploadMsg()))
+            && (this.getFilePath() == null ? other.getFilePath() == null : this.getFilePath().equals(other.getFilePath()))
+            && (this.getUploadMinutes() == null ? other.getUploadMinutes() == null : this.getUploadMinutes().equals(other.getUploadMinutes()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getTaskName() == null) ? 0 : getTaskName().hashCode());
+        result = prime * result + ((getRouterPathKey() == null) ? 0 : getRouterPathKey().hashCode());
+        result = prime * result + ((getUploadUserId() == null) ? 0 : getUploadUserId().hashCode());
+        result = prime * result + ((getUploadUserName() == null) ? 0 : getUploadUserName().hashCode());
+        result = prime * result + ((getUploadDate() == null) ? 0 : getUploadDate().hashCode());
+        result = prime * result + ((getTaskStatus() == null) ? 0 : getTaskStatus().hashCode());
+        result = prime * result + ((getReadStatus() == null) ? 0 : getReadStatus().hashCode());
+        result = prime * result + ((getUploadMsg() == null) ? 0 : getUploadMsg().hashCode());
+        result = prime * result + ((getFilePath() == null) ? 0 : getFilePath().hashCode());
+        result = prime * result + ((getUploadMinutes() == null) ? 0 : getUploadMinutes().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", taskName=").append(taskName);
+        sb.append(", routerPathKey=").append(routerPathKey);
+        sb.append(", uploadUserId=").append(uploadUserId);
+        sb.append(", uploadUserName=").append(uploadUserName);
+        sb.append(", uploadDate=").append(uploadDate);
+        sb.append(", taskStatus=").append(taskStatus);
+        sb.append(", readStatus=").append(readStatus);
+        sb.append(", uploadMsg=").append(uploadMsg);
+        sb.append(", filePath=").append(filePath);
+        sb.append(", uploadMinutes=").append(uploadMinutes);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 43 - 0
commons/src/main/java/com/jzg/commons/entity/report/vo/ReportUploadExcelTaskVo.java

@@ -0,0 +1,43 @@
+package com.jzg.commons.entity.report.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.jzg.commons.core.base.PageRequest;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2025/9/15 18:14
+ *  @Description: 导入任务列表vo
+ */
+@Data
+@Schema(description = "导入任务表")
+@AllArgsConstructor
+@NoArgsConstructor
+public class ReportUploadExcelTaskVo extends PageRequest {
+    /**
+     * 导入人
+     */
+    @Schema(description = "导入人id")
+    private String uploadUserId;
+
+    /**
+     * 任务状态 0.失败 1 进行中  2. 完成
+     */
+    @Schema(description = "导入状态")
+    private Integer taskStatus;
+
+    /**
+     * 已读未读状态  0.未读 1.已读
+     */
+    @Schema(description = "已读未读状态  0.未读 1.已读")
+    private Integer readStatus;
+}

+ 1 - 1
consoleStatistics/pom.xml

@@ -109,7 +109,7 @@
                         <manifest>
                             <addClasspath>true</addClasspath>
                             <classpathPrefix>lib/</classpathPrefix>
-                            <mainClass>com.jzg.ConsoleApplication</mainClass> <!-- 替换为你的主类 -->
+                            <mainClass>com.jzg.console.ConsoleApplication</mainClass> <!-- 替换为你的主类 -->
                             <useUniqueVersions>false</useUniqueVersions>
                         </manifest>
                         <manifestEntries>

+ 118 - 0
consoleStatistics/src/main/java/com/jzg/console/controller/ReportUploadExcelTaskController.java

@@ -0,0 +1,118 @@
+package com.jzg.console.controller;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.jzg.commons.core.base.BaseController;
+import com.jzg.commons.core.page.HttpResult;
+import com.jzg.commons.entity.report.dto.ReportUploadExcelTaskDto;
+import com.jzg.commons.entity.report.po.ReportUploadExcelTask;
+import com.jzg.commons.entity.report.vo.ReportUploadExcelTaskVo;
+import com.jzg.console.service.ReportUploadExcelTaskService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.nio.charset.StandardCharsets;
+
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2025/9/16 11:15
+ *  @Description: 导出任务中心
+ */
+@Slf4j
+@Tag(name="数据报表管理")
+@RestController
+@RequestMapping("/console/task")
+public class ReportUploadExcelTaskController extends BaseController {
+
+
+    @Autowired
+    private ReportUploadExcelTaskService reportUploadExcelTaskService;
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/15 18:11
+     *  @Description: 导出任务中心-列表查询
+     */
+    @Operation(summary = "导出任务中心-分页列表查询", description = "导出任务中心-分页列表查询")
+    @PostMapping(value = "/getPageTaskList")
+    public HttpResult<?> getPageTaskList(@RequestBody ReportUploadExcelTaskVo reportUploadExcelTaskVo) {
+        try{
+            IPage<ReportUploadExcelTaskDto> pageList = reportUploadExcelTaskService.getPageTaskList(reportUploadExcelTaskVo);
+            return HttpResult.ok(pageList);
+        }catch (Exception e){
+            return HttpResult.error(e.getMessage());
+        }
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/16 10:38
+     *  @Description:
+     */
+    @Operation(summary = "导出任务中心-下載文件", description = "导出任务中心-下載文件")
+    @GetMapping(value = "/downTaskFile")
+    public void downTaskFile(@RequestParam(name="id",required=true) String id, HttpServletResponse response) throws Exception {
+        //通过id查询路径的
+        ReportUploadExcelTask entity = reportUploadExcelTaskService.getById(id);
+        //全路径
+        String fileUrl = entity.getFilePath();
+        URL url = new URL(fileUrl);
+        URLConnection connection = url.openConnection();
+        InputStream inputStream = connection.getInputStream();
+        String fileName = "导出数据.xlsx";
+        response.setContentType("application/force-download");
+        response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1));
+        response.setCharacterEncoding("utf-8");
+        ServletOutputStream outputStream = response.getOutputStream();
+        byte[] buffer = new byte[1024];
+        int bytesRead;
+        while ((bytesRead = inputStream.read(buffer)) != -1) {
+            outputStream.write(buffer, 0, bytesRead);
+        }
+        outputStream.flush();
+        outputStream.close();
+        inputStream.close();
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/16 10:39
+     *  @Description:  更新任务的未读变为已读状态
+     */
+    @Operation(summary = "导出任务中心-更新任务的未读变为已读状态", description = "导出任务中心-更新任务的未读变为已读状态")
+    @GetMapping(value = "/updateReadStatus")
+    public HttpResult<?> updateReadStatus(@RequestParam(name="id",required=true) String id) {
+        try{
+            reportUploadExcelTaskService.uodateReadStatus(id);
+        }catch (Exception e){
+            return HttpResult.error(e.getMessage());
+        }
+        return HttpResult.ok("更新任务消息成功");
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/16 10:40
+     *  @Description: 显示导出任务未读数
+     */
+    @Operation(summary = "导出任务中心-显示导出任务未读数", description = "导出任务中心-显示导出任务未读数")
+    @GetMapping(value = "/getTaskMessageNoReadCount")
+    public HttpResult<?> getTaskMessageNoReadCount(@RequestParam(name="userId",required=true) String userId) {
+        try{
+            int count = reportUploadExcelTaskService.getTaskMessageNoReadCount(userId);
+            return  HttpResult.ok(count);
+        }catch (Exception e){
+            return HttpResult.error(e.getMessage());
+        }
+    }
+}

+ 0 - 36
consoleStatistics/src/main/java/com/jzg/console/controller/TestController.java

@@ -1,36 +0,0 @@
-package com.jzg.console.controller;
-
-import com.jzg.commons.core.base.BaseController;
-import com.jzg.commons.core.page.HttpResult;
-import com.jzg.console.service.TestService;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-/**
- *  @version
- *  @author: hxl
- *  @Date: 2025/9/12 15:30
- *  @Description: 添加控制台的测试接口
- */
-@Slf4j
-@Tag(name="控制台测试接口")
-@RestController
-@RequestMapping("/console/test")
-public class TestController  extends BaseController {
-
-    @Autowired
-    private  TestService testService;
-
-
-    @GetMapping("/getList")
-    @Operation(summary = "测试控制台接口",
-            description = "测试控制台接口")
-    public HttpResult<?> getList() {
-        return testService.getAllList();
-    }
-}

+ 35 - 0
consoleStatistics/src/main/java/com/jzg/console/mapper/ReportUploadExcelTaskMapper.java

@@ -0,0 +1,35 @@
+package com.jzg.console.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.jzg.commons.entity.report.dto.ReportUploadExcelTaskDto;
+import com.jzg.commons.entity.report.po.ReportUploadExcelTask;
+import com.jzg.commons.entity.report.vo.ReportUploadExcelTaskVo;
+import org.apache.ibatis.annotations.Param;
+
+/**
+* @author Administrator
+* @description 针对表【report_upload_excel_task(导入任务表)】的数据库操作Mapper
+* @createDate 2025-09-15 16:40:10
+* @Entity generator.domain.ReportUploadExcelTask
+*/
+public interface ReportUploadExcelTaskMapper extends BaseMapper<ReportUploadExcelTask> {
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/16 11:04
+     *  @Description: 获取导出任务列表数据倒序排列
+     */
+    IPage<ReportUploadExcelTaskDto> getPageTaskList(@Param("page") IPage<ReportUploadExcelTaskDto> page, @Param("vo") ReportUploadExcelTaskVo reportUploadExcelTaskVo);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/16 11:16
+     *  @Description: 查询租户用户的未读信息数量
+     */
+    int getTaskMessageNoReadCount(@Param("userId") String userId);
+}
+
+
+
+

+ 0 - 19
consoleStatistics/src/main/java/com/jzg/console/mapper/TestMapper.java

@@ -1,19 +0,0 @@
-package com.jzg.console.mapper;
-
-import com.jzg.commons.core.page.HttpResult;
-import com.jzg.commons.entity.console.dto.TestDto;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.List;
-
-@Mapper
-public interface TestMapper {
-
-    /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2025/9/12 15:38
-     *  @Description: 测试方法
-     */
-    List<TestDto> getAllList();
-}

+ 37 - 0
consoleStatistics/src/main/java/com/jzg/console/service/ReportUploadExcelTaskService.java

@@ -0,0 +1,37 @@
+package com.jzg.console.service;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.jzg.commons.entity.report.dto.ReportUploadExcelTaskDto;
+import com.jzg.commons.entity.report.po.ReportUploadExcelTask;
+import com.jzg.commons.entity.report.vo.ReportUploadExcelTaskVo;
+
+/**
+* @author Administrator
+* @description 针对表【report_upload_excel_task(导入任务表)】的数据库操作Service
+* @createDate 2025-09-15 16:40:10
+*/
+public interface ReportUploadExcelTaskService extends IService<ReportUploadExcelTask> {
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/16 10:51
+     *  @Description: 导出任务数据的列表数据
+     */
+    IPage<ReportUploadExcelTaskDto> getPageTaskList(ReportUploadExcelTaskVo reportUploadExcelTaskVo);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/16 10:55
+     *  @Description: 更新消息任务为已读
+     */
+    void uodateReadStatus(String id);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/16 10:55
+     *  @Description: 查询任务中心未读消息任务
+     */
+    int getTaskMessageNoReadCount(String userId);
+}

+ 0 - 16
consoleStatistics/src/main/java/com/jzg/console/service/TestService.java

@@ -1,16 +0,0 @@
-package com.jzg.console.service;
-
-import com.jzg.commons.core.page.HttpResult;
-import com.jzg.commons.entity.console.dto.TestDto;
-
-import java.util.List;
-
-/**
- *  @version
- *  @author: hxl
- *  @Date: 2025/9/12 15:34
- *  @Description:  控制台测试方法
- */
-public interface TestService {
-    HttpResult<List<TestDto>> getAllList();
-}

+ 64 - 0
consoleStatistics/src/main/java/com/jzg/console/service/impl/ReportUploadExcelTaskServiceImpl.java

@@ -0,0 +1,64 @@
+package com.jzg.console.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jzg.commons.entity.report.dto.ReportUploadExcelTaskDto;
+import com.jzg.commons.entity.report.po.ReportUploadExcelTask;
+import com.jzg.commons.entity.report.vo.ReportUploadExcelTaskVo;
+import com.jzg.commons.exception.SystemException;
+import com.jzg.commons.util.StringUtils;
+import com.jzg.console.mapper.ReportUploadExcelTaskMapper;
+import com.jzg.console.service.ReportUploadExcelTaskService;
+import org.springframework.stereotype.Service;
+
+/**
+* @author Administrator
+* @description 针对表【report_upload_excel_task(导入任务表)】的数据库操作Service实现
+* @createDate 2025-09-15 16:40:10
+*/
+@Service
+public class ReportUploadExcelTaskServiceImpl extends ServiceImpl<ReportUploadExcelTaskMapper, ReportUploadExcelTask>
+    implements ReportUploadExcelTaskService {
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/16 11:00
+     *  @Description: 导出任务列表
+     */
+    @Override
+    public IPage<ReportUploadExcelTaskDto> getPageTaskList(ReportUploadExcelTaskVo reportUploadExcelTaskVo) {
+        if (StringUtils.isBlank(reportUploadExcelTaskVo.getUploadUserId())) {
+            throw new SystemException("用户id不能为空");
+        }
+        IPage<ReportUploadExcelTaskDto> page = new Page<ReportUploadExcelTaskDto>(reportUploadExcelTaskVo.getPages(), reportUploadExcelTaskVo.getSize());
+        return  this.getBaseMapper().getPageTaskList(page, reportUploadExcelTaskVo);
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/16 11:00
+     *  @Description: 未读变为已读
+     */
+    @Override
+    public void uodateReadStatus(String id) {
+        ReportUploadExcelTask reportUploadExcelTask = this.getById(id);
+        reportUploadExcelTask.setReadStatus(1);
+        this.updateById(reportUploadExcelTask);
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/9/16 11:00
+     *  @Description: 查询租户的未读消息列表
+     */
+    @Override
+    public int getTaskMessageNoReadCount(String userId) {
+        return this.getBaseMapper().getTaskMessageNoReadCount(userId);
+    }
+}
+
+
+
+

+ 0 - 36
consoleStatistics/src/main/java/com/jzg/console/service/impl/TestServiceImpl.java

@@ -1,36 +0,0 @@
-package com.jzg.console.service.impl;
-
-import com.jzg.commons.core.page.HttpResult;
-import com.jzg.commons.entity.console.dto.TestDto;
-import com.jzg.console.mapper.TestMapper;
-import com.jzg.console.service.TestService;
-import lombok.extern.slf4j.Slf4j;
-import org.checkerframework.checker.units.qual.A;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- *  @version
- *  @author: hxl
- *  @Date: 2025/9/12 15:34
- *  @Description:  控制台测试方法
- */
-@Slf4j
-@Service
-public class TestServiceImpl implements TestService {
-
-    @Autowired
-    private TestMapper testMapper;
-    /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2025/9/12 15:37
-     *  @Description: 控制台测试类
-     */
-    @Override
-    public HttpResult<List<TestDto>> getAllList() {
-        return HttpResult.ok(testMapper.getAllList());
-    }
-}

+ 1 - 0
consoleStatistics/src/main/resources/application.yml

@@ -72,6 +72,7 @@ tenant:
     - ins_orders_policy
     - sys_relation_person
     - sys_user_account
+    - report_upload_excel_task
 
 
   ignoreLoginNames:

+ 33 - 0
consoleStatistics/src/main/resources/mapper/ReportUploadExcelTaskMapper.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jzg.console.mapper.ReportUploadExcelTaskMapper">
+
+    <select id="getPageTaskList" resultType="com.jzg.commons.entity.report.dto.ReportUploadExcelTaskDto">
+         select
+             *
+         from
+             report_upload_excel_task
+         <where>
+             <if test="vo.uploadUserId !=null and vo.uploadUserId !=''">
+                 AND  upload_user_id  =#{ vo.uploadUserId }
+             </if>
+             <if test="vo.taskStatus !=null">
+                 AND   task_status  =#{ vo.taskStatus }
+             </if>
+             <if test="vo.readStatus !=null">
+                 AND  read_status  =#{ vo.readStatus }
+             </if>
+         </where>
+          order by  upload_date desc
+    </select>
+    <select id="getTaskMessageNoReadCount" resultType="java.lang.Integer">
+        select
+            count(0)
+        from
+            report_upload_excel_task
+        where
+            upload_user_id  =#{ userId }
+            and
+            read_status = 0
+    </select>
+</mapper>

+ 0 - 7
consoleStatistics/src/main/resources/mapper/TestMapper.xml

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.jzg.console.mapper.TestMapper">
-    <select id="getAllList" resultType="com.jzg.commons.entity.console.dto.TestDto">
-        select id as id,label as name from ins_business_insurance_option
-    </select>
-</mapper>