危大
This commit is contained in:
@ -173,4 +173,12 @@ public class BusProjectTeamController extends BaseController {
|
|||||||
return R.ok(contractorService.queryList(req));
|
return R.ok(contractorService.queryList(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分包单位下的班组列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/teamList")
|
||||||
|
public R<List<BusProjectTeamVo>> teamList(BusProjectTeamQueryReq req) {
|
||||||
|
return R.ok(busProjectTeamService.queryList(req));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,4 +35,9 @@ public class BusProjectTeamQueryReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分包公司Id
|
||||||
|
*/
|
||||||
|
private Long contractorId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -395,10 +395,12 @@ public class BusProjectTeamServiceImpl extends ServiceImpl<BusProjectTeamMapper,
|
|||||||
String teamName = req.getTeamName();
|
String teamName = req.getTeamName();
|
||||||
String isClockIn = req.getIsClockIn();
|
String isClockIn = req.getIsClockIn();
|
||||||
String remark = req.getRemark();
|
String remark = req.getRemark();
|
||||||
|
Long contractorId = req.getContractorId();
|
||||||
// 模糊查询
|
// 模糊查询
|
||||||
lqw.like(StringUtils.isNotBlank(teamName), BusProjectTeam::getTeamName, teamName);
|
lqw.like(StringUtils.isNotBlank(teamName), BusProjectTeam::getTeamName, teamName);
|
||||||
lqw.like(StringUtils.isNotBlank(remark), BusProjectTeam::getRemark, remark);
|
lqw.like(StringUtils.isNotBlank(remark), BusProjectTeam::getRemark, remark);
|
||||||
// 精确查询
|
// 精确查询
|
||||||
|
lqw.eq(ObjectUtils.isNotEmpty(contractorId), BusProjectTeam::getContractorId, contractorId);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusProjectTeam::getProjectId, projectId);
|
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusProjectTeam::getProjectId, projectId);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(isClockIn), BusProjectTeam::getIsClockIn, isClockIn);
|
lqw.eq(ObjectUtils.isNotEmpty(isClockIn), BusProjectTeam::getIsClockIn, isClockIn);
|
||||||
return lqw;
|
return lqw;
|
||||||
|
|||||||
@ -0,0 +1,105 @@
|
|||||||
|
package org.dromara.safety.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.safety.domain.vo.HseDangerArchiveVo;
|
||||||
|
import org.dromara.safety.domain.bo.HseDangerArchiveBo;
|
||||||
|
import org.dromara.safety.service.IHseDangerArchiveService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程档案
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-12-06
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/safety/dangerArchive")
|
||||||
|
public class HseDangerArchiveController extends BaseController {
|
||||||
|
|
||||||
|
private final IHseDangerArchiveService hseDangerArchiveService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询危大工程档案列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("safety:dangerArchive:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<HseDangerArchiveVo> list(HseDangerArchiveBo bo, PageQuery pageQuery) {
|
||||||
|
return hseDangerArchiveService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出危大工程档案列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("safety:dangerArchive:export")
|
||||||
|
@Log(title = "危大工程档案", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HseDangerArchiveBo bo, HttpServletResponse response) {
|
||||||
|
List<HseDangerArchiveVo> list = hseDangerArchiveService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "危大工程档案", HseDangerArchiveVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取危大工程档案详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("safety:dangerArchive:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<HseDangerArchiveVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(hseDangerArchiveService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增危大工程档案
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("safety:dangerArchive:add")
|
||||||
|
@Log(title = "危大工程档案", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody HseDangerArchiveBo bo) {
|
||||||
|
return toAjax(hseDangerArchiveService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改危大工程档案
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("safety:dangerArchive:edit")
|
||||||
|
@Log(title = "危大工程档案", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseDangerArchiveBo bo) {
|
||||||
|
return toAjax(hseDangerArchiveService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除危大工程档案
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("safety:dangerArchive:remove")
|
||||||
|
@Log(title = "危大工程档案", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(hseDangerArchiveService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,7 +1,9 @@
|
|||||||
package org.dromara.safety.controller;
|
package org.dromara.safety.controller;
|
||||||
|
|
||||||
|
import java.lang.annotation.Target;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonGetter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
@ -61,7 +63,7 @@ public class HseDangerousEngineeringController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("safety:dangerousEngineering:query")
|
// @SaCheckPermission("safety:dangerousEngineering:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<HseDangerousEngineeringVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<HseDangerousEngineeringVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
@ -102,4 +104,14 @@ public class HseDangerousEngineeringController extends BaseController {
|
|||||||
@PathVariable Long[] ids) {
|
@PathVariable Long[] ids) {
|
||||||
return toAjax(hseDangerousEngineeringService.deleteWithValidByIds(List.of(ids), true));
|
return toAjax(hseDangerousEngineeringService.deleteWithValidByIds(List.of(ids), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程信息列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/engineeringList")
|
||||||
|
public R<List<HseDangerousEngineeringVo>> engineerList(HseDangerousEngineeringBo bo) {
|
||||||
|
List<HseDangerousEngineeringVo> list = hseDangerousEngineeringService.queryList(bo);
|
||||||
|
return R.ok(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.safety.domain.vo.HseSpecialPlanCountVo;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
@ -61,7 +62,7 @@ public class HseSpecialPlanController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("safety:specialPlan:query")
|
// @SaCheckPermission("safety:specialPlan:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<HseSpecialPlanVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<HseSpecialPlanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
@ -102,4 +103,13 @@ public class HseSpecialPlanController extends BaseController {
|
|||||||
@PathVariable Long[] ids) {
|
@PathVariable Long[] ids) {
|
||||||
return toAjax(hseSpecialPlanService.deleteWithValidByIds(List.of(ids), true));
|
return toAjax(hseSpecialPlanService.deleteWithValidByIds(List.of(ids), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计
|
||||||
|
*/
|
||||||
|
@GetMapping("/count/{projectId}")
|
||||||
|
public R<HseSpecialPlanCountVo> count(@PathVariable Long projectId) {
|
||||||
|
return R.ok(hseSpecialPlanService.count(projectId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,132 @@
|
|||||||
|
package org.dromara.safety.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程档案对象 hse_danger_archive
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-12-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("hse_danger_archive")
|
||||||
|
public class HseDangerArchive extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档案编号(自动生成/手动输入)
|
||||||
|
*/
|
||||||
|
private String archiveNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程ID
|
||||||
|
*/
|
||||||
|
private Long deId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程名称
|
||||||
|
*/
|
||||||
|
private String deName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档案类别(多个类别用逗号分隔,如:方案,论证)
|
||||||
|
*/
|
||||||
|
private String archiveCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归档日期
|
||||||
|
*/
|
||||||
|
private LocalDate archiveDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归档人
|
||||||
|
*/
|
||||||
|
private String archiver;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归档单位
|
||||||
|
*/
|
||||||
|
private String archiveUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危险等级
|
||||||
|
*/
|
||||||
|
private String riskLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工单位
|
||||||
|
*/
|
||||||
|
private String constructionUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标段
|
||||||
|
*/
|
||||||
|
private String section;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档案关键字(多个用逗号分隔)
|
||||||
|
*/
|
||||||
|
private String archiveKeywords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方案定稿文件路径
|
||||||
|
*/
|
||||||
|
private String finalPlanFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专家论证资料文件路径
|
||||||
|
*/
|
||||||
|
private String expertArgumentFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 技术交底资料文件路径
|
||||||
|
*/
|
||||||
|
private String technicalFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旁站监理记录文件路径
|
||||||
|
*/
|
||||||
|
private String supervisionRecordFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监控日志文件路径
|
||||||
|
*/
|
||||||
|
private String monitoringLogFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收确认书文件路径
|
||||||
|
*/
|
||||||
|
private String acceptanceCertificateFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工影像/附件文件路径
|
||||||
|
*/
|
||||||
|
private String constructionMediaFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -107,21 +107,25 @@ public class HseSpecialPlan extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 专家结论附件路径
|
* 专家结论附件路径
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String expertFile;
|
private String expertFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 论证结论
|
* 论证结论
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String argumentConclusion;
|
private String argumentConclusion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 论证日期
|
* 论证日期
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private LocalDate argumentDate;
|
private LocalDate argumentDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 专家组负责人(姓名+单位)
|
* 专家组负责人(姓名+单位)
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String expertLeader;
|
private String expertLeader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -132,26 +136,31 @@ public class HseSpecialPlan extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 旁站监理单位
|
* 旁站监理单位
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String supervisionUnit;
|
private String supervisionUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 旁站监理人
|
* 旁站监理人
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String supervisor;
|
private String supervisor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 旁站实际开始时间
|
* 旁站实际开始时间
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private LocalDateTime supervisionStartTime;
|
private LocalDateTime supervisionStartTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 旁站实际结束时间
|
* 旁站实际结束时间
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private LocalDateTime supervisionEndTime;
|
private LocalDateTime supervisionEndTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 旁站记录附件路径
|
* 旁站记录附件路径
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String supervisionFile;
|
private String supervisionFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -162,6 +171,7 @@ public class HseSpecialPlan extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 关联应急预案编号
|
* 关联应急预案编号
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String emergencyPlanNo;
|
private String emergencyPlanNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -0,0 +1,132 @@
|
|||||||
|
package org.dromara.safety.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.safety.domain.HseDangerArchive;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程档案业务对象 hse_danger_archive
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-12-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = HseDangerArchive.class, reverseConvertGenerate = false)
|
||||||
|
public class HseDangerArchiveBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档案编号(自动生成/手动输入)
|
||||||
|
*/
|
||||||
|
private String archiveNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程ID
|
||||||
|
*/
|
||||||
|
private Long deId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程名称
|
||||||
|
*/
|
||||||
|
private String deName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档案类别(多个类别用逗号分隔,如:方案,论证)
|
||||||
|
*/
|
||||||
|
private String archiveCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归档日期
|
||||||
|
*/
|
||||||
|
private LocalDate archiveDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归档人
|
||||||
|
*/
|
||||||
|
private String archiver;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归档单位
|
||||||
|
*/
|
||||||
|
private String archiveUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危险等级
|
||||||
|
*/
|
||||||
|
private String riskLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工单位
|
||||||
|
*/
|
||||||
|
private String constructionUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标段
|
||||||
|
*/
|
||||||
|
private String section;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档案关键字(多个用逗号分隔)
|
||||||
|
*/
|
||||||
|
private String archiveKeywords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方案定稿文件路径
|
||||||
|
*/
|
||||||
|
private String finalPlanFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专家论证资料文件路径
|
||||||
|
*/
|
||||||
|
private String expertArgumentFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 技术交底资料文件路径
|
||||||
|
*/
|
||||||
|
private String technicalFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旁站监理记录文件路径
|
||||||
|
*/
|
||||||
|
private String supervisionRecordFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监控日志文件路径
|
||||||
|
*/
|
||||||
|
private String monitoringLogFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收确认书文件路径
|
||||||
|
*/
|
||||||
|
private String acceptanceCertificateFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工影像/附件文件路径
|
||||||
|
*/
|
||||||
|
private String constructionMediaFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -8,6 +8,8 @@ import io.github.linpeilie.annotations.AutoMapper;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
@ -51,12 +53,12 @@ public class HseDangerousEngineeringBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 施工开始时间
|
* 施工开始时间
|
||||||
*/
|
*/
|
||||||
private Date startTime;
|
private LocalDate startTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预计完成时间
|
* 预计完成时间
|
||||||
*/
|
*/
|
||||||
private Date endTime;
|
private LocalDate endTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作业地点
|
* 作业地点
|
||||||
|
|||||||
@ -0,0 +1,162 @@
|
|||||||
|
package org.dromara.safety.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.safety.domain.HseDangerArchive;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程档案视图对象 hse_danger_archive
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-12-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = HseDangerArchive.class)
|
||||||
|
public class HseDangerArchiveVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目Id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目Id")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档案编号(自动生成/手动输入)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "档案编号", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "自=动生成/手动输入")
|
||||||
|
private String archiveNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "危大工程ID")
|
||||||
|
private Long deId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "危大工程名称")
|
||||||
|
private String deName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档案类别(多个类别用逗号分隔,如:方案,论证)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "档案类别", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "多=个类别用逗号分隔,如:方案,论证")
|
||||||
|
private String archiveCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归档日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "归档日期")
|
||||||
|
private LocalDate archiveDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归档人
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "归档人")
|
||||||
|
private String archiver;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归档单位
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "归档单位")
|
||||||
|
private String archiveUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危险等级
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "危险等级")
|
||||||
|
private String riskLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工单位
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "施工单位")
|
||||||
|
private String constructionUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标段
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "标段")
|
||||||
|
private String section;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档案关键字(多个用逗号分隔)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "档案关键字", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "多=个用逗号分隔")
|
||||||
|
private String archiveKeywords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方案定稿文件路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "方案定稿文件路径")
|
||||||
|
private String finalPlanFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专家论证资料文件路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "专家论证资料文件路径")
|
||||||
|
private String expertArgumentFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 技术交底资料文件路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "技术交底资料文件路径")
|
||||||
|
private String technicalFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旁站监理记录文件路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "旁站监理记录文件路径")
|
||||||
|
private String supervisionRecordFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监控日志文件路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "监控日志文件路径")
|
||||||
|
private String monitoringLogFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收确认书文件路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "验收确认书文件路径")
|
||||||
|
private String acceptanceCertificateFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工影像/附件文件路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "施工影像/附件文件路径")
|
||||||
|
private String constructionMediaFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,7 +1,10 @@
|
|||||||
package org.dromara.safety.domain.vo;
|
package org.dromara.safety.domain.vo;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.common.translation.annotation.Translation;
|
||||||
|
import org.dromara.common.translation.constant.TransConstant;
|
||||||
import org.dromara.safety.domain.HseDangerousEngineering;
|
import org.dromara.safety.domain.HseDangerousEngineering;
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
@ -54,6 +57,10 @@ public class HseDangerousEngineeringVo implements Serializable {
|
|||||||
@ExcelProperty(value = "风险等级")
|
@ExcelProperty(value = "风险等级")
|
||||||
private String riskLevel;
|
private String riskLevel;
|
||||||
|
|
||||||
|
|
||||||
|
@Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "riskLevel",other = "danger_risk_level")
|
||||||
|
private String riskLevelName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作业内容
|
* 作业内容
|
||||||
*/
|
*/
|
||||||
@ -64,13 +71,13 @@ public class HseDangerousEngineeringVo implements Serializable {
|
|||||||
* 施工开始时间
|
* 施工开始时间
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "施工开始时间")
|
@ExcelProperty(value = "施工开始时间")
|
||||||
private Date startTime;
|
private LocalDate startTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预计完成时间
|
* 预计完成时间
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "预计完成时间")
|
@ExcelProperty(value = "预计完成时间")
|
||||||
private Date endTime;
|
private LocalDate endTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作业地点
|
* 作业地点
|
||||||
|
|||||||
@ -0,0 +1,47 @@
|
|||||||
|
package org.dromara.safety.domain.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import org.dromara.safety.domain.HseSpecialPlan;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程专项施工方案视图对象 hse_special_plan
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-12-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class HseSpecialPlanCountVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总数
|
||||||
|
*/
|
||||||
|
private Integer total;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需专家论证
|
||||||
|
*/
|
||||||
|
private Long needExpertArgumentNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需旁站监理
|
||||||
|
*/
|
||||||
|
private Long needSupervisionNum;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -10,6 +10,8 @@ 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.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.safety.mapper;
|
||||||
|
|
||||||
|
import org.dromara.safety.domain.HseDangerArchive;
|
||||||
|
import org.dromara.safety.domain.vo.HseDangerArchiveVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程档案Mapper接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-12-06
|
||||||
|
*/
|
||||||
|
public interface HseDangerArchiveMapper extends BaseMapperPlus<HseDangerArchive, HseDangerArchiveVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package org.dromara.safety.service;
|
||||||
|
|
||||||
|
import org.dromara.safety.domain.vo.HseDangerArchiveVo;
|
||||||
|
import org.dromara.safety.domain.bo.HseDangerArchiveBo;
|
||||||
|
import org.dromara.safety.domain.HseDangerArchive;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程档案Service接口
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-12-06
|
||||||
|
*/
|
||||||
|
public interface IHseDangerArchiveService extends IService<HseDangerArchive>{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询危大工程档案
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 危大工程档案
|
||||||
|
*/
|
||||||
|
HseDangerArchiveVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询危大工程档案列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 危大工程档案分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<HseDangerArchiveVo> queryPageList(HseDangerArchiveBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的危大工程档案列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 危大工程档案列表
|
||||||
|
*/
|
||||||
|
List<HseDangerArchiveVo> queryList(HseDangerArchiveBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增危大工程档案
|
||||||
|
*
|
||||||
|
* @param bo 危大工程档案
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(HseDangerArchiveBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改危大工程档案
|
||||||
|
*
|
||||||
|
* @param bo 危大工程档案
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(HseDangerArchiveBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除危大工程档案信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
package org.dromara.safety.service;
|
package org.dromara.safety.service;
|
||||||
|
|
||||||
|
import org.dromara.safety.domain.vo.HseSpecialPlanCountVo;
|
||||||
import org.dromara.safety.domain.vo.HseSpecialPlanVo;
|
import org.dromara.safety.domain.vo.HseSpecialPlanVo;
|
||||||
import org.dromara.safety.domain.bo.HseSpecialPlanBo;
|
import org.dromara.safety.domain.bo.HseSpecialPlanBo;
|
||||||
import org.dromara.safety.domain.HseSpecialPlan;
|
import org.dromara.safety.domain.HseSpecialPlan;
|
||||||
@ -7,6 +8,8 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -67,4 +70,9 @@ public interface IHseSpecialPlanService extends IService<HseSpecialPlan>{
|
|||||||
* @return 是否删除成功
|
* @return 是否删除成功
|
||||||
*/
|
*/
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计
|
||||||
|
*/
|
||||||
|
HseSpecialPlanCountVo count(Long projectId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,149 @@
|
|||||||
|
package org.dromara.safety.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.safety.domain.bo.HseDangerArchiveBo;
|
||||||
|
import org.dromara.safety.domain.vo.HseDangerArchiveVo;
|
||||||
|
import org.dromara.safety.domain.HseDangerArchive;
|
||||||
|
import org.dromara.safety.mapper.HseDangerArchiveMapper;
|
||||||
|
import org.dromara.safety.service.IHseDangerArchiveService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 危大工程档案Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2025-12-06
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class HseDangerArchiveServiceImpl extends ServiceImpl<HseDangerArchiveMapper, HseDangerArchive> implements IHseDangerArchiveService {
|
||||||
|
|
||||||
|
private final HseDangerArchiveMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询危大工程档案
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 危大工程档案
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public HseDangerArchiveVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询危大工程档案列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 危大工程档案分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<HseDangerArchiveVo> queryPageList(HseDangerArchiveBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<HseDangerArchive> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<HseDangerArchiveVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的危大工程档案列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 危大工程档案列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<HseDangerArchiveVo> queryList(HseDangerArchiveBo bo) {
|
||||||
|
LambdaQueryWrapper<HseDangerArchive> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<HseDangerArchive> buildQueryWrapper(HseDangerArchiveBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<HseDangerArchive> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(HseDangerArchive::getId);
|
||||||
|
lqw.eq(bo.getProjectId() != null, HseDangerArchive::getProjectId, bo.getProjectId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getArchiveNo()), HseDangerArchive::getArchiveNo, bo.getArchiveNo());
|
||||||
|
lqw.eq(bo.getDeId() != null, HseDangerArchive::getDeId, bo.getDeId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getDeName()), HseDangerArchive::getDeName, bo.getDeName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getArchiveCategory()), HseDangerArchive::getArchiveCategory, bo.getArchiveCategory());
|
||||||
|
lqw.eq(bo.getArchiveDate() != null, HseDangerArchive::getArchiveDate, bo.getArchiveDate());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getArchiver()), HseDangerArchive::getArchiver, bo.getArchiver());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getArchiveUnit()), HseDangerArchive::getArchiveUnit, bo.getArchiveUnit());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getRiskLevel()), HseDangerArchive::getRiskLevel, bo.getRiskLevel());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getConstructionUnit()), HseDangerArchive::getConstructionUnit, bo.getConstructionUnit());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getSection()), HseDangerArchive::getSection, bo.getSection());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getArchiveKeywords()), HseDangerArchive::getArchiveKeywords, bo.getArchiveKeywords());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getFinalPlanFile()), HseDangerArchive::getFinalPlanFile, bo.getFinalPlanFile());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getExpertArgumentFile()), HseDangerArchive::getExpertArgumentFile, bo.getExpertArgumentFile());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTechnicalFile()), HseDangerArchive::getTechnicalFile, bo.getTechnicalFile());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getSupervisionRecordFile()), HseDangerArchive::getSupervisionRecordFile, bo.getSupervisionRecordFile());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getMonitoringLogFile()), HseDangerArchive::getMonitoringLogFile, bo.getMonitoringLogFile());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getAcceptanceCertificateFile()), HseDangerArchive::getAcceptanceCertificateFile, bo.getAcceptanceCertificateFile());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getConstructionMediaFile()), HseDangerArchive::getConstructionMediaFile, bo.getConstructionMediaFile());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增危大工程档案
|
||||||
|
*
|
||||||
|
* @param bo 危大工程档案
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(HseDangerArchiveBo bo) {
|
||||||
|
HseDangerArchive add = MapstructUtils.convert(bo, HseDangerArchive.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改危大工程档案
|
||||||
|
*
|
||||||
|
* @param bo 危大工程档案
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(HseDangerArchiveBo bo) {
|
||||||
|
HseDangerArchive update = MapstructUtils.convert(bo, HseDangerArchive.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(HseDangerArchive entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除危大工程档案信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,9 @@
|
|||||||
package org.dromara.safety.service.impl;
|
package org.dromara.safety.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Snowflake;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -9,6 +12,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.safety.domain.vo.HseSpecialPlanCountVo;
|
||||||
|
import org.dromara.safety.service.IHseDangerousEngineeringService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.safety.domain.bo.HseSpecialPlanBo;
|
import org.dromara.safety.domain.bo.HseSpecialPlanBo;
|
||||||
import org.dromara.safety.domain.vo.HseSpecialPlanVo;
|
import org.dromara.safety.domain.vo.HseSpecialPlanVo;
|
||||||
@ -33,6 +38,7 @@ public class HseSpecialPlanServiceImpl extends ServiceImpl<HseSpecialPlanMapper,
|
|||||||
|
|
||||||
private final HseSpecialPlanMapper baseMapper;
|
private final HseSpecialPlanMapper baseMapper;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询危大工程专项施工方案
|
* 查询危大工程专项施工方案
|
||||||
*
|
*
|
||||||
@ -118,6 +124,9 @@ public class HseSpecialPlanServiceImpl extends ServiceImpl<HseSpecialPlanMapper,
|
|||||||
public Boolean insertByBo(HseSpecialPlanBo bo) {
|
public Boolean insertByBo(HseSpecialPlanBo bo) {
|
||||||
HseSpecialPlan add = MapstructUtils.convert(bo, HseSpecialPlan.class);
|
HseSpecialPlan add = MapstructUtils.convert(bo, HseSpecialPlan.class);
|
||||||
validEntityBeforeSave(add);
|
validEntityBeforeSave(add);
|
||||||
|
Snowflake snowflake = IdUtil.getSnowflake(1, 1);
|
||||||
|
long id = snowflake.nextId();
|
||||||
|
add.setPlanNo("FA-" + id);
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
if (flag) {
|
if (flag) {
|
||||||
bo.setId(add.getId());
|
bo.setId(add.getId());
|
||||||
@ -142,7 +151,11 @@ public class HseSpecialPlanServiceImpl extends ServiceImpl<HseSpecialPlanMapper,
|
|||||||
* 保存前的数据校验
|
* 保存前的数据校验
|
||||||
*/
|
*/
|
||||||
private void validEntityBeforeSave(HseSpecialPlan entity){
|
private void validEntityBeforeSave(HseSpecialPlan entity){
|
||||||
//TODO 做一些数据校验,如唯一约束
|
boolean exists = lambdaQuery().eq(HseSpecialPlan::getDeId, entity.getDeId())
|
||||||
|
.ne(entity.getId() != null, HseSpecialPlan::getId, entity.getId()).exists();
|
||||||
|
if (exists) {
|
||||||
|
throw new ServiceException("该工程已有方案");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -159,4 +172,14 @@ public class HseSpecialPlanServiceImpl extends ServiceImpl<HseSpecialPlanMapper,
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HseSpecialPlanCountVo count(Long projectId) {
|
||||||
|
List<HseSpecialPlan> list = lambdaQuery().eq(HseSpecialPlan::getProjectId, projectId).list();
|
||||||
|
HseSpecialPlanCountVo vo = new HseSpecialPlanCountVo();
|
||||||
|
vo.setTotal(list.size());
|
||||||
|
vo.setNeedExpertArgumentNum(list.stream().filter(item -> item.getNeedExpertArgument() == 1).count());
|
||||||
|
vo.setNeedSupervisionNum(list.stream().filter(item -> item.getNeedSupervision() == 1).count());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.safety.mapper.HseDangerArchiveMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user