Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

zhangcl 18 saat önce
ebeveyn
işleme
95fe5bcb0e

+ 94 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/report/QhseMonthReportController.java

@@ -0,0 +1,94 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.report;
+
+import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo.QhseMonthReportPageReqVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo.QhseMonthReportRespVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo.QhseMonthReportSaveReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.report.QhseMonthReportDO;
+import cn.iocoder.yudao.module.pms.service.qhse.report.QhseMonthReportService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.io.IOException;
+import java.util.List;
+
+import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+
+@Tag(name = "管理后台 - 资料")
+@RestController
+@RequestMapping("/rq/qhse-month-report")
+@Validated
+public class QhseMonthReportController {
+
+    @Resource
+    private QhseMonthReportService qhseMonthReportService;
+
+    @PostMapping("/create")
+    @Operation(summary = "创建资料")
+    @PreAuthorize("@ss.hasPermission('rq:qhse-month-report:create')")
+    public CommonResult<Long> createQhseMonthReport(@Valid @RequestBody QhseMonthReportSaveReqVO createReqVO) {
+        return success(qhseMonthReportService.createQhseMonthReport(createReqVO));
+    }
+
+    @PutMapping("/update")
+    @Operation(summary = "更新资料")
+    @PreAuthorize("@ss.hasPermission('rq:qhse-month-report:update')")
+    public CommonResult<Boolean> updateQhseMonthReport(@Valid @RequestBody QhseMonthReportSaveReqVO updateReqVO) {
+        qhseMonthReportService.updateQhseMonthReport(updateReqVO);
+        return success(true);
+    }
+
+    @DeleteMapping("/delete")
+    @Operation(summary = "删除资料")
+    @Parameter(name = "id", description = "编号", required = true)
+    @PreAuthorize("@ss.hasPermission('rq:qhse-month-report:delete')")
+    public CommonResult<Boolean> deleteQhseMonthReport(@RequestParam("id") Long id) {
+        qhseMonthReportService.deleteQhseMonthReport(id);
+        return success(true);
+    }
+
+    @GetMapping("/get")
+    @Operation(summary = "获得资料")
+    @Parameter(name = "id", description = "编号", required = true, example = "1024")
+    @PreAuthorize("@ss.hasPermission('rq:qhse-month-report:query')")
+    public CommonResult<QhseMonthReportRespVO> getQhseMonthReport(@RequestParam("id") Long id) {
+        QhseMonthReportDO qhseMonthReport = qhseMonthReportService.getQhseMonthReport(id);
+        return success(BeanUtils.toBean(qhseMonthReport, QhseMonthReportRespVO.class));
+    }
+
+    @GetMapping("/page")
+    @Operation(summary = "获得资料分页")
+    @PreAuthorize("@ss.hasPermission('rq:qhse-month-report:query')")
+    public CommonResult<PageResult<QhseMonthReportRespVO>> getQhseMonthReportPage(@Valid QhseMonthReportPageReqVO pageReqVO) {
+        PageResult<QhseMonthReportDO> pageResult = qhseMonthReportService.getQhseMonthReportPage(pageReqVO);
+        return success(BeanUtils.toBean(pageResult, QhseMonthReportRespVO.class));
+    }
+
+    @GetMapping("/export-excel")
+    @Operation(summary = "导出资料 Excel")
+    @PreAuthorize("@ss.hasPermission('rq:qhse-month-report:export')")
+    @ApiAccessLog(operateType = EXPORT)
+    public void exportQhseMonthReportExcel(@Valid QhseMonthReportPageReqVO pageReqVO,
+              HttpServletResponse response) throws IOException {
+        pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+        List<QhseMonthReportDO> list = qhseMonthReportService.getQhseMonthReportPage(pageReqVO).getList();
+        // 导出 Excel
+        ExcelUtils.write(response, "资料.xls", "数据", QhseMonthReportRespVO.class,
+                        BeanUtils.toBean(list, QhseMonthReportRespVO.class));
+    }
+
+}

+ 117 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/report/vo/QhseMonthReportPageReqVO.java

@@ -0,0 +1,117 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo;
+
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDateTime;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - 资料分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class QhseMonthReportPageReqVO extends PageParam {
+
+    @Schema(description = "员工人数")
+    private String employee;
+
+    @Schema(description = "分包商人数")
+    private String subcontractors;
+
+    @Schema(description = "安全行驶里程数(公里)")
+    private String drivingMileage;
+
+    @Schema(description = "总人工时数(小时)")
+    private String totalManHours;
+
+    @Schema(description = "无事故累计天数")
+    private String withoutAccident;
+
+    @Schema(description = "死亡事故(起)")
+    private String fatality;
+
+    @Schema(description = "损失工时事故(起)")
+    private String injury;
+
+    @Schema(description = "工作受限事件(起)")
+    private String restrictedCase;
+
+    @Schema(description = "医疗处理事件起")
+    private String medicalCase;
+
+    @Schema(description = "急救箱事件(起)")
+    private String firstAidCase;
+
+    @Schema(description = "交通事故(起)")
+    private String vehicleAccident;
+
+    @Schema(description = "未遂事件(起)")
+    private String nearMiss;
+
+    @Schema(description = "泄漏事件(起)")
+    private String spill;
+
+    @Schema(description = "违反“保命规则”的次数(次)")
+    private String lifeSavingRules;
+
+    @Schema(description = "班前会(次)")
+    private String toolboxTalk;
+
+    @Schema(description = "QHSE管理委员会会议(次)")
+    private String committeeMeeting;
+
+    @Schema(description = "QHSE月度例会(次)")
+    private String monthlyMeeting;
+
+    @Schema(description = "公司级隐患排查(次)")
+    private String companyHazard;
+
+    @Schema(description = "QHSE检查(次)")
+    private String qhseInspection;
+
+    @Schema(description = "安全观察卡(张)")
+    private String socCards;
+
+    @Schema(description = "工作许可审核(份)")
+    private String ptwAudit;
+
+    @Schema(description = "工作安全分析(次)")
+    private String jsa;
+
+    @Schema(description = "演练次数")
+    private String drills;
+
+    @Schema(description = "QHSE培训次数")
+    private String training;
+
+    @Schema(description = "QHSE培训人次")
+    private String participantsTraining;
+
+    @Schema(description = "QHSE培训学时数(小时)")
+    private String trainingsHours;
+
+    @Schema(description = "水消耗(吨)")
+    private String waterConsumption;
+
+    @Schema(description = "柴油消耗(升)")
+    private String dieselConsumption;
+
+    @Schema(description = "用电量(千瓦·小时)")
+    private String electricityConsumption;
+
+    @Schema(description = "天然气消耗量(立方米)")
+    private String naturalGasConsumption;
+
+    @Schema(description = "备注", example = "你说的对")
+    private String remark;
+
+    @Schema(description = "创建时间")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime[] createTime;
+
+}

+ 147 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/report/vo/QhseMonthReportRespVO.java

@@ -0,0 +1,147 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Schema(description = "管理后台 - 资料 Response VO")
+@Data
+@ExcelIgnoreUnannotated
+public class QhseMonthReportRespVO {
+
+    @Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28182")
+    @ExcelProperty("主键id")
+    private Long id;
+
+    @Schema(description = "员工人数", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("员工人数")
+    private String employee;
+
+    @Schema(description = "分包商人数", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("分包商人数")
+    private String subcontractors;
+
+    @Schema(description = "安全行驶里程数(公里)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("安全行驶里程数(公里)")
+    private String drivingMileage;
+
+    @Schema(description = "总人工时数(小时)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("总人工时数(小时)")
+    private String totalManHours;
+
+    @Schema(description = "无事故累计天数", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("无事故累计天数")
+    private String withoutAccident;
+
+    @Schema(description = "死亡事故(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("死亡事故(起)")
+    private String fatality;
+
+    @Schema(description = "损失工时事故(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("损失工时事故(起)")
+    private String injury;
+
+    @Schema(description = "工作受限事件(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("工作受限事件(起)")
+    private String restrictedCase;
+
+    @Schema(description = "医疗处理事件起", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("医疗处理事件起")
+    private String medicalCase;
+
+    @Schema(description = "急救箱事件(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("急救箱事件(起)")
+    private String firstAidCase;
+
+    @Schema(description = "交通事故(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("交通事故(起)")
+    private String vehicleAccident;
+
+    @Schema(description = "未遂事件(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("未遂事件(起)")
+    private String nearMiss;
+
+    @Schema(description = "泄漏事件(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("泄漏事件(起)")
+    private String spill;
+
+    @Schema(description = "违反“保命规则”的次数(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("违反“保命规则”的次数(次)")
+    private String lifeSavingRules;
+
+    @Schema(description = "班前会(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("班前会(次)")
+    private String toolboxTalk;
+
+    @Schema(description = "QHSE管理委员会会议(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("QHSE管理委员会会议(次)")
+    private String committeeMeeting;
+
+    @Schema(description = "QHSE月度例会(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("QHSE月度例会(次)")
+    private String monthlyMeeting;
+
+    @Schema(description = "公司级隐患排查(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("公司级隐患排查(次)")
+    private String companyHazard;
+
+    @Schema(description = "QHSE检查(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("QHSE检查(次)")
+    private String qhseInspection;
+
+    @Schema(description = "安全观察卡(张)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("安全观察卡(张)")
+    private String socCards;
+
+    @Schema(description = "工作许可审核(份)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("工作许可审核(份)")
+    private String ptwAudit;
+
+    @Schema(description = "工作安全分析(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("工作安全分析(次)")
+    private String jsa;
+
+    @Schema(description = "演练次数", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("演练次数")
+    private String drills;
+
+    @Schema(description = "QHSE培训次数", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("QHSE培训次数")
+    private String training;
+
+    @Schema(description = "QHSE培训人次", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("QHSE培训人次")
+    private String participantsTraining;
+
+    @Schema(description = "QHSE培训学时数(小时)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("QHSE培训学时数(小时)")
+    private String trainingsHours;
+
+    @Schema(description = "水消耗(吨)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("水消耗(吨)")
+    private String waterConsumption;
+
+    @Schema(description = "柴油消耗(升)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("柴油消耗(升)")
+    private String dieselConsumption;
+
+    @Schema(description = "用电量(千瓦·小时)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("用电量(千瓦·小时)")
+    private String electricityConsumption;
+
+    @Schema(description = "天然气消耗量(立方米)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("天然气消耗量(立方米)")
+    private String naturalGasConsumption;
+
+    @Schema(description = "备注", example = "你说的对")
+    @ExcelProperty("备注")
+    private String remark;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("创建时间")
+    private LocalDateTime createTime;
+
+}

+ 138 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/report/vo/QhseMonthReportSaveReqVO.java

@@ -0,0 +1,138 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+
+@Schema(description = "管理后台 - 资料新增/修改 Request VO")
+@Data
+public class QhseMonthReportSaveReqVO {
+
+    @Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28182")
+    private Long id;
+
+    @Schema(description = "员工人数", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "员工人数不能为空")
+    private String employee;
+
+    @Schema(description = "分包商人数", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "分包商人数不能为空")
+    private String subcontractors;
+
+    @Schema(description = "安全行驶里程数(公里)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "安全行驶里程数(公里)不能为空")
+    private String drivingMileage;
+
+    @Schema(description = "总人工时数(小时)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "总人工时数(小时)不能为空")
+    private String totalManHours;
+
+    @Schema(description = "无事故累计天数", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "无事故累计天数不能为空")
+    private String withoutAccident;
+
+    @Schema(description = "死亡事故(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "死亡事故(起)不能为空")
+    private String fatality;
+
+    @Schema(description = "损失工时事故(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "损失工时事故(起)不能为空")
+    private String injury;
+
+    @Schema(description = "工作受限事件(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "工作受限事件(起)不能为空")
+    private String restrictedCase;
+
+    @Schema(description = "医疗处理事件起", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "医疗处理事件起不能为空")
+    private String medicalCase;
+
+    @Schema(description = "急救箱事件(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "急救箱事件(起)不能为空")
+    private String firstAidCase;
+
+    @Schema(description = "交通事故(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "交通事故(起)不能为空")
+    private String vehicleAccident;
+
+    @Schema(description = "未遂事件(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "未遂事件(起)不能为空")
+    private String nearMiss;
+
+    @Schema(description = "泄漏事件(起)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "泄漏事件(起)不能为空")
+    private String spill;
+
+    @Schema(description = "违反“保命规则”的次数(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "违反“保命规则”的次数(次)不能为空")
+    private String lifeSavingRules;
+
+    @Schema(description = "班前会(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "班前会(次)不能为空")
+    private String toolboxTalk;
+
+    @Schema(description = "QHSE管理委员会会议(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "QHSE管理委员会会议(次)不能为空")
+    private String committeeMeeting;
+
+    @Schema(description = "QHSE月度例会(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "QHSE月度例会(次)不能为空")
+    private String monthlyMeeting;
+
+    @Schema(description = "公司级隐患排查(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "公司级隐患排查(次)不能为空")
+    private String companyHazard;
+
+    @Schema(description = "QHSE检查(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "QHSE检查(次)不能为空")
+    private String qhseInspection;
+
+    @Schema(description = "安全观察卡(张)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "安全观察卡(张)不能为空")
+    private String socCards;
+
+    @Schema(description = "工作许可审核(份)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "工作许可审核(份)不能为空")
+    private String ptwAudit;
+
+    @Schema(description = "工作安全分析(次)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "工作安全分析(次)不能为空")
+    private String jsa;
+
+    @Schema(description = "演练次数", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "演练次数不能为空")
+    private String drills;
+
+    @Schema(description = "QHSE培训次数", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "QHSE培训次数不能为空")
+    private String training;
+
+    @Schema(description = "QHSE培训人次", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "QHSE培训人次不能为空")
+    private String participantsTraining;
+
+    @Schema(description = "QHSE培训学时数(小时)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "QHSE培训学时数(小时)不能为空")
+    private String trainingsHours;
+
+    @Schema(description = "水消耗(吨)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "水消耗(吨)不能为空")
+    private String waterConsumption;
+
+    @Schema(description = "柴油消耗(升)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "柴油消耗(升)不能为空")
+    private String dieselConsumption;
+
+    @Schema(description = "用电量(千瓦·小时)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "用电量(千瓦·小时)不能为空")
+    private String electricityConsumption;
+
+    @Schema(description = "天然气消耗量(立方米)", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "天然气消耗量(立方米)不能为空")
+    private String naturalGasConsumption;
+
+    @Schema(description = "备注", example = "你说的对")
+    private String remark;
+
+}

+ 154 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/qhse/report/QhseMonthReportDO.java

@@ -0,0 +1,154 @@
+package cn.iocoder.yudao.module.pms.dal.dataobject.qhse.report;
+
+import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+import com.baomidou.mybatisplus.annotation.KeySequence;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.*;
+
+/**
+ * 资料 DO
+ *
+ * @author 超级管理员
+ */
+@TableName("rq_qhse_month_report")
+@KeySequence("rq_qhse_month_report_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class QhseMonthReportDO extends BaseDO {
+
+    /**
+     * 主键id
+     */
+    @TableId
+    private Long id;
+    /**
+     * 员工人数
+     */
+    private String employee;
+    /**
+     * 分包商人数
+     */
+    private String subcontractors;
+    /**
+     * 安全行驶里程数(公里)
+     */
+    private String drivingMileage;
+    /**
+     * 总人工时数(小时)
+     */
+    private String totalManHours;
+    /**
+     * 无事故累计天数
+     */
+    private String withoutAccident;
+    /**
+     * 死亡事故(起)
+     */
+    private String fatality;
+    /**
+     * 损失工时事故(起)
+     */
+    private String injury;
+    /**
+     * 工作受限事件(起)
+     */
+    private String restrictedCase;
+    /**
+     * 医疗处理事件起
+     */
+    private String medicalCase;
+    /**
+     * 急救箱事件(起)
+     */
+    private String firstAidCase;
+    /**
+     * 交通事故(起)
+     */
+    private String vehicleAccident;
+    /**
+     * 未遂事件(起)
+     */
+    private String nearMiss;
+    /**
+     * 泄漏事件(起)
+     */
+    private String spill;
+    /**
+     * 违反“保命规则”的次数(次)
+     */
+    private String lifeSavingRules;
+    /**
+     * 班前会(次)
+     */
+    private String toolboxTalk;
+    /**
+     * QHSE管理委员会会议(次)
+     */
+    private String committeeMeeting;
+    /**
+     * QHSE月度例会(次)
+     */
+    private String monthlyMeeting;
+    /**
+     * 公司级隐患排查(次)
+     */
+    private String companyHazard;
+    /**
+     * QHSE检查(次)
+     */
+    private String qhseInspection;
+    /**
+     * 安全观察卡(张)
+     */
+    private String socCards;
+    /**
+     * 工作许可审核(份)
+     */
+    private String ptwAudit;
+    /**
+     * 工作安全分析(次)
+     */
+    private String jsa;
+    /**
+     * 演练次数
+     */
+    private String drills;
+    /**
+     * QHSE培训次数
+     */
+    private String training;
+    /**
+     * QHSE培训人次
+     */
+    private String participantsTraining;
+    /**
+     * QHSE培训学时数(小时)
+     */
+    private String trainingsHours;
+    /**
+     * 水消耗(吨)
+     */
+    private String waterConsumption;
+    /**
+     * 柴油消耗(升)
+     */
+    private String dieselConsumption;
+    /**
+     * 用电量(千瓦·小时)
+     */
+    private String electricityConsumption;
+    /**
+     * 天然气消耗量(立方米)
+     */
+    private String naturalGasConsumption;
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 55 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/qhse/report/QhseMonthReportMapper.java

@@ -0,0 +1,55 @@
+package cn.iocoder.yudao.module.pms.dal.mysql.qhse.report;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
+import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo.QhseMonthReportPageReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.report.QhseMonthReportDO;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 资料 Mapper
+ *
+ * @author 超级管理员
+ */
+@Mapper
+public interface QhseMonthReportMapper extends BaseMapperX<QhseMonthReportDO> {
+
+    default PageResult<QhseMonthReportDO> selectPage(QhseMonthReportPageReqVO reqVO) {
+        return selectPage(reqVO, new LambdaQueryWrapperX<QhseMonthReportDO>()
+                .eqIfPresent(QhseMonthReportDO::getEmployee, reqVO.getEmployee())
+                .eqIfPresent(QhseMonthReportDO::getSubcontractors, reqVO.getSubcontractors())
+                .eqIfPresent(QhseMonthReportDO::getDrivingMileage, reqVO.getDrivingMileage())
+                .eqIfPresent(QhseMonthReportDO::getTotalManHours, reqVO.getTotalManHours())
+                .eqIfPresent(QhseMonthReportDO::getWithoutAccident, reqVO.getWithoutAccident())
+                .eqIfPresent(QhseMonthReportDO::getFatality, reqVO.getFatality())
+                .eqIfPresent(QhseMonthReportDO::getInjury, reqVO.getInjury())
+                .eqIfPresent(QhseMonthReportDO::getRestrictedCase, reqVO.getRestrictedCase())
+                .eqIfPresent(QhseMonthReportDO::getMedicalCase, reqVO.getMedicalCase())
+                .eqIfPresent(QhseMonthReportDO::getFirstAidCase, reqVO.getFirstAidCase())
+                .eqIfPresent(QhseMonthReportDO::getVehicleAccident, reqVO.getVehicleAccident())
+                .eqIfPresent(QhseMonthReportDO::getNearMiss, reqVO.getNearMiss())
+                .eqIfPresent(QhseMonthReportDO::getSpill, reqVO.getSpill())
+                .eqIfPresent(QhseMonthReportDO::getLifeSavingRules, reqVO.getLifeSavingRules())
+                .eqIfPresent(QhseMonthReportDO::getToolboxTalk, reqVO.getToolboxTalk())
+                .eqIfPresent(QhseMonthReportDO::getCommitteeMeeting, reqVO.getCommitteeMeeting())
+                .eqIfPresent(QhseMonthReportDO::getMonthlyMeeting, reqVO.getMonthlyMeeting())
+                .eqIfPresent(QhseMonthReportDO::getCompanyHazard, reqVO.getCompanyHazard())
+                .eqIfPresent(QhseMonthReportDO::getQhseInspection, reqVO.getQhseInspection())
+                .eqIfPresent(QhseMonthReportDO::getSocCards, reqVO.getSocCards())
+                .eqIfPresent(QhseMonthReportDO::getPtwAudit, reqVO.getPtwAudit())
+                .eqIfPresent(QhseMonthReportDO::getJsa, reqVO.getJsa())
+                .eqIfPresent(QhseMonthReportDO::getDrills, reqVO.getDrills())
+                .eqIfPresent(QhseMonthReportDO::getTraining, reqVO.getTraining())
+                .eqIfPresent(QhseMonthReportDO::getParticipantsTraining, reqVO.getParticipantsTraining())
+                .eqIfPresent(QhseMonthReportDO::getTrainingsHours, reqVO.getTrainingsHours())
+                .eqIfPresent(QhseMonthReportDO::getWaterConsumption, reqVO.getWaterConsumption())
+                .eqIfPresent(QhseMonthReportDO::getDieselConsumption, reqVO.getDieselConsumption())
+                .eqIfPresent(QhseMonthReportDO::getElectricityConsumption, reqVO.getElectricityConsumption())
+                .eqIfPresent(QhseMonthReportDO::getNaturalGasConsumption, reqVO.getNaturalGasConsumption())
+                .eqIfPresent(QhseMonthReportDO::getRemark, reqVO.getRemark())
+                .betweenIfPresent(QhseMonthReportDO::getCreateTime, reqVO.getCreateTime())
+                .orderByDesc(QhseMonthReportDO::getId));
+    }
+
+}

+ 55 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/qhse/report/QhseMonthReportService.java

@@ -0,0 +1,55 @@
+package cn.iocoder.yudao.module.pms.service.qhse.report;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo.QhseMonthReportPageReqVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo.QhseMonthReportSaveReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.report.QhseMonthReportDO;
+
+import javax.validation.Valid;
+
+/**
+ * 资料 Service 接口
+ *
+ * @author 超级管理员
+ */
+public interface QhseMonthReportService {
+
+    /**
+     * 创建资料
+     *
+     * @param createReqVO 创建信息
+     * @return 编号
+     */
+    Long createQhseMonthReport(@Valid QhseMonthReportSaveReqVO createReqVO);
+
+    /**
+     * 更新资料
+     *
+     * @param updateReqVO 更新信息
+     */
+    void updateQhseMonthReport(@Valid QhseMonthReportSaveReqVO updateReqVO);
+
+    /**
+     * 删除资料
+     *
+     * @param id 编号
+     */
+    void deleteQhseMonthReport(Long id);
+
+    /**
+     * 获得资料
+     *
+     * @param id 编号
+     * @return 资料
+     */
+    QhseMonthReportDO getQhseMonthReport(Long id);
+
+    /**
+     * 获得资料分页
+     *
+     * @param pageReqVO 分页查询
+     * @return 资料分页
+     */
+    PageResult<QhseMonthReportDO> getQhseMonthReportPage(QhseMonthReportPageReqVO pageReqVO);
+
+}

+ 72 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/qhse/report/QhseMonthReportServiceImpl.java

@@ -0,0 +1,72 @@
+package cn.iocoder.yudao.module.pms.service.qhse.report;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo.QhseMonthReportPageReqVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo.QhseMonthReportSaveReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.report.QhseMonthReportDO;
+import cn.iocoder.yudao.module.pms.dal.mysql.qhse.report.QhseMonthReportMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.validation.annotation.Validated;
+
+import javax.annotation.Resource;
+
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
+
+/**
+ * 资料 Service 实现类
+ *
+ * @author 超级管理员
+ */
+@Service
+@Validated
+public class QhseMonthReportServiceImpl implements QhseMonthReportService {
+
+    @Resource
+    private QhseMonthReportMapper qhseMonthReportMapper;
+
+    @Override
+    public Long createQhseMonthReport(QhseMonthReportSaveReqVO createReqVO) {
+        // 插入
+        QhseMonthReportDO qhseMonthReport = BeanUtils.toBean(createReqVO, QhseMonthReportDO.class);
+        qhseMonthReport.setDeleted(false);
+        qhseMonthReportMapper.insert(qhseMonthReport);
+        // 返回
+        return qhseMonthReport.getId();
+    }
+
+    @Override
+    public void updateQhseMonthReport(QhseMonthReportSaveReqVO updateReqVO) {
+        // 校验存在
+        validateQhseMonthReportExists(updateReqVO.getId());
+        // 更新
+        QhseMonthReportDO updateObj = BeanUtils.toBean(updateReqVO, QhseMonthReportDO.class);
+        qhseMonthReportMapper.updateById(updateObj);
+    }
+
+    @Override
+    public void deleteQhseMonthReport(Long id) {
+        // 校验存在
+        validateQhseMonthReportExists(id);
+        // 删除
+        qhseMonthReportMapper.deleteById(id);
+    }
+
+    private void validateQhseMonthReportExists(Long id) {
+        if (qhseMonthReportMapper.selectById(id) == null) {
+            throw exception(new ErrorCode(1,"不存在"));
+        }
+    }
+
+    @Override
+    public QhseMonthReportDO getQhseMonthReport(Long id) {
+        return qhseMonthReportMapper.selectById(id);
+    }
+
+    @Override
+    public PageResult<QhseMonthReportDO> getQhseMonthReportPage(QhseMonthReportPageReqVO pageReqVO) {
+        return qhseMonthReportMapper.selectPage(pageReqVO);
+    }
+
+}