添加站班会、安全巡检工单、安全日志、安全周报后端增删改查接口
This commit is contained in:
@ -220,9 +220,11 @@ springdoc:
|
||||
packages-to-scan: org.dromara.materials
|
||||
- group: 5.机械模块
|
||||
packages-to-scan: org.dromara.machinery
|
||||
- group: 6.代码生成模块
|
||||
- group: 6.安全模块
|
||||
packages-to-scan: org.dromara.safety
|
||||
- group: 7.代码生成模块
|
||||
packages-to-scan: org.dromara.generator
|
||||
- group: 7.工作流模块
|
||||
- group: 8.工作流模块
|
||||
packages-to-scan: org.dromara.workflow
|
||||
|
||||
# 防止XSS攻击
|
||||
|
@ -0,0 +1,36 @@
|
||||
package org.dromara.common.core.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/19 11:40
|
||||
*/
|
||||
@Data
|
||||
public class IdAndNameVO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 构建
|
||||
*
|
||||
* @param id id
|
||||
* @param name 名称
|
||||
* @return {@link IdAndNameVO}
|
||||
*/
|
||||
public static IdAndNameVO build(Long id, String name) {
|
||||
IdAndNameVO idAndNameVO = new IdAndNameVO();
|
||||
idAndNameVO.setId(id);
|
||||
idAndNameVO.setName(name);
|
||||
return idAndNameVO;
|
||||
}
|
||||
|
||||
}
|
@ -1,21 +1,18 @@
|
||||
package org.dromara.project.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.project.domain.BusProjectTeam;
|
||||
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 org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.project.domain.BusProjectTeam;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 项目班组视图对象 bus_project_team
|
||||
*
|
||||
|
@ -0,0 +1,108 @@
|
||||
package org.dromara.safety.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.safety.domain.req.safetyinspection.SafetyInspectionCreateReq;
|
||||
import org.dromara.safety.domain.req.safetyinspection.SafetyInspectionQueryReq;
|
||||
import org.dromara.safety.domain.req.safetyinspection.SafetyInspectionUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusSafetyInspectionVo;
|
||||
import org.dromara.safety.service.IBusSafetyInspectionService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安全巡检工单
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/safety/safetyInspection")
|
||||
public class BusSafetyInspectionController extends BaseController {
|
||||
|
||||
private final IBusSafetyInspectionService busSafetyInspectionService;
|
||||
|
||||
/**
|
||||
* 查询安全巡检工单列表
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyInspection:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusSafetyInspectionVo> list(SafetyInspectionQueryReq req, PageQuery pageQuery) {
|
||||
return busSafetyInspectionService.queryPageList(req, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出安全巡检工单列表
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyInspection:export")
|
||||
@Log(title = "安全巡检工单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(SafetyInspectionQueryReq req, HttpServletResponse response) {
|
||||
List<BusSafetyInspectionVo> list = busSafetyInspectionService.queryList(req);
|
||||
ExcelUtil.exportExcel(list, "安全巡检工单", BusSafetyInspectionVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全巡检工单详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyInspection:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusSafetyInspectionVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busSafetyInspectionService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安全巡检工单
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyInspection:add")
|
||||
@Log(title = "安全巡检工单", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody SafetyInspectionCreateReq req) {
|
||||
return R.ok(busSafetyInspectionService.insertByBo(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改安全巡检工单
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyInspection:edit")
|
||||
@Log(title = "安全巡检工单", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SafetyInspectionUpdateReq req) {
|
||||
return toAjax(busSafetyInspectionService.updateByBo(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除安全巡检工单
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyInspection:remove")
|
||||
@Log(title = "安全巡检工单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busSafetyInspectionService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package org.dromara.safety.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogCreateReq;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogQueryReq;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusSafetyLogVo;
|
||||
import org.dromara.safety.service.IBusSafetyLogService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安全日志
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/safety/safetyLog")
|
||||
public class BusSafetyLogController extends BaseController {
|
||||
|
||||
private final IBusSafetyLogService busSafetyLogService;
|
||||
|
||||
/**
|
||||
* 查询安全日志列表
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyLog:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusSafetyLogVo> list(SafetyLogQueryReq req, PageQuery pageQuery) {
|
||||
return busSafetyLogService.queryPageList(req, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出安全日志列表
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyLog:export")
|
||||
@Log(title = "安全日志", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(SafetyLogQueryReq req, HttpServletResponse response) {
|
||||
List<BusSafetyLogVo> list = busSafetyLogService.queryList(req);
|
||||
ExcelUtil.exportExcel(list, "安全日志", BusSafetyLogVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全日志详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyLog:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusSafetyLogVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busSafetyLogService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安全日志
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyLog:add")
|
||||
@Log(title = "安全日志", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody SafetyLogCreateReq req) {
|
||||
return R.ok(busSafetyLogService.insertByBo(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改安全日志
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyLog:edit")
|
||||
@Log(title = "安全日志", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SafetyLogUpdateReq req) {
|
||||
return toAjax(busSafetyLogService.updateByBo(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除安全日志
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyLog:remove")
|
||||
@Log(title = "安全日志", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busSafetyLogService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package org.dromara.safety.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.safety.domain.req.safetyweeklyreport.SafetyWeeklyReportCreateReq;
|
||||
import org.dromara.safety.domain.req.safetyweeklyreport.SafetyWeeklyReportQueryReq;
|
||||
import org.dromara.safety.domain.req.safetyweeklyreport.SafetyWeeklyReportUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusSafetyWeeklyReportVo;
|
||||
import org.dromara.safety.service.IBusSafetyWeeklyReportService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安全周报
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/safety/safetyWeeklyReport")
|
||||
public class BusSafetyWeeklyReportController extends BaseController {
|
||||
|
||||
private final IBusSafetyWeeklyReportService busSafetyWeeklyReportService;
|
||||
|
||||
/**
|
||||
* 查询安全周报列表
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyWeeklyReport:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusSafetyWeeklyReportVo> list(SafetyWeeklyReportQueryReq req, PageQuery pageQuery) {
|
||||
return busSafetyWeeklyReportService.queryPageList(req, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出安全周报列表
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyWeeklyReport:export")
|
||||
@Log(title = "安全周报", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(SafetyWeeklyReportQueryReq req, HttpServletResponse response) {
|
||||
List<BusSafetyWeeklyReportVo> list = busSafetyWeeklyReportService.queryList(req);
|
||||
ExcelUtil.exportExcel(list, "安全周报", BusSafetyWeeklyReportVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全周报详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyWeeklyReport:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusSafetyWeeklyReportVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busSafetyWeeklyReportService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安全周报
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyWeeklyReport:add")
|
||||
@Log(title = "安全周报", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody SafetyWeeklyReportCreateReq req) {
|
||||
return R.ok(busSafetyWeeklyReportService.insertByBo(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改安全周报
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyWeeklyReport:edit")
|
||||
@Log(title = "安全周报", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SafetyWeeklyReportUpdateReq req) {
|
||||
return toAjax(busSafetyWeeklyReportService.updateByBo(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除安全周报
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("safety:safetyWeeklyReport:remove")
|
||||
@Log(title = "安全周报", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busSafetyWeeklyReportService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package org.dromara.safety.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.safety.domain.req.teammeeting.TeamMeetingCreateReq;
|
||||
import org.dromara.safety.domain.req.teammeeting.TeamMeetingQueryReq;
|
||||
import org.dromara.safety.domain.req.teammeeting.TeamMeetingUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusTeamMeetingVo;
|
||||
import org.dromara.safety.service.IBusTeamMeetingService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站班会
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-19
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/safety/teamMeeting")
|
||||
public class BusTeamMeetingController extends BaseController {
|
||||
|
||||
private final IBusTeamMeetingService busTeamMeetingService;
|
||||
|
||||
/**
|
||||
* 查询站班会列表
|
||||
*/
|
||||
@SaCheckPermission("safety:teamMeeting:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusTeamMeetingVo> list(TeamMeetingQueryReq req, PageQuery pageQuery) {
|
||||
return busTeamMeetingService.queryPageList(req, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出站班会列表
|
||||
*/
|
||||
@SaCheckPermission("safety:teamMeeting:export")
|
||||
@Log(title = "站班会", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TeamMeetingQueryReq req, HttpServletResponse response) {
|
||||
List<BusTeamMeetingVo> list = busTeamMeetingService.queryList(req);
|
||||
ExcelUtil.exportExcel(list, "站班会", BusTeamMeetingVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取站班会详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("safety:teamMeeting:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BusTeamMeetingVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(busTeamMeetingService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增站班会
|
||||
*/
|
||||
@SaCheckPermission("safety:teamMeeting:add")
|
||||
@Log(title = "站班会", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody TeamMeetingCreateReq req) {
|
||||
return R.ok(busTeamMeetingService.insertByBo(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改站班会
|
||||
*/
|
||||
@SaCheckPermission("safety:teamMeeting:edit")
|
||||
@Log(title = "站班会", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TeamMeetingUpdateReq req) {
|
||||
return toAjax(busTeamMeetingService.updateByBo(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除站班会
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("safety:teamMeeting:remove")
|
||||
@Log(title = "站班会", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(busTeamMeetingService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
package org.dromara.safety.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 安全巡检工单对象 bus_safety_inspection
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_safety_inspection")
|
||||
public class BusSafetyInspection extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父id(默认为0)
|
||||
*/
|
||||
private Long pid;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 检查类型
|
||||
*/
|
||||
private String checkType;
|
||||
|
||||
/**
|
||||
* 违章类型
|
||||
*/
|
||||
private String violationType;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
private String inspectionResult;
|
||||
|
||||
/**
|
||||
* 整改班组id
|
||||
*/
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 整改人(班组长)id
|
||||
*/
|
||||
private Long correctorId;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
private String isReply;
|
||||
|
||||
/**
|
||||
* 回复日期
|
||||
*/
|
||||
private String replyDate;
|
||||
|
||||
/**
|
||||
* 工单状态(1通知 2整改 3复查)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 问题隐患
|
||||
*/
|
||||
private String hiddenDanger;
|
||||
|
||||
/**
|
||||
* 整改措施
|
||||
*/
|
||||
private String measure;
|
||||
|
||||
/**
|
||||
* 复查情况
|
||||
*/
|
||||
private String review;
|
||||
|
||||
/**
|
||||
* 复查状态(1通过 2未通过)
|
||||
*/
|
||||
private String reviewType;
|
||||
|
||||
/**
|
||||
* 检查时间
|
||||
*/
|
||||
private Date checkTime;
|
||||
|
||||
/**
|
||||
* 整改时间
|
||||
*/
|
||||
private Date rectificationTime;
|
||||
|
||||
/**
|
||||
* 复查时间
|
||||
*/
|
||||
private Date reviewTime;
|
||||
|
||||
/**
|
||||
* 检查附件
|
||||
*/
|
||||
private Long checkFile;
|
||||
|
||||
/**
|
||||
* 整改附件
|
||||
*/
|
||||
private Long rectificationFile;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
private Date deletedAt;
|
||||
|
||||
/**
|
||||
* 是否删除(0正常 1删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Long isDelete;
|
||||
|
||||
}
|
@ -0,0 +1,124 @@
|
||||
package org.dromara.safety.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 安全日志对象 bus_safety_log
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_safety_log")
|
||||
public class BusSafetyLog extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
private String dateOfOccurrence;
|
||||
|
||||
/**
|
||||
* 最高气温
|
||||
*/
|
||||
private Long airTemperatureMax;
|
||||
|
||||
/**
|
||||
* 最低气温
|
||||
*/
|
||||
private Long airTemperatureMin;
|
||||
|
||||
/**
|
||||
* 气候
|
||||
*/
|
||||
private String weather;
|
||||
|
||||
/**
|
||||
* 进展
|
||||
*/
|
||||
private String progress;
|
||||
|
||||
/**
|
||||
* 作业内容
|
||||
*/
|
||||
private String jobContent;
|
||||
|
||||
/**
|
||||
* 交底情况
|
||||
*/
|
||||
private String discloseCondition;
|
||||
|
||||
/**
|
||||
* 活动情况
|
||||
*/
|
||||
private String activityCondition;
|
||||
|
||||
/**
|
||||
* 检查情况
|
||||
*/
|
||||
private String examineCondition;
|
||||
|
||||
/**
|
||||
* 实施情况
|
||||
*/
|
||||
private String implementCondition;
|
||||
|
||||
/**
|
||||
* 安全检查情况
|
||||
*/
|
||||
private String safetyInspectionCondition;
|
||||
|
||||
/**
|
||||
* 停工或加班情况
|
||||
*/
|
||||
private String stoppageOrOvertime;
|
||||
|
||||
/**
|
||||
* 其他情况
|
||||
*/
|
||||
private String otherCondition;
|
||||
|
||||
/**
|
||||
* 文件id列表
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
private Date deletedAt;
|
||||
|
||||
/**
|
||||
* 是否删除(0正常 1删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Long isDelete;
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package org.dromara.safety.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 安全周报对象 bus_safety_weekly_report
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_safety_weekly_report")
|
||||
public class BusSafetyWeeklyReport extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 周期
|
||||
*/
|
||||
private String week;
|
||||
|
||||
/**
|
||||
* 周期范围
|
||||
*/
|
||||
private String scope;
|
||||
|
||||
/**
|
||||
* 周期范围结束
|
||||
*/
|
||||
private String scopeEnd;
|
||||
|
||||
/**
|
||||
* 文件位置
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
private Date deletedAt;
|
||||
|
||||
/**
|
||||
* 是否删除(0正常 1删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Long isDelete;
|
||||
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package org.dromara.safety.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 站班会对象 bus_team_meeting
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("bus_team_meeting")
|
||||
public class BusTeamMeeting extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 分包公司id
|
||||
*/
|
||||
private Long contractorId;
|
||||
|
||||
/**
|
||||
* 开会时间
|
||||
*/
|
||||
private Date meetingDate;
|
||||
|
||||
/**
|
||||
* 宣讲人
|
||||
*/
|
||||
private Long compereId;
|
||||
|
||||
/**
|
||||
* 参与人id(多个用,号隔开)
|
||||
*/
|
||||
private String participantId;
|
||||
|
||||
/**
|
||||
* 班会内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 班会图片(多个用,号隔开)
|
||||
*/
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
private Date deletedAt;
|
||||
|
||||
/**
|
||||
* 是否删除(0正常 1删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Long isDelete;
|
||||
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
package org.dromara.safety.domain.req.safetyinspection;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/19 11:00
|
||||
*/
|
||||
@Data
|
||||
public class SafetyInspectionCreateReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 5355703238184894846L;
|
||||
|
||||
/**
|
||||
* 父id(默认为0)
|
||||
*/
|
||||
private Long pid;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 检查类型
|
||||
*/
|
||||
private String checkType;
|
||||
|
||||
/**
|
||||
* 违章类型
|
||||
*/
|
||||
private String violationType;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
private String inspectionResult;
|
||||
|
||||
/**
|
||||
* 整改班组id
|
||||
*/
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 整改人(班组长)id
|
||||
*/
|
||||
private Long correctorId;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
private String isReply;
|
||||
|
||||
/**
|
||||
* 回复日期
|
||||
*/
|
||||
private String replyDate;
|
||||
|
||||
/**
|
||||
* 工单状态(1通知 2整改 3复查)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 问题隐患
|
||||
*/
|
||||
private String hiddenDanger;
|
||||
|
||||
/**
|
||||
* 整改措施
|
||||
*/
|
||||
private String measure;
|
||||
|
||||
/**
|
||||
* 复查情况
|
||||
*/
|
||||
private String review;
|
||||
|
||||
/**
|
||||
* 复查状态(1通过 2未通过)
|
||||
*/
|
||||
private String reviewType;
|
||||
|
||||
/**
|
||||
* 检查时间
|
||||
*/
|
||||
private Date checkTime;
|
||||
|
||||
/**
|
||||
* 整改时间
|
||||
*/
|
||||
private Date rectificationTime;
|
||||
|
||||
/**
|
||||
* 复查时间
|
||||
*/
|
||||
private Date reviewTime;
|
||||
|
||||
/**
|
||||
* 检查附件
|
||||
*/
|
||||
private Long checkFile;
|
||||
|
||||
/**
|
||||
* 整改附件
|
||||
*/
|
||||
private Long rectificationFile;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
package org.dromara.safety.domain.req.safetyinspection;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/19 11:01
|
||||
*/
|
||||
@Data
|
||||
public class SafetyInspectionQueryReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 8880866939746311233L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父id(默认为0)
|
||||
*/
|
||||
private Long pid;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 检查类型
|
||||
*/
|
||||
private String checkType;
|
||||
|
||||
/**
|
||||
* 违章类型
|
||||
*/
|
||||
private String violationType;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
private String inspectionResult;
|
||||
|
||||
/**
|
||||
* 整改班组id
|
||||
*/
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 整改人(班组长)id
|
||||
*/
|
||||
private Long correctorId;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
private String isReply;
|
||||
|
||||
/**
|
||||
* 回复日期
|
||||
*/
|
||||
private String replyDate;
|
||||
|
||||
/**
|
||||
* 工单状态(1通知 2整改 3复查)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 问题隐患
|
||||
*/
|
||||
private String hiddenDanger;
|
||||
|
||||
/**
|
||||
* 整改措施
|
||||
*/
|
||||
private String measure;
|
||||
|
||||
/**
|
||||
* 复查情况
|
||||
*/
|
||||
private String review;
|
||||
|
||||
/**
|
||||
* 复查状态(1通过 2未通过)
|
||||
*/
|
||||
private String reviewType;
|
||||
|
||||
/**
|
||||
* 检查时间
|
||||
*/
|
||||
private Date checkTime;
|
||||
|
||||
/**
|
||||
* 整改时间
|
||||
*/
|
||||
private Date rectificationTime;
|
||||
|
||||
/**
|
||||
* 复查时间
|
||||
*/
|
||||
private Date reviewTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,124 @@
|
||||
package org.dromara.safety.domain.req.safetyinspection;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/19 11:01
|
||||
*/
|
||||
@Data
|
||||
public class SafetyInspectionUpdateReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -5443601902997524139L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父id(默认为0)
|
||||
*/
|
||||
private Long pid;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 检查类型
|
||||
*/
|
||||
private String checkType;
|
||||
|
||||
/**
|
||||
* 违章类型
|
||||
*/
|
||||
private String violationType;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
private String inspectionResult;
|
||||
|
||||
/**
|
||||
* 整改班组id
|
||||
*/
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 整改人(班组长)id
|
||||
*/
|
||||
private Long correctorId;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
private String isReply;
|
||||
|
||||
/**
|
||||
* 回复日期
|
||||
*/
|
||||
private String replyDate;
|
||||
|
||||
/**
|
||||
* 工单状态(1通知 2整改 3复查)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 问题隐患
|
||||
*/
|
||||
private String hiddenDanger;
|
||||
|
||||
/**
|
||||
* 整改措施
|
||||
*/
|
||||
private String measure;
|
||||
|
||||
/**
|
||||
* 复查情况
|
||||
*/
|
||||
private String review;
|
||||
|
||||
/**
|
||||
* 复查状态(1通过 2未通过)
|
||||
*/
|
||||
private String reviewType;
|
||||
|
||||
/**
|
||||
* 检查时间
|
||||
*/
|
||||
private Date checkTime;
|
||||
|
||||
/**
|
||||
* 整改时间
|
||||
*/
|
||||
private Date rectificationTime;
|
||||
|
||||
/**
|
||||
* 复查时间
|
||||
*/
|
||||
private Date reviewTime;
|
||||
|
||||
/**
|
||||
* 检查附件
|
||||
*/
|
||||
private Long checkFile;
|
||||
|
||||
/**
|
||||
* 整改附件
|
||||
*/
|
||||
private Long rectificationFile;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package org.dromara.safety.domain.req.safetylog;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/20 14:40
|
||||
*/
|
||||
@Data
|
||||
public class SafetyLogCreateReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 7902209238488203624L;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
private String dateOfOccurrence;
|
||||
|
||||
/**
|
||||
* 最高气温
|
||||
*/
|
||||
private Long airTemperatureMax;
|
||||
|
||||
/**
|
||||
* 最低气温
|
||||
*/
|
||||
private Long airTemperatureMin;
|
||||
|
||||
/**
|
||||
* 气候
|
||||
*/
|
||||
private String weather;
|
||||
|
||||
/**
|
||||
* 进展
|
||||
*/
|
||||
private String progress;
|
||||
|
||||
/**
|
||||
* 作业内容
|
||||
*/
|
||||
private String jobContent;
|
||||
|
||||
/**
|
||||
* 交底情况
|
||||
*/
|
||||
private String discloseCondition;
|
||||
|
||||
/**
|
||||
* 活动情况
|
||||
*/
|
||||
private String activityCondition;
|
||||
|
||||
/**
|
||||
* 检查情况
|
||||
*/
|
||||
private String examineCondition;
|
||||
|
||||
/**
|
||||
* 实施情况
|
||||
*/
|
||||
private String implementCondition;
|
||||
|
||||
/**
|
||||
* 安全检查情况
|
||||
*/
|
||||
private String safetyInspectionCondition;
|
||||
|
||||
/**
|
||||
* 停工或加班情况
|
||||
*/
|
||||
private String stoppageOrOvertime;
|
||||
|
||||
/**
|
||||
* 其他情况
|
||||
*/
|
||||
private String otherCondition;
|
||||
|
||||
/**
|
||||
* 文件id列表
|
||||
*/
|
||||
private List<String> fileIdList;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package org.dromara.safety.domain.req.safetylog;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/20 14:40
|
||||
*/
|
||||
@Data
|
||||
public class SafetyLogQueryReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 2954315254418593105L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
private String dateOfOccurrence;
|
||||
|
||||
/**
|
||||
* 最高气温
|
||||
*/
|
||||
private Long airTemperatureMax;
|
||||
|
||||
/**
|
||||
* 最低气温
|
||||
*/
|
||||
private Long airTemperatureMin;
|
||||
|
||||
/**
|
||||
* 气候
|
||||
*/
|
||||
private String weather;
|
||||
|
||||
/**
|
||||
* 进展
|
||||
*/
|
||||
private String progress;
|
||||
|
||||
/**
|
||||
* 作业内容
|
||||
*/
|
||||
private String jobContent;
|
||||
|
||||
/**
|
||||
* 交底情况
|
||||
*/
|
||||
private String discloseCondition;
|
||||
|
||||
/**
|
||||
* 活动情况
|
||||
*/
|
||||
private String activityCondition;
|
||||
|
||||
/**
|
||||
* 检查情况
|
||||
*/
|
||||
private String examineCondition;
|
||||
|
||||
/**
|
||||
* 实施情况
|
||||
*/
|
||||
private String implementCondition;
|
||||
|
||||
/**
|
||||
* 安全检查情况
|
||||
*/
|
||||
private String safetyInspectionCondition;
|
||||
|
||||
/**
|
||||
* 停工或加班情况
|
||||
*/
|
||||
private String stoppageOrOvertime;
|
||||
|
||||
/**
|
||||
* 其他情况
|
||||
*/
|
||||
private String otherCondition;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package org.dromara.safety.domain.req.safetylog;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/20 14:40
|
||||
*/
|
||||
@Data
|
||||
public class SafetyLogUpdateReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 8109768478468736455L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
private String dateOfOccurrence;
|
||||
|
||||
/**
|
||||
* 最高气温
|
||||
*/
|
||||
private Long airTemperatureMax;
|
||||
|
||||
/**
|
||||
* 最低气温
|
||||
*/
|
||||
private Long airTemperatureMin;
|
||||
|
||||
/**
|
||||
* 气候
|
||||
*/
|
||||
private String weather;
|
||||
|
||||
/**
|
||||
* 进展
|
||||
*/
|
||||
private String progress;
|
||||
|
||||
/**
|
||||
* 作业内容
|
||||
*/
|
||||
private String jobContent;
|
||||
|
||||
/**
|
||||
* 交底情况
|
||||
*/
|
||||
private String discloseCondition;
|
||||
|
||||
/**
|
||||
* 活动情况
|
||||
*/
|
||||
private String activityCondition;
|
||||
|
||||
/**
|
||||
* 检查情况
|
||||
*/
|
||||
private String examineCondition;
|
||||
|
||||
/**
|
||||
* 实施情况
|
||||
*/
|
||||
private String implementCondition;
|
||||
|
||||
/**
|
||||
* 安全检查情况
|
||||
*/
|
||||
private String safetyInspectionCondition;
|
||||
|
||||
/**
|
||||
* 停工或加班情况
|
||||
*/
|
||||
private String stoppageOrOvertime;
|
||||
|
||||
/**
|
||||
* 其他情况
|
||||
*/
|
||||
private String otherCondition;
|
||||
|
||||
/**
|
||||
* 文件id列表
|
||||
*/
|
||||
private List<String> fileIdList;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package org.dromara.safety.domain.req.safetyweeklyreport;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/20 15:18
|
||||
*/
|
||||
@Data
|
||||
public class SafetyWeeklyReportCreateReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -5473182951365487135L;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 周期
|
||||
*/
|
||||
private String week;
|
||||
|
||||
/**
|
||||
* 周期范围
|
||||
*/
|
||||
private String scope;
|
||||
|
||||
/**
|
||||
* 周期范围结束
|
||||
*/
|
||||
private String scopeEnd;
|
||||
|
||||
/**
|
||||
* 文件位置
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package org.dromara.safety.domain.req.safetyweeklyreport;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/20 15:18
|
||||
*/
|
||||
@Data
|
||||
public class SafetyWeeklyReportQueryReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -6673067596591751334L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 周期
|
||||
*/
|
||||
private String week;
|
||||
|
||||
/**
|
||||
* 周期范围
|
||||
*/
|
||||
private String scopeDate;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package org.dromara.safety.domain.req.safetyweeklyreport;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/20 15:18
|
||||
*/
|
||||
@Data
|
||||
public class SafetyWeeklyReportUpdateReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -2130234917426422988L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 周期
|
||||
*/
|
||||
private String week;
|
||||
|
||||
/**
|
||||
* 周期范围
|
||||
*/
|
||||
private String scope;
|
||||
|
||||
/**
|
||||
* 周期范围结束
|
||||
*/
|
||||
private String scopeEnd;
|
||||
|
||||
/**
|
||||
* 文件位置
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package org.dromara.safety.domain.req.teammeeting;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/19 11:00
|
||||
*/
|
||||
@Data
|
||||
public class TeamMeetingCreateReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 5355703238184894846L;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 分包公司id
|
||||
*/
|
||||
private Long contractorId;
|
||||
|
||||
/**
|
||||
* 开会时间
|
||||
*/
|
||||
private Date meetingDate;
|
||||
|
||||
/**
|
||||
* 宣讲人
|
||||
*/
|
||||
private Long compereId;
|
||||
|
||||
/**
|
||||
* 参与人id(多个用,号隔开)
|
||||
*/
|
||||
private List<String> participantIdList;
|
||||
|
||||
/**
|
||||
* 班会内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 班会图片(多个用,号隔开)
|
||||
*/
|
||||
private List<String> pictureList;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package org.dromara.safety.domain.req.teammeeting;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/19 11:01
|
||||
*/
|
||||
@Data
|
||||
public class TeamMeetingQueryReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 8880866939746311233L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 分包公司id
|
||||
*/
|
||||
private Long contractorId;
|
||||
|
||||
/**
|
||||
* 开会时间
|
||||
*/
|
||||
private Date meetingDate;
|
||||
|
||||
/**
|
||||
* 宣讲人
|
||||
*/
|
||||
private Long compereId;
|
||||
|
||||
/**
|
||||
* 参与人id(多个用,号隔开)
|
||||
*/
|
||||
private List<String> participantIdList;
|
||||
|
||||
/**
|
||||
* 班会内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package org.dromara.safety.domain.req.teammeeting;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lcj
|
||||
* @date 2025/3/19 11:01
|
||||
*/
|
||||
@Data
|
||||
public class TeamMeetingUpdateReq implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -5443601902997524139L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 分包公司id
|
||||
*/
|
||||
private Long contractorId;
|
||||
|
||||
/**
|
||||
* 开会时间
|
||||
*/
|
||||
private Date meetingDate;
|
||||
|
||||
/**
|
||||
* 宣讲人
|
||||
*/
|
||||
private Long compereId;
|
||||
|
||||
/**
|
||||
* 参与人id(多个用,号隔开)
|
||||
*/
|
||||
private List<String> participantIdList;
|
||||
|
||||
/**
|
||||
* 班会内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 班会图片(多个用,号隔开)
|
||||
*/
|
||||
private List<String> pictureList;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,190 @@
|
||||
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.core.domain.vo.IdAndNameVO;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.safety.domain.BusSafetyInspection;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 安全巡检工单视图对象 bus_safety_inspection
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusSafetyInspection.class)
|
||||
public class BusSafetyInspectionVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父id(默认为0)
|
||||
*/
|
||||
@ExcelProperty(value = "父id", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认为0")
|
||||
private Long pid;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 检查类型
|
||||
*/
|
||||
@ExcelProperty(value = "检查类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "safety_inspection_check_type")
|
||||
private String checkType;
|
||||
|
||||
/**
|
||||
* 违章类型
|
||||
*/
|
||||
@ExcelProperty(value = "违章类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "safety_inspection_violation_type")
|
||||
private String violationType;
|
||||
|
||||
/**
|
||||
* 巡检结果
|
||||
*/
|
||||
@ExcelProperty(value = "巡检结果")
|
||||
private String inspectionResult;
|
||||
|
||||
/**
|
||||
* 整改班组id
|
||||
*/
|
||||
/* @ExcelProperty(value = "整改班组id")
|
||||
private Long teamId;*/
|
||||
|
||||
/**
|
||||
* 整改班组
|
||||
*/
|
||||
private IdAndNameVO team;
|
||||
|
||||
/**
|
||||
* 整改人(班组长)id
|
||||
*/
|
||||
/* @ExcelProperty(value = "整改人", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "班=组长")
|
||||
private Long correctorId;*/
|
||||
|
||||
/**
|
||||
* 整改人(班组长)
|
||||
*/
|
||||
private IdAndNameVO corrector;
|
||||
|
||||
/**
|
||||
* 是否回复(1回复 2不回复)
|
||||
*/
|
||||
@ExcelProperty(value = "是否回复", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "reply_type")
|
||||
private String isReply;
|
||||
|
||||
/**
|
||||
* 回复日期
|
||||
*/
|
||||
@ExcelProperty(value = "回复日期")
|
||||
private String replyDate;
|
||||
|
||||
/**
|
||||
* 工单状态(1通知 2整改 3复查)
|
||||
*/
|
||||
@ExcelProperty(value = "工单状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "safety_inspection_type")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 问题隐患
|
||||
*/
|
||||
@ExcelProperty(value = "问题隐患")
|
||||
private String hiddenDanger;
|
||||
|
||||
/**
|
||||
* 整改措施
|
||||
*/
|
||||
@ExcelProperty(value = "整改措施")
|
||||
private String measure;
|
||||
|
||||
/**
|
||||
* 复查情况
|
||||
*/
|
||||
@ExcelProperty(value = "复查情况")
|
||||
private String review;
|
||||
|
||||
/**
|
||||
* 复查状态(1通过 2未通过)
|
||||
*/
|
||||
@ExcelProperty(value = "复查状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "review_type")
|
||||
private String reviewType;
|
||||
|
||||
/**
|
||||
* 检查时间
|
||||
*/
|
||||
@ExcelProperty(value = "检查时间")
|
||||
private Date checkTime;
|
||||
|
||||
/**
|
||||
* 整改时间
|
||||
*/
|
||||
@ExcelProperty(value = "整改时间")
|
||||
private Date rectificationTime;
|
||||
|
||||
/**
|
||||
* 复查时间
|
||||
*/
|
||||
@ExcelProperty(value = "复查时间")
|
||||
private Date reviewTime;
|
||||
|
||||
/**
|
||||
* 检查附件
|
||||
*/
|
||||
/* @ExcelProperty(value = "检查附件")
|
||||
private Long checkFile;*/
|
||||
|
||||
/**
|
||||
* 检查附件
|
||||
*/
|
||||
private IdAndNameVO checkFileUrl;
|
||||
|
||||
/**
|
||||
* 整改附件
|
||||
*/
|
||||
/* @ExcelProperty(value = "整改附件")
|
||||
private Long rectificationFile;*/
|
||||
|
||||
/**
|
||||
* 整改附件
|
||||
*/
|
||||
private IdAndNameVO rectificationFileUrl;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
@ -0,0 +1,150 @@
|
||||
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.core.domain.vo.IdAndNameVO;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.safety.domain.BusSafetyLog;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 安全日志视图对象 bus_safety_log
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusSafetyLog.class)
|
||||
public class BusSafetyLogVo 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 = "发生日期")
|
||||
private String dateOfOccurrence;
|
||||
|
||||
/**
|
||||
* 最高气温
|
||||
*/
|
||||
@ExcelProperty(value = "最高气温")
|
||||
private Long airTemperatureMax;
|
||||
|
||||
/**
|
||||
* 最低气温
|
||||
*/
|
||||
@ExcelProperty(value = "最低气温")
|
||||
private Long airTemperatureMin;
|
||||
|
||||
/**
|
||||
* 气候
|
||||
*/
|
||||
@ExcelProperty(value = "气候", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "weather_type")
|
||||
private String weather;
|
||||
|
||||
/**
|
||||
* 进展
|
||||
*/
|
||||
@ExcelProperty(value = "进展")
|
||||
private String progress;
|
||||
|
||||
/**
|
||||
* 作业内容
|
||||
*/
|
||||
@ExcelProperty(value = "作业内容")
|
||||
private String jobContent;
|
||||
|
||||
/**
|
||||
* 交底情况
|
||||
*/
|
||||
@ExcelProperty(value = "交底情况")
|
||||
private String discloseCondition;
|
||||
|
||||
/**
|
||||
* 活动情况
|
||||
*/
|
||||
@ExcelProperty(value = "活动情况")
|
||||
private String activityCondition;
|
||||
|
||||
/**
|
||||
* 检查情况
|
||||
*/
|
||||
@ExcelProperty(value = "检查情况")
|
||||
private String examineCondition;
|
||||
|
||||
/**
|
||||
* 实施情况
|
||||
*/
|
||||
@ExcelProperty(value = "实施情况")
|
||||
private String implementCondition;
|
||||
|
||||
/**
|
||||
* 安全检查情况
|
||||
*/
|
||||
@ExcelProperty(value = "安全检查情况")
|
||||
private String safetyInspectionCondition;
|
||||
|
||||
/**
|
||||
* 停工或加班情况
|
||||
*/
|
||||
@ExcelProperty(value = "停工或加班情况")
|
||||
private String stoppageOrOvertime;
|
||||
|
||||
/**
|
||||
* 其他情况
|
||||
*/
|
||||
@ExcelProperty(value = "其他情况")
|
||||
private String otherCondition;
|
||||
|
||||
/**
|
||||
* 文件id列表
|
||||
*/
|
||||
@ExcelProperty(value = "文件id列表")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 文件列表
|
||||
*/
|
||||
private List<IdAndNameVO> fileList;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private IdAndNameVO createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
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.core.domain.vo.IdAndNameVO;
|
||||
import org.dromara.safety.domain.BusSafetyWeeklyReport;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 安全周报视图对象 bus_safety_weekly_report
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusSafetyWeeklyReport.class)
|
||||
public class BusSafetyWeeklyReportVo 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 = "周期")
|
||||
private String week;
|
||||
|
||||
/**
|
||||
* 周期范围
|
||||
*/
|
||||
@ExcelProperty(value = "周期范围")
|
||||
private String scope;
|
||||
|
||||
/**
|
||||
* 周期范围结束
|
||||
*/
|
||||
@ExcelProperty(value = "周期范围结束")
|
||||
private String scopeEnd;
|
||||
|
||||
/**
|
||||
* 文件位置
|
||||
*/
|
||||
/* @ExcelProperty(value = "文件位置")
|
||||
private String path;*/
|
||||
|
||||
/**
|
||||
* 文件位置
|
||||
*/
|
||||
private IdAndNameVO path;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
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.core.domain.vo.IdAndNameVO;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.safety.domain.BusTeamMeeting;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 站班会视图对象 bus_team_meeting
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-19
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BusTeamMeeting.class)
|
||||
public class BusTeamMeetingVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@ExcelProperty(value = "项目id")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
/* @ExcelProperty(value = "班组id")
|
||||
private Long teamId;*/
|
||||
|
||||
/**
|
||||
* 班组名称
|
||||
*/
|
||||
private IdAndNameVO team;
|
||||
|
||||
/**
|
||||
* 分包公司id
|
||||
*/
|
||||
/* @ExcelProperty(value = "分包公司id")
|
||||
private Long contractorId;*/
|
||||
|
||||
/**
|
||||
* 分包公司
|
||||
*/
|
||||
private IdAndNameVO contractor;
|
||||
|
||||
/**
|
||||
* 开会时间
|
||||
*/
|
||||
@ExcelProperty(value = "开会时间")
|
||||
private Date meetingDate;
|
||||
|
||||
/**
|
||||
* 宣讲人
|
||||
*/
|
||||
/* @ExcelProperty(value = "宣讲人")
|
||||
private Long compereId;*/
|
||||
|
||||
/**
|
||||
* 宣讲人
|
||||
*/
|
||||
private IdAndNameVO compere;
|
||||
|
||||
/**
|
||||
* 参与人id(多个用,号隔开)
|
||||
*/
|
||||
/* @ExcelProperty(value = "参与人id", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "多=个用,号隔开")
|
||||
private String participantId;*/
|
||||
|
||||
/**
|
||||
* 参与人列表
|
||||
*/
|
||||
private List<IdAndNameVO> participantList;
|
||||
|
||||
/**
|
||||
* 班会内容
|
||||
*/
|
||||
@ExcelProperty(value = "班会内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 班会图片(多个用,号隔开)
|
||||
*/
|
||||
/* @ExcelProperty(value = "班会图片", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "多=个用,号隔开")
|
||||
private String picture;*/
|
||||
|
||||
/**
|
||||
* 班会图片Url
|
||||
*/
|
||||
private List<IdAndNameVO> pictureUrl;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.safety.mapper;
|
||||
|
||||
import org.dromara.safety.domain.BusSafetyInspection;
|
||||
import org.dromara.safety.domain.vo.BusSafetyInspectionVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 安全巡检工单Mapper接口
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
public interface BusSafetyInspectionMapper extends BaseMapperPlus<BusSafetyInspection, BusSafetyInspectionVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.safety.mapper;
|
||||
|
||||
import org.dromara.safety.domain.BusSafetyLog;
|
||||
import org.dromara.safety.domain.vo.BusSafetyLogVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 安全日志Mapper接口
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
public interface BusSafetyLogMapper extends BaseMapperPlus<BusSafetyLog, BusSafetyLogVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.safety.mapper;
|
||||
|
||||
import org.dromara.safety.domain.BusSafetyWeeklyReport;
|
||||
import org.dromara.safety.domain.vo.BusSafetyWeeklyReportVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 安全周报Mapper接口
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
public interface BusSafetyWeeklyReportMapper extends BaseMapperPlus<BusSafetyWeeklyReport, BusSafetyWeeklyReportVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.safety.mapper;
|
||||
|
||||
import org.dromara.safety.domain.BusTeamMeeting;
|
||||
import org.dromara.safety.domain.vo.BusTeamMeetingVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 站班会Mapper接口
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-19
|
||||
*/
|
||||
public interface BusTeamMeetingMapper extends BaseMapperPlus<BusTeamMeeting, BusTeamMeetingVo> {
|
||||
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package org.dromara.safety.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.safety.domain.BusSafetyInspection;
|
||||
import org.dromara.safety.domain.req.safetyinspection.SafetyInspectionCreateReq;
|
||||
import org.dromara.safety.domain.req.safetyinspection.SafetyInspectionQueryReq;
|
||||
import org.dromara.safety.domain.req.safetyinspection.SafetyInspectionUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusSafetyInspectionVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安全巡检工单Service接口
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
public interface IBusSafetyInspectionService extends IService<BusSafetyInspection> {
|
||||
|
||||
/**
|
||||
* 查询安全巡检工单
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 安全巡检工单
|
||||
*/
|
||||
BusSafetyInspectionVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询安全巡检工单列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 安全巡检工单分页列表
|
||||
*/
|
||||
TableDataInfo<BusSafetyInspectionVo> queryPageList(SafetyInspectionQueryReq req, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的安全巡检工单列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 安全巡检工单列表
|
||||
*/
|
||||
List<BusSafetyInspectionVo> queryList(SafetyInspectionQueryReq req);
|
||||
|
||||
/**
|
||||
* 新增安全巡检工单
|
||||
*
|
||||
* @param req 安全巡检工单
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Long insertByBo(SafetyInspectionCreateReq req);
|
||||
|
||||
/**
|
||||
* 修改安全巡检工单
|
||||
*
|
||||
* @param req 安全巡检工单
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(SafetyInspectionUpdateReq req);
|
||||
|
||||
/**
|
||||
* 校验并批量删除安全巡检工单信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取安全巡检工单视图对象
|
||||
*
|
||||
* @param safetyInspection 安全巡检工单对象
|
||||
* @return 安全巡检工单视图对象
|
||||
*/
|
||||
BusSafetyInspectionVo getVo(BusSafetyInspection safetyInspection);
|
||||
|
||||
/**
|
||||
* 获取安全巡检工单查询条件封装
|
||||
*
|
||||
* @param req 安全巡检工单查询条件
|
||||
* @return 安全巡检工单查询条件封装
|
||||
*/
|
||||
LambdaQueryWrapper<BusSafetyInspection> getQueryWrapper(SafetyInspectionQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取安全巡检工单分页对象视图
|
||||
*
|
||||
* @param safetyInspectionPage 安全巡检工单分页对象
|
||||
* @return 安全巡检工单分页对象视图
|
||||
*/
|
||||
Page<BusSafetyInspectionVo> getVoPage(Page<BusSafetyInspection> safetyInspectionPage);
|
||||
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package org.dromara.safety.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.safety.domain.BusSafetyLog;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogCreateReq;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogQueryReq;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusSafetyLogVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安全日志Service接口
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
public interface IBusSafetyLogService extends IService<BusSafetyLog> {
|
||||
|
||||
/**
|
||||
* 查询安全日志
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 安全日志
|
||||
*/
|
||||
BusSafetyLogVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询安全日志列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 安全日志分页列表
|
||||
*/
|
||||
TableDataInfo<BusSafetyLogVo> queryPageList(SafetyLogQueryReq req, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的安全日志列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 安全日志列表
|
||||
*/
|
||||
List<BusSafetyLogVo> queryList(SafetyLogQueryReq req);
|
||||
|
||||
/**
|
||||
* 新增安全日志
|
||||
*
|
||||
* @param req 安全日志
|
||||
* @return 新增id
|
||||
*/
|
||||
Long insertByBo(SafetyLogCreateReq req);
|
||||
|
||||
/**
|
||||
* 修改安全日志
|
||||
*
|
||||
* @param req 安全日志
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(SafetyLogUpdateReq req);
|
||||
|
||||
/**
|
||||
* 校验并批量删除安全日志信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取安全日志视图对象
|
||||
*
|
||||
* @param safetyLog 安全日志对象
|
||||
* @return 安全日志视图对象
|
||||
*/
|
||||
BusSafetyLogVo getVo(BusSafetyLog safetyLog);
|
||||
|
||||
/**
|
||||
* 获取安全日志查询条件封装
|
||||
*
|
||||
* @param req 安全日志查询条件
|
||||
* @return 安全日志查询条件封装
|
||||
*/
|
||||
LambdaQueryWrapper<BusSafetyLog> getQueryWrapper(SafetyLogQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取安全日志分页对象视图
|
||||
*
|
||||
* @param safetyLogPage 安全日志分页对象
|
||||
* @return 安全日志分页对象视图
|
||||
*/
|
||||
Page<BusSafetyLogVo> getVoPage(Page<BusSafetyLog> safetyLogPage);
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package org.dromara.safety.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.safety.domain.BusSafetyWeeklyReport;
|
||||
import org.dromara.safety.domain.req.safetyweeklyreport.SafetyWeeklyReportCreateReq;
|
||||
import org.dromara.safety.domain.req.safetyweeklyreport.SafetyWeeklyReportQueryReq;
|
||||
import org.dromara.safety.domain.req.safetyweeklyreport.SafetyWeeklyReportUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusSafetyWeeklyReportVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安全周报Service接口
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
public interface IBusSafetyWeeklyReportService extends IService<BusSafetyWeeklyReport> {
|
||||
|
||||
/**
|
||||
* 查询安全周报
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 安全周报
|
||||
*/
|
||||
BusSafetyWeeklyReportVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询安全周报列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 安全周报分页列表
|
||||
*/
|
||||
TableDataInfo<BusSafetyWeeklyReportVo> queryPageList(SafetyWeeklyReportQueryReq req, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的安全周报列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 安全周报列表
|
||||
*/
|
||||
List<BusSafetyWeeklyReportVo> queryList(SafetyWeeklyReportQueryReq req);
|
||||
|
||||
/**
|
||||
* 新增安全周报
|
||||
*
|
||||
* @param req 安全周报
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Long insertByBo(SafetyWeeklyReportCreateReq req);
|
||||
|
||||
/**
|
||||
* 修改安全周报
|
||||
*
|
||||
* @param req 安全周报
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(SafetyWeeklyReportUpdateReq req);
|
||||
|
||||
/**
|
||||
* 校验并批量删除安全周报信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取安全周报视图对象
|
||||
*
|
||||
* @param safetyWeeklyReport 安全周报对象
|
||||
* @return 安全周报视图对象
|
||||
*/
|
||||
BusSafetyWeeklyReportVo getVo(BusSafetyWeeklyReport safetyWeeklyReport);
|
||||
|
||||
/**
|
||||
* 获取安全周报查询条件封装
|
||||
*
|
||||
* @param req 安全周报查询条件
|
||||
* @return 安全周报查询条件封装
|
||||
*/
|
||||
LambdaQueryWrapper<BusSafetyWeeklyReport> getQueryWrapper(SafetyWeeklyReportQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取安全周报分页对象视图
|
||||
*
|
||||
* @param safetyWeeklyReportPage 安全周报分页对象
|
||||
* @return 安全周报分页对象视图
|
||||
*/
|
||||
Page<BusSafetyWeeklyReportVo> getVoPage(Page<BusSafetyWeeklyReport> safetyWeeklyReportPage);
|
||||
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package org.dromara.safety.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.safety.domain.BusTeamMeeting;
|
||||
import org.dromara.safety.domain.req.teammeeting.TeamMeetingCreateReq;
|
||||
import org.dromara.safety.domain.req.teammeeting.TeamMeetingQueryReq;
|
||||
import org.dromara.safety.domain.req.teammeeting.TeamMeetingUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusTeamMeetingVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站班会Service接口
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-19
|
||||
*/
|
||||
public interface IBusTeamMeetingService extends IService<BusTeamMeeting> {
|
||||
|
||||
/**
|
||||
* 查询站班会
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 站班会
|
||||
*/
|
||||
BusTeamMeetingVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询站班会列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 站班会分页列表
|
||||
*/
|
||||
TableDataInfo<BusTeamMeetingVo> queryPageList(TeamMeetingQueryReq req, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的站班会列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 站班会列表
|
||||
*/
|
||||
List<BusTeamMeetingVo> queryList(TeamMeetingQueryReq req);
|
||||
|
||||
/**
|
||||
* 新增站班会
|
||||
*
|
||||
* @param req 站班会
|
||||
* @return 新增站班会d
|
||||
*/
|
||||
Long insertByBo(TeamMeetingCreateReq req);
|
||||
|
||||
/**
|
||||
* 修改站班会
|
||||
*
|
||||
* @param req 站班会
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(TeamMeetingUpdateReq req);
|
||||
|
||||
/**
|
||||
* 校验并批量删除站班会信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取站班会视图对象
|
||||
*
|
||||
* @param teamMeeting 站班会对象
|
||||
* @return 站班会视图对象
|
||||
*/
|
||||
BusTeamMeetingVo getVo(BusTeamMeeting teamMeeting);
|
||||
|
||||
/**
|
||||
* 获取站班会查询条件封装
|
||||
*
|
||||
* @param req 站班会查询条件
|
||||
* @return 站班会查询条件封装
|
||||
*/
|
||||
QueryWrapper<BusTeamMeeting> getQueryWrapper(TeamMeetingQueryReq req);
|
||||
|
||||
/**
|
||||
* 获取站班会分页对象视图
|
||||
*
|
||||
* @param teamMeetingPage 站班会分页对象
|
||||
* @return 站班会分页对象视图
|
||||
*/
|
||||
Page<BusTeamMeetingVo> getVoPage(Page<BusTeamMeeting> teamMeetingPage);
|
||||
|
||||
}
|
@ -0,0 +1,288 @@
|
||||
package org.dromara.safety.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.domain.vo.IdAndNameVO;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.ObjectUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.project.domain.BusConstructionUser;
|
||||
import org.dromara.project.domain.BusProjectTeam;
|
||||
import org.dromara.project.service.IBusConstructionUserService;
|
||||
import org.dromara.project.service.IBusProjectTeamService;
|
||||
import org.dromara.safety.domain.BusSafetyInspection;
|
||||
import org.dromara.safety.domain.req.safetyinspection.SafetyInspectionCreateReq;
|
||||
import org.dromara.safety.domain.req.safetyinspection.SafetyInspectionQueryReq;
|
||||
import org.dromara.safety.domain.req.safetyinspection.SafetyInspectionUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusSafetyInspectionVo;
|
||||
import org.dromara.safety.mapper.BusSafetyInspectionMapper;
|
||||
import org.dromara.safety.service.IBusSafetyInspectionService;
|
||||
import org.dromara.system.domain.vo.SysOssVo;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安全巡检工单Service业务层处理
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Service
|
||||
public class BusSafetyInspectionServiceImpl extends ServiceImpl<BusSafetyInspectionMapper, BusSafetyInspection>
|
||||
implements IBusSafetyInspectionService {
|
||||
|
||||
@Resource
|
||||
private IBusConstructionUserService constructionUserService;
|
||||
|
||||
@Resource
|
||||
private IBusProjectTeamService projectTeamService;
|
||||
|
||||
@Resource
|
||||
private ISysOssService ossService;
|
||||
|
||||
/**
|
||||
* 查询安全巡检工单
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 安全巡检工单
|
||||
*/
|
||||
@Override
|
||||
public BusSafetyInspectionVo queryById(Long id) {
|
||||
BusSafetyInspection safetyInspection = this.getById(id);
|
||||
if (safetyInspection == null) {
|
||||
throw new ServiceException("安全巡检工单信息不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
return this.getVo(safetyInspection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询安全巡检工单列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 安全巡检工单分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusSafetyInspectionVo> queryPageList(SafetyInspectionQueryReq req, PageQuery pageQuery) {
|
||||
Page<BusSafetyInspection> result = this.page(pageQuery.build(), getQueryWrapper(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的安全巡检工单列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 安全巡检工单列表
|
||||
*/
|
||||
@Override
|
||||
public List<BusSafetyInspectionVo> queryList(SafetyInspectionQueryReq req) {
|
||||
List<BusSafetyInspection> safetyInspection = this.list(this.getQueryWrapper(req));
|
||||
return safetyInspection.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安全巡检工单
|
||||
*
|
||||
* @param req 安全巡检工单
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Long insertByBo(SafetyInspectionCreateReq req) {
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusSafetyInspection safetyInspection = new BusSafetyInspection();
|
||||
BeanUtils.copyProperties(req, safetyInspection);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(safetyInspection, true);
|
||||
// 写入数据库
|
||||
boolean save = this.save(safetyInspection);
|
||||
if (!save) {
|
||||
throw new ServiceException("新增安全巡检工单信息失败,数据库异常", HttpStatus.ERROR);
|
||||
}
|
||||
// 返回新写入的数据
|
||||
return safetyInspection.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改安全巡检工单
|
||||
*
|
||||
* @param req 安全巡检工单
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(SafetyInspectionUpdateReq req) {
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusSafetyInspection safetyInspection = new BusSafetyInspection();
|
||||
BeanUtils.copyProperties(req, safetyInspection);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(safetyInspection, false);
|
||||
// 判断是否存在
|
||||
BusSafetyInspection oldSafetyInspection = this.getById(safetyInspection.getId());
|
||||
if (oldSafetyInspection == null) {
|
||||
throw new ServiceException("修改安全巡检工单信息失败,数据不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
// 操作数据库
|
||||
return this.updateById(safetyInspection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BusSafetyInspection entity, Boolean create) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除安全巡检工单信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return this.removeBatchByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全巡检工单视图对象
|
||||
*
|
||||
* @param safetyInspection 安全巡检工单对象
|
||||
* @return 安全巡检工单视图对象
|
||||
*/
|
||||
@Override
|
||||
public BusSafetyInspectionVo getVo(BusSafetyInspection safetyInspection) {
|
||||
// 对象转封装类
|
||||
BusSafetyInspectionVo safetyInspectionVo = new BusSafetyInspectionVo();
|
||||
if (safetyInspection == null) {
|
||||
return safetyInspectionVo;
|
||||
}
|
||||
BeanUtils.copyProperties(safetyInspection, safetyInspectionVo);
|
||||
Long teamId = safetyInspection.getTeamId();
|
||||
if (teamId != null) {
|
||||
LambdaQueryWrapper<BusProjectTeam> teamLambdaQueryWrapper = Wrappers.lambdaQuery(BusProjectTeam.class)
|
||||
.select(BusProjectTeam::getId, BusProjectTeam::getTeamName)
|
||||
.eq(BusProjectTeam::getId, teamId);
|
||||
BusProjectTeam projectTeam = projectTeamService.getOne(teamLambdaQueryWrapper);
|
||||
safetyInspectionVo.setTeam(IdAndNameVO.build(projectTeam.getId(), projectTeam.getTeamName()));
|
||||
}
|
||||
Long correctorId = safetyInspection.getCorrectorId();
|
||||
if (correctorId != null) {
|
||||
LambdaQueryWrapper<BusConstructionUser> constructionUserLambdaQueryWrapper = Wrappers.lambdaQuery(BusConstructionUser.class)
|
||||
.select(BusConstructionUser::getId, BusConstructionUser::getUserName)
|
||||
.eq(BusConstructionUser::getId, correctorId);
|
||||
BusConstructionUser constructionUser = constructionUserService.getOne(constructionUserLambdaQueryWrapper);
|
||||
safetyInspectionVo.setCorrector(IdAndNameVO.build(constructionUser.getId(), constructionUser.getUserName()));
|
||||
}
|
||||
// 查询文件url
|
||||
Long checkFile = safetyInspection.getCheckFile();
|
||||
Long rectificationFile = safetyInspection.getRectificationFile();
|
||||
List<Long> fileIdList = List.of(checkFile, rectificationFile);
|
||||
if (CollUtil.isNotEmpty(fileIdList)) {
|
||||
List<SysOssVo> ossList = ossService.listByIds(fileIdList);
|
||||
for (SysOssVo sysOssVo : ossList) {
|
||||
if (checkFile.equals(sysOssVo.getOssId())) {
|
||||
safetyInspectionVo.setCheckFileUrl(IdAndNameVO.build(sysOssVo.getOssId(), sysOssVo.getUrl()));
|
||||
} else if (rectificationFile.equals(sysOssVo.getOssId())) {
|
||||
safetyInspectionVo.setRectificationFileUrl(IdAndNameVO.build(sysOssVo.getOssId(), sysOssVo.getUrl()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return safetyInspectionVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全巡检工单查询条件封装
|
||||
*
|
||||
* @param req 安全巡检工单查询条件
|
||||
* @return 安全巡检工单查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public LambdaQueryWrapper<BusSafetyInspection> getQueryWrapper(SafetyInspectionQueryReq req) {
|
||||
LambdaQueryWrapper<BusSafetyInspection> lqw = Wrappers.lambdaQuery();
|
||||
if (req == null) {
|
||||
return lqw;
|
||||
}
|
||||
Long id = req.getId();
|
||||
Long pid = req.getPid();
|
||||
Long projectId = req.getProjectId();
|
||||
String checkType = req.getCheckType();
|
||||
String violationType = req.getViolationType();
|
||||
String inspectionResult = req.getInspectionResult();
|
||||
Long teamId = req.getTeamId();
|
||||
Long correctorId = req.getCorrectorId();
|
||||
String isReply = req.getIsReply();
|
||||
String replyDate = req.getReplyDate();
|
||||
String status = req.getStatus();
|
||||
String hiddenDanger = req.getHiddenDanger();
|
||||
String measure = req.getMeasure();
|
||||
String review = req.getReview();
|
||||
String reviewType = req.getReviewType();
|
||||
Date checkTime = req.getCheckTime();
|
||||
Date rectificationTime = req.getRectificationTime();
|
||||
Date reviewTime = req.getReviewTime();
|
||||
String remark = req.getRemark();
|
||||
// 模糊查询
|
||||
lqw.like(StringUtils.isNotBlank(inspectionResult), BusSafetyInspection::getInspectionResult, inspectionResult);
|
||||
lqw.like(StringUtils.isNotBlank(hiddenDanger), BusSafetyInspection::getHiddenDanger, hiddenDanger);
|
||||
lqw.like(StringUtils.isNotBlank(measure), BusSafetyInspection::getMeasure, measure);
|
||||
lqw.like(StringUtils.isNotBlank(review), BusSafetyInspection::getReview, review);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusSafetyInspection::getRemark, remark);
|
||||
// 精准查询
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusSafetyInspection::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(pid), BusSafetyInspection::getPid, pid);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusSafetyInspection::getProjectId, projectId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(checkType), BusSafetyInspection::getCheckType, checkType);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(violationType), BusSafetyInspection::getViolationType, violationType);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(teamId), BusSafetyInspection::getTeamId, teamId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(correctorId), BusSafetyInspection::getCorrectorId, correctorId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(isReply), BusSafetyInspection::getIsReply, isReply);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(replyDate), BusSafetyInspection::getReplyDate, replyDate);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(status), BusSafetyInspection::getStatus, status);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(reviewType), BusSafetyInspection::getReviewType, reviewType);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(checkTime), BusSafetyInspection::getCheckTime, checkTime);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(rectificationTime), BusSafetyInspection::getRectificationTime, rectificationTime);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(reviewTime), BusSafetyInspection::getReviewTime, reviewTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全巡检工单分页对象视图
|
||||
*
|
||||
* @param safetyInspectionPage 安全巡检工单分页对象
|
||||
* @return 安全巡检工单分页对象视图
|
||||
*/
|
||||
@Override
|
||||
public Page<BusSafetyInspectionVo> getVoPage(Page<BusSafetyInspection> safetyInspectionPage) {
|
||||
// 获取安全巡检工单
|
||||
List<BusSafetyInspection> safetyInspectionList = safetyInspectionPage.getRecords();
|
||||
// 添加分页信息
|
||||
Page<BusSafetyInspectionVo> safetyInspectionVoPage = new Page<>(
|
||||
safetyInspectionPage.getCurrent(),
|
||||
safetyInspectionPage.getSize(),
|
||||
safetyInspectionPage.getTotal());
|
||||
if (CollUtil.isEmpty(safetyInspectionList)) {
|
||||
return safetyInspectionVoPage;
|
||||
}
|
||||
// 对象列表 => 封装对象列表
|
||||
List<BusSafetyInspectionVo> safetyInspectionVoList = safetyInspectionList.stream().map(this::getVo).toList();
|
||||
safetyInspectionVoPage.setRecords(safetyInspectionVoList);
|
||||
return safetyInspectionVoPage;
|
||||
}
|
||||
}
|
@ -0,0 +1,272 @@
|
||||
package org.dromara.safety.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.domain.vo.IdAndNameVO;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.ObjectUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.project.domain.BusConstructionUser;
|
||||
import org.dromara.project.service.IBusConstructionUserService;
|
||||
import org.dromara.safety.domain.BusSafetyLog;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogCreateReq;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogQueryReq;
|
||||
import org.dromara.safety.domain.req.safetylog.SafetyLogUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusSafetyLogVo;
|
||||
import org.dromara.safety.mapper.BusSafetyLogMapper;
|
||||
import org.dromara.safety.service.IBusSafetyLogService;
|
||||
import org.dromara.system.domain.vo.SysOssVo;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安全日志Service业务层处理
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Service
|
||||
public class BusSafetyLogServiceImpl extends ServiceImpl<BusSafetyLogMapper, BusSafetyLog>
|
||||
implements IBusSafetyLogService {
|
||||
|
||||
@Resource
|
||||
private ISysOssService ossService;
|
||||
|
||||
@Resource
|
||||
private IBusConstructionUserService constructionUserService;
|
||||
|
||||
/**
|
||||
* 查询安全日志
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 安全日志
|
||||
*/
|
||||
@Override
|
||||
public BusSafetyLogVo queryById(Long id) {
|
||||
BusSafetyLog safetyLog = this.getById(id);
|
||||
if (safetyLog == null) {
|
||||
throw new ServiceException("安全日志信息不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
return this.getVo(safetyLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询安全日志列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 安全日志分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusSafetyLogVo> queryPageList(SafetyLogQueryReq req, PageQuery pageQuery) {
|
||||
Page<BusSafetyLog> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的安全日志列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 安全日志列表
|
||||
*/
|
||||
@Override
|
||||
public List<BusSafetyLogVo> queryList(SafetyLogQueryReq req) {
|
||||
List<BusSafetyLog> safetyLogList = this.list(this.getQueryWrapper(req));
|
||||
return safetyLogList.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安全日志
|
||||
*
|
||||
* @param req 安全日志
|
||||
* @return 新增id
|
||||
*/
|
||||
@Override
|
||||
public Long insertByBo(SafetyLogCreateReq req) {
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusSafetyLog safetyLog = new BusSafetyLog();
|
||||
BeanUtils.copyProperties(req, safetyLog);
|
||||
// 数据转换
|
||||
List<String> fileIdList = req.getFileIdList();
|
||||
String fileIdStr = JSONUtil.toJsonStr(fileIdList);
|
||||
safetyLog.setFileId(fileIdStr);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(safetyLog, true);
|
||||
// 写入数据库
|
||||
boolean save = this.save(safetyLog);
|
||||
if (!save) {
|
||||
throw new ServiceException("新增安全日志信息失败,数据库异常", HttpStatus.ERROR);
|
||||
}
|
||||
// 返回新写入的数据
|
||||
return safetyLog.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改安全日志
|
||||
*
|
||||
* @param req 安全日志
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(SafetyLogUpdateReq req) {
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusSafetyLog safetyLog = new BusSafetyLog();
|
||||
BeanUtils.copyProperties(req, safetyLog);
|
||||
// 数据转换
|
||||
List<String> fileIdList = req.getFileIdList();
|
||||
String fileIdStr = JSONUtil.toJsonStr(fileIdList);
|
||||
safetyLog.setFileId(fileIdStr);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(safetyLog, false);
|
||||
// 判断是否存在
|
||||
BusSafetyLog oldSafetyLog = this.getById(safetyLog.getId());
|
||||
if (oldSafetyLog == null) {
|
||||
throw new ServiceException("修改安全日志信息失败,数据不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
// 操作数据库
|
||||
return this.updateById(safetyLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BusSafetyLog entity, Boolean create) {
|
||||
// TODO 做一些数据校验,如唯一约束
|
||||
if (create) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除安全日志信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
// TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return this.removeBatchByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全日志视图对象
|
||||
*
|
||||
* @param safetyLog 安全日志对象
|
||||
* @return 安全日志视图对象
|
||||
*/
|
||||
@Override
|
||||
public BusSafetyLogVo getVo(BusSafetyLog safetyLog) {
|
||||
// 对象转封装类
|
||||
BusSafetyLogVo safetyLogVo = new BusSafetyLogVo();
|
||||
if (safetyLog == null) {
|
||||
return safetyLogVo;
|
||||
}
|
||||
BeanUtils.copyProperties(safetyLog, safetyLogVo);
|
||||
// 关联查询文件信息
|
||||
String fileId = safetyLog.getFileId();
|
||||
List<Long> fileIdList = JSONUtil.toList(fileId, Long.class);
|
||||
if (CollectionUtil.isNotEmpty(fileIdList)) {
|
||||
List<SysOssVo> fileOssList = ossService.listByIds(fileIdList);
|
||||
List<IdAndNameVO> idAndNameVOList = fileOssList.stream()
|
||||
.map(fileOss -> IdAndNameVO.build(fileOss.getOssId(), fileOss.getUrl())).toList();
|
||||
safetyLogVo.setFileList(idAndNameVOList);
|
||||
}
|
||||
// 关联创建用户信息
|
||||
Long createBy = safetyLog.getCreateBy();
|
||||
if (createBy != null) {
|
||||
BusConstructionUser createUser = constructionUserService.getById(createBy);
|
||||
safetyLogVo.setCreateBy(IdAndNameVO.build(createUser.getId(), createUser.getUserName()));
|
||||
}
|
||||
return safetyLogVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全日志查询条件封装
|
||||
*
|
||||
* @param req 安全日志查询条件
|
||||
* @return 安全日志查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public LambdaQueryWrapper<BusSafetyLog> getQueryWrapper(SafetyLogQueryReq req) {
|
||||
LambdaQueryWrapper<BusSafetyLog> lqw = Wrappers.lambdaQuery();
|
||||
if (req == null) {
|
||||
return lqw;
|
||||
}
|
||||
Long id = req.getId();
|
||||
String dateOfOccurrence = req.getDateOfOccurrence();
|
||||
Long airTemperatureMax = req.getAirTemperatureMax();
|
||||
Long airTemperatureMin = req.getAirTemperatureMin();
|
||||
String weather = req.getWeather();
|
||||
String progress = req.getProgress();
|
||||
String jobContent = req.getJobContent();
|
||||
String discloseCondition = req.getDiscloseCondition();
|
||||
String activityCondition = req.getActivityCondition();
|
||||
String examineCondition = req.getExamineCondition();
|
||||
String implementCondition = req.getImplementCondition();
|
||||
String safetyInspectionCondition = req.getSafetyInspectionCondition();
|
||||
String stoppageOrOvertime = req.getStoppageOrOvertime();
|
||||
String otherCondition = req.getOtherCondition();
|
||||
String remark = req.getRemark();
|
||||
// 模糊查询
|
||||
lqw.like(StringUtils.isNotBlank(progress), BusSafetyLog::getProgress, progress);
|
||||
lqw.like(StringUtils.isNotBlank(jobContent), BusSafetyLog::getJobContent, jobContent);
|
||||
lqw.like(StringUtils.isNotBlank(discloseCondition), BusSafetyLog::getDiscloseCondition, discloseCondition);
|
||||
lqw.like(StringUtils.isNotBlank(activityCondition), BusSafetyLog::getActivityCondition, activityCondition);
|
||||
lqw.like(StringUtils.isNotBlank(examineCondition), BusSafetyLog::getExamineCondition, examineCondition);
|
||||
lqw.like(StringUtils.isNotBlank(implementCondition), BusSafetyLog::getImplementCondition, implementCondition);
|
||||
lqw.like(StringUtils.isNotBlank(safetyInspectionCondition), BusSafetyLog::getSafetyInspectionCondition, safetyInspectionCondition);
|
||||
lqw.like(StringUtils.isNotBlank(stoppageOrOvertime), BusSafetyLog::getStoppageOrOvertime, stoppageOrOvertime);
|
||||
lqw.like(StringUtils.isNotBlank(otherCondition), BusSafetyLog::getOtherCondition, otherCondition);
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusSafetyLog::getRemark, remark);
|
||||
// 精确查询
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusSafetyLog::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(dateOfOccurrence), BusSafetyLog::getDateOfOccurrence, dateOfOccurrence);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(airTemperatureMax), BusSafetyLog::getAirTemperatureMax, airTemperatureMax);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(airTemperatureMin), BusSafetyLog::getAirTemperatureMin, airTemperatureMin);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(weather), BusSafetyLog::getWeather, weather);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全日志分页对象视图
|
||||
*
|
||||
* @param safetyLogPage 安全日志分页对象
|
||||
* @return 安全日志分页对象视图
|
||||
*/
|
||||
@Override
|
||||
public Page<BusSafetyLogVo> getVoPage(Page<BusSafetyLog> safetyLogPage) {
|
||||
// 获取安全日志列表
|
||||
List<BusSafetyLog> safetyLogList = safetyLogPage.getRecords();
|
||||
// 添加分页信息
|
||||
Page<BusSafetyLogVo> safetyLogVoPage = new Page<>(
|
||||
safetyLogPage.getCurrent(),
|
||||
safetyLogPage.getSize(),
|
||||
safetyLogPage.getTotal());
|
||||
if (CollUtil.isEmpty(safetyLogList)) {
|
||||
return safetyLogVoPage;
|
||||
}
|
||||
// 对象列表 => 封装对象列表
|
||||
List<BusSafetyLogVo> safetyLogVoList = safetyLogList.stream().map(this::getVo).toList();
|
||||
safetyLogVoPage.setRecords(safetyLogVoList);
|
||||
return safetyLogVoPage;
|
||||
}
|
||||
}
|
@ -0,0 +1,230 @@
|
||||
package org.dromara.safety.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.domain.vo.IdAndNameVO;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.ObjectUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.safety.domain.BusSafetyWeeklyReport;
|
||||
import org.dromara.safety.domain.req.safetyweeklyreport.SafetyWeeklyReportCreateReq;
|
||||
import org.dromara.safety.domain.req.safetyweeklyreport.SafetyWeeklyReportQueryReq;
|
||||
import org.dromara.safety.domain.req.safetyweeklyreport.SafetyWeeklyReportUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusSafetyWeeklyReportVo;
|
||||
import org.dromara.safety.mapper.BusSafetyWeeklyReportMapper;
|
||||
import org.dromara.safety.service.IBusSafetyWeeklyReportService;
|
||||
import org.dromara.system.domain.vo.SysOssVo;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安全周报Service业务层处理
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-20
|
||||
*/
|
||||
@Service
|
||||
public class BusSafetyWeeklyReportServiceImpl extends ServiceImpl<BusSafetyWeeklyReportMapper, BusSafetyWeeklyReport>
|
||||
implements IBusSafetyWeeklyReportService {
|
||||
|
||||
@Resource
|
||||
private ISysOssService ossService;
|
||||
|
||||
/**
|
||||
* 查询安全周报
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 安全周报
|
||||
*/
|
||||
@Override
|
||||
public BusSafetyWeeklyReportVo queryById(Long id) {
|
||||
BusSafetyWeeklyReport safetyWeeklyReport = this.getById(id);
|
||||
if (safetyWeeklyReport == null) {
|
||||
throw new ServiceException("安全周报信息不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
return this.getVo(safetyWeeklyReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询安全周报列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 安全周报分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusSafetyWeeklyReportVo> queryPageList(SafetyWeeklyReportQueryReq req, PageQuery pageQuery) {
|
||||
Page<BusSafetyWeeklyReport> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的安全周报列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 安全周报列表
|
||||
*/
|
||||
@Override
|
||||
public List<BusSafetyWeeklyReportVo> queryList(SafetyWeeklyReportQueryReq req) {
|
||||
List<BusSafetyWeeklyReport> safetyWeeklyReportList = this.list(this.getQueryWrapper(req));
|
||||
return safetyWeeklyReportList.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安全周报
|
||||
*
|
||||
* @param req 安全周报
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Long insertByBo(SafetyWeeklyReportCreateReq req) {
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusSafetyWeeklyReport safetyWeeklyReport = new BusSafetyWeeklyReport();
|
||||
BeanUtils.copyProperties(req, safetyWeeklyReport);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(safetyWeeklyReport, true);
|
||||
// 写入数据库
|
||||
boolean save = this.save(safetyWeeklyReport);
|
||||
if (!save) {
|
||||
throw new ServiceException("新增安全周报信息失败,数据库异常", HttpStatus.ERROR);
|
||||
}
|
||||
// 返回新写入的数据
|
||||
return safetyWeeklyReport.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改安全周报
|
||||
*
|
||||
* @param req 安全周报
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(SafetyWeeklyReportUpdateReq req) {
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusSafetyWeeklyReport safetyWeeklyReport = new BusSafetyWeeklyReport();
|
||||
BeanUtils.copyProperties(req, safetyWeeklyReport);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(safetyWeeklyReport, false);
|
||||
// 判断是否存在
|
||||
BusSafetyWeeklyReport oldSafetyWeeklyReport = this.getById(safetyWeeklyReport.getId());
|
||||
if (oldSafetyWeeklyReport == null) {
|
||||
throw new ServiceException("修改安全周报信息失败,数据不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
// 操作数据库
|
||||
return this.updateById(safetyWeeklyReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BusSafetyWeeklyReport entity, Boolean create) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除安全周报信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return this.removeBatchByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全周报视图对象
|
||||
*
|
||||
* @param safetyWeeklyReport 安全周报对象
|
||||
* @return 安全周报视图对象
|
||||
*/
|
||||
@Override
|
||||
public BusSafetyWeeklyReportVo getVo(BusSafetyWeeklyReport safetyWeeklyReport) {
|
||||
// 对象转封装类
|
||||
BusSafetyWeeklyReportVo safetyWeeklyReportVo = new BusSafetyWeeklyReportVo();
|
||||
if (safetyWeeklyReport == null) {
|
||||
return safetyWeeklyReportVo;
|
||||
}
|
||||
BeanUtils.copyProperties(safetyWeeklyReport, safetyWeeklyReportVo);
|
||||
// 获取文件信息
|
||||
String path = safetyWeeklyReport.getPath();
|
||||
if (StringUtils.isNotBlank(path)) {
|
||||
SysOssVo ossVo = ossService.getById(Long.valueOf(path));
|
||||
safetyWeeklyReportVo.setPath(IdAndNameVO.build(ossVo.getOssId(), ossVo.getUrl()));
|
||||
}
|
||||
return safetyWeeklyReportVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全周报查询条件封装
|
||||
*
|
||||
* @param req 安全周报查询条件
|
||||
* @return 安全周报查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public LambdaQueryWrapper<BusSafetyWeeklyReport> getQueryWrapper(SafetyWeeklyReportQueryReq req) {
|
||||
LambdaQueryWrapper<BusSafetyWeeklyReport> lqw = Wrappers.lambdaQuery();
|
||||
if (req == null) {
|
||||
return lqw;
|
||||
}
|
||||
Long id = req.getId();
|
||||
Long projectId = req.getProjectId();
|
||||
String week = req.getWeek();
|
||||
String scopeDate = req.getScopeDate();
|
||||
String remark = req.getRemark();
|
||||
// 时间范围查询
|
||||
if (StringUtils.isNotBlank(scopeDate)) {
|
||||
String[] split = scopeDate.split(",");
|
||||
lqw.ge(BusSafetyWeeklyReport::getScopeEnd, split[0])
|
||||
.le(BusSafetyWeeklyReport::getScope, split[1]);
|
||||
}
|
||||
// 模糊查询
|
||||
lqw.like(StringUtils.isNotBlank(remark), BusSafetyWeeklyReport::getRemark, remark);
|
||||
// 精准查询
|
||||
lqw.eq(ObjectUtils.isNotEmpty(id), BusSafetyWeeklyReport::getId, id);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), BusSafetyWeeklyReport::getProjectId, projectId);
|
||||
lqw.eq(ObjectUtils.isNotEmpty(week), BusSafetyWeeklyReport::getWeek, week);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全周报分页对象视图
|
||||
*
|
||||
* @param safetyWeeklyReportPage 安全周报分页对象
|
||||
* @return 安全周报分页对象视图
|
||||
*/
|
||||
@Override
|
||||
public Page<BusSafetyWeeklyReportVo> getVoPage(Page<BusSafetyWeeklyReport> safetyWeeklyReportPage) {
|
||||
// 获取安全周报列表
|
||||
List<BusSafetyWeeklyReport> safetyWeeklyReportList = safetyWeeklyReportPage.getRecords();
|
||||
// 添加分页信息
|
||||
Page<BusSafetyWeeklyReportVo> safetyWeeklyReportVoPage = new Page<>(
|
||||
safetyWeeklyReportPage.getCurrent(),
|
||||
safetyWeeklyReportPage.getSize(),
|
||||
safetyWeeklyReportPage.getTotal());
|
||||
if (CollUtil.isEmpty(safetyWeeklyReportList)) {
|
||||
return safetyWeeklyReportVoPage;
|
||||
}
|
||||
// 对象列表 => 封装对象列表
|
||||
List<BusSafetyWeeklyReportVo> safetyWeeklyReportVoList = safetyWeeklyReportList.stream().map(this::getVo).toList();
|
||||
safetyWeeklyReportVoPage.setRecords(safetyWeeklyReportVoList);
|
||||
return safetyWeeklyReportVoPage;
|
||||
}
|
||||
}
|
@ -0,0 +1,312 @@
|
||||
package org.dromara.safety.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.domain.vo.IdAndNameVO;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.ObjectUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.project.domain.BusConstructionUser;
|
||||
import org.dromara.project.domain.BusContractor;
|
||||
import org.dromara.project.domain.BusProjectTeam;
|
||||
import org.dromara.project.service.IBusConstructionUserService;
|
||||
import org.dromara.project.service.IBusContractorService;
|
||||
import org.dromara.project.service.IBusProjectTeamService;
|
||||
import org.dromara.safety.domain.BusTeamMeeting;
|
||||
import org.dromara.safety.domain.req.teammeeting.TeamMeetingCreateReq;
|
||||
import org.dromara.safety.domain.req.teammeeting.TeamMeetingQueryReq;
|
||||
import org.dromara.safety.domain.req.teammeeting.TeamMeetingUpdateReq;
|
||||
import org.dromara.safety.domain.vo.BusTeamMeetingVo;
|
||||
import org.dromara.safety.mapper.BusTeamMeetingMapper;
|
||||
import org.dromara.safety.service.IBusTeamMeetingService;
|
||||
import org.dromara.system.domain.vo.SysOssVo;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站班会Service业务层处理
|
||||
*
|
||||
* @author lcj
|
||||
* @date 2025-03-19
|
||||
*/
|
||||
@Service
|
||||
public class BusTeamMeetingServiceImpl extends ServiceImpl<BusTeamMeetingMapper, BusTeamMeeting>
|
||||
implements IBusTeamMeetingService {
|
||||
|
||||
@Resource
|
||||
private ISysOssService ossService;
|
||||
|
||||
@Resource
|
||||
private IBusConstructionUserService constructionUserService;
|
||||
|
||||
@Resource
|
||||
private IBusContractorService contractorService;
|
||||
|
||||
@Resource
|
||||
private IBusProjectTeamService projectTeamService;
|
||||
|
||||
/**
|
||||
* 查询站班会
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 站班会
|
||||
*/
|
||||
@Override
|
||||
public BusTeamMeetingVo queryById(Long id) {
|
||||
BusTeamMeeting teamMeeting = this.getById(id);
|
||||
if (teamMeeting == null) {
|
||||
throw new ServiceException("站班会信息不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
return this.getVo(teamMeeting);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询站班会列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 站班会分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BusTeamMeetingVo> queryPageList(TeamMeetingQueryReq req, PageQuery pageQuery) {
|
||||
Page<BusTeamMeeting> result = this.page(pageQuery.build(), this.getQueryWrapper(req));
|
||||
return TableDataInfo.build(this.getVoPage(result));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的站班会列表
|
||||
*
|
||||
* @param req 查询条件
|
||||
* @return 站班会列表
|
||||
*/
|
||||
@Override
|
||||
public List<BusTeamMeetingVo> queryList(TeamMeetingQueryReq req) {
|
||||
List<BusTeamMeeting> list = this.list(this.getQueryWrapper(req));
|
||||
// 对象列表 => 封装对象列表
|
||||
return list.stream().map(this::getVo).toList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增站班会
|
||||
*
|
||||
* @param req 站班会
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Long insertByBo(TeamMeetingCreateReq req) {
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusTeamMeeting teamMeeting = new BusTeamMeeting();
|
||||
BeanUtils.copyProperties(req, teamMeeting);
|
||||
// 数据转换
|
||||
List<String> pictureList = req.getPictureList();
|
||||
String pictureStr = JSONUtil.toJsonStr(pictureList);
|
||||
teamMeeting.setPicture(pictureStr);
|
||||
List<String> participantIdList = req.getParticipantIdList();
|
||||
String participantIdStr = JSONUtil.toJsonStr(participantIdList);
|
||||
teamMeeting.setParticipantId(participantIdStr);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(teamMeeting, true);
|
||||
// 写入数据库
|
||||
boolean save = this.save(teamMeeting);
|
||||
if (!save) {
|
||||
throw new ServiceException("新增站班会信息失败,数据库异常", HttpStatus.ERROR);
|
||||
}
|
||||
// 返回新写入的数据
|
||||
return teamMeeting.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改站班会
|
||||
*
|
||||
* @param req 站班会
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TeamMeetingUpdateReq req) {
|
||||
// 将实体类和 DTO 进行转换
|
||||
BusTeamMeeting teamMeeting = new BusTeamMeeting();
|
||||
BeanUtils.copyProperties(req, teamMeeting);
|
||||
// 数据转换
|
||||
List<String> pictureList = req.getPictureList();
|
||||
String pictureStr = JSONUtil.toJsonStr(pictureList);
|
||||
teamMeeting.setPicture(pictureStr);
|
||||
List<String> participantIdList = req.getParticipantIdList();
|
||||
String participantIdStr = JSONUtil.toJsonStr(participantIdList);
|
||||
teamMeeting.setParticipantId(participantIdStr);
|
||||
// 数据校验
|
||||
validEntityBeforeSave(teamMeeting, false);
|
||||
// 判断是否存在
|
||||
BusTeamMeeting oldTeamMeeting = this.getById(teamMeeting.getId());
|
||||
if (oldTeamMeeting == null) {
|
||||
throw new ServiceException("修改站班会信息失败,数据不存在", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
// 操作数据库
|
||||
return this.updateById(teamMeeting);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BusTeamMeeting entity, Boolean create) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除站班会信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return this.removeBatchByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取站班会视图对象
|
||||
*
|
||||
* @param teamMeeting 站班会对象
|
||||
* @return 站班会视图对象
|
||||
*/
|
||||
@Override
|
||||
public BusTeamMeetingVo getVo(BusTeamMeeting teamMeeting) {
|
||||
// 对象转封装类
|
||||
BusTeamMeetingVo teamMeetingVo = new BusTeamMeetingVo();
|
||||
if (teamMeeting == null) {
|
||||
return teamMeetingVo;
|
||||
}
|
||||
BeanUtils.copyProperties(teamMeeting, teamMeetingVo);
|
||||
// 查询对应分包公司
|
||||
Long contractorId = teamMeeting.getContractorId();
|
||||
if (contractorId != null) {
|
||||
// 仅查询id 和 name
|
||||
LambdaQueryWrapper<BusContractor> contractorLambdaQueryWrapper = Wrappers.lambdaQuery(BusContractor.class)
|
||||
.select(BusContractor::getId, BusContractor::getName)
|
||||
.eq(BusContractor::getId, contractorId);
|
||||
BusContractor contractor = contractorService.getOne(contractorLambdaQueryWrapper);
|
||||
teamMeetingVo.setContractor(IdAndNameVO.build(contractor.getId(), contractor.getName()));
|
||||
}
|
||||
// 查询对应班组
|
||||
Long teamId = teamMeeting.getTeamId();
|
||||
if (teamId != null) {
|
||||
LambdaQueryWrapper<BusProjectTeam> teamLambdaQueryWrapper = Wrappers.lambdaQuery(BusProjectTeam.class)
|
||||
.select(BusProjectTeam::getId, BusProjectTeam::getTeamName)
|
||||
.eq(BusProjectTeam::getId, teamId);
|
||||
BusProjectTeam projectTeam = projectTeamService.getOne(teamLambdaQueryWrapper);
|
||||
teamMeetingVo.setTeam(IdAndNameVO.build(projectTeam.getId(), projectTeam.getTeamName()));
|
||||
}
|
||||
// 查询对应参会用户
|
||||
String participantId = teamMeeting.getParticipantId();
|
||||
List<Long> participantIdList = JSONUtil.toList(participantId, Long.class);
|
||||
if (CollUtil.isNotEmpty(participantIdList)) {
|
||||
LambdaQueryWrapper<BusConstructionUser> constructionUserLambdaQueryWrapper = Wrappers.lambdaQuery(BusConstructionUser.class)
|
||||
.select(BusConstructionUser::getId, BusConstructionUser::getUserName)
|
||||
.in(BusConstructionUser::getId, participantIdList);
|
||||
List<BusConstructionUser> constructionUserList = constructionUserService.list(constructionUserLambdaQueryWrapper);
|
||||
List<IdAndNameVO> idAndNameVOList = constructionUserList.stream()
|
||||
.map(constructionUser -> IdAndNameVO.build(constructionUser.getId(), constructionUser.getUserName()))
|
||||
.toList();
|
||||
teamMeetingVo.setParticipantList(idAndNameVOList);
|
||||
}
|
||||
// 查询对应宣讲人
|
||||
Long compereId = teamMeeting.getCompereId();
|
||||
if (compereId != null) {
|
||||
LambdaQueryWrapper<BusConstructionUser> constructionUserLambdaQueryWrapper = Wrappers.lambdaQuery(BusConstructionUser.class)
|
||||
.select(BusConstructionUser::getId, BusConstructionUser::getUserName)
|
||||
.eq(BusConstructionUser::getId, compereId);
|
||||
BusConstructionUser constructionUser = constructionUserService.getOne(constructionUserLambdaQueryWrapper);
|
||||
teamMeetingVo.setCompere(IdAndNameVO.build(constructionUser.getId(), constructionUser.getUserName()));
|
||||
}
|
||||
// 查询对应图片url
|
||||
String picture = teamMeeting.getPicture();
|
||||
List<Long> pictureIdList = JSONUtil.toList(picture, Long.class);
|
||||
if (CollUtil.isNotEmpty(pictureIdList)) {
|
||||
List<SysOssVo> ossVoList = ossService.listByIds(pictureIdList);
|
||||
List<IdAndNameVO> pictureList = ossVoList.stream()
|
||||
.map(ossVo -> IdAndNameVO.build(ossVo.getOssId(), ossVo.getUrl())).toList();
|
||||
teamMeetingVo.setPictureUrl(pictureList);
|
||||
}
|
||||
return teamMeetingVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取站班会查询条件封装
|
||||
*
|
||||
* @param req 站班会查询条件
|
||||
* @return 站班会查询条件封装
|
||||
*/
|
||||
@Override
|
||||
public QueryWrapper<BusTeamMeeting> getQueryWrapper(TeamMeetingQueryReq req) {
|
||||
QueryWrapper<BusTeamMeeting> queryWrapper = new QueryWrapper<>();
|
||||
if (req == null) {
|
||||
return queryWrapper;
|
||||
}
|
||||
Long id = req.getId();
|
||||
Long projectId = req.getProjectId();
|
||||
Long teamId = req.getTeamId();
|
||||
Long contractorId = req.getContractorId();
|
||||
Date meetingDate = req.getMeetingDate();
|
||||
Long compereId = req.getCompereId();
|
||||
List<String> participantIdList = req.getParticipantIdList();
|
||||
String content = req.getContent();
|
||||
String remark = req.getRemark();
|
||||
// JSON 数组查询
|
||||
if (CollUtil.isNotEmpty(participantIdList)) {
|
||||
for (String participantId : participantIdList) {
|
||||
queryWrapper.like("participant_id", "\"" + participantId + "\"");
|
||||
}
|
||||
}
|
||||
// 模糊查询
|
||||
queryWrapper.like(StringUtils.isNotBlank(content), "content", content);
|
||||
queryWrapper.like(StringUtils.isNotBlank(remark), "remark", remark);
|
||||
// 精准查询
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(projectId), "project_id", projectId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(teamId), "team_id", teamId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(contractorId), "contractor_id", contractorId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(meetingDate), "meeting_date", meetingDate);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(compereId), "compere_id", compereId);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取站班会分页对象视图
|
||||
*
|
||||
* @param teamMeetingPage 站班会分页对象
|
||||
* @return 站班会分页对象视图
|
||||
*/
|
||||
@Override
|
||||
public Page<BusTeamMeetingVo> getVoPage(Page<BusTeamMeeting> teamMeetingPage) {
|
||||
// 获取材料数据
|
||||
List<BusTeamMeeting> teamMeetingList = teamMeetingPage.getRecords();
|
||||
// 添加分页信息
|
||||
Page<BusTeamMeetingVo> teamMeetingVoPage = new Page<>(teamMeetingPage.getCurrent(), teamMeetingPage.getSize(), teamMeetingPage.getTotal());
|
||||
if (CollUtil.isEmpty(teamMeetingList)) {
|
||||
return teamMeetingVoPage;
|
||||
}
|
||||
// 对象列表 => 封装对象列表
|
||||
List<BusTeamMeetingVo> teamMeetingVoList = teamMeetingList.stream().map(this::getVo).toList();
|
||||
teamMeetingVoPage.setRecords(teamMeetingVoList);
|
||||
return teamMeetingVoPage;
|
||||
}
|
||||
}
|
@ -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.BusSafetyInspectionMapper">
|
||||
|
||||
</mapper>
|
@ -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.BusSafetyLogMapper">
|
||||
|
||||
</mapper>
|
@ -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.BusSafetyWeeklyReportMapper">
|
||||
|
||||
</mapper>
|
@ -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.BusTeamMeetingMapper">
|
||||
|
||||
</mapper>
|
@ -277,3 +277,83 @@ values(1897935932513890310, '机械详情删除', 1897935932513890306, '4', '#'
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1897935932513890311, '机械详情导出', 1897935932513890306, '5', '#', '', 1, 0, 'F', '0', '0', 'machinery:machineryDetail:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902191763472310274, '站班会', '1902191175640604673', '1', 'teamMeeting', 'safety/teamMeeting/index', 1, 0, 'C', '0', '0', 'safety:teamMeeting:list', '#', 103, 1, sysdate(), null, null, '站班会菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902191763472310275, '站班会查询', 1902191763472310274, '1', '#', '', 1, 0, 'F', '0', '0', 'safety:teamMeeting:query', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902191763472310276, '站班会新增', 1902191763472310274, '2', '#', '', 1, 0, 'F', '0', '0', 'safety:teamMeeting:add', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902191763472310277, '站班会修改', 1902191763472310274, '3', '#', '', 1, 0, 'F', '0', '0', 'safety:teamMeeting:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902191763472310278, '站班会删除', 1902191763472310274, '4', '#', '', 1, 0, 'F', '0', '0', 'safety:teamMeeting:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902191763472310279, '站班会导出', 1902191763472310274, '5', '#', '', 1, 0, 'F', '0', '0', 'safety:teamMeeting:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902565328299245569, '安全巡检工单', '1902191175640604673', '1', 'safetyInspection', 'safety/safetyInspection/index', 1, 0, 'C', '0', '0', 'safety:safetyInspection:list', '#', 103, 1, sysdate(), null, null, '安全巡检工单菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902565328299245570, '安全巡检工单查询', 1902565328299245569, '1', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyInspection:query', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902565328299245571, '安全巡检工单新增', 1902565328299245569, '2', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyInspection:add', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902565328299245572, '安全巡检工单修改', 1902565328299245569, '3', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyInspection:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902565328299245573, '安全巡检工单删除', 1902565328299245569, '4', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyInspection:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902565328299245574, '安全巡检工单导出', 1902565328299245569, '5', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyInspection:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955765108738, '安全日志', '1902191175640604673', '1', 'safetyLog', 'safety/safetyLog/index', 1, 0, 'C', '0', '0', 'safety:safetyLog:list', '#', 103, 1, sysdate(), null, null, '安全日志菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955765108739, '安全日志查询', 1902609955765108738, '1', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyLog:query', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955765108740, '安全日志新增', 1902609955765108738, '2', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyLog:add', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955765108741, '安全日志修改', 1902609955765108738, '3', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyLog:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955765108742, '安全日志删除', 1902609955765108738, '4', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyLog:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955765108743, '安全日志导出', 1902609955765108738, '5', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyLog:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955433758722, '安全周报', '1902191175640604673', '1', 'safetyWeeklyReport', 'safety/safetyWeeklyReport/index', 1, 0, 'C', '0', '0', 'safety:safetyWeeklyReport:list', '#', 103, 1, sysdate(), null, null, '安全周报菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955433758723, '安全周报查询', 1902609955433758722, '1', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyWeeklyReport:query', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955433758724, '安全周报新增', 1902609955433758722, '2', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyWeeklyReport:add', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955433758725, '安全周报修改', 1902609955433758722, '3', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyWeeklyReport:edit', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955433758726, '安全周报删除', 1902609955433758722, '4', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyWeeklyReport:remove', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
|
||||
values(1902609955433758727, '安全周报导出', 1902609955433758722, '5', '#', '', 1, 0, 'F', '0', '0', 'safety:safetyWeeklyReport:export', '#', 103, 1, sysdate(), null, null, '');
|
||||
|
@ -281,3 +281,110 @@ CREATE TABLE `bus_machinery_detail`
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_machinery_id` (`machinery_id` ASC) USING BTREE comment '机械主键id'
|
||||
) comment = '机械详情' collate = utf8mb4_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `bus_team_meeting`;
|
||||
CREATE TABLE `bus_team_meeting`
|
||||
(
|
||||
`id` bigint not null auto_increment comment '主键id',
|
||||
`project_id` bigint not null comment '项目id',
|
||||
`team_id` bigint not null comment '班组id',
|
||||
`contractor_id` bigint null comment '分包公司id',
|
||||
`meeting_date` datetime null comment '开会时间',
|
||||
`compere_id` bigint null comment '宣讲人',
|
||||
`participant_id` text null comment '参与人id(多个用,号隔开)',
|
||||
`content` text null comment '班会内容',
|
||||
`picture` text null comment '班会图片(多个用,号隔开)',
|
||||
`remark` varchar(512) null comment '备注',
|
||||
`create_by` varchar(64) null comment '创建者',
|
||||
`update_by` varchar(64) null comment '更新者',
|
||||
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||
`deleted_at` datetime null comment '删除时间',
|
||||
`is_delete` tinyint(4) default 0 not null comment '是否删除(0正常 1删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_team_id` (`team_id` ASC) USING BTREE comment '班组ID'
|
||||
) comment = '站班会' collate = utf8mb4_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `bus_safety_inspection`;
|
||||
CREATE TABLE `bus_safety_inspection`
|
||||
(
|
||||
`id` bigint not null auto_increment comment '主键ID',
|
||||
`pid` bigint null comment '父id(默认为0)',
|
||||
`project_id` bigint not null comment '项目ID',
|
||||
`check_type` char(1) null comment '检查类型',
|
||||
`violation_type` char(1) null comment '违章类型',
|
||||
`inspection_result` varchar(300) null comment '巡检结果',
|
||||
`team_id` bigint null comment '整改班组id',
|
||||
`corrector_id` bigint null comment '整改人(班组长)id',
|
||||
`is_reply` char(1) null comment '是否回复(1回复 2不回复)',
|
||||
`reply_date` varchar(20) null comment '回复日期',
|
||||
`status` char(1) null comment '工单状态(1通知 2整改 3复查)',
|
||||
`hidden_danger` varchar(1024) null comment '问题隐患',
|
||||
`measure` varchar(1024) null comment '整改措施',
|
||||
`review` varchar(1024) null comment '复查情况',
|
||||
`review_type` char(1) null comment '复查状态(1通过 2未通过)',
|
||||
`check_time` datetime null comment '检查时间',
|
||||
`rectification_time` datetime null comment '整改时间',
|
||||
`review_time` datetime null comment '复查时间',
|
||||
`check_file` bigint null comment '检查附件',
|
||||
`rectification_file` bigint null comment '整改附件',
|
||||
`remark` varchar(512) null comment '备注',
|
||||
`create_by` varchar(64) null comment '创建者',
|
||||
`update_by` varchar(64) null comment '更新者',
|
||||
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||
`deleted_at` datetime null comment '删除时间',
|
||||
`is_delete` tinyint(4) default 0 not null comment '是否删除(0正常 1删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_project_id` (`project_id` ASC) USING BTREE
|
||||
) comment = '安全巡检工单' COLLATE = utf8mb4_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `bus_safety_log`;
|
||||
CREATE TABLE `bus_safety_log`
|
||||
(
|
||||
`id` bigint not null auto_increment comment '主键id',
|
||||
`project_id` bigint not null comment '项目id',
|
||||
`date_of_occurrence` varchar(16) null comment '发生日期',
|
||||
`air_temperature_max` double null comment '最高气温',
|
||||
`air_temperature_min` double null comment '最低气温',
|
||||
`weather` char(1) null comment '气候',
|
||||
`progress` varchar(1024) null comment '进展',
|
||||
`job_content` varchar(1024) null comment '作业内容',
|
||||
`disclose_condition` varchar(1024) null comment '交底情况',
|
||||
`activity_condition` varchar(1024) null comment '活动情况',
|
||||
`examine_condition` varchar(1024) null comment '检查情况',
|
||||
`implement_condition` varchar(1024) null comment '实施情况',
|
||||
`safety_inspection_condition` varchar(1024) null comment '安全检查情况',
|
||||
`stoppage_or_overtime` varchar(1024) null comment '停工或加班情况',
|
||||
`other_condition` varchar(1024) null comment '其他情况',
|
||||
`file_id` varchar(1024) null comment '文件id列表',
|
||||
`remark` varchar(512) null comment '备注',
|
||||
`create_by` varchar(64) null comment '创建者',
|
||||
`update_by` varchar(64) null comment '更新者',
|
||||
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||
`deleted_at` datetime null comment '删除时间',
|
||||
`is_delete` tinyint(4) default 0 not null comment '是否删除(0正常 1删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_project_id` (`project_id` ASC) USING BTREE comment '项目id'
|
||||
) comment = '安全日志' collate = utf8mb4_unicode_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `bus_safety_weekly_report`;
|
||||
CREATE TABLE `bus_safety_weekly_report`
|
||||
(
|
||||
`id` bigint not null auto_increment comment '主键id',
|
||||
`project_id` bigint not null comment '项目id',
|
||||
`week` varchar(50) null comment '周期',
|
||||
`scope` varchar(20) null comment '周期范围',
|
||||
`scope_end` varchar(20) null comment '周期范围结束',
|
||||
`path` varchar(256) null comment '文件位置',
|
||||
`remark` varchar(512) null comment '备注',
|
||||
`create_by` varchar(64) null comment '创建者',
|
||||
`update_by` varchar(64) null comment '更新者',
|
||||
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
|
||||
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||
`deleted_at` datetime null comment '删除时间',
|
||||
`is_delete` tinyint(4) default 0 not null comment '是否删除(0正常 1删除)',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_project_id` (`project_id` ASC) USING BTREE comment '项目id'
|
||||
) comment = '安全周报' collate = utf8mb4_unicode_ci;
|
||||
|
Reference in New Issue
Block a user