bug修复

This commit is contained in:
guoshengxiong 2024-05-16 17:45:16 +08:00
parent b607f844d3
commit 768a172828
4 changed files with 13 additions and 6 deletions

View File

@ -1,5 +1,6 @@
package com.zhgd.xmgl.modules.exam.controller;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhgd.annotation.OperLog;
import com.zhgd.xmgl.modules.exam.entity.ExamCourseRecord;
@ -85,10 +86,12 @@ public class ExamCourseController {
Page<ExamCourse> pageList = examCourseService.pageList(page, queryWrapper);
Page<ExamCourseVo> examCourseVoPage = PageUtil.copyProperties(pageList, ExamCourseVo.class);
List<Long> ids = examCourseVoPage.getRecords().stream().map(e -> e.getId()).collect(Collectors.toList());
List<ExamCourseRecord> list = examCourseRecordService.list(Wrappers.<ExamCourseRecord>lambdaQuery().in(ExamCourseRecord::getCourseId, ids));
for (ExamCourseVo record : examCourseVoPage.getRecords()) {
record.setRequiredWorker(list.stream().filter(e -> e.getCourseId().equals(record.getId()) && e.getType() == 1).collect(Collectors.toList()).size());
record.setOtherWorker(list.stream().filter(e -> e.getCourseId().equals(record.getId()) && e.getType() == 2).collect(Collectors.toList()).size());
if (CollUtil.isNotEmpty(ids)) {
List<ExamCourseRecord> list = examCourseRecordService.list(Wrappers.<ExamCourseRecord>lambdaQuery().in(ExamCourseRecord::getCourseId, ids));
for (ExamCourseVo record : examCourseVoPage.getRecords()) {
record.setRequiredWorker(list.stream().filter(e -> e.getCourseId().equals(record.getId()) && e.getType() == 1).collect(Collectors.toList()).size());
record.setOtherWorker(list.stream().filter(e -> e.getCourseId().equals(record.getId()) && e.getType() == 2).collect(Collectors.toList()).size());
}
}
return Result.success(examCourseVoPage);
}

View File

@ -287,6 +287,7 @@ public class VideoItemServiceImpl extends ServiceImpl<VideoItemMapper, VideoItem
projectVideoConfig.getPassword(), projectVideoConfig.getAppId(), projectVideoConfig.getAppSecret());
Map<String, Object> result = new HashMap<>();
result.put("url", url);
result.put("serialNumber", videoItem.getSerialNumber());
data.put("videoInfo", result);
data.put("projectVideoConfig", projectVideoConfig);
}

View File

@ -115,6 +115,8 @@ public class XzDangerousEngineeringAcceptance implements Serializable {
private java.util.Date updateTime;
@ApiModelProperty(value = "1危大2动火3受限空间4盲板抽堵5高出6吊装7临时用电8动土9断路")
private Integer type;
@ApiModelProperty(value = "作业票编号")
private String workTicketCode;
@TableField(exist = false)
@ApiModelProperty(value = "危大工程名称(显示用,新增不用传)")

View File

@ -42,10 +42,11 @@
and project_sn = #{param.projectSn}
</if>
<if test="param.engineeringId != null and param.engineeringId != ''">
and enterprise_id = #{param.engineeringId}
and engineering_id = #{param.engineeringId}
</if>
AND `status` in (2, 3, 4)
AND type = 5 BY engineering_id) tp ON t.id = tp.engineering_id
AND type = 5
group BY engineering_id) tp ON t.id = tp.engineering_id
</sql>
<select id="queryList" resultType="com.zhgd.xmgl.modules.xz.special.entity.XzHighJobSafe">
<include refid="selectTable">