fuliqi
2024-09-06 eb844dbc762cfbd65f027229a9fc43469aaf65d0
考核模板定时任务getList分离
7个文件已修改
86 ■■■■ 已修改文件
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexCarMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexFaceMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexVideoMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/task/CheckScoreTask.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/CheckIndexCarMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/CheckIndexFaceMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexCarMapper.java
@@ -29,6 +29,13 @@
     * @return 车辆指标概率数据集合
     */
    public List<CheckIndexCar> selectCheckIndexCarList(CheckIndexCar checkIndexCar);
    /**
     * 考核模板定时任务查询车辆指标概率数据列表
     *
     * @param checkIndexCar 车辆指标概率数据
     * @return 车辆指标概率数据集合
     */
    List<CheckIndexCar> getCheckIndexCarList(CheckIndexCar checkIndexCar);
    /**
     * 新增车辆指标概率数据
@@ -70,4 +77,6 @@
     * @return 数据
     */
    CheckIndexCar dashboard(DashboardQuery dashboardQuery);
}
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexFaceMapper.java
@@ -31,6 +31,13 @@
    public List<CheckIndexFace> selectCheckIndexFaceList(CheckIndexFace checkIndexFace);
    /**
     * 模板定时任务查询人脸指标概率数据列表
     *
     * @param checkIndexFace 人脸指标概率数据
     * @return 人脸指标概率数据集合
     */
    List<CheckIndexFace> getCheckIndexFaceList(CheckIndexFace checkIndexFace);
    /**
     * 新增人脸指标概率数据
     *
     * @param checkIndexFace 人脸指标概率数据
@@ -70,4 +77,7 @@
     * @return 数据
     */
    CheckIndexFace dashboard(DashboardQuery dashboardQuery);
}
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexVideoMapper.java
@@ -35,6 +35,13 @@
    public List<CheckIndexVideo> selectCheckIndexVideoList(CheckIndexVideo checkIndexVideo);
    /**
     * 考核模板定时任务查询视频指标概率数据列表
     *
     * @param checkIndexVideo 视频指标概率数据
     * @return 视频指标概率数据集合
     */
    public List<CheckIndexVideo> getCheckIndexVideoList(CheckIndexVideo checkIndexVideo);
    /**
     * 新增视频指标概率数据
     *
     * @param checkIndexVideo 视频指标概率数据
ycl-server/src/main/java/com/ycl/task/CheckScoreTask.java
@@ -4,9 +4,7 @@
import com.google.common.base.CaseFormat;
import com.ycl.platform.base.CheckIndex;
import com.ycl.platform.domain.entity.*;
import com.ycl.platform.mapper.CheckScoreMapper;
import com.ycl.platform.mapper.CheckTemplateMapper;
import com.ycl.platform.mapper.CheckTemplateRuleMapper;
import com.ycl.platform.mapper.*;
import com.ycl.platform.service.*;
import constant.CheckConstants;
import lombok.extern.slf4j.Slf4j;
@@ -34,11 +32,11 @@
    @Autowired
    private CheckScoreMapper scoreMapper;
    @Autowired
    private ICheckIndexVideoService videoService;
    private CheckIndexVideoMapper videoMapper;
    @Autowired
    private ICheckIndexFaceService faceService;
    private CheckIndexFaceMapper faceMapper;
    @Autowired
    private ICheckIndexCarService carService;
    private CheckIndexCarMapper carMapper;
    public void executeTemplate(Integer templateId) {
        CheckTemplate checkTemplate = templateMapper.selectCheckTemplateById(templateId);
@@ -63,7 +61,7 @@
                checkIndexVideo.setDay(day);
                checkIndexVideo.setDeptIds(JSONArray.parseArray(checkTemplate.getDeptId(), Integer.class));
                //根据模板的考核标签查各区县对应省厅或市局视频数据
                List<CheckIndexVideo> checkIndexVideos = videoService.selectCheckIndexVideoList(checkIndexVideo);
                List<CheckIndexVideo> checkIndexVideos = videoMapper.getCheckIndexVideoList(checkIndexVideo);
                for (CheckIndexVideo indexVideo : checkIndexVideos) {
                    addToList(templateId, checkTemplate, examineTag, templateRuleList, scoreList, indexVideo, CheckConstants.Rule_Category_Video);
                }
@@ -73,7 +71,7 @@
                checkIndexCar.setExamineTag(examineTag);
                checkIndexCar.setDeptIds(JSONArray.parseArray(checkTemplate.getDeptId(), Integer.class));
                //根据模板的考核标签查各区县对应省厅或市局车辆数据
                List<CheckIndexCar> checkIndexCars = carService.selectCheckIndexCarList(checkIndexCar);
                List<CheckIndexCar> checkIndexCars = carMapper.getCheckIndexCarList(checkIndexCar);
                for (CheckIndexCar indexCar : checkIndexCars) {
                    addToList(templateId, checkTemplate, examineTag, templateRuleList, scoreList, indexCar, CheckConstants.Rule_Category_Car);
                }
@@ -83,7 +81,7 @@
                checkIndexFace.setExamineTag(examineTag);
                checkIndexFace.setDeptIds(JSONArray.parseArray(checkTemplate.getDeptId(), Integer.class));
                //根据模板的考核标签查各区县对应省厅或市局人脸数据
                List<CheckIndexFace> checkIndexFaces = faceService.selectCheckIndexFaceList(checkIndexFace);
                List<CheckIndexFace> checkIndexFaces = faceMapper.getCheckIndexFaceList(checkIndexFace);
                for (CheckIndexFace indexFace : checkIndexFaces) {
                    addToList(templateId, checkTemplate, examineTag, templateRuleList, scoreList, indexFace, CheckConstants.Rule_Category_Face);
                }
ycl-server/src/main/resources/mapper/zgyw/CheckIndexCarMapper.xml
@@ -51,6 +51,20 @@
        order by tcic.examine_tag desc,tcic.create_time,tcs.score desc
    </select>
    <select id="getCheckIndexCarList"  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
        left join t_check_score tcs on tcic.id = tcs.index_id
        <where>
            <if test="examineTag != null "> and tcic.examine_tag = #{examineTag}</if>
            <if test="day != null "> and  date(tcic.create_time) = #{day}</if>
            <if test="deptIds != null and deptIds.size()>0">and tcic.dept_id in
                <foreach collection="deptIds" separator="," open="(" close=")" item="deptId">
                    #{deptId}
                </foreach>
            </if>
        </where>
    </select>
    <select id="selectCheckIndexCarById" resultMap="CheckIndexCarResult">
        <include refid="selectCheckIndexCarVo"/>
        where id = #{id}
ycl-server/src/main/resources/mapper/zgyw/CheckIndexFaceMapper.xml
@@ -48,6 +48,21 @@
        order by tcif.examine_tag desc,tcif.create_time,tcs.score desc
    </select>
    <select id="getCheckIndexFaceList"  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="examineTag != null "> and tcif.examine_tag = #{examineTag}</if>
            <if test="date != null "> and  date_format(tcif.create_time,'%Y-%m') = #{date}</if>
            <if test="day != null "> and  date(tcif.create_time) = #{day}</if>
            <if test="deptIds != null ">and tcif.dept_id in
                <foreach collection="deptIds" separator="," open="(" close=")" item="deptId">
                    #{deptId}
                </foreach>
            </if>
        </where>
    </select>
    <select id="selectCheckIndexFaceById"  resultMap="CheckIndexFaceResult">
        <include refid="selectCheckIndexFaceVo"/>
        where id = #{id}
ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml
@@ -54,7 +54,20 @@
        </where>
        order by tciv.examine_tag desc,tciv.create_time,tcs.score desc
    </select>
    <select id="getCheckIndexVideoList" 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="examineTag != null "> and tciv.examine_tag = #{examineTag}</if>
            <if test="day != null "> and  date(tciv.create_time) = #{day}</if>
            <if test="createTime != null "> and  date(tciv.create_time) = #{createTime}</if>
            <if test="deptIds != null ">and tciv.dept_id in
                <foreach collection="deptIds" separator="," open="(" close=")" item="deptId">
                    #{deptId}
                </foreach>
            </if>
        </where>
    </select>
    <select id="selectCheckIndexVideoById"  resultMap="CheckIndexVideoResult">
        <include refid="selectCheckIndexVideoVo"/>
        where id = #{id}