fuliqi
2024-04-30 eea5bc9be7deb06106d6274abeb29ebe4b83af44
考核结果指标详情页面
9个文件已修改
20个文件已添加
1个文件已删除
3282 ■■■■■ 已修改文件
ycl-common/src/main/java/constant/CheckConstants.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-common/src/main/java/enumeration/general/CheckScoreType.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-common/src/main/java/pojo/ExcelExp.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-common/src/main/java/utils/poi/ExcelUtilManySheet.java 894 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/base/CheckIndex.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/dto/CheckScoreIndexDTO.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexCar.java 233 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexFace.java 198 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexVideo.java 354 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckScore.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/CheckResultController.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/CheckScoreController.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/CheckTemplateController.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexCarMapper.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexFaceMapper.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexVideoMapper.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/CheckScoreMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexCarService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexFaceService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexVideoService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/ICheckScoreService.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/ICheckTemplateService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexCarServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexFaceServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexVideoServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java 157 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckTemplateServiceImpl.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/CheckIndexCarMapper.xml 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/CheckIndexFaceMapper.xml 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-common/src/main/java/constant/CheckConstants.java
@@ -4,12 +4,12 @@
 * 考核常量
 */
public class CheckConstants {
    //车辆规则
    public static final Short Rule_Category_Car = 1;
    //人脸规则
    public static final Short Rule_Category_Face = 2;
    //视频规则
    public static final Short Rule_Category_Video = 0;
    public static final Short Rule_Category_Video = 1;
    //车辆规则
    public static final Short Rule_Category_Car = 2;
    //人脸规则
    public static final Short Rule_Category_Face = 3;
    public static final String Delete = "1";
ycl-common/src/main/java/enumeration/general/CheckScoreType.java
New file
@@ -0,0 +1,39 @@
package enumeration.general;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
public enum CheckScoreType {
    CHECK_SCORE_TYPE_VIDEO(1, "视频考核"),
    CHECK_SCORE_TYPE_CAR(2, "车辆考核"),
    CHECK_SCORE_TYPE_FACE(3, "人脸考核");
    @EnumValue
    private final Integer value;
    @JsonValue // 标明在转JSON时使用该字段
    private final String desc;
    CheckScoreType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }
    public Short getValue() {
        return Short.valueOf(value+"");
    }
    public String getDesc() {
        return desc;
    }
    // 根据value返回对应的枚举实例
    public static CheckScoreType fromValue(int value) {
        for (CheckScoreType type : CheckScoreType.values()) {
            if (type.getValue() == value) {
                return type;
            }
        }
        throw new IllegalArgumentException("没有枚举值: " + value);
    }
}
ycl-common/src/main/java/pojo/ExcelExp.java
New file
@@ -0,0 +1,48 @@
package pojo;
import java.util.List;
public class ExcelExp {
    private String fileName;// sheet的名称
    private String[] handers;// sheet里的标题
    private List dataset;// sheet里的数据集
    private Class clazz;
    public ExcelExp(String fileName, List dataset, Class clazz) {
        this.fileName = fileName;
        this.dataset = dataset;
        this.clazz = clazz;
    }
    public String getFileName() {
        return fileName;
    }
    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
    public String[] getHanders() {
        return handers;
    }
    public void setHanders(String[] handers) {
        this.handers = handers;
    }
    public List getDataset() {
        return dataset;
    }
    public void setDataset(List dataset) {
        this.dataset = dataset;
    }
    public Class getClazz() {
        return clazz;
    }
    public void setClazz(Class clazz) {
        this.clazz = clazz;
    }
}
ycl-common/src/main/java/utils/poi/ExcelUtilManySheet.java
New file
@@ -0,0 +1,894 @@
package utils.poi;
import annotation.Excel;
import annotation.Excels;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddressList;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
import org.apache.poi.xssf.usermodel.XSSFDataValidation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pojo.ExcelExp;
import utils.DateUtils;
import utils.StringUtils;
import utils.file.FileTypeUtils;
import utils.file.ImageUtils;
import utils.reflect.ReflectUtils;
import utils.text.Convert;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
 * Excel相关处理
 *
 * @author ruoyi
 */
public class ExcelUtilManySheet<T> {
    private static final Logger log = LoggerFactory.getLogger(ExcelUtil.class);
    /**
     * Excel sheet最大行数,默认65536
     */
    public static final int sheetSize = 65536;
    /**
     * 工作表名称
     */
    private String sheetName;
    /**
     * 导出类型(EXPORT:导出数据;IMPORT:导入模板)
     */
    private Excel.Type type;
    /**
     * 工作薄对象
     */
    private Workbook wb;
    /**
     * 工作表对象
     */
    private Sheet sheet;
    /**
     * 样式列表
     */
    private Map<String, CellStyle> styles;
    /**
     * 导入导出数据列表
     */
    private List<T> list;
    /**
     * 注解列表
     */
    private List<Object[]> fields;
    /**
     * 最大高度
     */
    private short maxHeight;
    /**
     * 统计列表
     */
    private Map<Integer, Double> statistics = new HashMap<Integer, Double>();
    /**
     * 数字格式
     */
    private static final DecimalFormat DOUBLE_FORMAT = new DecimalFormat("######0.00");
    /**
     * 实体对象
     */
    public Class<T> clazz;
    public List<ExcelExp> clazzlist;
    public ExcelUtilManySheet(List<ExcelExp> clazzlist) {
        this.clazzlist = clazzlist;
    }
    public void init(List<T> list, String sheetName, Excel.Type type) {
        if (list == null) {
            list = new ArrayList<T>();
        }
        this.list = list;
        this.sheetName = sheetName;
        this.type = type;
        createExcelField();
    }
    /**
     * 对excel表单默认第一个索引名转换成list
     *
     * @param is 输入流
     * @return 转换后集合
     */
    public List<T> importExcel(InputStream is) throws Exception {
        return importExcel(StringUtils.EMPTY, is);
    }
    /**
     * 对excel表单指定表格索引名转换成list
     *
     * @param sheetName 表格索引名
     * @param is        输入流
     * @return 转换后集合
     */
    public List<T> importExcel(String sheetName, InputStream is) throws Exception {
        this.type = Excel.Type.IMPORT;
        this.wb = WorkbookFactory.create(is);
        List<T> list = new ArrayList<T>();
        Sheet sheet = null;
        if (StringUtils.isNotEmpty(sheetName)) {
            // 如果指定sheet名,则取指定sheet中的内容.
            sheet = wb.getSheet(sheetName);
        } else {
            // 如果传入的sheet名不存在则默认指向第1个sheet.
            sheet = wb.getSheetAt(0);
        }
        if (sheet == null) {
            throw new IOException("文件sheet不存在");
        }
        int rows = sheet.getPhysicalNumberOfRows();
        if (rows > 0) {
            // 定义一个map用于存放excel列的序号和field.
            Map<String, Integer> cellMap = new HashMap<String, Integer>();
            // 获取表头
            Row heard = sheet.getRow(0);
            for (int i = 0; i < heard.getPhysicalNumberOfCells(); i++) {
                Cell cell = heard.getCell(i);
                if (StringUtils.isNotNull(cell)) {
                    String value = this.getCellValue(heard, i).toString();
                    cellMap.put(value, i);
                } else {
                    cellMap.put(null, i);
                }
            }
            // 有数据时才处理 得到类的所有field.
            Field[] allFields = clazz.getDeclaredFields();
            // 定义一个map用于存放列的序号和field.
            Map<Integer, Field> fieldsMap = new HashMap<Integer, Field>();
            for (int col = 0; col < allFields.length; col++) {
                Field field = allFields[col];
                Excel attr = field.getAnnotation(Excel.class);
                if (attr != null && (attr.type() == Excel.Type.ALL || attr.type() == type)) {
                    // 设置类的私有字段属性可访问.
                    field.setAccessible(true);
                    Integer column = cellMap.get(attr.name());
                    if (column != null) {
                        fieldsMap.put(column, field);
                    }
                }
            }
            for (int i = 1; i < rows; i++) {
                // 从第2行开始取数据,默认第一行是表头.
                Row row = sheet.getRow(i);
                T entity = null;
                for (Map.Entry<Integer, Field> entry : fieldsMap.entrySet()) {
                    Object val = this.getCellValue(row, entry.getKey());
                    // 如果不存在实例则新建.
                    entity = (entity == null ? clazz.newInstance() : entity);
                    // 从map中得到对应列的field.
                    Field field = fieldsMap.get(entry.getKey());
                    // 取得类型,并根据对象类型设置值.
                    Class<?> fieldType = field.getType();
                    if (String.class == fieldType) {
                        String s = Convert.toStr(val);
                        if (StringUtils.endsWith(s, ".0")) {
                            val = StringUtils.substringBefore(s, ".0");
                        } else {
                            String dateFormat = field.getAnnotation(Excel.class).dateFormat();
                            if (StringUtils.isNotEmpty(dateFormat)) {
                                val = DateUtils.parseDateToStr(dateFormat, (Date) val);
                            } else {
                                val = Convert.toStr(val);
                            }
                        }
                    } else if ((Integer.TYPE == fieldType || Integer.class == fieldType) && StringUtils.isNumeric(Convert.toStr(val))) {
                        val = Convert.toInt(val);
                    } else if (Long.TYPE == fieldType || Long.class == fieldType) {
                        val = Convert.toLong(val);
                    } else if (Double.TYPE == fieldType || Double.class == fieldType) {
                        val = Convert.toDouble(val);
                    } else if (Float.TYPE == fieldType || Float.class == fieldType) {
                        val = Convert.toFloat(val);
                    } else if (BigDecimal.class == fieldType) {
                        val = Convert.toBigDecimal(val);
                    } else if (Date.class == fieldType) {
                        if (val instanceof String) {
                            val = DateUtils.parseDate(val);
                        } else if (val instanceof Double) {
                            val = DateUtil.getJavaDate((Double) val);
                        }
                    } else if (Boolean.TYPE == fieldType || Boolean.class == fieldType) {
                        val = Convert.toBool(val, false);
                    }
                    if (StringUtils.isNotNull(fieldType)) {
                        Excel attr = field.getAnnotation(Excel.class);
                        String propertyName = field.getName();
                        if (StringUtils.isNotEmpty(attr.targetAttr())) {
                            propertyName = field.getName() + "." + attr.targetAttr();
                        } else if (StringUtils.isNotEmpty(attr.readConverterExp())) {
                            val = reverseByExp(Convert.toStr(val), attr.readConverterExp(), attr.separator());
                        }
                        ReflectUtils.invokeSetter(entity, propertyName, val);
                    }
                }
                list.add(entity);
            }
        }
        return list;
    }
    /**
     * 对list数据源将其里面的数据导入到excel表单
     *
     * @param response  返回数据
     * @param list      导出数据集合
     * @param sheetName 工作表的名称
     * @return 结果
     * @throws IOException
     */
    public void exportExcel(HttpServletResponse response, List<T> list, String sheetName) throws IOException {
        response.setContentType("application/vnd.ms-excel");
        response.setCharacterEncoding("utf-8");
        this.init(list, sheetName, Excel.Type.EXPORT);
        exportExcel(response.getOutputStream());
    }
    /**
     * 对list数据源将其里面的数据导入到excel表单
     *
     * @param response 返回数据
     * @param list     导出数据集合
     * @return 结果
     * @throws IOException
     */
    public void exportExcelManySheet(HttpServletResponse response, List<ExcelExp> list) throws IOException {
        response.setContentType("application/vnd.ms-excel");
        response.setCharacterEncoding("utf-8");
        try {
            createWorkbook();
            for (int index = 0; index <list.size(); index++) {
                this.clazz = list.get(index).getClazz();
                this.init(list.get(index).getDataset(), list.get(index).getFileName(), Excel.Type.EXPORT);
                // 取出一共有多少个sheet.
//                    double sheetNo = Math.ceil(list.size() / sheetSize);
                createSheetManySheet(index);
                // 产生一行
                Row row = sheet.createRow(0);
                int column = 0;
                // 写入各个字段的列头名称
                for (Object[] os : fields) {
                    Excel excel = (Excel) os[1];
                    this.createCell(excel, row, column++);
                }
                if (Excel.Type.EXPORT.equals(type)) {
                    fillExcelData(index, row);
                    addStatisticsRow();
                }
            }
            wb.write(response.getOutputStream());
        } catch (IOException e) {
            log.error("导出Excel异常{}", e.getMessage());
        } finally {
            if (wb != null) {
                try {
                    wb.close();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
            if (response.getOutputStream() != null) {
                try {
                    response.getOutputStream().close();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
        }
//        exportExcel(response.getOutputStream());
    }
    /**
     * 对list数据源将其里面的数据导入到excel表单
     *
     * @param sheetName 工作表的名称
     * @return 结果
     */
    public void importTemplateExcel(HttpServletResponse response, String sheetName) throws IOException {
        response.setContentType("application/vnd.ms-excel");
        response.setCharacterEncoding("utf-8");
        this.init(null, sheetName, Excel.Type.IMPORT);
        exportExcel(response.getOutputStream());
    }
    /**
     * 对list数据源将其里面的数据导入到excel表单
     *
     * @return 结果
     */
    public void exportExcel(OutputStream outputStream) {
        try {
            // 取出一共有多少个sheet.
            double sheetNo = Math.ceil(list.size() / sheetSize);
            for (int index = 0; index <= sheetNo; index++) {
                createSheet(sheetNo, index);
                // 产生一行
                Row row = sheet.createRow(0);
                int column = 0;
                // 写入各个字段的列头名称
                for (Object[] os : fields) {
                    Excel excel = (Excel) os[1];
                    this.createCell(excel, row, column++);
                }
                if (Excel.Type.EXPORT.equals(type)) {
                    fillExcelData(index, row);
                    addStatisticsRow();
                }
            }
            wb.write(outputStream);
        } catch (Exception e) {
            log.error("导出Excel异常{}", e.getMessage());
        } finally {
            if (wb != null) {
                try {
                    wb.close();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
            if (outputStream != null) {
                try {
                    outputStream.close();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
        }
    }
    /**
     * 填充excel数据
     *
     * @param index 序号
     * @param row   单元格行
     */
    public void fillExcelData(int index, Row row) {
//        int startNo = index * sheetSize;
//        int endNo = Math.min(startNo + sheetSize, list.size());
        for (int i = 0; i < list.size(); i++) {
            row = sheet.createRow(i + 1 );
            // 得到导出对象.
            T vo = (T) list.get(i);
            int column = 0;
            for (Object[] os : fields) {
                Field field = (Field) os[0];
                Excel excel = (Excel) os[1];
                // 设置实体类私有属性可访问
                field.setAccessible(true);
                this.addCell(excel, row, vo, field, column++);
            }
        }
    }
    /**
     * 创建表格样式
     *
     * @param wb 工作薄对象
     * @return 样式列表
     */
    private Map<String, CellStyle> createStyles(Workbook wb) {
        // 写入各条记录,每条记录对应excel表中的一行
        Map<String, CellStyle> styles = new HashMap<String, CellStyle>();
        CellStyle style = wb.createCellStyle();
        style.setAlignment(HorizontalAlignment.CENTER);
        style.setVerticalAlignment(VerticalAlignment.CENTER);
        style.setBorderRight(BorderStyle.THIN);
        style.setRightBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
        style.setBorderLeft(BorderStyle.THIN);
        style.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
        style.setBorderTop(BorderStyle.THIN);
        style.setTopBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
        style.setBorderBottom(BorderStyle.THIN);
        style.setBottomBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
        Font dataFont = wb.createFont();
        dataFont.setFontName("Arial");
        dataFont.setFontHeightInPoints((short) 10);
        style.setFont(dataFont);
        styles.put("data", style);
        style = wb.createCellStyle();
        style.cloneStyleFrom(styles.get("data"));
        style.setAlignment(HorizontalAlignment.CENTER);
        style.setVerticalAlignment(VerticalAlignment.CENTER);
        style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
        style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
        Font headerFont = wb.createFont();
        headerFont.setFontName("Arial");
        headerFont.setFontHeightInPoints((short) 10);
        headerFont.setBold(true);
        headerFont.setColor(IndexedColors.WHITE.getIndex());
        style.setFont(headerFont);
        styles.put("header", style);
        style = wb.createCellStyle();
        style.setAlignment(HorizontalAlignment.CENTER);
        style.setVerticalAlignment(VerticalAlignment.CENTER);
        Font totalFont = wb.createFont();
        totalFont.setFontName("Arial");
        totalFont.setFontHeightInPoints((short) 10);
        style.setFont(totalFont);
        styles.put("total", style);
        style = wb.createCellStyle();
        style.cloneStyleFrom(styles.get("data"));
        style.setAlignment(HorizontalAlignment.LEFT);
        styles.put("data1", style);
        style = wb.createCellStyle();
        style.cloneStyleFrom(styles.get("data"));
        style.setAlignment(HorizontalAlignment.CENTER);
        styles.put("data2", style);
        style = wb.createCellStyle();
        style.cloneStyleFrom(styles.get("data"));
        style.setAlignment(HorizontalAlignment.RIGHT);
        styles.put("data3", style);
        return styles;
    }
    /**
     * 创建单元格
     */
    public Cell createCell(Excel attr, Row row, int column) {
        // 创建列
        Cell cell = row.createCell(column);
        // 写入列信息
        cell.setCellValue(attr.name());
        setDataValidation(attr, row, column);
        cell.setCellStyle(styles.get("header"));
        return cell;
    }
    /**
     * 设置单元格信息
     *
     * @param value 单元格值
     * @param attr  注解相关
     * @param cell  单元格信息
     */
    public void setCellVo(Object value, Excel attr, Cell cell) {
        if (Excel.ColumnType.STRING == attr.cellType()) {
            cell.setCellValue(StringUtils.isNull(value) ? attr.defaultValue() : value + attr.suffix());
        } else if (Excel.ColumnType.NUMERIC == attr.cellType()) {
            cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value));
        } else if (Excel.ColumnType.IMAGE == attr.cellType()) {
            ClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, (short) cell.getColumnIndex(), cell.getRow().getRowNum(), (short) (cell.getColumnIndex() + 1),
                    cell.getRow().getRowNum() + 1);
            String imagePath = Convert.toStr(value);
            if (StringUtils.isNotEmpty(imagePath)) {
                byte[] data = ImageUtils.getImage(imagePath);
                getDrawingPatriarch(cell.getSheet()).createPicture(anchor,
                        cell.getSheet().getWorkbook().addPicture(data, getImageType(data)));
            }
        }
    }
    /**
     * 获取画布
     */
    public static Drawing<?> getDrawingPatriarch(Sheet sheet) {
        if (sheet.getDrawingPatriarch() == null) {
            sheet.createDrawingPatriarch();
        }
        return sheet.getDrawingPatriarch();
    }
    /**
     * 获取图片类型,设置图片插入类型
     */
    public int getImageType(byte[] value) {
        String type = FileTypeUtils.getFileExtendName(value);
        if ("JPG".equalsIgnoreCase(type)) {
            return Workbook.PICTURE_TYPE_JPEG;
        } else if ("PNG".equalsIgnoreCase(type)) {
            return Workbook.PICTURE_TYPE_PNG;
        }
        return Workbook.PICTURE_TYPE_JPEG;
    }
    /**
     * 创建表格样式
     */
    public void setDataValidation(Excel attr, Row row, int column) {
        if (attr.name().indexOf("注:") >= 0) {
            sheet.setColumnWidth(column, 6000);
        } else {
            // 设置列宽
            sheet.setColumnWidth(column, (int) ((attr.width() + 0.72) * 256));
        }
        // 如果设置了提示信息则鼠标放上去提示.
        if (StringUtils.isNotEmpty(attr.prompt())) {
            // 这里默认设了2-101列提示.
            setXSSFPrompt(sheet, "", attr.prompt(), 1, 100, column, column);
        }
        // 如果设置了combo属性则本列只能选择不能输入
        if (attr.combo().length > 0) {
            // 这里默认设了2-101列只能选择不能输入.
            setXSSFValidation(sheet, attr.combo(), 1, 100, column, column);
        }
    }
    /**
     * 添加单元格
     */
    public Cell addCell(Excel attr, Row row, T vo, Field field, int column) {
        Cell cell = null;
        try {
            // 设置行高
            row.setHeight(maxHeight);
            // 根据Excel中设置情况决定是否导出,有些情况需要保持为空,希望用户填写这一列.
            if (attr.isExport()) {
                // 创建cell
                cell = row.createCell(column);
                int align = attr.align().getCode();
                cell.setCellStyle(styles.get("data" + (align >= 1 && align <= 3 ? align : "")));
                // 用于读取对象中的属性
                Object value = getTargetValue(vo, field, attr);
                String dateFormat = attr.dateFormat();
                String readConverterExp = attr.readConverterExp();
                String separator = attr.separator();
                if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value)) {
                    cell.setCellValue(DateUtils.parseDateToStr(dateFormat, (Date) value));
                } else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value)) {
                    cell.setCellValue(convertByExp(Convert.toStr(value), readConverterExp, separator));
                } else if (value instanceof BigDecimal && -1 != attr.scale()) {
                    cell.setCellValue((((BigDecimal) value).setScale(attr.scale(), attr.roundingMode())).toString());
                } else {
                    // 设置列类型
                    setCellVo(value, attr, cell);
                }
                addStatisticsData(column, Convert.toStr(value), attr);
            }
        } catch (Exception e) {
            log.error("导出Excel失败{}", e);
        }
        return cell;
    }
    /**
     * 设置 POI XSSFSheet 单元格提示
     *
     * @param sheet         表单
     * @param promptTitle   提示标题
     * @param promptContent 提示内容
     * @param firstRow      开始行
     * @param endRow        结束行
     * @param firstCol      开始列
     * @param endCol        结束列
     */
    public void setXSSFPrompt(Sheet sheet, String promptTitle, String promptContent, int firstRow, int endRow,
                              int firstCol, int endCol) {
        DataValidationHelper helper = sheet.getDataValidationHelper();
        DataValidationConstraint constraint = helper.createCustomConstraint("DD1");
        CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol);
        DataValidation dataValidation = helper.createValidation(constraint, regions);
        dataValidation.createPromptBox(promptTitle, promptContent);
        dataValidation.setShowPromptBox(true);
        sheet.addValidationData(dataValidation);
    }
    /**
     * 设置某些列的值只能输入预制的数据,显示下拉框.
     *
     * @param sheet    要设置的sheet.
     * @param textlist 下拉框显示的内容
     * @param firstRow 开始行
     * @param endRow   结束行
     * @param firstCol 开始列
     * @param endCol   结束列
     * @return 设置好的sheet.
     */
    public void setXSSFValidation(Sheet sheet, String[] textlist, int firstRow, int endRow, int firstCol, int endCol) {
        DataValidationHelper helper = sheet.getDataValidationHelper();
        // 加载下拉列表内容
        DataValidationConstraint constraint = helper.createExplicitListConstraint(textlist);
        // 设置数据有效性加载在哪个单元格上,四个参数分别是:起始行、终止行、起始列、终止列
        CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol);
        // 数据有效性对象
        DataValidation dataValidation = helper.createValidation(constraint, regions);
        // 处理Excel兼容性问题
        if (dataValidation instanceof XSSFDataValidation) {
            dataValidation.setSuppressDropDownArrow(true);
            dataValidation.setShowErrorBox(true);
        } else {
            dataValidation.setSuppressDropDownArrow(false);
        }
        sheet.addValidationData(dataValidation);
    }
    /**
     * 解析导出值 0=男,1=女,2=未知
     *
     * @param propertyValue 参数值
     * @param converterExp  翻译注解
     * @param separator     分隔符
     * @return 解析后值
     */
    public static String convertByExp(String propertyValue, String converterExp, String separator) {
        StringBuilder propertyString = new StringBuilder();
        String[] convertSource = converterExp.split(",");
        for (String item : convertSource) {
            String[] itemArray = item.split("=");
            if (StringUtils.containsAny(separator, propertyValue)) {
                for (String value : propertyValue.split(separator)) {
                    if (itemArray[0].equals(value)) {
                        propertyString.append(itemArray[1] + separator);
                        break;
                    }
                }
            } else {
                if (itemArray[0].equals(propertyValue)) {
                    return itemArray[1];
                }
            }
        }
        return StringUtils.stripEnd(propertyString.toString(), separator);
    }
    /**
     * 反向解析值 男=0,女=1,未知=2
     *
     * @param propertyValue 参数值
     * @param converterExp  翻译注解
     * @param separator     分隔符
     * @return 解析后值
     */
    public static String reverseByExp(String propertyValue, String converterExp, String separator) {
        StringBuilder propertyString = new StringBuilder();
        String[] convertSource = converterExp.split(",");
        for (String item : convertSource) {
            String[] itemArray = item.split("=");
            if (StringUtils.containsAny(separator, propertyValue)) {
                for (String value : propertyValue.split(separator)) {
                    if (itemArray[1].equals(value)) {
                        propertyString.append(itemArray[0] + separator);
                        break;
                    }
                }
            } else {
                if (itemArray[1].equals(propertyValue)) {
                    return itemArray[0];
                }
            }
        }
        return StringUtils.stripEnd(propertyString.toString(), separator);
    }
    /**
     * 合计统计信息
     */
    private void addStatisticsData(Integer index, String text, Excel entity) {
        if (entity != null && entity.isStatistics()) {
            Double temp = 0D;
            if (!statistics.containsKey(index)) {
                statistics.put(index, temp);
            }
            try {
                temp = Double.valueOf(text);
            } catch (NumberFormatException e) {
            }
            statistics.put(index, statistics.get(index) + temp);
        }
    }
    /**
     * 创建统计行
     */
    public void addStatisticsRow() {
        if (statistics.size() > 0) {
            Cell cell = null;
            Row row = sheet.createRow(sheet.getLastRowNum() + 1);
            Set<Integer> keys = statistics.keySet();
            cell = row.createCell(0);
            cell.setCellStyle(styles.get("total"));
            cell.setCellValue("合计");
            for (Integer key : keys) {
                cell = row.createCell(key);
                cell.setCellStyle(styles.get("total"));
                cell.setCellValue(DOUBLE_FORMAT.format(statistics.get(key)));
            }
            statistics.clear();
        }
    }
    /**
     * 获取bean中的属性值
     *
     * @param vo    实体对象
     * @param field 字段
     * @param excel 注解
     * @return 最终的属性值
     * @throws Exception
     */
    private Object getTargetValue(T vo, Field field, Excel excel) throws Exception {
        Object o = field.get(vo);
        if (StringUtils.isNotEmpty(excel.targetAttr())) {
            String target = excel.targetAttr();
            if (target.indexOf(".") > -1) {
                String[] targets = target.split("[.]");
                for (String name : targets) {
                    o = getValue(o, name);
                }
            } else {
                o = getValue(o, target);
            }
        }
        return o;
    }
    /**
     * 以类的属性的get方法方法形式获取值
     *
     * @param o
     * @param name
     * @return value
     * @throws Exception
     */
    private Object getValue(Object o, String name) throws Exception {
        if (StringUtils.isNotNull(o) && StringUtils.isNotEmpty(name)) {
            Class<?> clazz = o.getClass();
            Field field = clazz.getDeclaredField(name);
            field.setAccessible(true);
            o = field.get(o);
        }
        return o;
    }
    /**
     * 得到所有定义字段
     */
    private void createExcelField() {
        this.fields = new ArrayList<Object[]>();
        List<Field> tempFields = new ArrayList<>();
        tempFields.addAll(Arrays.asList(clazz.getSuperclass().getDeclaredFields()));
        tempFields.addAll(Arrays.asList(clazz.getDeclaredFields()));
        for (Field field : tempFields) {
            // 单注解
            if (field.isAnnotationPresent(Excel.class)) {
                putToField(field, field.getAnnotation(Excel.class));
            }
            // 多注解
            if (field.isAnnotationPresent(Excels.class)) {
                Excels attrs = field.getAnnotation(Excels.class);
                Excel[] excels = attrs.value();
                for (Excel excel : excels) {
                    putToField(field, excel);
                }
            }
        }
        this.fields = this.fields.stream().sorted(Comparator.comparing(objects -> ((Excel) objects[1]).sort())).collect(Collectors.toList());
        this.maxHeight = getRowHeight();
    }
    /**
     * 根据注解获取最大行高
     */
    public short getRowHeight() {
        double maxHeight = 0;
        for (Object[] os : this.fields) {
            Excel excel = (Excel) os[1];
            maxHeight = maxHeight > excel.height() ? maxHeight : excel.height();
        }
        return (short) (maxHeight * 20);
    }
    /**
     * 放到字段集合中
     */
    private void putToField(Field field, Excel attr) {
        if (attr != null && (attr.type() == Excel.Type.ALL || attr.type() == type)) {
            this.fields.add(new Object[]{field, attr});
        }
    }
    /**
     * 创建一个工作簿
     */
    public void createWorkbook() {
        this.wb = new SXSSFWorkbook(500);
    }
    /**
     * 创建工作表
     *
     * @param sheetNo sheet数量
     * @param index   序号
     */
    public void createSheet(double sheetNo, int index) {
        this.sheet = wb.createSheet();
        this.styles = createStyles(wb);
        // 设置工作表的名称.
        if (sheetNo == 0) {
            wb.setSheetName(index, sheetName);
        } else {
            wb.setSheetName(index, sheetName + index);
        }
    }
    /**
     * 创建工作表
     *
     * @param index   序号
     */
    public void createSheetManySheet( int index) {
        this.sheet = wb.createSheet();
        this.styles = createStyles(wb);
        wb.setSheetName(index, sheetName);
    }
    /**
     * 获取单元格值
     *
     * @param row    获取的行
     * @param column 获取单元格列号
     * @return 单元格值
     */
    public Object getCellValue(Row row, int column) {
        if (row == null) {
            return row;
        }
        Object val = "";
        try {
            Cell cell = row.getCell(column);
            if (StringUtils.isNotNull(cell)) {
                if (cell.getCellType() == CellType.NUMERIC || cell.getCellType() == CellType.FORMULA) {
                    val = cell.getNumericCellValue();
                    if (DateUtil.isCellDateFormatted(cell)) {
                        val = DateUtil.getJavaDate((Double) val); // POI Excel 日期格式转换
                    } else {
                        if ((Double) val % 1 != 0) {
                            val = new BigDecimal(val.toString());
                        } else {
                            val = new DecimalFormat("0").format(val);
                        }
                    }
                } else if (cell.getCellType() == CellType.STRING) {
                    val = cell.getStringCellValue();
                } else if (cell.getCellType() == CellType.BOOLEAN) {
                    val = cell.getBooleanCellValue();
                } else if (cell.getCellType() == CellType.ERROR) {
                    val = cell.getErrorCellValue();
                }
            }
        } catch (Exception e) {
            return val;
        }
        return val;
    }
}
ycl-pojo/src/main/java/com/ycl/platform/base/CheckIndex.java
New file
@@ -0,0 +1,72 @@
package com.ycl.platform.base;
import annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
public abstract class CheckIndex {
    public Long id;
    //查询条件,日期
    public String date;
    @Excel(name = "日期",dateFormat = "yyyy-MM-dd")
    public Date createTime;
    public Long deptId;
    @Excel(name = "区县")
    public String deptName;
    /** 考核标签(省厅/市局) */
    @Excel(name = "考核标签", dictType = "platform_examine_tag")
    public Long examineTag;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getDate() {
        return date;
    }
    public void setDate(String date) {
        this.date = date;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Long getDeptId() {
        return deptId;
    }
    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }
    public String getDeptName() {
        return deptName;
    }
    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }
    public Long getExamineTag() {
        return examineTag;
    }
    public void setExamineTag(Long examineTag) {
        this.examineTag = examineTag;
    }
}
ycl-pojo/src/main/java/com/ycl/platform/domain/dto/CheckScoreIndexDTO.java
New file
@@ -0,0 +1,9 @@
package com.ycl.platform.domain.dto;
import lombok.Data;
@Data
public class CheckScoreIndexDTO {
    private Long id;
    private String date;
}
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexCar.java
New file
@@ -0,0 +1,233 @@
package com.ycl.platform.domain.entity;
import annotation.Excel;
import com.ycl.platform.base.CheckIndex;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 车辆指标概率数据对象 t_check_index_car
 *
 * @author ruoyi
 * @date 2024-04-29
 */
public class CheckIndexCar extends CheckIndex
{
    private static final long serialVersionUID = 1L;
    /** 视图库对接稳定性 */
    @Excel(name = "视图库对接稳定性")
    private BigDecimal viewConnectStability;
    /** 点位在线率 */
    @Excel(name = "点位在线率")
    private BigDecimal siteOnline;
    /** 联网卡口设备目录一致率 */
    @Excel(name = "联网卡口设备目录一致率",width = 25)
    private BigDecimal deviceDirectoryConsistent;
    /** 车辆卡口信息采集准确率 */
    @Excel(name = "车辆卡口信息采集准确率",width = 25)
    private BigDecimal vehicleInformationCollectionAccuracy;
    /** 车辆卡口设备抓拍数据完整性 */
    @Excel(name = "车辆卡口设备抓拍数据完整性",width = 25)
    private BigDecimal vehicleCaptureIntegrity;
    /** 车辆卡口设备抓拍数据准确性 */
    @Excel(name = "车辆卡口设备抓拍数据准确性",width = 25)
    private BigDecimal vehicleCaptureAccuracy;
    /** 车辆卡口设备时钟准确性 */
    @Excel(name = "车辆卡口设备时钟准确性",width = 25)
    private BigDecimal vehicleTimingAccuracy;
    /** 车辆卡口设备抓拍数据上传及时性 */
    @Excel(name = "车辆卡口设备抓拍数据上传及时性",width = 25)
    private BigDecimal vehicleUploadTimeliness;
    /** 车辆卡口设备url可用性 */
    @Excel(name = "车辆卡口设备url可用性",width = 25)
    private BigDecimal vehicleUrlAvailability;
    /** 车辆卡口设备抓拍数据大图可用性 */
    @Excel(name = "车辆卡口设备抓拍数据大图可用性",width = 25)
    private BigDecimal vehiclePictureAvailability;
    @Override
    public Long getId() {
        return super.getId();
    }
    @Override
    public void setId(Long id) {
        super.setId(id);
    }
    @Override
    public String getDate() {
        return super.getDate();
    }
    @Override
    public void setDate(String date) {
        super.setDate(date);
    }
    @Override
    public Date getCreateTime() {
        return super.getCreateTime();
    }
    @Override
    public void setCreateTime(Date createTime) {
        super.setCreateTime(createTime);
    }
    @Override
    public Long getDeptId() {
        return super.getDeptId();
    }
    @Override
    public void setDeptId(Long deptId) {
        super.setDeptId(deptId);
    }
    @Override
    public String getDeptName() {
        return super.getDeptName();
    }
    @Override
    public void setDeptName(String deptName) {
        super.setDeptName(deptName);
    }
    @Override
    public Long getExamineTag() {
        return super.getExamineTag();
    }
    @Override
    public void setExamineTag(Long examineTag) {
        super.setExamineTag(examineTag);
    }
    public void setViewConnectStability(BigDecimal viewConnectStability)
    {
        this.viewConnectStability = viewConnectStability;
    }
    public BigDecimal getViewConnectStability()
    {
        return viewConnectStability;
    }
    public void setSiteOnline(BigDecimal siteOnline)
    {
        this.siteOnline = siteOnline;
    }
    public BigDecimal getSiteOnline()
    {
        return siteOnline;
    }
    public void setDeviceDirectoryConsistent(BigDecimal deviceDirectoryConsistent)
    {
        this.deviceDirectoryConsistent = deviceDirectoryConsistent;
    }
    public BigDecimal getDeviceDirectoryConsistent()
    {
        return deviceDirectoryConsistent;
    }
    public void setVehicleInformationCollectionAccuracy(BigDecimal vehicleInformationCollectionAccuracy)
    {
        this.vehicleInformationCollectionAccuracy = vehicleInformationCollectionAccuracy;
    }
    public BigDecimal getVehicleInformationCollectionAccuracy()
    {
        return vehicleInformationCollectionAccuracy;
    }
    public void setVehicleCaptureIntegrity(BigDecimal vehicleCaptureIntegrity)
    {
        this.vehicleCaptureIntegrity = vehicleCaptureIntegrity;
    }
    public BigDecimal getVehicleCaptureIntegrity()
    {
        return vehicleCaptureIntegrity;
    }
    public void setVehicleCaptureAccuracy(BigDecimal vehicleCaptureAccuracy)
    {
        this.vehicleCaptureAccuracy = vehicleCaptureAccuracy;
    }
    public BigDecimal getVehicleCaptureAccuracy()
    {
        return vehicleCaptureAccuracy;
    }
    public void setVehicleTimingAccuracy(BigDecimal vehicleTimingAccuracy)
    {
        this.vehicleTimingAccuracy = vehicleTimingAccuracy;
    }
    public BigDecimal getVehicleTimingAccuracy()
    {
        return vehicleTimingAccuracy;
    }
    public void setVehicleUploadTimeliness(BigDecimal vehicleUploadTimeliness)
    {
        this.vehicleUploadTimeliness = vehicleUploadTimeliness;
    }
    public BigDecimal getVehicleUploadTimeliness()
    {
        return vehicleUploadTimeliness;
    }
    public void setVehicleUrlAvailability(BigDecimal vehicleUrlAvailability)
    {
        this.vehicleUrlAvailability = vehicleUrlAvailability;
    }
    public BigDecimal getVehicleUrlAvailability()
    {
        return vehicleUrlAvailability;
    }
    public void setVehiclePictureAvailability(BigDecimal vehiclePictureAvailability)
    {
        this.vehiclePictureAvailability = vehiclePictureAvailability;
    }
    public BigDecimal getVehiclePictureAvailability()
    {
        return vehiclePictureAvailability;
    }
    @Override
    public String toString() {
        return "CheckIndexCar{" +
                "id=" + id +
                ", date='" + date + '\'' +
                ", createTime=" + createTime +
                ", deptId=" + deptId +
                ", deptName='" + deptName + '\'' +
                ", examineTag=" + examineTag +
                ", viewConnectStability=" + viewConnectStability +
                ", siteOnline=" + siteOnline +
                ", deviceDirectoryConsistent=" + deviceDirectoryConsistent +
                ", vehicleInformationCollectionAccuracy=" + vehicleInformationCollectionAccuracy +
                ", vehicleCaptureIntegrity=" + vehicleCaptureIntegrity +
                ", vehicleCaptureAccuracy=" + vehicleCaptureAccuracy +
                ", vehicleTimingAccuracy=" + vehicleTimingAccuracy +
                ", vehicleUploadTimeliness=" + vehicleUploadTimeliness +
                ", vehicleUrlAvailability=" + vehicleUrlAvailability +
                ", vehiclePictureAvailability=" + vehiclePictureAvailability +
                '}';
    }
}
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexFace.java
New file
@@ -0,0 +1,198 @@
package com.ycl.platform.domain.entity;
import annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ycl.platform.base.CheckIndex;
import com.ycl.system.entity.BaseEntity;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 人脸指标概率数据对象 t_check_index_face
 *
 * @author ruoyi
 * @date 2024-04-29
 */
public class CheckIndexFace extends CheckIndex
{
    private static final long serialVersionUID = 1L;
    /** 视图库对接稳定性 */
    @Excel(name = "视图库对接稳定性")
    private BigDecimal viewConnectStability;
    /** 点位在线率 */
    @Excel(name = "点位在线率")
    private BigDecimal siteOnline;
    /**  设备目录一致率 */
    @Excel(name = " 设备目录一致率")
    private BigDecimal deviceDirectoryConsistent;
    /** 人脸卡口信息采集准确率 */
    @Excel(name = "人脸卡口信息采集准确率",width = 25)
    private BigDecimal faceInformationCollectionAccuracy;
    /** 设备抓拍图片合格性 */
    @Excel(name = "设备抓拍图片合格性")
    private BigDecimal facePictureQualification;
    /** 设备抓拍图片时钟准确性 */
    @Excel(name = "设备抓拍图片时钟准确性",width = 25)
    private BigDecimal faceTimingAccuracy;
    /** 抓拍人脸数据上传及时性 */
    @Excel(name = "抓拍人脸数据上传及时性",width = 25)
    private BigDecimal faceUploadTimeliness;
    /** 人脸卡口设备抓拍数据大图可用性 */
    @Excel(name = "人脸卡口设备抓拍数据大图可用性",width = 25)
    private BigDecimal facePictureAvailability;
    public BigDecimal getViewConnectStability() {
        return viewConnectStability;
    }
    public void setViewConnectStability(BigDecimal viewConnectStability) {
        this.viewConnectStability = viewConnectStability;
    }
    public BigDecimal getSiteOnline() {
        return siteOnline;
    }
    public void setSiteOnline(BigDecimal siteOnline) {
        this.siteOnline = siteOnline;
    }
    public BigDecimal getDeviceDirectoryConsistent() {
        return deviceDirectoryConsistent;
    }
    public void setDeviceDirectoryConsistent(BigDecimal deviceDirectoryConsistent) {
        this.deviceDirectoryConsistent = deviceDirectoryConsistent;
    }
    public BigDecimal getFaceInformationCollectionAccuracy() {
        return faceInformationCollectionAccuracy;
    }
    public void setFaceInformationCollectionAccuracy(BigDecimal faceInformationCollectionAccuracy) {
        this.faceInformationCollectionAccuracy = faceInformationCollectionAccuracy;
    }
    public BigDecimal getFacePictureQualification() {
        return facePictureQualification;
    }
    public void setFacePictureQualification(BigDecimal facePictureQualification) {
        this.facePictureQualification = facePictureQualification;
    }
    public BigDecimal getFaceTimingAccuracy() {
        return faceTimingAccuracy;
    }
    public void setFaceTimingAccuracy(BigDecimal faceTimingAccuracy) {
        this.faceTimingAccuracy = faceTimingAccuracy;
    }
    public BigDecimal getFaceUploadTimeliness() {
        return faceUploadTimeliness;
    }
    public void setFaceUploadTimeliness(BigDecimal faceUploadTimeliness) {
        this.faceUploadTimeliness = faceUploadTimeliness;
    }
    public BigDecimal getFacePictureAvailability() {
        return facePictureAvailability;
    }
    public void setFacePictureAvailability(BigDecimal facePictureAvailability) {
        this.facePictureAvailability = facePictureAvailability;
    }
    @Override
    public Long getId() {
        return super.getId();
    }
    @Override
    public void setId(Long id) {
        super.setId(id);
    }
    @Override
    public String getDate() {
        return super.getDate();
    }
    @Override
    public void setDate(String date) {
        super.setDate(date);
    }
    @Override
    public Date getCreateTime() {
        return super.getCreateTime();
    }
    @Override
    public void setCreateTime(Date createTime) {
        super.setCreateTime(createTime);
    }
    @Override
    public Long getDeptId() {
        return super.getDeptId();
    }
    @Override
    public void setDeptId(Long deptId) {
        super.setDeptId(deptId);
    }
    @Override
    public String getDeptName() {
        return super.getDeptName();
    }
    @Override
    public void setDeptName(String deptName) {
        super.setDeptName(deptName);
    }
    @Override
    public Long getExamineTag() {
        return super.getExamineTag();
    }
    @Override
    public void setExamineTag(Long examineTag) {
        super.setExamineTag(examineTag);
    }
    @Override
    public String toString() {
        return "CheckIndexFace{" +
                "id=" + id +
                ", date='" + date + '\'' +
                ", createTime=" + createTime +
                ", deptId=" + deptId +
                ", deptName='" + deptName + '\'' +
                ", examineTag=" + examineTag +
                ", viewConnectStability=" + viewConnectStability +
                ", siteOnline=" + siteOnline +
                ", deviceDirectoryConsistent=" + deviceDirectoryConsistent +
                ", faceInformationCollectionAccuracy=" + faceInformationCollectionAccuracy +
                ", facePictureQualification=" + facePictureQualification +
                ", faceTimingAccuracy=" + faceTimingAccuracy +
                ", faceUploadTimeliness=" + faceUploadTimeliness +
                ", facePictureAvailability=" + facePictureAvailability +
                '}';
    }
}
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexVideo.java
New file
@@ -0,0 +1,354 @@
package com.ycl.platform.domain.entity;
import annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ycl.platform.base.CheckIndex;
import com.ycl.system.entity.BaseEntity;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 视频指标概率数据对象 t_check_index_video
 *
 * @author ruoyi
 * @date 2024-04-29
 */
public class CheckIndexVideo extends CheckIndex
{
    private static final long serialVersionUID = 1L;
    /** 平台在线率 */
    @Excel(name = "平台在线率")
    private BigDecimal platformOnline;
    /** 一机一档合格率 */
    @Excel(name = "一机一档合格率")
    private BigDecimal monitorQualification;
    /** 档案考核比 */
    @Excel(name = "一机一档注册率")
    private BigDecimal monitorRegistration;
    /** 档案考核比 */
    @Excel(name = "档案考核比")
    private BigDecimal archivesRate;
    /** 点位在线率 */
    @Excel(name = "点位在线率")
    private BigDecimal siteOnline;
    /** 录象可用率 */
    @Excel(name = "录象可用率")
    private BigDecimal videoAvailable;
    /** 标注正确率 */
    @Excel(name = "标注正确率")
    private BigDecimal annotationAccuracy;
    /** 校时准确率 */
    @Excel(name = "校时准确率")
    private BigDecimal timingAccuracy;
    /** 重点点位在线率 */
    @Excel(name = "重点点位在线率")
    private BigDecimal keySiteOnline;
    /** 重点点位录象可用率 */
    @Excel(name = "重点点位录象可用率",width = 25)
    private BigDecimal keyVideoAvailable;
    /** 重点点位标注正确率 */
    @Excel(name = "重点点位标注正确率",width = 25)
    private BigDecimal keyAnnotationAccuracy;
    /** 重点点位按时正确率 */
    @Excel(name = "重点点位按时正确率",width = 25)
    private BigDecimal keyTimingAccuracy;
    /** 重点指挥图像公安部巡检结果 */
    @Excel(name = "重点指挥图像公安部巡检结果",width = 25)
    private BigDecimal keyCommandImageInspection;
    /** 重点指挥图像目录树 */
    @Excel(name = "重点指挥图像目录树",width = 25)
    private BigDecimal keyCommandImageDirectoryTree;
    /** 在线检查平台部署及运行率 */
    @Excel(name = "在线检查平台部署及运行率",width = 25)
    private BigDecimal onlineInspectionPlatform;
    /** 视频传输网资产准确率 */
    @Excel(name = "视频传输网资产准确率",width = 25)
    private BigDecimal videoTransmissionAssetsAccuracy;
    /** 视频传输网资产弱口令得分比率 */
    @Excel(name = "视频传输网资产弱口令得分比率",width = 25)
    private BigDecimal videoTransmissionAssetsWeakPasswordScore;
    /** 视频传输网危险资产得分比重 */
    @Excel(name = "视频传输网危险资产得分比重",width = 25)
    private BigDecimal videoTransmissionDangerousAssetsScore;
    /** 视频传输网边界完整性检测扣分项 */
    @Excel(name = "视频传输网边界完整性检测扣分项",width = 25)
    private BigDecimal videoTransmissionBoundaryIntegrityDetection;
    /** 月运行率 */
    @Excel(name = "月运行率")
    private BigDecimal operatingRate;
    public BigDecimal getPlatformOnline() {
        return platformOnline;
    }
    public void setPlatformOnline(BigDecimal platformOnline) {
        this.platformOnline = platformOnline;
    }
    public BigDecimal getMonitorQualification() {
        return monitorQualification;
    }
    public void setMonitorQualification(BigDecimal monitorQualification) {
        this.monitorQualification = monitorQualification;
    }
    public BigDecimal getMonitorRegistration() {
        return monitorRegistration;
    }
    public void setMonitorRegistration(BigDecimal monitorRegistration) {
        this.monitorRegistration = monitorRegistration;
    }
    public BigDecimal getArchivesRate() {
        return archivesRate;
    }
    public void setArchivesRate(BigDecimal archivesRate) {
        this.archivesRate = archivesRate;
    }
    public BigDecimal getSiteOnline() {
        return siteOnline;
    }
    public void setSiteOnline(BigDecimal siteOnline) {
        this.siteOnline = siteOnline;
    }
    public BigDecimal getVideoAvailable() {
        return videoAvailable;
    }
    public void setVideoAvailable(BigDecimal videoAvailable) {
        this.videoAvailable = videoAvailable;
    }
    public BigDecimal getAnnotationAccuracy() {
        return annotationAccuracy;
    }
    public void setAnnotationAccuracy(BigDecimal annotationAccuracy) {
        this.annotationAccuracy = annotationAccuracy;
    }
    public BigDecimal getTimingAccuracy() {
        return timingAccuracy;
    }
    public void setTimingAccuracy(BigDecimal timingAccuracy) {
        this.timingAccuracy = timingAccuracy;
    }
    public BigDecimal getKeySiteOnline() {
        return keySiteOnline;
    }
    public void setKeySiteOnline(BigDecimal keySiteOnline) {
        this.keySiteOnline = keySiteOnline;
    }
    public BigDecimal getKeyVideoAvailable() {
        return keyVideoAvailable;
    }
    public void setKeyVideoAvailable(BigDecimal keyVideoAvailable) {
        this.keyVideoAvailable = keyVideoAvailable;
    }
    public BigDecimal getKeyAnnotationAccuracy() {
        return keyAnnotationAccuracy;
    }
    public void setKeyAnnotationAccuracy(BigDecimal keyAnnotationAccuracy) {
        this.keyAnnotationAccuracy = keyAnnotationAccuracy;
    }
    public BigDecimal getKeyTimingAccuracy() {
        return keyTimingAccuracy;
    }
    public void setKeyTimingAccuracy(BigDecimal keyTimingAccuracy) {
        this.keyTimingAccuracy = keyTimingAccuracy;
    }
    public BigDecimal getKeyCommandImageInspection() {
        return keyCommandImageInspection;
    }
    public void setKeyCommandImageInspection(BigDecimal keyCommandImageInspection) {
        this.keyCommandImageInspection = keyCommandImageInspection;
    }
    public BigDecimal getKeyCommandImageDirectoryTree() {
        return keyCommandImageDirectoryTree;
    }
    public void setKeyCommandImageDirectoryTree(BigDecimal keyCommandImageDirectoryTree) {
        this.keyCommandImageDirectoryTree = keyCommandImageDirectoryTree;
    }
    public BigDecimal getOnlineInspectionPlatform() {
        return onlineInspectionPlatform;
    }
    public void setOnlineInspectionPlatform(BigDecimal onlineInspectionPlatform) {
        this.onlineInspectionPlatform = onlineInspectionPlatform;
    }
    public BigDecimal getVideoTransmissionAssetsAccuracy() {
        return videoTransmissionAssetsAccuracy;
    }
    public void setVideoTransmissionAssetsAccuracy(BigDecimal videoTransmissionAssetsAccuracy) {
        this.videoTransmissionAssetsAccuracy = videoTransmissionAssetsAccuracy;
    }
    public BigDecimal getVideoTransmissionAssetsWeakPasswordScore() {
        return videoTransmissionAssetsWeakPasswordScore;
    }
    public void setVideoTransmissionAssetsWeakPasswordScore(BigDecimal videoTransmissionAssetsWeakPasswordScore) {
        this.videoTransmissionAssetsWeakPasswordScore = videoTransmissionAssetsWeakPasswordScore;
    }
    public BigDecimal getVideoTransmissionDangerousAssetsScore() {
        return videoTransmissionDangerousAssetsScore;
    }
    public void setVideoTransmissionDangerousAssetsScore(BigDecimal videoTransmissionDangerousAssetsScore) {
        this.videoTransmissionDangerousAssetsScore = videoTransmissionDangerousAssetsScore;
    }
    public BigDecimal getVideoTransmissionBoundaryIntegrityDetection() {
        return videoTransmissionBoundaryIntegrityDetection;
    }
    public void setVideoTransmissionBoundaryIntegrityDetection(BigDecimal videoTransmissionBoundaryIntegrityDetection) {
        this.videoTransmissionBoundaryIntegrityDetection = videoTransmissionBoundaryIntegrityDetection;
    }
    public BigDecimal getOperatingRate() {
        return operatingRate;
    }
    public void setOperatingRate(BigDecimal operatingRate) {
        this.operatingRate = operatingRate;
    }
    @Override
    public Long getId() {
        return super.getId();
    }
    @Override
    public void setId(Long id) {
        super.setId(id);
    }
    @Override
    public String getDate() {
        return super.getDate();
    }
    @Override
    public void setDate(String date) {
        super.setDate(date);
    }
    @Override
    public Date getCreateTime() {
        return super.getCreateTime();
    }
    @Override
    public void setCreateTime(Date createTime) {
        super.setCreateTime(createTime);
    }
    @Override
    public Long getDeptId() {
        return super.getDeptId();
    }
    @Override
    public void setDeptId(Long deptId) {
        super.setDeptId(deptId);
    }
    @Override
    public String getDeptName() {
        return super.getDeptName();
    }
    @Override
    public void setDeptName(String deptName) {
        super.setDeptName(deptName);
    }
    @Override
    public Long getExamineTag() {
        return super.getExamineTag();
    }
    @Override
    public void setExamineTag(Long examineTag) {
        super.setExamineTag(examineTag);
    }
    @Override
    public String toString() {
        return "CheckIndexVideo{" +
                "id=" + id +
                ", date='" + date + '\'' +
                ", createTime=" + createTime +
                ", deptId=" + deptId +
                ", deptName='" + deptName + '\'' +
                ", examineTag=" + examineTag +
                ", platformOnline=" + platformOnline +
                ", monitorQualification=" + monitorQualification +
                ", monitorRegistration=" + monitorRegistration +
                ", archivesRate=" + archivesRate +
                ", siteOnline=" + siteOnline +
                ", videoAvailable=" + videoAvailable +
                ", annotationAccuracy=" + annotationAccuracy +
                ", timingAccuracy=" + timingAccuracy +
                ", keySiteOnline=" + keySiteOnline +
                ", keyVideoAvailable=" + keyVideoAvailable +
                ", keyAnnotationAccuracy=" + keyAnnotationAccuracy +
                ", keyTimingAccuracy=" + keyTimingAccuracy +
                ", keyCommandImageInspection=" + keyCommandImageInspection +
                ", keyCommandImageDirectoryTree=" + keyCommandImageDirectoryTree +
                ", onlineInspectionPlatform=" + onlineInspectionPlatform +
                ", videoTransmissionAssetsAccuracy=" + videoTransmissionAssetsAccuracy +
                ", videoTransmissionAssetsWeakPasswordScore=" + videoTransmissionAssetsWeakPasswordScore +
                ", videoTransmissionDangerousAssetsScore=" + videoTransmissionDangerousAssetsScore +
                ", videoTransmissionBoundaryIntegrityDetection=" + videoTransmissionBoundaryIntegrityDetection +
                ", operatingRate=" + operatingRate +
                '}';
    }
}
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckScore.java
@@ -1,6 +1,8 @@
package com.ycl.platform.domain.entity;
import annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ycl.system.entity.BaseEntity;
import lombok.Data;
@@ -18,11 +20,13 @@
 * @date 2024-04-22
 */
@Data
@TableName("t_check_score")
public class CheckScore
{
    private static final long serialVersionUID = 1L;
    /**  */
    private Long id;
    /** 分值 */
@@ -43,7 +47,7 @@
    /** 考核类型(车辆/人脸/视频) */
    @Excel(name = "考核类型(车辆/人脸/视频)")
    private Integer examineCategory;
    private Short examineCategory;
    /** 修改时间 */
    @Excel(name = "修改时间")
    private Date updateTime;
@@ -60,5 +64,6 @@
    private String publish;
    //折线图日期参数
    @TableField(exist = false)
    private String date;
}
ycl-server/src/main/java/com/ycl/platform/controller/CheckResultController.java
File was deleted
ycl-server/src/main/java/com/ycl/platform/controller/CheckScoreController.java
@@ -2,16 +2,20 @@
import annotation.Log;
import com.ycl.platform.domain.dto.CheckScoreDTO;
import com.ycl.platform.domain.dto.CheckScoreIndexDTO;
import com.ycl.platform.domain.entity.CheckScore;
import com.ycl.platform.service.ICheckScoreService;
import com.ycl.system.AjaxResult;
import com.ycl.system.controller.BaseController;
import com.ycl.system.page.TableDataInfo;
import com.ycl.utils.poi.ExcelUtil;
import enumeration.BusinessType;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -53,20 +57,21 @@
    /**
     * 获取考核积分详细信息
     * 获取考核指标详细信息
     */
    @PreAuthorize("@ss.hasPermi('check:score:query')")
    @GetMapping(value = "/detail/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    @GetMapping(value = "/detail/index")
    public AjaxResult getIndex(CheckScoreIndexDTO checkScoreIndexDTO)
    {
        return success(checkScoreService.selectCheckScoreById(id));
        return success(checkScoreService.selectCheckScoreById(checkScoreIndexDTO));
    }
    /**
     * 发布考核积分
     */
    @PreAuthorize("@ss.hasPermi('check:score:edit')")
    @Log(title = "考核积分", businessType = BusinessType.UPDATE)
    @Log(title = "发布考核积分", businessType = BusinessType.UPDATE)
    @PutMapping("/publish")
    public AjaxResult edit(@RequestBody CheckScoreDTO checkScoreDTO)
    {
@@ -74,6 +79,15 @@
        return toAjax(checkScoreService.publishCheckScore(checkScoreDTO));
    }
    /**
     * 导出考核积分列表
     */
    @PreAuthorize("@ss.hasPermi('check:score:export')")
    @Log(title = "导出考核积分", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, CheckScore checkScore) throws IOException {
        checkScoreService.exportIndex(response,checkScore);
    }
//    /**
//     * 新增考核积分
//     */
@@ -97,16 +111,4 @@
//    }
//    /**
//     * 导出考核积分列表
//     */
//    @PreAuthorize("@ss.hasPermi('check:score:export')")
//    @Log(title = "考核积分", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, CheckScore checkScore)
//    {
//        List<CheckScore> list = checkScoreService.selectCheckScoreList(checkScore);
//        ExcelUtil<CheckScore> util = new ExcelUtil<CheckScore>(CheckScore.class);
//        util.exportExcel(response, list, "考核积分明细数据");
//    }
}
ycl-server/src/main/java/com/ycl/platform/controller/CheckTemplateController.java
@@ -2,7 +2,9 @@
import annotation.Log;
import com.ycl.platform.domain.entity.CheckTemplate;
import com.ycl.platform.domain.entity.CheckTemplateRule;
import com.ycl.platform.domain.query.CheckTemplateQuery;
import com.ycl.platform.service.ICheckTemplateRuleService;
import com.ycl.platform.service.ICheckTemplateService;
import com.ycl.system.AjaxResult;
import com.ycl.system.Result;
@@ -30,6 +32,8 @@
    @Autowired
    private ICheckTemplateService checkTemplateService;
    @Autowired
    private ICheckTemplateRuleService checkTemplateRuleService;
    /**
     * 查询考核模板列表
     */
@@ -57,7 +61,7 @@
     * 新增考核模板
     */
    @PreAuthorize("@ss.hasPermi('check:template:add')")
    @Log(title = "考核模板", businessType = BusinessType.INSERT)
    @Log(title = "新增考核模板", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody @Validated CheckTemplateQuery checkTemplateDTO)
    {
@@ -69,7 +73,7 @@
     * 复制考核模板
     */
    @PreAuthorize("@ss.hasPermi('check:template:copy')")
    @Log(title = "考核模板", businessType = BusinessType.INSERT)
    @Log(title = "复制考核模板", businessType = BusinessType.INSERT)
    @PostMapping("/copy")
    public AjaxResult copy(@RequestBody CheckTemplateQuery checkTemplateDTO)
    {
@@ -80,18 +84,28 @@
     * 修改考核模板
     */
    @PreAuthorize("@ss.hasPermi('check:template:edit')")
    @Log(title = "考核模板", businessType = BusinessType.UPDATE)
    @Log(title = "修改考核模板", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody CheckTemplateQuery checkTemplateDTO)
    {
        return toAjax(checkTemplateService.updateCheckTemplate(checkTemplateDTO));
        return checkTemplateService.updateCheckTemplate(checkTemplateDTO);
    }
    /**
     * 修改考核模板权重
     */
    @PreAuthorize("@ss.hasPermi('check:template:edit')")
    @Log(title = "修改考核模板权重", businessType = BusinessType.UPDATE)
    @PutMapping("/weight")
    public AjaxResult editWeight(@RequestBody CheckTemplateRule checkTemplateRule)
    {
        return toAjax(checkTemplateRuleService.updateCheckTemplateRule(checkTemplateRule));
    }
    /**
     * 删除考核模板
     */
    @PreAuthorize("@ss.hasPermi('check:template:remove')")
    @Log(title = "考核模板", businessType = BusinessType.DELETE)
    @Log(title = "删除考核模板", businessType = BusinessType.DELETE)
    @DeleteMapping("/{id}")
    public AjaxResult remove(@PathVariable String id)
    {
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexCarMapper.java
New file
@@ -0,0 +1,62 @@
package com.ycl.platform.mapper;
import com.ycl.platform.domain.entity.CheckIndexCar;
import java.util.List;
/**
 * 车辆指标概率数据Mapper接口
 *
 * @author ruoyi
 * @date 2024-04-29
 */
public interface CheckIndexCarMapper
{
    /**
     * 查询车辆指标概率数据
     *
     * @param id 车辆指标概率数据主键
     * @return 车辆指标概率数据
     */
    public CheckIndexCar selectCheckIndexCarById(Long id);
    /**
     * 查询车辆指标概率数据列表
     *
     * @param checkIndexCar 车辆指标概率数据
     * @return 车辆指标概率数据集合
     */
    public List<CheckIndexCar> selectCheckIndexCarList(CheckIndexCar checkIndexCar);
    /**
     * 新增车辆指标概率数据
     *
     * @param checkIndexCar 车辆指标概率数据
     * @return 结果
     */
    public int insertCheckIndexCar(CheckIndexCar checkIndexCar);
    /**
     * 修改车辆指标概率数据
     *
     * @param checkIndexCar 车辆指标概率数据
     * @return 结果
     */
    public int updateCheckIndexCar(CheckIndexCar checkIndexCar);
    /**
     * 删除车辆指标概率数据
     *
     * @param id 车辆指标概率数据主键
     * @return 结果
     */
    public int deleteCheckIndexCarById(Long id);
    /**
     * 批量删除车辆指标概率数据
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCheckIndexCarByIds(Long[] ids);
}
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexFaceMapper.java
New file
@@ -0,0 +1,62 @@
package com.ycl.platform.mapper;
import com.ycl.platform.domain.entity.CheckIndexFace;
import java.util.List;
/**
 * 人脸指标概率数据Mapper接口
 *
 * @author ruoyi
 * @date 2024-04-29
 */
public interface CheckIndexFaceMapper
{
    /**
     * 查询人脸指标概率数据
     *
     * @param id 人脸指标概率数据主键
     * @return 人脸指标概率数据
     */
    public CheckIndexFace selectCheckIndexFaceById(Long id);
    /**
     * 查询人脸指标概率数据列表
     *
     * @param checkIndexFace 人脸指标概率数据
     * @return 人脸指标概率数据集合
     */
    public List<CheckIndexFace> selectCheckIndexFaceList(CheckIndexFace checkIndexFace);
    /**
     * 新增人脸指标概率数据
     *
     * @param checkIndexFace 人脸指标概率数据
     * @return 结果
     */
    public int insertCheckIndexFace(CheckIndexFace checkIndexFace);
    /**
     * 修改人脸指标概率数据
     *
     * @param checkIndexFace 人脸指标概率数据
     * @return 结果
     */
    public int updateCheckIndexFace(CheckIndexFace checkIndexFace);
    /**
     * 删除人脸指标概率数据
     *
     * @param id 人脸指标概率数据主键
     * @return 结果
     */
    public int deleteCheckIndexFaceById(Long id);
    /**
     * 批量删除人脸指标概率数据
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCheckIndexFaceByIds(Long[] ids);
}
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexVideoMapper.java
New file
@@ -0,0 +1,62 @@
package com.ycl.platform.mapper;
import com.ycl.platform.domain.entity.CheckIndexVideo;
import java.util.List;
/**
 * 视频指标概率数据Mapper接口
 *
 * @author ruoyi
 * @date 2024-04-29
 */
public interface CheckIndexVideoMapper
{
    /**
     * 查询视频指标概率数据
     *
     * @param id 视频指标概率数据主键
     * @return 视频指标概率数据
     */
    public CheckIndexVideo selectCheckIndexVideoById(Long id);
    /**
     * 查询视频指标概率数据列表
     *
     * @param checkIndexVideo 视频指标概率数据
     * @return 视频指标概率数据集合
     */
    public List<CheckIndexVideo> selectCheckIndexVideoList(CheckIndexVideo checkIndexVideo);
    /**
     * 新增视频指标概率数据
     *
     * @param checkIndexVideo 视频指标概率数据
     * @return 结果
     */
    public int insertCheckIndexVideo(CheckIndexVideo checkIndexVideo);
    /**
     * 修改视频指标概率数据
     *
     * @param checkIndexVideo 视频指标概率数据
     * @return 结果
     */
    public int updateCheckIndexVideo(CheckIndexVideo checkIndexVideo);
    /**
     * 删除视频指标概率数据
     *
     * @param id 视频指标概率数据主键
     * @return 结果
     */
    public int deleteCheckIndexVideoById(Long id);
    /**
     * 批量删除视频指标概率数据
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCheckIndexVideoByIds(Long[] ids);
}
ycl-server/src/main/java/com/ycl/platform/mapper/CheckScoreMapper.java
@@ -1,6 +1,7 @@
package com.ycl.platform.mapper;
import annotation.AutoFill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ycl.platform.domain.dto.CheckScoreDTO;
import com.ycl.platform.domain.entity.CheckScore;
import enumeration.OperationType;
@@ -14,7 +15,7 @@
 * @author ruoyi
 * @date 2024-04-22
 */
public interface CheckScoreMapper
public interface CheckScoreMapper extends BaseMapper<CheckScore>
{
    /**
     * 查询考核积分明细
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexCarService.java
New file
@@ -0,0 +1,62 @@
package com.ycl.platform.service;
import com.ycl.platform.domain.entity.CheckIndexCar;
import java.util.List;
/**
 * 车辆指标概率数据Service接口
 *
 * @author ruoyi
 * @date 2024-04-29
 */
public interface ICheckIndexCarService
{
    /**
     * 查询车辆指标概率数据
     *
     * @param id 车辆指标概率数据主键
     * @return 车辆指标概率数据
     */
    public CheckIndexCar selectCheckIndexCarById(Long id);
    /**
     * 查询车辆指标概率数据列表
     *
     * @param checkIndexCar 车辆指标概率数据
     * @return 车辆指标概率数据集合
     */
    public List<CheckIndexCar> selectCheckIndexCarList(CheckIndexCar checkIndexCar);
    /**
     * 新增车辆指标概率数据
     *
     * @param checkIndexCar 车辆指标概率数据
     * @return 结果
     */
    public int insertCheckIndexCar(CheckIndexCar checkIndexCar);
    /**
     * 修改车辆指标概率数据
     *
     * @param checkIndexCar 车辆指标概率数据
     * @return 结果
     */
    public int updateCheckIndexCar(CheckIndexCar checkIndexCar);
    /**
     * 批量删除车辆指标概率数据
     *
     * @param ids 需要删除的车辆指标概率数据主键集合
     * @return 结果
     */
    public int deleteCheckIndexCarByIds(Long[] ids);
    /**
     * 删除车辆指标概率数据信息
     *
     * @param id 车辆指标概率数据主键
     * @return 结果
     */
    public int deleteCheckIndexCarById(Long id);
}
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexFaceService.java
New file
@@ -0,0 +1,62 @@
package com.ycl.platform.service;
import com.ycl.platform.domain.entity.CheckIndexFace;
import java.util.List;
/**
 * 人脸指标概率数据Service接口
 *
 * @author ruoyi
 * @date 2024-04-29
 */
public interface ICheckIndexFaceService
{
    /**
     * 查询人脸指标概率数据
     *
     * @param id 人脸指标概率数据主键
     * @return 人脸指标概率数据
     */
    public CheckIndexFace selectCheckIndexFaceById(Long id);
    /**
     * 查询人脸指标概率数据列表
     *
     * @param checkIndexFace 人脸指标概率数据
     * @return 人脸指标概率数据集合
     */
    public List<CheckIndexFace> selectCheckIndexFaceList(CheckIndexFace checkIndexFace);
    /**
     * 新增人脸指标概率数据
     *
     * @param checkIndexFace 人脸指标概率数据
     * @return 结果
     */
    public int insertCheckIndexFace(CheckIndexFace checkIndexFace);
    /**
     * 修改人脸指标概率数据
     *
     * @param checkIndexFace 人脸指标概率数据
     * @return 结果
     */
    public int updateCheckIndexFace(CheckIndexFace checkIndexFace);
    /**
     * 批量删除人脸指标概率数据
     *
     * @param ids 需要删除的人脸指标概率数据主键集合
     * @return 结果
     */
    public int deleteCheckIndexFaceByIds(Long[] ids);
    /**
     * 删除人脸指标概率数据信息
     *
     * @param id 人脸指标概率数据主键
     * @return 结果
     */
    public int deleteCheckIndexFaceById(Long id);
}
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexVideoService.java
New file
@@ -0,0 +1,62 @@
package com.ycl.platform.service;
import com.ycl.platform.domain.entity.CheckIndexVideo;
import java.util.List;
/**
 * 视频指标概率数据Service接口
 *
 * @author ruoyi
 * @date 2024-04-29
 */
public interface ICheckIndexVideoService
{
    /**
     * 查询视频指标概率数据
     *
     * @param id 视频指标概率数据主键
     * @return 视频指标概率数据
     */
    public CheckIndexVideo selectCheckIndexVideoById(Long id);
    /**
     * 查询视频指标概率数据列表
     *
     * @param checkIndexVideo 视频指标概率数据
     * @return 视频指标概率数据集合
     */
    public List<CheckIndexVideo> selectCheckIndexVideoList(CheckIndexVideo checkIndexVideo);
    /**
     * 新增视频指标概率数据
     *
     * @param checkIndexVideo 视频指标概率数据
     * @return 结果
     */
    public int insertCheckIndexVideo(CheckIndexVideo checkIndexVideo);
    /**
     * 修改视频指标概率数据
     *
     * @param checkIndexVideo 视频指标概率数据
     * @return 结果
     */
    public int updateCheckIndexVideo(CheckIndexVideo checkIndexVideo);
    /**
     * 批量删除视频指标概率数据
     *
     * @param ids 需要删除的视频指标概率数据主键集合
     * @return 结果
     */
    public int deleteCheckIndexVideoByIds(Long[] ids);
    /**
     * 删除视频指标概率数据信息
     *
     * @param id 视频指标概率数据主键
     * @return 结果
     */
    public int deleteCheckIndexVideoById(Long id);
}
ycl-server/src/main/java/com/ycl/platform/service/ICheckScoreService.java
@@ -1,9 +1,13 @@
package com.ycl.platform.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ycl.platform.domain.dto.CheckScoreDTO;
import com.ycl.platform.domain.dto.CheckScoreIndexDTO;
import com.ycl.platform.domain.entity.CheckScore;
import com.ycl.platform.domain.vo.CheckScoreDetailVO;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -13,15 +17,15 @@
 * @author ruoyi
 * @date 2024-04-22
 */
public interface ICheckScoreService
public interface ICheckScoreService extends IService<CheckScore>
{
    /**
     * 查询考核积分明细
     * 
     * @param id 考核积分明细主键
     * @param
     * @return 考核积分明细
     */
    public CheckScoreDetailVO selectCheckScoreById(Long id);
    public CheckScoreDetailVO selectCheckScoreById(CheckScoreIndexDTO checkScoreIndexDTO);
    /**
     * 查询考核积分明细列表
@@ -66,4 +70,6 @@
    int publishCheckScore(CheckScoreDTO checkScoreDTO);
    List<CheckScore> page(CheckScore checkScore);
    void exportIndex(HttpServletResponse response,CheckScore checkScore) throws IOException;
}
ycl-server/src/main/java/com/ycl/platform/service/ICheckTemplateService.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ycl.platform.domain.entity.CheckTemplate;
import com.ycl.platform.domain.query.CheckTemplateQuery;
import com.ycl.system.AjaxResult;
import com.ycl.system.Result;
import java.util.List;
@@ -45,7 +46,7 @@
     * @param checkTemplateDTO 考核模板
     * @return 结果
     */
    public int updateCheckTemplate(CheckTemplateQuery checkTemplateDTO);
    public AjaxResult updateCheckTemplate(CheckTemplateQuery checkTemplateDTO);
    /**
     * 批量删除考核模板
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexCarServiceImpl.java
New file
@@ -0,0 +1,96 @@
package com.ycl.platform.service.impl;
import com.ycl.platform.domain.entity.CheckIndexCar;
import com.ycl.platform.mapper.CheckIndexCarMapper;
import com.ycl.platform.service.ICheckIndexCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import utils.DateUtils;
import java.util.List;
/**
 * 车辆指标概率数据Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-29
 */
@Service
public class CheckIndexCarServiceImpl implements ICheckIndexCarService
{
    @Autowired
    private CheckIndexCarMapper checkIndexCarMapper;
    /**
     * 查询车辆指标概率数据
     *
     * @param id 车辆指标概率数据主键
     * @return 车辆指标概率数据
     */
    @Override
    public CheckIndexCar selectCheckIndexCarById(Long id)
    {
        return checkIndexCarMapper.selectCheckIndexCarById(id);
    }
    /**
     * 查询车辆指标概率数据列表
     *
     * @param checkIndexCar 车辆指标概率数据
     * @return 车辆指标概率数据
     */
    @Override
    public List<CheckIndexCar> selectCheckIndexCarList(CheckIndexCar checkIndexCar)
    {
        return checkIndexCarMapper.selectCheckIndexCarList(checkIndexCar);
    }
    /**
     * 新增车辆指标概率数据
     *
     * @param checkIndexCar 车辆指标概率数据
     * @return 结果
     */
    @Override
    public int insertCheckIndexCar(CheckIndexCar checkIndexCar)
    {
        checkIndexCar.setCreateTime(DateUtils.getNowDate());
        return checkIndexCarMapper.insertCheckIndexCar(checkIndexCar);
    }
    /**
     * 修改车辆指标概率数据
     *
     * @param checkIndexCar 车辆指标概率数据
     * @return 结果
     */
    @Override
    public int updateCheckIndexCar(CheckIndexCar checkIndexCar)
    {
        return checkIndexCarMapper.updateCheckIndexCar(checkIndexCar);
    }
    /**
     * 批量删除车辆指标概率数据
     *
     * @param ids 需要删除的车辆指标概率数据主键
     * @return 结果
     */
    @Override
    public int deleteCheckIndexCarByIds(Long[] ids)
    {
        return checkIndexCarMapper.deleteCheckIndexCarByIds(ids);
    }
    /**
     * 删除车辆指标概率数据信息
     *
     * @param id 车辆指标概率数据主键
     * @return 结果
     */
    @Override
    public int deleteCheckIndexCarById(Long id)
    {
        return checkIndexCarMapper.deleteCheckIndexCarById(id);
    }
}
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexFaceServiceImpl.java
New file
@@ -0,0 +1,96 @@
package com.ycl.platform.service.impl;
import com.ycl.platform.domain.entity.CheckIndexFace;
import com.ycl.platform.mapper.CheckIndexFaceMapper;
import com.ycl.platform.service.ICheckIndexFaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import utils.DateUtils;
import java.util.List;
/**
 * 人脸指标概率数据Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-29
 */
@Service
public class CheckIndexFaceServiceImpl implements ICheckIndexFaceService
{
    @Autowired
    private CheckIndexFaceMapper checkIndexFaceMapper;
    /**
     * 查询人脸指标概率数据
     *
     * @param id 人脸指标概率数据主键
     * @return 人脸指标概率数据
     */
    @Override
    public CheckIndexFace selectCheckIndexFaceById(Long id)
    {
        return checkIndexFaceMapper.selectCheckIndexFaceById(id);
    }
    /**
     * 查询人脸指标概率数据列表
     *
     * @param checkIndexFace 人脸指标概率数据
     * @return 人脸指标概率数据
     */
    @Override
    public List<CheckIndexFace> selectCheckIndexFaceList(CheckIndexFace checkIndexFace)
    {
        return checkIndexFaceMapper.selectCheckIndexFaceList(checkIndexFace);
    }
    /**
     * 新增人脸指标概率数据
     *
     * @param checkIndexFace 人脸指标概率数据
     * @return 结果
     */
    @Override
    public int insertCheckIndexFace(CheckIndexFace checkIndexFace)
    {
        checkIndexFace.setCreateTime(DateUtils.getNowDate());
        return checkIndexFaceMapper.insertCheckIndexFace(checkIndexFace);
    }
    /**
     * 修改人脸指标概率数据
     *
     * @param checkIndexFace 人脸指标概率数据
     * @return 结果
     */
    @Override
    public int updateCheckIndexFace(CheckIndexFace checkIndexFace)
    {
        return checkIndexFaceMapper.updateCheckIndexFace(checkIndexFace);
    }
    /**
     * 批量删除人脸指标概率数据
     *
     * @param ids 需要删除的人脸指标概率数据主键
     * @return 结果
     */
    @Override
    public int deleteCheckIndexFaceByIds(Long[] ids)
    {
        return checkIndexFaceMapper.deleteCheckIndexFaceByIds(ids);
    }
    /**
     * 删除人脸指标概率数据信息
     *
     * @param id 人脸指标概率数据主键
     * @return 结果
     */
    @Override
    public int deleteCheckIndexFaceById(Long id)
    {
        return checkIndexFaceMapper.deleteCheckIndexFaceById(id);
    }
}
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexVideoServiceImpl.java
New file
@@ -0,0 +1,96 @@
package com.ycl.platform.service.impl;
import com.ycl.platform.domain.entity.CheckIndexVideo;
import com.ycl.platform.mapper.CheckIndexVideoMapper;
import com.ycl.platform.service.ICheckIndexVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import utils.DateUtils;
import java.util.List;
/**
 * 视频指标概率数据Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-29
 */
@Service
public class CheckIndexVideoServiceImpl implements ICheckIndexVideoService
{
    @Autowired
    private CheckIndexVideoMapper checkIndexVideoMapper;
    /**
     * 查询视频指标概率数据
     *
     * @param id 视频指标概率数据主键
     * @return 视频指标概率数据
     */
    @Override
    public CheckIndexVideo selectCheckIndexVideoById(Long id)
    {
        return checkIndexVideoMapper.selectCheckIndexVideoById(id);
    }
    /**
     * 查询视频指标概率数据列表
     *
     * @param checkIndexVideo 视频指标概率数据
     * @return 视频指标概率数据
     */
    @Override
    public List<CheckIndexVideo> selectCheckIndexVideoList(CheckIndexVideo checkIndexVideo)
    {
        return checkIndexVideoMapper.selectCheckIndexVideoList(checkIndexVideo);
    }
    /**
     * 新增视频指标概率数据
     *
     * @param checkIndexVideo 视频指标概率数据
     * @return 结果
     */
    @Override
    public int insertCheckIndexVideo(CheckIndexVideo checkIndexVideo)
    {
        checkIndexVideo.setCreateTime(DateUtils.getNowDate());
        return checkIndexVideoMapper.insertCheckIndexVideo(checkIndexVideo);
    }
    /**
     * 修改视频指标概率数据
     *
     * @param checkIndexVideo 视频指标概率数据
     * @return 结果
     */
    @Override
    public int updateCheckIndexVideo(CheckIndexVideo checkIndexVideo)
    {
        return checkIndexVideoMapper.updateCheckIndexVideo(checkIndexVideo);
    }
    /**
     * 批量删除视频指标概率数据
     *
     * @param ids 需要删除的视频指标概率数据主键
     * @return 结果
     */
    @Override
    public int deleteCheckIndexVideoByIds(Long[] ids)
    {
        return checkIndexVideoMapper.deleteCheckIndexVideoByIds(ids);
    }
    /**
     * 删除视频指标概率数据信息
     *
     * @param id 视频指标概率数据主键
     * @return 结果
     */
    @Override
    public int deleteCheckIndexVideoById(Long id)
    {
        return checkIndexVideoMapper.deleteCheckIndexVideoById(id);
    }
}
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java
@@ -1,32 +1,45 @@
package com.ycl.platform.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ycl.platform.base.BaseSelect;
import com.ycl.platform.base.CheckIndex;
import com.ycl.platform.domain.dto.CheckScoreDTO;
import com.ycl.platform.domain.entity.CheckRule;
import com.ycl.platform.domain.entity.CheckScore;
import com.ycl.platform.domain.entity.CheckTemplate;
import com.ycl.platform.domain.entity.CheckTemplateRule;
import com.ycl.platform.domain.dto.CheckScoreIndexDTO;
import com.ycl.platform.domain.entity.*;
import com.ycl.platform.domain.vo.CheckScoreDetailVO;
import com.ycl.platform.mapper.CheckRuleMapper;
import com.ycl.platform.mapper.CheckScoreMapper;
import com.ycl.platform.mapper.CheckTemplateMapper;
import com.ycl.platform.mapper.CheckTemplateRuleMapper;
import com.ycl.platform.service.ICheckIndexCarService;
import com.ycl.platform.service.ICheckIndexFaceService;
import com.ycl.platform.service.ICheckIndexVideoService;
import com.ycl.platform.service.ICheckScoreService;
import com.ycl.system.Result;
import com.ycl.system.entity.SysRole;
import com.ycl.system.service.ISysDeptService;
import com.ycl.utils.SecurityUtils;
import com.ycl.utils.StringUtils;
import com.ycl.utils.poi.ExcelUtil;
import constant.CheckConstants;
import enumeration.general.CheckScoreType;
import enumeration.general.PublishType;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import pojo.ExcelExp;
import utils.DateUtils;
import utils.poi.ExcelUtilManySheet;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
 * 考核积分明细Service业务层处理
@@ -36,7 +49,7 @@
 */
@Service
@Slf4j
public class CheckScoreServiceImpl implements ICheckScoreService
public class CheckScoreServiceImpl extends ServiceImpl<CheckScoreMapper, CheckScore> implements ICheckScoreService
{
    @Autowired
    private CheckScoreMapper scoreMapper;
@@ -46,6 +59,14 @@
    private CheckTemplateRuleMapper templateRuleMapper;
    @Autowired
    private CheckRuleMapper ruleMapper;
    @Autowired
    private ICheckIndexCarService indexCarService;
    @Autowired
    private ICheckIndexFaceService indexFaceService;
    @Autowired
    private ICheckIndexVideoService indexVideoService;
    @Autowired
    private ISysDeptService deptService;
    /**
     * 查询考核积分
     * 
@@ -53,39 +74,36 @@
     * @return 考核积分
     */
    @Override
    public CheckScoreDetailVO selectCheckScoreById(Long id)
    public CheckScoreDetailVO selectCheckScoreById(CheckScoreIndexDTO checkScoreIndexDTO)
    {
        Long checkScoreId = checkScoreIndexDTO.getId();
        CheckScoreDetailVO checkScoreDetailVO = new CheckScoreDetailVO();
        //根据id读取score
        CheckScore checkScore = scoreMapper.selectCheckScoreById(id);
        CheckScore checkScore = scoreMapper.selectCheckScoreById(checkScoreId);
        //读取规则以及权重
        List<CheckTemplateRule> templateRuleList = templateRuleMapper.selectListByTemplateId(checkScore.getTemplateId());
        //checkRules添加考核对象和考核时间
        List<CheckRule> checkRules = new ArrayList<>();
        CheckRule checkRule1 = new CheckRule();
        checkRule1.setRuleName("考核时间");
        checkRule1.setRuleIndex("create_time");
        CheckRule checkRule2 = new CheckRule();
        checkRule2.setRuleName("考核对象");
        checkRule2.setRuleIndex("deptId");
        //读取模板对应所有规则
        Map<String,Object> scoreMap = new HashMap<>();
        List<Integer> ruleIds = templateRuleList.stream().map(checkTemplateRule -> checkTemplateRule.getCheckRuleId())
                .collect(Collectors.toList());
        List<CheckRule> ruleIndex = ruleMapper.selectBatchIds(ruleIds);
//        checkRules.add(checkRule1);
//        checkRules.add(checkRule2);
        checkRules.addAll(ruleIndex);
        //根据examineCategory 读取不同index表
        Integer examineCategory = checkScore.getExamineCategory();
        String[] indexTableArr ={"t_check_index_car","t_check_index_face","t_check_index_video"};
        Short examineCategory = checkScore.getExamineCategory();
        String[] indexTableArr ={"","t_check_index_video","t_check_index_car","t_check_index_face"};
        String tableName = indexTableArr[examineCategory];
        //TODO:获取当前月份
        LocalDate now = LocalDate.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
        String date = formatter.format(now);
        //获当月份
        String date = checkScoreIndexDTO.getDate();
        if(StringUtils.isEmpty(date)){
            //如果查询条件不含参数,查询积分对应创建时间
            Date createTime = checkScore.getCreateTime();
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
            date = formatter.format(createTime);
        }
        List<Map> map = scoreMapper.selectScoreIndex(tableName,checkScore.getDeptId(),date);
        scoreMap.put("tableData",checkRules);
@@ -109,6 +127,17 @@
        //TODO:数据权限
        //查询成绩
        String date = checkScore.getDate();
        if(StringUtils.isEmpty(date)){
            //如果为空查本月的数据
            Calendar now = Calendar.getInstance();
            //取昨天
            now.add(Calendar.DATE, -1);
            Date yesterday = now.getTime();
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM");
            date = simpleDateFormat.format(yesterday);
            checkScore.setDate(date);
        }
        List<CheckScore> checkScores = scoreMapper.selectCheckScoreList(checkScore);
        Map<Long, List<CheckScore>> deptMap = checkScores.stream().collect(Collectors.groupingBy(CheckScore::getDeptId));
        return deptMap;
@@ -124,6 +153,8 @@
        //TODO:数据权限
        return scoreMapper.selectCheckScoreList(checkScore);
    }
    /**
     * 新增考核积分
     * 
@@ -188,7 +219,6 @@
        try {
            publishType = PublishType.valueOf(checkScoreDTO.getPublish());
        } catch (IllegalArgumentException e) {
            log.error("参数类型不匹配");
            throw new IllegalArgumentException("参数类型不匹配");
        }
        String code = publishType.getCode();
@@ -197,5 +227,78 @@
        return scoreMapper.publishCheckScore(checkScoreDTO);
    }
    /**
     * 导出指标
     *
     * @param checkScore 考核积分
     * @return 考核积分
     */
    @Override
    public void exportIndex(HttpServletResponse response,CheckScore checkScoreDTO) throws IOException {
        String date = checkScoreDTO.getDate();
        //如果请求参数时间为空,查这条记录的时间
        if(StringUtils.isEmpty(date)) {
            CheckScore checkScore = getById(checkScoreDTO.getId());
            Date createTime = checkScore.getCreateTime();
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM");
            date = simpleDateFormat.format(createTime);
        }
        /** 导三张sheet */
        //车辆
        CheckIndexCar checkIndexCar = new CheckIndexCar();
        checkIndexCar.setDate(date);
        List<CheckIndexCar> checkIndexCars = indexCarService.selectCheckIndexCarList(checkIndexCar);
        ExcelExp e1 = new ExcelExp("车辆考核指标数据",checkIndexCars,CheckIndexCar.class);
        //人脸
        CheckIndexFace checkIndexFace = new CheckIndexFace();
        checkIndexFace.setDate(date);
        List<CheckIndexFace> checkIndexFaces = indexFaceService.selectCheckIndexFaceList(checkIndexFace);
        ExcelExp e2 = new ExcelExp("人脸考核指标数据",checkIndexFaces,CheckIndexFace.class);
        //视频
        CheckIndexVideo checkIndexVideo = new CheckIndexVideo();
        checkIndexVideo.setDate(date);
        List<CheckIndexVideo> checkIndexVideos = indexVideoService.selectCheckIndexVideoList(checkIndexVideo);
        ExcelExp e3 = new ExcelExp("视频考核指标数据",checkIndexVideos,CheckIndexVideo.class);
        List<ExcelExp> mysheet = new ArrayList<>();
        mysheet.add(e1);
        mysheet.add(e2);
        mysheet.add(e3);
        ExcelUtilManySheet<List<ExcelExp>> util = new ExcelUtilManySheet<>(mysheet);
        util.exportExcelManySheet(response,mysheet);
        //导单sheet的方式
//        switch (CheckScoreType.fromValue(examineCategory)){
//            case CHECK_SCORE_TYPE_CAR:
//                //查车辆
//                List<CheckIndexCar> checkIndexCars = indexCarService.selectCheckIndexCarList(new CheckIndexCar());
//                export(response, depts, checkIndexCars,CheckIndexCar.class);
//                break;
//            case CHECK_SCORE_TYPE_FACE:
//                // 查人脸
//                List<CheckIndexFace> checkIndexFaces = indexFaceService.selectCheckIndexFaceList(new CheckIndexFace());
//                export(response, depts, checkIndexFaces,CheckIndexFace.class);
//                break;
//            case CHECK_SCORE_TYPE_VIDEO:
//                // 查视频
//                List<CheckIndexVideo> checkIndexVideos = indexVideoService.selectCheckIndexVideoList(new CheckIndexVideo());
//                export(response, depts, checkIndexVideos,CheckIndexVideo.class);
//                break;
//        }
    }
    private <T extends CheckIndex> void export(HttpServletResponse response, List<BaseSelect> depts, List<T> checkIndexes,Class<T> checkIndexClass) {
        //暂时没用,如果数据过大,在server层翻译,避免连表
        checkIndexes.forEach(checkIndex->{
            Optional<BaseSelect> first = depts.stream().filter(baseSelect -> checkIndex.getDeptId().equals(Long.valueOf(baseSelect.getId()+""))).findFirst();
            if(first.isPresent()){
                checkIndex.setDeptName(first.get().getValue());
            }
        });
        ExcelUtil<T> util = new ExcelUtil<T>(checkIndexClass);
        util.exportExcel(response, checkIndexes, "考核积分明细数据");
    }
}
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckTemplateServiceImpl.java
@@ -11,6 +11,7 @@
import com.ycl.platform.mapper.CheckTemplateRuleMapper;
import com.ycl.platform.service.ICheckTemplateRuleService;
import com.ycl.platform.service.ICheckTemplateService;
import com.ycl.system.AjaxResult;
import com.ycl.system.Result;
import com.ycl.system.entity.SysDept;
import com.ycl.system.service.ISysDeptService;
@@ -36,13 +37,14 @@
 * @date 2024-04-01
 */
@Service
public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateMapper,CheckTemplate> implements ICheckTemplateService {
public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateMapper, CheckTemplate> implements ICheckTemplateService {
    @Autowired
    private CheckTemplateMapper checkTemplateMapper;
    @Autowired
    private ICheckTemplateRuleService templateRuleServicee;
    @Autowired
    private CheckTemplateRuleMapper checkTemplateRuleMapper;
    /**
     * 查询考核模板
     *
@@ -56,15 +58,15 @@
        BeanUtils.copyProperties(checkTemplate, checkTemplateQuery);
        List<Integer> deptIds = JSONArray.parseArray(checkTemplate.getDeptId(), Integer.class);
        checkTemplateQuery.setDeptId(deptIds)
                .setAdjustCoefficient(checkTemplate.getAdjustCoefficient()+"")
                .setAlarmScore(checkTemplate.getAlarmScore()+"");
                .setAdjustCoefficient(checkTemplate.getAdjustCoefficient() + "")
                .setAlarmScore(checkTemplate.getAlarmScore() + "");
        //查询规则权重
        List<CheckTemplateRule> templateRuleList = checkTemplateRuleMapper.selectListByTemplateId(checkTemplate.getId());
        List<Map<String,Object>> list = new ArrayList<>();
        List<Map<String, Object>> list = new ArrayList<>();
        for (CheckTemplateRule checkTemplateRule : templateRuleList) {
            Map<String,Object> map = new HashMap<>();
            map.put("ruleId",checkTemplateRule.getCheckRuleId());
            map.put("weight",checkTemplateRule.getWeight());
            Map<String, Object> map = new HashMap<>();
            map.put("ruleId", checkTemplateRule.getCheckRuleId());
            map.put("weight", checkTemplateRule.getWeight());
            list.add(map);
        }
        checkTemplateQuery.setRuleFormList(list);
@@ -90,7 +92,7 @@
            CheckTemplateQuery checkTemplateQuery = new CheckTemplateQuery();
            BeanUtils.copyProperties(template, checkTemplateQuery);
            checkTemplateQuery.setDeptId(deptIds)
                    .setAdjustCoefficient(template.getAdjustCoefficient()+"");
                    .setAdjustCoefficient(template.getAdjustCoefficient() + "");
            checkTemplateList.add(checkTemplateQuery);
        }
@@ -120,15 +122,16 @@
        checkTemplate.setDeptId(JSONArray.toJSONString(deptId))
                .setUpdateUserName(username)
                .setCreateUserName(username)
                .setAdjustCoefficient(new BigDecimal(checkTemplateDTO.getAdjustCoefficient()+""))
                .setAdjustCoefficient(new BigDecimal(checkTemplateDTO.getAdjustCoefficient() + ""))
                //不填报警分数---->零分---->不报警
                .setAlarmScore(new BigDecimal(checkTemplateDTO.getAlarmScore() == null? "":checkTemplateDTO.getAlarmScore()));
                .setAlarmScore(new BigDecimal(checkTemplateDTO.getAlarmScore() == null ? "" : checkTemplateDTO.getAlarmScore()));
        int i = checkTemplateMapper.insertCheckTemplate(checkTemplate);
        /** t_template_rule新增权重 */
        insertTemlpateRule(checkTemplateDTO, checkTemplate);
        return i;
    }
    /**
     * 复制考核模板
     *
@@ -164,15 +167,16 @@
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int updateCheckTemplate(CheckTemplateQuery checkTemplateDTO) {
    public AjaxResult updateCheckTemplate(CheckTemplateQuery checkTemplateDTO) {
        CheckTemplate checkTemplate = new CheckTemplate();
        BeanUtils.copyProperties(checkTemplateDTO, checkTemplate);
        checkTemplate.setUpdateUserName(SecurityUtils.getUsername());
        List<Integer> deptId = checkTemplateDTO.getDeptId();
        Collections.sort(deptId);
        checkTemplate.setDeptId(JSONArray.toJSONString(deptId))
                .setAdjustCoefficient(new BigDecimal(checkTemplateDTO.getAdjustCoefficient()+""));
        int i = checkTemplateMapper.updateCheckTemplate(checkTemplate);
                .setAdjustCoefficient(new BigDecimal(checkTemplateDTO.getAdjustCoefficient() + ""));
        checkTemplateMapper.updateCheckTemplate(checkTemplate);
        /** t_template_rule修改权重 */
        //先删除原数据
        checkTemplateRuleMapper.deleteByTemplateId(checkTemplate.getId());
@@ -180,8 +184,7 @@
        insertTemlpateRule(checkTemplateDTO, checkTemplate);
        //TODO:判断状态是否修改,调整job表里的状态
        return i;
        return AjaxResult.success();
    }
    /**
@@ -216,7 +219,6 @@
        return Result.ok().data(checkTemplates);
    }
    private void insertTemlpateRule(CheckTemplateQuery checkTemplateDTO, CheckTemplate checkTemplate) {
ycl-server/src/main/resources/mapper/zgyw/CheckIndexCarMapper.xml
New file
@@ -0,0 +1,117 @@
<?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.ycl.platform.mapper.CheckIndexCarMapper">
    <resultMap type="com.ycl.platform.domain.entity.CheckIndexCar" id="CheckIndexCarResult">
        <result property="id"    column="id"    />
        <result property="deptId"    column="dept_id"    />
        <result property="examineTag"    column="examine_tag"    />
        <result property="createTime"    column="create_time"    />
        <result property="viewConnectStability"    column="view_connect_stability"    />
        <result property="siteOnline"    column="site_online"    />
        <result property="deviceDirectoryConsistent"    column="device_directory_consistent"    />
        <result property="vehicleInformationCollectionAccuracy"    column="vehicle_information_collection_accuracy"    />
        <result property="vehicleCaptureIntegrity"    column="vehicle_capture_integrity"    />
        <result property="vehicleCaptureAccuracy"    column="vehicle_capture_accuracy"    />
        <result property="vehicleTimingAccuracy"    column="vehicle_timing_accuracy"    />
        <result property="vehicleUploadTimeliness"    column="vehicle_upload_timeliness"    />
        <result property="vehicleUrlAvailability"    column="vehicle_url_availability"    />
        <result property="vehiclePictureAvailability"    column="vehicle_picture_availability"    />
    </resultMap>
    <sql id="selectCheckIndexCarVo">
        select id, dept_id ,examine_tag, create_time, view_connect_stability, site_online, device_directory_consistent, vehicle_information_collection_accuracy, vehicle_capture_integrity, vehicle_capture_accuracy, vehicle_timing_accuracy, vehicle_upload_timeliness, vehicle_url_availability, vehicle_picture_availability from t_check_index_car
    </sql>
    <select id="selectCheckIndexCarList"  resultMap="CheckIndexCarResult">
        select tcic.*,sd.dept_name
        from t_check_index_car tcic left join sys_dept sd on tcic.dept_id = sd.dept_id
        <where>
            <if test="deptId != null "> and dept_id = #{deptId}</if>
            <if test="examineTag != null "> and examine_tag = #{examineTag}</if>
            <if test="date != null "> and  date_format(tcic.create_time,'%Y-%m') = #{date}</if>
            <if test="viewConnectStability != null "> and view_connect_stability = #{viewConnectStability}</if>
            <if test="siteOnline != null "> and site_online = #{siteOnline}</if>
            <if test="deviceDirectoryConsistent != null "> and device_directory_consistent = #{deviceDirectoryConsistent}</if>
            <if test="vehicleInformationCollectionAccuracy != null "> and vehicle_information_collection_accuracy = #{vehicleInformationCollectionAccuracy}</if>
            <if test="vehicleCaptureIntegrity != null "> and vehicle_capture_integrity = #{vehicleCaptureIntegrity}</if>
            <if test="vehicleCaptureAccuracy != null "> and vehicle_capture_accuracy = #{vehicleCaptureAccuracy}</if>
            <if test="vehicleTimingAccuracy != null "> and vehicle_timing_accuracy = #{vehicleTimingAccuracy}</if>
            <if test="vehicleUploadTimeliness != null "> and vehicle_upload_timeliness = #{vehicleUploadTimeliness}</if>
            <if test="vehicleUrlAvailability != null "> and vehicle_url_availability = #{vehicleUrlAvailability}</if>
            <if test="vehiclePictureAvailability != null "> and vehicle_picture_availability = #{vehiclePictureAvailability}</if>
        </where>
    </select>
    <select id="selectCheckIndexCarById" resultMap="CheckIndexCarResult">
        <include refid="selectCheckIndexCarVo"/>
        where id = #{id}
    </select>
    <insert id="insertCheckIndexCar"  useGeneratedKeys="true" keyProperty="id">
        insert into t_check_index_car
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="deptId != null">dept_id,</if>
            <if test="examineTag != null">examine_tag,</if>
            <if test="createTime != null">create_time,</if>
            <if test="viewConnectStability != null">view_connect_stability,</if>
            <if test="siteOnline != null">site_online,</if>
            <if test="deviceDirectoryConsistent != null">device_directory_consistent,</if>
            <if test="vehicleInformationCollectionAccuracy != null">vehicle_information_collection_accuracy,</if>
            <if test="vehicleCaptureIntegrity != null">vehicle_capture_integrity,</if>
            <if test="vehicleCaptureAccuracy != null">vehicle_capture_accuracy,</if>
            <if test="vehicleTimingAccuracy != null">vehicle_timing_accuracy,</if>
            <if test="vehicleUploadTimeliness != null">vehicle_upload_timeliness,</if>
            <if test="vehicleUrlAvailability != null">vehicle_url_availability,</if>
            <if test="vehiclePictureAvailability != null">vehicle_picture_availability,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="deptId != null">#{deptId},</if>
            <if test="examineTag != null">#{examineTag},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="viewConnectStability != null">#{viewConnectStability},</if>
            <if test="siteOnline != null">#{siteOnline},</if>
            <if test="deviceDirectoryConsistent != null">#{deviceDirectoryConsistent},</if>
            <if test="vehicleInformationCollectionAccuracy != null">#{vehicleInformationCollectionAccuracy},</if>
            <if test="vehicleCaptureIntegrity != null">#{vehicleCaptureIntegrity},</if>
            <if test="vehicleCaptureAccuracy != null">#{vehicleCaptureAccuracy},</if>
            <if test="vehicleTimingAccuracy != null">#{vehicleTimingAccuracy},</if>
            <if test="vehicleUploadTimeliness != null">#{vehicleUploadTimeliness},</if>
            <if test="vehicleUrlAvailability != null">#{vehicleUrlAvailability},</if>
            <if test="vehiclePictureAvailability != null">#{vehiclePictureAvailability},</if>
         </trim>
    </insert>
    <update id="updateCheckIndexCar" >
        update t_check_index_car
        <trim prefix="SET" suffixOverrides=",">
            <if test="deptId != null">dept_id = #{deptId},</if>
            <if test="examineTag != null">examine_tag = #{examineTag},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="viewConnectStability != null">view_connect_stability = #{viewConnectStability},</if>
            <if test="siteOnline != null">site_online = #{siteOnline},</if>
            <if test="deviceDirectoryConsistent != null">device_directory_consistent = #{deviceDirectoryConsistent},</if>
            <if test="vehicleInformationCollectionAccuracy != null">vehicle_information_collection_accuracy = #{vehicleInformationCollectionAccuracy},</if>
            <if test="vehicleCaptureIntegrity != null">vehicle_capture_integrity = #{vehicleCaptureIntegrity},</if>
            <if test="vehicleCaptureAccuracy != null">vehicle_capture_accuracy = #{vehicleCaptureAccuracy},</if>
            <if test="vehicleTimingAccuracy != null">vehicle_timing_accuracy = #{vehicleTimingAccuracy},</if>
            <if test="vehicleUploadTimeliness != null">vehicle_upload_timeliness = #{vehicleUploadTimeliness},</if>
            <if test="vehicleUrlAvailability != null">vehicle_url_availability = #{vehicleUrlAvailability},</if>
            <if test="vehiclePictureAvailability != null">vehicle_picture_availability = #{vehiclePictureAvailability},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteCheckIndexCarById">
        delete from t_check_index_car where id = #{id}
    </delete>
    <delete id="deleteCheckIndexCarByIds">
        delete from t_check_index_car where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
ycl-server/src/main/resources/mapper/zgyw/CheckIndexFaceMapper.xml
New file
@@ -0,0 +1,107 @@
<?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.ycl.platform.mapper.CheckIndexFaceMapper">
    <resultMap type="com.ycl.platform.domain.entity.CheckIndexFace" id="CheckIndexFaceResult">
        <result property="id"    column="id"    />
        <result property="deptId"    column="dept_id"    />
        <result property="examineTag"    column="examine_tag"    />
        <result property="createTime"    column="create_time"    />
        <result property="viewConnectStability"    column="view_connect_stability"    />
        <result property="siteOnline"    column="site_online"    />
        <result property="deviceDirectoryConsistent"    column="device_directory_consistent"    />
        <result property="faceInformationCollectionAccuracy"    column="face_information_collection_accuracy"    />
        <result property="facePictureQualification"    column="face_picture_qualification"    />
        <result property="faceTimingAccuracy"    column="face_timing_accuracy"    />
        <result property="faceUploadTimeliness"    column="face_upload_timeliness"    />
        <result property="facePictureAvailability"    column="face_picture_availability"    />
    </resultMap>
    <sql id="selectCheckIndexFaceVo">
        select id, dept_id, examine_tag, create_time, view_connect_stability, site_online, device_directory_consistent, face_information_collection_accuracy, face_picture_qualification, face_timing_accuracy, face_upload_timeliness, face_picture_availability from t_check_index_face
    </sql>
    <select id="selectCheckIndexFaceList"  resultMap="CheckIndexFaceResult">
        select tcif.*,sd.dept_name
        from t_check_index_face tcif left join sys_dept sd on tcif.dept_id = sd.dept_id
        <where>
            <if test="deptId != null "> and dept_id = #{deptId}</if>
            <if test="examineTag != null "> and examine_tag = #{examineTag}</if>
            <if test="date != null "> and  date_format(tcif.create_time,'%Y-%m') = #{date}</if>
            <if test="viewConnectStability != null "> and view_connect_stability = #{viewConnectStability}</if>
            <if test="siteOnline != null "> and site_online = #{siteOnline}</if>
            <if test="deviceDirectoryConsistent != null "> and device_directory_consistent = #{deviceDirectoryConsistent}</if>
            <if test="faceInformationCollectionAccuracy != null "> and face_information_collection_accuracy = #{faceInformationCollectionAccuracy}</if>
            <if test="facePictureQualification != null "> and face_picture_qualification = #{facePictureQualification}</if>
            <if test="faceTimingAccuracy != null "> and face_timing_accuracy = #{faceTimingAccuracy}</if>
            <if test="faceUploadTimeliness != null "> and face_upload_timeliness = #{faceUploadTimeliness}</if>
            <if test="facePictureAvailability != null "> and face_picture_availability = #{facePictureAvailability}</if>
        </where>
    </select>
    <select id="selectCheckIndexFaceById"  resultMap="CheckIndexFaceResult">
        <include refid="selectCheckIndexFaceVo"/>
        where id = #{id}
    </select>
    <insert id="insertCheckIndexFace"  useGeneratedKeys="true" keyProperty="id">
        insert into t_check_index_face
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="deptId != null">dept_id,</if>
            <if test="examineTag != null">examine_tag,</if>
            <if test="createTime != null">create_time,</if>
            <if test="viewConnectStability != null">view_connect_stability,</if>
            <if test="siteOnline != null">site_online,</if>
            <if test="deviceDirectoryConsistent != null">device_directory_consistent,</if>
            <if test="faceInformationCollectionAccuracy != null">face_information_collection_accuracy,</if>
            <if test="facePictureQualification != null">face_picture_qualification,</if>
            <if test="faceTimingAccuracy != null">face_timing_accuracy,</if>
            <if test="faceUploadTimeliness != null">face_upload_timeliness,</if>
            <if test="facePictureAvailability != null">face_picture_availability,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="deptId != null">#{deptId},</if>
            <if test="examineTag != null">#{examineTag},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="viewConnectStability != null">#{viewConnectStability},</if>
            <if test="siteOnline != null">#{siteOnline},</if>
            <if test="deviceDirectoryConsistent != null">#{deviceDirectoryConsistent},</if>
            <if test="faceInformationCollectionAccuracy != null">#{faceInformationCollectionAccuracy},</if>
            <if test="facePictureQualification != null">#{facePictureQualification},</if>
            <if test="faceTimingAccuracy != null">#{faceTimingAccuracy},</if>
            <if test="faceUploadTimeliness != null">#{faceUploadTimeliness},</if>
            <if test="facePictureAvailability != null">#{facePictureAvailability},</if>
         </trim>
    </insert>
    <update id="updateCheckIndexFace">
        update t_check_index_face
        <trim prefix="SET" suffixOverrides=",">
            <if test="deptId != null">dept_id = #{deptId},</if>
            <if test="examineTag != null">examine_tag = #{examineTag},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="viewConnectStability != null">view_connect_stability = #{viewConnectStability},</if>
            <if test="siteOnline != null">site_online = #{siteOnline},</if>
            <if test="deviceDirectoryConsistent != null">device_directory_consistent = #{deviceDirectoryConsistent},</if>
            <if test="faceInformationCollectionAccuracy != null">face_information_collection_accuracy = #{faceInformationCollectionAccuracy},</if>
            <if test="facePictureQualification != null">face_picture_qualification = #{facePictureQualification},</if>
            <if test="faceTimingAccuracy != null">face_timing_accuracy = #{faceTimingAccuracy},</if>
            <if test="faceUploadTimeliness != null">face_upload_timeliness = #{faceUploadTimeliness},</if>
            <if test="facePictureAvailability != null">face_picture_availability = #{facePictureAvailability},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteCheckIndexFaceById" >
        delete from t_check_index_face where id = #{id}
    </delete>
    <delete id="deleteCheckIndexFaceByIds" >
        delete from t_check_index_face where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml
New file
@@ -0,0 +1,167 @@
<?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.ycl.platform.mapper.CheckIndexVideoMapper">
    <resultMap type="com.ycl.platform.domain.entity.CheckIndexVideo" id="CheckIndexVideoResult">
        <result property="id"    column="id"    />
        <result property="deptId"    column="dept_id"    />
        <result property="createTime"    column="create_time"    />
        <result property="examineTag"    column="examine_tag"    />
        <result property="platformOnline"    column="platform_online"    />
        <result property="monitorQualification"    column="monitor_qualification"    />
        <result property="monitorRegistration"    column="monitor_registration"    />
        <result property="archivesRate"    column="archives_rate"    />
        <result property="siteOnline"    column="site_online"    />
        <result property="videoAvailable"    column="video_available"    />
        <result property="annotationAccuracy"    column="annotation_accuracy"    />
        <result property="timingAccuracy"    column="timing_accuracy"    />
        <result property="keySiteOnline"    column="key_site_online"    />
        <result property="keyVideoAvailable"    column="key_video_available"    />
        <result property="keyAnnotationAccuracy"    column="key_annotation_accuracy"    />
        <result property="keyTimingAccuracy"    column="key_timing_accuracy"    />
        <result property="keyCommandImageInspection"    column="key_command_image_inspection"    />
        <result property="keyCommandImageDirectoryTree"    column="key_command_image_directory_tree"    />
        <result property="onlineInspectionPlatform"    column="online_inspection_platform"    />
        <result property="videoTransmissionAssetsAccuracy"    column="video_transmission_assets_accuracy"    />
        <result property="videoTransmissionAssetsWeakPasswordScore"    column="video_transmission_assets_weak_password_score"    />
        <result property="videoTransmissionDangerousAssetsScore"    column="video_transmission_dangerous_assets_score"    />
        <result property="videoTransmissionBoundaryIntegrityDetection"    column="video_transmission_boundary_integrity_detection"    />
        <result property="operatingRate"    column="operating_rate"    />
    </resultMap>
    <sql id="selectCheckIndexVideoVo">
        select id, dept_id, create_time, examine_tag, platform_online, monitor_qualification, monitor_registration, archives_rate, site_online, video_available, annotation_accuracy, timing_accuracy, key_site_online, key_video_available, key_annotation_accuracy, key_timing_accuracy, key_command_image_inspection, key_command_image_directory_tree, online_inspection_platform, video_transmission_assets_accuracy, video_transmission_assets_weak_password_score, video_transmission_dangerous_assets_score, video_transmission_boundary_integrity_detection, operating_rate from t_check_index_video
    </sql>
    <select id="selectCheckIndexVideoList" parameterType="CheckIndexVideo" resultMap="CheckIndexVideoResult">
        select tciv.*,sd.dept_name
        from t_check_index_video tciv left join sys_dept sd on tciv.dept_id = sd.dept_id
        <where>
            <if test="deptId != null "> and dept_id = #{deptId}</if>
            <if test="examineTag != null "> and examine_tag = #{examineTag}</if>
            <if test="date != null "> and  date_format(tciv.create_time,'%Y-%m') = #{date}</if>
            <if test="platformOnline != null "> and platform_online = #{platformOnline}</if>
            <if test="monitorQualification != null "> and monitor_qualification = #{monitorQualification}</if>
            <if test="monitorRegistration != null "> and monitor_registration = #{monitorRegistration}</if>
            <if test="archivesRate != null "> and archives_rate = #{archivesRate}</if>
            <if test="siteOnline != null "> and site_online = #{siteOnline}</if>
            <if test="videoAvailable != null "> and video_available = #{videoAvailable}</if>
            <if test="annotationAccuracy != null "> and annotation_accuracy = #{annotationAccuracy}</if>
            <if test="timingAccuracy != null "> and timing_accuracy = #{timingAccuracy}</if>
            <if test="keySiteOnline != null "> and key_site_online = #{keySiteOnline}</if>
            <if test="keyVideoAvailable != null "> and key_video_available = #{keyVideoAvailable}</if>
            <if test="keyAnnotationAccuracy != null "> and key_annotation_accuracy = #{keyAnnotationAccuracy}</if>
            <if test="keyTimingAccuracy != null "> and key_timing_accuracy = #{keyTimingAccuracy}</if>
            <if test="keyCommandImageInspection != null "> and key_command_image_inspection = #{keyCommandImageInspection}</if>
            <if test="keyCommandImageDirectoryTree != null "> and key_command_image_directory_tree = #{keyCommandImageDirectoryTree}</if>
            <if test="onlineInspectionPlatform != null "> and online_inspection_platform = #{onlineInspectionPlatform}</if>
            <if test="videoTransmissionAssetsAccuracy != null "> and video_transmission_assets_accuracy = #{videoTransmissionAssetsAccuracy}</if>
            <if test="videoTransmissionAssetsWeakPasswordScore != null "> and video_transmission_assets_weak_password_score = #{videoTransmissionAssetsWeakPasswordScore}</if>
            <if test="videoTransmissionDangerousAssetsScore != null "> and video_transmission_dangerous_assets_score = #{videoTransmissionDangerousAssetsScore}</if>
            <if test="videoTransmissionBoundaryIntegrityDetection != null "> and video_transmission_boundary_integrity_detection = #{videoTransmissionBoundaryIntegrityDetection}</if>
            <if test="operatingRate != null "> and operating_rate = #{operatingRate}</if>
        </where>
    </select>
    <select id="selectCheckIndexVideoById"  resultMap="CheckIndexVideoResult">
        <include refid="selectCheckIndexVideoVo"/>
        where id = #{id}
    </select>
    <insert id="insertCheckIndexVideo" useGeneratedKeys="true" keyProperty="id">
        insert into t_check_index_video
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="deptId != null">dept_id,</if>
            <if test="createTime != null">create_time,</if>
            <if test="examineTag != null">examine_tag,</if>
            <if test="platformOnline != null">platform_online,</if>
            <if test="monitorQualification != null">monitor_qualification,</if>
            <if test="monitorRegistration != null">monitor_registration,</if>
            <if test="archivesRate != null">archives_rate,</if>
            <if test="siteOnline != null">site_online,</if>
            <if test="videoAvailable != null">video_available,</if>
            <if test="annotationAccuracy != null">annotation_accuracy,</if>
            <if test="timingAccuracy != null">timing_accuracy,</if>
            <if test="keySiteOnline != null">key_site_online,</if>
            <if test="keyVideoAvailable != null">key_video_available,</if>
            <if test="keyAnnotationAccuracy != null">key_annotation_accuracy,</if>
            <if test="keyTimingAccuracy != null">key_timing_accuracy,</if>
            <if test="keyCommandImageInspection != null">key_command_image_inspection,</if>
            <if test="keyCommandImageDirectoryTree != null">key_command_image_directory_tree,</if>
            <if test="onlineInspectionPlatform != null">online_inspection_platform,</if>
            <if test="videoTransmissionAssetsAccuracy != null">video_transmission_assets_accuracy,</if>
            <if test="videoTransmissionAssetsWeakPasswordScore != null">video_transmission_assets_weak_password_score,</if>
            <if test="videoTransmissionDangerousAssetsScore != null">video_transmission_dangerous_assets_score,</if>
            <if test="videoTransmissionBoundaryIntegrityDetection != null">video_transmission_boundary_integrity_detection,</if>
            <if test="operatingRate != null">operating_rate,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="deptId != null">#{deptId},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="examineTag != null">#{examineTag},</if>
            <if test="platformOnline != null">#{platformOnline},</if>
            <if test="monitorQualification != null">#{monitorQualification},</if>
            <if test="monitorRegistration != null">#{monitorRegistration},</if>
            <if test="archivesRate != null">#{archivesRate},</if>
            <if test="siteOnline != null">#{siteOnline},</if>
            <if test="videoAvailable != null">#{videoAvailable},</if>
            <if test="annotationAccuracy != null">#{annotationAccuracy},</if>
            <if test="timingAccuracy != null">#{timingAccuracy},</if>
            <if test="keySiteOnline != null">#{keySiteOnline},</if>
            <if test="keyVideoAvailable != null">#{keyVideoAvailable},</if>
            <if test="keyAnnotationAccuracy != null">#{keyAnnotationAccuracy},</if>
            <if test="keyTimingAccuracy != null">#{keyTimingAccuracy},</if>
            <if test="keyCommandImageInspection != null">#{keyCommandImageInspection},</if>
            <if test="keyCommandImageDirectoryTree != null">#{keyCommandImageDirectoryTree},</if>
            <if test="onlineInspectionPlatform != null">#{onlineInspectionPlatform},</if>
            <if test="videoTransmissionAssetsAccuracy != null">#{videoTransmissionAssetsAccuracy},</if>
            <if test="videoTransmissionAssetsWeakPasswordScore != null">#{videoTransmissionAssetsWeakPasswordScore},</if>
            <if test="videoTransmissionDangerousAssetsScore != null">#{videoTransmissionDangerousAssetsScore},</if>
            <if test="videoTransmissionBoundaryIntegrityDetection != null">#{videoTransmissionBoundaryIntegrityDetection},</if>
            <if test="operatingRate != null">#{operatingRate},</if>
         </trim>
    </insert>
    <update id="updateCheckIndexVideo" >
        update t_check_index_video
        <trim prefix="SET" suffixOverrides=",">
            <if test="deptId != null">dept_id = #{deptId},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="examineTag != null">examine_tag = #{examineTag},</if>
            <if test="platformOnline != null">platform_online = #{platformOnline},</if>
            <if test="monitorQualification != null">monitor_qualification = #{monitorQualification},</if>
            <if test="monitorRegistration != null">monitor_registration = #{monitorRegistration},</if>
            <if test="archivesRate != null">archives_rate = #{archivesRate},</if>
            <if test="siteOnline != null">site_online = #{siteOnline},</if>
            <if test="videoAvailable != null">video_available = #{videoAvailable},</if>
            <if test="annotationAccuracy != null">annotation_accuracy = #{annotationAccuracy},</if>
            <if test="timingAccuracy != null">timing_accuracy = #{timingAccuracy},</if>
            <if test="keySiteOnline != null">key_site_online = #{keySiteOnline},</if>
            <if test="keyVideoAvailable != null">key_video_available = #{keyVideoAvailable},</if>
            <if test="keyAnnotationAccuracy != null">key_annotation_accuracy = #{keyAnnotationAccuracy},</if>
            <if test="keyTimingAccuracy != null">key_timing_accuracy = #{keyTimingAccuracy},</if>
            <if test="keyCommandImageInspection != null">key_command_image_inspection = #{keyCommandImageInspection},</if>
            <if test="keyCommandImageDirectoryTree != null">key_command_image_directory_tree = #{keyCommandImageDirectoryTree},</if>
            <if test="onlineInspectionPlatform != null">online_inspection_platform = #{onlineInspectionPlatform},</if>
            <if test="videoTransmissionAssetsAccuracy != null">video_transmission_assets_accuracy = #{videoTransmissionAssetsAccuracy},</if>
            <if test="videoTransmissionAssetsWeakPasswordScore != null">video_transmission_assets_weak_password_score = #{videoTransmissionAssetsWeakPasswordScore},</if>
            <if test="videoTransmissionDangerousAssetsScore != null">video_transmission_dangerous_assets_score = #{videoTransmissionDangerousAssetsScore},</if>
            <if test="videoTransmissionBoundaryIntegrityDetection != null">video_transmission_boundary_integrity_detection = #{videoTransmissionBoundaryIntegrityDetection},</if>
            <if test="operatingRate != null">operating_rate = #{operatingRate},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteCheckIndexVideoById" >
        delete from t_check_index_video where id = #{id}
    </delete>
    <delete id="deleteCheckIndexVideoByIds" >
        delete from t_check_index_video where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>