| | |
| | | List<SalesLedgerProduct> salesLedgerProducts = salesLedgerProductMapper.selectList(new QueryWrapper<SalesLedgerProduct>() |
| | | .lambda().eq(SalesLedgerProduct::getSalesLedgerId, purchaseLedger.getId()).eq(SalesLedgerProduct::getType, 2)); |
| | | for (SalesLedgerProduct salesLedgerProduct : salesLedgerProducts) { |
| | | stockUtils.addStockWithBatchNo(salesLedgerProduct.getProductModelId(), salesLedgerProduct.getQuantity(), StockInQualifiedRecordTypeEnum.PURCHASE_STOCK_IN.getCode(), purchaseLedger.getId(),purchaseLedger.getPurchaseContractNumber()+"-"+salesLedgerProduct.getId()); |
| | | stockUtils.addStockWithBatchNo(salesLedgerProduct.getProductModelId(), salesLedgerProduct.getQuantity(), StockInQualifiedRecordTypeEnum.PURCHASE_STOCK_IN.getCode(), purchaseLedger.getId(), purchaseLedger.getPurchaseContractNumber() + "-" + salesLedgerProduct.getId()); |
| | | } |
| | | } |
| | | |
| | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | // 收集所有设施ID |
| | | List<Integer> facilityIds = records.stream() |
| | | .map(SafeFacilityInspection::getFacilityId) |
| | | .filter(id -> id != null) |
| | | .filter(Objects::nonNull) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | |
| | | // 收集所有巡检人ID |
| | | List<Long> inspectorIds = records.stream() |
| | | .map(SafeFacilityInspection::getInspectorId) |
| | | .filter(id -> id != null) |
| | | .filter(Objects::nonNull) |
| | | .map(Integer::longValue) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | |
| | | Map<Integer, SafeFacilityLedger> facilityMap = Map.of(); |
| | | if (!facilityIds.isEmpty()) { |
| | | facilityMap = safeFacilityLedgerService.listByIds(facilityIds).stream() |
| | | .collect(Collectors.toMap(SafeFacilityLedger::getId, f -> f, (v1, v2) -> v1)); |
| | | .collect(Collectors.toMap(SafeFacilityLedger::getId, f -> f, (v1, _) -> v1)); |
| | | } |
| | | |
| | | // 批量查询巡检人信息 |
| | |
| | | if (!inspectorIds.isEmpty()) { |
| | | List<SysUser> users = sysUserMapper.selectUserByIds(inspectorIds); |
| | | userMap = users.stream() |
| | | .collect(Collectors.toMap(SysUser::getUserId, SysUser::getNickName, (v1, v2) -> v1)); |
| | | .collect(Collectors.toMap(SysUser::getUserId, SysUser::getNickName, (v1, _) -> v1)); |
| | | } |
| | | |
| | | // 填充字段 |
| | |
| | | package com.ruoyi.safe.specialequipment.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Tag(name = "安全生产--特种设备电子台账") |
| | | @RequestMapping("/safe/specialEquipment/ledger") |
| | | @AllArgsConstructor |
| | | public class SpecialEquipmentLedgerController extends BaseController { |
| | | private final SpecialEquipmentLedgerService service; |
| | | @GetMapping("/listPage") @Operation(summary = "特种设备台账-分页查询") |
| | | public AjaxResult listPage(Page page, SpecialEquipmentLedger req) { return AjaxResult.success(service.listPage(page, req)); } |
| | | @GetMapping("/list") @Operation(summary = "特种设备台账-列表查询") |
| | | public AjaxResult list(SpecialEquipmentLedger req) { return AjaxResult.success(service.list(Wrappers.lambdaQuery(req))); } |
| | | @PostMapping("/add") @Log(title = "特种设备台账-新增", businessType = BusinessType.INSERT) |
| | | |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "特种设备台账-分页查询") |
| | | public AjaxResult listPage(Page page, SpecialEquipmentLedger req) { |
| | | return AjaxResult.success(service.listPage(page, req)); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @Operation(summary = "特种设备台账-列表查询") |
| | | public AjaxResult list(SpecialEquipmentLedger req) { |
| | | return AjaxResult.success(service.list(Wrappers.lambdaQuery(req))); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "特种设备台账-新增", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "特种设备台账-新增") |
| | | public AjaxResult add(@RequestBody SpecialEquipmentLedger req) { return service.save(req) ? success() : error(); } |
| | | @PostMapping("/update") @Log(title = "特种设备台账-修改", businessType = BusinessType.UPDATE) |
| | | public AjaxResult add(@RequestBody SpecialEquipmentLedger req) { |
| | | return service.save(req) ? success() : error(); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @Log(title = "特种设备台账-修改", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "特种设备台账-修改") |
| | | public AjaxResult update(@RequestBody SpecialEquipmentLedger req) { return service.updateById(req) ? success() : error(); } |
| | | @DeleteMapping("/delete") @Log(title = "特种设备台账-删除", businessType = BusinessType.DELETE) |
| | | public AjaxResult update(@RequestBody SpecialEquipmentLedger req) { |
| | | return service.updateById(req) ? success() : error(); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Log(title = "特种设备台账-删除", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "特种设备台账-删除") |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { return service.removeByIds(ids) ? success() : error(); } |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | return service.removeByIds(ids) ? success() : error(); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Tag(name = "安全生产--特种设备检验维保记录") |
| | | @RequestMapping("/safe/specialEquipment/record") |
| | | @AllArgsConstructor |
| | | public class SpecialEquipmentRecordController extends BaseController { |
| | | private final SpecialEquipmentRecordService service; |
| | | @GetMapping("/listPage") @Operation(summary = "检验维保记录-分页查询") |
| | | public AjaxResult listPage(Page page, SpecialEquipmentRecord req) { return AjaxResult.success(service.listPage(page, req)); } |
| | | @PostMapping("/add") @Log(title = "检验维保记录-新增", businessType = BusinessType.INSERT) |
| | | |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "检验维保记录-分页查询") |
| | | public AjaxResult listPage(Page page, SpecialEquipmentRecord req) { |
| | | return AjaxResult.success(service.listPage(page, req)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "检验维保记录-新增", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "检验维保记录-新增") |
| | | public AjaxResult add(@RequestBody SpecialEquipmentRecord req) { return service.save(req) ? success() : error(); } |
| | | @PostMapping("/update") @Log(title = "检验维保记录-修改", businessType = BusinessType.UPDATE) |
| | | public AjaxResult add(@RequestBody SpecialEquipmentRecord req) { |
| | | return service.save(req) ? success() : error(); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @Log(title = "检验维保记录-修改", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "检验维保记录-修改") |
| | | public AjaxResult update(@RequestBody SpecialEquipmentRecord req) { return service.updateById(req) ? success() : error(); } |
| | | @DeleteMapping("/delete") @Log(title = "检验维保记录-删除", businessType = BusinessType.DELETE) |
| | | public AjaxResult update(@RequestBody SpecialEquipmentRecord req) { |
| | | return service.updateById(req) ? success() : error(); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Log(title = "检验维保记录-删除", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "检验维保记录-删除") |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { return service.removeByIds(ids) ? success() : error(); } |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | return service.removeByIds(ids) ? success() : error(); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Tag(name = "安全生产--特种设备隐患整改") |
| | | @RequestMapping("/safe/specialEquipment/rectification") |
| | | @AllArgsConstructor |
| | | public class SpecialEquipmentRectificationController extends BaseController { |
| | | private final SpecialEquipmentRectificationService service; |
| | | @GetMapping("/listPage") @Operation(summary = "隐患整改-分页查询") |
| | | public AjaxResult listPage(Page page, SpecialEquipmentRectification req) { return AjaxResult.success(service.listPage(page, req)); } |
| | | @PostMapping("/add") @Log(title = "隐患整改-新增", businessType = BusinessType.INSERT) |
| | | |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "隐患整改-分页查询") |
| | | public AjaxResult listPage(Page page, SpecialEquipmentRectification req) { |
| | | return AjaxResult.success(service.listPage(page, req)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "隐患整改-新增", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "隐患整改-新增") |
| | | public AjaxResult add(@RequestBody SpecialEquipmentRectification req) { return service.save(req) ? success() : error(); } |
| | | @PostMapping("/close") @Log(title = "隐患整改-闭环", businessType = BusinessType.UPDATE) |
| | | public AjaxResult add(@RequestBody SpecialEquipmentRectification req) { |
| | | return service.save(req) ? success() : error(); |
| | | } |
| | | |
| | | @PostMapping("/close") |
| | | @Log(title = "隐患整改-闭环", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "隐患整改-闭环") |
| | | public AjaxResult close(@RequestBody SpecialEquipmentRectification req) { req.setRectificationStatus(4); req.setClosedDate(LocalDate.now()); return service.updateById(req) ? success() : error(); } |
| | | @DeleteMapping("/delete") @Log(title = "隐患整改-删除", businessType = BusinessType.DELETE) |
| | | public AjaxResult close(@RequestBody SpecialEquipmentRectification req) { |
| | | req.setRectificationStatus(4); |
| | | req.setClosedDate(LocalDate.now()); |
| | | return service.updateById(req) ? success() : error(); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Log(title = "隐患整改-删除", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "隐患整改-删除") |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { return service.removeByIds(ids) ? success() : error(); } |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | return service.removeByIds(ids) ? success() : error(); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.safe.specialequipment.pojo.SpecialEquipmentLedger; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface SpecialEquipmentLedgerMapper extends BaseMapper<SpecialEquipmentLedger> { |
| | | IPage<SpecialEquipmentLedger> listPage(Page page, @Param("req") SpecialEquipmentLedger req); |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.safe.specialequipment.pojo.SpecialEquipmentRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface SpecialEquipmentRecordMapper extends BaseMapper<SpecialEquipmentRecord> { |
| | | IPage<SpecialEquipmentRecord> listPage(Page page, @Param("req") SpecialEquipmentRecord req); |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.safe.specialequipment.pojo.SpecialEquipmentRectification; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface SpecialEquipmentRectificationMapper extends BaseMapper<SpecialEquipmentRectification> { |
| | | IPage<SpecialEquipmentRectification> listPage(Page page, @Param("req") SpecialEquipmentRectification req); |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serial; |
| | | import java.io.Serializable; |
| | | import java.time.*; |
| | | |
| | | @Data |
| | | @Schema(description = "特种设备电子台账") |
| | | @TableName("special_equipment_ledger") |
| | | public class SpecialEquipmentLedger { |
| | | public class SpecialEquipmentLedger implements Serializable { |
| | | @Serial |
| | | private static final long serialVersionUID = 1L; |
| | | @TableId(type = IdType.AUTO) private Long id; |
| | | @Excel(name = "设备编号") private String equipmentNo; |
| | | @Excel(name = "设备名称") private String equipmentName; |
| | | @Excel(name = "设备类别") private String equipmentType; |
| | | @Excel(name = "规格型号") private String modelSpec; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "制造日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate manufactureDate; |
| | | @Excel(name = "安装位置") private String installLocation; |
| | | @Excel(name = "使用单位") private String useUnit; |
| | | @Excel(name = "登记证号") private String certificateNo; |
| | | @Excel(name = "检验周期(天)") private Integer inspectionCycleDays; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "下次检验日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate nextInspectionDate; |
| | | @Excel(name = "维保周期(天)") private Integer maintenanceCycleDays; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "下次维保日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate nextMaintenanceDate; |
| | | @Excel(name = "预警提前天数") private Integer alarmDays; |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @Excel(name = "设备编号") |
| | | private String equipmentNo; |
| | | |
| | | @Excel(name = "设备名称") |
| | | private String equipmentName; |
| | | |
| | | @Excel(name = "设备类别") |
| | | private String equipmentType; |
| | | |
| | | @Excel(name = "规格型号") |
| | | private String modelSpec; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "制造日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate manufactureDate; |
| | | |
| | | @Excel(name = "安装位置") |
| | | private String installLocation; |
| | | |
| | | @Excel(name = "使用单位") |
| | | private String useUnit; |
| | | |
| | | @Excel(name = "登记证号") |
| | | private String certificateNo; |
| | | |
| | | @Excel(name = "检验周期(天)") |
| | | private Integer inspectionCycleDays; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "下次检验日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate nextInspectionDate; |
| | | |
| | | @Excel(name = "维保周期(天)") |
| | | private Integer maintenanceCycleDays; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "下次维保日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate nextMaintenanceDate; |
| | | |
| | | @Excel(name = "预警提前天数") |
| | | private Integer alarmDays; |
| | | |
| | | private Long managerId; |
| | | @Excel(name = "负责人") private String managerName; |
| | | @Excel(name = "安全员") private String safetyOfficer; |
| | | @Excel(name = "风险等级") private String riskLevel; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "最新检验日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate latestInspectionDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "最新维保日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate latestMaintenanceDate; |
| | | @Excel(name = "隐患状态", readConverterExp = "0=无隐患,1=待整改,2=整改中,3=已闭环") private Integer hazardStatus; |
| | | @Excel(name = "隐患描述") private String hazardDescription; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "整改截止日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate rectificationDeadline; |
| | | @Excel(name = "备注") private String remarks; |
| | | @TableField(fill = FieldFill.INSERT) private Long createUser; |
| | | @TableField(fill = FieldFill.INSERT) private LocalDateTime createTime; |
| | | @TableField(fill = FieldFill.UPDATE) private Long updateUser; |
| | | @TableField(fill = FieldFill.UPDATE) private LocalDateTime updateTime; |
| | | @TableField(fill = FieldFill.INSERT) private Long tenantId; |
| | | @TableField(fill = FieldFill.INSERT) private Long deptId; |
| | | |
| | | @Excel(name = "负责人") |
| | | private String managerName; |
| | | |
| | | @Excel(name = "安全员") |
| | | private String safetyOfficer; |
| | | |
| | | @Excel(name = "风险等级") |
| | | private String riskLevel; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "最新检验日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate latestInspectionDate; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "最新维保日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate latestMaintenanceDate; |
| | | |
| | | @Excel(name = "隐患状态", readConverterExp = "0=无隐患,1=待整改,2=整改中,3=已闭环") |
| | | private Integer hazardStatus; |
| | | |
| | | @Excel(name = "隐患描述") |
| | | private String hazardDescription; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "整改截止日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate rectificationDeadline; |
| | | |
| | | @Excel(name = "备注") |
| | | private String remarks; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Long updateUser; |
| | | |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serial; |
| | | import java.io.Serializable; |
| | | import java.time.*; |
| | | |
| | | @Data |
| | | @Schema(description = "特种设备检验维保记录") |
| | | @TableName("special_equipment_record") |
| | | public class SpecialEquipmentRecord { |
| | | public class SpecialEquipmentRecord implements Serializable { |
| | | @Serial |
| | | private static final long serialVersionUID = 1L; |
| | | @TableId(type = IdType.AUTO) private Long id; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | private Long equipmentId; |
| | | @Excel(name = "记录类型", readConverterExp = "1=检验,2=维保") private Integer recordType; |
| | | @Excel(name = "记录编号") private String recordNo; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "记录日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate recordDate; |
| | | @Excel(name = "执行结果") private String executeResult; |
| | | @Excel(name = "问题描述") private String problemDescription; |
| | | @Excel(name = "处理措施") private String disposeMeasure; |
| | | |
| | | @Excel(name = "记录类型", readConverterExp = "1=检验,2=维保") |
| | | private Integer recordType; |
| | | |
| | | @Excel(name = "记录编号") |
| | | private String recordNo; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "记录日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate recordDate; |
| | | |
| | | @Excel(name = "执行结果") |
| | | private String executeResult; |
| | | |
| | | @Excel(name = "问题描述") |
| | | private String problemDescription; |
| | | |
| | | @Excel(name = "处理措施") |
| | | private String disposeMeasure; |
| | | |
| | | private Long executorId; |
| | | @Excel(name = "执行人") private String executorName; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "下次到期日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate nextDueDate; |
| | | @Excel(name = "附件说明") private String attachmentRemark; |
| | | @TableField(fill = FieldFill.INSERT) private Long createUser; |
| | | @TableField(fill = FieldFill.INSERT) private LocalDateTime createTime; |
| | | @TableField(fill = FieldFill.UPDATE) private Long updateUser; |
| | | @TableField(fill = FieldFill.UPDATE) private LocalDateTime updateTime; |
| | | @TableField(fill = FieldFill.INSERT) private Long tenantId; |
| | | @TableField(fill = FieldFill.INSERT) private Long deptId; |
| | | |
| | | @Excel(name = "执行人") |
| | | private String executorName; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "下次到期日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate nextDueDate; |
| | | |
| | | @Excel(name = "附件说明") |
| | | private String attachmentRemark; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Long updateUser; |
| | | |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serial; |
| | | import java.io.Serializable; |
| | | import java.time.*; |
| | | |
| | | @Data |
| | | @Schema(description = "特种设备隐患整改") |
| | | @TableName("special_equipment_rectification") |
| | | public class SpecialEquipmentRectification { |
| | | public class SpecialEquipmentRectification implements Serializable { |
| | | @Serial |
| | | private static final long serialVersionUID = 1L; |
| | | @TableId(type = IdType.AUTO) private Long id; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | private Long equipmentId; |
| | | @Excel(name = "隐患描述") private String hazardDescription; |
| | | @Excel(name = "风险等级") private String riskLevel; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "发现日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate discoveredDate; |
| | | |
| | | @Excel(name = "隐患描述") |
| | | private String hazardDescription; |
| | | |
| | | @Excel(name = "风险等级") |
| | | private String riskLevel; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "发现日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate discoveredDate; |
| | | |
| | | private Long responsibleUserId; |
| | | @Excel(name = "整改责任人") private String responsibleUserName; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "整改期限", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate rectificationDeadline; |
| | | @Excel(name = "整改状态", readConverterExp = "1=待整改,2=整改中,3=待复核,4=已闭环") private Integer rectificationStatus; |
| | | @Excel(name = "整改措施") private String rectificationMeasures; |
| | | @Excel(name = "整改结果") private String rectificationResult; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "闭环日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate closedDate; |
| | | @Excel(name = "备注") private String remarks; |
| | | @TableField(fill = FieldFill.INSERT) private Long createUser; |
| | | @TableField(fill = FieldFill.INSERT) private LocalDateTime createTime; |
| | | @TableField(fill = FieldFill.UPDATE) private Long updateUser; |
| | | @TableField(fill = FieldFill.UPDATE) private LocalDateTime updateTime; |
| | | @TableField(fill = FieldFill.INSERT) private Long tenantId; |
| | | @TableField(fill = FieldFill.INSERT) private Long deptId; |
| | | |
| | | @Excel(name = "整改责任人") |
| | | private String responsibleUserName; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "整改期限", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate rectificationDeadline; |
| | | |
| | | @Excel(name = "整改状态", readConverterExp = "1=待整改,2=整改中,3=待复核,4=已闭环") |
| | | private Integer rectificationStatus; |
| | | |
| | | @Excel(name = "整改措施") |
| | | private String rectificationMeasures; |
| | | |
| | | @Excel(name = "整改结果") |
| | | private String rectificationResult; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "闭环日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate closedDate; |
| | | |
| | | @Excel(name = "备注") |
| | | private String remarks; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Long updateUser; |
| | | |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.safe.specialequipment.pojo.SpecialEquipmentLedger; |
| | | |
| | | public interface SpecialEquipmentLedgerService extends IService<SpecialEquipmentLedger> { |
| | | |
| | | IPage<SpecialEquipmentLedger> listPage(Page page, SpecialEquipmentLedger req); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.safe.specialequipment.pojo.SpecialEquipmentRecord; |
| | | |
| | | public interface SpecialEquipmentRecordService extends IService<SpecialEquipmentRecord> { |
| | | |
| | | IPage<SpecialEquipmentRecord> listPage(Page page, SpecialEquipmentRecord req); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.safe.specialequipment.pojo.SpecialEquipmentRectification; |
| | | |
| | | public interface SpecialEquipmentRectificationService extends IService<SpecialEquipmentRectification> { |
| | | |
| | | IPage<SpecialEquipmentRectification> listPage(Page page, SpecialEquipmentRectification req); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.safe.specialequipment.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.ruoyi.safe.specialequipment.service.SpecialEquipmentLedgerService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SpecialEquipmentLedgerServiceImpl extends ServiceImpl<SpecialEquipmentLedgerMapper, SpecialEquipmentLedger> implements SpecialEquipmentLedgerService { |
| | | private final SpecialEquipmentLedgerMapper mapper; |
| | | public IPage<SpecialEquipmentLedger> listPage(Page page, SpecialEquipmentLedger req) { return mapper.listPage(page, req); } |
| | | |
| | | public IPage<SpecialEquipmentLedger> listPage(Page page, SpecialEquipmentLedger req) { |
| | | return mapper.listPage(page, req); |
| | | } |
| | | |
| | | public boolean save(SpecialEquipmentLedger entity) { |
| | | entity.setHazardStatus(entity.getHazardStatus() == null ? 0 : entity.getHazardStatus()); |
| | | entity.setTenantId(SecurityUtils.getLoginUser().getTenantId()); |
| | |
| | | package com.ruoyi.safe.specialequipment.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.ruoyi.safe.specialequipment.service.SpecialEquipmentRecordService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SpecialEquipmentRecordServiceImpl extends ServiceImpl<SpecialEquipmentRecordMapper, SpecialEquipmentRecord> implements SpecialEquipmentRecordService { |
| | | private final SpecialEquipmentRecordMapper mapper; |
| | | private final SpecialEquipmentLedgerMapper ledgerMapper; |
| | | |
| | | public IPage<SpecialEquipmentRecord> listPage(Page page, SpecialEquipmentRecord req) { return mapper.listPage(page, req); } |
| | | public IPage<SpecialEquipmentRecord> listPage(Page page, SpecialEquipmentRecord req) { |
| | | return mapper.listPage(page, req); |
| | | } |
| | | |
| | | public boolean save(SpecialEquipmentRecord entity) { |
| | | entity.setTenantId(SecurityUtils.getLoginUser().getTenantId()); |
| | |
| | | package com.ruoyi.safe.specialequipment.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.ruoyi.safe.specialequipment.service.SpecialEquipmentRectificationService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SpecialEquipmentRectificationServiceImpl extends ServiceImpl<SpecialEquipmentRectificationMapper, SpecialEquipmentRectification> implements SpecialEquipmentRectificationService { |
| | | private final SpecialEquipmentRectificationMapper mapper; |
| | | public IPage<SpecialEquipmentRectification> listPage(Page page, SpecialEquipmentRectification req) { return mapper.listPage(page, req); } |
| | | |
| | | public IPage<SpecialEquipmentRectification> listPage(Page page, SpecialEquipmentRectification req) { |
| | | return mapper.listPage(page, req); |
| | | } |
| | | |
| | | public boolean save(SpecialEquipmentRectification entity) { |
| | | entity.setTenantId(SecurityUtils.getLoginUser().getTenantId()); |
| | | entity.setCreateUser(SecurityUtils.getLoginUser().getUserId()); |
| | |
| | | package com.ruoyi.safe.specialequipment.task; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.approve.pojo.NotificationManagement; |
| | | import com.ruoyi.approve.service.NotificationManagementService; |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | public class SpecialEquipmentReminderTask { |
| | |
| | | <if test="c.planType != null and c.planType != ''"> |
| | | and scp.plan_type like concat('%', #{c.planType}, '%') |
| | | </if> |
| | | order by scp.id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="c.riskLevel != null and c.riskLevel != ''"> |
| | | and sh.risk_level like concat('%', #{c.riskLevel}, '%') |
| | | </if> |
| | | order by sh.id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="c.trainingDate != null "> |
| | | AND DATE_FORMAT(st.training_date, '%Y%m%d') = DATE_FORMAT(#{c.trainingDate}, '%Y%m%d') |
| | | </if> |
| | | GROUP BY st.id, su.nick_name |
| | | GROUP BY st.id desc |
| | | </select> |
| | | <select id="getSafeTraining" resultType="com.ruoyi.safe.dto.SafeTrainingDto"> |
| | | select st.*, |
| | |
| | | <if test="req.hazardStatus != null"> |
| | | and l.hazard_status = #{req.hazardStatus} |
| | | </if> |
| | | order by l.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="req.equipmentId != null"> |
| | | and equipment_id = #{req.equipmentId} |
| | | </if> |
| | | order by id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="req.equipmentId != null"> |
| | | and equipment_id = #{req.equipmentId} |
| | | </if> |
| | | order by id |
| | | </select> |
| | | |
| | | </mapper> |