From eef2b7be47ba9f1fdc3e1ff1cd5cbd0c8d4aad11 Mon Sep 17 00:00:00 2001
From: 79493 <794930212@qq.com>
Date: Tue, 25 Oct 2022 17:34:27 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=AB=AF=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97->=E4=BF=9D=E5=85=BB=E8=AE=A1=E5=88=92?=
=?UTF-8?q?=EF=BC=8C=E4=BF=9D=E5=85=BB=E8=AE=B0=E5=BD=95=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../EntDeviceMaintenancePlanMapper.java | 17 ++
.../EntDeviceMaintenanceRecordMapper.java | 35 +++
.../java/com/rzyc/mapper/SparePartMapper.java | 17 ++
.../model/EntDeviceMaintenanceRecord.java | 231 ++++++++++++++++++
.../dto/EntDeviceMaintenancePlanDto.java | 125 ++++++++++
.../dto/EntDeviceMaintenanceRecordDto.java | 158 ++++++++++++
.../java/com/rzyc/model/dto/SparePartDto.java | 58 +++++
.../mapper/EntDeviceMaintenancePlanMapper.xml | 9 +
.../EntDeviceMaintenanceRecordMapper.xml | 41 ++++
.../main/resources/mapper/SparePartMapper.xml | 12 +
.../com/rzyc/controller/BaseController.java | 6 +-
.../EnterpriseEquipmentController.java | 81 ++++--
.../com/rzyc/service/PcBusinessService.java | 73 ++++++
13 files changed, 846 insertions(+), 17 deletions(-)
create mode 100644 inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMaintenanceRecordMapper.java
create mode 100644 inventory-dao/src/main/java/com/rzyc/model/EntDeviceMaintenanceRecord.java
create mode 100644 inventory-dao/src/main/java/com/rzyc/model/dto/EntDeviceMaintenancePlanDto.java
create mode 100644 inventory-dao/src/main/java/com/rzyc/model/dto/EntDeviceMaintenanceRecordDto.java
create mode 100644 inventory-dao/src/main/java/com/rzyc/model/dto/SparePartDto.java
create mode 100644 inventory-dao/src/main/resources/mapper/EntDeviceMaintenanceRecordMapper.xml
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 59dc11c..d29a5b5 100644
--- a/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMaintenancePlanMapper.java
+++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMaintenancePlanMapper.java
@@ -2,8 +2,11 @@ package com.rzyc.mapper;
import com.rzyc.model.EntDeviceMaintenancePlan;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
+import java.util.List;
+
/**
*
* Mapper 接口
@@ -15,4 +18,18 @@ import org.springframework.stereotype.Repository;
@Repository
public interface EntDeviceMaintenancePlanMapper extends BaseMapper {
+ /**
+ * 修改企业设备保养计划
+ * @param entDeviceMaintenancePlan 企业设备保养计划对象
+ * @return int
+ * */
+ int updateEntDeviceMaintenancePlan(@Param("entDeviceMaintenancePlan") EntDeviceMaintenancePlan entDeviceMaintenancePlan);
+
+
+ /**
+ * 查询企业设备保养计划
+ * @return list
+ * */
+ ListselectEntDeviceMaintenancePlanList();
+
}
diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMaintenanceRecordMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMaintenanceRecordMapper.java
new file mode 100644
index 0000000..6a40b1d
--- /dev/null
+++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMaintenanceRecordMapper.java
@@ -0,0 +1,35 @@
+package com.rzyc.mapper;
+
+import com.rzyc.model.EntDeviceMaintenanceRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ *
+ * Mapper 接口
+ *
+ *
+ * @author
+ * @since 2022-10-25
+ */
+@Repository
+public interface EntDeviceMaintenanceRecordMapper extends BaseMapper {
+
+ /**
+ * 修改企业保养记录
+ * @param entDeviceMaintenanceRecord
+ * @return int
+ * */
+ int UpdateEntDeviceMaintenanceRecord(@Param("data") EntDeviceMaintenanceRecord entDeviceMaintenanceRecord);
+
+
+ /**
+ * 查询企业保养记录
+ * @return list
+ * */
+ ListselectEntDeviceMaintenanceRecord();
+
+}
diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/SparePartMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/SparePartMapper.java
index e7d1922..d095639 100644
--- a/inventory-dao/src/main/java/com/rzyc/mapper/SparePartMapper.java
+++ b/inventory-dao/src/main/java/com/rzyc/mapper/SparePartMapper.java
@@ -4,6 +4,8 @@ import com.rzyc.model.SparePart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
+import java.util.List;
+
/**
*
* Mapper 接口
@@ -15,4 +17,19 @@ import org.springframework.stereotype.Repository;
@Repository
public interface SparePartMapper extends BaseMapper {
+ /**
+ * 查询共享备件
+ * @param name 备件名
+ * @return list
+ * */
+ ListsparePartList(String name);
+
+
+ /**
+ * 修改共享备件
+ * @param sparePart 共享备件
+ * @return int
+ * */
+ int updateSparePart(SparePart sparePart);
+
}
diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntDeviceMaintenanceRecord.java b/inventory-dao/src/main/java/com/rzyc/model/EntDeviceMaintenanceRecord.java
new file mode 100644
index 0000000..929cc9c
--- /dev/null
+++ b/inventory-dao/src/main/java/com/rzyc/model/EntDeviceMaintenanceRecord.java
@@ -0,0 +1,231 @@
+package com.rzyc.model;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ *
+ *
+ *
+ *
+ * @author
+ * @since 2022-10-25
+ */
+@TableName("ent_device_maintenance_record")
+@ApiModel(value="EntDeviceMaintenanceRecord对象", description="")
+public class EntDeviceMaintenanceRecord implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "保养记录")
+ @TableField("record_id")
+ private String recordId;
+
+ @ApiModelProperty(value = "保养状态")
+ @TableField("maintenance_status")
+ private Integer maintenanceStatus;
+
+ @ApiModelProperty(value = "1.日常保养 2.常规润滑 3.二级检修保养 4.三级检修保养 5.项目检修保养 6.年度检修保养")
+ @TableField("maintenance_level")
+ private Integer maintenanceLevel;
+
+ @ApiModelProperty(value = "开始时间")
+ @TableField("start_time")
+ private Date startTime;
+
+ @ApiModelProperty(value = "结束时间")
+ @TableField("ent_time")
+ private Date entTime;
+
+ @ApiModelProperty(value = "保养时间 小时")
+ @TableField("maintenance_time_hour")
+ private Integer maintenanceTimeHour;
+
+ @ApiModelProperty(value = "保养时间 分钟")
+ @TableField("maintenance_time_minute")
+ private Integer maintenanceTimeMinute;
+
+ @ApiModelProperty(value = "保养费用")
+ @TableField("maintenance_cost")
+ private BigDecimal maintenanceCost;
+
+ @ApiModelProperty(value = "1.否 2.是")
+ @TableField("shutdown_or_not")
+ private Integer shutdownOrNot;
+
+ @ApiModelProperty(value = "停机时间")
+ @TableField("down_time")
+ private String downTime;
+
+ @ApiModelProperty(value = "保养人员外键")
+ @TableField("maintenance_charge_person")
+ private String maintenanceChargePerson;
+
+ @ApiModelProperty(value = "保养要求")
+ @TableField("maintenance_requirement")
+ private String maintenanceRequirement;
+
+ @ApiModelProperty(value = "工作描述")
+ @TableField("job_description")
+ private String jobDescription;
+
+ @TableField("create_by")
+ private String createBy;
+
+ @TableField("create_time")
+ private Date createTime;
+
+ @TableField("modify_by")
+ private String modifyBy;
+
+ @TableField("modify_time")
+ private Date modifyTime;
+
+ public String getRecordId() {
+ return recordId;
+ }
+
+ public void setRecordId(String recordId) {
+ this.recordId = recordId;
+ }
+ public Integer getMaintenanceStatus() {
+ return maintenanceStatus;
+ }
+
+ public void setMaintenanceStatus(Integer maintenanceStatus) {
+ this.maintenanceStatus = maintenanceStatus;
+ }
+ public Integer getMaintenanceLevel() {
+ return maintenanceLevel;
+ }
+
+ public void setMaintenanceLevel(Integer maintenanceLevel) {
+ this.maintenanceLevel = maintenanceLevel;
+ }
+ public Date getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(Date startTime) {
+ this.startTime = startTime;
+ }
+ public Date getEntTime() {
+ return entTime;
+ }
+
+ public void setEntTime(Date entTime) {
+ this.entTime = entTime;
+ }
+ public Integer getMaintenanceTimeHour() {
+ return maintenanceTimeHour;
+ }
+
+ public void setMaintenanceTimeHour(Integer maintenanceTimeHour) {
+ this.maintenanceTimeHour = maintenanceTimeHour;
+ }
+ public Integer getMaintenanceTimeMinute() {
+ return maintenanceTimeMinute;
+ }
+
+ public void setMaintenanceTimeMinute(Integer maintenanceTimeMinute) {
+ this.maintenanceTimeMinute = maintenanceTimeMinute;
+ }
+ public BigDecimal getMaintenanceCost() {
+ return maintenanceCost;
+ }
+
+ public void setMaintenanceCost(BigDecimal maintenanceCost) {
+ this.maintenanceCost = maintenanceCost;
+ }
+ public Integer getShutdownOrNot() {
+ return shutdownOrNot;
+ }
+
+ public void setShutdownOrNot(Integer shutdownOrNot) {
+ this.shutdownOrNot = shutdownOrNot;
+ }
+ public String getDownTime() {
+ return downTime;
+ }
+
+ public void setDownTime(String downTime) {
+ this.downTime = downTime;
+ }
+ public String getMaintenanceChargePerson() {
+ return maintenanceChargePerson;
+ }
+
+ public void setMaintenanceChargePerson(String maintenanceChargePerson) {
+ this.maintenanceChargePerson = maintenanceChargePerson;
+ }
+ public String getMaintenanceRequirement() {
+ return maintenanceRequirement;
+ }
+
+ public void setMaintenanceRequirement(String maintenanceRequirement) {
+ this.maintenanceRequirement = maintenanceRequirement;
+ }
+ public String getJobDescription() {
+ return jobDescription;
+ }
+
+ public void setJobDescription(String jobDescription) {
+ this.jobDescription = jobDescription;
+ }
+ public String getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(String createBy) {
+ this.createBy = createBy;
+ }
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+ public String getModifyBy() {
+ return modifyBy;
+ }
+
+ public void setModifyBy(String modifyBy) {
+ this.modifyBy = modifyBy;
+ }
+ public Date getModifyTime() {
+ return modifyTime;
+ }
+
+ public void setModifyTime(Date modifyTime) {
+ this.modifyTime = modifyTime;
+ }
+
+ @Override
+ public String toString() {
+ return "EntDeviceMaintenanceRecord{" +
+ "recordId=" + recordId +
+ ", maintenanceStatus=" + maintenanceStatus +
+ ", maintenanceLevel=" + maintenanceLevel +
+ ", startTime=" + startTime +
+ ", entTime=" + entTime +
+ ", maintenanceTimeHour=" + maintenanceTimeHour +
+ ", maintenanceTimeMinute=" + maintenanceTimeMinute +
+ ", maintenanceCost=" + maintenanceCost +
+ ", shutdownOrNot=" + shutdownOrNot +
+ ", downTime=" + downTime +
+ ", maintenanceChargePerson=" + maintenanceChargePerson +
+ ", maintenanceRequirement=" + maintenanceRequirement +
+ ", jobDescription=" + jobDescription +
+ ", createBy=" + createBy +
+ ", createTime=" + createTime +
+ ", modifyBy=" + modifyBy +
+ ", modifyTime=" + modifyTime +
+ "}";
+ }
+}
diff --git a/inventory-dao/src/main/java/com/rzyc/model/dto/EntDeviceMaintenancePlanDto.java b/inventory-dao/src/main/java/com/rzyc/model/dto/EntDeviceMaintenancePlanDto.java
new file mode 100644
index 0000000..0c2d48f
--- /dev/null
+++ b/inventory-dao/src/main/java/com/rzyc/model/dto/EntDeviceMaintenancePlanDto.java
@@ -0,0 +1,125 @@
+package com.rzyc.model.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+/**
+ * 设备保养计划dto
+ * @author Xuwanxin
+ * @date 2022/10/25
+ * */
+public class EntDeviceMaintenancePlanDto {
+
+ @ApiModelProperty(value = "保养计划")
+ private Integer maintenancePlanId;
+
+ @ApiModelProperty(value = "1.日常保养 2.常规润滑 3.二级检修保养 4.三级检修保养 5.项目检修保养 6.年度检修保养")
+ private Integer maintenancePlanLevel;
+
+ @ApiModelProperty(value = "计划开始时间")
+ private Date maintenancePlanStartTime;
+
+ @ApiModelProperty(value = "计划结束时间")
+ private Date maintenancePlanEndTime;
+
+ @ApiModelProperty(value = "1.单次 2.多次")
+ private Integer circulationMode;
+
+ @ApiModelProperty(value = "循环周期")
+ private Integer cycleNumber;
+
+ @ApiModelProperty(value = "1.天 2.月 3.季 4.年")
+ private Integer cycleUnit;
+
+ @ApiModelProperty(value = "保养负责人id")
+ private String maintenancePeopleId;
+
+ @ApiModelProperty(value = "备件id")
+ private String sparePartId;
+
+ @ApiModelProperty(value = "计划描述")
+ private String maintenanceDescription;
+
+ public Integer getMaintenancePlanId() {
+ return maintenancePlanId;
+ }
+
+ public void setMaintenancePlanId(Integer maintenancePlanId) {
+ this.maintenancePlanId = maintenancePlanId;
+ }
+
+ public Integer getMaintenancePlanLevel() {
+ return maintenancePlanLevel;
+ }
+
+ public void setMaintenancePlanLevel(Integer maintenancePlanLevel) {
+ this.maintenancePlanLevel = maintenancePlanLevel;
+ }
+
+ public Date getMaintenancePlanStartTime() {
+ return maintenancePlanStartTime;
+ }
+
+ public void setMaintenancePlanStartTime(Date maintenancePlanStartTime) {
+ this.maintenancePlanStartTime = maintenancePlanStartTime;
+ }
+
+ public Date getMaintenancePlanEndTime() {
+ return maintenancePlanEndTime;
+ }
+
+ public void setMaintenancePlanEndTime(Date maintenancePlanEndTime) {
+ this.maintenancePlanEndTime = maintenancePlanEndTime;
+ }
+
+ public Integer getCirculationMode() {
+ return circulationMode;
+ }
+
+ public void setCirculationMode(Integer circulationMode) {
+ this.circulationMode = circulationMode;
+ }
+
+ public Integer getCycleNumber() {
+ return cycleNumber;
+ }
+
+ public void setCycleNumber(Integer cycleNumber) {
+ this.cycleNumber = cycleNumber;
+ }
+
+ public Integer getCycleUnit() {
+ return cycleUnit;
+ }
+
+ public void setCycleUnit(Integer cycleUnit) {
+ this.cycleUnit = cycleUnit;
+ }
+
+ public String getMaintenancePeopleId() {
+ return maintenancePeopleId;
+ }
+
+ public void setMaintenancePeopleId(String maintenancePeopleId) {
+ this.maintenancePeopleId = maintenancePeopleId;
+ }
+
+ public String getSparePartId() {
+ return sparePartId;
+ }
+
+ public void setSparePartId(String sparePartId) {
+ this.sparePartId = sparePartId;
+ }
+
+ public String getMaintenanceDescription() {
+ return maintenanceDescription;
+ }
+
+ public void setMaintenanceDescription(String maintenanceDescription) {
+ this.maintenanceDescription = maintenanceDescription;
+ }
+}
diff --git a/inventory-dao/src/main/java/com/rzyc/model/dto/EntDeviceMaintenanceRecordDto.java b/inventory-dao/src/main/java/com/rzyc/model/dto/EntDeviceMaintenanceRecordDto.java
new file mode 100644
index 0000000..1eb21ab
--- /dev/null
+++ b/inventory-dao/src/main/java/com/rzyc/model/dto/EntDeviceMaintenanceRecordDto.java
@@ -0,0 +1,158 @@
+package com.rzyc.model.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 企业设备维修记录dto
+ * @author Xuwanxin
+ * @date 2022/10/25
+ * */
+public class EntDeviceMaintenanceRecordDto {
+
+ @ApiModelProperty(value = "保养记录")
+ private String recordId;
+
+ @ApiModelProperty(value = "保养状态")
+ private Integer maintenanceStatus;
+
+ @ApiModelProperty(value = "1.日常保养 2.常规润滑 3.二级检修保养 4.三级检修保养 5.项目检修保养 6.年度检修保养")
+ private Integer maintenanceLevel;
+
+ @ApiModelProperty(value = "开始时间")
+ private Date startTime;
+
+ @ApiModelProperty(value = "结束时间")
+ private Date entTime;
+
+ @ApiModelProperty(value = "保养时间 小时")
+ private Integer maintenanceTimeHour;
+
+ @ApiModelProperty(value = "保养时间 分钟")
+ private Integer maintenanceTimeMinute;
+
+ @ApiModelProperty(value = "保养费用")
+ private BigDecimal maintenanceCost;
+
+ @ApiModelProperty(value = "1.否 2.是")
+ private Integer shutdownOrNot;
+
+ @ApiModelProperty(value = "停机时间")
+ private String downTime;
+
+ @ApiModelProperty(value = "保养人员外键")
+ private String maintenanceChargePerson;
+
+ @ApiModelProperty(value = "保养要求")
+ private String maintenanceRequirement;
+
+ @ApiModelProperty(value = "工作描述")
+ private String jobDescription;
+
+ public String getRecordId() {
+ return recordId;
+ }
+
+ public void setRecordId(String recordId) {
+ this.recordId = recordId;
+ }
+
+ public Integer getMaintenanceStatus() {
+ return maintenanceStatus;
+ }
+
+ public void setMaintenanceStatus(Integer maintenanceStatus) {
+ this.maintenanceStatus = maintenanceStatus;
+ }
+
+ public Integer getMaintenanceLevel() {
+ return maintenanceLevel;
+ }
+
+ public void setMaintenanceLevel(Integer maintenanceLevel) {
+ this.maintenanceLevel = maintenanceLevel;
+ }
+
+ public Date getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(Date startTime) {
+ this.startTime = startTime;
+ }
+
+ public Date getEntTime() {
+ return entTime;
+ }
+
+ public void setEntTime(Date entTime) {
+ this.entTime = entTime;
+ }
+
+ public Integer getMaintenanceTimeHour() {
+ return maintenanceTimeHour;
+ }
+
+ public void setMaintenanceTimeHour(Integer maintenanceTimeHour) {
+ this.maintenanceTimeHour = maintenanceTimeHour;
+ }
+
+ public Integer getMaintenanceTimeMinute() {
+ return maintenanceTimeMinute;
+ }
+
+ public void setMaintenanceTimeMinute(Integer maintenanceTimeMinute) {
+ this.maintenanceTimeMinute = maintenanceTimeMinute;
+ }
+
+ public BigDecimal getMaintenanceCost() {
+ return maintenanceCost;
+ }
+
+ public void setMaintenanceCost(BigDecimal maintenanceCost) {
+ this.maintenanceCost = maintenanceCost;
+ }
+
+ public Integer getShutdownOrNot() {
+ return shutdownOrNot;
+ }
+
+ public void setShutdownOrNot(Integer shutdownOrNot) {
+ this.shutdownOrNot = shutdownOrNot;
+ }
+
+ public String getDownTime() {
+ return downTime;
+ }
+
+ public void setDownTime(String downTime) {
+ this.downTime = downTime;
+ }
+
+ public String getMaintenanceChargePerson() {
+ return maintenanceChargePerson;
+ }
+
+ public void setMaintenanceChargePerson(String maintenanceChargePerson) {
+ this.maintenanceChargePerson = maintenanceChargePerson;
+ }
+
+ public String getMaintenanceRequirement() {
+ return maintenanceRequirement;
+ }
+
+ public void setMaintenanceRequirement(String maintenanceRequirement) {
+ this.maintenanceRequirement = maintenanceRequirement;
+ }
+
+ public String getJobDescription() {
+ return jobDescription;
+ }
+
+ public void setJobDescription(String jobDescription) {
+ this.jobDescription = jobDescription;
+ }
+}
diff --git a/inventory-dao/src/main/java/com/rzyc/model/dto/SparePartDto.java b/inventory-dao/src/main/java/com/rzyc/model/dto/SparePartDto.java
new file mode 100644
index 0000000..9752176
--- /dev/null
+++ b/inventory-dao/src/main/java/com/rzyc/model/dto/SparePartDto.java
@@ -0,0 +1,58 @@
+package com.rzyc.model.dto;
+
+/**
+ * 备件表dto
+ * @author Xuwanxin
+ * @date 2022/10/25
+ * */
+public class SparePartDto {
+ private String SparePartId;
+
+ private String usedId;
+
+ private String name;
+
+ private String specificationModel;
+
+ private String sparePartNumber;
+
+ public String getSparePartId() {
+ return SparePartId;
+ }
+
+ public void setSparePartId(String sparePartId) {
+ SparePartId = sparePartId;
+ }
+
+ public String getUsedId() {
+ return usedId;
+ }
+
+ public void setUsedId(String usedId) {
+ this.usedId = usedId;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getSpecificationModel() {
+ return specificationModel;
+ }
+
+ public void setSpecificationModel(String specificationModel) {
+ this.specificationModel = specificationModel;
+ }
+
+ public String getSparePartNumber() {
+ return sparePartNumber;
+ }
+
+ public void setSparePartNumber(String sparePartNumber) {
+ this.sparePartNumber = sparePartNumber;
+ }
+}
diff --git a/inventory-dao/src/main/resources/mapper/EntDeviceMaintenancePlanMapper.xml b/inventory-dao/src/main/resources/mapper/EntDeviceMaintenancePlanMapper.xml
index ba64b68..6bc815b 100644
--- a/inventory-dao/src/main/resources/mapper/EntDeviceMaintenancePlanMapper.xml
+++ b/inventory-dao/src/main/resources/mapper/EntDeviceMaintenancePlanMapper.xml
@@ -25,4 +25,13 @@
maintenance_plan_id, maintenance_plan_level, maintenance_plan_start_time, maintenance_plan_end_time, circulation_mode, cycle_number, cycle_unit, maintenance_people_id, spare_part_id, maintenance_description, create_by, create_time, modify_by, modify_time
+
+ update ent_device_maintenance_plan set maintenance_plan_level = #{maintenancePlanLevel} ,maintenance_plan_start_time = #{maintenancePlanStartTime} ,maintenance_plan_end_time = #{maintenancePlanEndTime} ,circulation_mode = #{circulationMode}, cycle_number = #{cycleNumber},
+ cycle_unit = #{cycleUnit},maintenance_people_id = #{maintenancePeopleId},spare_part_id = #{sparePartId},maintenance_description = #{maintenanceDescription}
+ 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
new file mode 100644
index 0000000..42b956f
--- /dev/null
+++ b/inventory-dao/src/main/resources/mapper/EntDeviceMaintenanceRecordMapper.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ record_id, maintenance_status, maintenance_level, start_time, ent_time, maintenance_time_hour, maintenance_time_minute, maintenance_cost, shutdown_or_not, down_time, maintenance_charge_person, maintenance_requirement, job_description, create_by, create_time, modify_by, modify_time
+
+
+
+ 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}
+
+
+
+
+
diff --git a/inventory-dao/src/main/resources/mapper/SparePartMapper.xml b/inventory-dao/src/main/resources/mapper/SparePartMapper.xml
index bbc6495..207994c 100644
--- a/inventory-dao/src/main/resources/mapper/SparePartMapper.xml
+++ b/inventory-dao/src/main/resources/mapper/SparePartMapper.xml
@@ -20,4 +20,16 @@
spare_part_id, used_id, name, specification_model, spare_part_number, create_time, create_by, modify_by, modify_time
+
+
+
+
+ update spare_part set used_id = #{usedId} ,specification_model = #{specificationModel},spare_part_number = #{sparePartNumber} where spare_part_id = #{sparePartId}
+
+
diff --git a/inventory-ent/src/main/java/com/rzyc/controller/BaseController.java b/inventory-ent/src/main/java/com/rzyc/controller/BaseController.java
index 72f8b50..b7732f3 100644
--- a/inventory-ent/src/main/java/com/rzyc/controller/BaseController.java
+++ b/inventory-ent/src/main/java/com/rzyc/controller/BaseController.java
@@ -488,7 +488,7 @@ public class BaseController {
@Autowired
protected EntInsRecordMapper entInsRecordMapper;
- //企业设备维护记录
+ //企业设备维护计划
@Autowired
protected EntDeviceMaintenancePlanMapper entDeviceMaintenancePlanMapper;
@@ -496,6 +496,10 @@ public class BaseController {
@Autowired
protected EntDeviceInsCycleMapper entDeviceInsCycleMapper;
+ //企业设备维修记录
+ @Autowired
+ protected EntDeviceMaintenanceRecordMapper entDeviceMaintenanceRecordMapper;
+
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 b90c72a..abf927a 100644
--- a/inventory-ent/src/main/java/com/rzyc/controller/EnterpriseEquipmentController.java
+++ b/inventory-ent/src/main/java/com/rzyc/controller/EnterpriseEquipmentController.java
@@ -4,11 +4,7 @@ package com.rzyc.controller;
import com.common.utils.model.SingleResult;
import com.rzyc.config.MethodAnnotation;
import com.rzyc.model.EntDevice;
-import com.rzyc.model.EntDeviceType;
-import com.rzyc.model.dto.AddOrUpdateDeviceInspectionCycleDto;
-import com.rzyc.model.dto.AddOrUpdateEntEquipmentDto;
-import com.rzyc.model.dto.AddOrUpdateEntEquipmentTypeDto;
-import com.rzyc.model.dto.AddOrUpdateInspectionRecordDto;
+import com.rzyc.model.dto.*;
import com.rzyc.service.PcBusinessService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -181,8 +177,8 @@ public class EnterpriseEquipmentController extends BaseController {
*/
@ApiOperation(value = "设备巡检记录", notes = "设备巡检记录")
@PostMapping(value = "/inspectionRecord")
- @PreAuthorize("hasAnyAuthority('inspectionRecord,inspectionRecord:update')")
- @MethodAnnotation(authorizations = {"inspectionRecord,inspectionRecord:update"},name = "设备巡检记录")
+ @PreAuthorize("hasAnyAuthority('inspectionRecord','inspectionRecord:update')")
+ @MethodAnnotation(authorizations = {"inspectionRecord","inspectionRecord:update"},name = "设备巡检记录")
@ResponseBody
public SingleResult inspectionRecord(String inspectionRecordName)throws Exception{
return pcBusinessService.selectInspectionRecord(inspectionRecordName);
@@ -194,40 +190,93 @@ public class EnterpriseEquipmentController extends BaseController {
* 备件列表
* @return 备件列表
* @throws Exception
- *
**/
-
+ @ApiOperation(value = "备件列表", notes = "备件列表")
+ @GetMapping(value = "/sparePartList")
+ @PreAuthorize("hasAnyAuthority('sparePartList','sparePartList:update')")
+ @MethodAnnotation(authorizations = {"sparePartList","sparePartList:update"},name = "备件列表")
+ @ResponseBody
+ public SingleResult sparePartList(String name)throws Exception{
+ return pcBusinessService.sparePartList(name);
+ }
/**
* 备件列表-新增和修改
* @return 备件列表-新增和修改
* @throws Exception
- *
**/
+ @ApiOperation(value = "备件列表-新增和修改", notes = "备件列表-新增和修改")
+ @PostMapping(value = "/sparePartUpdate")
+ @PreAuthorize("hasAnyAuthority('sparePartList:update')")
+ @MethodAnnotation(authorizations = {"sparePartList:update"},name = "备件列表-新增和修改")
+ @ResponseBody
+ public SingleResult sparePartUpdate(SparePartDto sparePartDto)throws Exception{
+ return pcBusinessService.sparePartUpdate(sparePartDto);
+ }
/**
- * 保养计划
+ * 保养计划-新增和修改
* @return 保养计划-新增和修改
* @throws Exception
- *
**/
-
+ @ApiOperation(value = "保养计划-新增和修改", notes = "保养计划-新增和修改")
+ @PostMapping(value = "/entDeviceMaintenancePlanUpdate")
+ @PreAuthorize("hasAnyAuthority('entDeviceMaintenancePlan:update')")
+ @MethodAnnotation(authorizations = {"entDeviceMaintenancePlan:update"},name = "保养计划-新增和修改")
+ @ResponseBody
+ public SingleResult entDeviceMaintenancePlanUpdate(EntDeviceMaintenancePlanDto deviceMaintenancePlanDto)throws Exception{
+ return pcBusinessService.entDeviceMaintenancePlanUpdate(deviceMaintenancePlanDto);
+ }
/**
* 保养计划列表
* @return 保养计划列表
* @throws Exception
- *
**/
+ @ApiOperation(value = "保养计划列表", notes = "保养计划列表")
+ @GetMapping(value = "/entDeviceMaintenancePlan")
+ @PreAuthorize("hasAnyAuthority('entDeviceMaintenancePlan','entDeviceMaintenancePlan:update')")
+ @MethodAnnotation(authorizations = {"entDeviceMaintenancePlan","entDeviceMaintenancePlan:update"},name = "保养计划列表")
+ @ResponseBody
+ public SingleResult entDeviceMaintenancePlan()throws Exception{
+ return pcBusinessService.entDeviceMaintenancePlan();
+ }
+
+
+
+ /**
+ * 保养记录-新增和修改
+ * @return 保养记录-新增和修改
+ * @throws Exception
+ **/
+ @ApiOperation(value = "保养记录-新增和修改", notes = "保养记录-新增和修改")
+ @PostMapping(value = "/entDeviceMaintenanceRecordUpdate")
+ @PreAuthorize("hasAnyAuthority('entDeviceMaintenanceRecord:update')")
+ @MethodAnnotation(authorizations = {"entDeviceMaintenanceRecord:update"},name = "保养记录-新增和修改")
+ @ResponseBody
+ public SingleResult entDeviceMaintenanceRecordUpdate(EntDeviceMaintenanceRecordDto entDeviceMaintenanceRecordDto)throws Exception{
+ return pcBusinessService.entDeviceMaintenanceRecordUpdate(entDeviceMaintenanceRecordDto);
+ }
-
-
+ /**
+ * 保养记录
+ * @return 保养记录
+ * @throws Exception
+ **/
+ @ApiOperation(value = "保养记录", notes = "保养记录")
+ @GetMapping(value = "/entDeviceMaintenanceRecord")
+ @PreAuthorize("hasAnyAuthority('entDeviceMaintenanceRecord','entDeviceMaintenanceRecord:update')")
+ @MethodAnnotation(authorizations = {"entDeviceMaintenanceRecord","entDeviceMaintenanceRecord:update"},name = "保养记录")
+ @ResponseBody
+ public SingleResult entDeviceMaintenanceRecord()throws Exception{
+ return pcBusinessService.entDeviceMaintenanceRecord();
+ }
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 d290aba..a2b3f31 100644
--- a/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java
+++ b/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java
@@ -14,6 +14,7 @@ import com.rzyc.model.*;
import com.rzyc.model.dto.*;
import com.rzyc.model.ent.EntPost;
import com.rzyc.model.ent.EntUser;
+import com.rzyc.model.dto.SparePartDto;
import com.rzyc.model.ent.SysEnterprise;
import org.springframework.beans.BeanUtils;
@@ -439,6 +440,78 @@ public class PcBusinessService extends BaseController {
return singleResult;
}
+ public SingleResult sparePartList(String name){
+ SingleResult singleResult = new SingleResult();
+ ListsparePartList = sparePartMapper.sparePartList(name);
+ singleResult.setData(sparePartList);
+ return singleResult;
+ }
+
+ public SingleResult sparePartUpdate(SparePartDto sparePartDto){
+ SingleResult singleResult = new SingleResult();
+ int result = 0;
+ SparePart sparePart = new SparePart();
+ BeanUtils.copyProperties(sparePartDto,sparePart);
+ if (null != sparePart && null != sparePart.getSparePartId()){
+ result = sparePartMapper.updateSparePart(sparePart);
+ }else {
+ result = sparePartMapper.insert(sparePart);
+ }
+ if (result != 1 ){
+ singleResult.setCode(Code.ERROR.getCode());
+ singleResult.setMessage(Message.ERROR);
+ }
+ return singleResult;
+ }
+
+ public SingleResult entDeviceMaintenancePlanUpdate(EntDeviceMaintenancePlanDto entDeviceMaintenancePlanDto){
+ SingleResult singleResult = new SingleResult();
+ EntDeviceMaintenancePlan entDeviceMaintenancePlan = new EntDeviceMaintenancePlan();
+ BeanUtils.copyProperties(entDeviceMaintenancePlanDto,entDeviceMaintenancePlan);
+ int result = 0;
+ if (null != entDeviceMaintenancePlanDto && null != entDeviceMaintenancePlan.getMaintenancePlanId()){
+ result = entDeviceMaintenancePlanMapper.updateEntDeviceMaintenancePlan(entDeviceMaintenancePlan);
+ }else {
+ result = entDeviceMaintenancePlanMapper.insert(entDeviceMaintenancePlan);
+ }
+ if (result != 1 ){
+ singleResult.setCode(Code.ERROR.getCode());
+ singleResult.setMessage(Message.ERROR);
+ }
+ return singleResult;
+ }
+
+ public SingleResult entDeviceMaintenancePlan(){
+ SingleResult singleResult = new SingleResult();
+ List list = entDeviceMaintenancePlanMapper.selectEntDeviceMaintenancePlanList();
+ singleResult.setData(list);
+ return singleResult;
+ }
+
+ public SingleResult entDeviceMaintenanceRecordUpdate(EntDeviceMaintenanceRecordDto entDeviceMaintenanceRecordDto){
+ SingleResult singleResult = new SingleResult();
+ int result = 0;
+ EntDeviceMaintenanceRecord entDeviceMaintenanceRecord = new EntDeviceMaintenanceRecord();
+ BeanUtils.copyProperties(entDeviceMaintenanceRecordDto,entDeviceMaintenanceRecord);
+ if (null != entDeviceMaintenanceRecordDto && null != entDeviceMaintenanceRecord.getRecordId()){
+ result = entDeviceMaintenanceRecordMapper.UpdateEntDeviceMaintenanceRecord(entDeviceMaintenanceRecord);
+ }else {
+ result = entDeviceMaintenanceRecordMapper.insert(entDeviceMaintenanceRecord);
+ }
+ if (result != 1 ){
+ singleResult.setCode(Code.ERROR.getCode());
+ singleResult.setMessage(Message.ERROR);
+ }
+ return singleResult;
+ }
+
+ public SingleResult entDeviceMaintenanceRecord(){
+ SingleResult singleResult = new SingleResult();
+ Listlist = entDeviceMaintenanceRecordMapper.selectEntDeviceMaintenanceRecord();
+ singleResult.setData(list);
+ return singleResult;
+ }
+