bug修改
This commit is contained in:
parent
5515b91376
commit
0f2d08e1dc
@ -76,7 +76,7 @@ public class ExamTrain implements Serializable {
|
||||
*/
|
||||
@Excel(name = "时长(小时)", width = 15)
|
||||
@ApiModelProperty(value = "时长(小时)")
|
||||
private String duration;
|
||||
private Integer duration;
|
||||
/**
|
||||
* 实施单位
|
||||
*/
|
||||
|
||||
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||
import com.zhgd.xmgl.modules.exam.entity.ExamCourseRecord;
|
||||
import com.zhgd.xmgl.modules.exam.entity.ExamPaper;
|
||||
import com.zhgd.xmgl.modules.exam.entity.ExamTrain;
|
||||
import com.zhgd.xmgl.modules.exam.entity.ExamTrainRecord;
|
||||
import com.zhgd.xmgl.modules.exam.mapper.ExamTrainMapper;
|
||||
@ -76,12 +77,12 @@ public class ExamTrainServiceImpl extends ServiceImpl<ExamTrainMapper, ExamTrain
|
||||
@Override
|
||||
public boolean saveInfo(ExamTrain examTrain) {
|
||||
List<ExamTrainRecord> recordList = examTrain.getExamTrainRecordList();
|
||||
Integer passLine = 0;
|
||||
if (examTrain.getExamPaperId() != null) {
|
||||
passLine = examPaperService.getById(examTrain.getExamPaperId()).getPassLine();
|
||||
ExamPaper examPaper = examPaperService.getById(examTrain.getExamPaperId());
|
||||
examTrain.setPassLine(examPaper.getPassLine());
|
||||
examTrain.setDuration(examPaper.getDuration());
|
||||
}
|
||||
UserInfo user = SecurityUtils.getUser();
|
||||
examTrain.setPassLine(passLine);
|
||||
examTrain.setCreateBy(user.getUserId().toString());
|
||||
examTrain.setWorkerNum(recordList.size());
|
||||
boolean flag = this.save(examTrain);
|
||||
|
||||
@ -956,6 +956,9 @@
|
||||
<if test="teamName != null and teamName != ''">
|
||||
and e.team_name like CONCAT(CONCAT('%', #{teamName}), '%')
|
||||
</if>
|
||||
<if test="departmentTeamName != null and departmentTeamName != ''">
|
||||
and e.team_name like CONCAT(CONCAT('%', #{departmentTeamName}), '%')
|
||||
</if>
|
||||
<if test="enterpriseId != null and enterpriseId != ''">
|
||||
and e.enterprise_id = #{enterpriseId}
|
||||
</if>
|
||||
@ -993,8 +996,8 @@
|
||||
) tp2 ON e.id = tp2.department_id
|
||||
LEFT JOIN enterprise_info b ON e.enterprise_id = b.id
|
||||
WHERE e.project_sn = #{projectSn}
|
||||
<if test="teamName != null and teamName != ''">
|
||||
and e.team_name like CONCAT(CONCAT('%', #{teamName}), '%')
|
||||
<if test="departmentTeamName != null and departmentTeamName != ''">
|
||||
and e.department_name like CONCAT(CONCAT('%', #{departmentTeamName}), '%')
|
||||
</if>
|
||||
<if test="enterpriseId != null and enterpriseId != ''">
|
||||
and e.enterprise_id = #{enterpriseId}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.zhgd.xmgl.task;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zhgd.xmgl.modules.exam.entity.*;
|
||||
import com.zhgd.xmgl.modules.exam.service.*;
|
||||
@ -75,14 +76,14 @@ public class ExamTask {
|
||||
if (examTrainRecordList.get(i1).getScore() == null) {
|
||||
ExamNotice exist = examNoticeService.getOne(Wrappers.<ExamNotice>lambdaQuery().eq(ExamNotice::getWorkerId, examTrainRecordList.get(i1).getWorkerId())
|
||||
.eq(ExamNotice::getRecordId, examTrainRecordList.get(i1).getId())
|
||||
.eq(ExamNotice::getContent, "参加安全教育培训"));
|
||||
.eq(ExamNotice::getType, 1));
|
||||
if (exist == null) {
|
||||
WorkerInfo workerInfo = workerInfoService.getById(examTrainRecordList.get(i1).getWorkerId());
|
||||
ExamNotice examNotice = new ExamNotice();
|
||||
examNotice.setWorkerId(examTrainRecordList.get(i1).getWorkerId().toString());
|
||||
examNotice.setWorkerName(examTrainRecordList.get(i1).getWorkerName());
|
||||
examNotice.setType(1);
|
||||
examNotice.setContent("参加安全教育培训");
|
||||
examNotice.setContent(StrUtil.format("参加《{}》安全教育培训", examTrainList.get(j).getName()));
|
||||
examNotice.setProjectSn(list.get(i).getProjectSn());
|
||||
examNotice.setEnterpriseId(workerInfo.getEnterpriseId());
|
||||
examNotice.setRecordId(examTrainRecordList.get(i1).getId());
|
||||
@ -96,14 +97,14 @@ public class ExamTask {
|
||||
if (examCourseRecords.get(i2).getNumber() == null || examCourseRecords.get(i2).getNumber() == 0) {
|
||||
ExamNotice exist = examNoticeService.getOne(Wrappers.<ExamNotice>lambdaQuery().eq(ExamNotice::getWorkerId, examCourseRecords.get(i2).getWorkerId())
|
||||
.eq(ExamNotice::getRecordId, examCourseRecords.get(i2).getId())
|
||||
.eq(ExamNotice::getContent, "参加安全教育课程学习"));
|
||||
.eq(ExamNotice::getType, 2));
|
||||
if (exist == null) {
|
||||
WorkerInfo workerInfo = workerInfoService.getById(examCourseRecords.get(i2).getWorkerId());
|
||||
ExamNotice examNotice = new ExamNotice();
|
||||
examNotice.setWorkerId(examCourseRecords.get(i2).getWorkerId().toString());
|
||||
examNotice.setWorkerName(examCourseRecords.get(i2).getWorkerName());
|
||||
examNotice.setType(1);
|
||||
examNotice.setContent("参加安全教育课程学习");
|
||||
examNotice.setType(2);
|
||||
examNotice.setContent(StrUtil.format("参加《{}》安全教育课程学习", examTrainList.get(j).getName()));
|
||||
examNotice.setProjectSn(list.get(i).getProjectSn());
|
||||
examNotice.setEnterpriseId(workerInfo.getEnterpriseId());
|
||||
examNotice.setRecordId(examCourseRecords.get(i2).getId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user