fuliqi
2024-07-31 b22b8f688b31ae7c6e503b787f66ec5fa329127d
Merge remote-tracking branch 'origin/master'
9个文件已修改
99 ■■■■ 已修改文件
ycl-pojo/src/main/java/com/ycl/platform/domain/dto/CheckScoreIndexDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/dto/ScoreIndexDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexCar.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexFace.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexVideo.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckScore.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/system/entity/BaseEntity.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/dto/CheckScoreIndexDTO.java
@@ -3,8 +3,11 @@
import com.ycl.system.entity.BaseEntity;
import lombok.Data;
import java.util.List;
@Data
public class CheckScoreIndexDTO extends BaseEntity {
    private Long id;
    private String date;
    private List<String> quarter;
}
ycl-pojo/src/main/java/com/ycl/platform/domain/dto/ScoreIndexDTO.java
@@ -4,10 +4,13 @@
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
@Data
@Accessors(chain = true)
public class ScoreIndexDTO extends BaseEntity {
    private String tableName;
    private Long deptId;
    private String date;
    private List<String> quarter;
}
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexCar.java
@@ -1,10 +1,12 @@
package com.ycl.platform.domain.entity;
import annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.ycl.platform.base.CheckIndex;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
 * 车辆指标概率数据对象 t_check_index_car
@@ -58,6 +60,17 @@
    @Excel(name = "车辆卡口设备抓拍数据大图可用性",width = 25)
    private BigDecimal vehiclePictureAvailability;
    @ExcelIgnore
    private List<String> quarter;
    public List<String> getQuarter() {
        return quarter;
    }
    public void setQuarter(List<String> quarter) {
        this.quarter = quarter;
    }
    @Override
    public Long getId() {
        return super.getId();
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexFace.java
@@ -1,14 +1,12 @@
package com.ycl.platform.domain.entity;
import annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.excel.annotation.ExcelIgnore;
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;
import java.util.List;
/**
 * 人脸指标概率数据对象 t_check_index_face
@@ -52,6 +50,17 @@
    @Excel(name = "人脸卡口设备抓拍数据大图可用性",width = 25)
    private BigDecimal facePictureAvailability;
    @ExcelIgnore
    private List<String> quarter;
    public List<String> getQuarter() {
        return quarter;
    }
    public void setQuarter(List<String> quarter) {
        this.quarter = quarter;
    }
    public BigDecimal getViewConnectStability() {
        return viewConnectStability;
    }
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckIndexVideo.java
@@ -1,14 +1,12 @@
package com.ycl.platform.domain.entity;
import annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.excel.annotation.ExcelIgnore;
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;
import java.util.List;
/**
 * 视频指标概率数据对象 t_check_index_video
@@ -103,6 +101,17 @@
    @Excel(name = "月运行率")
    private BigDecimal operatingRate;
    @ExcelIgnore
    private List<String> quarter;
    public List<String> getQuarter() {
        return quarter;
    }
    public void setQuarter(List<String> quarter) {
        this.quarter = quarter;
    }
    public BigDecimal getPlatformOnline() {
        return platformOnline;
    }
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CheckScore.java
@@ -9,6 +9,7 @@
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
 * 考核积分明细对象 t_check_score
@@ -70,4 +71,7 @@
    @TableField(exist = false)
    private Date endDate;
    @TableField(exist = false)
    private List<String> quarter;
}
ycl-pojo/src/main/java/com/ycl/system/entity/BaseEntity.java
@@ -1,11 +1,9 @@
package com.ycl.system.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
@@ -50,6 +48,7 @@
    /** 请求参数 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private Map<String, Object> params;
    public String getSearchValue()
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java
@@ -91,20 +91,22 @@
        Short examineCategory = checkScore.getExamineCategory();
        String[] indexTableArr ={"","t_check_index_video","t_check_index_car","t_check_index_face"};
        String tableName = indexTableArr[examineCategory];
        //获当月份
        String date = checkScoreIndexDTO.getDate();
        if(StringUtils.isEmpty(date)){
            //如果查询条件不含参数,查询积分对应创建时间
            Date createTime = checkScore.getCreateTime();
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
            date = formatter.format(createTime);
        }
        ScoreIndexDTO scoreIndexDTO = new ScoreIndexDTO()
                .setTableName(tableName)
                .setDeptId(checkScore.getDeptId())
                .setDate(date);
                .setDate(checkScoreIndexDTO.getDate())
                .setQuarter(checkScoreIndexDTO.getQuarter());
        scoreIndexDTO.setParams(checkScoreIndexDTO.getParams());
        //获当月份
        if(StringUtils.isEmpty(scoreIndexDTO.getDate()) && CollectionUtils.isEmpty(checkScoreIndexDTO.getQuarter())){
            //如果查询条件不含参数,查询积分对应创建时间
            Date createTime = checkScore.getCreateTime();
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
            scoreIndexDTO.setDate(formatter.format(createTime));
        }
        List<Map> map = scoreMapper.selectScoreIndex(scoreIndexDTO);
        scoreMap.put("tableData",checkRules);
@@ -168,7 +170,7 @@
            //如果为空查本月的数据
            Calendar now = Calendar.getInstance();
            //取昨天
            now.add(Calendar.DATE, -1);
            // now.add(Calendar.DATE, -1);
            Date yesterday = now.getTime();
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM");
            date = simpleDateFormat.format(yesterday);
@@ -225,27 +227,30 @@
    public void exportIndex(HttpServletResponse response,CheckScore checkScoreDTO) throws IOException {
        String date = checkScoreDTO.getDate();
        //如果请求参数时间为空,查这条记录的时间
        if(StringUtils.isEmpty(date)) {
        if(StringUtils.isEmpty(checkScoreDTO.getDate()) && CollectionUtils.isEmpty(checkScoreDTO.getQuarter())){
            CheckScore checkScore = getById(checkScoreDTO.getId());
            Date createTime = checkScore.getCreateTime();
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM");
            date = simpleDateFormat.format(createTime);
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
            date = formatter.format(createTime);
        }
        /** 导三张sheet */
        //车辆
        CheckIndexCar checkIndexCar = new CheckIndexCar();
        checkIndexCar.setDate(date);
        checkIndexCar.setQuarter(checkScoreDTO.getQuarter());
        List<CheckIndexCar> checkIndexCars = indexCarService.selectCheckIndexCarList(checkIndexCar);
        ExcelExp e1 = new ExcelExp("车辆考核指标数据",checkIndexCars,CheckIndexCar.class);
        //人脸
        CheckIndexFace checkIndexFace = new CheckIndexFace();
        checkIndexFace.setDate(date);
        checkIndexFace.setQuarter(checkScoreDTO.getQuarter());
        List<CheckIndexFace> checkIndexFaces = indexFaceService.selectCheckIndexFaceList(checkIndexFace);
        ExcelExp e2 = new ExcelExp("人脸考核指标数据",checkIndexFaces,CheckIndexFace.class);
        //视频
        CheckIndexVideo checkIndexVideo = new CheckIndexVideo();
        checkIndexVideo.setDate(date);
        checkIndexVideo.setQuarter(checkScoreDTO.getQuarter());
        List<CheckIndexVideo> checkIndexVideos = indexVideoService.selectCheckIndexVideoList(checkIndexVideo);
        ExcelExp e3 = new ExcelExp("视频考核指标数据",checkIndexVideos,CheckIndexVideo.class);
ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml
@@ -105,7 +105,13 @@
    <select id="selectScoreIndex" resultType="java.util.Map">
        select t.* from ${tableName} t
        left join sys_dept d on t.dept_id = d.dept_id
        where t.dept_id =#{deptId} and date_format(t.create_time,'%Y-%m')  = #{date}
        where t.dept_id = #{deptId}
        <if test="date != null">
            and date_format(t.create_time,'%Y-%m') = #{date}
        </if>
        <if test="quarter != null and quarter.size > 0">
            and date_format(t.create_time, '%Y-%m') between #{quarter[0]} and #{quarter[1]}
        </if>
        ${params.dataScope}
    </select>