安全、质量

This commit is contained in:
lcj
2025-09-15 09:27:47 +08:00
parent 5b94ae37cd
commit 2d7f9ea42d
22 changed files with 114 additions and 77 deletions

View File

@ -16,7 +16,7 @@ spring.boot.admin.client:
--- # snail-job 配置 --- # snail-job 配置
snail-job: snail-job:
enabled: false enabled: true
# 需要在 SnailJob 后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务 # 需要在 SnailJob 后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务
group: "ruoyi_group" group: "ruoyi_group"
# SnailJob 接入验证令牌 详见 script/sql/ry_job.sql `sj_group_config`表 # SnailJob 接入验证令牌 详见 script/sql/ry_job.sql `sj_group_config`表

View File

@ -2,9 +2,9 @@ spring:
datasource: datasource:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true url: jdbc:mysql://192.168.110.2:13386/xinnengyuan?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: root username: xinnengyuan
password: root password: mEZPC5Sdf3r2HENi
hikari: hikari:
connection-timeout: 30000 connection-timeout: 30000
validation-timeout: 5000 validation-timeout: 5000
@ -43,7 +43,7 @@ snail-job:
spring.boot.admin.client: spring.boot.admin.client:
# 增加客户端开关 # 增加客户端开关
enabled: true enabled: true
url: http://localhost:9090/admin url: http://192.168.110.2:19191/admin
instance: instance:
service-host-type: IP service-host-type: IP
metadata: metadata:

View File

@ -1,5 +1,5 @@
server: server:
port: 8800 port: 18833
servlet: servlet:
context-path: /snail-job context-path: /snail-job

View File

@ -703,24 +703,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
} }
// 解密身份证号码 // 解密身份证号码
String decrypt = idCardEncryptorUtil.decrypt(constructionUserVo.getSfzNumber()); String decrypt = idCardEncryptorUtil.decrypt(constructionUserVo.getSfzNumber());
String hide = ""; constructionUserVo.setSfzNumber(decrypt);
if (StringUtils.isNotEmpty(decrypt)) {
if (isHidden) {
hide = DesensitizedUtil.idCardNum(decrypt, 1, 2);
} else {
hide = decrypt;
}
}
constructionUserVo.setSfzNumber(hide);
// 隐藏
if (isHidden) {
// 隐藏手机号码
String hidePhone = DesensitizedUtil.mobilePhone(constructionUserVo.getPhone());
constructionUserVo.setPhone(hidePhone);
// 隐藏银行卡号
String hideBank = DesensitizedUtil.bankCard(constructionUserVo.getYhkNumber());
constructionUserVo.setYhkNumber(hideBank);
}
// 计算年龄 // 计算年龄
LocalDate sfzBirth = constructionUser.getSfzBirth(); LocalDate sfzBirth = constructionUser.getSfzBirth();
if (sfzBirth != null) { if (sfzBirth != null) {
@ -1316,12 +1299,12 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
Page<SubConstructionUser> result = this.page(pageQuery.build(), lqw); Page<SubConstructionUser> result = this.page(pageQuery.build(), lqw);
ArrayList<SubConstructionUserAppVo> list = new ArrayList<>(); ArrayList<SubConstructionUserAppVo> list = new ArrayList<>();
for ( SubConstructionUser constructionUser : result.getRecords()){ for (SubConstructionUser constructionUser : result.getRecords()) {
SubConstructionUserAppVo subConstructionUserAppVo = new SubConstructionUserAppVo(); SubConstructionUserAppVo subConstructionUserAppVo = new SubConstructionUserAppVo();
BeanUtils.copyProperties(constructionUser, subConstructionUserAppVo); BeanUtils.copyProperties(constructionUser, subConstructionUserAppVo);
SysUserVo sysUserVo = userService.selectUserById(subConstructionUserAppVo.getSysUserId()); SysUserVo sysUserVo = userService.selectUserById(subConstructionUserAppVo.getSysUserId());
if(sysUserVo.getAvatar() != null) if (sysUserVo.getAvatar() != null)
subConstructionUserAppVo.setAvatar(ossService.getById(sysUserVo.getAvatar()).getUrl()); subConstructionUserAppVo.setAvatar(ossService.getById(sysUserVo.getAvatar()).getUrl());
//计算日期 //计算日期
Date createTime = sysUserVo.getCreateTime(); Date createTime = sysUserVo.getCreateTime();
Instant createInstant = createTime.toInstant(); Instant createInstant = createTime.toInstant();
@ -1337,6 +1320,6 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
} }
return new TableDataInfo<>(list,result.getTotal()); return new TableDataInfo<>(list, result.getTotal());
} }
} }

View File

@ -80,6 +80,16 @@ public class BusProjectController extends BaseController {
return R.ok(projectService.querySubProjectMatrixList(id)); return R.ok(projectService.querySubProjectMatrixList(id));
} }
/**
* 根据 id 查询项目以及项目下的分包公司、班组列表
*/
@SaCheckPermission("project:project:contractorTeamList")
@GetMapping("/contractorTeamList/{id}")
public R<BusProjectContractorTeamListVo> listContractorListById(@NotNull(message = "主键不能为空")
@PathVariable Long id) {
return R.ok(projectService.queryContractorTeamListById(id));
}
/** /**
* 导出项目列表 * 导出项目列表
*/ */

View File

@ -21,7 +21,7 @@ import java.io.Serial;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@TableName("bus_attendance_copy1") @TableName("bus_attendance")
public class BusAttendance extends BaseEntity { public class BusAttendance extends BaseEntity {
@Serial @Serial

View File

@ -15,6 +15,7 @@ import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.satoken.utils.LoginHelper; import org.dromara.common.satoken.utils.LoginHelper;
import org.dromara.common.utils.IdCardEncryptorUtil;
import org.dromara.contractor.domain.SubConstructionUser; import org.dromara.contractor.domain.SubConstructionUser;
import org.dromara.contractor.service.ISubConstructionUserService; import org.dromara.contractor.service.ISubConstructionUserService;
import org.dromara.project.domain.BusConstructionUserExit; import org.dromara.project.domain.BusConstructionUserExit;
@ -65,6 +66,9 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
@Resource @Resource
private IBusProjectService projectService; private IBusProjectService projectService;
@Resource
private IdCardEncryptorUtil idCardEncryptorUtil;
@Resource @Resource
private IBusConstructionBlacklistService constructionBlacklistService; private IBusConstructionBlacklistService constructionBlacklistService;
@ -162,8 +166,7 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
.set(SubConstructionUser::getEntryDate, new Date()) .set(SubConstructionUser::getEntryDate, new Date())
.set(SubConstructionUser::getLeaveDate, null) .set(SubConstructionUser::getLeaveDate, null)
.set(SubConstructionUser::getExitStatus, "0") .set(SubConstructionUser::getExitStatus, "0")
.set(constructionUser.getFirstDate()==null,SubConstructionUser::getFirstDate, LocalDate.now()) .set(constructionUser.getFirstDate() == null, SubConstructionUser::getFirstDate, LocalDate.now());
;
constructionUserService.update(constructionUserLuw); constructionUserService.update(constructionUserLuw);
@ -171,7 +174,7 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
.eq(BusUserProjectRelevancy::getUserId, constructionUser.getSysUserId()) .eq(BusUserProjectRelevancy::getUserId, constructionUser.getSysUserId())
.eq(BusUserProjectRelevancy::getProjectId, req.getProjectId()) .eq(BusUserProjectRelevancy::getProjectId, req.getProjectId())
); );
if(CollectionUtil.isEmpty(list)){ if (CollectionUtil.isEmpty(list)) {
BusUserProjectRelevancy relevancy = new BusUserProjectRelevancy(); BusUserProjectRelevancy relevancy = new BusUserProjectRelevancy();
relevancy.setUserId(constructionUser.getSysUserId()); relevancy.setUserId(constructionUser.getSysUserId());
relevancy.setProjectId(req.getProjectId()); relevancy.setProjectId(req.getProjectId());
@ -283,7 +286,11 @@ public class BusProjectTeamMemberServiceImpl extends ServiceImpl<BusProjectTeamM
constructionUserExit.setSalaryVoucherFile(salaryVoucherFile); constructionUserExit.setSalaryVoucherFile(salaryVoucherFile);
constructionUserExit.setSalaryConfirmationFile(salaryConfirmationFile); constructionUserExit.setSalaryConfirmationFile(salaryConfirmationFile);
constructionUserExit.setTeamId(constructionUser.getTeamId()); constructionUserExit.setTeamId(constructionUser.getTeamId());
constructionUserExit.setSfzNumber(constructionUser.getSfzNumber()); String sfzNumber = constructionUser.getSfzNumber();
if (StringUtils.isNotBlank(sfzNumber)) {
sfzNumber = idCardEncryptorUtil.decrypt(sfzNumber);
constructionUserExit.setSfzNumber(sfzNumber);
}
constructionUserExit.setEntryDate(constructionUser.getEntryDate()); constructionUserExit.setEntryDate(constructionUser.getEntryDate());
constructionUserExit.setLeaveDate(new Date()); constructionUserExit.setLeaveDate(new Date());
constructionUserExit.setRemark(req.getRemark()); constructionUserExit.setRemark(req.getRemark());

View File

@ -13,6 +13,8 @@ import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseController; import org.dromara.common.web.core.BaseController;
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
import org.dromara.project.service.IBusProjectTeamService;
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionCreateReq; import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionCreateReq;
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionGisReq; import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionGisReq;
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq; import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq;
@ -39,6 +41,8 @@ public class QltQualityInspectionController extends BaseController {
private final IQltQualityInspectionService qualityInspectionService; private final IQltQualityInspectionService qualityInspectionService;
private final IBusProjectTeamService busProjectTeamService;
/** /**
* 查询质量-检查工单列表 * 查询质量-检查工单列表
*/ */
@ -124,4 +128,13 @@ public class QltQualityInspectionController extends BaseController {
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(qualityInspectionService.deleteWithValidByIds(List.of(ids), true)); return toAjax(qualityInspectionService.deleteWithValidByIds(List.of(ids), true));
} }
/**
* 整改人选择列表
*/
@GetMapping("/listForeman/{projectId}")
public R<List<BusProjectTeamForemanVo>> listForeman(@NotNull(message = "项目id不能为空")
@PathVariable Long projectId) {
return R.ok(busProjectTeamService.queryForemanListByProjectId(projectId));
}
} }

View File

@ -1,12 +1,9 @@
package org.dromara.quality.controller.app; package org.dromara.quality.controller.app;
import cn.dev33.satoken.annotation.SaCheckPermission;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R; import org.dromara.common.core.domain.R;
import org.dromara.common.excel.utils.ExcelUtil;
import org.dromara.common.idempotent.annotation.RepeatSubmit; import org.dromara.common.idempotent.annotation.RepeatSubmit;
import org.dromara.common.log.annotation.Log; import org.dromara.common.log.annotation.Log;
import org.dromara.common.log.enums.BusinessType; import org.dromara.common.log.enums.BusinessType;
@ -16,10 +13,8 @@ import org.dromara.common.web.core.BaseController;
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo; import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
import org.dromara.project.service.IBusProjectTeamService; import org.dromara.project.service.IBusProjectTeamService;
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionCreateReq; import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionCreateReq;
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionGisReq;
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq; import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq;
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionUpdateReq; import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionUpdateReq;
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionListGisVo;
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo; import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
import org.dromara.quality.service.IQltQualityInspectionService; import org.dromara.quality.service.IQltQualityInspectionService;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;

View File

@ -7,6 +7,7 @@ import lombok.EqualsAndHashCode;
import org.dromara.common.mybatis.core.domain.BaseEntity; import org.dromara.common.mybatis.core.domain.BaseEntity;
import java.io.Serial; import java.io.Serial;
import java.time.LocalDate;
import java.util.Date; import java.util.Date;
/** /**
@ -87,7 +88,7 @@ public class QltQualityInspection extends BaseEntity {
/** /**
* 回复期限日期 * 回复期限日期
*/ */
private Date replyPeriodDate; private LocalDate replyPeriodDate;
/** /**
* 整改反馈 * 整改反馈

View File

@ -7,6 +7,7 @@ import lombok.Data;
import java.io.Serial; import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date; import java.util.Date;
/** /**
@ -76,8 +77,7 @@ public class QltQualityInspectionCreateReq implements Serializable {
/** /**
* 回复期限日期 * 回复期限日期
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDate replyPeriodDate;
private Date replyPeriodDate;
/** /**
* 备注 * 备注

View File

@ -4,6 +4,7 @@ import lombok.Data;
import java.io.Serial; import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date; import java.util.Date;
/** /**
@ -75,7 +76,7 @@ public class QltQualityInspectionUpdateReq implements Serializable {
/** /**
* 回复期限日期 * 回复期限日期
*/ */
private Date replyPeriodDate; private LocalDate replyPeriodDate;
/** /**
* 整改反馈 * 整改反馈

View File

@ -13,6 +13,7 @@ import org.dromara.system.domain.vo.SysOssVo;
import java.io.Serial; import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -126,7 +127,7 @@ public class QltQualityInspectionVo implements Serializable {
/** /**
* 回复期限日期 * 回复期限日期
*/ */
private Date replyPeriodDate; private LocalDate replyPeriodDate;
/** /**
* 整改反馈 * 整改反馈

View File

@ -53,6 +53,7 @@ import java.io.InputStream;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.time.LocalDate;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
@ -514,8 +515,8 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
replacementMap.put("${rectificationTime}", rectificationTime != null ? DateUtils.formatDateTime(rectificationTime) : ""); replacementMap.put("${rectificationTime}", rectificationTime != null ? DateUtils.formatDateTime(rectificationTime) : "");
String inspectionType = dictDataService.selectDictLabel(QltQualityConstant.QUALITY_INSPECTION_CHECK_TYPE, qualityInspection.getInspectionType()); String inspectionType = dictDataService.selectDictLabel(QltQualityConstant.QUALITY_INSPECTION_CHECK_TYPE, qualityInspection.getInspectionType());
replacementMap.put("${inspectionType}", inspectionType); replacementMap.put("${inspectionType}", inspectionType);
Date replyPeriodDate = qualityInspection.getReplyPeriodDate(); LocalDate replyPeriodDate = qualityInspection.getReplyPeriodDate();
replacementMap.put("${replyPeriodDate}", replyPeriodDate != null ? DateUtils.formatDate(replyPeriodDate) : ""); replacementMap.put("${replyPeriodDate}", replyPeriodDate != null ? replyPeriodDate.toString() : "");
replacementMap.put("${inspectionResult}", qualityInspection.getInspectionResult()); replacementMap.put("${inspectionResult}", qualityInspection.getInspectionResult());
replacementMap.put("${inspectionFile}", qualityInspection.getInspectionFile()); replacementMap.put("${inspectionFile}", qualityInspection.getInspectionFile());
String inspectionStatus = dictDataService.selectDictLabel(QltQualityConstant.QUALITY_INSPECTION_STATUS_TYPE, qualityInspection.getInspectionStatus()); String inspectionStatus = dictDataService.selectDictLabel(QltQualityConstant.QUALITY_INSPECTION_STATUS_TYPE, qualityInspection.getInspectionStatus());

View File

@ -13,10 +13,7 @@ import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseController; import org.dromara.common.web.core.BaseController;
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionCreateReq; import org.dromara.safety.domain.dto.safetyinspection.*;
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionGisReq;
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionQueryReq;
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionUpdateReq;
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo; import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo; import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
import org.dromara.safety.service.IHseSafetyInspectionService; import org.dromara.safety.service.IHseSafetyInspectionService;
@ -101,6 +98,28 @@ public class HseSafetyInspectionController extends BaseController {
return R.ok(safetyInspectionService.insertByBo(req)); return R.ok(safetyInspectionService.insertByBo(req));
} }
/**
* 新增安全巡检工单整改
*/
@SaCheckPermission("safety:safetyInspection:rectification")
@Log(title = "安全巡检工单", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping("/rectification")
public R<Void> insertRectification(@Validated @RequestBody HseSafetyInspectionRectificationReq req) {
return toAjax(safetyInspectionService.insertRectification(req));
}
/**
* 新增安全巡检工单复查
*/
@SaCheckPermission("safety:safetyInspection:review")
@Log(title = "安全巡检工单", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping("/review")
public R<Void> insertReview(@Validated @RequestBody HseSafetyInspectionReviewReq req) {
return toAjax(safetyInspectionService.insertReview(req));
}
/** /**
* 修改安全巡检工单 * 修改安全巡检工单
*/ */

View File

@ -13,6 +13,8 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseController; import org.dromara.common.web.core.BaseController;
import org.dromara.safety.domain.dto.violationrecord.HseViolationRecordCreateHandlerReq; import org.dromara.safety.domain.dto.violationrecord.HseViolationRecordCreateHandlerReq;
import org.dromara.safety.domain.dto.violationrecord.HseViolationRecordQueryReq; import org.dromara.safety.domain.dto.violationrecord.HseViolationRecordQueryReq;
import org.dromara.safety.domain.dto.violationrecord.HseViolationRecordRectificationReq;
import org.dromara.safety.domain.dto.violationrecord.HseViolationRecordReviewReq;
import org.dromara.safety.domain.vo.violationrecord.HseViolationRecordVo; import org.dromara.safety.domain.vo.violationrecord.HseViolationRecordVo;
import org.dromara.safety.service.IHseViolationRecordService; import org.dromara.safety.service.IHseViolationRecordService;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -66,6 +68,28 @@ public class HseViolationRecordController extends BaseController {
return toAjax(hseViolationRecordService.insertHandler(req)); return toAjax(hseViolationRecordService.insertHandler(req));
} }
/**
* 新增违规记录整改
*/
@SaCheckPermission("safety:violationRecord:rectification")
@Log(title = "违规记录", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping("/rectification")
public R<Void> insertRectification(@Validated @RequestBody HseViolationRecordRectificationReq req) {
return toAjax(hseViolationRecordService.insertRectification(req));
}
/**
* 新增违规记录复查
*/
@SaCheckPermission("safety:violationRecord:review")
@Log(title = "违规记录", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping("/review")
public R<Void> insertReview(@Validated @RequestBody HseViolationRecordReviewReq req) {
return toAjax(hseViolationRecordService.insertReview(req));
}
/** /**
* 删除违规记录 * 删除违规记录
* *

View File

@ -1,11 +1,11 @@
package org.dromara.safety.domain.dto.safetyinspection; package org.dromara.safety.domain.dto.safetyinspection;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import lombok.Data; import lombok.Data;
import java.io.Serial; import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date; import java.util.Date;
/** /**
@ -62,8 +62,7 @@ public class HseSafetyInspectionUpdateReq implements Serializable {
/** /**
* 整改期限 * 整改期限
*/ */
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") private LocalDate rectificationDeadline;
private Date rectificationDeadline;
/** /**
* 是否回复1回复 2不回复 * 是否回复1回复 2不回复

View File

@ -1,7 +1,5 @@
package org.dromara.safety.domain.dto.violationrecord; package org.dromara.safety.domain.dto.violationrecord;
import jakarta.validation.constraints.Future;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import lombok.Data; import lombok.Data;

View File

@ -8,6 +8,7 @@ import org.dromara.safety.domain.HseSafetyInspection;
import java.io.Serial; import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date; import java.util.Date;
@ -83,7 +84,7 @@ public class HseSafetyInspectionVo implements Serializable {
/** /**
* 整改期限 * 整改期限
*/ */
private Date rectificationDeadline; private LocalDate rectificationDeadline;
/** /**
* 是否回复1回复 2不回复 * 是否回复1回复 2不回复

View File

@ -218,7 +218,7 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
if (req.getIsReply().equals("1")) { if (req.getIsReply().equals("1")) {
title = "您有新的安全巡检工单需要整改,请及时处理!"; title = "您有新的安全巡检工单需要整改,请及时处理!";
} }
chatServerHandler.sendSystemMessageToUser(correctorId, title,"2"); chatServerHandler.sendSystemMessageToUser(correctorId, title, "2");
} }
// 返回新写入的数据 // 返回新写入的数据
return safetyInspection.getId(); return safetyInspection.getId();
@ -337,6 +337,7 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
lqw.eq(HseSafetyInspection::getStatus, status); lqw.eq(HseSafetyInspection::getStatus, status);
} }
} }
lqw.orderByDesc(HseSafetyInspection::getCreateTime);
return lqw; return lqw;
} }
@ -470,7 +471,7 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
BeanUtils.copyProperties(req, updateInspection); BeanUtils.copyProperties(req, updateInspection);
if (safetyInspection.getCreateBy() != null && safetyInspection.getIsReply().equals("1")) { if (safetyInspection.getCreateBy() != null && safetyInspection.getIsReply().equals("1")) {
chatServerHandler.sendSystemMessageToUser(safetyInspection.getCreateBy(), chatServerHandler.sendSystemMessageToUser(safetyInspection.getCreateBy(),
"安全巡检工单【" + safetyInspection.getCheckProject() + "】已整改,请及时复查!","2"); "安全巡检工单【" + safetyInspection.getCheckProject() + "】已整改,请及时复查!", "2");
} }
// 填充默认值 // 填充默认值
updateInspection.setId(id); updateInspection.setId(id);
@ -493,10 +494,6 @@ 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);
@ -523,6 +520,7 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
replacementMap.put("${createBy}", createBy); replacementMap.put("${createBy}", createBy);
Date createTime = safetyInspection.getCreateTime(); Date createTime = safetyInspection.getCreateTime();
replacementMap.put("${createTime}", createTime != null ? DateUtils.formatDateTime(createTime) : ""); replacementMap.put("${createTime}", createTime != null ? DateUtils.formatDateTime(createTime) : "");
replacementMap.put("${checkProject}", safetyInspection.getCheckProject());
String projectName = projectService.getById(safetyInspection.getProjectId()).getProjectName(); String projectName = projectService.getById(safetyInspection.getProjectId()).getProjectName();
replacementMap.put("${projectName}", projectName); replacementMap.put("${projectName}", projectName);
String checkType = dictDataService.selectDictLabel(HseSafetyConstant.SAFETY_INSPECTION_CHECK_TYPE, safetyInspection.getCheckType()); String checkType = dictDataService.selectDictLabel(HseSafetyConstant.SAFETY_INSPECTION_CHECK_TYPE, safetyInspection.getCheckType());

View File

@ -236,12 +236,6 @@ public class HseTeamMeetingServiceImpl extends ServiceImpl<HseTeamMeetingMapper,
.toList(); .toList();
teamMeetingVo.setParticipantList(idAndNameVOList); teamMeetingVo.setParticipantList(idAndNameVOList);
} }
// 查询对应宣讲人
Long compereId = teamMeeting.getCompereId();
if (compereId != null) {
SysUserVo userVo = userService.selectUserById(compereId);
teamMeetingVo.setCompereName(userVo.getUserName());
}
// 查询对应文件信息 // 查询对应文件信息
String picture = teamMeeting.getPicture(); String picture = teamMeeting.getPicture();
if (StringUtils.isNotBlank(picture)) { if (StringUtils.isNotBlank(picture)) {
@ -279,6 +273,7 @@ public class HseTeamMeetingServiceImpl extends ServiceImpl<HseTeamMeetingMapper,
lqw.eq(ObjectUtils.isNotEmpty(teamId), HseTeamMeeting::getTeamId, teamId); lqw.eq(ObjectUtils.isNotEmpty(teamId), HseTeamMeeting::getTeamId, teamId);
lqw.eq(ObjectUtils.isNotEmpty(contractorId), HseTeamMeeting::getContractorId, contractorId); lqw.eq(ObjectUtils.isNotEmpty(contractorId), HseTeamMeeting::getContractorId, contractorId);
lqw.eq(ObjectUtils.isNotEmpty(meetingDate), HseTeamMeeting::getMeetingDate, meetingDate); lqw.eq(ObjectUtils.isNotEmpty(meetingDate), HseTeamMeeting::getMeetingDate, meetingDate);
lqw.orderByDesc(HseTeamMeeting::getCreateTime);
return lqw; return lqw;
} }
@ -311,9 +306,6 @@ public class HseTeamMeetingServiceImpl extends ServiceImpl<HseTeamMeetingMapper,
String participantId = teamMeeting.getParticipantId(); String participantId = teamMeeting.getParticipantId();
userIdList.addAll(JSONUtil.toList(participantId, Long.class)); userIdList.addAll(JSONUtil.toList(participantId, Long.class));
} }
// 获取对应宣讲人
Set<Long> compereIdList = teamMeetingList.stream().map(HseTeamMeeting::getCompereId).collect(Collectors.toSet());
userIdList.addAll(compereIdList);
Map<Long, String> userMap = userService.selectUserByIds(userIdList, null) Map<Long, String> userMap = userService.selectUserByIds(userIdList, null)
.stream().collect(Collectors.toMap(SysUserVo::getUserId, SysUserVo::getNickName, (key1, key2) -> key1)); .stream().collect(Collectors.toMap(SysUserVo::getUserId, SysUserVo::getNickName, (key1, key2) -> key1));
// 对象列表 => 封装对象列表 // 对象列表 => 封装对象列表
@ -332,12 +324,6 @@ public class HseTeamMeetingServiceImpl extends ServiceImpl<HseTeamMeetingMapper,
contractorName = contractorMap.get(teamMeeting.getContractorId()).getFirst().getName(); contractorName = contractorMap.get(teamMeeting.getContractorId()).getFirst().getName();
} }
teamMeetingVo.setContractorName(contractorName); teamMeetingVo.setContractorName(contractorName);
// 关联宣讲人信息
String compereName = null;
if (userMap.containsKey(teamMeeting.getCompereId())) {
compereName = userMap.get(teamMeeting.getCompereId());
}
teamMeetingVo.setCompereName(compereName);
// 关联参会人信息 // 关联参会人信息
List<IdAndNameVO> participantList = new ArrayList<>(); List<IdAndNameVO> participantList = new ArrayList<>();
String participantId = teamMeeting.getParticipantId(); String participantId = teamMeeting.getParticipantId();

View File

@ -247,7 +247,7 @@ public class HseViolationRecordServiceImpl extends ServiceImpl<HseViolationRecor
} }
if (req.getCorrectorId() != null) { if (req.getCorrectorId() != null) {
chatServerHandler.sendSystemMessageToUser(req.getCorrectorId(), chatServerHandler.sendSystemMessageToUser(req.getCorrectorId(),
"您有一份新的违章工单,请及时处理!工单号为:" + violationRecord.getId(),"2"); "您有一份新的 AI 违章工单,请及时处理!工单号为:" + violationRecord.getId(),"2");
} }
boolean result = this.updateById(violationRecord); boolean result = this.updateById(violationRecord);
if (!result) { if (!result) {