luowei %!s(int64=2) %!d(string=hai) anos
pai
achega
85acce9a37
Modificáronse 19 ficheiros con 449 adicións e 14 borrados
  1. 5 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/controller/TMonitoringRetrievalPlanController.java
  2. 0 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/information/controller/CoreMessageCenterController.java
  3. 34 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/education/controller/EducationReportController.java
  4. 21 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/education/mapper/EducationMapper.java
  5. 15 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/education/service/EducationService.java
  6. 32 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/education/service/impl/EducationServiceImpl.java
  7. 30 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/controller/MonitorAccessReportController.java
  8. 3 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/dto/MonitoringAccessDTO.java
  9. 7 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/mapper/MonitorAccessReportMapper.java
  10. 20 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/service/MonitorAccessReportService.java
  11. 96 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/service/impl/MonitorAccessReportServiceImpl.java
  12. 20 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/vo/MonitoringAccessVO.java
  13. 17 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/pojo/ReportDTO.java
  14. 20 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/pojo/ReportVO.java
  15. 53 0
      soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/EducationMapper.xml
  16. 57 1
      soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/MonitorAccessReportMapper.xml
  17. 1 1
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysNfcBindController.java
  18. 14 6
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysNfcBindMapper.java
  19. 4 1
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysNfcBindService.java

+ 5 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/controller/TMonitoringRetrievalPlanController.java

@@ -11,11 +11,14 @@ import com.xunmei.common.security.annotation.RequiresPermissions;
 import com.xunmei.common.security.utils.SecurityUtils;
 import com.xunmei.core.access.domain.TMonitoringRetrievalPlan;
 import com.xunmei.core.access.service.ITMonitoringRetrievalPlanService;
+import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
+import com.xunmei.core.reportForms.monitor.service.MonitorAccessReportService;
 import com.xunmei.system.api.RemoteOrgService;
 import com.xunmei.system.api.RemoteRoleService;
 import com.xunmei.system.api.domain.SysOrg;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import java.text.ParseException;
@@ -37,7 +40,8 @@ public class TMonitoringRetrievalPlanController extends BaseController {
     private RemoteRoleService remoteRoleService;
     @Autowired
     private RemoteOrgService remoteOrgService;
-
+    @Autowired
+    private MonitorAccessReportService monitorAccessReportService;
     /**
      * 查询监控调阅计划列表
      */

+ 0 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/information/controller/CoreMessageCenterController.java

@@ -56,7 +56,6 @@ public TableDataInfo<CoreMessageCenterVO> list(CoreMessageCenterDTO coreMessageC
      * 已读
      */
     @ApiOperation(value = "已读")
-    @RequiresPermissions("core:center:edit")
     @GetMapping(value = "/isRead/{id}")
     public AjaxResult isRead(@PathVariable("id") Long id) {
         return success(coreMessageCenterService.isRead(id));

+ 34 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/education/controller/EducationReportController.java

@@ -0,0 +1,34 @@
+package com.xunmei.core.reportForms.education.controller;
+
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.common.security.annotation.RequiresPermissions;
+import com.xunmei.core.reportForms.education.service.EducationService;
+import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
+import com.xunmei.core.reportForms.pojo.ReportDTO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/10/31
+ */
+@Api(tags = {"EducationReport"})
+@RestController
+@RequestMapping("/educationReport")
+public class EducationReportController {
+    @Resource
+    private EducationService educationService;
+
+    @ApiOperation(value = "监控调阅报表")
+    @RequiresPermissions("core:monitorAccessReport:list")
+    @GetMapping("/list")
+    public TableDataInfo list(ReportDTO reportDTO) {
+        return educationService.report(reportDTO);
+    }
+}

+ 21 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/education/mapper/EducationMapper.java

@@ -0,0 +1,21 @@
+package com.xunmei.core.reportForms.education.mapper;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xunmei.core.reportForms.pojo.ReportDTO;
+import com.xunmei.core.reportForms.pojo.ReportVO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/10/31
+ */
+@Mapper
+public interface EducationMapper {
+    List<ReportVO> selectAll(ReportDTO reportDTO);
+
+    Page<ReportVO> report(@Param("page") Page<ReportVO> page, @Param("reportDTO") ReportDTO reportDTO);
+
+}

+ 15 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/education/service/EducationService.java

@@ -0,0 +1,15 @@
+package com.xunmei.core.reportForms.education.service;
+
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
+import com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO;
+import com.xunmei.core.reportForms.pojo.ReportDTO;
+import com.xunmei.core.reportForms.pojo.ReportVO;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/10/31
+ */
+public interface EducationService {
+    TableDataInfo<ReportVO> report(ReportDTO reportDTO);
+}

+ 32 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/education/service/impl/EducationServiceImpl.java

@@ -0,0 +1,32 @@
+package com.xunmei.core.reportForms.education.service.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.core.reportForms.education.mapper.EducationMapper;
+import com.xunmei.core.reportForms.education.service.EducationService;
+import com.xunmei.core.reportForms.pojo.ReportDTO;
+import com.xunmei.core.reportForms.pojo.ReportVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/10/31
+ */
+@Service
+public class EducationServiceImpl implements EducationService {
+    @Autowired
+    private EducationMapper educationMapper;
+
+    @Override
+    public TableDataInfo<ReportVO> report(ReportDTO reportDTO) {
+        Page<ReportVO> page;
+        if (reportDTO.getPageNum() != null && reportDTO.getPageSize() != null) {
+            page = new Page<>(reportDTO.getPageNum(), reportDTO.getPageSize());
+        } else {
+            page = new Page<>();
+        }
+        Page<ReportVO> report = educationMapper.report(page, reportDTO);
+        return TableDataInfo.build(report);
+    }
+}

+ 30 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/controller/MonitorAccessReportController.java

@@ -1,8 +1,19 @@
 package com.xunmei.core.reportForms.monitor.controller;
-
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.common.log.annotation.Log;
+import com.xunmei.common.log.enums.BusinessType;
+import com.xunmei.common.security.annotation.RequiresPermissions;
+import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
+import com.xunmei.core.reportForms.monitor.service.MonitorAccessReportService;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 
 /**
  * @author :LuoWei
@@ -12,5 +23,23 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 @RequestMapping("/monitorAccessReport")
 public class MonitorAccessReportController {
+    @Autowired
+    private MonitorAccessReportService monitorAccessReportService;
 
+    @ApiOperation(value = "监控调阅报表")
+    @RequiresPermissions("core:monitorAccessReport:list")
+    @GetMapping("/list")
+    public TableDataInfo list(MonitoringAccessDTO monitoringAccessDTO) {
+        return monitorAccessReportService.report(monitoringAccessDTO);
+    }
+    /**
+     * 导出excel
+     */
+    @ApiOperation(value = "监控调阅报表导出")
+    @RequiresPermissions("core:monitorAccessReport:export")
+    @Log(title = "监控调阅报表", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(MonitoringAccessDTO request, HttpServletResponse response) throws IOException {
+        monitorAccessReportService.export(request, response);
+    }
 }

+ 3 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/dto/MonitoringAccessDTO.java

@@ -1,5 +1,6 @@
 package com.xunmei.core.reportForms.monitor.dto;
 
+import com.xunmei.common.core.web.domain.BaseEntity;
 import lombok.Data;
 
 import java.util.Date;
@@ -9,9 +10,10 @@ import java.util.Date;
  * @date : 2023/10/27
  */
 @Data
-public class MonitoringAccessDTO {
+public class MonitoringAccessDTO extends BaseEntity {
     private Long orgId;
     private String orgPath;
     private Date startTime;
     private Date endTime;
+    private String cycle;
 }

+ 7 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/mapper/MonitorAccessReportMapper.java

@@ -1,8 +1,11 @@
 package com.xunmei.core.reportForms.monitor.mapper;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xunmei.core.access.vo.TMonitoringRetrievalPlanVO;
 import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
 import com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -12,5 +15,8 @@ import java.util.List;
  */
 @Mapper
 public interface MonitorAccessReportMapper {
-    List<MonitoringAccessVO>report(MonitoringAccessDTO monitoringAccessDTO);
+    Page<MonitoringAccessVO> report(@Param("page") Page<MonitoringAccessVO> page,@Param("monitoringAccessDTO")MonitoringAccessDTO monitoringAccessDTO);
+
+    Integer selectNetworkNumberByPath(String orgPath);
+    List<MonitoringAccessVO> selectAll(MonitoringAccessDTO monitoringAccessDTO);
 }

+ 20 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/service/MonitorAccessReportService.java

@@ -0,0 +1,20 @@
+package com.xunmei.core.reportForms.monitor.service;
+
+import com.xunmei.common.core.domain.retrieval.dto.RetrievalTaskPageDto;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
+import com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/10/30
+ */
+public interface MonitorAccessReportService {
+    TableDataInfo<MonitoringAccessVO> report(MonitoringAccessDTO monitoringAccessDTO);
+    List<MonitoringAccessVO>selectAll(MonitoringAccessDTO monitoringAccessDTO);
+    void export(MonitoringAccessDTO monitoringAccessDTO, HttpServletResponse response) throws IOException;
+}

+ 96 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/service/impl/MonitorAccessReportServiceImpl.java

@@ -0,0 +1,96 @@
+package com.xunmei.core.reportForms.monitor.service.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.EasyExcel;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xunmei.common.core.constant.SecurityConstants;
+import com.xunmei.common.core.domain.retrieval.vo.CoreMonitoringRetrievalTaskExcelVo;
+import com.xunmei.common.core.utils.DateHelper;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.core.access.vo.TMonitoringRetrievalPlanVO;
+import com.xunmei.core.reportForms.monitor.dto.MonitoringAccessDTO;
+import com.xunmei.core.reportForms.monitor.mapper.MonitorAccessReportMapper;
+import com.xunmei.core.reportForms.monitor.service.MonitorAccessReportService;
+import com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO;
+import com.xunmei.system.api.RemoteOrgService;
+import com.xunmei.system.api.RemoteRoleService;
+import com.xunmei.system.api.domain.SysDictData;
+import com.xunmei.system.api.domain.SysOrg;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/10/30
+ */
+@Service
+public class MonitorAccessReportServiceImpl implements MonitorAccessReportService {
+    @Autowired
+    private MonitorAccessReportMapper monitorAccessReportMapper;
+    @Resource
+    private RemoteOrgService remoteOrgService;
+    @Override
+    public TableDataInfo<MonitoringAccessVO> report(MonitoringAccessDTO monitoringAccessDTO) {
+        Page<MonitoringAccessVO> page;
+        if (monitoringAccessDTO.getPageNum() != null && monitoringAccessDTO.getPageSize() != null) {
+            page = new Page<>(monitoringAccessDTO.getPageNum(), monitoringAccessDTO.getPageSize());
+        } else {
+            page = new Page<>();
+        }
+        if (null!=monitoringAccessDTO.getOrgId()){
+            SysOrg sysOrg = remoteOrgService.selectSysOrgById(monitoringAccessDTO.getOrgId(), SecurityConstants.INNER);
+            monitoringAccessDTO.setOrgPath(sysOrg.getPath());
+        }
+        Page<MonitoringAccessVO> report = monitorAccessReportMapper.report(page, monitoringAccessDTO);
+        report.getRecords().forEach(r -> {
+            Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(r.getPath());
+            r.setNetworkNumber(integer);
+        });
+        return TableDataInfo.build(report);
+    }
+
+    @Override
+    public List<MonitoringAccessVO> selectAll(MonitoringAccessDTO monitoringAccessDTO) {
+
+        List<MonitoringAccessVO> monitoringAccessVOS = monitorAccessReportMapper.selectAll(monitoringAccessDTO);
+        monitoringAccessVOS.forEach(m->{
+            Integer integer = monitorAccessReportMapper.selectNetworkNumberByPath(m.getPath());
+            m.setNetworkNumber(integer);
+        });
+        return monitoringAccessVOS;
+    }
+
+    @Override
+    public void export(MonitoringAccessDTO monitoringAccessDTO, HttpServletResponse response) throws IOException {
+        String orgName = null;
+        if (null!=monitoringAccessDTO.getOrgId()){
+            SysOrg sysOrg = remoteOrgService.selectSysOrgById(monitoringAccessDTO.getOrgId(), SecurityConstants.INNER);
+            monitoringAccessDTO.setOrgPath(sysOrg.getPath());
+            orgName=sysOrg.getName();
+        }
+        List<MonitoringAccessVO> monitoringAccessVOS = this.selectAll(monitoringAccessDTO);
+        if (ObjectUtil.isEmpty(monitoringAccessVOS)) {
+            throw new RuntimeException("导出数据为空!");
+        }
+        for (int i = 0; i < monitoringAccessVOS.size(); i++) {
+            MonitoringAccessVO monitoringAccessVO = monitoringAccessVOS.get(i);
+            monitoringAccessVO.setOrderNum(i + 1);
+        }
+        if (monitoringAccessVOS.size() > 10000) {
+            throw new RuntimeException("导出数据量过大(单次导出限量10000条数据),请填写条件分批导出");
+        }
+        response.setContentType("application/vnd.ms-excel");
+        response.setCharacterEncoding("utf-8");
+        String fileName = URLEncoder.encode("【" + orgName + "】-监控调阅报表" + DateHelper.getDateString(new Date()), "UTF-8");
+        response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
+        // 调用EasyExcel的导出方法
+        EasyExcel.write(response.getOutputStream(), MonitoringAccessVO.class).sheet("Sheet1").doWrite(monitoringAccessVOS);
+    }
+}

+ 20 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/vo/MonitoringAccessVO.java

@@ -1,5 +1,7 @@
 package com.xunmei.core.reportForms.monitor.vo;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -11,14 +13,32 @@ import lombok.Data;
  */
 @Data
 public class MonitoringAccessVO {
+    /**
+     * 序号
+     */
+    @ExcelProperty("序号")
+    private Integer orderNum;
+
+    @ExcelProperty("机构名称")
     @ApiModelProperty(value = "机构名称")
     private String orgName;
+
+    @ExcelProperty("网点数量")
     @ApiModelProperty(value = "网点数量")
     private Integer networkNumber;
+
+    @ExcelProperty("应调阅次数")
     @ApiModelProperty(value = "应调阅次数")
     private Integer planAccessNumber;
+
+    @ExcelProperty("实际调阅次数")
     @ApiModelProperty(value = "实际调阅次数")
     private Integer realityAccessNumber;
+
+    @ExcelProperty("调阅率")
     @ApiModelProperty(value = "调阅率")
     private String accessRate;
+    @ExcelIgnore
+    @ExcelProperty("机构路径")
+    private String path;
 }

+ 17 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/pojo/ReportDTO.java

@@ -0,0 +1,17 @@
+package com.xunmei.core.reportForms.pojo;
+
+import com.xunmei.common.core.web.domain.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/10/31
+ */
+@Data
+public class ReportDTO extends BaseEntity {
+    private String orgId;
+    private String taskName;
+    private Date month;
+}

+ 20 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/pojo/ReportVO.java

@@ -0,0 +1,20 @@
+package com.xunmei.core.reportForms.pojo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author :LuoWei
+ * @date : 2023/10/31
+ */
+@Data
+public class ReportVO {
+    @ApiModelProperty(value = "机构名称")
+    private String orgName;
+    @ApiModelProperty(value = "计划数量")
+    private Integer planNum;
+    @ApiModelProperty(value = "实际数量")
+    private Integer realityNum;
+    @ApiModelProperty(value = "完成率")
+    private String completionRate;
+}

+ 53 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/EducationMapper.xml

@@ -0,0 +1,53 @@
+<?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.xunmei.core.reportForms.education.mapper.EducationMapper">
+
+    <select id="selectAll" resultType="com.xunmei.core.reportForms.pojo.ReportVO">
+        SELECT
+            org_name AS orgName,
+            COUNT( id ) AS planNum,
+            SUM(
+                    IF
+                        ( `status` = 2, 1, 0 )) AS realityNum,
+            SUM(
+                    IF
+                        ( `status` = 2, 1, 0 )) / COUNT( id ) AS completionRate
+        FROM
+            core_edu_training_task
+        WHERE
+            1 = 1
+          AND org_id = #{orgId}
+          AND title = #{taskName}
+          AND ( training_start_date_time LIKE concat( #{month}, '%') OR training_end_date_time LIKE concat( #{month}, '%') )
+        GROUP BY
+            org_id
+    </select>
+    <select id="report" resultType="com.xunmei.core.reportForms.pojo.ReportVO">
+        SELECT
+            org_name AS orgName,
+            COUNT( id ) AS planNum,
+            SUM(
+                    IF
+                        ( `status` = 2, 1, 0 )) AS realityNum,
+            SUM(
+                    IF
+                        ( `status` = 2, 1, 0 )) / COUNT( id ) AS completionRate
+        FROM
+            core_edu_training_task
+        WHERE
+            1 = 1
+        <if test="reportDTO.orgId != null  and reportDTO.orgId != ''">
+            AND org_id = #{reportDTO.orgId}
+        </if>
+        <if test="reportDTO.taskName != null  and reportDTO.taskName != ''">
+            AND title = #{reportDTO.taskName}
+        </if>
+        <if test="reportDTO.month != null">
+            AND ( training_start_date_time LIKE concat( #{reportDTO.month}, '%') OR training_end_date_time LIKE concat( #{reportDTO.month}, '%') )
+        </if>
+        GROUP BY
+            org_id
+    </select>
+</mapper>

+ 57 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/MonitorAccessReportMapper.xml

@@ -5,6 +5,62 @@
 <mapper namespace="com.xunmei.core.reportForms.monitor.mapper.MonitorAccessReportMapper">
 
     <select id="report" resultType="com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO">
-
+        SELECT
+        b.short_name AS orgName,
+        b.path,
+        COUNT( a.id ) AS planAccessNumber,
+        SUM(
+        IF
+        ( a.`status` = 2, 1, 0 )) AS realityAccessNumber,
+        SUM(
+        IF
+        ( a.`status` = 2, 1, 0 ))/ COUNT( a.id ) AS accessRate
+        FROM
+        core_monitoring_retrieval_task a
+        LEFT JOIN sys_org b ON a.org_id = b.id
+        WHERE
+        a.is_deleted=0
+        <if test="monitoringAccessDTO.orgPath != null  and monitoringAccessDTO.orgPath != ''">
+            and     b.path like concat( #{monitoringAccessDTO.orgPath}, '%')
+        </if>
+        <if test="monitoringAccessDTO.cycle != null  and monitoringAccessDTO.cycle != ''">
+            AND a.cycle = #{monitoringAccessDTO.cycle}
+        </if>
+        <if test="monitoringAccessDTO.startTime != null  and monitoringAccessDTO.endTime != null">
+            AND a.start_time >= #{monitoringAccessDTO.startTime} ANDa.end_time &lt;= #{monitoringAccessDTO.endTime}
+        </if>
+        GROUP BY
+        b.id
+    </select>
+    <select id="selectNetworkNumberByPath" resultType="java.lang.Integer">
+        SELECT COUNT(1) FROM sys_org WHERE path LIKE  concat( #{orgPath}, '%') AND type=4 AND deleted=0
+    </select>
+    <select id="selectAll" resultType="com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO">
+        SELECT
+        b.short_name AS orgName,
+        b.path,
+        COUNT( a.id ) AS planAccessNumber,
+        SUM(
+        IF
+        ( a.`status` = 2, 1, 0 )) AS realityAccessNumber,
+        SUM(
+        IF
+        ( a.`status` = 2, 1, 0 ))/ COUNT( a.id ) AS accessRate
+        FROM
+        core_monitoring_retrieval_task a
+        LEFT JOIN sys_org b ON a.org_id = b.id
+        WHERE
+        a.is_deleted=0
+        <if test="orgPath != null  and orgPath != ''">
+            and     b.path like concat( #{orgPath}, '%')
+        </if>
+        <if test="cycle != null  and cycle != ''">
+            AND a.cycle = #{cycle}
+        </if>
+        <if test="startTime != null  and endTime != null">
+            AND a.start_time >= #{startTime} ANDa.end_time &lt;= #{endTime}
+        </if>
+        GROUP BY
+        b.id
     </select>
 </mapper>

+ 1 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysNfcBindController.java

@@ -60,7 +60,7 @@ public class SysNfcBindController extends BaseController {
     @ApiOperation(value = "app获取SysNfcBind详细信息,传入code")
     @RequiresPermissions("system:bind:query")
     @GetMapping(value = {"/appGetInfo/{code}"})
-    public AjaxResult appGetInfo(@PathVariable(value = "code", required = false) String code) {
+    public AjaxResult appGetInfo(@PathVariable String code) {
         AjaxResult ajax = AjaxResult.success();
         if (StringUtils.isEmpty(code)) {
             ajax.put(AjaxResult.DATA_TAG, null);

+ 14 - 6
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysNfcBindMapper.java

@@ -23,7 +23,7 @@ public interface SysNfcBindMapper extends BaseMapper<SysNfcBind> {
      * @param id 【请填写功能名称】主键
      * @return 【请填写功能名称】
      */
-     SysNfcBind selectSysNfcBindById(Long id);
+    SysNfcBind selectSysNfcBindById(Long id);
 
     /**
      * 查询【请填写功能名称】列表
@@ -31,18 +31,22 @@ public interface SysNfcBindMapper extends BaseMapper<SysNfcBind> {
      * @param sysNfcBind 【请填写功能名称】
      * @return 【请填写功能名称】集合
      */
-     List<SysNfcBind> selectSysNfcBindList(SysNfcBind sysNfcBind);
+    List<SysNfcBind> selectSysNfcBindList(SysNfcBind sysNfcBind);
 
     /**
      * 自定义分页
+     *
      * @param page
      * @param info
      * @return
      */
     Page<SysNfcBind> selectNFCPage(Page<SysNfcBind> page, @Param("info") SysNfcBind info);
+
     SysNfcBind selectSysNfcBindByCode(String code);
+
     /**
      * 修改区域名称
+     *
      * @param sysNfcBind
      * @return
      */
@@ -50,17 +54,19 @@ public interface SysNfcBindMapper extends BaseMapper<SysNfcBind> {
 
     /**
      * 修改采集点名称
+     *
      * @param sysNfcBind
      * @return
      */
     int updateAreaCheckNameByCheckId(SysNfcBind sysNfcBind);
+
     /**
      * 新增【请填写功能名称】
      *
      * @param sysNfcBind 【请填写功能名称】
      * @return 结果
      */
-     int insertSysNfcBind(SysNfcBind sysNfcBind);
+    int insertSysNfcBind(SysNfcBind sysNfcBind);
 
     /**
      * 修改【请填写功能名称】
@@ -68,15 +74,17 @@ public interface SysNfcBindMapper extends BaseMapper<SysNfcBind> {
      * @param sysNfcBind 【请填写功能名称】
      * @return 结果
      */
-     int updateSysNfcBind(SysNfcBind sysNfcBind);
+    int updateSysNfcBind(SysNfcBind sysNfcBind);
+
     int deleteSysNfcBindByCode(String code);
+
     /**
      * 删除【请填写功能名称】
      *
      * @param id 【请填写功能名称】主键
      * @return 结果
      */
-     int deleteSysNfcBindById(Long id);
+    int deleteSysNfcBindById(Long id);
 
     /**
      * 批量删除【请填写功能名称】
@@ -84,5 +92,5 @@ public interface SysNfcBindMapper extends BaseMapper<SysNfcBind> {
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
-     int deleteSysNfcBindByIds(Long[] ids);
+    int deleteSysNfcBindByIds(Long[] ids);
 }

+ 4 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysNfcBindService.java

@@ -23,6 +23,7 @@ public interface ISysNfcBindService extends IService<SysNfcBind> {
     SysNfcBind selectSysNfcBindById(Long id);
 
     SysNfcBind selectSysNfcBindByCode(String code);
+
     /**
      * 查询【NFC管理】列表
      *
@@ -54,7 +55,9 @@ public interface ISysNfcBindService extends IService<SysNfcBind> {
      * @return 结果
      */
     int deleteSysNfcBindByIds(Long[] ids);
-int deleteSysNfcBindByCode(String code);
+
+    int deleteSysNfcBindByCode(String code);
+
     /**
      * 删除【NFC管理】信息
      *