diff --git a/inventory-dao/src/main/java/com/rzyc/bean/user/dto/AddPerformRecordDto.java b/inventory-dao/src/main/java/com/rzyc/bean/user/dto/AddPerformRecordDto.java index eac2d8d..a1735af 100644 --- a/inventory-dao/src/main/java/com/rzyc/bean/user/dto/AddPerformRecordDto.java +++ b/inventory-dao/src/main/java/com/rzyc/bean/user/dto/AddPerformRecordDto.java @@ -27,11 +27,11 @@ public class AddPerformRecordDto { @NotNull(message = "开始时间不能为空") @ApiModelProperty(value = "开始时间 yyyy-MM-dd",required = true) - private String startTime; + private String starttime; @NotNull(message = "结束时间不能为空") @ApiModelProperty(value = "结束时间 yyyy-MM-dd",required = true) - private String endTime; + private String endtime; @NotNull(message = "工作内容不能为空") @ApiModelProperty(value = "工作内容",required = true) @@ -72,20 +72,20 @@ public class AddPerformRecordDto { this.worktitle = worktitle; } - public String getStartTime() { - return startTime; + public String getStarttime() { + return starttime; } - public void setStartTime(String startTime) { - this.startTime = startTime; + public void setStarttime(String starttime) { + this.starttime = starttime; } - public String getEndTime() { - return endTime; + public String getEndtime() { + return endtime; } - public void setEndTime(String endTime) { - this.endTime = endTime; + public void setEndtime(String endtime) { + this.endtime = endtime; } public String getWorkcnt() { diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceInsCycleMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceInsCycleMapper.java index 410f85f..d5a71b4 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceInsCycleMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceInsCycleMapper.java @@ -55,4 +55,13 @@ public interface EntDeviceInsCycleMapper extends BaseMapper { * @return 周期巡检 * */ EntDeviceInsCycle selectByDeviceId(String deviceId); + + + /** + * 删除周期巡检 + * @param deviceInspectionCycleId 周期巡检id + * @return int + * */ + int updateDelState(String deviceInspectionCycleId); + } diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMaintenancePlanMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMaintenancePlanMapper.java index 9503c4b..07b2403 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMaintenancePlanMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMaintenancePlanMapper.java @@ -35,5 +35,12 @@ public interface EntDeviceMaintenancePlanMapper extends BaseMapperselectEntDeviceMaintenanceRecord(String deviceId); + + /** + * 设备保养记录软删除 + * @param deviceEntInsRecordId + * @return int + * */ + int updateDelState(String deviceEntInsRecordId); + } diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java index f8609b7..1ca3c42 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java @@ -62,4 +62,12 @@ public interface EntDeviceMapper extends BaseMapper { * */ List selectEntEquipmentOverdue(String enterpriseId); + + /** + * 软删除设备 + * @param deviceId 设备id + * @return int + * */ + int updateDelState(String deviceId); + } diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntInsRecordMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntInsRecordMapper.java index 56675ad..5eba047 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/EntInsRecordMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntInsRecordMapper.java @@ -36,4 +36,12 @@ public interface EntInsRecordMapper extends BaseMapper { List selectInspectionRecord(@Param("deviceId") String deviceId,@Param("inspectionRecordName") String inspectionRecordName); + /** + * 软删除巡检记录 + * @param deviceEntInsRecordId 巡检记录主键 + * @return int + * */ + int updateDelState(String deviceEntInsRecordId); + + } diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntInspectionRecordMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntInspectionRecordMapper.java index 152287c..c19ef46 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/EntInspectionRecordMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntInspectionRecordMapper.java @@ -36,4 +36,12 @@ public interface EntInspectionRecordMapper extends BaseMapper { * */ int updateRepairPlan(@Param("data") EntRepairPlan entRepairPlan); + + + /** + * 软删除维修计划 + * @param repairPlanId 企业维修计划主键 + * @return int + * */ + int updateDelState(@Param("repairPlanId")String repairPlanId); + } diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntRepairRecordMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntRepairRecordMapper.java index c56167b..22d1c05 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/EntRepairRecordMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntRepairRecordMapper.java @@ -32,4 +32,12 @@ public interface EntRepairRecordMapper extends BaseMapper { * */ int repairRecordUpdate(EntRepairRecord entRepairRecord); + + + /** + * 软删除维修记录 + * @param repairRecordId + * @return int + * */ + int updateDelState(String repairRecordId ); } diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntReportRepairMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntReportRepairMapper.java index 1c09867..225d004 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/EntReportRepairMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntReportRepairMapper.java @@ -33,4 +33,13 @@ public interface EntReportRepairMapper extends BaseMapper { int updateReportRecord(@Param("data") EntReportRepair entReportRepair); + + /** + * 软删除报修列表 + * @return int + * @param reportRepairId 报修对象ID + * */ + int updateDelState(String reportRepairId); + + } diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntDeviceMaintenanceRecord.java b/inventory-dao/src/main/java/com/rzyc/model/EntDeviceMaintenanceRecord.java index e99bbe1..2e65ab5 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/EntDeviceMaintenanceRecord.java +++ b/inventory-dao/src/main/java/com/rzyc/model/EntDeviceMaintenanceRecord.java @@ -94,6 +94,16 @@ public class EntDeviceMaintenanceRecord implements Serializable { @ApiModelProperty(value = "设备id") private String deviceId; + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public String getDeviceId() { return deviceId; } diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntEmExpert.java b/inventory-dao/src/main/java/com/rzyc/model/EntEmExpert.java index 339ee30..cee0d6a 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/EntEmExpert.java +++ b/inventory-dao/src/main/java/com/rzyc/model/EntEmExpert.java @@ -73,6 +73,17 @@ public class EntEmExpert implements Serializable { @TableField("modify_time") private Date modifyTime; + @TableField("entEm_work_unit") + private String entEmWorkUnit; + + public String getEntEmWorkUnit() { + return entEmWorkUnit; + } + + public void setEntEmWorkUnit(String entEmWorkUnit) { + this.entEmWorkUnit = entEmWorkUnit; + } + public Integer getAge() { return age; } diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntEmRehearsal.java b/inventory-dao/src/main/java/com/rzyc/model/EntEmRehearsal.java index babd846..75cee06 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/EntEmRehearsal.java +++ b/inventory-dao/src/main/java/com/rzyc/model/EntEmRehearsal.java @@ -5,6 +5,8 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -26,11 +28,13 @@ public class EntEmRehearsal implements Serializable { @TableId("ent_em_rehearsal_id") private String entEmRehearsalId; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "应急演练开始时间") @TableField("ent_em_rehearsal_start_time") private Date entEmRehearsalStartTime; - @ApiModelProperty(value = "应急演练开始时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "应急演练结束时间") @TableField("ent_em_rehearsal_end_time") private Date entEmRehearsalEndTime; diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntInspectionRecord.java b/inventory-dao/src/main/java/com/rzyc/model/EntInspectionRecord.java index f2198fb..453d8d1 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/EntInspectionRecord.java +++ b/inventory-dao/src/main/java/com/rzyc/model/EntInspectionRecord.java @@ -5,6 +5,8 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -26,9 +28,6 @@ public class EntInspectionRecord implements Serializable { @TableId("inspection_id") private String inspectionId; - @ApiModelProperty(value = "送检设备id") - @TableField("inspection_device_id") - private String inspectionDeviceId; @ApiModelProperty(value = "送检组织") @TableField("inspection_organization") @@ -38,6 +37,7 @@ public class EntInspectionRecord implements Serializable { @TableField("inspection_user_id") private String inspectionUserId; + @JsonFormat(pattern = "yyyy-MM-dd") @ApiModelProperty(value = "送检时间") @TableField("inspection_time") private Date inspectionTime; @@ -66,6 +66,19 @@ public class EntInspectionRecord implements Serializable { @TableField("device_id") private String deviceId; + + @ApiModelProperty("送检人名") + @TableField(exist = false) + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public String getDeviceId() { return deviceId; } @@ -82,14 +95,6 @@ public class EntInspectionRecord implements Serializable { this.inspectionId = inspectionId; } - public String getInspectionDeviceId() { - return inspectionDeviceId; - } - - public void setInspectionDeviceId(String inspectionDeviceId) { - this.inspectionDeviceId = inspectionDeviceId; - } - public String getInspectionOrganization() { return inspectionOrganization; } @@ -158,7 +163,6 @@ public class EntInspectionRecord implements Serializable { public String toString() { return "EntInspectionRecord{" + "inspectionId=" + inspectionId + - ", inspectionDeviceId=" + inspectionDeviceId + ", inspectionOrganization=" + inspectionOrganization + ", inspectionUserId=" + inspectionUserId + ", inspectionTime=" + inspectionTime + diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntRepairPlan.java b/inventory-dao/src/main/java/com/rzyc/model/EntRepairPlan.java index 4621d2e..86f4672 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/EntRepairPlan.java +++ b/inventory-dao/src/main/java/com/rzyc/model/EntRepairPlan.java @@ -5,6 +5,8 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -37,10 +39,12 @@ public class EntRepairPlan implements Serializable { @TableField("repair_state") private Integer repairState; + @JsonFormat(pattern = "yyyy-MM-dd") @ApiModelProperty(value = "上一次维修时间") @TableField("last_time_repair") private Date lastTimeRepair; + @JsonFormat(pattern = "yyyy-MM-dd") @ApiModelProperty(value = "维修时间") @TableField("repair_time") private Date repairTime; diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntRepairRecord.java b/inventory-dao/src/main/java/com/rzyc/model/EntRepairRecord.java index a8b7934..4b46bc5 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/EntRepairRecord.java +++ b/inventory-dao/src/main/java/com/rzyc/model/EntRepairRecord.java @@ -6,6 +6,8 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -66,7 +68,7 @@ public class EntRepairRecord implements Serializable { @TableField("repair_level") private Integer repairLevel; - @ApiModelProperty(value = "1. 否 2.是") + @ApiModelProperty(value = "关机 1.否 2.是") @TableField("shutdown") private Integer shutdown; @@ -74,7 +76,7 @@ public class EntRepairRecord implements Serializable { @TableField("down_time") private Double downTime; - @ApiModelProperty(value = "1.否 2.是") + @ApiModelProperty(value = "影响生产 1.否 2.是") @TableField("affected_generation") private Integer affectedGeneration; @@ -89,6 +91,7 @@ public class EntRepairRecord implements Serializable { @TableField("create_by") private String createBy; + @JsonFormat(pattern = "yyyy-MM-dd") @TableField("create_time") private Date createTime; diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntReportRepair.java b/inventory-dao/src/main/java/com/rzyc/model/EntReportRepair.java index 7261f63..c704149 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/EntReportRepair.java +++ b/inventory-dao/src/main/java/com/rzyc/model/EntReportRepair.java @@ -57,10 +57,22 @@ public class EntReportRepair implements Serializable { @TableField("modify_time") private Date modifyTime; + @ApiModelProperty(value = "报修人名") + @TableField(exist = false) + private String name; + @ApiModelProperty(value = "故障发生时间") @TableField("fault_occurrence_time") private String faultOccurrenceTime; + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public String getFaultOccurrenceTime() { return faultOccurrenceTime; } diff --git a/inventory-dao/src/main/java/com/rzyc/model/dto/EntEmExpertDto.java b/inventory-dao/src/main/java/com/rzyc/model/dto/EntEmExpertDto.java index 8e4e5d4..316e121 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/dto/EntEmExpertDto.java +++ b/inventory-dao/src/main/java/com/rzyc/model/dto/EntEmExpertDto.java @@ -44,6 +44,17 @@ public class EntEmExpertDto { @ApiModelProperty(value = "专家住址") private String entEmExpertAddress; + @ApiModelProperty(value = "专家工作的单位") + private String entEmWorkUnit; + + public String getEntEmWorkUnit() { + return entEmWorkUnit; + } + + public void setEntEmWorkUnit(String entEmWorkUnit) { + this.entEmWorkUnit = entEmWorkUnit; + } + public Integer getAge() { return age; } diff --git a/inventory-dao/src/main/java/com/rzyc/model/dto/InspectionRecordDto.java b/inventory-dao/src/main/java/com/rzyc/model/dto/InspectionRecordDto.java index 1afe092..0bc345f 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/dto/InspectionRecordDto.java +++ b/inventory-dao/src/main/java/com/rzyc/model/dto/InspectionRecordDto.java @@ -18,8 +18,6 @@ public class InspectionRecordDto { @ApiModelProperty(value = "送检记录id") private String inspectionId; - @ApiModelProperty(value = "送检设备id") - private Integer inspectionDeviceId; @ApiModelProperty(value = "送检组织") private String inspectionOrganization; @@ -36,6 +34,19 @@ public class InspectionRecordDto { @ApiModelProperty(value = "检查结果") private String inspectionText; + @ApiModelProperty(value = "设备id") + private String deviceId; + + + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + public String getInspectionId() { return inspectionId; } @@ -44,13 +55,6 @@ public class InspectionRecordDto { this.inspectionId = inspectionId; } - public Integer getInspectionDeviceId() { - return inspectionDeviceId; - } - - public void setInspectionDeviceId(Integer inspectionDeviceId) { - this.inspectionDeviceId = inspectionDeviceId; - } public String getInspectionOrganization() { return inspectionOrganization; diff --git a/inventory-dao/src/main/resources/mapper/EntDeviceInsCycleMapper.xml b/inventory-dao/src/main/resources/mapper/EntDeviceInsCycleMapper.xml index 28b7a7d..37178c8 100644 --- a/inventory-dao/src/main/resources/mapper/EntDeviceInsCycleMapper.xml +++ b/inventory-dao/src/main/resources/mapper/EntDeviceInsCycleMapper.xml @@ -54,6 +54,10 @@ select * from ent_device_ins_cycle where device_id = #{deviceId} + + update ent_device_ins_cycle set del_state = 2 where inspection_id = #{deviceInspectionCycleId} + + diff --git a/inventory-dao/src/main/resources/mapper/EntDeviceMaintenancePlanMapper.xml b/inventory-dao/src/main/resources/mapper/EntDeviceMaintenancePlanMapper.xml index 78265b5..98eadf7 100644 --- a/inventory-dao/src/main/resources/mapper/EntDeviceMaintenancePlanMapper.xml +++ b/inventory-dao/src/main/resources/mapper/EntDeviceMaintenancePlanMapper.xml @@ -36,4 +36,8 @@ select edmp.*,eu.name from ent_device_maintenance_plan edmp left join ent_user eu on edmp.maintenance_people_id = eu.ent_user_id where device_id = #{deviceId} + + + update ent_device_maintenance_plan set del_state = 2 where maintenance_plan_id = #{maintenancePlanId} + diff --git a/inventory-dao/src/main/resources/mapper/EntDeviceMaintenanceRecordMapper.xml b/inventory-dao/src/main/resources/mapper/EntDeviceMaintenanceRecordMapper.xml index 78c2674..dc87c2d 100644 --- a/inventory-dao/src/main/resources/mapper/EntDeviceMaintenanceRecordMapper.xml +++ b/inventory-dao/src/main/resources/mapper/EntDeviceMaintenanceRecordMapper.xml @@ -21,6 +21,7 @@ + @@ -31,11 +32,18 @@ update ent_device_maintenance_record set maintenance_status = #{data.maintenanceStatus} , maintenance_level = #{data.maintenanceLevel}, start_time = #{data.startTime},ent_time = #{data.entTime},maintenance_time_hour = #{data.maintenanceTimeHour}, maintenance_time_minute = #{data.maintenanceTimeMinute},maintenance_cost = #{data.maintenanceCost},shutdown_or_not = #{shutdownOrNot},down_time = #{data.downTime},maintenance_charge_person = #{data.maintenanceChargePerson}, - maintenance_requirement = #{data.maintenanceRequirement},job_description = #{data.jobDescription},modify_by = #{data.modifyBy},modify_time = #{modifyTime} + maintenance_requirement = #{data.maintenanceRequirement},job_description = #{data.jobDescription},modify_by = #{data.modifyBy},modify_time = #{data.modifyTime} where record_id = #{data.recordId} + + + update ent_device_maintenance_record set del_state = 1 where record_id = #{deviceEntInsRecordId} + diff --git a/inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml b/inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml index 79026d0..7fa2b8c 100644 --- a/inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml +++ b/inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml @@ -72,13 +72,12 @@ + + update ent_ins_record set del_state = 2 where ins_record_id = #{deviceEntInsRecordId} + + diff --git a/inventory-dao/src/main/resources/mapper/EntInspectionRecordMapper.xml b/inventory-dao/src/main/resources/mapper/EntInspectionRecordMapper.xml index 1f117d7..bd3ed47 100644 --- a/inventory-dao/src/main/resources/mapper/EntInspectionRecordMapper.xml +++ b/inventory-dao/src/main/resources/mapper/EntInspectionRecordMapper.xml @@ -5,7 +5,6 @@ - @@ -15,15 +14,19 @@ + - inspection_id, inspection_device_id, inspection_organization, inspection_user_id, inspection_time, inspection_state, inspection_text, create_by, create_time, modify_by, modify_time + inspection_id, inspection_organization, inspection_user_id, inspection_time, inspection_state, inspection_text, create_by, create_time, modify_by, modify_time - update ent_inspection_record set inspection_device_id = #{data.inspectionDeviceId}, inspection_organization = #{data.inspectionOrganization},inspection_user_id = #{data.inspectionUserId}, + update ent_inspection_record set device_id = #{data.deviceId}, inspection_organization = #{data.inspectionOrganization},inspection_user_id = #{data.inspectionUserId}, inspection_time = #{data.inspectionTime},inspection_state = #{data.inspectionState},inspection_text = #{data.inspectionText},modify_by = #{data.modifyBy},modify_time = #{data.modifyTime} + where inspection_id = #{data.inspectionId} + + + + update ent_inspection_record set del_state = 2 where inspection_id = #{data.inspectionId} diff --git a/inventory-dao/src/main/resources/mapper/EntRepairPlanMapper.xml b/inventory-dao/src/main/resources/mapper/EntRepairPlanMapper.xml index 517c3c5..100955c 100644 --- a/inventory-dao/src/main/resources/mapper/EntRepairPlanMapper.xml +++ b/inventory-dao/src/main/resources/mapper/EntRepairPlanMapper.xml @@ -29,7 +29,11 @@ update ent_repair_plan set repair_device_id = #{data.repairDeviceId},repair_level = #{data.repairLevel},repair_state =#{data.repairState},last_time_repair = #{data.lastTimeRepair}, repair_time = #{repairTime},description = #{description},modify_time = #{modifyTime},modify_by = #{modifyBy} + where repair_plan_id = #{repairPlanId} + + + update ent_repair_plan set del_state = 2 where repair_plan_id = #{repairPlanId} diff --git a/inventory-dao/src/main/resources/mapper/EntRepairRecordMapper.xml b/inventory-dao/src/main/resources/mapper/EntRepairRecordMapper.xml index 9791be0..a8e38fe 100644 --- a/inventory-dao/src/main/resources/mapper/EntRepairRecordMapper.xml +++ b/inventory-dao/src/main/resources/mapper/EntRepairRecordMapper.xml @@ -36,8 +36,12 @@ - update ent_report_repair set device_id = #{deviceId},repair_code = #{repairCode}, repair_time = #{repairTime}, cause_of_failure = #{causeOfFailure}, external_maintenance_unit = #{externalMaintenanceUnit}, external_maintenance_person_name = #{externalMaintenancePersonName}, repair_state = #{repairState}, repair_start_time = #{repairStartTime}, repair_end_time = #{repairEndTime}, repair_level = #{repairLevel}, shutdown = #{shutdown}, down_time = #{downTime}, affected_generation = #{affectedGeneration}, repair_cost = #{repairCost}, work_description = #{workDescription},modify_by = #{modifyBy}, modify_time= #{modifyTime} + update ent_repair_record set device_id = #{deviceId},repair_code = #{repairCode}, repair_time = #{repairTime}, cause_of_failure = #{causeOfFailure}, external_maintenance_unit = #{externalMaintenanceUnit}, external_maintenance_person_name = #{externalMaintenancePersonName}, repair_state = #{repairState}, repair_start_time = #{repairStartTime}, repair_end_time = #{repairEndTime}, repair_level = #{repairLevel}, shutdown = #{shutdown}, down_time = #{downTime}, affected_generation = #{affectedGeneration}, repair_cost = #{repairCost}, work_description = #{workDescription},modify_by = #{modifyBy}, modify_time= #{modifyTime} where repair_record_id = #{repairRecordId} + + update ent_repair_record set del_state = 2 where repair_record_id = #{repairRecordId} + + diff --git a/inventory-dao/src/main/resources/mapper/EntReportRepairMapper.xml b/inventory-dao/src/main/resources/mapper/EntReportRepairMapper.xml index 451d52f..e53b1ea 100644 --- a/inventory-dao/src/main/resources/mapper/EntReportRepairMapper.xml +++ b/inventory-dao/src/main/resources/mapper/EntReportRepairMapper.xml @@ -14,6 +14,7 @@ + @@ -22,7 +23,8 @@ @@ -33,4 +35,8 @@ where report_repair_id = #{data.reportRepairId} + + update ent_report_repair set del_state = 2 where report_repair_id = #{reportRepairId} + + diff --git a/inventory-dao/src/main/resources/mapper/NewsCntMapper.xml b/inventory-dao/src/main/resources/mapper/NewsCntMapper.xml index e586007..2fe5d94 100644 --- a/inventory-dao/src/main/resources/mapper/NewsCntMapper.xml +++ b/inventory-dao/src/main/resources/mapper/NewsCntMapper.xml @@ -594,7 +594,7 @@ nc.CreatedOn, nc.CreatedBy, nc.ModifiedOn, nc.ModifiedBy,nc.PublicTime FROM NewsCnt nc LEFT JOIN NewsClass nl ON nc.`NewsClassId` = nl.`NewsClassId` - WHERE nc.`NewTitle` LIKE #{‘} + WHERE nc.`NewTitle` LIKE #{condition} AND nc.`NewsClassId` IS NOT NULL AND nc.`NewsClassId` = #{newsClassId} diff --git a/inventory-dao/src/main/resources/mapper/ent/BaseInClassMapper.xml b/inventory-dao/src/main/resources/mapper/ent/BaseInClassMapper.xml index 7c10a1f..79e8c92 100644 --- a/inventory-dao/src/main/resources/mapper/ent/BaseInClassMapper.xml +++ b/inventory-dao/src/main/resources/mapper/ent/BaseInClassMapper.xml @@ -396,7 +396,6 @@ FROM `BaseInClass` bc LEFT JOIN BaseInClass sp ON bc.`SuperInId` = sp.`BaseInClassId` WHERE bc.`IndustryClassName` LIKE #{condition} - and bc.in_type = #{inType} ORDER BY bc.`IndustryClassName` ASC diff --git a/inventory-ent/src/main/java/com/rzyc/controller/EnterpriseEquipmentController.java b/inventory-ent/src/main/java/com/rzyc/controller/EnterpriseEquipmentController.java index e151688..e71b49a 100644 --- a/inventory-ent/src/main/java/com/rzyc/controller/EnterpriseEquipmentController.java +++ b/inventory-ent/src/main/java/com/rzyc/controller/EnterpriseEquipmentController.java @@ -439,8 +439,8 @@ public class EnterpriseEquipmentController extends BaseController { @PreAuthorize("hasAnyAuthority('operatingInstructions','operatingInstructions:update')") @MethodAnnotation(authorizations = {"operatingInstructions","operatingInstructions:update"},name = "操作规程") @ResponseBody - public SingleResult operatingInstructions(@RequestBody OperatingInstructionDto operatingInstructionDto)throws Exception{ - return pcBusinessService.operatingInstructions(operatingInstructionDto); + public SingleResult operatingInstructions(String name,String deviceId,Integer page,Integer pageSize)throws Exception{ + return pcBusinessService.operatingInstructions(name,deviceId,page,pageSize); } /** @@ -475,6 +475,139 @@ public class EnterpriseEquipmentController extends BaseController { } + /** + * 企业设备删除 + * @return Data + * @throws Exception + */ + @ApiOperation(value = "企业设备删除", notes = "企业设备删除") + @PostMapping(value = "/entDeviceDelete") + @PreAuthorize("hasAnyAuthority('entDevice:delete')") + @MethodAnnotation(authorizations = {"entDevice:delete"},name = "企业设备删除") + @ResponseBody + public SingleResult entDeviceDelete(@RequestParam(required = true) String deviceId)throws Exception{ + return pcBusinessService.entDeviceDelete(deviceId); + } + + /** + * 企业设备周期巡检删除 + * @return Data + * @throws Exception + */ + @ApiOperation(value = "企业设备周期巡检删除", notes = "企业设备周期巡检删除") + @PostMapping(value = "/deviceInspectionCycleDelete") + @PreAuthorize("hasAnyAuthority('deviceInspectionCycle:delete')") + @MethodAnnotation(authorizations = {"deviceInspectionCycle:delete"},name = "企业设备周期巡检删除") + @ResponseBody + public SingleResult deviceInspectionCycleDelete(@RequestParam(required = true) String deviceInspectionCycleId)throws Exception{ + return pcBusinessService.deviceInspectionCycleDelete(deviceInspectionCycleId); + } + + + /** + * 企业设备巡检记录删除 + * @return Data + * @throws Exception + */ + @ApiOperation(value = "企业设备巡检记录删除", notes = "企业设备巡检记录删除") + @PostMapping(value = "/deviceEntInsRecordDelete") + @PreAuthorize("hasAnyAuthority('deviceEntInsRecord:delete')") + @MethodAnnotation(authorizations = {"deviceEntInsRecord:delete"},name = "企业设备巡检记录删除") + @ResponseBody + public SingleResult deviceEntInsRecordDelete(@RequestParam(required = true) String deviceEntInsRecordId)throws Exception{ + return pcBusinessService.deviceEntInsRecordDelete(deviceEntInsRecordId); + } + + /** + * 企业设备保养计划删除 + * @return Data + * @throws Exception + */ + @ApiOperation(value = "企业设备保养计划删除", notes = "企业设备保养计划删除") + @PostMapping(value = "/entDeviceMaintenancePlanDelete") + @PreAuthorize("hasAnyAuthority('entDeviceMaintenancePlan:delete')") + @MethodAnnotation(authorizations = {"entDeviceMaintenancePlan:delete"},name = "企业设备保养计划删除") + @ResponseBody + public SingleResult entDeviceMaintenancePlanDelete(@RequestParam(required = true) String deviceEntInsPlanId)throws Exception{ + return pcBusinessService.entDeviceMaintenancePlanDelete(deviceEntInsPlanId); + } + + + + /** + * 企业设备保养记录删除 + * @return Data + * @throws Exception + */ + @ApiOperation(value = "企业设备保养记录删除", notes = "企业设备保养记录删除") + @PostMapping(value = "/entDeviceMaintenanceRecordDelete") + @PreAuthorize("hasAnyAuthority('entDeviceMaintenanceRecord:delete')") + @MethodAnnotation(authorizations = {"entDeviceMaintenanceRecord:delete"},name = "企业设备保养记录删除") + @ResponseBody + public SingleResult entDeviceMaintenanceRecordDelete(@RequestParam(required = true) String deviceEntInsRecordId)throws Exception{ + return pcBusinessService.entDeviceMaintenanceRecordDelete(deviceEntInsRecordId); + } + + /** + * 企业设备送检记录删除 + * @return Data + * @throws Exception + */ + @ApiOperation(value = "企业设备送检记录删除", notes = "企业设备送检记录删除") + @PostMapping(value = "/entDeviceEntInspectionRecordDelete") + @PreAuthorize("hasAnyAuthority('entDeviceEntInspectionRecord:delete')") + @MethodAnnotation(authorizations = {"entDeviceEntInspectionRecord:delete"},name = "企业设备送检记录删除") + @ResponseBody + public SingleResult entDeviceEntInspectionRecordDelete(@RequestParam(required = true) String deviceEntInspectionRecordId)throws Exception{ + return pcBusinessService.entDeviceEntInspectionRecordDelete(deviceEntInspectionRecordId); + } + + /** + * 企业设备维修计划删除 + * @return Data + * @throws Exception + */ + @ApiOperation(value = "企业设备维修计划删除", notes = "企业设备维修计划删除") + @PostMapping(value = "/entDeviceRepairPlanDelete") + @PreAuthorize("hasAnyAuthority('entDeviceEntRepairPlan:delete')") + @MethodAnnotation(authorizations = {"entDeviceEntRepairPlan:delete"},name = "企业设备维修计划删除") + @ResponseBody + public SingleResult entDeviceRepairPlanDelete(@RequestParam(required = true) String repairPlanId)throws Exception{ + return pcBusinessService.entDeviceRepairPlanDelete(repairPlanId); + } + + + /** + * 企业设备维修记录删除 + * @return Data + * @throws Exception + */ + @ApiOperation(value = "企业设备维修记录删除", notes = "企业设备维修记录删除") + @PostMapping(value = "/entDeviceRepairRecordDelete") + @PreAuthorize("hasAnyAuthority('entDeviceEntRepairRecord:delete')") + @MethodAnnotation(authorizations = {"entDeviceEntRepairRecord:delete"},name = "企业设备维修记录删除") + @ResponseBody + public SingleResult entDeviceRepairRecordDelete(@RequestParam(required = true) String repairRecordId)throws Exception{ + return pcBusinessService.entDeviceRepairRecordDelete(repairRecordId); + } + + /** + * 企业设备故障报修删除 + * @return Data + * @throws Exception + */ + @ApiOperation(value = "企业设备故障报修删除", notes = "企业设备故障报修删除") + @PostMapping(value = "/entDeviceReportRepairDelete") + @PreAuthorize("hasAnyAuthority('entDeviceReportRepair:delete')") + @MethodAnnotation(authorizations = {"entDeviceReportRepair:delete"},name = "企业设备故障报修删除") + @ResponseBody + public SingleResult entDeviceReportRepairDelete(@RequestParam(required = true) String reportRepair)throws Exception{ + return pcBusinessService.entDeviceReportRepairDelete(reportRepair); + } + + + + diff --git a/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java b/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java index f49942c..32057b7 100644 --- a/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java +++ b/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java @@ -22,6 +22,7 @@ import com.rzyc.model.dto.SparePartDto; import com.rzyc.model.ent.InEntList; import com.rzyc.model.ent.SysEnterprise; +import org.apache.commons.math3.analysis.function.Sin; import org.junit.Test; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -134,7 +135,7 @@ public class PcBusinessService extends BaseController { public List entUserPostTask(EntUserPostTaskDto entUserPostTaskDto) throws Exception { entUserPostTaskDto.setPostId(getUserPostId()); //当listId为null时,默认第一个日常清单,查询所有正在进行中的任务 - if (null == entUserPostTaskDto.getListId()){ + if (null == entUserPostTaskDto.getListId()&&entUserPostTaskDto.getTaskState()!=3){ //2为正在进行中 entUserPostTaskDto.setTaskState(1); } @@ -474,6 +475,7 @@ public class PcBusinessService extends BaseController { Date nextTime = calculationDays(addOrUpdateDeviceInspectionCycleDto.getInspectionCycle()); entDeviceInsCycle.setNextTimeInspection(nextTime); if (null != addOrUpdateDeviceInspectionCycleDto && null != addOrUpdateDeviceInspectionCycleDto.getInspectionId()){ + result = entDeviceInsCycleMapper.updateDeviceInspectionCycle(entDeviceInsCycle); }else { result = entDeviceInsCycleMapper.insert(entDeviceInsCycle); @@ -485,7 +487,7 @@ public class PcBusinessService extends BaseController { return singleResult; } - public SingleResult addOrUpdateInspectionRecord(AddOrUpdateInspectionRecordDto addOrUpdateInspectionRecordDto){ + public SingleResult addOrUpdateInspectionRecord(AddOrUpdateInspectionRecordDto addOrUpdateInspectionRecordDto) throws Exception { SingleResult singleResult = new SingleResult(); EntInsRecord entInsRecord = new EntInsRecord(); BeanUtils.copyProperties(addOrUpdateInspectionRecordDto,entInsRecord); @@ -496,11 +498,16 @@ public class PcBusinessService extends BaseController { if (cycle != null) { entInsRecord.setCycleId(cycle.getInspectionId()); } + entInsRecord.setModifyBy(getUserId()); + entInsRecord.setModifyTime(new Date()); result = entInsRecordMapper.updateInspectionRecord(entInsRecord); }else { if (cycle != null) { entInsRecord.setCycleId(cycle.getInspectionId()); } + entInsRecord.setInsRecordId(RandomNumber.getUUid()); + entInsRecord.setCreateBy(getUserId()); + entInsRecord.setCreateTime(new Date()); result = entInsRecordMapper.insert(entInsRecord); } if (result != 1 ){ @@ -647,6 +654,8 @@ public class PcBusinessService extends BaseController { entInspectionRecord.setInspectionId(RandomNumber.getUUid()); entInspectionRecord.setCreateBy(getUserId()); entInspectionRecord.setCreateTime(new Date()); + //state 1 是待检测 + entInspectionRecord.setInspectionState(1); result = entInspectionRecordMapper.insert(entInspectionRecord); } if (result != 1 ){ @@ -678,9 +687,9 @@ public class PcBusinessService extends BaseController { BeanUtils.copyProperties(reportRecordDto,entReportRepair); int result = 0; if (null != reportRecordDto && null != entReportRepair.getReportRepairId()){ - entReportRepairMapper.updateReportRecord(entReportRepair); + result = entReportRepairMapper.updateReportRecord(entReportRepair); }else { - entReportRepairMapper.insert(entReportRepair); + result = entReportRepairMapper.insert(entReportRepair); } if (result != 1 ){ singleResult.setCode(Code.ERROR.getCode()); @@ -690,10 +699,10 @@ public class PcBusinessService extends BaseController { } @PageOperation - public SingleResult operatingInstructions(OperatingInstructionDto operatingInstructionDto){ + public SingleResult operatingInstructions(String name,String deviceId,Integer page,Integer pageSize){ SingleResult SingleResult = new SingleResult(); - Page page = (Page) entOperatingInstructionMapper.selectOperatingInstructions(operatingInstructionDto.getName(),operatingInstructionDto.getDeviceId()); - SingleResult.setDataPager(page); + Page p = (Page) entOperatingInstructionMapper.selectOperatingInstructions(name,deviceId); + SingleResult.setDataPager(p); return SingleResult; } @@ -1009,14 +1018,18 @@ public class PcBusinessService extends BaseController { return singleResult; } - public SingleResult repairRecordUpdate(EntRepairRecordDto entRepairRecordDto){ + public SingleResult repairRecordUpdate(EntRepairRecordDto entRepairRecordDto) throws Exception { SingleResult singleResult = new SingleResult(); EntRepairRecord entRepairRecord = new EntRepairRecord(); BeanUtils.copyProperties(entRepairRecordDto,entRepairRecord); int result = 0; if (null != entRepairRecordDto && null != entRepairRecordDto.getRepairRecordId()){ + entRepairRecord.setModifyBy(getUserId()); + entRepairRecord.setModifyTime(new Date()); result =entRepairRecordMapper.repairRecordUpdate(entRepairRecord); }else { + entRepairRecord.setCreateBy(getUserId()); + entRepairRecord.setCreateTime(new Date()); result = entRepairRecordMapper.insert(entRepairRecord); } if (result <= 0){ @@ -1026,6 +1039,96 @@ public class PcBusinessService extends BaseController { return singleResult; } + public SingleResult entDeviceDelete(String deviceId){ + SingleResult singleResult = new SingleResult(); + int result = entDeviceMapper.updateDelState(deviceId); + if (result <= 0){ + singleResult.setCode(Code.ERROR.getCode()); + singleResult.setMessage(Message.ERROR); + } + return singleResult; + } + + public SingleResult deviceInspectionCycleDelete(String deviceInspectionCycleId){ + SingleResult singleResult = new SingleResult(); + int result = entDeviceInsCycleMapper.updateDelState(deviceInspectionCycleId); + if (result <= 0){ + singleResult.setCode(Code.ERROR.getCode()); + singleResult.setMessage(Message.ERROR); + } + return singleResult; + } + + public SingleResult deviceEntInsRecordDelete(String deviceEntInsRecordId){ + SingleResult singleResult = new SingleResult(); + int result = entInsRecordMapper.updateDelState(deviceEntInsRecordId); + if (result <= 0){ + singleResult.setCode(Code.ERROR.getCode()); + singleResult.setMessage(Message.ERROR); + } + return singleResult; + } + + public SingleResult entDeviceMaintenancePlanDelete(String deviceEntInsPlanId){ + SingleResult singleResult = new SingleResult(); + int result = entDeviceMaintenancePlanMapper.updateDelState(deviceEntInsPlanId); + if (result <= 0){ + singleResult.setCode(Code.ERROR.getCode()); + singleResult.setMessage(Message.ERROR); + } + return singleResult; + } + + + public SingleResult entDeviceMaintenanceRecordDelete(String deviceEntInsRecordId){ + SingleResult singleResult = new SingleResult(); + int result = entDeviceMaintenanceRecordMapper.updateDelState(deviceEntInsRecordId); + if (result <= 0){ + singleResult.setCode(Code.ERROR.getCode()); + singleResult.setMessage(Message.ERROR); + } + return singleResult; + } + + public SingleResult entDeviceEntInspectionRecordDelete(String deviceEntInspectionRecordId){ + SingleResult singleResult = new SingleResult(); + int result = entInspectionRecordMapper.updateDelState(deviceEntInspectionRecordId); + if (result <= 0){ + singleResult.setCode(Code.ERROR.getCode()); + singleResult.setMessage(Message.ERROR); + } + return singleResult; + } + + public SingleResult entDeviceRepairPlanDelete(String repairPlanId){ + SingleResult singleResult = new SingleResult(); + int result = entRepairPlanMapper.updateDelState(repairPlanId); + if (result <= 0){ + singleResult.setCode(Code.ERROR.getCode()); + singleResult.setMessage(Message.ERROR); + } + return singleResult; + } + + public SingleResult entDeviceRepairRecordDelete(String repairRecordId){ + SingleResult singleResult = new SingleResult(); + int result = entRepairRecordMapper.updateDelState(repairRecordId); + if (result <= 0){ + singleResult.setCode(Code.ERROR.getCode()); + singleResult.setMessage(Message.ERROR); + } + return singleResult; + } + + public SingleResult entDeviceReportRepairDelete(String reportRepair){ + SingleResult singleResult = new SingleResult(); + int result = entReportRepairMapper.updateDelState(reportRepair); + if (result <= 0){ + singleResult.setCode(Code.ERROR.getCode()); + singleResult.setMessage(Message.ERROR); + } + return singleResult; + } } diff --git a/inventory-gov/src/main/java/com/rzyc/controller/PcPersonalController.java b/inventory-gov/src/main/java/com/rzyc/controller/PcPersonalController.java index a77befc..bc126e6 100644 --- a/inventory-gov/src/main/java/com/rzyc/controller/PcPersonalController.java +++ b/inventory-gov/src/main/java/com/rzyc/controller/PcPersonalController.java @@ -33,6 +33,8 @@ import com.rzyc.model.personal.SysResource; import com.rzyc.model.user.*; import io.swagger.annotations.*; import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.beanutils.ConvertUtils; +import org.apache.commons.beanutils.converters.DateConverter; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; @@ -80,7 +82,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController { SysUser sysUser = sysUserMapper.findBySysUserName(sysusername); //登录的是政府用户 - if(null != sysUser && StringUtils.isNotBlank(sysUser.getUsertype()) && sysUser.getUsertype().equals("政府用户") & sysUser.getManageState() == IsManage.GOVERNMENT.getState()){ + if(null != sysUser && StringUtils.isNotBlank(sysUser.getUsertype()) && sysUser.getUsertype().equals("政府用户")){ String ps = PasswdFactory.encryptPasswd(sysUser.getSysuserid(), sysusername, syspassword); System.out.println("========" + ps); if(sysUser.getSyspassword().equals(ps)){ @@ -449,7 +451,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController { if(null != sysUser){ //更新履职进度 - getFactor(sysUser.getSystitle()); +// getFactor(sysUser.getSystitle()); UserDepart userDepart = listPerformMapper.userPerform(sysUser.getSysuserid()); @@ -1050,11 +1052,17 @@ public class PcPersonalController extends com.rzyc.controller.BaseController { public SingleResult addPerformRecord(@Valid @RequestBody AddPerformRecordDto addPerformRecordDto)throws Exception{ SingleResult result = new SingleResult<>(); ListDetailWithBLOBs listDetail = new ListDetailWithBLOBs(); + + DateConverter converter = new DateConverter(); + converter.setPattern(new String("yyyy-MM-dd")); + ConvertUtils.register(converter, Date.class); + + BeanUtils.copyProperties(listDetail,addPerformRecordDto); //处理时间 - listDetail.setStarttime(DateUtils.parseString2Date(addPerformRecordDto.getStartTime(),"yyyy-MM-dd")); - listDetail.setEndtime(DateUtils.parseString2Date(addPerformRecordDto.getEndTime(),"yyyy-MM-dd")); + listDetail.setStarttime(DateUtils.parseString2Date(addPerformRecordDto.getStarttime(),"yyyy-MM-dd")); + listDetail.setEndtime(DateUtils.parseString2Date(addPerformRecordDto.getEndtime(),"yyyy-MM-dd")); listDetail.setFinishtime(listDetail.getEndtime()); String chinaName = getChinaName(); @@ -1128,8 +1136,8 @@ public class PcPersonalController extends com.rzyc.controller.BaseController { BeanUtils.copyProperties(listDetail,addPerformRecordDto); //处理时间 - listDetail.setStarttime(DateUtils.parseString2Date(addPerformRecordDto.getStartTime(),"yyyy-MM-dd")); - listDetail.setEndtime(DateUtils.parseString2Date(addPerformRecordDto.getEndTime(),"yyyy-MM-dd")); + listDetail.setStarttime(DateUtils.parseString2Date(addPerformRecordDto.getStarttime(),"yyyy-MM-dd")); + listDetail.setEndtime(DateUtils.parseString2Date(addPerformRecordDto.getEndtime(),"yyyy-MM-dd")); listDetail.setFinishtime(listDetail.getEndtime()); String chinaName = getChinaName();