安全、质量
This commit is contained in:
@ -115,6 +115,7 @@ public class QltQualityInspectionVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 整改人姓名
|
* 整改人姓名
|
||||||
*/
|
*/
|
||||||
|
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "correctorId")
|
||||||
private String correctorName;
|
private String correctorName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -187,6 +188,7 @@ public class QltQualityInspectionVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 创建者名称
|
* 创建者名称
|
||||||
*/
|
*/
|
||||||
|
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
|
||||||
private String createByName;
|
private String createByName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,7 +38,6 @@ import org.dromara.quality.mapper.QltQualityInspectionMapper;
|
|||||||
import org.dromara.quality.service.IQltQualityInspectionService;
|
import org.dromara.quality.service.IQltQualityInspectionService;
|
||||||
import org.dromara.system.domain.vo.SysDictDataVo;
|
import org.dromara.system.domain.vo.SysDictDataVo;
|
||||||
import org.dromara.system.domain.vo.SysOssVo;
|
import org.dromara.system.domain.vo.SysOssVo;
|
||||||
import org.dromara.system.domain.vo.SysUserVo;
|
|
||||||
import org.dromara.system.service.ISysDictDataService;
|
import org.dromara.system.service.ISysDictDataService;
|
||||||
import org.dromara.system.service.ISysDictTypeService;
|
import org.dromara.system.service.ISysDictTypeService;
|
||||||
import org.dromara.system.service.ISysOssService;
|
import org.dromara.system.service.ISysOssService;
|
||||||
@ -56,7 +55,6 @@ import java.nio.file.Path;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -268,23 +266,6 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
return qualityInspectionVo;
|
return qualityInspectionVo;
|
||||||
}
|
}
|
||||||
BeanUtils.copyProperties(qualityInspection, qualityInspectionVo);
|
BeanUtils.copyProperties(qualityInspection, qualityInspectionVo);
|
||||||
// 关联项目信息
|
|
||||||
Long projectId = qualityInspection.getProjectId();
|
|
||||||
if (projectId != null) {
|
|
||||||
qualityInspectionVo.setProjectName(projectService.getById(projectId).getProjectName());
|
|
||||||
}
|
|
||||||
// 关联创建用户信息
|
|
||||||
Long createBy = qualityInspection.getCreateBy();
|
|
||||||
if (createBy != null) {
|
|
||||||
SysUserVo sysUserVo = userService.selectUserById(createBy);
|
|
||||||
qualityInspectionVo.setCreateByName(sysUserVo.getNickName());
|
|
||||||
}
|
|
||||||
// 关联整改人信息
|
|
||||||
Long correctorId = qualityInspection.getCorrectorId();
|
|
||||||
if (correctorId != null) {
|
|
||||||
SysUserVo user = userService.selectUserById(correctorId);
|
|
||||||
qualityInspectionVo.setCorrectorName(user.getNickName());
|
|
||||||
}
|
|
||||||
// 关联附件信息
|
// 关联附件信息
|
||||||
String inspectionFile = qualityInspection.getInspectionFile();
|
String inspectionFile = qualityInspection.getInspectionFile();
|
||||||
if (StringUtils.isNotBlank(inspectionFile)) {
|
if (StringUtils.isNotBlank(inspectionFile)) {
|
||||||
@ -365,13 +346,6 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
if (CollUtil.isEmpty(qualityInspectionList)) {
|
if (CollUtil.isEmpty(qualityInspectionList)) {
|
||||||
return qualityInspectionVoPage;
|
return qualityInspectionVoPage;
|
||||||
}
|
}
|
||||||
// 获取整改人、创建用户信息
|
|
||||||
List<Long> userIdList = Stream.concat(
|
|
||||||
qualityInspectionList.stream().map(QltQualityInspection::getCorrectorId),
|
|
||||||
qualityInspectionList.stream().map(QltQualityInspection::getCreateBy)
|
|
||||||
).distinct().toList();
|
|
||||||
List<SysUserVo> userVoList = userService.selectUserByIds(userIdList, null);
|
|
||||||
Map<Long, String> userMap = userVoList.stream().collect(Collectors.toMap(SysUserVo::getUserId, SysUserVo::getNickName));
|
|
||||||
// 获取附件信息
|
// 获取附件信息
|
||||||
List<Long> ossInspectionFileIdList = qualityInspectionList.stream().map(QltQualityInspection::getInspectionFile).filter(StringUtils::isNotBlank)
|
List<Long> ossInspectionFileIdList = qualityInspectionList.stream().map(QltQualityInspection::getInspectionFile).filter(StringUtils::isNotBlank)
|
||||||
.flatMap(fileId -> Arrays.stream(fileId.split(",")).map(Long::parseLong)).distinct().toList();
|
.flatMap(fileId -> Arrays.stream(fileId.split(",")).map(Long::parseLong)).distinct().toList();
|
||||||
@ -395,20 +369,6 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
List<QltQualityInspectionVo> qualityInspectionVoList = qualityInspectionList.stream().map(qualityInspection -> {
|
List<QltQualityInspectionVo> qualityInspectionVoList = qualityInspectionList.stream().map(qualityInspection -> {
|
||||||
QltQualityInspectionVo qualityInspectionVo = new QltQualityInspectionVo();
|
QltQualityInspectionVo qualityInspectionVo = new QltQualityInspectionVo();
|
||||||
BeanUtils.copyProperties(qualityInspection, qualityInspectionVo);
|
BeanUtils.copyProperties(qualityInspection, qualityInspectionVo);
|
||||||
// 关联整改人信息
|
|
||||||
Long correctorId = qualityInspection.getCorrectorId();
|
|
||||||
String correctorName = null;
|
|
||||||
if (userMap.containsKey(correctorId)) {
|
|
||||||
correctorName = userMap.get(correctorId);
|
|
||||||
}
|
|
||||||
qualityInspectionVo.setCorrectorName(correctorName);
|
|
||||||
// 关联创建用户信息
|
|
||||||
Long createBy = qualityInspection.getCreateBy();
|
|
||||||
String createByName = null;
|
|
||||||
if (userMap.containsKey(createBy)) {
|
|
||||||
createByName = userMap.get(createBy);
|
|
||||||
}
|
|
||||||
qualityInspectionVo.setCreateByName(createByName);
|
|
||||||
// 关联附件信息
|
// 关联附件信息
|
||||||
String inspectionFile = qualityInspection.getInspectionFile();
|
String inspectionFile = qualityInspection.getInspectionFile();
|
||||||
List<SysOssVo> inspectionFileList = new ArrayList<>();
|
List<SysOssVo> inspectionFileList = new ArrayList<>();
|
||||||
|
@ -20,6 +20,11 @@ public class HseSafetyInspectionQueryReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查项目
|
||||||
|
*/
|
||||||
|
private String checkProject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查类型
|
* 检查类型
|
||||||
*/
|
*/
|
||||||
|
@ -25,6 +25,16 @@ public class HseSafetyLogQueryReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String dateOfOccurrence;
|
private String dateOfOccurrence;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进展
|
||||||
|
*/
|
||||||
|
private String progress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业内容
|
||||||
|
*/
|
||||||
|
private String jobContent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
|
@ -77,6 +77,7 @@ public class HseSafetyInspectionVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 整改人名字
|
* 整改人名字
|
||||||
*/
|
*/
|
||||||
|
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "correctorId")
|
||||||
private String correctorName;
|
private String correctorName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -169,11 +170,12 @@ public class HseSafetyInspectionVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 创建人id
|
* 创建人id
|
||||||
*/
|
*/
|
||||||
private Long creatorId;
|
private Long createBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人名字
|
* 创建人名字
|
||||||
*/
|
*/
|
||||||
|
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
|
||||||
private String creatorName;
|
private String creatorName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,9 @@ public class HseTeamMeetingVo implements Serializable {
|
|||||||
@ExcelProperty(value = "项目id")
|
@ExcelProperty(value = "项目id")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
|
@Translation(type = TransConstant.PROJECT_ID_TO_NAME, mapper = "projectId")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班组id
|
* 班组id
|
||||||
*/
|
*/
|
||||||
|
@ -46,6 +46,7 @@ import org.dromara.system.domain.vo.SysUserVo;
|
|||||||
import org.dromara.system.service.ISysDictDataService;
|
import org.dromara.system.service.ISysDictDataService;
|
||||||
import org.dromara.system.service.ISysOssService;
|
import org.dromara.system.service.ISysOssService;
|
||||||
import org.dromara.system.service.ISysUserService;
|
import org.dromara.system.service.ISysUserService;
|
||||||
|
import org.dromara.websocket.ChatServerHandler;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -94,6 +95,9 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
@Resource
|
@Resource
|
||||||
private IHseTeamMeetingService teamMeetingService;
|
private IHseTeamMeetingService teamMeetingService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ChatServerHandler chatServerHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全巡检工单
|
* 查询安全巡检工单
|
||||||
*
|
*
|
||||||
@ -207,6 +211,15 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
if (!save) {
|
if (!save) {
|
||||||
throw new ServiceException("新增安全巡检工单信息失败,数据库异常", HttpStatus.ERROR);
|
throw new ServiceException("新增安全巡检工单信息失败,数据库异常", HttpStatus.ERROR);
|
||||||
}
|
}
|
||||||
|
// 向整改人发送消息
|
||||||
|
Long correctorId = req.getCorrectorId();
|
||||||
|
if (correctorId != null) {
|
||||||
|
String title = "您有新的安全巡检工单,请及时查看!";
|
||||||
|
if (req.getIsReply().equals("1")) {
|
||||||
|
title = "您有新的安全巡检工单需要整改,请及时处理!";
|
||||||
|
}
|
||||||
|
chatServerHandler.sendSystemMessageToUser(correctorId, title);
|
||||||
|
}
|
||||||
// 返回新写入的数据
|
// 返回新写入的数据
|
||||||
return safetyInspection.getId();
|
return safetyInspection.getId();
|
||||||
}
|
}
|
||||||
@ -286,19 +299,6 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
safetyInspectionVo.setRectificationName(team.getTeamName());
|
safetyInspectionVo.setRectificationName(team.getTeamName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 关联整改人信息
|
|
||||||
Long correctorId = safetyInspection.getCorrectorId();
|
|
||||||
if (correctorId != null) {
|
|
||||||
SysUserVo constructionUser = userService.selectUserById(correctorId);
|
|
||||||
safetyInspectionVo.setCorrectorName(constructionUser.getUserName());
|
|
||||||
}
|
|
||||||
// 关联创建用户信息
|
|
||||||
Long createBy = safetyInspection.getCreateBy();
|
|
||||||
if (createBy != null) {
|
|
||||||
SysUserVo createUser = userService.selectUserById(createBy);
|
|
||||||
safetyInspectionVo.setCreatorId(createUser.getUserId());
|
|
||||||
safetyInspectionVo.setCreatorName(createUser.getNickName());
|
|
||||||
}
|
|
||||||
return safetyInspectionVo;
|
return safetyInspectionVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,6 +315,7 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
Long projectId = req.getProjectId();
|
Long projectId = req.getProjectId();
|
||||||
|
String checkProject = req.getCheckProject();
|
||||||
String checkType = req.getCheckType();
|
String checkType = req.getCheckType();
|
||||||
String violationType = req.getViolationType();
|
String violationType = req.getViolationType();
|
||||||
String rectificationUnit = req.getRectificationUnit();
|
String rectificationUnit = req.getRectificationUnit();
|
||||||
@ -323,6 +324,7 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
String reviewType = req.getReviewType();
|
String reviewType = req.getReviewType();
|
||||||
// 精准查询
|
// 精准查询
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), HseSafetyInspection::getProjectId, projectId);
|
lqw.eq(ObjectUtils.isNotEmpty(projectId), HseSafetyInspection::getProjectId, projectId);
|
||||||
|
lqw.like(StringUtils.isNotBlank(checkProject), HseSafetyInspection::getCheckProject, checkProject);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(rectificationId), HseSafetyInspection::getRectificationId, rectificationId);
|
lqw.eq(ObjectUtils.isNotEmpty(rectificationId), HseSafetyInspection::getRectificationId, rectificationId);
|
||||||
lqw.eq(StringUtils.isNotBlank(checkType), HseSafetyInspection::getCheckType, checkType);
|
lqw.eq(StringUtils.isNotBlank(checkType), HseSafetyInspection::getCheckType, checkType);
|
||||||
lqw.eq(StringUtils.isNotBlank(violationType), HseSafetyInspection::getViolationType, violationType);
|
lqw.eq(StringUtils.isNotBlank(violationType), HseSafetyInspection::getViolationType, violationType);
|
||||||
@ -367,20 +369,6 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
List<HseSafetyInspectionVo> safetyInspectionVoList = safetyInspectionList.stream().map(inspection -> {
|
List<HseSafetyInspectionVo> safetyInspectionVoList = safetyInspectionList.stream().map(inspection -> {
|
||||||
HseSafetyInspectionVo qualityInspectionVo = new HseSafetyInspectionVo();
|
HseSafetyInspectionVo qualityInspectionVo = new HseSafetyInspectionVo();
|
||||||
BeanUtils.copyProperties(inspection, qualityInspectionVo);
|
BeanUtils.copyProperties(inspection, qualityInspectionVo);
|
||||||
// 关联整改人信息
|
|
||||||
Long correctorId = inspection.getCorrectorId();
|
|
||||||
String correctorName = null;
|
|
||||||
if (userMap.containsKey(correctorId)) {
|
|
||||||
correctorName = userMap.get(correctorId);
|
|
||||||
}
|
|
||||||
qualityInspectionVo.setCorrectorName(correctorName);
|
|
||||||
// 关联创建用户信息
|
|
||||||
Long createBy = inspection.getCreateBy();
|
|
||||||
String createByName = null;
|
|
||||||
if (userMap.containsKey(createBy)) {
|
|
||||||
createByName = userMap.get(createBy);
|
|
||||||
}
|
|
||||||
qualityInspectionVo.setCreatorName(createByName);
|
|
||||||
return qualityInspectionVo;
|
return qualityInspectionVo;
|
||||||
}).toList();
|
}).toList();
|
||||||
safetyInspectionVoPage.setRecords(safetyInspectionVoList);
|
safetyInspectionVoPage.setRecords(safetyInspectionVoList);
|
||||||
@ -480,6 +468,10 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
}*/
|
}*/
|
||||||
HseSafetyInspection updateInspection = new HseSafetyInspection();
|
HseSafetyInspection updateInspection = new HseSafetyInspection();
|
||||||
BeanUtils.copyProperties(req, updateInspection);
|
BeanUtils.copyProperties(req, updateInspection);
|
||||||
|
if (safetyInspection.getCreateBy() != null && safetyInspection.getIsReply().equals("1")) {
|
||||||
|
chatServerHandler.sendSystemMessageToUser(safetyInspection.getCreateBy(),
|
||||||
|
"安全巡检工单【" + safetyInspection.getCheckProject() + "】已整改,请及时复查!");
|
||||||
|
}
|
||||||
// 填充默认值
|
// 填充默认值
|
||||||
updateInspection.setId(id);
|
updateInspection.setId(id);
|
||||||
updateInspection.setRectificationTime(new Date());
|
updateInspection.setRectificationTime(new Date());
|
||||||
@ -501,6 +493,10 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
if (safetyInspection == null) {
|
if (safetyInspection == null) {
|
||||||
throw new ServiceException("安全巡检工单信息不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("安全巡检工单信息不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
// 校验是否需要复查
|
||||||
|
if (!safetyInspection.getIsReply().equals("2")) {
|
||||||
|
throw new ServiceException("该安全巡检工单仅通知", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
// 校验是否已整改
|
// 校验是否已整改
|
||||||
if (!safetyInspection.getStatus().equals(HseSafetyInspectionStatusEnum.RECTIFICATION.getValue())) {
|
if (!safetyInspection.getStatus().equals(HseSafetyInspectionStatusEnum.RECTIFICATION.getValue())) {
|
||||||
throw new ServiceException("该安全巡检工单信息未整改,无法进行复查", HttpStatus.BAD_REQUEST);
|
throw new ServiceException("该安全巡检工单信息未整改,无法进行复查", HttpStatus.BAD_REQUEST);
|
||||||
|
@ -200,6 +200,8 @@ public class HseSafetyLogServiceImpl extends ServiceImpl<HseSafetyLogMapper, Hse
|
|||||||
}
|
}
|
||||||
Long projectId = req.getProjectId();
|
Long projectId = req.getProjectId();
|
||||||
String dateOfOccurrence = req.getDateOfOccurrence();
|
String dateOfOccurrence = req.getDateOfOccurrence();
|
||||||
|
String progress = req.getProgress();
|
||||||
|
String jobContent = req.getJobContent();
|
||||||
String creatorName = req.getCreatorName();
|
String creatorName = req.getCreatorName();
|
||||||
// 联表查询
|
// 联表查询
|
||||||
if (StringUtils.isNotBlank(creatorName)) {
|
if (StringUtils.isNotBlank(creatorName)) {
|
||||||
@ -211,6 +213,9 @@ public class HseSafetyLogServiceImpl extends ServiceImpl<HseSafetyLogMapper, Hse
|
|||||||
lqw.in(HseSafetyLog::getCreateBy, userIds);
|
lqw.in(HseSafetyLog::getCreateBy, userIds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 模糊查询
|
||||||
|
lqw.like(StringUtils.isNotBlank(progress), HseSafetyLog::getProgress, progress);
|
||||||
|
lqw.like(StringUtils.isNotBlank(jobContent), HseSafetyLog::getJobContent, jobContent);
|
||||||
// 精确查询
|
// 精确查询
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), HseSafetyLog::getProjectId, projectId);
|
lqw.eq(ObjectUtils.isNotEmpty(projectId), HseSafetyLog::getProjectId, projectId);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(dateOfOccurrence), HseSafetyLog::getDateOfOccurrence, dateOfOccurrence);
|
lqw.eq(ObjectUtils.isNotEmpty(dateOfOccurrence), HseSafetyLog::getDateOfOccurrence, dateOfOccurrence);
|
||||||
|
@ -33,6 +33,7 @@ import org.dromara.safety.service.IHseViolationLevelService;
|
|||||||
import org.dromara.safety.service.IHseViolationRecordService;
|
import org.dromara.safety.service.IHseViolationRecordService;
|
||||||
import org.dromara.system.domain.vo.SysUserVo;
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
import org.dromara.system.service.ISysUserService;
|
import org.dromara.system.service.ISysUserService;
|
||||||
|
import org.dromara.websocket.ChatServerHandler;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -70,6 +71,9 @@ public class HseViolationRecordServiceImpl extends ServiceImpl<HseViolationRecor
|
|||||||
@Resource
|
@Resource
|
||||||
private SseProperties sseProperties;
|
private SseProperties sseProperties;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ChatServerHandler chatServerHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询违规记录
|
* 查询违规记录
|
||||||
*
|
*
|
||||||
@ -224,10 +228,8 @@ public class HseViolationRecordServiceImpl extends ServiceImpl<HseViolationRecor
|
|||||||
}
|
}
|
||||||
String processType = req.getProcessType();
|
String processType = req.getProcessType();
|
||||||
HseViolationRecord violationRecord = new HseViolationRecord();
|
HseViolationRecord violationRecord = new HseViolationRecord();
|
||||||
if (Objects.equals(processType, "0")) {
|
BeanUtils.copyProperties(req, violationRecord);
|
||||||
// 仅通知
|
if (Objects.equals(processType, "1")) {
|
||||||
violationRecord.setProcessType(processType);
|
|
||||||
} else if (Objects.equals(processType, "1")) {
|
|
||||||
// 判断字段是否为空
|
// 判断字段是否为空
|
||||||
if (StringUtils.isBlank(req.getRectificationUnit()) || req.getRectificationId() == null) {
|
if (StringUtils.isBlank(req.getRectificationUnit()) || req.getRectificationId() == null) {
|
||||||
throw new ServiceException("整改单位信息不能为空", HttpStatus.BAD_REQUEST);
|
throw new ServiceException("整改单位信息不能为空", HttpStatus.BAD_REQUEST);
|
||||||
@ -242,11 +244,10 @@ public class HseViolationRecordServiceImpl extends ServiceImpl<HseViolationRecor
|
|||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new ServiceException("处理人信息不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("处理人信息不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
violationRecord.setId(id);
|
}
|
||||||
violationRecord.setCorrectorId(correctorId);
|
if (req.getCorrectorId() != null) {
|
||||||
violationRecord.setDisposeDeadline(disposeDeadline);
|
chatServerHandler.sendSystemMessageToUser(req.getCorrectorId(),
|
||||||
violationRecord.setProcessType(processType);
|
"您有一份新的违章工单,请及时处理!工单号为:" + violationRecord.getId());
|
||||||
violationRecord.setRemark(req.getRemark());
|
|
||||||
}
|
}
|
||||||
boolean result = this.updateById(violationRecord);
|
boolean result = this.updateById(violationRecord);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
Reference in New Issue
Block a user