From 9a9697c55fa66821cf74165ac2ae820182dae94d Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期三, 23 七月 2025 17:41:53 +0800 Subject: [PATCH] 设备维修对应接口 --- lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamRepairOrderRequest.java | 54 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportProductHazardsMapper.xml | 16 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportThreeNoSpareService.java | 14 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EamRepairOrderRepairStatusEnum.java | 8 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportAccidentsRegisterController.java | 208 ++ lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java | 162 + lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/aspect/EquipmentHistoryLogAspect.java | 2 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportAccidentsRegisterDto.java | 270 +++ lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamRepairOrderService.java | 28 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairPersonServiceImpl.java | 19 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairOrderMapper.xml | 4 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportThreeNoSpare.java | 94 + lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamRepairPersonService.java | 15 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamInspectionOrderQuery.java | 1 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/MaintenanceStandardStatusEnum.java | 4 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportAccidentsRegisterMapper.xml | 21 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairOrderController.java | 87 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportRepair.java | 198 +- lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportProductHazardsQuery.java | 118 + lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportAccidentsRegisterServiceImpl.java | 170 ++ lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportThreeNoSpareMapper.xml | 5 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportAccidentsRegisterQuery.java | 267 +++ lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairPersonController.java | 172 ++ lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportProductHazards.java | 116 + lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportThreeNoSpareMapper.java | 17 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportRepairService.java | 12 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportRepairMapper.java | 3 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairPersonMapper.xml | 5 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportRepairMapper.xml | 12 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/SecondMaintenanceStatusEnum.java | 1 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java | 190 - lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportProductHazardsService.java | 48 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportThreeNoSpareController.java | 177 ++ lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamRepairPersonMapper.java | 17 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportRepairController.java | 51 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java | 412 +---- lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportProductHazardsServiceImpl.java | 169 ++ lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportAccidentsRegisterService.java | 49 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamRepairOrderDto.java | 106 + lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportProductHazardsDto.java | 114 + lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportRepairRequest.java | 115 + lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamSecondMaintenanceOrderServiceImpl.java | 12 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportThreeNoSpareServiceImpl.java | 19 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportProductHazardsController.java | 204 ++ lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportRepairDto.java | 114 + lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java | 8 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportAccidentsRegisterMapper.java | 22 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairPerson.java | 81 + lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportProductHazardsMapper.java | 24 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportAccidentsRegister.java | 274 +++ 50 files changed, 3,607 insertions(+), 702 deletions(-) diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/aspect/EquipmentHistoryLogAspect.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/aspect/EquipmentHistoryLogAspect.java index 0f0e9cf..ac58c4f 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/aspect/EquipmentHistoryLogAspect.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/aspect/EquipmentHistoryLogAspect.java @@ -139,8 +139,6 @@ if (ReportRepairEnum.COMPLETE.name().equals(order.getRepairStatus())) { log.setEquipmentId(order.getEquipmentId()); log.setBusinessId(order.getId()); - log.setOperator(order.getRepairer()); - log.setDescription(order.getRepairDescription()); log.setCreateTime(order.getActualEndTime()); } } diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EamRepairOrderRepairStatusEnum.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EamRepairOrderRepairStatusEnum.java new file mode 100644 index 0000000..2b37eb6 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EamRepairOrderRepairStatusEnum.java @@ -0,0 +1,8 @@ +package org.jeecg.modules.eam.constant; + +public enum EamRepairOrderRepairStatusEnum { + PENDING_REPAIR, + UNDER_MAINTENANCE, + PENDING_CONFIRMATION, + REPAIR_COMPLETED; +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/MaintenanceStandardStatusEnum.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/MaintenanceStandardStatusEnum.java index 4526256..1bb92cd 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/MaintenanceStandardStatusEnum.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/MaintenanceStandardStatusEnum.java @@ -8,5 +8,7 @@ WAIT_REPAIR_DIRECTOR, WAIT_TECHNICAL_DIRECTOR, START, - ABOLISH; + ABOLISH, //宸蹭綔搴� + REJECTED //宸查┏鍥� + ; } diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/SecondMaintenanceStatusEnum.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/SecondMaintenanceStatusEnum.java index 464fc8e..d54edcf 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/SecondMaintenanceStatusEnum.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/SecondMaintenanceStatusEnum.java @@ -7,6 +7,7 @@ WAIT_INSPECTOR_CONFIRM, // 妫�鏌ヤ汉纭 COMPLETE, //宸插畬鎴� ABOLISH, //宸蹭綔搴� + REJECTED //宸查┏鍥� ; public static SecondMaintenanceStatusEnum getInstance(String code) { diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamRepairOrderDto.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamRepairOrderDto.java new file mode 100644 index 0000000..07c7beb --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamRepairOrderDto.java @@ -0,0 +1,106 @@ +package org.jeecg.modules.eam.dto; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecg.common.aspect.annotation.DictList; +import org.jeecg.modules.eam.entity.EamRepairPerson; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; +import java.util.List; + +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value = "eam_repair_order瀵硅薄", description = "缁翠慨宸ュ崟") +public class EamRepairOrderDto { + + /**涓婚敭*/ + private String id; + /**鍒涘缓浜�*/ + @ApiModelProperty(value = "鍒涘缓浜�") + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date createTime; + /**鏇存柊浜�*/ + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date updateTime; + /**鍒犻櫎鏍囪*/ + private Integer delFlag; + /**宸ュ崟缂栧彿*/ + private String repairCode; + /**鎶ヤ慨ID*/ + private String reportId; + /**璁惧ID*/ + @Dict(dictTable = "eam_equipment", dicCode = "id", dicText = "equipment_name") + private String equipmentId; + /** 缁翠慨鐘舵��*/ + @Dict(dicCode = "repair_status") + private String repairStatus ; + /** 缁翠慨寮�濮嬫椂闂� */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date actualStartTime ; + /** 缁翠慨缁撴潫鏃堕棿 */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date actualEndTime ; + /** 缁翠慨纭 */ + private String repairConfirm ; + /** 缁翠慨纭鎰忚 */ + private String repairConfirmComment ; + /** 缁翠慨纭鏃堕棿 */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date repairConfirmTime ; + /** 鏁呴殰鍘熷洜 */ + private String faultReason ; + /** 鏁呴殰鍒嗘瀽 */ + private String faultAnalysis ; + /** 鎺掓晠杩囩▼ */ + private String faultProcess ; + /** 棰勯槻鎺柦 */ + private String faultPrevent ; + /** 鎿嶄綔宸� */ + @ApiModelProperty(name = "鎿嶄綔宸�",notes = "") + @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") + private String confirmer; + /** 鎿嶄綔宸ョ‘璁ょ粨鏋�*/ + @ApiModelProperty(name = "鎿嶄綔宸ョ‘璁ょ粨鏋�",notes = "") + private String confirmResult; + /** 鎿嶄綔宸ョ‘璁ゆ椂闂� */ + @ApiModelProperty(name = "鎿嶄綔宸ョ‘璁ゆ椂闂�",notes = "") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date confirmTime; + /** 鎿嶄綔宸ョ‘璁ゆ剰瑙� */ + @ApiModelProperty(name = "鎿嶄綔宸ョ‘璁ゆ剰瑙�",notes = "") + private String confirmComment; + @TableField(exist = false) + @ApiModelProperty(value = "璁惧鍚嶇О") + private String equipmentName; + /**璁惧缂栫爜*/ + private String equipmentCode; + /**璁惧鍨嬪彿*/ + private String equipmentModel; + @TableField(exist = false) + private String installationPosition; + + /**鏁呴殰缁翠慨浜哄憳鍒楄〃*/ + @DictList + private List<EamRepairPerson> eamRepairPersonList; +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportAccidentsRegisterDto.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportAccidentsRegisterDto.java new file mode 100644 index 0000000..6c37b44 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportAccidentsRegisterDto.java @@ -0,0 +1,270 @@ +package org.jeecg.modules.eam.dto; + +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 璁惧浜嬫晠鐧昏琛� + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Data +@TableName("eam_report_accidents_register") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +public class EamReportAccidentsRegisterDto { + + /**涓婚敭*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "涓婚敭") + private String id; + /**鍒涘缓浜�*/ + @ApiModelProperty(value = "鍒涘缓浜�") + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鍒涘缓鏃ユ湡") + private Date createTime; + /**鏇存柊浜�*/ + @ApiModelProperty(value = "鏇存柊浜�") + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鏇存柊鏃ユ湡") + private Date updateTime; + /**鍒犻櫎鏍囪*/ + @Excel(name = "鍒犻櫎鏍囪", width = 15) + @ApiModelProperty(value = "鍒犻櫎鏍囪") + @TableLogic + private String delFlag; + /**鎶ヤ慨ID*/ + @Excel(name = "鎶ヤ慨ID", width = 15) + @ApiModelProperty(value = "鎶ヤ慨ID") + private String reportId; + /**璁惧ID*/ + @Excel(name = "璁惧ID", width = 15) + @ApiModelProperty(value = "璁惧ID") + private String equipmentId; + /**鏄惁鏈夎澶囨搷浣滆瘉 鏄惁*/ + @Excel(name = "鏄惁鏈夎澶囨搷浣滆瘉 鏄惁", width = 15) + @ApiModelProperty(value = "鏄惁鏈夎澶囨搷浣滆瘉 鏄惁") + @Dict(dicCode = "yn") + private String operationCertificate; + /**鏄惁鏂數閲嶅惎*/ + @Excel(name = "鏄惁鏂數閲嶅惎", width = 15) + @ApiModelProperty(value = "鏄惁鏂數閲嶅惎") + @Dict(dicCode = "yn") + private String powerOffRestart; + /**鏄惁涓烘壒娆¢浠�*/ + @Excel(name = "鏄惁涓烘壒娆¢浠�", width = 15) + @ApiModelProperty(value = "鏄惁涓烘壒娆¢浠�") + @Dict(dicCode = "yn") + private String batchFirstPiece; + /**鍙樺姩鍥犵礌 鏄惁*/ + @Excel(name = "鍙樺姩鍥犵礌 鏄惁", width = 15) + @ApiModelProperty(value = "鍙樺姩鍥犵礌 鏄惁") + @Dict(dicCode = "yn") + private String variableFactors; + /**鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��*/ + @Excel(name = "鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��", width = 15) + @ApiModelProperty(value = "鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀�") + @Dict(dicCode = "variable_factors_value") + private String variableFactorsValue; + /**鎵ц绋嬪簭*/ + @Excel(name = "鎵ц绋嬪簭", width = 15) + @ApiModelProperty(value = "鎵ц绋嬪簭") + private String executeNc; + /**浜嬫晠鐜拌薄*/ + @Excel(name = "浜嬫晠鐜拌薄", width = 15) + @ApiModelProperty(value = "浜嬫晠鐜拌薄") + private String accidentPhenomenon; + /**閲囧彇鎺柦*/ + @Excel(name = "閲囧彇鎺柦", width = 15) + @ApiModelProperty(value = "閲囧彇鎺柦") + private String measure; + /**閫犳垚缁撴灉*/ + @Excel(name = "閫犳垚缁撴灉", width = 15) + @ApiModelProperty(value = "閫犳垚缁撴灉") + private String causingResults; + /**鎿嶄綔宸�*/ + @Excel(name = "鎿嶄綔宸�", width = 15) + @ApiModelProperty(value = "鎿嶄綔宸�") + private String confirmer; + /**鎿嶄綔宸ョ‘璁ゆ椂闂�*/ + @Excel(name = "鎿嶄綔宸ョ‘璁ゆ椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎿嶄綔宸ョ‘璁ゆ椂闂�") + private Date confirmTime; + /**鍖洪暱*/ + @Excel(name = "鍖洪暱", width = 15) + @ApiModelProperty(value = "鍖洪暱") + private String district; + /**鍖洪暱纭*/ + @Excel(name = "鍖洪暱纭", width = 15) + @ApiModelProperty(value = "鍖洪暱纭") + private String districtConfirm; + /**鍖洪暱纭鏃堕棿*/ + @Excel(name = "鍖洪暱纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鍖洪暱纭鏃堕棿") + private Date districtTime; + /**涓績涓讳换*/ + @Excel(name = "涓績涓讳换", width = 15) + @ApiModelProperty(value = "涓績涓讳换") + private String centerDirector; + /**涓績涓讳换纭*/ + @Excel(name = "涓績涓讳换纭", width = 15) + @ApiModelProperty(value = "涓績涓讳换纭") + private String centerDirectorConfirm; + /**涓績涓讳换纭鏃堕棿*/ + @Excel(name = "涓績涓讳换纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "涓績涓讳换纭鏃堕棿") + private Date centerDirectorTime; + /**缁翠慨寮�濮嬫椂闂�*/ + @Excel(name = "缁翠慨寮�濮嬫椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨寮�濮嬫椂闂�") + private Date reportStartTime; + /**璁惧鐘舵��*/ + @Excel(name = "璁惧鐘舵��", width = 15) + @ApiModelProperty(value = "璁惧鐘舵��") + private String equipmentStatus; + /**鍘熷洜鍒嗘瀽*/ + @Excel(name = "鍘熷洜鍒嗘瀽", width = 15) + @ApiModelProperty(value = "鍘熷洜鍒嗘瀽") + private String causeAnalysis; + /**妫�鏌ョ粨鏋�*/ + @Excel(name = "妫�鏌ョ粨鏋�", width = 15) + @ApiModelProperty(value = "妫�鏌ョ粨鏋�") + private String inspectionResults; + /**閲囧彇鎺柦*/ + @Excel(name = "閲囧彇鎺柦", width = 15) + @ApiModelProperty(value = "閲囧彇鎺柦") + private String takeSteps; + /**寤鸿閲囧彇鎺柦*/ + @Excel(name = "寤鸿閲囧彇鎺柦", width = 15) + @ApiModelProperty(value = "寤鸿閲囧彇鎺柦") + private String suggestionTakeSteps; + /**寤鸿閲囧彇鎺柦鏃堕棿*/ + @Excel(name = "寤鸿閲囧彇鎺柦鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "寤鸿閲囧彇鎺柦鏃堕棿") + private Date suggestionTakeStepsTime; + /**缁翠慨纭*/ + @Excel(name = "缁翠慨纭", width = 15) + @ApiModelProperty(value = "缁翠慨纭") + private String repairConfirm; + /**缁翠慨纭鎰忚*/ + @Excel(name = "缁翠慨纭鎰忚", width = 15) + @ApiModelProperty(value = "缁翠慨纭鎰忚") + private String repairConfirmComment; + /**缁翠慨纭鏃堕棿*/ + @Excel(name = "缁翠慨纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨纭鏃堕棿") + private Date repairConfirmTime; + /**缁翠慨缁勯暱纭*/ + @Excel(name = "缁翠慨缁勯暱纭", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱纭") + private String repairGroupLeader; + /**缁翠慨缁勯暱鎰忚*/ + @Excel(name = "缁翠慨缁勯暱鎰忚", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱鎰忚") + private String repairGroupLeaderComment; + /**缁翠慨缁勯暱纭鏃堕棿*/ + @Excel(name = "缁翠慨缁勯暱纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨缁勯暱纭鏃堕棿") + private Date repairGroupLeaderTime; + /**缁翠慨缁勯暱纭*/ + @Excel(name = "缁翠慨缁勯暱纭", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱纭") + private String repairDistrict; + /**缁翠慨缁勯暱鎰忚*/ + @Excel(name = "缁翠慨缁勯暱鎰忚", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱鎰忚") + private String repairDistrictComment; + /**缁翠慨缁勯暱纭鏃堕棿*/ + @Excel(name = "缁翠慨缁勯暱纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨缁勯暱纭鏃堕棿") + private Date repairDistrictTime; + /**鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰*/ + @Excel(name = "鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰", width = 15) + @ApiModelProperty(value = "鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰") + private String checkAgree; + /**涓嶅悓鎰忓師鍥犲垎鏋�*/ + @Excel(name = "涓嶅悓鎰忓師鍥犲垎鏋�", width = 15) + @ApiModelProperty(value = "涓嶅悓鎰忓師鍥犲垎鏋�") + private String disagreeReason; + /**鏁存敼鎺柦*/ + @Excel(name = "鏁存敼鎺柦", width = 15) + @ApiModelProperty(value = "鏁存敼鎺柦") + private String rectificationMeasures; + /**浜嬫晠缁撹*/ + @Excel(name = "浜嬫晠缁撹", width = 15) + @ApiModelProperty(value = "浜嬫晠缁撹") + private String accidentConclusion; + /**鎶�鏈礋璐d汉*/ + @Excel(name = "鎶�鏈礋璐d汉", width = 15) + @ApiModelProperty(value = "鎶�鏈礋璐d汉") + private String technicalDirector; + /**鎶�鏈礋璐d汉纭鏃堕棿*/ + @Excel(name = "鎶�鏈礋璐d汉纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎶�鏈礋璐d汉纭鏃堕棿") + private Date technicalDirectorTime; + /**鎶�鏈富绠″绾ч瀵�*/ + @Excel(name = "鎶�鏈富绠″绾ч瀵�", width = 15) + @ApiModelProperty(value = "鎶�鏈富绠″绾ч瀵�") + private String technicalDirectorLeader; + /**鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�*/ + @Excel(name = "鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�") + private Date technicalDirectorLeaderTime; + /**涓荤閮ㄧ骇棰嗗*/ + @Excel(name = "涓荤閮ㄧ骇棰嗗", width = 15) + @ApiModelProperty(value = "涓荤閮ㄧ骇棰嗗") + private String technicalDirectorPart; + /**涓荤閮ㄧ骇棰嗗纭鏃堕棿*/ + @Excel(name = "涓荤閮ㄧ骇棰嗗纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "涓荤閮ㄧ骇棰嗗纭鏃堕棿") + private Date technicalDirectorPartTime; + //鍒楄〃灞曠ず + @TableField(exist = false) + private String equipmentCode; + @TableField(exist = false) + private String equipmentName; + @TableField(exist = false) + private String equipmentModel; + @TableField(exist = false) + private String installationPosition; +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportProductHazardsDto.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportProductHazardsDto.java new file mode 100644 index 0000000..572fd4f --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportProductHazardsDto.java @@ -0,0 +1,114 @@ +package org.jeecg.modules.eam.dto; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 浜у搧瀹夊叏闅愭偅纭 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Data +@TableName("eam_report_product_hazards") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +public class EamReportProductHazardsDto { + + /**涓婚敭*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "涓婚敭") + private String id; + /**鍒涘缓浜�*/ + @ApiModelProperty(value = "鍒涘缓浜�") + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鍒涘缓鏃ユ湡") + private Date createTime; + /**鏇存柊浜�*/ + @ApiModelProperty(value = "鏇存柊浜�") + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鏇存柊鏃ユ湡") + private Date updateTime; + /**鎶ヤ慨ID*/ + @Excel(name = "鎶ヤ慨ID", width = 15) + @ApiModelProperty(value = "鎶ヤ慨ID") + private String reportId; + /**璁惧ID*/ + @Excel(name = "璁惧ID", width = 15) + @ApiModelProperty(value = "璁惧ID") + private String equipmentId; + /**鎿嶄綔宸�*/ + @Excel(name = "鎿嶄綔宸�", width = 15) + @ApiModelProperty(value = "鎿嶄綔宸�") + private String confirmer; + /**鎿嶄綔宸ョ‘璁ゆ椂闂�*/ + @Excel(name = "鎿嶄綔宸ョ‘璁ゆ椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎿嶄綔宸ョ‘璁ゆ椂闂�") + private Date confirmTime; + /**浜у搧鎹熷け鎯呭喌*/ + @Excel(name = "浜у搧鎹熷け鎯呭喌", width = 15) + @ApiModelProperty(value = "浜у搧鎹熷け鎯呭喌") + private String productLoss; + /**浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽*/ + @Excel(name = "浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽", width = 15) + @ApiModelProperty(value = "浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽") + private String qualityAnalysis; + /**涓荤宸ヨ壓*/ + @Excel(name = "涓荤宸ヨ壓", width = 15) + @ApiModelProperty(value = "涓荤宸ヨ壓") + private String technologist; + /**涓荤宸ヨ壓纭鏃堕棿*/ + @Excel(name = "涓荤宸ヨ壓纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "涓荤宸ヨ壓纭鏃堕棿") + private Date technologistTime; + /**涓荤宸ヨ壓纭鎰忚*/ + @Excel(name = "涓荤宸ヨ壓纭鎰忚", width = 15) + @ApiModelProperty(value = "涓荤宸ヨ壓纭鎰忚") + private String technologistComment; + /**閮ㄧ骇棰嗗*/ + @Excel(name = "閮ㄧ骇棰嗗", width = 15) + @ApiModelProperty(value = "閮ㄧ骇棰嗗") + private String deputyDepartment; + /**閮ㄧ骇棰嗗纭鏃堕棿*/ + @Excel(name = "閮ㄧ骇棰嗗纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "閮ㄧ骇棰嗗纭鏃堕棿") + private Date deputyDepartmentTime; + /**閮ㄧ骇棰嗗纭鎰忚*/ + @Excel(name = "閮ㄧ骇棰嗗纭鎰忚", width = 15) + @ApiModelProperty(value = "閮ㄧ骇棰嗗纭鎰忚") + private String deputyDepartmentComment; + //鍒楄〃灞曠ず + @TableField(exist = false) + private String equipmentCode; + @TableField(exist = false) + private String equipmentName; + @TableField(exist = false) + private String equipmentModel; + @TableField(exist = false) + private String installationPosition; +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportRepairDto.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportRepairDto.java new file mode 100644 index 0000000..af2f859 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportRepairDto.java @@ -0,0 +1,114 @@ +package org.jeecg.modules.eam.dto; + +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 鏁呴殰鎶ヤ慨Dto + * @Author: jeecg-boot + */ +@Data +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="eam_report_repair瀵硅薄", description="鏁呴殰鎶ヤ慨") +public class EamReportRepairDto { + /**涓婚敭*/ + private String id; + /**鍒涘缓浜�*/ + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date createTime; + /**鏇存柊浜�*/ + @ApiModelProperty(value = "鏇存柊浜�") + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date updateTime; + /**鍒犻櫎鏍囪*/ + @TableLogic + private Integer delFlag; + /**璁惧ID*/ + @Dict(dictTable = "eam_equipment", dicCode = "id", dicText = "equipment_name") + private String equipmentId; + /** 鎶ヤ慨鐘舵��*/ + @Dict(dicCode = "repair_status") + private String reportStatus; + /**鏄惁鍔犲伐 鍔犲伐銆佹湭鍔犲伐*/ + @Dict(dicCode = "is_processed") + private String isProcessed; + /**鏁呴殰寮�濮嬫椂闂�*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date faultStartTime; + /**鏄惁鍋滄満*/ + @Dict(dicCode = "yn") + private String breakdownFlag; + /**鏁呴殰鐜拌薄*/ + private String faultDescription; + /**鎵规鍙�*/ + private String batchNumber; + /**鍔犲伐闆朵欢鍙�*/ + private String processingPart; + /**浠舵暟*/ + private String quantity; + /**璁惧浜嬫晠 鏄惁*/ + @Dict(dicCode = "yn") + private String isAccidentsRegister; + /**搴熷搧浠跺彿*/ + private String scrapPartNumber; + /**搴熷搧浠舵暟*/ + private String scrapPartQuantity; + /**搴熷搧浠峰��*/ + private String scrapPartValue; + /**澶囨敞*/ + private String remark; + + //鍒楄〃灞曠ず + @TableField(exist = false) + private String equipmentCode; + @TableField(exist = false) + private String equipmentName; + @TableField(exist = false) + private String equipmentModel; + @TableField(exist = false) + private String installationPosition; + + /**鏄惁鏈夎澶囨搷浣滆瘉 鏄惁*/ + @Dict(dicCode = "yn") + private String operationCertificate; + /**鏄惁鏂數閲嶅惎*/ + @Dict(dicCode = "yn") + private String powerOffRestart; + /**鏄惁涓烘壒娆¢浠�*/ + @Dict(dicCode = "yn") + private String batchFirstPiece; + /**鍙樺姩鍥犵礌 鏄惁*/ + @Dict(dicCode = "yn") + private String variableFactors; + /**鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��*/ + @Dict(dicCode = "variable_factors_value") + private String variableFactorsValue; + /**鎵ц绋嬪簭*/ + private String executeNc; + /**浜嬫晠鐜拌薄*/ + private String accidentPhenomenon; + /**閲囧彇鎺柦*/ + private String measure; + /**閫犳垚缁撴灉*/ + private String causingResults; + +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java index c28502d..15b02d4 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java @@ -1,7 +1,10 @@ package org.jeecg.modules.eam.entity; +import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,6 +13,7 @@ import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.common.system.base.entity.JeecgEntity; import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.util.Date; @@ -27,7 +31,26 @@ public class EamRepairOrder extends JeecgEntity implements Serializable { private static final long serialVersionUID = -2336763554235629574L; - + /**涓婚敭*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "涓婚敭") + private String id; + /**鍒涘缓浜�*/ + @ApiModelProperty(value = "鍒涘缓浜�") + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鍒涘缓鏃ユ湡") + private Date createTime; + /**鏇存柊浜�*/ + @ApiModelProperty(value = "鏇存柊浜�") + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鏇存柊鏃ユ湡") + private Date updateTime; /** * 鍒犻櫎鏍囪 */ @@ -40,144 +63,61 @@ @Excel(name = "宸ュ崟缂栧彿", width = 15) @ApiModelProperty(value = "宸ュ崟缂栧彿") private String repairCode; - /** - * 鎶ヤ慨ID - */ + /** 鎶ヤ慨ID*/ @Excel(name = "鎶ヤ慨ID", width = 15) @ApiModelProperty(value = "鎶ヤ慨ID") private String reportId; - /** - * 璁惧ID - */ + /**璁惧ID*/ @Excel(name = "璁惧ID", width = 15) @ApiModelProperty(value = "璁惧ID") -// @Dict(dictTable = "eam_equipment", dicCode = "id", dicText = "equipment_code") + @Dict(dictTable = "eam_equipment", dicCode = "id", dicText = "equipment_name") private String equipmentId; - /** - * 缁翠慨鐘舵�� - */ - @Excel(name = "缁翠慨鐘舵��", width = 15) - @ApiModelProperty(value = "缁翠慨鐘舵��") - @Dict(dicCode = "report_repair_status") + /** 缁翠慨鐘舵��*/ + @ApiModelProperty(name = "缁翠慨鐘舵��",notes = "寰呯淮淇�佺淮淇腑銆佸緟纭銆佺淮淇畬鎴�") + @Dict(dicCode = "repair_status") private String repairStatus; - /** - * 缁翠慨寮�濮嬫椂闂� - */ - @ApiModelProperty(value = "缁翠慨寮�濮嬫椂闂�") + /** 缁翠慨寮�濮嬫椂闂� */ + @ApiModelProperty(name = "缁翠慨寮�濮嬫椂闂�",notes = "") private Date actualStartTime; - /** - * 缁翠慨缁撴潫鏃堕棿 - */ - @ApiModelProperty(value = "缁翠慨缁撴潫鏃堕棿") + /** 缁翠慨缁撴潫鏃堕棿 */ + @ApiModelProperty(name = "缁翠慨缁撴潫鏃堕棿",notes = "") private Date actualEndTime; - - /** - * 缁翠慨纭缁撴灉 - */ - @ApiModelProperty(value = "缁翠慨纭缁撴灉") - @Dict(dicCode = "yn") + /** 缁翠慨纭 */ + @ApiModelProperty(name = "缁翠慨纭",notes = "") + @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") private String repairConfirm; - /** - * 缁翠慨纭鎰忚 - */ - @ApiModelProperty(value = "缁翠慨纭鎰忚") + /** 缁翠慨纭鎰忚 */ + @ApiModelProperty(name = "缁翠慨纭鎰忚",notes = "") private String repairConfirmComment; - /** - * 缁翠慨纭鏃堕棿 - */ - @ApiModelProperty(value = "缁翠慨纭鏃堕棿") + /** 缁翠慨纭鏃堕棿 */ + @ApiModelProperty(name = "缁翠慨纭鏃堕棿",notes = "") private Date repairConfirmTime; - /** - * 鏁呴殰鍘熷洜 - */ - @Excel(name = "鏁呴殰鍘熷洜", width = 15) - @ApiModelProperty(value = "鏁呴殰鍘熷洜") + /** 鏁呴殰鍘熷洜 */ + @ApiModelProperty(name = "鏁呴殰鍘熷洜",notes = "") private String faultReason; - /** - * 缁翠慨缁撴灉鎻忚堪 - */ - @Excel(name = "缁翠慨缁撴灉鎻忚堪", width = 15) - @ApiModelProperty(value = "缁翠慨缁撴灉鎻忚堪") - private String repairDescription; - /** - * 缁翠慨璐熻矗浜� - */ - @Excel(name = "缁翠慨璐熻矗浜�", width = 15) - @ApiModelProperty(value = "缁翠慨璐熻矗浜�") - @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") - private String repairer; - - /** - * 纭棰嗗 - */ - @ApiModelProperty(value = "纭棰嗗") - @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") - private String leaderUser; - /** - * 棰嗗纭缁撴灉 - */ - @ApiModelProperty(value = "棰嗗纭缁撴灉") - @Dict(dicCode = "yn") - private String leaderConfirm; - /** - * 纭鎰忚 - */ - @ApiModelProperty(value = "纭鎰忚") - private String leaderConfirmComment; - /** - * 纭鏃堕棿 - */ - @ApiModelProperty(value = "纭鏃堕棿") - private Date leaderConfirmTime; - /** - * 鏈哄姩鍔炵淮淇汉 - */ - @ApiModelProperty(value = "鏈哄姩鍔炵淮淇汉") - @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") - private String externalRepairer; - /** - * 鏈哄姩鍔炵‘璁ょ粨鏋� - */ - @ApiModelProperty(value = "鏈哄姩鍔炵‘璁ょ粨鏋�") - @Dict(dicCode = "yn") - private String externalConfirm; - /** - * 鏈哄姩鍔炵‘璁ゆ剰瑙� - */ - @ApiModelProperty(value = "鏈哄姩鍔炵‘璁ゆ剰瑙�") - private String externalConfirmComment; - /** - * 鏈哄姩鍔炵‘璁ゆ椂闂� - */ - @ApiModelProperty(value = "鏈哄姩鍔炵‘璁ゆ椂闂�") - private Date externalConfirmTime; - /** - * 濮斿璐熻矗浜� - */ - @Excel(name = "濮斿璐熻矗浜�", width = 15) - @ApiModelProperty(value = "濮斿璐熻矗浜�") - private String outsourcedUser; - /** - * 鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧 - */ - @Excel(name = "鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧", width = 15) - @ApiModelProperty(value = "鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧") - private String imageFiles; - /** - * 鎿嶄綔宸ョ‘璁� - */ - @ApiModelProperty(value = "鎿嶄綔宸ョ‘璁�") + /** 鏁呴殰鍒嗘瀽 */ + @ApiModelProperty(name = "鏁呴殰鍒嗘瀽",notes = "") + private String faultAnalysis; + /** 鎺掓晠杩囩▼ */ + @ApiModelProperty(name = "鎺掓晠杩囩▼",notes = "") + private String faultProcess; + /** 棰勯槻鎺柦 */ + @ApiModelProperty(name = "棰勯槻鎺柦",notes = "") + private String faultPrevent; + /** 鎿嶄綔宸� */ + @ApiModelProperty(name = "鎿嶄綔宸�",notes = "") @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") private String confirmer; - /** - * 鎿嶄綔宸ョ‘璁ゆ剰瑙� - */ - @ApiModelProperty(value = "鎿嶄綔宸ョ‘璁ゆ剰瑙�") + /** 鎿嶄綔宸ョ‘璁ょ粨鏋�*/ + @ApiModelProperty(name = "鎿嶄綔宸ョ‘璁ょ粨鏋�",notes = "") + private String confirmResult; + /** 鎿嶄綔宸ョ‘璁ゆ剰瑙� */ + @ApiModelProperty(name = "鎿嶄綔宸ョ‘璁ゆ剰瑙�",notes = "") private String confirmComment; - /** - * 鎿嶄綔宸ョ‘璁ゆ椂闂� - */ + /** 鎿嶄綔宸ョ‘璁ゆ椂闂�*/ @ApiModelProperty(value = "鎿嶄綔宸ョ‘璁ゆ椂闂�") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date confirmTime; @TableField(exist = false) @@ -189,6 +129,12 @@ @TableField(exist = false) @ApiModelProperty(value = "璁惧缂栫爜") private String equipmentCode; + /** + * 璁惧鍨嬪彿 + */ + @TableField(exist = false) + @ApiModelProperty(value = "璁惧鍨嬪彿") + private String equipmentModel; @TableField(exist = false) private String installationPosition; } diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairPerson.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairPerson.java new file mode 100644 index 0000000..9c708ea --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairPerson.java @@ -0,0 +1,81 @@ +package org.jeecg.modules.eam.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 鏁呴殰缁翠慨浜哄憳 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Data +@TableName("eam_repair_person") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="eam_repair_person瀵硅薄", description="鏁呴殰缁翠慨浜哄憳") +public class EamRepairPerson implements Serializable { + private static final long serialVersionUID = 1L; + + /**涓婚敭*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "涓婚敭") + private String id; + /**鍒涘缓浜�*/ + @ApiModelProperty(value = "鍒涘缓浜�") + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鍒涘缓鏃ユ湡") + private Date createTime; + /**鏇存柊浜�*/ + @ApiModelProperty(value = "鏇存柊浜�") + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鏇存柊鏃ユ湡") + private Date updateTime; + /**鍒犻櫎鏍囪*/ + @Excel(name = "鍒犻櫎鏍囪", width = 15) + @ApiModelProperty(value = "鍒犻櫎鏍囪") + @TableLogic + private Integer delFlag; + /**缁翠慨宸ュ崟Id*/ + @Excel(name = "缁翠慨宸ュ崟Id", width = 15) + @ApiModelProperty(value = "缁翠慨宸ュ崟Id") + private String repairId; + /**缁翠慨浜�*/ + @Excel(name = "缁翠慨浜�", width = 15) + @ApiModelProperty(value = "缁翠慨浜�") + private String repairUser; + /**鏄惁鏄富缁翠慨浜�*/ + @Excel(name = "鏄惁鏄富缁翠慨浜�", width = 15) + @ApiModelProperty(value = "鏄惁鏄富缁翠慨浜�") + @Dict(dicCode = "yn") + private String repairPrimary; + /**缁翠慨鏃堕暱*/ + @Excel(name = "缁翠慨鏃堕暱", width = 15) + @ApiModelProperty(value = "缁翠慨鏃堕暱") + private String repairDuration; + /**澶囨敞*/ + @Excel(name = "澶囨敞", width = 15) + @ApiModelProperty(value = "澶囨敞") + private String remark; +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportAccidentsRegister.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportAccidentsRegister.java new file mode 100644 index 0000000..9631af9 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportAccidentsRegister.java @@ -0,0 +1,274 @@ +package org.jeecg.modules.eam.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 璁惧浜嬫晠鐧昏琛� + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Data +@TableName("eam_report_accidents_register") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="eam_report_accidents_register瀵硅薄", description="璁惧浜嬫晠鐧昏琛�") +public class EamReportAccidentsRegister implements Serializable { + private static final long serialVersionUID = 1L; + + /**涓婚敭*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "涓婚敭") + private String id; + /**鍒涘缓浜�*/ + @ApiModelProperty(value = "鍒涘缓浜�") + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鍒涘缓鏃ユ湡") + private Date createTime; + /**鏇存柊浜�*/ + @ApiModelProperty(value = "鏇存柊浜�") + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鏇存柊鏃ユ湡") + private Date updateTime; + /**鍒犻櫎鏍囪*/ + @Excel(name = "鍒犻櫎鏍囪", width = 15) + @ApiModelProperty(value = "鍒犻櫎鏍囪") + @TableLogic + private String delFlag; + /**鎶ヤ慨ID*/ + @Excel(name = "鎶ヤ慨ID", width = 15) + @ApiModelProperty(value = "鎶ヤ慨ID") + private String reportId; + /**璁惧ID*/ + @Excel(name = "璁惧ID", width = 15) + @ApiModelProperty(value = "璁惧ID") + private String equipmentId; + /**鏄惁鏈夎澶囨搷浣滆瘉 鏄惁*/ + @Excel(name = "鏄惁鏈夎澶囨搷浣滆瘉 鏄惁", width = 15) + @ApiModelProperty(value = "鏄惁鏈夎澶囨搷浣滆瘉 鏄惁") + @Dict(dicCode = "yn") + private String operationCertificate; + /**鏄惁鏂數閲嶅惎*/ + @Excel(name = "鏄惁鏂數閲嶅惎", width = 15) + @ApiModelProperty(value = "鏄惁鏂數閲嶅惎") + @Dict(dicCode = "yn") + private String powerOffRestart; + /**鏄惁涓烘壒娆¢浠�*/ + @Excel(name = "鏄惁涓烘壒娆¢浠�", width = 15) + @ApiModelProperty(value = "鏄惁涓烘壒娆¢浠�") + @Dict(dicCode = "yn") + private String batchFirstPiece; + /**鍙樺姩鍥犵礌 鏄惁*/ + @Excel(name = "鍙樺姩鍥犵礌 鏄惁", width = 15) + @ApiModelProperty(value = "鍙樺姩鍥犵礌 鏄惁") + @Dict(dicCode = "yn") + private String variableFactors; + /**鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��*/ + @Excel(name = "鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��", width = 15) + @ApiModelProperty(value = "鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀�") + @Dict(dicCode = "variable_factors_value") + private String variableFactorsValue; + /**鎵ц绋嬪簭*/ + @Excel(name = "鎵ц绋嬪簭", width = 15) + @ApiModelProperty(value = "鎵ц绋嬪簭") + private String executeNc; + /**浜嬫晠鐜拌薄*/ + @Excel(name = "浜嬫晠鐜拌薄", width = 15) + @ApiModelProperty(value = "浜嬫晠鐜拌薄") + private String accidentPhenomenon; + /**閲囧彇鎺柦*/ + @Excel(name = "閲囧彇鎺柦", width = 15) + @ApiModelProperty(value = "閲囧彇鎺柦") + private String measure; + /**閫犳垚缁撴灉*/ + @Excel(name = "閫犳垚缁撴灉", width = 15) + @ApiModelProperty(value = "閫犳垚缁撴灉") + private String causingResults; + /**鎿嶄綔宸�*/ + @Excel(name = "鎿嶄綔宸�", width = 15) + @ApiModelProperty(value = "鎿嶄綔宸�") + private String confirmer; + /**鎿嶄綔宸ョ‘璁ゆ椂闂�*/ + @Excel(name = "鎿嶄綔宸ョ‘璁ゆ椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎿嶄綔宸ョ‘璁ゆ椂闂�") + private Date confirmTime; + /**鍖洪暱*/ + @Excel(name = "鍖洪暱", width = 15) + @ApiModelProperty(value = "鍖洪暱") + private String district; + /**鍖洪暱纭*/ + @Excel(name = "鍖洪暱纭", width = 15) + @ApiModelProperty(value = "鍖洪暱纭") + private String districtConfirm; + /**鍖洪暱纭鏃堕棿*/ + @Excel(name = "鍖洪暱纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鍖洪暱纭鏃堕棿") + private Date districtTime; + /**涓績涓讳换*/ + @Excel(name = "涓績涓讳换", width = 15) + @ApiModelProperty(value = "涓績涓讳换") + private String centerDirector; + /**涓績涓讳换纭*/ + @Excel(name = "涓績涓讳换纭", width = 15) + @ApiModelProperty(value = "涓績涓讳换纭") + private String centerDirectorConfirm; + /**涓績涓讳换纭鏃堕棿*/ + @Excel(name = "涓績涓讳换纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "涓績涓讳换纭鏃堕棿") + private Date centerDirectorTime; + /**缁翠慨寮�濮嬫椂闂�*/ + @Excel(name = "缁翠慨寮�濮嬫椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨寮�濮嬫椂闂�") + private Date reportStartTime; + /**璁惧鐘舵��*/ + @Excel(name = "璁惧鐘舵��", width = 15) + @ApiModelProperty(value = "璁惧鐘舵��") + private String equipmentStatus; + /**鍘熷洜鍒嗘瀽*/ + @Excel(name = "鍘熷洜鍒嗘瀽", width = 15) + @ApiModelProperty(value = "鍘熷洜鍒嗘瀽") + private String causeAnalysis; + /**妫�鏌ョ粨鏋�*/ + @Excel(name = "妫�鏌ョ粨鏋�", width = 15) + @ApiModelProperty(value = "妫�鏌ョ粨鏋�") + private String inspectionResults; + /**閲囧彇鎺柦*/ + @Excel(name = "閲囧彇鎺柦", width = 15) + @ApiModelProperty(value = "閲囧彇鎺柦") + private String takeSteps; + /**寤鸿閲囧彇鎺柦*/ + @Excel(name = "寤鸿閲囧彇鎺柦", width = 15) + @ApiModelProperty(value = "寤鸿閲囧彇鎺柦") + private String suggestionTakeSteps; + /**寤鸿閲囧彇鎺柦鏃堕棿*/ + @Excel(name = "寤鸿閲囧彇鎺柦鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "寤鸿閲囧彇鎺柦鏃堕棿") + private Date suggestionTakeStepsTime; + /**缁翠慨纭*/ + @Excel(name = "缁翠慨纭", width = 15) + @ApiModelProperty(value = "缁翠慨纭") + private String repairConfirm; + /**缁翠慨纭鎰忚*/ + @Excel(name = "缁翠慨纭鎰忚", width = 15) + @ApiModelProperty(value = "缁翠慨纭鎰忚") + private String repairConfirmComment; + /**缁翠慨纭鏃堕棿*/ + @Excel(name = "缁翠慨纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨纭鏃堕棿") + private Date repairConfirmTime; + /**缁翠慨缁勯暱纭*/ + @Excel(name = "缁翠慨缁勯暱纭", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱纭") + private String repairGroupLeader; + /**缁翠慨缁勯暱鎰忚*/ + @Excel(name = "缁翠慨缁勯暱鎰忚", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱鎰忚") + private String repairGroupLeaderComment; + /**缁翠慨缁勯暱纭鏃堕棿*/ + @Excel(name = "缁翠慨缁勯暱纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨缁勯暱纭鏃堕棿") + private Date repairGroupLeaderTime; + /**缁翠慨缁勯暱纭*/ + @Excel(name = "缁翠慨缁勯暱纭", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱纭") + private String repairDistrict; + /**缁翠慨缁勯暱鎰忚*/ + @Excel(name = "缁翠慨缁勯暱鎰忚", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱鎰忚") + private String repairDistrictComment; + /**缁翠慨缁勯暱纭鏃堕棿*/ + @Excel(name = "缁翠慨缁勯暱纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨缁勯暱纭鏃堕棿") + private Date repairDistrictTime; + /**鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰*/ + @Excel(name = "鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰", width = 15) + @ApiModelProperty(value = "鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰") + private String checkAgree; + /**涓嶅悓鎰忓師鍥犲垎鏋�*/ + @Excel(name = "涓嶅悓鎰忓師鍥犲垎鏋�", width = 15) + @ApiModelProperty(value = "涓嶅悓鎰忓師鍥犲垎鏋�") + private String disagreeReason; + /**鏁存敼鎺柦*/ + @Excel(name = "鏁存敼鎺柦", width = 15) + @ApiModelProperty(value = "鏁存敼鎺柦") + private String rectificationMeasures; + /**浜嬫晠缁撹*/ + @Excel(name = "浜嬫晠缁撹", width = 15) + @ApiModelProperty(value = "浜嬫晠缁撹") + private String accidentConclusion; + /**鎶�鏈礋璐d汉*/ + @Excel(name = "鎶�鏈礋璐d汉", width = 15) + @ApiModelProperty(value = "鎶�鏈礋璐d汉") + private String technicalDirector; + /**鎶�鏈礋璐d汉纭鏃堕棿*/ + @Excel(name = "鎶�鏈礋璐d汉纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎶�鏈礋璐d汉纭鏃堕棿") + private Date technicalDirectorTime; + /**鎶�鏈富绠″绾ч瀵�*/ + @Excel(name = "鎶�鏈富绠″绾ч瀵�", width = 15) + @ApiModelProperty(value = "鎶�鏈富绠″绾ч瀵�") + private String technicalDirectorLeader; + /**鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�*/ + @Excel(name = "鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�") + private Date technicalDirectorLeaderTime; + /**涓荤閮ㄧ骇棰嗗*/ + @Excel(name = "涓荤閮ㄧ骇棰嗗", width = 15) + @ApiModelProperty(value = "涓荤閮ㄧ骇棰嗗") + private String technicalDirectorPart; + /**涓荤閮ㄧ骇棰嗗纭鏃堕棿*/ + @Excel(name = "涓荤閮ㄧ骇棰嗗纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "涓荤閮ㄧ骇棰嗗纭鏃堕棿") + private Date technicalDirectorPartTime; + //鍒楄〃灞曠ず + @TableField(exist = false) + private String equipmentCode; + @TableField(exist = false) + private String equipmentName; + @TableField(exist = false) + private String equipmentModel; + @TableField(exist = false) + private String installationPosition; +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportProductHazards.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportProductHazards.java new file mode 100644 index 0000000..588c64b --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportProductHazards.java @@ -0,0 +1,116 @@ +package org.jeecg.modules.eam.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 浜у搧瀹夊叏闅愭偅纭 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Data +@TableName("eam_report_product_hazards") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="eam_report_product_hazards瀵硅薄", description="浜у搧瀹夊叏闅愭偅纭") +public class EamReportProductHazards implements Serializable { + private static final long serialVersionUID = 1L; + + /**涓婚敭*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "涓婚敭") + private String id; + /**鍒涘缓浜�*/ + @ApiModelProperty(value = "鍒涘缓浜�") + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鍒涘缓鏃ユ湡") + private Date createTime; + /**鏇存柊浜�*/ + @ApiModelProperty(value = "鏇存柊浜�") + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鏇存柊鏃ユ湡") + private Date updateTime; + /**鎶ヤ慨ID*/ + @Excel(name = "鎶ヤ慨ID", width = 15) + @ApiModelProperty(value = "鎶ヤ慨ID") + private String reportId; + /**璁惧ID*/ + @Excel(name = "璁惧ID", width = 15) + @ApiModelProperty(value = "璁惧ID") + private String equipmentId; + /**鎿嶄綔宸�*/ + @Excel(name = "鎿嶄綔宸�", width = 15) + @ApiModelProperty(value = "鎿嶄綔宸�") + private String confirmer; + /**鎿嶄綔宸ョ‘璁ゆ椂闂�*/ + @Excel(name = "鎿嶄綔宸ョ‘璁ゆ椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎿嶄綔宸ョ‘璁ゆ椂闂�") + private Date confirmTime; + /**浜у搧鎹熷け鎯呭喌*/ + @Excel(name = "浜у搧鎹熷け鎯呭喌", width = 15) + @ApiModelProperty(value = "浜у搧鎹熷け鎯呭喌") + private String productLoss; + /**浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽*/ + @Excel(name = "浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽", width = 15) + @ApiModelProperty(value = "浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽") + private String qualityAnalysis; + /**涓荤宸ヨ壓*/ + @Excel(name = "涓荤宸ヨ壓", width = 15) + @ApiModelProperty(value = "涓荤宸ヨ壓") + private String technologist; + /**涓荤宸ヨ壓纭鏃堕棿*/ + @Excel(name = "涓荤宸ヨ壓纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "涓荤宸ヨ壓纭鏃堕棿") + private Date technologistTime; + /**涓荤宸ヨ壓纭鎰忚*/ + @Excel(name = "涓荤宸ヨ壓纭鎰忚", width = 15) + @ApiModelProperty(value = "涓荤宸ヨ壓纭鎰忚") + private String technologistComment; + /**閮ㄧ骇棰嗗*/ + @Excel(name = "閮ㄧ骇棰嗗", width = 15) + @ApiModelProperty(value = "閮ㄧ骇棰嗗") + private String deputyDepartment; + /**閮ㄧ骇棰嗗纭鏃堕棿*/ + @Excel(name = "閮ㄧ骇棰嗗纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "閮ㄧ骇棰嗗纭鏃堕棿") + private Date deputyDepartmentTime; + /**閮ㄧ骇棰嗗纭鎰忚*/ + @Excel(name = "閮ㄧ骇棰嗗纭鎰忚", width = 15) + @ApiModelProperty(value = "閮ㄧ骇棰嗗纭鎰忚") + private String deputyDepartmentComment; + //鍒楄〃灞曠ず + @TableField(exist = false) + private String equipmentCode; + @TableField(exist = false) + private String equipmentName; + @TableField(exist = false) + private String equipmentModel; + @TableField(exist = false) + private String installationPosition; +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportRepair.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportRepair.java index f0e3429..5a2a066 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportRepair.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportRepair.java @@ -1,114 +1,118 @@ package org.jeecg.modules.eam.entity; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; -import org.jeecg.common.api.vo.FileUploadResult; -import org.jeecg.common.aspect.annotation.Dict; -import org.jeecg.common.system.base.entity.JeecgEntity; -import org.jeecgframework.poi.excel.annotation.Excel; -import org.springframework.format.annotation.DateTimeFormat; - import java.io.Serializable; import java.util.Date; -import java.util.List; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; /** * @Description: 鏁呴殰鎶ヤ慨 - * @Author: Lius - * @Date: 2025-04-01 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 */ @Data @TableName("eam_report_repair") -@EqualsAndHashCode(callSuper = false) @Accessors(chain = true) -@ApiModel(value = "eam_report_repair瀵硅薄", description = "鏁呴殰鎶ヤ慨") -public class EamReportRepair extends JeecgEntity implements Serializable { +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="eam_report_repair瀵硅薄", description="鏁呴殰鎶ヤ慨") +public class EamReportRepair implements Serializable { + private static final long serialVersionUID = 1L; - private static final long serialVersionUID = 3966250456529614720L; - - /** - * 璁惧ID - */ - @Excel(name = "璁惧ID", width = 15, dictTable = "eam_equipment", dicCode = "id", dicText = "equipment_code") - @ApiModelProperty(value = "璁惧ID") -// @Dict(dictTable = "eam_equipment", dicCode = "id", dicText = "equipment_code") - private String equipmentId; - /** - * 璁惧鍚嶇О - */ - @Excel(name = "璁惧鍚嶇О", width = 15) - @TableField(exist = false) - @ApiModelProperty(value = "璁惧鍚嶇О") - private String equipmentName; - /** - * 鍒犻櫎鏍囪 - */ + /**涓婚敭*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "涓婚敭") + private String id; + /**鍒涘缓浜�*/ + @ApiModelProperty(value = "鍒涘缓浜�") + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鍒涘缓鏃ユ湡") + private Date createTime; + /**鏇存柊浜�*/ + @ApiModelProperty(value = "鏇存柊浜�") + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鏇存柊鏃ユ湡") + private Date updateTime; + /**鍒犻櫎鏍囪*/ + @Excel(name = "鍒犻櫎鏍囪", width = 15) @ApiModelProperty(value = "鍒犻櫎鏍囪") - @Dict(dicCode = "del_flag") + @TableLogic private Integer delFlag; - /** - * 鏁呴殰寮�濮嬫椂闂� - */ - @ApiModelProperty(value = "鏁呴殰寮�濮嬫椂闂�") - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "鏁呴殰寮�濮嬫椂闂�", width = 15, format = "yyyy-MM-dd HH:mm:ss") - private Date faultStartTime; - /** - * 鏄惁鍋滄満 - */ - @Excel(name = "鏄惁鍋滄満", width = 15, dicCode = "breakdown_flag") - @ApiModelProperty(value = "鏄惁鍋滄満") - @Dict(dicCode = "breakdown_flag") - private String breakdownFlag; - /** - * 鏁呴殰绠�绉� - */ - @Excel(name = "鏁呴殰绠�绉�", width = 15) - @ApiModelProperty(value = "鏁呴殰绠�绉�") - private String faultName; - /** - * 鏁呴殰鍒嗙被 - */ - @Excel(name = "鏁呴殰鍒嗙被", width = 15, dicCode = "fault_reason_category") - @ApiModelProperty(value = "鏁呴殰鍒嗙被") - @Dict(dicCode = "fault_reason_category") - private String faultType; - /** - * 鏁呴殰鎻忚堪 - */ - @Excel(name = "鏁呴殰鎻忚堪", width = 15) - @ApiModelProperty(value = "鏁呴殰鎻忚堪") - private String faultDescription; - /** - * 鎶ヤ慨鐘舵�� - */ - @Excel(name = "鎶ヤ慨鐘舵��", width = 15, dicCode = "report_repair_status") + /**璁惧ID*/ + @ApiModelProperty(value = "璁惧ID") + @Excel(name = "璁惧ID", width = 15, dictTable = "eam_equipment", dicCode = "id", dicText = "equipment_name") + @Dict(dictTable = "eam_equipment", dicCode = "id", dicText = "equipment_name") + private String equipmentId; + /** 鎶ヤ慨鐘舵��*/ @ApiModelProperty(value = "鎶ヤ慨鐘舵��") - @Dict(dicCode = "report_repair_status") + @Dict(dicCode = "repair_status") private String reportStatus; - /** - * 鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧 - */ - @Excel(name = "鐓х墖", width = 15, type = 2) - @ApiModelProperty(value = "鐓х墖") - private String imageFiles; - - /**鐓х墖*/ - @ApiModelProperty(value = "鐓х墖") - @TableField(exist = false) - private List<FileUploadResult> imageFilesResult; - - /** - * 澶囨敞 - */ - @Excel(name = "澶囨敞", width = 15) + /**鏄惁鍔犲伐 鍔犲伐銆佹湭鍔犲伐*/ + @Excel(name = "鏄惁鍔犲伐 鍔犲伐銆佹湭鍔犲伐", width = 15) + @ApiModelProperty(value = "鏄惁鍔犲伐 鍔犲伐銆佹湭鍔犲伐") + @Dict(dicCode = "is_processed") + private String isProcessed; + /**鏁呴殰寮�濮嬫椂闂�*/ + @Excel(name = "鏁呴殰寮�濮嬫椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鏁呴殰寮�濮嬫椂闂�") + private Date faultStartTime; + /**鏄惁鍋滄満*/ + @Excel(name = "鏄惁鍋滄満", width = 15) + @ApiModelProperty(value = "鏄惁鍋滄満") + @Dict(dicCode = "yn") + private String breakdownFlag; + /**鏁呴殰鐜拌薄*/ + @Excel(name = "鏁呴殰鐜拌薄", width = 15) + @ApiModelProperty(value = "鏁呴殰鐜拌薄") + private String faultDescription; + /**鎵规鍙�*/ + @Excel(name = "鎵规鍙�", width = 15) + @ApiModelProperty(value = "鎵规鍙�") + private String batchNumber; + /**鍔犲伐闆朵欢鍙�*/ + @Excel(name = "鍔犲伐闆朵欢鍙�", width = 15) + @ApiModelProperty(value = "鍔犲伐闆朵欢鍙�") + private String processingPart; + /**浠舵暟*/ + @Excel(name = "浠舵暟", width = 15) + @ApiModelProperty(value = "浠舵暟") + private String quantity; + /**璁惧浜嬫晠 鏄惁*/ + @Excel(name = "璁惧浜嬫晠 鏄惁", width = 15) + @ApiModelProperty(value = "璁惧浜嬫晠 鏄惁") + @Dict(dicCode = "yn") + private String isAccidentsRegister; + /**搴熷搧浠跺彿*/ + @Excel(name = "搴熷搧浠跺彿", width = 15) + @ApiModelProperty(value = "搴熷搧浠跺彿") + private String scrapPartNumber; + /**搴熷搧浠舵暟*/ + @Excel(name = "搴熷搧浠舵暟", width = 15) + @ApiModelProperty(value = "搴熷搧浠舵暟") + private String scrapPartQuantity; + /**搴熷搧浠峰��*/ + @Excel(name = "搴熷搧浠峰��", width = 15) + @ApiModelProperty(value = "搴熷搧浠峰��") + private String scrapPartValue; + /**澶囨敞*/ + @Excel(name = "澶囨敞", width = 15) @ApiModelProperty(value = "澶囨敞") private String remark; @@ -116,6 +120,10 @@ @TableField(exist = false) private String equipmentCode; @TableField(exist = false) + private String equipmentName; + @TableField(exist = false) + private String equipmentModel; + @TableField(exist = false) private String installationPosition; } diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportThreeNoSpare.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportThreeNoSpare.java new file mode 100644 index 0000000..6f80781 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportThreeNoSpare.java @@ -0,0 +1,94 @@ +package org.jeecg.modules.eam.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Data +@TableName("eam_report_three_no_spare") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="eam_report_three_no_spare瀵硅薄", description="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃") +public class EamReportThreeNoSpare implements Serializable { + private static final long serialVersionUID = 1L; + + /**涓婚敭*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "涓婚敭") + private String id; + /**鍒涘缓浜�*/ + @ApiModelProperty(value = "鍒涘缓浜�") + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鍒涘缓鏃ユ湡") + private Date createTime; + /**鏇存柊浜�*/ + @ApiModelProperty(value = "鏇存柊浜�") + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鏇存柊鏃ユ湡") + private Date updateTime; + /**鍒犻櫎鏍囪*/ + @Excel(name = "鍒犻櫎鏍囪", width = 15) + @ApiModelProperty(value = "鍒犻櫎鏍囪") + @TableLogic + private String delFlag; + /**鎶ヤ慨ID*/ + @Excel(name = "鎶ヤ慨ID", width = 15) + @ApiModelProperty(value = "鎶ヤ慨ID") + private String reportId; + /**璁惧ID*/ + @Excel(name = "璁惧ID", width = 15) + @ApiModelProperty(value = "璁惧ID") + private String equipmentId; + /**鍘熷洜鍒嗘瀽*/ + @Excel(name = "鍘熷洜鍒嗘瀽", width = 15) + @ApiModelProperty(value = "鍘熷洜鍒嗘瀽") + private String causeAnalysis; + /**鍩硅鏁欒偛鏄� 鍚�*/ + @Excel(name = "鍩硅鏁欒偛鏄� 鍚�", width = 15) + @ApiModelProperty(value = "鍩硅鏁欒偛鏄� 鍚�") + private String isTrainingEducation; + /**鍩硅褰㈠紡*/ + @Excel(name = "鍩硅褰㈠紡", width = 15) + @ApiModelProperty(value = "鍩硅褰㈠紡") + private String trainingFormat; + /**鍩硅鍐呭*/ + @Excel(name = "鍩硅鍐呭", width = 15) + @ApiModelProperty(value = "鍩硅鍐呭") + private String trainingContent; + /**鍩硅浜�*/ + @Excel(name = "鍩硅浜�", width = 15) + @ApiModelProperty(value = "鍩硅浜�") + private String trainingUser; + /**鍩硅鏃堕棿*/ + @Excel(name = "鍩硅鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鍩硅鏃堕棿") + private Date trainingUserTime; +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamRepairPersonMapper.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamRepairPersonMapper.java new file mode 100644 index 0000000..ea2f537 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamRepairPersonMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.eam.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.eam.entity.EamRepairPerson; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 鏁呴殰缁翠慨浜哄憳 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +public interface EamRepairPersonMapper extends BaseMapper<EamRepairPerson> { + +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportAccidentsRegisterMapper.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportAccidentsRegisterMapper.java new file mode 100644 index 0000000..21b3ec2 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportAccidentsRegisterMapper.java @@ -0,0 +1,22 @@ +package org.jeecg.modules.eam.mapper; + +import java.util.List; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.eam.entity.EamReportAccidentsRegister; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.eam.request.EamReportAccidentsRegisterQuery; + +/** + * @Description: 璁惧浜嬫晠鐧昏琛� + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +public interface EamReportAccidentsRegisterMapper extends BaseMapper<EamReportAccidentsRegister> { + + IPage<EamReportAccidentsRegisterQuery> queryPageList(IPage<EamReportAccidentsRegisterQuery> page, @Param(Constants.WRAPPER) QueryWrapper<EamReportAccidentsRegisterQuery> eamReportAccidentsRegisterQuery); +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportProductHazardsMapper.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportProductHazardsMapper.java new file mode 100644 index 0000000..b1b0f41 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportProductHazardsMapper.java @@ -0,0 +1,24 @@ +package org.jeecg.modules.eam.mapper; + +import java.util.List; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.eam.entity.EamReportProductHazards; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.eam.request.EamReportProductHazardsQuery; + +/** + * @Description: 浜у搧瀹夊叏闅愭偅纭 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +public interface EamReportProductHazardsMapper extends BaseMapper<EamReportProductHazards> { + + IPage<EamReportProductHazardsQuery> queryPageList(Page<EamReportProductHazardsQuery> page, @Param(Constants.WRAPPER) QueryWrapper<EamReportProductHazardsQuery> eamReportProductHazardsQuery); + +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportRepairMapper.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportRepairMapper.java index 742d4e6..6c1eca2 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportRepairMapper.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportRepairMapper.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.eam.dto.EamReportRepairDto; import org.jeecg.modules.eam.entity.EamReportRepair; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.jeecg.modules.eam.request.EamReportRepairQuery; @@ -34,5 +35,5 @@ * @param queryWrapper * @return */ - IPage<EamReportRepair> queryPageList(Page<EamReportRepair> page, @Param(Constants.WRAPPER) QueryWrapper<EamReportRepair> queryWrapper); + IPage<EamReportRepairDto> queryPageList(Page<EamReportRepairDto> page, @Param(Constants.WRAPPER) QueryWrapper<EamReportRepairDto> queryWrapper); } diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportThreeNoSpareMapper.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportThreeNoSpareMapper.java new file mode 100644 index 0000000..8bb0376 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/EamReportThreeNoSpareMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.eam.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.eam.entity.EamReportThreeNoSpare; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +public interface EamReportThreeNoSpareMapper extends BaseMapper<EamReportThreeNoSpare> { + +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairOrderMapper.xml b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairOrderMapper.xml index d4f19ed..3a92e7d 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairOrderMapper.xml +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairOrderMapper.xml @@ -46,10 +46,10 @@ ORDER BY t1.create_time DESC </select> <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamRepairOrder"> - select wmo.*, e.equipment_code, e.equipment_name, e.installation_position + select wmo.*, e.equipment_code, e.equipment_name,e.equipment_model, e.installation_position from eam_repair_order wmo inner join eam_equipment e on wmo.equipment_id = e.id ${ew.customSqlSegment} </select> -</mapper> \ No newline at end of file +</mapper> diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairPersonMapper.xml b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairPersonMapper.xml new file mode 100644 index 0000000..45650d1 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairPersonMapper.xml @@ -0,0 +1,5 @@ +<?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.jeecg.modules.eam.mapper.EamRepairPersonMapper"> + +</mapper> diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportAccidentsRegisterMapper.xml b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportAccidentsRegisterMapper.xml new file mode 100644 index 0000000..d967f14 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportAccidentsRegisterMapper.xml @@ -0,0 +1,21 @@ +<?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.jeecg.modules.eam.mapper.EamReportAccidentsRegisterMapper"> + + <select id="queryPageList" resultType="org.jeecg.modules.eam.request.EamReportAccidentsRegisterQuery"> + SELECT + aar.*, + e.equipment_code, + e.equipment_name, + e.equipment_model, + e.installation_position + FROM eam_report_accidents_register aar + LEFT JOIN eam_report_repair wmo + ON aar.report_id = wmo.id + AND wmo.del_flag = 0 + INNER JOIN eam_equipment e + ON wmo.equipment_id = e.id + AND e.del_flag = 0 + ${ew.customSqlSegment} + </select> +</mapper> diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportProductHazardsMapper.xml b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportProductHazardsMapper.xml new file mode 100644 index 0000000..ed94b1c --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportProductHazardsMapper.xml @@ -0,0 +1,16 @@ +<?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.jeecg.modules.eam.mapper.EamReportProductHazardsMapper"> + + <select id="queryPageList" resultType="org.jeecg.modules.eam.request.EamReportProductHazardsQuery"> + select erph.*, e.equipment_code, e.equipment_name,e.equipment_model, e.installation_position + from eam_report_product_hazards erph + inner join eam_equipment e + on erph.equipment_id = e.id + and e.del_flag=0 + left join eam_report_repair arr + on erph.report_id = arr.id + and arr.del_flag=0 + ${ew.customSqlSegment} + </select> +</mapper> diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportRepairMapper.xml b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportRepairMapper.xml index dd2d260..036a908 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportRepairMapper.xml +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportRepairMapper.xml @@ -48,11 +48,17 @@ </where> ORDER BY t1.create_time DESC </select> - <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamReportRepair"> - select wmo.*, e.equipment_code, e.equipment_name, e.installation_position + <select id="queryPageList" resultType="org.jeecg.modules.eam.dto.EamReportRepairDto"> + select wmo.*, e.equipment_code, e.equipment_name,e.equipment_model, e.installation_position, + aar.operation_certificate, power_off_restart, batch_first_piece, variable_factors, + variable_factors_value, execute_nc, accident_phenomenon, measure, causing_results from eam_report_repair wmo inner join eam_equipment e on wmo.equipment_id = e.id + and e.del_flag=0 + left join eam_report_accidents_register aar + on wmo.id = aar.report_id + and aar.del_flag=0 ${ew.customSqlSegment} </select> -</mapper> \ No newline at end of file +</mapper> diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportThreeNoSpareMapper.xml b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportThreeNoSpareMapper.xml new file mode 100644 index 0000000..9de7c1a --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportThreeNoSpareMapper.xml @@ -0,0 +1,5 @@ +<?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.jeecg.modules.eam.mapper.EamReportThreeNoSpareMapper"> + +</mapper> diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamRepairOrderRequest.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamRepairOrderRequest.java index 922934e..5e2eb8e 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamRepairOrderRequest.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamRepairOrderRequest.java @@ -8,6 +8,7 @@ import org.jeecg.modules.flowable.domain.vo.FlowTaskVo; import java.io.Serializable; +import java.util.Date; import java.util.List; /** @@ -30,47 +31,16 @@ @ApiModelProperty(value = "璁惧ID") private String equipmentId; - /** - * 鏁呴殰鍘熷洜 - */ - @ApiModelProperty(value = "鏁呴殰鍘熷洜") - private String faultReason; - /** - * 缁翠慨缁撴灉鎻忚堪 - */ - @ApiModelProperty(value = "缁翠慨缁撴灉鎻忚堪") - private String repairDescription; - - /** - * 鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧 - */ - @ApiModelProperty(value = "鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧") - private String imageFiles; - - /**缁翠慨鍥剧墖*/ - @ApiModelProperty(value = "缁翠慨鍥剧墖闆嗗悎") - private List<FileUploadResult> imageFilesResult; - - /** - * 缁翠慨浜虹‘璁� - */ - private String repairConfirm; - private String repairConfirmComment; - - /** - * 棰嗗纭 - */ - private String leaderConfirm; - private String leaderConfirmComment; - - /** - * 鏈哄姩鍔炵‘璁� - */ - private String externalConfirm; - private String externalConfirmComment; - - /** - * 鎿嶄綔宸ョ‘璁ゆ剰瑙� - */ + /** 鎿嶄綔宸� */ + @ApiModelProperty(name = "鎿嶄綔宸�",notes = "") + private String confirmer; + /** 鎿嶄綔宸ョ‘璁ょ粨鏋�*/ + @ApiModelProperty(name = "鎿嶄綔宸ョ‘璁ょ粨鏋�",notes = "") + private String confirmResult; + /** 鎿嶄綔宸ョ‘璁ゆ椂闂� */ + @ApiModelProperty(name = "鎿嶄綔宸ョ‘璁ゆ椂闂�",notes = "") + private Date confirmTime; + /** 鎿嶄綔宸ョ‘璁ゆ剰瑙� */ + @ApiModelProperty(name = "鎿嶄綔宸ョ‘璁ゆ剰瑙�",notes = "") private String confirmComment; } diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportAccidentsRegisterQuery.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportAccidentsRegisterQuery.java new file mode 100644 index 0000000..e1985b7 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportAccidentsRegisterQuery.java @@ -0,0 +1,267 @@ +package org.jeecg.modules.eam.request; + +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; + +/** + * @Description: 璁惧浜嬫晠鐧昏琛� + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Data +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +public class EamReportAccidentsRegisterQuery { + /**涓婚敭*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "涓婚敭") + private String id; + /**鍒涘缓浜�*/ + @ApiModelProperty(value = "鍒涘缓浜�") + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鍒涘缓鏃ユ湡") + private Date createTime; + /**鏇存柊浜�*/ + @ApiModelProperty(value = "鏇存柊浜�") + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鏇存柊鏃ユ湡") + private Date updateTime; + /**鍒犻櫎鏍囪*/ + @Excel(name = "鍒犻櫎鏍囪", width = 15) + @ApiModelProperty(value = "鍒犻櫎鏍囪") + @TableLogic + private String delFlag; + /**鎶ヤ慨ID*/ + @Excel(name = "鎶ヤ慨ID", width = 15) + @ApiModelProperty(value = "鎶ヤ慨ID") + private String reportId; + /**璁惧ID*/ + @Excel(name = "璁惧ID", width = 15) + @ApiModelProperty(value = "璁惧ID") + private String equipmentId; + /**鏄惁鏈夎澶囨搷浣滆瘉 鏄惁*/ + @Excel(name = "鏄惁鏈夎澶囨搷浣滆瘉 鏄惁", width = 15) + @ApiModelProperty(value = "鏄惁鏈夎澶囨搷浣滆瘉 鏄惁") + @Dict(dicCode = "yn") + private String operationCertificate; + /**鏄惁鏂數閲嶅惎*/ + @Excel(name = "鏄惁鏂數閲嶅惎", width = 15) + @ApiModelProperty(value = "鏄惁鏂數閲嶅惎") + @Dict(dicCode = "yn") + private String powerOffRestart; + /**鏄惁涓烘壒娆¢浠�*/ + @Excel(name = "鏄惁涓烘壒娆¢浠�", width = 15) + @ApiModelProperty(value = "鏄惁涓烘壒娆¢浠�") + @Dict(dicCode = "yn") + private String batchFirstPiece; + /**鍙樺姩鍥犵礌 鏄惁*/ + @Excel(name = "鍙樺姩鍥犵礌 鏄惁", width = 15) + @ApiModelProperty(value = "鍙樺姩鍥犵礌 鏄惁") + @Dict(dicCode = "yn") + private String variableFactors; + /**鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��*/ + @Excel(name = "鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��", width = 15) + @ApiModelProperty(value = "鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀�") + @Dict(dicCode = "variable_factors_value") + private String variableFactorsValue; + /**鎵ц绋嬪簭*/ + @Excel(name = "鎵ц绋嬪簭", width = 15) + @ApiModelProperty(value = "鎵ц绋嬪簭") + private String executeNc; + /**浜嬫晠鐜拌薄*/ + @Excel(name = "浜嬫晠鐜拌薄", width = 15) + @ApiModelProperty(value = "浜嬫晠鐜拌薄") + private String accidentPhenomenon; + /**閲囧彇鎺柦*/ + @Excel(name = "閲囧彇鎺柦", width = 15) + @ApiModelProperty(value = "閲囧彇鎺柦") + private String measure; + /**閫犳垚缁撴灉*/ + @Excel(name = "閫犳垚缁撴灉", width = 15) + @ApiModelProperty(value = "閫犳垚缁撴灉") + private String causingResults; + /**鎿嶄綔宸�*/ + @Excel(name = "鎿嶄綔宸�", width = 15) + @ApiModelProperty(value = "鎿嶄綔宸�") + private String confirmer; + /**鎿嶄綔宸ョ‘璁ゆ椂闂�*/ + @Excel(name = "鎿嶄綔宸ョ‘璁ゆ椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎿嶄綔宸ョ‘璁ゆ椂闂�") + private Date confirmTime; + /**鍖洪暱*/ + @Excel(name = "鍖洪暱", width = 15) + @ApiModelProperty(value = "鍖洪暱") + private String district; + /**鍖洪暱纭*/ + @Excel(name = "鍖洪暱纭", width = 15) + @ApiModelProperty(value = "鍖洪暱纭") + private String districtConfirm; + /**鍖洪暱纭鏃堕棿*/ + @Excel(name = "鍖洪暱纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鍖洪暱纭鏃堕棿") + private Date districtTime; + /**涓績涓讳换*/ + @Excel(name = "涓績涓讳换", width = 15) + @ApiModelProperty(value = "涓績涓讳换") + private String centerDirector; + /**涓績涓讳换纭*/ + @Excel(name = "涓績涓讳换纭", width = 15) + @ApiModelProperty(value = "涓績涓讳换纭") + private String centerDirectorConfirm; + /**涓績涓讳换纭鏃堕棿*/ + @Excel(name = "涓績涓讳换纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "涓績涓讳换纭鏃堕棿") + private Date centerDirectorTime; + /**缁翠慨寮�濮嬫椂闂�*/ + @Excel(name = "缁翠慨寮�濮嬫椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨寮�濮嬫椂闂�") + private Date reportStartTime; + /**璁惧鐘舵��*/ + @Excel(name = "璁惧鐘舵��", width = 15) + @ApiModelProperty(value = "璁惧鐘舵��") + private String equipmentStatus; + /**鍘熷洜鍒嗘瀽*/ + @Excel(name = "鍘熷洜鍒嗘瀽", width = 15) + @ApiModelProperty(value = "鍘熷洜鍒嗘瀽") + private String causeAnalysis; + /**妫�鏌ョ粨鏋�*/ + @Excel(name = "妫�鏌ョ粨鏋�", width = 15) + @ApiModelProperty(value = "妫�鏌ョ粨鏋�") + private String inspectionResults; + /**閲囧彇鎺柦*/ + @Excel(name = "閲囧彇鎺柦", width = 15) + @ApiModelProperty(value = "閲囧彇鎺柦") + private String takeSteps; + /**寤鸿閲囧彇鎺柦*/ + @Excel(name = "寤鸿閲囧彇鎺柦", width = 15) + @ApiModelProperty(value = "寤鸿閲囧彇鎺柦") + private String suggestionTakeSteps; + /**寤鸿閲囧彇鎺柦鏃堕棿*/ + @Excel(name = "寤鸿閲囧彇鎺柦鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "寤鸿閲囧彇鎺柦鏃堕棿") + private Date suggestionTakeStepsTime; + /**缁翠慨纭*/ + @Excel(name = "缁翠慨纭", width = 15) + @ApiModelProperty(value = "缁翠慨纭") + private String repairConfirm; + /**缁翠慨纭鎰忚*/ + @Excel(name = "缁翠慨纭鎰忚", width = 15) + @ApiModelProperty(value = "缁翠慨纭鎰忚") + private String repairConfirmComment; + /**缁翠慨纭鏃堕棿*/ + @Excel(name = "缁翠慨纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨纭鏃堕棿") + private Date repairConfirmTime; + /**缁翠慨缁勯暱纭*/ + @Excel(name = "缁翠慨缁勯暱纭", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱纭") + private String repairGroupLeader; + /**缁翠慨缁勯暱鎰忚*/ + @Excel(name = "缁翠慨缁勯暱鎰忚", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱鎰忚") + private String repairGroupLeaderComment; + /**缁翠慨缁勯暱纭鏃堕棿*/ + @Excel(name = "缁翠慨缁勯暱纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨缁勯暱纭鏃堕棿") + private Date repairGroupLeaderTime; + /**缁翠慨缁勯暱纭*/ + @Excel(name = "缁翠慨缁勯暱纭", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱纭") + private String repairDistrict; + /**缁翠慨缁勯暱鎰忚*/ + @Excel(name = "缁翠慨缁勯暱鎰忚", width = 15) + @ApiModelProperty(value = "缁翠慨缁勯暱鎰忚") + private String repairDistrictComment; + /**缁翠慨缁勯暱纭鏃堕棿*/ + @Excel(name = "缁翠慨缁勯暱纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "缁翠慨缁勯暱纭鏃堕棿") + private Date repairDistrictTime; + /**鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰*/ + @Excel(name = "鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰", width = 15) + @ApiModelProperty(value = "鍘熷洜鍒嗘瀽鏍稿鍚屾剰銆佷笉鍚屾剰") + private String checkAgree; + /**涓嶅悓鎰忓師鍥犲垎鏋�*/ + @Excel(name = "涓嶅悓鎰忓師鍥犲垎鏋�", width = 15) + @ApiModelProperty(value = "涓嶅悓鎰忓師鍥犲垎鏋�") + private String disagreeReason; + /**鏁存敼鎺柦*/ + @Excel(name = "鏁存敼鎺柦", width = 15) + @ApiModelProperty(value = "鏁存敼鎺柦") + private String rectificationMeasures; + /**浜嬫晠缁撹*/ + @Excel(name = "浜嬫晠缁撹", width = 15) + @ApiModelProperty(value = "浜嬫晠缁撹") + private String accidentConclusion; + /**鎶�鏈礋璐d汉*/ + @Excel(name = "鎶�鏈礋璐d汉", width = 15) + @ApiModelProperty(value = "鎶�鏈礋璐d汉") + private String technicalDirector; + /**鎶�鏈礋璐d汉纭鏃堕棿*/ + @Excel(name = "鎶�鏈礋璐d汉纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎶�鏈礋璐d汉纭鏃堕棿") + private Date technicalDirectorTime; + /**鎶�鏈富绠″绾ч瀵�*/ + @Excel(name = "鎶�鏈富绠″绾ч瀵�", width = 15) + @ApiModelProperty(value = "鎶�鏈富绠″绾ч瀵�") + private String technicalDirectorLeader; + /**鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�*/ + @Excel(name = "鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�") + private Date technicalDirectorLeaderTime; + /**涓荤閮ㄧ骇棰嗗*/ + @Excel(name = "涓荤閮ㄧ骇棰嗗", width = 15) + @ApiModelProperty(value = "涓荤閮ㄧ骇棰嗗") + private String technicalDirectorPart; + /**涓荤閮ㄧ骇棰嗗纭鏃堕棿*/ + @Excel(name = "涓荤閮ㄧ骇棰嗗纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "涓荤閮ㄧ骇棰嗗纭鏃堕棿") + private Date technicalDirectorPartTime; + //鍒楄〃灞曠ず + @TableField(exist = false) + private String equipmentCode; + @TableField(exist = false) + private String equipmentName; + @TableField(exist = false) + private String equipmentModel; + @TableField(exist = false) + private String installationPosition; + private String column; + private String order; +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportProductHazardsQuery.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportProductHazardsQuery.java new file mode 100644 index 0000000..f4dbee7 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportProductHazardsQuery.java @@ -0,0 +1,118 @@ +package org.jeecg.modules.eam.request; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 浜у搧瀹夊叏闅愭偅纭 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Data +@TableName("eam_report_product_hazards") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="eam_report_product_hazards瀵硅薄", description="浜у搧瀹夊叏闅愭偅纭") +public class EamReportProductHazardsQuery implements Serializable { + private static final long serialVersionUID = 1L; + + /**涓婚敭*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "涓婚敭") + private String id; + /**鍒涘缓浜�*/ + @ApiModelProperty(value = "鍒涘缓浜�") + private String createBy; + /**鍒涘缓鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鍒涘缓鏃ユ湡") + private Date createTime; + /**鏇存柊浜�*/ + @ApiModelProperty(value = "鏇存柊浜�") + private String updateBy; + /**鏇存柊鏃ユ湡*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "鏇存柊鏃ユ湡") + private Date updateTime; + /**鎶ヤ慨ID*/ + @Excel(name = "鎶ヤ慨ID", width = 15) + @ApiModelProperty(value = "鎶ヤ慨ID") + private String reportId; + /**璁惧ID*/ + @Excel(name = "璁惧ID", width = 15) + @ApiModelProperty(value = "璁惧ID") + private String equipmentId; + /**鎿嶄綔宸�*/ + @Excel(name = "鎿嶄綔宸�", width = 15) + @ApiModelProperty(value = "鎿嶄綔宸�") + private String confirmer; + /**鎿嶄綔宸ョ‘璁ゆ椂闂�*/ + @Excel(name = "鎿嶄綔宸ョ‘璁ゆ椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鎿嶄綔宸ョ‘璁ゆ椂闂�") + private Date confirmTime; + /**浜у搧鎹熷け鎯呭喌*/ + @Excel(name = "浜у搧鎹熷け鎯呭喌", width = 15) + @ApiModelProperty(value = "浜у搧鎹熷け鎯呭喌") + private String productLoss; + /**浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽*/ + @Excel(name = "浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽", width = 15) + @ApiModelProperty(value = "浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽") + private String qualityAnalysis; + /**涓荤宸ヨ壓*/ + @Excel(name = "涓荤宸ヨ壓", width = 15) + @ApiModelProperty(value = "涓荤宸ヨ壓") + private String technologist; + /**涓荤宸ヨ壓纭鏃堕棿*/ + @Excel(name = "涓荤宸ヨ壓纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "涓荤宸ヨ壓纭鏃堕棿") + private Date technologistTime; + /**涓荤宸ヨ壓纭鎰忚*/ + @Excel(name = "涓荤宸ヨ壓纭鎰忚", width = 15) + @ApiModelProperty(value = "涓荤宸ヨ壓纭鎰忚") + private String technologistComment; + /**閮ㄧ骇棰嗗*/ + @Excel(name = "閮ㄧ骇棰嗗", width = 15) + @ApiModelProperty(value = "閮ㄧ骇棰嗗") + private String deputyDepartment; + /**閮ㄧ骇棰嗗纭鏃堕棿*/ + @Excel(name = "閮ㄧ骇棰嗗纭鏃堕棿", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "閮ㄧ骇棰嗗纭鏃堕棿") + private Date deputyDepartmentTime; + /**閮ㄧ骇棰嗗纭鎰忚*/ + @Excel(name = "閮ㄧ骇棰嗗纭鎰忚", width = 15) + @ApiModelProperty(value = "閮ㄧ骇棰嗗纭鎰忚") + private String deputyDepartmentComment; + //鍒楄〃灞曠ず + @TableField(exist = false) + private String equipmentCode; + @TableField(exist = false) + private String equipmentName; + @TableField(exist = false) + private String equipmentModel; + @TableField(exist = false) + private String installationPosition; + private String column; + private String order; +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportRepairRequest.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportRepairRequest.java new file mode 100644 index 0000000..94ca6c5 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportRepairRequest.java @@ -0,0 +1,115 @@ +package org.jeecg.modules.eam.request; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * @Author: lyh + * @CreateTime: 2025-04-21 + * @Description: + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +public class EamReportRepairRequest { + /**璁惧ID*/ + @Excel(name = "璁惧ID", width = 15) + @ApiModelProperty(value = "璁惧ID") + private String equipmentId; + /**鏄惁鍔犲伐 鍔犲伐銆佹湭鍔犲伐*/ + @Excel(name = "鏄惁鍔犲伐 鍔犲伐銆佹湭鍔犲伐", width = 15) + @ApiModelProperty(value = "鏄惁鍔犲伐 鍔犲伐銆佹湭鍔犲伐") + @Dict(dicCode = "is_processed") + private String isProcessed; + /**鏁呴殰寮�濮嬫椂闂�*/ + @Excel(name = "鏁呴殰寮�濮嬫椂闂�", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "鏁呴殰寮�濮嬫椂闂�") + private Date faultStartTime; + /**鏄惁鍋滄満*/ + @Excel(name = "鏄惁鍋滄満", width = 15) + @ApiModelProperty(value = "鏄惁鍋滄満") + @Dict(dicCode = "yn") + private String breakdownFlag; + /**鏁呴殰鐜拌薄*/ + @Excel(name = "鏁呴殰鐜拌薄", width = 15) + @ApiModelProperty(value = "鏁呴殰鐜拌薄") + private String faultDescription; + /**鎵规鍙�*/ + @Excel(name = "鎵规鍙�", width = 15) + @ApiModelProperty(value = "鎵规鍙�") + private String batchNumber; + /**鍔犲伐闆朵欢鍙�*/ + @Excel(name = "鍔犲伐闆朵欢鍙�", width = 15) + @ApiModelProperty(value = "鍔犲伐闆朵欢鍙�") + private String processingPart; + /**浠舵暟*/ + @Excel(name = "浠舵暟", width = 15) + @ApiModelProperty(value = "浠舵暟") + private String quantity; + /**璁惧浜嬫晠 鏄惁*/ + @Excel(name = "璁惧浜嬫晠 鏄惁", width = 15) + @ApiModelProperty(value = "璁惧浜嬫晠 鏄惁") + private String isAccidentsRegister; + /**搴熷搧浠跺彿*/ + @Excel(name = "搴熷搧浠跺彿", width = 15) + @ApiModelProperty(value = "搴熷搧浠跺彿") + private String scrapPartNumber; + /**搴熷搧浠舵暟*/ + @Excel(name = "搴熷搧浠舵暟", width = 15) + @ApiModelProperty(value = "搴熷搧浠舵暟") + private String scrapPartQuantity; + /**搴熷搧浠峰��*/ + @Excel(name = "搴熷搧浠峰��", width = 15) + @ApiModelProperty(value = "搴熷搧浠峰��") + private String scrapPartValue; + /**澶囨敞*/ + @Excel(name = "澶囨敞", width = 15) + @ApiModelProperty(value = "澶囨敞") + private String remark; + /**鏄惁鏈夎澶囨搷浣滆瘉 鏄惁*/ + @Excel(name = "鏄惁鏈夎澶囨搷浣滆瘉 鏄惁", width = 15) + @ApiModelProperty(value = "鏄惁鏈夎澶囨搷浣滆瘉 鏄惁") + private String operationCertificate; + /**鏄惁鏂數閲嶅惎*/ + @Excel(name = "鏄惁鏂數閲嶅惎", width = 15) + @ApiModelProperty(value = "鏄惁鏂數閲嶅惎") + private String powerOffRestart; + /**鏄惁涓烘壒娆¢浠�*/ + @Excel(name = "鏄惁涓烘壒娆¢浠�", width = 15) + @ApiModelProperty(value = "鏄惁涓烘壒娆¢浠�") + private String batchFirstPiece; + /**鍙樺姩鍥犵礌 鏄惁*/ + @Excel(name = "鍙樺姩鍥犵礌 鏄惁", width = 15) + @ApiModelProperty(value = "鍙樺姩鍥犵礌 鏄惁") + private String variableFactors; + /**鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��*/ + @Excel(name = "鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��", width = 15) + @ApiModelProperty(value = "鍙樺姩鍥犵礌鍐呭 鍒�鍏锋洿鎹€�佸伐鑹烘洿鏀广�佸姞宸ョ▼搴忔洿鏀广�佸垁鍏疯ˉ鍋垮�兼洿鏀广��") + private String variableFactorsValue; + /**鎵ц绋嬪簭*/ + @Excel(name = "鎵ц绋嬪簭", width = 15) + @ApiModelProperty(value = "鎵ц绋嬪簭") + private String executeNc; + /**浜嬫晠鐜拌薄*/ + @Excel(name = "浜嬫晠鐜拌薄", width = 15) + @ApiModelProperty(value = "浜嬫晠鐜拌薄") + private String accidentPhenomenon; + /**閲囧彇鎺柦*/ + @Excel(name = "閲囧彇鎺柦", width = 15) + @ApiModelProperty(value = "閲囧彇鎺柦") + private String measure; + /**閫犳垚缁撴灉*/ + @Excel(name = "閫犳垚缁撴灉", width = 15) + @ApiModelProperty(value = "閫犳垚缁撴灉") + private String causingResults; +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamRepairOrderService.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamRepairOrderService.java index 4faae6e..a3417c6 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamRepairOrderService.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamRepairOrderService.java @@ -2,12 +2,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import liquibase.pro.packaged.S; +import org.jeecg.modules.eam.dto.EamRepairOrderDto; import org.jeecg.modules.eam.entity.EamRepairOrder; import com.baomidou.mybatisplus.extension.service.IService; import org.jeecg.modules.eam.request.EamRepairOrderQuery; import org.jeecg.modules.eam.request.EamRepairOrderRequest; import org.jeecg.modules.eam.request.EamRepairOrderResponse; import org.jeecg.modules.eam.request.EamReportRepairQuery; + +import java.util.List; /** * @Description: 缁翠慨宸ュ崟 @@ -25,10 +29,22 @@ IPage<EamRepairOrder> pageList(Page<EamRepairOrder> page, EamRepairOrderQuery eamRepairOrderQuery); /** - * 棰嗗彇宸ュ崟锛屽惎鍔ㄧ淮淇祦绋� - * @param eamRepairOrder + * 濉姤璇︽儏 + * @param id */ - void saveRepairOrder(EamRepairOrder eamRepairOrder); + List<EamRepairOrderDto> queryByReportId(String id); + + /** + * 濉姤缁翠慨宸ュ崟 + * @param eamRepairOrderDto + */ + boolean report(EamRepairOrderDto eamRepairOrderDto); + + /** + * 棰嗗彇宸ュ崟锛屽惎鍔ㄧ淮淇祦绋� + * @param id + */ + void saveRepairOrder(String id); /** * 娴佺▼鎿嶄綔 @@ -38,10 +54,4 @@ EamRepairOrder perform(EamRepairOrderRequest request); EamRepairOrderResponse findById(String id); - - /** - * 鎸囨淳 - * @param eamReportRepairQuery - */ - void assign(EamReportRepairQuery eamReportRepairQuery); } diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamRepairPersonService.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamRepairPersonService.java new file mode 100644 index 0000000..62b873f --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamRepairPersonService.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.eam.service; + +import org.jeecg.modules.eam.entity.EamRepairPerson; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 鏁呴殰缁翠慨浜哄憳 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +public interface IEamRepairPersonService extends IService<EamRepairPerson> { + + +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportAccidentsRegisterService.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportAccidentsRegisterService.java new file mode 100644 index 0000000..adfdd85 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportAccidentsRegisterService.java @@ -0,0 +1,49 @@ +package org.jeecg.modules.eam.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.eam.dto.EamReportAccidentsRegisterDto; +import org.jeecg.modules.eam.entity.EamRepairOrder; +import org.jeecg.modules.eam.entity.EamReportAccidentsRegister; +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.eam.request.EamRepairOrderQuery; +import org.jeecg.modules.eam.request.EamReportAccidentsRegisterQuery; + +/** + * @Description: 璁惧浜嬫晠鐧昏琛� + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +public interface IEamReportAccidentsRegisterService extends IService<EamReportAccidentsRegister> { + + /** + * 鍒嗛〉鍒楄〃 + * @param page + * @param eamReportAccidentsRegisterQuery + * @return + */ + IPage<EamReportAccidentsRegisterQuery> pageList(Page<EamReportAccidentsRegisterQuery> page, EamReportAccidentsRegisterQuery eamReportAccidentsRegisterQuery); + + /** + * 濉姤鏁版嵁 + * @param eamReportAccidentsRegisterDto + * @return + */ + boolean report(EamReportAccidentsRegisterDto eamReportAccidentsRegisterDto); + + /** + * 鎿嶄綔宸ユ彁浜�-鍙戣捣娴佺▼ + * @param id + * @return + */ + Result<?> submit(String id); + + /** + * 鍒犻櫎 + * @param id + * @return + */ + boolean cancelled(String id); +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportProductHazardsService.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportProductHazardsService.java new file mode 100644 index 0000000..69f4213 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportProductHazardsService.java @@ -0,0 +1,48 @@ +package org.jeecg.modules.eam.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.eam.dto.EamReportProductHazardsDto; +import org.jeecg.modules.eam.entity.EamReportProductHazards; +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.eam.request.EamReportAccidentsRegisterQuery; +import org.jeecg.modules.eam.request.EamReportProductHazardsQuery; + +/** + * @Description: 浜у搧瀹夊叏闅愭偅纭 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +public interface IEamReportProductHazardsService extends IService<EamReportProductHazards> { + + /** + * 鍒嗛〉鍒楄〃 + * @param page + * @param eamReportProductHazardsQuery + * @return + */ + IPage<EamReportProductHazardsQuery> pageList(Page<EamReportProductHazardsQuery> page, EamReportProductHazardsQuery eamReportProductHazardsQuery); + + /** + * 鎿嶄綔宸ュ~鎶� + * @param eamReportProductHazardsDto + * @return + */ + boolean report(EamReportProductHazardsDto eamReportProductHazardsDto); + + /** + * 鎿嶄綔宸ユ彁浜�-鍙戣捣娴佺▼ + * @param id + * @return + */ + Result<?> submit(String id); + + /** + * 鍒犻櫎 + * @param id + * @return + */ + boolean cancelled(String id); +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportRepairService.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportRepairService.java index 9fa9dfd..c6252d3 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportRepairService.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportRepairService.java @@ -3,8 +3,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.eam.dto.EamReportRepairDto; import org.jeecg.modules.eam.entity.*; import org.jeecg.modules.eam.request.EamReportRepairQuery; +import org.jeecg.modules.eam.request.EamReportRepairRequest; import java.util.List; @@ -21,7 +23,7 @@ * @param eamReportRepairQuery * @return */ - IPage<EamReportRepair> pageList(Page<EamReportRepair> page, EamReportRepairQuery eamReportRepairQuery); + IPage<EamReportRepairDto> pageList(Page<EamReportRepairDto> page, EamReportRepairQuery eamReportRepairQuery); /** * 浠庡懆淇濅腑鐢熸垚鎶ヤ慨 @@ -40,17 +42,17 @@ /** * 鏁呴殰淇濅慨 - * @param eamReportRepair + * @param eamReportRepairRequest * @return */ - EamReportRepair add(EamReportRepair eamReportRepair); + EamReportRepair add(EamReportRepairRequest eamReportRepairRequest); /** * 缂栬緫 - * @param eamReportRepair + * @param eamReportRepairDto * @return */ - boolean edit(EamReportRepair eamReportRepair); + boolean edit(EamReportRepairDto eamReportRepairDto); /** * 浠庝簩淇濅腑鐢熸垚鎶ヤ慨 diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportThreeNoSpareService.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportThreeNoSpareService.java new file mode 100644 index 0000000..33e4793 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportThreeNoSpareService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.eam.service; + +import org.jeecg.modules.eam.entity.EamReportThreeNoSpare; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +public interface IEamReportThreeNoSpareService extends IService<EamReportThreeNoSpare> { + +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java index 43b4479..92eb973 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java @@ -1,18 +1,15 @@ package org.jeecg.modules.eam.service.impl; - -import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.flowable.engine.TaskService; import org.flowable.task.api.Task; -import org.jeecg.common.api.vo.FileUploadResult; import org.jeecg.common.api.vo.Result; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.DataBaseConstant; @@ -21,18 +18,17 @@ import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.eam.aspect.annotation.EquipmentHistoryLog; import org.jeecg.modules.eam.constant.*; +import org.jeecg.modules.eam.dto.EamRepairOrderDto; import org.jeecg.modules.eam.entity.EamEquipment; import org.jeecg.modules.eam.entity.EamRepairOrder; +import org.jeecg.modules.eam.entity.EamRepairPerson; import org.jeecg.modules.eam.entity.EamReportRepair; import org.jeecg.modules.eam.mapper.EamRepairOrderMapper; import org.jeecg.modules.eam.request.EamRepairOrderQuery; import org.jeecg.modules.eam.request.EamRepairOrderRequest; import org.jeecg.modules.eam.request.EamRepairOrderResponse; import org.jeecg.modules.eam.request.EamReportRepairQuery; -import org.jeecg.modules.eam.service.IEamEquipmentExtendService; -import org.jeecg.modules.eam.service.IEamEquipmentService; -import org.jeecg.modules.eam.service.IEamRepairOrderService; -import org.jeecg.modules.eam.service.IEamReportRepairService; +import org.jeecg.modules.eam.service.*; import org.jeecg.modules.eam.util.DateUtils; import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness; import org.jeecg.modules.flowable.apithird.business.service.IFlowMyBusinessService; @@ -40,6 +36,10 @@ import org.jeecg.modules.flowable.apithird.service.FlowCommonService; import org.jeecg.modules.flowable.service.IFlowDefinitionService; import org.jeecg.modules.flowable.service.IFlowTaskService; +import org.jeecg.modules.system.entity.BaseFactory; +import org.jeecg.modules.system.entity.BaseFactoryUser; +import org.jeecg.modules.system.service.IBaseFactoryService; +import org.jeecg.modules.system.service.IBaseFactoryUserService; import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; import org.jeecg.modules.system.service.ISysUserService; import org.jeecg.modules.system.vo.UserSelector; @@ -66,9 +66,6 @@ private FlowCommonService flowCommonService; @Resource - private ISysBusinessCodeRuleService businessCodeRuleService; - - @Resource private IEamReportRepairService eamReportRepairService; @Resource @@ -92,6 +89,15 @@ @Autowired private ISysUserService sysUserService; + @Autowired + private IBaseFactoryService baseFactoryService; + + @Autowired + private IBaseFactoryUserService baseFactoryUserService; + + @Autowired + private IEamRepairPersonService iEamRepairPersonService; + /** * 鍒嗛〉鍒楄〃 * @@ -108,13 +114,21 @@ if (sysUser == null) { return page; } - if (StringUtils.isNotBlank(sysUser.getEquipmentIds())) { + if (StringUtils.isNotBlank(sysUser.getEamEquipmentIds())) { //閫夋嫨浜嗚澶囷紝鏍规嵁璁惧id杩囨护璁惧 - List<String> equipArr = Arrays.asList(sysUser.getEquipmentIds().split(",")); + List<String> equipArr = Arrays.asList(sysUser.getEamEquipmentIds().split(",")); queryWrapper.in("e.equipment_code", equipArr); } else { - //娌℃湁閫夋嫨璁惧锛屾牴鎹溅闂磋繃婊よ澶� - queryWrapper.exists("select 1 from mdc_user_production t where t.user_id={0} and t.pro_id=e.org_id ", sysUser.getId()); + //娌℃湁閫夋嫨璁惧锛屾牴鎹腑蹇冭繃婊よ澶� + List<BaseFactoryUser> baseFactoryUserList = baseFactoryUserService. + list(new LambdaQueryWrapper<BaseFactoryUser>().eq(BaseFactoryUser::getUserId, sysUser.getId())); + if (!CollectionUtils.isEmpty(baseFactoryUserList)) { + Set<String> factoryIds = baseFactoryUserList.stream().map(BaseFactoryUser::getFactoryId).collect(Collectors.toSet()); + Set<String> factoryCode = baseFactoryService.listByIds(factoryIds).stream().map(BaseFactory::getOrgCode).collect(Collectors.toSet()); + queryWrapper.in("e.factory_org_code", factoryCode); + } else { + return page; + } } //鏌ヨ鏉′欢杩囨护 if (query != null) { @@ -130,15 +144,9 @@ if (StringUtils.isNotBlank(query.getRepairStatus())) { queryWrapper.eq("wmo.repair_status", query.getRepairStatus()); } - if (StringUtils.isNotBlank(query.getRepairer())) { - queryWrapper.like("wmo.repairer", query.getRepairer()); - } if (StringUtils.isNotBlank(query.getRepairCode())) { queryWrapper.like("wmo.repair_code", query.getRepairCode()); } -// if(query.getStartTime() != null && query.getEndTime() != null) { -// queryWrapper.between("wmo.fault_start_time", query.getStartTime(), query.getEndTime()); -// } //鎺掑簭 if (StringUtils.isNotBlank(query.getColumn()) && StringUtils.isNotBlank(query.getOrder())) { String column = query.getColumn(); @@ -160,91 +168,105 @@ return baseMapper.queryPageList(page, queryWrapper); } + /** + * 濉姤璇︽儏 + * @param id + */ @Override - @Transactional(rollbackFor = Exception.class) - public void saveRepairOrder(EamRepairOrder eamRepairOrder) { - String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.REPAIR_ORDER_CODE_RULE); - eamRepairOrder.setRepairCode(codeSeq); - EamReportRepair eamReportRepair = eamReportRepairService.getById(eamRepairOrder.getReportId()); - if(eamReportRepair == null){ - throw new JeecgBootException("鏁呴殰鎶ヤ慨涓嶅瓨鍦紝璇峰埛鏂伴噸璇曪紒"); + public List<EamRepairOrderDto> queryByReportId(String id){ + List<EamRepairOrder> eamRepairOrders=this.list( + new QueryWrapper<EamRepairOrder>().eq("id",id)); + List<EamRepairOrderDto> eamRepairOrderDtoList=new ArrayList<>(); + if (CollectionUtils.isEmpty(eamRepairOrders)) { + return null; + }else { + eamRepairOrders.forEach(eamRepairOrder->{ + EamRepairOrderDto eamRepairOrderDto=new EamRepairOrderDto(); + BeanUtils.copyProperties(eamRepairOrder,eamRepairOrderDto); + List<EamRepairPerson> eamRepairPersonList=iEamRepairPersonService.list( + new QueryWrapper<EamRepairPerson>().eq("repair_id",eamRepairOrder.getId())); + eamRepairOrderDto.setEamRepairPersonList(eamRepairPersonList); + eamRepairOrderDtoList.add(eamRepairOrderDto); + }); } - eamRepairOrder.setDelFlag(CommonConstant.DEL_FLAG_0); - eamRepairOrder.setEquipmentId(eamReportRepair.getEquipmentId()); - eamRepairOrder.setRepairStatus(ReportRepairEnum.WAIT_INTERNAL_CONFIRM.name()); - eamRepairOrder.setActualStartTime(DateUtils.getNow()); - LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - eamRepairOrder.setRepairer(user.getUsername()); - super.save(eamRepairOrder); - EamEquipment eamEquipment = eamEquipmentService.getById(eamReportRepair.getEquipmentId()); - // 鍚姩缁翠慨娴佺▼ - flowCommonService.initActBusiness("宸ュ崟鍙凤細" + codeSeq + ", 璁惧缂栧彿锛�" + eamEquipment.getEquipmentCode() + ";瀹夎浣嶇疆: " + eamEquipment.getInstallationPosition(), - eamRepairOrder.getId(), - "IEamRepairOrderService", - "eam_repair", - null); - Map<String, Object> variables = new HashMap<>(); - variables.put("dataId", eamRepairOrder.getId()); - variables.put("organization", "缁翠慨宸ュ崟鍚姩娴佺▼"); - variables.put("comment", "缁翠慨宸ュ崟鍚姩娴佺▼"); - variables.put("proofreading", true); - List<String> usernames = new ArrayList<>(); - usernames.add(user.getUsername()); - variables.put("NextAssignee", usernames); - Result result = flowDefinitionService.startProcessInstanceByKey("eam_repair", variables); - if (!result.isSuccess()) { - super.removeById(eamRepairOrder); - } else { - eamReportRepair.setReportStatus(ReportRepairEnum.WAIT_INTERNAL_CONFIRM.name()); - eamReportRepairService.updateById(eamReportRepair); - //鏇存柊璁惧缁翠慨鐘舵�� - eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.UNDER_REPAIR.name()); - } + return eamRepairOrderDtoList; } /** - * 鎸囨淳 - * @param eamReportRepairQuery + * 濉姤缁翠慨宸ュ崟 + * @param eamRepairOrderDto */ @Override @Transactional(rollbackFor = Exception.class) - public void assign(EamReportRepairQuery eamReportRepairQuery) { - EamRepairOrder eamRepairOrder = new EamRepairOrder(); - String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.REPAIR_ORDER_CODE_RULE); - eamRepairOrder.setRepairCode(codeSeq); - EamReportRepair eamReportRepair = eamReportRepairService.getById(eamReportRepairQuery.getId()); - if(eamReportRepair == null){ - throw new JeecgBootException("鏁呴殰鎶ヤ慨涓嶅瓨鍦紝璇峰埛鏂伴噸璇曪紒"); + public boolean report(EamRepairOrderDto eamRepairOrderDto){ + EamRepairOrder eamRepairOrder=this.getById(eamRepairOrderDto.getId()); + if (eamRepairOrder==null){ + return false; } - eamRepairOrder.setDelFlag(CommonConstant.DEL_FLAG_0); - eamRepairOrder.setEquipmentId(eamReportRepair.getEquipmentId()); - eamRepairOrder.setRepairStatus(ReportRepairEnum.WAIT_INTERNAL_CONFIRM.name()); - eamRepairOrder.setActualStartTime(DateUtils.getNow()); - eamRepairOrder.setRepairer(eamReportRepairQuery.getRepairer()); - super.save(eamRepairOrder); - EamEquipment eamEquipment = eamEquipmentService.getById(eamReportRepair.getEquipmentId()); + BeanUtils.copyProperties(eamRepairOrderDto,eamRepairOrder); + eamRepairOrder.setRepairStatus(EamRepairOrderRepairStatusEnum.UNDER_MAINTENANCE.name()); + this.updateById(eamRepairOrder); + EamReportRepair eamReportRepair=eamReportRepairService.getById(eamRepairOrder.getReportId()); + if (eamReportRepair==null){ + return false; + } + eamReportRepair.setReportStatus(EamRepairOrderRepairStatusEnum.UNDER_MAINTENANCE.name()); + eamReportRepairService.updateById(eamReportRepair); + iEamRepairPersonService.remove(new QueryWrapper<EamRepairPerson>().eq("repair_id",eamRepairOrderDto.getId())); + if(CollectionUtils.isNotEmpty(eamRepairOrderDto.getEamRepairPersonList())) { + List<EamRepairPerson> persons = eamRepairOrderDto.getEamRepairPersonList().stream() + .map(person -> new EamRepairPerson() + .setRepairId(eamRepairOrder.getId()) + .setDelFlag(CommonConstant.DEL_FLAG_0)) + .collect(Collectors.toList()); + iEamRepairPersonService.saveBatch(persons); + } + return true; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveRepairOrder(String id) { + EamRepairOrder eamRepairOrder = this.getById(id); + List<EamRepairPerson> eamRepairPersonList=iEamRepairPersonService.list( + new QueryWrapper<EamRepairPerson>().eq("repair_id",eamRepairOrder.getId())); + if (CollectionUtils.isEmpty(eamRepairPersonList)) { + throw new RuntimeException("缁翠慨浜哄憳涓嶈兘涓虹┖"); + } + if (StrUtil.isEmpty(eamRepairOrder.getRepairCode())) {} + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + EamEquipment eamEquipment = eamEquipmentService.getById(eamRepairOrder.getEquipmentId()); + List<UserSelector> userSelectorList = sysUserService.selectOperatorList(eamEquipment.getEquipmentCode(), eamEquipment.getFactoryOrgCode(), BusinessCodeConst.PCR0001); // 鍚姩缁翠慨娴佺▼ - flowCommonService.initActBusiness("宸ュ崟鍙凤細" + codeSeq + ", 璁惧缂栧彿锛�" + eamEquipment.getEquipmentCode() + ";瀹夎浣嶇疆: " + eamEquipment.getInstallationPosition(), + flowCommonService.initActBusiness("宸ュ崟鍙凤細" + eamRepairOrder.getRepairCode() + ", 璁惧缂栧彿锛�" + eamEquipment.getEquipmentCode()+"鍙戣捣缁翠慨娴佺▼", eamRepairOrder.getId(), "IEamRepairOrderService", - "eam_repair", + "repair_work_order", null); Map<String, Object> variables = new HashMap<>(); variables.put("dataId", eamRepairOrder.getId()); variables.put("organization", "缁翠慨宸ュ崟鍚姩娴佺▼"); variables.put("comment", "缁翠慨宸ュ崟鍚姩娴佺▼"); variables.put("proofreading", true); - List<String> usernames = new ArrayList<>(); - usernames.add(eamReportRepairQuery.getRepairer()); - variables.put("NextAssignee", usernames); - Result result = flowDefinitionService.startProcessInstanceByKey("eam_repair", variables); + if (CollectionUtils.isEmpty(userSelectorList)) { + throw new JeecgBootException("璁惧鏈瓨鍦ㄦ搷浣滃憳锛屾棤娉曡繘鍏ヤ笅绾у鎵癸紒"); + }else { + List<String> usernameList = userSelectorList.stream().map(UserSelector::getUsername).collect(Collectors.toList()); + variables.put("NextAssignee", usernameList); + } + Result result = flowDefinitionService.startProcessInstanceByKey("repair_work_order", variables); if (!result.isSuccess()) { super.removeById(eamRepairOrder); } else { - eamReportRepair.setReportStatus(ReportRepairEnum.WAIT_INTERNAL_CONFIRM.name()); + eamRepairOrder.setRepairConfirm(user.getUsername()); + eamRepairOrder.setRepairConfirmTime(new Date()); + eamRepairOrder.setRepairStatus(EamRepairOrderRepairStatusEnum.PENDING_CONFIRMATION.name()); + this.updateById(eamRepairOrder); + EamReportRepair eamReportRepair=eamReportRepairService.getById(eamRepairOrder.getReportId()); + eamReportRepair.setReportStatus(EamRepairOrderRepairStatusEnum.UNDER_MAINTENANCE.name()); eamReportRepairService.updateById(eamReportRepair); //鏇存柊璁惧缁翠慨鐘舵�� - eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.UNDER_REPAIR.name()); + eamEquipmentExtendService.updateEquipmentRepairStatus(eamRepairOrder.getEquipmentId(), EquipmentRepairStatus.UNDER_REPAIR.name()); } } @@ -261,10 +283,6 @@ EamRepairOrder order = this.baseMapper.selectById(request.getId()); if (order == null) { throw new JeecgBootException("缁翠慨宸ュ崟涓嶅瓨鍦紝璇峰埛鏂伴噸璇曪紒"); - } - EamReportRepair eamReportRepair = eamReportRepairService.getById(order.getReportId()); - if (eamReportRepair == null) { - throw new JeecgBootException("鏁呴殰鎶ヤ慨涓嶅瓨鍦紝璇峰埛鏂伴噸璇曪紒"); } // 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); @@ -289,214 +307,34 @@ if (equipment == null) { throw new JeecgBootException("璁惧涓嶅瓨鍦紝璇锋鏌ワ紒"); } - - ReportRepairEnum status = ReportRepairEnum.getInstance(order.getRepairStatus()); - if (status == null) { - throw new JeecgBootException("宸ュ崟鐘舵�佷笉鍚堟硶锛岃妫�鏌ワ紒"); - } //娴佺▼鍙橀噺 Map<String, Object> values = new HashMap<>(); - List<UserSelector> userSelectors; - List<String> userApprovalList; - switch (status) { - case WAIT_INTERNAL_CONFIRM: - order.setRepairConfirm(request.getRepairConfirm()); - order.setRepairConfirmComment(request.getRepairConfirmComment()); - order.setRepairConfirmTime(new Date()); - values.put("dataId", order.getId()); - values.put("repairConfirm", request.getRepairConfirm()); - if(StringUtils.isNotBlank(request.getRepairConfirmComment())){ - values.put("organization", request.getRepairConfirmComment()); - values.put("comment", request.getRepairConfirmComment()); - request.setComment(request.getRepairConfirmComment()); - }else { - values.put("organization", "缁翠慨宸ュ崟缁翠慨浜虹‘璁ゅ畬鎴�"); - values.put("comment", "缁翠慨宸ュ崟缁翠慨浜虹‘璁ゅ畬鎴�"); - request.setComment("缁翠慨宸ュ崟缁翠慨浜虹‘璁ゅ畬鎴�"); - } - if(CommonConstant.STATUS_1.equals(request.getRepairConfirm())) { - //鍙唴閮ㄧ淮淇� 缁翠慨浜鸿繘琛岀淮淇� - values.put("NextAssignee", Arrays.asList(order.getRepairer().split(","))); - - order.setRepairStatus(ReportRepairEnum.UNDER_INTERNAL_REPAIR.name()); - eamReportRepair.setReportStatus(ReportRepairEnum.UNDER_INTERNAL_REPAIR.name()); - }else { - //鎻愪氦鏈哄姩鍔炵淮淇紝杞﹂棿绠$悊鍛樼‘璁� - userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), null, BusinessCodeConst.PCR0003); - if (CollectionUtil.isEmpty(userSelectors)) { - throw new JeecgBootException("璁惧鏈垎閰嶇粰鐝粍闀匡紝鏃犳硶杩涘叆涓嬬骇瀹℃壒锛�"); - } - userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); - values.put("NextAssignee", userApprovalList); - order.setRepairStatus(ReportRepairEnum.WAIT_LEADER_CONFIRM.name()); - eamReportRepair.setReportStatus(ReportRepairEnum.WAIT_LEADER_CONFIRM.name()); - } - break; - case UNDER_INTERNAL_REPAIR: - // 鍐呴儴缁翠慨 - values.put("dataId", order.getId()); - values.put("organization", "缁翠慨宸ュ崟缁翠慨瀹屾垚寰呮搷浣滃伐纭"); - values.put("comment", "缁翠慨宸ュ崟缁翠慨瀹屾垚寰呮搷浣滃伐纭"); - values.put("NextAssignee", Arrays.asList(eamReportRepair.getCreateBy().split(","))); - request.setComment("缁翠慨宸ュ崟缁翠慨瀹屾垚寰呮搷浣滃伐纭"); - order.setRepairStatus(ReportRepairEnum.WAIT_CONFIRM.name()); - eamReportRepair.setReportStatus(ReportRepairEnum.WAIT_CONFIRM.name()); - order.setFaultReason(request.getFaultReason()); - order.setRepairDescription(request.getRepairDescription()); - order.setActualEndTime(new Date()); - // 澶勭悊闄勪欢 - if (CollectionUtil.isNotEmpty(request.getImageFilesResult())) { - List<FileUploadResult> fileUploadResultList = request.getImageFilesResult(); - ObjectMapper mapper = new ObjectMapper(); - try { - String referenceFile = mapper.writeValueAsString(fileUploadResultList); - order.setImageFiles(referenceFile); - } catch (JsonProcessingException e) { - log.error("JSON杞崲澶辫触锛�" + e.getMessage(), e); - } - } - //鏇存柊璁惧缁翠慨鐘舵�� - eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.WAIT_CONFIRM.name()); - break; - case WAIT_LEADER_CONFIRM: - order.setLeaderConfirm(request.getLeaderConfirm()); - order.setLeaderConfirmComment(request.getLeaderConfirmComment()); - order.setLeaderUser(user.getUsername()); - order.setLeaderConfirmTime(new Date()); - values.put("dataId", order.getId()); - values.put("leaderConfirm", request.getLeaderConfirm()); - if(StringUtils.isNotBlank(request.getLeaderConfirmComment())){ - values.put("organization", request.getLeaderConfirmComment()); - values.put("comment", request.getLeaderConfirmComment()); - request.setComment(request.getLeaderConfirmComment()); - }else { - values.put("organization", "缁翠慨宸ュ崟棰嗗纭瀹屾垚"); - values.put("comment", "缁翠慨宸ュ崟棰嗗纭瀹屾垚"); - request.setComment("缁翠慨宸ュ崟棰嗗纭瀹屾垚"); - } - if(CommonConstant.STATUS_1.equals(request.getLeaderConfirm())) { - //閫氳繃 鎻愪氦鏈哄姩鍔炵淮淇� - userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), null, BusinessCodeConst.PCR0006); - if (CollectionUtil.isEmpty(userSelectors)) { - throw new JeecgBootException("璁惧鏈垎閰嶇粰鍏徃绠$悊鍛橈紝鏃犳硶杩涘叆涓嬬骇瀹℃壒锛�"); - } - userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); - values.put("NextAssignee", userApprovalList); - order.setRepairStatus(ReportRepairEnum.WAIT_EXTERNAL_CONFIRM.name()); - eamReportRepair.setReportStatus(ReportRepairEnum.WAIT_EXTERNAL_CONFIRM.name()); - }else { - //椹冲洖 鍙唴閮ㄧ淮淇� 缁翠慨浜鸿繘琛岀淮淇� - values.put("NextAssignee", Arrays.asList(order.getRepairer().split(","))); - order.setRepairStatus(ReportRepairEnum.UNDER_INTERNAL_REPAIR.name()); - eamReportRepair.setReportStatus(ReportRepairEnum.UNDER_INTERNAL_REPAIR.name()); - } - break; - case WAIT_EXTERNAL_CONFIRM: - order.setExternalConfirm(request.getExternalConfirm()); - order.setExternalConfirmComment(request.getExternalConfirmComment()); - order.setExternalRepairer(user.getUsername()); - order.setExternalConfirmTime(new Date()); - values.put("dataId", order.getId()); - values.put("externalConfirm", request.getExternalConfirm()); - if(StringUtils.isNotBlank(request.getExternalConfirmComment())){ - values.put("organization", request.getExternalConfirmComment()); - values.put("comment", request.getExternalConfirmComment()); - request.setComment(request.getExternalConfirmComment()); - }else { - values.put("organization", "缁翠慨宸ュ崟鏈哄姩鍔炵‘璁ゅ畬鎴�"); - values.put("comment", "缁翠慨宸ュ崟鏈哄姩鍔炵‘璁ゅ畬鎴�"); - request.setComment("缁翠慨宸ュ崟鏈哄姩鍔炵‘璁ゅ畬鎴�"); - } - if(CommonConstant.STATUS_1.equals(request.getExternalConfirm())) { - //鏈哄姩鍔炲彲缁翠慨 鏈哄姩鍔炵淮淇汉杩涜缁翠慨 - values.put("NextAssignee", Arrays.asList(order.getExternalRepairer().split(","))); - order.setRepairStatus(ReportRepairEnum.UNDER_EXTERNAL_REPAIR.name()); - eamReportRepair.setReportStatus(ReportRepairEnum.UNDER_EXTERNAL_REPAIR.name()); - }else { - //鏈哄姩鍔炰笉鍙淮淇� 杩涜濮斿缁翠慨 - values.put("NextAssignee", Arrays.asList(order.getExternalRepairer().split(","))); - order.setRepairStatus(ReportRepairEnum.UNDER_OUTSIDE_REPAIR.name()); - eamReportRepair.setReportStatus(ReportRepairEnum.UNDER_OUTSIDE_REPAIR.name()); - } - break; - case UNDER_EXTERNAL_REPAIR: - // 鏈哄姩鍔炵淮淇� - values.put("dataId", order.getId()); - values.put("organization", "缁翠慨宸ュ崟鏈哄姩鍔炵淮淇畬鎴愬緟鎿嶄綔宸ョ‘璁�"); - values.put("comment", "缁翠慨宸ュ崟鏈哄姩鍔炵淮淇畬鎴愬緟鎿嶄綔宸ョ‘璁�"); - values.put("NextAssignee", Arrays.asList(eamReportRepair.getCreateBy().split(","))); - request.setComment("缁翠慨宸ュ崟鏈哄姩鍔炵淮淇畬鎴愬緟鎿嶄綔宸ョ‘璁�"); - order.setRepairStatus(ReportRepairEnum.WAIT_CONFIRM.name()); - eamReportRepair.setReportStatus(ReportRepairEnum.WAIT_CONFIRM.name()); - order.setFaultReason(request.getFaultReason()); - order.setRepairDescription(request.getRepairDescription()); - order.setActualEndTime(new Date()); - // 澶勭悊闄勪欢 - if (CollectionUtil.isNotEmpty(request.getImageFilesResult())) { - List<FileUploadResult> fileUploadResultList = request.getImageFilesResult(); - ObjectMapper mapper = new ObjectMapper(); - try { - String referenceFile = mapper.writeValueAsString(fileUploadResultList); - order.setImageFiles(referenceFile); - } catch (JsonProcessingException e) { - log.error("JSON杞崲澶辫触锛�" + e.getMessage(), e); - } - } - //鏇存柊璁惧缁翠慨鐘舵�� - eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.WAIT_CONFIRM.name()); - break; - case UNDER_OUTSIDE_REPAIR: - // 鏈哄姩鍔炵淮淇� - values.put("dataId", order.getId()); - values.put("organization", "缁翠慨宸ュ崟濮斿缁翠慨瀹屾垚寰呮搷浣滃伐纭"); - values.put("comment", "缁翠慨宸ュ崟濮斿缁翠慨瀹屾垚寰呮搷浣滃伐纭"); - values.put("NextAssignee", Arrays.asList(eamReportRepair.getCreateBy().split(","))); - request.setComment("缁翠慨宸ュ崟濮斿缁翠慨瀹屾垚寰呮搷浣滃伐纭"); - order.setRepairStatus(ReportRepairEnum.WAIT_CONFIRM.name()); - order.setOutsourcedUser(user.getUsername()); - eamReportRepair.setReportStatus(ReportRepairEnum.WAIT_CONFIRM.name()); - order.setFaultReason(request.getFaultReason()); - order.setRepairDescription(request.getRepairDescription()); - order.setActualEndTime(new Date()); - // 澶勭悊闄勪欢 - if (CollectionUtil.isNotEmpty(request.getImageFilesResult())) { - List<FileUploadResult> fileUploadResultList = request.getImageFilesResult(); - ObjectMapper mapper = new ObjectMapper(); - try { - String referenceFile = mapper.writeValueAsString(fileUploadResultList); - order.setImageFiles(referenceFile); - } catch (JsonProcessingException e) { - log.error("JSON杞崲澶辫触锛�" + e.getMessage(), e); - } - } - //鏇存柊璁惧缁翠慨鐘舵�� - eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.WAIT_CONFIRM.name()); - break; - case WAIT_CONFIRM: - // 寰呯‘璁�, 缁翠慨鍛樼淮淇畬鎴愶紝鎶ヤ慨浜虹‘璁ょ粨鏉熸祦绋� - values.put("dataId", order.getId()); - values.put("organization", "缁翠慨宸ュ崟娴佺▼缁撴潫"); - values.put("comment", "缁翠慨宸ュ崟娴佺▼缁撴潫"); - request.setComment("缁翠慨宸ュ崟娴佺▼缁撴潫"); - order.setRepairStatus(ReportRepairEnum.COMPLETE.name()); - eamReportRepair.setReportStatus(ReportRepairEnum.COMPLETE.name()); - order.setConfirmComment(request.getConfirmComment()); - order.setConfirmTime(new Date()); - order.setConfirmer(user.getUsername()); - //鏇存柊璁惧缁翠慨鐘舵�� - eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.NORMAL.name()); - break; - } + values.put("dataId", request.getId()); + values.put("assignee", user.getId()); + values.put("organization", request.getConfirmComment()); + values.put("comment", request.getConfirmComment()); + request.setComment(request.getConfirmComment()); request.setValues(values); - // 瀹屾垚娴佺▼浠诲姟 Result result = flowTaskService.complete(request); if (!result.isSuccess()) { throw new JeecgBootException("瀹℃壒澶辫触锛岃鍒锋柊鏌ョ湅锛�"); } //淇濆瓨宸ュ崟 + if (request.getConfirmResult() != null) { + if ("1".equals(request.getConfirmResult())) { + order.setRepairStatus(EamRepairOrderRepairStatusEnum.REPAIR_COMPLETED.name()); + }else { + order.setRepairStatus(EamRepairOrderRepairStatusEnum.UNDER_MAINTENANCE.name()); + } + } + order.setConfirmer(user.getUsername()); + order.setConfirmTime(new Date()); + order.setConfirmResult(request.getConfirmResult()); + order.setConfirmComment(request.getConfirmComment()); this.baseMapper.updateById(order); - // 鍚屾鏇存柊鎶ヤ慨琛ㄧ姸鎬� + EamReportRepair eamReportRepair=eamReportRepairService.getById(order.getReportId()); + eamReportRepair.setReportStatus(EamRepairOrderRepairStatusEnum.UNDER_MAINTENANCE.name()); eamReportRepairService.updateById(eamReportRepair); return order; } @@ -508,8 +346,6 @@ BeanUtils.copyProperties(eamRepairOrder, eamRepairOrderResponse); EamReportRepair eamReportRepair = eamReportRepairService.getById(eamRepairOrder.getReportId()); BeanUtils.copyProperties(eamReportRepair, eamRepairOrderResponse); - eamRepairOrderResponse.setReportImageFiles(eamReportRepair.getImageFiles()); - eamRepairOrderResponse.setImageFiles(eamRepairOrder.getImageFiles()); return eamRepairOrderResponse; } diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairPersonServiceImpl.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairPersonServiceImpl.java new file mode 100644 index 0000000..aed46a2 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairPersonServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.eam.service.impl; + +import org.jeecg.modules.eam.entity.EamRepairPerson; +import org.jeecg.modules.eam.mapper.EamRepairPersonMapper; +import org.jeecg.modules.eam.service.IEamRepairPersonService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 鏁呴殰缁翠慨浜哄憳 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Service +public class EamRepairPersonServiceImpl extends ServiceImpl<EamRepairPersonMapper, EamRepairPerson> implements IEamRepairPersonService { + +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportAccidentsRegisterServiceImpl.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportAccidentsRegisterServiceImpl.java new file mode 100644 index 0000000..727163a --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportAccidentsRegisterServiceImpl.java @@ -0,0 +1,170 @@ +package org.jeecg.modules.eam.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.commons.lang3.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.constant.CommonConstant; +import org.jeecg.common.constant.DataBaseConstant; +import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.eam.dto.EamReportAccidentsRegisterDto; +import org.jeecg.modules.eam.entity.EamReportAccidentsRegister; +import org.jeecg.modules.eam.entity.EamReportProductHazards; +import org.jeecg.modules.eam.entity.EamReportRepair; +import org.jeecg.modules.eam.mapper.EamReportAccidentsRegisterMapper; +import org.jeecg.modules.eam.request.EamReportAccidentsRegisterQuery; +import org.jeecg.modules.eam.service.IEamReportAccidentsRegisterService; +import org.jeecg.modules.eam.service.IEamReportRepairService; +import org.jeecg.modules.system.entity.BaseFactory; +import org.jeecg.modules.system.entity.BaseFactoryUser; +import org.jeecg.modules.system.service.IBaseFactoryService; +import org.jeecg.modules.system.service.IBaseFactoryUserService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * @Description: 璁惧浜嬫晠鐧昏琛� + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Service +public class EamReportAccidentsRegisterServiceImpl extends ServiceImpl<EamReportAccidentsRegisterMapper, EamReportAccidentsRegister> implements IEamReportAccidentsRegisterService { + + @Autowired + private IBaseFactoryUserService baseFactoryUserService; + @Autowired + private IBaseFactoryService baseFactoryService; + @Autowired + @Lazy + private IEamReportRepairService iEamReportRepairService; + /** + * 鍒嗛〉鍒楄〃 + * @param page + * @param eamReportAccidentsRegisterQuery + * @return + */ + @Override + public IPage<EamReportAccidentsRegisterQuery> pageList(Page<EamReportAccidentsRegisterQuery> page, EamReportAccidentsRegisterQuery eamReportAccidentsRegisterQuery){ + QueryWrapper<EamReportAccidentsRegisterQuery> queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("wmo.del_flag", CommonConstant.DEL_FLAG_0); + //鐢ㄦ埛鏁版嵁鏉冮檺 + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + if (sysUser == null) { + return page; + } + if (StringUtils.isNotBlank(sysUser.getEamEquipmentIds())) { + //閫夋嫨浜嗚澶囷紝鏍规嵁璁惧id杩囨护璁惧 + List<String> equipArr = Arrays.asList(sysUser.getEamEquipmentIds().split(",")); + queryWrapper.in("e.equipment_code", equipArr); + } else { + //娌℃湁閫夋嫨璁惧锛屾牴鎹腑蹇冭繃婊よ澶� + List<BaseFactoryUser> baseFactoryUserList = baseFactoryUserService. + list(new LambdaQueryWrapper<BaseFactoryUser>().eq(BaseFactoryUser::getUserId, sysUser.getId())); + if (!CollectionUtils.isEmpty(baseFactoryUserList)) { + Set<String> factoryIds = baseFactoryUserList.stream().map(BaseFactoryUser::getFactoryId).collect(Collectors.toSet()); + Set<String> factoryCode = baseFactoryService.listByIds(factoryIds).stream().map(BaseFactory::getOrgCode).collect(Collectors.toSet()); + queryWrapper.in("e.factory_org_code", factoryCode); + } else { + return page; + } + } + //鏌ヨ鏉′欢杩囨护 + if (eamReportAccidentsRegisterQuery != null) { + if (StringUtils.isNotBlank(eamReportAccidentsRegisterQuery.getEquipmentId())) { + queryWrapper.eq("aar.equipment_id", eamReportAccidentsRegisterQuery.getEquipmentId()); + } + if (StringUtils.isNotBlank(eamReportAccidentsRegisterQuery.getEquipmentCode())) { + queryWrapper.like("e.equipment_code", eamReportAccidentsRegisterQuery.getEquipmentCode()); + } + if (StringUtils.isNotBlank(eamReportAccidentsRegisterQuery.getEquipmentName())) { + queryWrapper.like("e.equipment_name", eamReportAccidentsRegisterQuery.getEquipmentName()); + } + //鎺掑簭 + if (StringUtils.isNotBlank(eamReportAccidentsRegisterQuery.getColumn()) && StringUtils.isNotBlank(eamReportAccidentsRegisterQuery.getOrder())) { + String column = eamReportAccidentsRegisterQuery.getColumn(); + if (column.endsWith(CommonConstant.DICT_TEXT_SUFFIX)) { + column = column.substring(0, column.lastIndexOf(CommonConstant.DICT_TEXT_SUFFIX)); + } + if (DataBaseConstant.SQL_ASC.equalsIgnoreCase(eamReportAccidentsRegisterQuery.getOrder())) { + queryWrapper.orderByAsc("wmo." + oConvertUtils.camelToUnderline(column)); + } else { + queryWrapper.orderByDesc("wmo." + oConvertUtils.camelToUnderline(column)); + } + } else { + queryWrapper.orderByDesc("wmo.create_time"); + } + } else { + queryWrapper.orderByDesc("wmo.create_time"); + } + return baseMapper.queryPageList(page, queryWrapper); + } + + /** + * 濉姤鏁版嵁 + * @param eamReportAccidentsRegisterDto + * @return + */ + @Override + public boolean report(EamReportAccidentsRegisterDto eamReportAccidentsRegisterDto){ + EamReportAccidentsRegister eamReportAccidentsRegister=this.getById(eamReportAccidentsRegisterDto.getId()); + if (eamReportAccidentsRegister==null){ + return false; + } + BeanUtils.copyProperties(eamReportAccidentsRegisterDto,eamReportAccidentsRegister); + this.updateById(eamReportAccidentsRegister); + return true; + } + + /** + * 鎿嶄綔宸ユ彁浜�-鍙戣捣娴佺▼ + * @param id + * @return + */ + @Override + public Result<?> submit(String id){ + return null; + } + + /** + * 鍒犻櫎 + * @param id + * @return + */ + @Override + public boolean cancelled(String id){ + //鍙屾帶鏁呴殰鎶ヤ慨,浣滃簾鍚庢晠闅滀繚淇暟鎹悓姝ヤ慨鏀� + EamReportAccidentsRegister eamReportAccidentsRegister=this.getById(id); + if (eamReportAccidentsRegister==null){ + return false; + } + EamReportRepair eamReportRepair=iEamReportRepairService.getById(eamReportAccidentsRegister.getReportId()); + if (eamReportRepair==null) { + return false; + } + UpdateWrapper<EamReportRepair> updateWrapper = new UpdateWrapper<>(); + updateWrapper.eq("id",eamReportRepair.getId()); + updateWrapper.set("is_accidents_register","2"); + updateWrapper.set("scrap_part_number",null); + updateWrapper.set("scrap_part_quantity",null); + updateWrapper.set("scrap_part_value",null); + iEamReportRepairService.update(updateWrapper); + this.removeById(id); + return true; + } +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportProductHazardsServiceImpl.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportProductHazardsServiceImpl.java new file mode 100644 index 0000000..2d0e9f1 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportProductHazardsServiceImpl.java @@ -0,0 +1,169 @@ +package org.jeecg.modules.eam.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.commons.lang3.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.constant.CommonConstant; +import org.jeecg.common.constant.DataBaseConstant; +import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.eam.dto.EamReportProductHazardsDto; +import org.jeecg.modules.eam.entity.EamReportProductHazards; +import org.jeecg.modules.eam.entity.EamReportRepair; +import org.jeecg.modules.eam.mapper.EamReportProductHazardsMapper; +import org.jeecg.modules.eam.request.EamReportProductHazardsQuery; +import org.jeecg.modules.eam.service.IEamReportProductHazardsService; +import org.jeecg.modules.eam.service.IEamReportRepairService; +import org.jeecg.modules.system.entity.BaseFactory; +import org.jeecg.modules.system.entity.BaseFactoryUser; +import org.jeecg.modules.system.service.IBaseFactoryService; +import org.jeecg.modules.system.service.IBaseFactoryUserService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * @Description: 浜у搧瀹夊叏闅愭偅纭 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Service("IEamReportProductHazardsService") +public class EamReportProductHazardsServiceImpl extends ServiceImpl<EamReportProductHazardsMapper, EamReportProductHazards> implements IEamReportProductHazardsService { + + @Autowired + private IBaseFactoryUserService baseFactoryUserService; + @Autowired + private IBaseFactoryService baseFactoryService; + @Autowired + @Lazy + private IEamReportRepairService iEamReportRepairService; + + /** + * 鍒嗛〉鍒楄〃 + * @param page + * @param eamReportProductHazardsQuery + * @return + */ + @Override + public IPage<EamReportProductHazardsQuery> pageList(Page<EamReportProductHazardsQuery> page, EamReportProductHazardsQuery eamReportProductHazardsQuery){ + QueryWrapper<EamReportProductHazardsQuery> queryWrapper = new QueryWrapper<>(); + //鐢ㄦ埛鏁版嵁鏉冮檺 + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + if (sysUser == null) { + return page; + } + if (StringUtils.isNotBlank(sysUser.getEamEquipmentIds())) { + //閫夋嫨浜嗚澶囷紝鏍规嵁璁惧id杩囨护璁惧 + List<String> equipArr = Arrays.asList(sysUser.getEamEquipmentIds().split(",")); + queryWrapper.in("e.equipment_code", equipArr); + } else { + //娌℃湁閫夋嫨璁惧锛屾牴鎹腑蹇冭繃婊よ澶� + List<BaseFactoryUser> baseFactoryUserList = baseFactoryUserService. + list(new LambdaQueryWrapper<BaseFactoryUser>().eq(BaseFactoryUser::getUserId, sysUser.getId())); + if (!CollectionUtils.isEmpty(baseFactoryUserList)) { + Set<String> factoryIds = baseFactoryUserList.stream().map(BaseFactoryUser::getFactoryId).collect(Collectors.toSet()); + Set<String> factoryCode = baseFactoryService.listByIds(factoryIds).stream().map(BaseFactory::getOrgCode).collect(Collectors.toSet()); + queryWrapper.in("e.factory_org_code", factoryCode); + } else { + return page; + } + } + //鏌ヨ鏉′欢杩囨护 + if (eamReportProductHazardsQuery != null) { + if (StringUtils.isNotBlank(eamReportProductHazardsQuery.getEquipmentId())) { + queryWrapper.eq("erph.equipment_id", eamReportProductHazardsQuery.getEquipmentId()); + } + if (StringUtils.isNotBlank(eamReportProductHazardsQuery.getEquipmentCode())) { + queryWrapper.like("e.equipment_code", eamReportProductHazardsQuery.getEquipmentCode()); + } + if (StringUtils.isNotBlank(eamReportProductHazardsQuery.getEquipmentName())) { + queryWrapper.like("e.equipment_name", eamReportProductHazardsQuery.getEquipmentName()); + } + //鎺掑簭 + if (StringUtils.isNotBlank(eamReportProductHazardsQuery.getColumn()) && StringUtils.isNotBlank(eamReportProductHazardsQuery.getOrder())) { + String column = eamReportProductHazardsQuery.getColumn(); + if (column.endsWith(CommonConstant.DICT_TEXT_SUFFIX)) { + column = column.substring(0, column.lastIndexOf(CommonConstant.DICT_TEXT_SUFFIX)); + } + if (DataBaseConstant.SQL_ASC.equalsIgnoreCase(eamReportProductHazardsQuery.getOrder())) { + queryWrapper.orderByAsc("erph." + oConvertUtils.camelToUnderline(column)); + } else { + queryWrapper.orderByDesc("erph." + oConvertUtils.camelToUnderline(column)); + } + } else { + queryWrapper.orderByDesc("erph.create_time"); + } + } else { + queryWrapper.orderByDesc("erph.create_time"); + } + return baseMapper.queryPageList(page, queryWrapper); + } + + /** + * 鎿嶄綔宸ュ~鎶� + * @param eamReportProductHazardsDto + * @return + */ + @Override + public boolean report(EamReportProductHazardsDto eamReportProductHazardsDto){ + EamReportProductHazards eamReportProductHazards=this.getById(eamReportProductHazardsDto.getId()); + if (eamReportProductHazards==null){ + return false; + } + BeanUtils.copyProperties(eamReportProductHazardsDto,eamReportProductHazards); + this.updateById(eamReportProductHazards); + return true; + } + + /** + * 鎿嶄綔宸ユ彁浜�-鍙戣捣娴佺▼ + * @param id + * @return + */ + @Override + public Result<?> submit(String id){ + return null; + } + + /** + * 鍒犻櫎 + * @param id + * @return + */ + @Override + public boolean cancelled(String id){ + //鍙屾帶鏁呴殰鎶ヤ慨,浣滃簾鍚庢晠闅滀繚淇暟鎹悓姝ヤ慨鏀� + EamReportProductHazards eamReportProductHazards=this.getById(id); + if (eamReportProductHazards==null){ + return false; + } + EamReportRepair eamReportRepair=iEamReportRepairService.getById(eamReportProductHazards.getReportId()); + if (eamReportRepair==null) { + return false; + } + UpdateWrapper<EamReportRepair> updateWrapper = new UpdateWrapper<>(); + updateWrapper.eq("id",eamReportRepair.getId()); + updateWrapper.set("is_processed","2"); + updateWrapper.set("batch_number",null); + updateWrapper.set("processing_part",null); + updateWrapper.set("quantity",null); + iEamReportRepairService.update(updateWrapper); + this.removeById(id); + return true; + } +} diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java index 4dfe074..eb2d6fc 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java @@ -1,30 +1,43 @@ package org.jeecg.modules.eam.service.impl; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; -import org.jeecg.common.api.vo.FileUploadResult; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.DataBaseConstant; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.eam.aspect.annotation.EquipmentHistoryLog; import org.jeecg.modules.eam.constant.*; +import org.jeecg.modules.eam.dto.EamReportRepairDto; import org.jeecg.modules.eam.entity.*; import org.jeecg.modules.eam.mapper.EamReportRepairMapper; import org.jeecg.modules.eam.request.EamReportRepairQuery; -import org.jeecg.modules.eam.service.IEamEquipmentExtendService; -import org.jeecg.modules.eam.service.IEamReportRepairService; +import org.jeecg.modules.eam.request.EamReportRepairRequest; +import org.jeecg.modules.eam.service.*; +import org.jeecg.modules.system.entity.BaseFactory; +import org.jeecg.modules.system.entity.BaseFactoryUser; +import org.jeecg.modules.system.entity.SysAnnouncementSend; +import org.jeecg.modules.system.service.IBaseFactoryService; +import org.jeecg.modules.system.service.IBaseFactoryUserService; +import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.*; +import java.util.stream.Collectors; /** * @Description: 鏁呴殰鎶ヤ慨 @@ -37,6 +50,19 @@ @Resource private IEamEquipmentExtendService eamEquipmentExtendService; + @Autowired + private IBaseFactoryUserService baseFactoryUserService; + @Autowired + private IBaseFactoryService baseFactoryService; + @Autowired + private IEamReportProductHazardsService iEamReportProductHazardsService; + @Autowired + private IEamReportAccidentsRegisterService iEamReportAccidentsRegisterService; + @Autowired + @Lazy + private IEamRepairOrderService iEamRepairOrderService; + @Autowired + private ISysBusinessCodeRuleService businessCodeRuleService; /** * 鍒嗛〉鍒楄〃 * @@ -45,21 +71,29 @@ * @return */ @Override - public IPage<EamReportRepair> pageList(Page<EamReportRepair> page, EamReportRepairQuery query) { - QueryWrapper<EamReportRepair> queryWrapper = new QueryWrapper<>(); + public IPage<EamReportRepairDto> pageList(Page<EamReportRepairDto> page, EamReportRepairQuery query) { + QueryWrapper<EamReportRepairDto> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("wmo.del_flag", CommonConstant.DEL_FLAG_0); //鐢ㄦ埛鏁版嵁鏉冮檺 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); if (sysUser == null) { return page; } - if (StringUtils.isNotBlank(sysUser.getEquipmentIds())) { + if (StringUtils.isNotBlank(sysUser.getEamEquipmentIds())) { //閫夋嫨浜嗚澶囷紝鏍规嵁璁惧id杩囨护璁惧 - List<String> equipArr = Arrays.asList(sysUser.getEquipmentIds().split(",")); + List<String> equipArr = Arrays.asList(sysUser.getEamEquipmentIds().split(",")); queryWrapper.in("e.equipment_code", equipArr); } else { - //娌℃湁閫夋嫨璁惧锛屾牴鎹溅闂磋繃婊よ澶� - queryWrapper.exists("select 1 from mdc_user_production t where t.user_id={0} and t.pro_id=e.org_id ", sysUser.getId()); + //娌℃湁閫夋嫨璁惧锛屾牴鎹腑蹇冭繃婊よ澶� + List<BaseFactoryUser> baseFactoryUserList = baseFactoryUserService. + list(new LambdaQueryWrapper<BaseFactoryUser>().eq(BaseFactoryUser::getUserId, sysUser.getId())); + if (!CollectionUtils.isEmpty(baseFactoryUserList)) { + Set<String> factoryIds = baseFactoryUserList.stream().map(BaseFactoryUser::getFactoryId).collect(Collectors.toSet()); + Set<String> factoryCode = baseFactoryService.listByIds(factoryIds).stream().map(BaseFactory::getOrgCode).collect(Collectors.toSet()); + queryWrapper.in("e.factory_org_code", factoryCode); + } else { + return page; + } } //鏌ヨ鏉′欢杩囨护 if (query != null) { @@ -120,10 +154,7 @@ entity.setFaultStartTime(new Date()); entity.setBreakdownFlag(CommonConstant.DEFAULT_0); entity.setDelFlag(CommonConstant.DEL_FLAG_0); - entity.setFaultName("鍛ㄤ繚鎵ц鎶ヤ慨澶勭悊"); entity.setFaultDescription(sb.toString()); - entity.setFaultType(CommonConstant.DEFAULT_1); - entity.setReportStatus(ReportRepairEnum.WAIT_REPAIR.name()); this.baseMapper.insert(entity); //鏇存柊璁惧缁翠慨鐘舵�� eamEquipmentExtendService.updateEquipmentRepairStatus(entity.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name()); @@ -145,10 +176,7 @@ entity.setFaultStartTime(new Date()); entity.setBreakdownFlag(CommonConstant.DEFAULT_0); entity.setDelFlag(CommonConstant.DEL_FLAG_0); - entity.setFaultName("鐐规鎵ц鎶ヤ慨澶勭悊"); entity.setFaultDescription(sb.toString()); - entity.setFaultType(CommonConstant.DEFAULT_1); - entity.setReportStatus(ReportRepairEnum.WAIT_REPAIR.name()); this.baseMapper.insert(entity); //鏇存柊璁惧缁翠慨鐘舵�� eamEquipmentExtendService.updateEquipmentRepairStatus(entity.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name()); @@ -158,21 +186,37 @@ @Override @Transactional(rollbackFor = Exception.class) @EquipmentHistoryLog(operationTag = EquipmentOperationTagEnum.REPORT_REPAIR, businessTable = "eam_report_repair") - public EamReportRepair add(EamReportRepair eamReportRepair) { - eamReportRepair.setReportStatus(ReportRepairEnum.WAIT_REPAIR.name()); + public EamReportRepair add(EamReportRepairRequest eamReportRepairRequest) { + EamReportRepair eamReportRepair = new EamReportRepair(); + BeanUtils.copyProperties(eamReportRepairRequest, eamReportRepair); eamReportRepair.setDelFlag(CommonConstant.DEL_FLAG_0); - // 闄勪欢澶勭悊 - if (eamReportRepair.getImageFilesResult() != null) { - List<FileUploadResult> imageFilesResult = eamReportRepair.getImageFilesResult(); - ObjectMapper mapper = new ObjectMapper(); - try { - String referenceFile = mapper.writeValueAsString(imageFilesResult); - eamReportRepair.setImageFiles(referenceFile); - } catch (JsonProcessingException e) { - return null; - } - } + eamReportRepair.setReportStatus(EamRepairOrderRepairStatusEnum.PENDING_REPAIR.name()); this.baseMapper.insert(eamReportRepair); + if(StrUtil.isNotEmpty(eamReportRepair.getIsProcessed())&&("1").equals(eamReportRepair.getIsProcessed())){ + //娣诲姞浜у搧瀹夊叏闅愭偅纭 + EamReportProductHazards eamReportProductHazards=new EamReportProductHazards(); + eamReportProductHazards.setEquipmentId(eamReportRepair.getEquipmentId()); + eamReportProductHazards.setReportId(eamReportRepair.getId()); + iEamReportProductHazardsService.save(eamReportProductHazards); + } + if (StrUtil.isNotEmpty(eamReportRepair.getIsAccidentsRegister())&&("1").equals(eamReportRepair.getIsAccidentsRegister())) { + //娣诲姞璁惧浜嬫晠鐧昏琛� + EamReportAccidentsRegister eamReportAccidentsRegister = new EamReportAccidentsRegister(); + BeanUtils.copyProperties(eamReportRepairRequest, eamReportAccidentsRegister); + eamReportAccidentsRegister.setReportId(eamReportRepair.getId()); + eamReportAccidentsRegister.setDelFlag(CommonConstant.DEFAULT_0); + iEamReportAccidentsRegisterService.save(eamReportAccidentsRegister); + } + //鐢熸垚缁翠慨宸ュ崟,鍙兘浼氭湁棰嗗彇鎿嶄綔 + EamRepairOrder eamRepairOrder=new EamRepairOrder(); + BeanUtils.copyProperties(eamReportRepairRequest, eamRepairOrder); + String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.REPAIR_ORDER_CODE_RULE); + eamRepairOrder.setRepairCode(codeSeq); + eamRepairOrder.setId(null); + eamRepairOrder.setDelFlag(CommonConstant.DEL_FLAG_0); + eamRepairOrder.setReportId(eamReportRepair.getId()); + eamRepairOrder.setRepairStatus(EamRepairOrderRepairStatusEnum.PENDING_REPAIR.name()); + iEamRepairOrderService.save(eamRepairOrder); //鏇存柊璁惧缁翠慨鐘舵�� eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name()); return eamReportRepair; @@ -180,21 +224,47 @@ @Override @Transactional(rollbackFor = Exception.class) - public boolean edit(EamReportRepair eamReportRepair) { - // 闄勪欢澶勭悊 - if (eamReportRepair.getImageFilesResult() != null) { - List<FileUploadResult> imageFilesResult = eamReportRepair.getImageFilesResult(); - ObjectMapper mapper = new ObjectMapper(); - try { - String referenceFile = mapper.writeValueAsString(imageFilesResult); - eamReportRepair.setImageFiles(referenceFile); - } catch (JsonProcessingException e) { - return false; + public boolean edit(EamReportRepairDto eamReportRepairDto) { + LambdaUpdateWrapper<EamReportRepair> updateWrapper = new UpdateWrapper().lambda(); + EamReportRepair eamReportRepair=new EamReportRepair(); + BeanUtils.copyProperties(eamReportRepairDto, eamReportRepair); + if(StrUtil.isNotEmpty(eamReportRepairDto.getIsProcessed())){ + //todo 缂哄皯瀵瑰簲娴佺▼鍒ゆ柇 + if ("0".equals(eamReportRepairDto.getIsProcessed())) { + updateWrapper.set(EamReportRepair::getBatchNumber,null); + updateWrapper.set(EamReportRepair::getProcessingPart,null); + updateWrapper.set(EamReportRepair::getQuantity, null); } - } else { - eamReportRepair.setImageFiles(null); + //鐩存帴鍒犻櫎鍐嶆坊鍔� + iEamReportProductHazardsService.remove(new QueryWrapper<EamReportProductHazards>().eq("report_id",eamReportRepairDto.getId()) + .eq("equipment_id",eamReportRepairDto.getEquipmentId())); + //娣诲姞浜у搧瀹夊叏闅愭偅纭 + EamReportProductHazards eamReportProductHazards=new EamReportProductHazards(); + eamReportProductHazards.setEquipmentId(eamReportRepairDto.getEquipmentId()); + eamReportProductHazards.setReportId(eamReportRepairDto.getId()); + eamReportProductHazards.setId(null); + iEamReportProductHazardsService.save(eamReportProductHazards); } - this.baseMapper.updateById(eamReportRepair); + if (StrUtil.isNotEmpty(eamReportRepairDto.getIsAccidentsRegister())) { + //todo 缂哄皯瀵瑰簲娴佺▼鍒ゆ柇 + if ("0".equals(eamReportRepairDto.getIsAccidentsRegister())) { + updateWrapper.set(EamReportRepair::getScrapPartNumber,null); + updateWrapper.set(EamReportRepair::getScrapPartValue, null); + updateWrapper.set(EamReportRepair::getScrapPartQuantity, null); + } + //鐩存帴鍒犻櫎鍐嶆坊鍔� + iEamReportAccidentsRegisterService.remove(new QueryWrapper<EamReportAccidentsRegister>() + .eq("report_id",eamReportRepairDto.getId()).eq("equipment_id",eamReportRepairDto.getEquipmentId())); + //娣诲姞璁惧浜嬫晠鐧昏琛� + EamReportAccidentsRegister eamReportAccidentsRegister = new EamReportAccidentsRegister(); + BeanUtils.copyProperties(eamReportRepairDto, eamReportAccidentsRegister); + eamReportAccidentsRegister.setReportId(eamReportRepairDto.getId()); + eamReportAccidentsRegister.setDelFlag(CommonConstant.DEFAULT_0); + eamReportAccidentsRegister.setId(null); + iEamReportAccidentsRegisterService.save(eamReportAccidentsRegister); + } + updateWrapper.eq(EamReportRepair::getId,eamReportRepairDto.getId()); + this.update(eamReportRepair,updateWrapper); return true; } @@ -213,10 +283,7 @@ entity.setFaultStartTime(new Date()); entity.setBreakdownFlag(CommonConstant.DEFAULT_0); entity.setDelFlag(CommonConstant.DEL_FLAG_0); - entity.setFaultName("浜屼繚鎵ц鎶ヤ慨澶勭悊"); entity.setFaultDescription(sb.toString()); - entity.setFaultType(CommonConstant.DEFAULT_1); - entity.setReportStatus(ReportRepairEnum.WAIT_REPAIR.name()); this.baseMapper.insert(entity); //鏇存柊璁惧缁翠慨鐘舵�� eamEquipmentExtendService.updateEquipmentRepairStatus(entity.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name()); @@ -238,10 +305,7 @@ entity.setFaultStartTime(new Date()); entity.setBreakdownFlag(CommonConstant.DEFAULT_0); entity.setDelFlag(CommonConstant.DEL_FLAG_0); - entity.setFaultName("涓変繚鎵ц鎶ヤ慨澶勭悊"); entity.setFaultDescription(sb.toString()); - entity.setFaultType(CommonConstant.DEFAULT_1); - entity.setReportStatus(ReportRepairEnum.WAIT_REPAIR.name()); this.baseMapper.insert(entity); //鏇存柊璁惧缁翠慨鐘舵�� eamEquipmentExtendService.updateEquipmentRepairStatus(entity.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name()); diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportThreeNoSpareServiceImpl.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportThreeNoSpareServiceImpl.java new file mode 100644 index 0000000..f874280 --- /dev/null +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportThreeNoSpareServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.eam.service.impl; + +import org.jeecg.modules.eam.entity.EamReportThreeNoSpare; +import org.jeecg.modules.eam.mapper.EamReportThreeNoSpareMapper; +import org.jeecg.modules.eam.service.IEamReportThreeNoSpareService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Service +public class EamReportThreeNoSpareServiceImpl extends ServiceImpl<EamReportThreeNoSpareMapper, EamReportThreeNoSpare> implements IEamReportThreeNoSpareService { + +} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairOrderController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairOrderController.java index 0d74404..33c2fa8 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairOrderController.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairOrderController.java @@ -14,6 +14,7 @@ import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.TranslateDictTextUtils; import org.jeecg.modules.eam.constant.BusinessCodeConst; +import org.jeecg.modules.eam.dto.EamRepairOrderDto; import org.jeecg.modules.eam.entity.EamRepairOrder; import org.jeecg.modules.eam.request.EamRepairOrderQuery; import org.jeecg.modules.eam.request.EamRepairOrderRequest; @@ -75,54 +76,20 @@ /** * 棰嗗彇 * - * @param eamRepairOrder + * @param id * @return */ - @AutoLog(value = "缁翠慨宸ュ崟-棰嗗彇") - @ApiOperation(value = "缁翠慨宸ュ崟-棰嗗彇", notes = "缁翠慨宸ュ崟-棰嗗彇") - @PostMapping(value = "/add") - public Result<?> add(@RequestBody EamRepairOrder eamRepairOrder) { - if (StringUtils.isBlank(eamRepairOrder.getReportId())) { - return Result.error("棰嗗彇澶辫触,璇烽�夋嫨缁翠慨璁板綍锛�"); - } + @AutoLog(value = "缁翠慨宸ュ崟-鎻愪氦") + @ApiOperation(value = "缁翠慨宸ュ崟-鎻愪氦", notes = "缁翠慨宸ュ崟-鎻愪氦") + @GetMapping(value = "/submit") + public Result<?> submit(String id) { // 鏍¢獙棰嗗彇鏉冮檺 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); if (!BusinessCodeConst.PCR0002.equals(user.getPost())) { - return Result.error("棰嗗彇澶辫触,娌℃湁棰嗗彇鏉冮檺锛�"); + return Result.error("鎻愪氦澶辫触,娌℃湁鎻愪氦鏉冮檺锛�,璇风櫥褰曠淮淇伐宀椾綅鐢ㄦ埛"); } - eamRepairOrderService.saveRepairOrder(eamRepairOrder); - return Result.OK("娣诲姞鎴愬姛锛�"); - } - - /** - * 鎸囨淳 - * - * @param - * @return - */ - @AutoLog(value = "鏁呴殰鎶ヤ慨-鎸囨淳") - @ApiOperation(value = "鏁呴殰鎶ヤ慨-鎸囨淳", notes = "鏁呴殰鎶ヤ慨-鎸囨淳") - @PostMapping(value = "/assign") - public Result<?> assign(@RequestBody EamReportRepairQuery eamReportRepairQuery) { - if (StringUtils.isBlank(eamReportRepairQuery.getRepairer())) { - return Result.error("鎸囨淳澶辫触,璇烽�夋嫨缁翠慨宸ワ紒"); - } - // 鏍¢獙鎸囨淳鏉冮檺 - LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - if (!BusinessCodeConst.PCR0004.equals(user.getPost())) { - return Result.error("鎸囨淳澶辫触,娌℃湁鎸囨淳鏉冮檺锛�"); - } - // 鏍¢獙缁翠慨宸ユ潈闄� - SysUser sysUser = sysUserService.getUserByName(eamReportRepairQuery.getRepairer()); - if (sysUser == null) { - return Result.error("鎸囨淳澶辫触,鏈壘鍒版缁翠慨宸ョ敤鎴凤紒"); - } - if (!BusinessCodeConst.PCR0002.equals(sysUser.getPost())) { - return Result.error("鎸囨淳澶辫触,姝ょ敤鎴蜂笉鏄淮淇伐锛�"); - } - eamRepairOrderService.assign(eamReportRepairQuery); - - return Result.OK("鎸囨淳鎴愬姛锛�"); + eamRepairOrderService.saveRepairOrder(id); + return Result.OK("鎻愪氦鎴愬姛锛�"); } /** @@ -150,6 +117,41 @@ } /** + * 濉姤璇︽儏 + * @param id + */ + @AutoLog(value = "缁翠慨宸ュ崟-濉姤璇︽儏") + @ApiOperation(value = "缁翠慨宸ュ崟-濉姤璇︽儏", notes = "缁翠慨宸ュ崟-濉姤璇︽儏") + @GetMapping(value = "/queryByReportId") + public Result<?> queryByReportId(@RequestParam(name = "id", required = true) String id) { + return Result.ok(eamRepairOrderService.queryByReportId(id)); + } + + /** + * 濉姤缁翠慨宸ュ崟 + * @param eamRepairOrderDto + */ + @ApiOperation(value = "缁翠慨宸ュ崟-濉姤缁翠慨宸ュ崟", notes = "缁翠慨宸ュ崟-濉姤缁翠慨宸ュ崟") + @PostMapping(value = "/report") + public Result<?> report(@RequestBody EamRepairOrderDto eamRepairOrderDto) { + // 鏍¢獙棰嗗彇鏉冮檺 + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + if (!BusinessCodeConst.PCR0002.equals(user.getPost())) { + return Result.error("濉姤澶辫触,娌℃湁濉姤鏉冮檺锛�,璇风櫥褰曠淮淇伐宀椾綅鐢ㄦ埛"); + } + if (eamRepairOrderDto == null) { + return Result.error("濉姤鐨勫璞′笉鑳戒负绌猴紒"); + }else { + boolean b = eamRepairOrderService.report(eamRepairOrderDto); + if(!b) { + return Result.error("濉姤澶辫触锛岃閲嶈瘯"); + }else { + return Result.OK("濉姤鎴愬姛"); + } + } + } + + /** * 閫氳繃id鏌ヨ * * @param id @@ -172,7 +174,6 @@ translateDictTextUtils.translateField("reportStatus", eamRepairOrder.getReportStatus(), item, "report_repair_status"); translateDictTextUtils.translateField("equipmentId", eamRepairOrder.getEquipmentId(), item, "eam_equipment,id,equipment_code"); translateDictTextUtils.translateField("repairStatus", eamRepairOrder.getRepairStatus(), item, "report_repair_status"); - translateDictTextUtils.translateField("repairer", eamRepairOrder.getRepairer(), item, "sys_user,username,realname"); return Result.OK(item); } catch (Exception e) { return Result.error("鏁版嵁杞瘧澶辫触锛�"); diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairPersonController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairPersonController.java new file mode 100644 index 0000000..60ee7d7 --- /dev/null +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairPersonController.java @@ -0,0 +1,172 @@ +package org.jeecg.modules.eam.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.eam.entity.EamRepairPerson; +import org.jeecg.modules.eam.service.IEamRepairPersonService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 鏁呴殰缁翠慨浜哄憳 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Api(tags="鏁呴殰缁翠慨浜哄憳") +@RestController +@RequestMapping("/eam/eamRepairPerson") +@Slf4j +public class EamRepairPersonController extends JeecgController<EamRepairPerson, IEamRepairPersonService> { + @Autowired + private IEamRepairPersonService eamRepairPersonService; + + /** + * 鍒楄〃鏌ヨ + * + * @param eamRepairPerson + * @return + */ + //@AutoLog(value = "鏁呴殰缁翠慨浜哄憳-鍒嗛〉鍒楄〃鏌ヨ") + @ApiOperation(value="鏁呴殰缁翠慨浜哄憳-鍒嗛〉鍒楄〃鏌ヨ", notes="鏁呴殰缁翠慨浜哄憳-鍒嗛〉鍒楄〃鏌ヨ") + @GetMapping(value = "/list") + public Result<List<EamRepairPerson>> queryPageList(EamRepairPerson eamRepairPerson) { + QueryWrapper<EamRepairPerson> queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("repair_id",eamRepairPerson.getRepairId()); + queryWrapper.orderByDesc("create_time"); + List<EamRepairPerson> list = eamRepairPersonService.list(queryWrapper); + return Result.OK(list); + } + + /** + * 娣诲姞 + * + * @param eamRepairPerson + * @return + */ + @AutoLog(value = "鏁呴殰缁翠慨浜哄憳-娣诲姞") + @ApiOperation(value="鏁呴殰缁翠慨浜哄憳-娣诲姞", notes="鏁呴殰缁翠慨浜哄憳-娣诲姞") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_repair_person:add") + @PostMapping(value = "/add") + public Result<String> add(@RequestBody EamRepairPerson eamRepairPerson) { + eamRepairPersonService.save(eamRepairPerson); + return Result.OK("娣诲姞鎴愬姛锛�"); + } + + /** + * 缂栬緫 + * + * @param eamRepairPerson + * @return + */ + @AutoLog(value = "鏁呴殰缁翠慨浜哄憳-缂栬緫") + @ApiOperation(value="鏁呴殰缁翠慨浜哄憳-缂栬緫", notes="鏁呴殰缁翠慨浜哄憳-缂栬緫") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_repair_person:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result<String> edit(@RequestBody EamRepairPerson eamRepairPerson) { + eamRepairPersonService.updateById(eamRepairPerson); + return Result.OK("缂栬緫鎴愬姛!"); + } + + /** + * 閫氳繃id鍒犻櫎 + * + * @param id + * @return + */ + @AutoLog(value = "鏁呴殰缁翠慨浜哄憳-閫氳繃id鍒犻櫎") + @ApiOperation(value="鏁呴殰缁翠慨浜哄憳-閫氳繃id鍒犻櫎", notes="鏁呴殰缁翠慨浜哄憳-閫氳繃id鍒犻櫎") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_repair_person:delete") + @DeleteMapping(value = "/delete") + public Result<String> delete(@RequestParam(name="id",required=true) String id) { + eamRepairPersonService.removeById(id); + return Result.OK("鍒犻櫎鎴愬姛!"); + } + + /** + * 鎵归噺鍒犻櫎 + * + * @param ids + * @return + */ + @AutoLog(value = "鏁呴殰缁翠慨浜哄憳-鎵归噺鍒犻櫎") + @ApiOperation(value="鏁呴殰缁翠慨浜哄憳-鎵归噺鍒犻櫎", notes="鏁呴殰缁翠慨浜哄憳-鎵归噺鍒犻櫎") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_repair_person:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.eamRepairPersonService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("鎵归噺鍒犻櫎鎴愬姛!"); + } + + /** + * 閫氳繃id鏌ヨ + * + * @param id + * @return + */ + //@AutoLog(value = "鏁呴殰缁翠慨浜哄憳-閫氳繃id鏌ヨ") + @ApiOperation(value="鏁呴殰缁翠慨浜哄憳-閫氳繃id鏌ヨ", notes="鏁呴殰缁翠慨浜哄憳-閫氳繃id鏌ヨ") + @GetMapping(value = "/queryById") + public Result<EamRepairPerson> queryById(@RequestParam(name="id",required=true) String id) { + EamRepairPerson eamRepairPerson = eamRepairPersonService.getById(id); + if(eamRepairPerson==null) { + return Result.error("鏈壘鍒板搴旀暟鎹�"); + } + return Result.OK(eamRepairPerson); + } + + /** + * 瀵煎嚭excel + * + * @param request + * @param eamRepairPerson + */ + //@RequiresPermissions("org.jeecg.modules.mdc:eam_repair_person:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EamRepairPerson eamRepairPerson) { + return super.exportXls(request, eamRepairPerson, EamRepairPerson.class, "鏁呴殰缁翠慨浜哄憳"); + } + + /** + * 閫氳繃excel瀵煎叆鏁版嵁 + * + * @param request + * @param response + * @return + */ + //@RequiresPermissions("eam_repair_person:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EamRepairPerson.class); + } + +} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportAccidentsRegisterController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportAccidentsRegisterController.java new file mode 100644 index 0000000..bd34547 --- /dev/null +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportAccidentsRegisterController.java @@ -0,0 +1,208 @@ +package org.jeecg.modules.eam.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.eam.constant.BusinessCodeConst; +import org.jeecg.modules.eam.dto.EamReportAccidentsRegisterDto; +import org.jeecg.modules.eam.entity.EamReportAccidentsRegister; +import org.jeecg.modules.eam.request.EamReportAccidentsRegisterQuery; +import org.jeecg.modules.eam.service.IEamReportAccidentsRegisterService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 璁惧浜嬫晠鐧昏琛� + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Api(tags="璁惧浜嬫晠鐧昏琛�") +@RestController +@RequestMapping("/eam/eamReportAccidentsRegister") +@Slf4j +public class EamReportAccidentsRegisterController extends JeecgController<EamReportAccidentsRegister, IEamReportAccidentsRegisterService> { + @Autowired + private IEamReportAccidentsRegisterService eamReportAccidentsRegisterService; + + /** + * 鍒嗛〉鍒楄〃鏌ヨ + * + * @param eamReportAccidentsRegister + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "璁惧浜嬫晠鐧昏琛�-鍒嗛〉鍒楄〃鏌ヨ") + @ApiOperation(value="璁惧浜嬫晠鐧昏琛�-鍒嗛〉鍒楄〃鏌ヨ", notes="璁惧浜嬫晠鐧昏琛�-鍒嗛〉鍒楄〃鏌ヨ") + @GetMapping(value = "/list") + public Result<IPage<EamReportAccidentsRegisterQuery>> queryPageList(EamReportAccidentsRegisterQuery eamReportAccidentsRegister, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + Page<EamReportAccidentsRegisterQuery> page = new Page<EamReportAccidentsRegisterQuery>(pageNo, pageSize); + IPage<EamReportAccidentsRegisterQuery> pageList = eamReportAccidentsRegisterService.pageList(page,eamReportAccidentsRegister); + return Result.OK(pageList); + } + + /** + * 娣诲姞 + * + * @param eamReportAccidentsRegister + * @return + */ + @AutoLog(value = "璁惧浜嬫晠鐧昏琛�-娣诲姞") + @ApiOperation(value="璁惧浜嬫晠鐧昏琛�-娣诲姞", notes="璁惧浜嬫晠鐧昏琛�-娣诲姞") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_accidents_register:add") + @PostMapping(value = "/add") + public Result<String> add(@RequestBody EamReportAccidentsRegister eamReportAccidentsRegister) { + eamReportAccidentsRegisterService.save(eamReportAccidentsRegister); + return Result.OK("娣诲姞鎴愬姛锛�"); + } + + /** + * 缂栬緫 + * + * @param eamReportAccidentsRegister + * @return + */ + @AutoLog(value = "璁惧浜嬫晠鐧昏琛�-缂栬緫") + @ApiOperation(value="璁惧浜嬫晠鐧昏琛�-缂栬緫", notes="璁惧浜嬫晠鐧昏琛�-缂栬緫") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result<String> edit(@RequestBody EamReportAccidentsRegister eamReportAccidentsRegister) { + eamReportAccidentsRegisterService.updateById(eamReportAccidentsRegister); + return Result.OK("缂栬緫鎴愬姛!"); + } + + /** + * 濉姤鏁版嵁 + * @param eamReportAccidentsRegisterDto + * @return + */ + @ApiOperation(value="璁惧浜嬫晠鐧昏琛�-濉姤鏁版嵁", notes="璁惧浜嬫晠鐧昏琛�-濉姤鏁版嵁") + @PostMapping(value = "/report") + public Result<?> report(EamReportAccidentsRegisterDto eamReportAccidentsRegisterDto){ + // 鏍¢獙棰嗗彇鏉冮檺 + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + if (!BusinessCodeConst.PCR0001.equals(user.getPost())) { + return Result.error("濉姤澶辫触,娌℃湁濉姤鏉冮檺锛�,璇风櫥褰曟搷浣滃伐宀椾綅鐢ㄦ埛"); + } + if (eamReportAccidentsRegisterDto == null) { + return Result.error("濉姤鐨勫璞′笉鑳戒负绌猴紒"); + }else { + boolean b = eamReportAccidentsRegisterService.report(eamReportAccidentsRegisterDto); + if(!b) { + return Result.error("濉姤澶辫触锛岃閲嶈瘯"); + }else { + return Result.OK("濉姤鎴愬姛"); + } + } + } + + /** + * 閫氳繃id鍒犻櫎 + * + * @param id + * @return + */ + @AutoLog(value = "璁惧浜嬫晠鐧昏琛�-閫氳繃id鍒犻櫎") + @ApiOperation(value="璁惧浜嬫晠鐧昏琛�-閫氳繃id鍒犻櫎", notes="璁惧浜嬫晠鐧昏琛�-閫氳繃id鍒犻櫎") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_accidents_register:delete") + @DeleteMapping(value = "/delete") + public Result<String> delete(@RequestParam(name="id",required=true) String id) { + if (eamReportAccidentsRegisterService.cancelled(id)){ + return Result.OK("鍒犻櫎鎴愬姛!"); + } + return Result.error("鍒犻櫎澶辫触!"); + } + + /** + * 鎵归噺鍒犻櫎 + * + * @param ids + * @return + */ + @AutoLog(value = "璁惧浜嬫晠鐧昏琛�-鎵归噺鍒犻櫎") + @ApiOperation(value="璁惧浜嬫晠鐧昏琛�-鎵归噺鍒犻櫎", notes="璁惧浜嬫晠鐧昏琛�-鎵归噺鍒犻櫎") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_accidents_register:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.eamReportAccidentsRegisterService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("鎵归噺鍒犻櫎鎴愬姛!"); + } + + /** + * 閫氳繃id鏌ヨ + * + * @param id + * @return + */ + //@AutoLog(value = "璁惧浜嬫晠鐧昏琛�-閫氳繃id鏌ヨ") + @ApiOperation(value="璁惧浜嬫晠鐧昏琛�-閫氳繃id鏌ヨ", notes="璁惧浜嬫晠鐧昏琛�-閫氳繃id鏌ヨ") + @GetMapping(value = "/queryById") + public Result<EamReportAccidentsRegister> queryById(@RequestParam(name="id",required=true) String id) { + EamReportAccidentsRegister eamReportAccidentsRegister = eamReportAccidentsRegisterService.getById(id); + if(eamReportAccidentsRegister==null) { + return Result.error("鏈壘鍒板搴旀暟鎹�"); + } + return Result.OK(eamReportAccidentsRegister); + } + + /** + * 瀵煎嚭excel + * + * @param request + * @param eamReportAccidentsRegister + */ + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_accidents_register:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EamReportAccidentsRegister eamReportAccidentsRegister) { + return super.exportXls(request, eamReportAccidentsRegister, EamReportAccidentsRegister.class, "璁惧浜嬫晠鐧昏琛�"); + } + + /** + * 閫氳繃excel瀵煎叆鏁版嵁 + * + * @param request + * @param response + * @return + */ + //@RequiresPermissions("eam_report_accidents_register:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EamReportAccidentsRegister.class); + } + +} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportProductHazardsController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportProductHazardsController.java new file mode 100644 index 0000000..a134dcd --- /dev/null +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportProductHazardsController.java @@ -0,0 +1,204 @@ +package org.jeecg.modules.eam.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.eam.constant.BusinessCodeConst; +import org.jeecg.modules.eam.dto.EamReportProductHazardsDto; +import org.jeecg.modules.eam.dto.EamReportRepairDto; +import org.jeecg.modules.eam.entity.EamReportProductHazards; +import org.jeecg.modules.eam.request.EamReportProductHazardsQuery; +import org.jeecg.modules.eam.service.IEamReportProductHazardsService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 浜у搧瀹夊叏闅愭偅纭 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Api(tags="浜у搧瀹夊叏闅愭偅纭") +@RestController +@RequestMapping("/eam/eamReportProductHazards") +@Slf4j +public class EamReportProductHazardsController extends JeecgController<EamReportProductHazards, IEamReportProductHazardsService> { + @Autowired + private IEamReportProductHazardsService eamReportProductHazardsService; + + /** + * 鍒嗛〉鍒楄〃鏌ヨ + * + * @param eamReportProductHazardsQuery + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "浜у搧瀹夊叏闅愭偅纭-鍒嗛〉鍒楄〃鏌ヨ") + @ApiOperation(value="浜у搧瀹夊叏闅愭偅纭-鍒嗛〉鍒楄〃鏌ヨ", notes="浜у搧瀹夊叏闅愭偅纭-鍒嗛〉鍒楄〃鏌ヨ") + @GetMapping(value = "/list") + public Result<IPage<EamReportProductHazardsQuery>> queryPageList(EamReportProductHazardsQuery eamReportProductHazardsQuery, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + Page<EamReportProductHazardsQuery> page = new Page<EamReportProductHazardsQuery>(pageNo, pageSize); + IPage<EamReportProductHazardsQuery> pageList = eamReportProductHazardsService.pageList(page, eamReportProductHazardsQuery); + return Result.OK(pageList); + } + + /** + * 娣诲姞 + * + * @param eamReportProductHazards + * @return + */ + @AutoLog(value = "浜у搧瀹夊叏闅愭偅纭-娣诲姞") + @ApiOperation(value="浜у搧瀹夊叏闅愭偅纭-娣诲姞", notes="浜у搧瀹夊叏闅愭偅纭-娣诲姞") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_product_hazards:add") + @PostMapping(value = "/add") + public Result<String> add(@RequestBody EamReportProductHazards eamReportProductHazards) { + eamReportProductHazardsService.save(eamReportProductHazards); + return Result.OK("娣诲姞鎴愬姛锛�"); + } + + /** + * 缂栬緫 + * + * @param eamReportProductHazards + * @return + */ + @AutoLog(value = "浜у搧瀹夊叏闅愭偅纭-缂栬緫") + @ApiOperation(value="浜у搧瀹夊叏闅愭偅纭-缂栬緫", notes="浜у搧瀹夊叏闅愭偅纭-缂栬緫") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_product_hazards:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result<String> edit(@RequestBody EamReportProductHazards eamReportProductHazards) { + eamReportProductHazardsService.updateById(eamReportProductHazards); + return Result.OK("缂栬緫鎴愬姛!"); + } + + /** + * 閫氳繃id鍒犻櫎 + * + * @param id + * @return + */ + @AutoLog(value = "浜у搧瀹夊叏闅愭偅纭-閫氳繃id鍒犻櫎") + @ApiOperation(value="浜у搧瀹夊叏闅愭偅纭-閫氳繃id鍒犻櫎", notes="浜у搧瀹夊叏闅愭偅纭-閫氳繃id鍒犻櫎") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_product_hazards:delete") + @DeleteMapping(value = "/delete") + public Result<String> delete(@RequestParam(name="id",required=true) String id) { + if (eamReportProductHazardsService.cancelled(id)){ + return Result.OK("鍒犻櫎鎴愬姛!"); + } + return Result.error("鍒犻櫎澶辫触!"); + } + + /** + * 鎵归噺鍒犻櫎 + * + * @param ids + * @return + */ + @AutoLog(value = "浜у搧瀹夊叏闅愭偅纭-鎵归噺鍒犻櫎") + @ApiOperation(value="浜у搧瀹夊叏闅愭偅纭-鎵归噺鍒犻櫎", notes="浜у搧瀹夊叏闅愭偅纭-鎵归噺鍒犻櫎") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_product_hazards:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.eamReportProductHazardsService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("鎵归噺鍒犻櫎鎴愬姛!"); + } + + /** + * 閫氳繃id鏌ヨ + * + * @param id + * @return + */ + //@AutoLog(value = "浜у搧瀹夊叏闅愭偅纭-閫氳繃id鏌ヨ") + @ApiOperation(value="浜у搧瀹夊叏闅愭偅纭-閫氳繃id鏌ヨ", notes="浜у搧瀹夊叏闅愭偅纭-閫氳繃id鏌ヨ") + @GetMapping(value = "/queryById") + public Result<EamReportProductHazards> queryById(@RequestParam(name="id",required=true) String id) { + EamReportProductHazards eamReportProductHazards = eamReportProductHazardsService.getById(id); + if(eamReportProductHazards==null) { + return Result.error("鏈壘鍒板搴旀暟鎹�"); + } + return Result.OK(eamReportProductHazards); + } + + /** + * 鎿嶄綔宸ュ~鎶� + * @param eamReportProductHazardsDto + * @return + */ + @ApiOperation(value = "鎿嶄綔宸ュ~鎶�",notes = "鎿嶄綔宸ュ~鎶�") + @PostMapping(value = "/report") + public Result<?> report(EamReportProductHazardsDto eamReportProductHazardsDto){ + // 鏍¢獙棰嗗彇鏉冮檺 + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + if (!BusinessCodeConst.PCR0001.equals(user.getPost())) { + return Result.error("濉姤澶辫触,娌℃湁濉姤鏉冮檺锛�,璇风櫥褰曟搷浣滃伐宀椾綅鐢ㄦ埛"); + } + if (eamReportProductHazardsDto == null) { + return Result.error("濉姤鐨勫璞′笉鑳戒负绌猴紒"); + }else { + boolean b = eamReportProductHazardsService.report(eamReportProductHazardsDto); + if(!b) { + return Result.error("濉姤澶辫触锛岃閲嶈瘯"); + }else { + return Result.OK("濉姤鎴愬姛"); + } + } + } + + /** + * 瀵煎嚭excel + * + * @param request + * @param eamReportProductHazards + */ + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_product_hazards:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EamReportProductHazards eamReportProductHazards) { + return super.exportXls(request, eamReportProductHazards, EamReportProductHazards.class, "浜у搧瀹夊叏闅愭偅纭"); + } + + /** + * 閫氳繃excel瀵煎叆鏁版嵁 + * + * @param request + * @param response + * @return + */ + //@RequiresPermissions("eam_report_product_hazards:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EamReportProductHazards.class); + } + +} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportRepairController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportRepairController.java index 02044ac..3d9b22b 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportRepairController.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportRepairController.java @@ -7,24 +7,15 @@ import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.parser.Feature; -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.commons.lang3.StringUtils; -import org.apache.shiro.SecurityUtils; -import org.jeecg.common.api.vo.FileUploadResult; import org.jeecg.common.api.vo.Result; -import org.jeecg.common.constant.CommonConstant; -import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.aspect.annotation.AutoLog; -import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.TranslateDictTextUtils; -import org.jeecg.modules.eam.constant.BusinessCodeConst; -import org.jeecg.modules.eam.constant.ReportRepairEnum; +import org.jeecg.modules.eam.dto.EamReportRepairDto; import org.jeecg.modules.eam.entity.EamReportRepair; import org.jeecg.modules.eam.request.EamReportRepairQuery; +import org.jeecg.modules.eam.request.EamReportRepairRequest; import org.jeecg.modules.eam.service.IEamReportRepairService; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; @@ -71,22 +62,22 @@ public Result<?> queryPageList(EamReportRepairQuery eamReportRepairQuery, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { - Page<EamReportRepair> page = new Page<EamReportRepair>(pageNo, pageSize); - IPage<EamReportRepair> pageList = eamReportRepairService.pageList(page, eamReportRepairQuery); + Page<EamReportRepairDto> page = new Page<EamReportRepairDto>(pageNo, pageSize); + IPage<EamReportRepairDto> pageList = eamReportRepairService.pageList(page, eamReportRepairQuery); return Result.OK(pageList); } /** * 娣诲姞 * - * @param eamReportRepair + * @param eamReportRepairRequest * @return */ @AutoLog(value = "鏁呴殰鎶ヤ慨-娣诲姞") @ApiOperation(value = "鏁呴殰鎶ヤ慨-娣诲姞", notes = "鏁呴殰鎶ヤ慨-娣诲姞") @PostMapping(value = "/add") - public Result<?> add(@RequestBody EamReportRepair eamReportRepair) { - EamReportRepair b = eamReportRepairService.add(eamReportRepair); + public Result<?> add(@RequestBody EamReportRepairRequest eamReportRepairRequest) { + EamReportRepair b = eamReportRepairService.add(eamReportRepairRequest); if(b == null) { return Result.error("娣诲姞澶辫触锛�"); } @@ -96,33 +87,20 @@ /** * 缂栬緫 * - * @param eamReportRepair + * @param eamReportRepairDto * @return */ @AutoLog(value = "鏁呴殰鎶ヤ慨-缂栬緫") @ApiOperation(value = "鏁呴殰鎶ヤ慨-缂栬緫", notes = "鏁呴殰鎶ヤ慨-缂栬緫") @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) - public Result<?> edit(@RequestBody EamReportRepair eamReportRepair) { - boolean b = eamReportRepairService.edit(eamReportRepair); + public Result<?> edit(@RequestBody EamReportRepairDto eamReportRepairDto) { + boolean b = eamReportRepairService.edit(eamReportRepairDto); if(!b) { return Result.error("缂栬緫澶辫触锛�"); } return Result.OK("缂栬緫鎴愬姛!"); } - /** - * 閫氳繃id浣滃簾 - * - * @param id - * @return - */ - @AutoLog(value = "鏁呴殰鎶ヤ慨-浣滃簾") - @ApiOperation(value = "鏁呴殰鎶ヤ慨-浣滃簾", notes = "鏁呴殰鎶ヤ慨-浣滃簾") - @DeleteMapping(value = "/abolish") - public Result<?> abolish(@RequestParam(name = "id", required = true) String id) { - eamReportRepairService.update(new LambdaUpdateWrapper<EamReportRepair>().set(EamReportRepair::getReportStatus, ReportRepairEnum.ABOLISH.name()).eq(EamReportRepair::getId, id).eq(EamReportRepair::getReportStatus, ReportRepairEnum.WAIT_REPAIR.name())); - return Result.OK("浣滃簾鎴愬姛!"); - } /** * 鎵归噺浣滃簾 @@ -135,11 +113,6 @@ @DeleteMapping(value = "/abolishBatch") public Result<?> abolishBatch(@RequestParam(name = "ids", required = true) String ids) { List<EamReportRepair> eamReportRepairs = eamReportRepairService.listByIds(Arrays.asList(ids.split(","))); - eamReportRepairs.forEach(eamReportRepair -> { - if(ReportRepairEnum.ABOLISH.name().equals(eamReportRepair.getReportStatus())) { - eamReportRepair.setReportStatus(ReportRepairEnum.ABOLISH.name()); - } - }); this.eamReportRepairService.updateBatchById(eamReportRepairs); return Result.OK("鎵归噺浣滃簾鎴愬姛锛�"); } @@ -163,9 +136,7 @@ JSONObject item = JSONObject.parseObject(json, Feature.OrderedField); translateDictTextUtils.translateField("createBy", eamReportRepair.getCreateBy(), item, "sys_user,realname,username"); translateDictTextUtils.translateField("breakdownFlag", eamReportRepair.getBreakdownFlag(), item, "breakdown_flag"); - translateDictTextUtils.translateField("faultType", eamReportRepair.getFaultType(), item, "fault_reason_category"); - translateDictTextUtils.translateField("reportStatus", eamReportRepair.getReportStatus(), item, "report_repair_status"); - translateDictTextUtils.translateField("equipmentId", eamReportRepair.getEquipmentId(), item, "eam_equipment,id,equipment_code"); + translateDictTextUtils.translateField("equipmentId", eamReportRepair.getEquipmentId(), item, "eam_equipment,id,equipment_code"); return Result.OK(item); } catch (Exception e) { return Result.error("鏁版嵁杞瘧澶辫触锛�"); diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportThreeNoSpareController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportThreeNoSpareController.java new file mode 100644 index 0000000..fd153a0 --- /dev/null +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportThreeNoSpareController.java @@ -0,0 +1,177 @@ +package org.jeecg.modules.eam.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.eam.entity.EamReportThreeNoSpare; +import org.jeecg.modules.eam.service.IEamReportThreeNoSpareService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃 + * @Author: jeecg-boot + * @Date: 2025-07-17 + * @Version: V1.0 + */ +@Api(tags="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃") +@RestController +@RequestMapping("/eam/eamReportThreeNoSpare") +@Slf4j +public class EamReportThreeNoSpareController extends JeecgController<EamReportThreeNoSpare, IEamReportThreeNoSpareService> { + @Autowired + private IEamReportThreeNoSpareService eamReportThreeNoSpareService; + + /** + * 鍒嗛〉鍒楄〃鏌ヨ + * + * @param eamReportThreeNoSpare + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-鍒嗛〉鍒楄〃鏌ヨ") + @ApiOperation(value="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-鍒嗛〉鍒楄〃鏌ヨ", notes="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-鍒嗛〉鍒楄〃鏌ヨ") + @GetMapping(value = "/list") + public Result<IPage<EamReportThreeNoSpare>> queryPageList(EamReportThreeNoSpare eamReportThreeNoSpare, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper<EamReportThreeNoSpare> queryWrapper = QueryGenerator.initQueryWrapper(eamReportThreeNoSpare, req.getParameterMap()); + Page<EamReportThreeNoSpare> page = new Page<EamReportThreeNoSpare>(pageNo, pageSize); + IPage<EamReportThreeNoSpare> pageList = eamReportThreeNoSpareService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 娣诲姞 + * + * @param eamReportThreeNoSpare + * @return + */ + @AutoLog(value = "鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-娣诲姞") + @ApiOperation(value="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-娣诲姞", notes="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-娣诲姞") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_three_no_spare:add") + @PostMapping(value = "/add") + public Result<String> add(@RequestBody EamReportThreeNoSpare eamReportThreeNoSpare) { + eamReportThreeNoSpareService.save(eamReportThreeNoSpare); + return Result.OK("娣诲姞鎴愬姛锛�"); + } + + /** + * 缂栬緫 + * + * @param eamReportThreeNoSpare + * @return + */ + @AutoLog(value = "鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-缂栬緫") + @ApiOperation(value="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-缂栬緫", notes="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-缂栬緫") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_three_no_spare:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result<String> edit(@RequestBody EamReportThreeNoSpare eamReportThreeNoSpare) { + eamReportThreeNoSpareService.updateById(eamReportThreeNoSpare); + return Result.OK("缂栬緫鎴愬姛!"); + } + + /** + * 閫氳繃id鍒犻櫎 + * + * @param id + * @return + */ + @AutoLog(value = "鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-閫氳繃id鍒犻櫎") + @ApiOperation(value="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-閫氳繃id鍒犻櫎", notes="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-閫氳繃id鍒犻櫎") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_three_no_spare:delete") + @DeleteMapping(value = "/delete") + public Result<String> delete(@RequestParam(name="id",required=true) String id) { + eamReportThreeNoSpareService.removeById(id); + return Result.OK("鍒犻櫎鎴愬姛!"); + } + + /** + * 鎵归噺鍒犻櫎 + * + * @param ids + * @return + */ + @AutoLog(value = "鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-鎵归噺鍒犻櫎") + @ApiOperation(value="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-鎵归噺鍒犻櫎", notes="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-鎵归噺鍒犻櫎") + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_three_no_spare:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.eamReportThreeNoSpareService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("鎵归噺鍒犻櫎鎴愬姛!"); + } + + /** + * 閫氳繃id鏌ヨ + * + * @param id + * @return + */ + //@AutoLog(value = "鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-閫氳繃id鏌ヨ") + @ApiOperation(value="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-閫氳繃id鏌ヨ", notes="鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃-閫氳繃id鏌ヨ") + @GetMapping(value = "/queryById") + public Result<EamReportThreeNoSpare> queryById(@RequestParam(name="id",required=true) String id) { + EamReportThreeNoSpare eamReportThreeNoSpare = eamReportThreeNoSpareService.getById(id); + if(eamReportThreeNoSpare==null) { + return Result.error("鏈壘鍒板搴旀暟鎹�"); + } + return Result.OK(eamReportThreeNoSpare); + } + + /** + * 瀵煎嚭excel + * + * @param request + * @param eamReportThreeNoSpare + */ + //@RequiresPermissions("org.jeecg.modules.mdc:eam_report_three_no_spare:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, EamReportThreeNoSpare eamReportThreeNoSpare) { + return super.exportXls(request, eamReportThreeNoSpare, EamReportThreeNoSpare.class, "鈥滀笁涓嶆斁杩囩殑鍘熷垯鈥濆垎鏋愯〃"); + } + + /** + * 閫氳繃excel瀵煎叆鏁版嵁 + * + * @param request + * @param response + * @return + */ + //@RequiresPermissions("eam_report_three_no_spare:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, EamReportThreeNoSpare.class); + } + +} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamInspectionOrderQuery.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamInspectionOrderQuery.java index b53d8d5..4d4d27a 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamInspectionOrderQuery.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamInspectionOrderQuery.java @@ -18,6 +18,7 @@ private Date inspectionDateEnd; private String inspectionStatus; + private String column; private String order; } diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java index 8dbc946..854da31 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java @@ -437,6 +437,9 @@ Result result = flowTaskService.complete(eamMaintenanceStandardVo); if (result.isSuccess()) { if (eamMaintenanceStandardVo.getRepairManagerApproveResult() != null) { + if ("2".equals(eamMaintenanceStandard.getRepairManagerApproveResult())) { + eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.REJECTED.name()); + } if (eamMaintenanceStandardVo.getRepairManagerApproveResult().equals("1")) { List<FlowMyBusiness> newbusinessList = flowMyBusinessService.list( new QueryWrapper<FlowMyBusiness>() @@ -451,6 +454,8 @@ List<String> usernameList = userSelectorList.stream().map(UserSelector::getUsername).collect(Collectors.toList()); newflowMyBusiness.setTodoUsers(JSON.toJSONString(usernameList)); flowMyBusinessService.updateById(newflowMyBusiness); + }else { + throw new JeecgBootException("璁惧鏈瓨鍦ㄧ鐞嗗憳锛屾棤娉曡繘鍏ヤ笅绾у鎵癸紒"); } } else { eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name()); @@ -461,6 +466,9 @@ eamMaintenanceStandard.setRepairManagerApproveComment(eamMaintenanceStandardVo.getComment()); } if (eamMaintenanceStandardVo.getTechnicalManagerApproveResult() != null) { + if ("2".equals(eamMaintenanceStandard.getTechnicalManagerApproveResult())) { + eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.REJECTED.name()); + } if (eamMaintenanceStandardVo.getTechnicalManagerApproveResult().equals("1")) { eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.START.name()); //鍒ゆ柇鏄惁杩涜鍗囩増锛岄�氳繃璁惧缂栧彿銆佷繚鍏诲垎绫汇�佺姸鎬佽繘琛岀瓫閫� diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamSecondMaintenanceOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamSecondMaintenanceOrderServiceImpl.java index 89cdf03..8faaf0a 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamSecondMaintenanceOrderServiceImpl.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamSecondMaintenanceOrderServiceImpl.java @@ -430,6 +430,9 @@ userApprovalList= userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); values.put("NextAssignee", userApprovalList); values.put("dataId", entity.getId()); + if (StrUtil.isEmpty(request.getDealDescription())){ + request.setDealDescription(""); + } values.put("organization",request.getDealDescription()); values.put("comment", request.getDealDescription()); values.put("manageUserResult",request.getManageUserResult()); @@ -440,10 +443,16 @@ entity.setDealDescription(request.getDealDescription()); entity.setConfirmTime(new Date()); request.setComment(request.getDealDescription()); + if (request.getManageUserResult().equals("2")){ + entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.REJECTED.name()); + } } break; case WAIT_INSPECTOR_CONFIRM: //妫�鏌ヤ汉纭 + if (StrUtil.isEmpty(request.getDealDescription())){ + request.setDealDescription(""); + } values.put("dataId", entity.getId()); values.put("organization",request.getInspectConfirmComment()); values.put("comment", request.getInspectConfirmComment()); @@ -454,6 +463,9 @@ entity.setInspectConfirmComment(request.getInspectConfirmComment()); entity.setInspectConfirmTime(new Date()); request.setComment(request.getDealDescription()); + if (request.getInspectorResult().equals("2")){ + entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.REJECTED.name()); + } break; default: throw new JeecgBootException("瀹℃壒澶辫触"); -- Gitblit v1.9.3