企业端设备模块->企业端PC,小程序接口调试,部分设备删除接口
This commit is contained in:
parent
f049784fcf
commit
fe42ee6ad3
|
|
@ -55,4 +55,13 @@ public interface EntDeviceInsCycleMapper extends BaseMapper<EntDeviceInsCycle> {
|
||||||
* @return 周期巡检
|
* @return 周期巡检
|
||||||
* */
|
* */
|
||||||
EntDeviceInsCycle selectByDeviceId(String deviceId);
|
EntDeviceInsCycle selectByDeviceId(String deviceId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除周期巡检
|
||||||
|
* @param deviceInspectionCycleId 周期巡检id
|
||||||
|
* @return int
|
||||||
|
* */
|
||||||
|
int updateDelState(String deviceInspectionCycleId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,5 +35,12 @@ public interface EntDeviceMaintenancePlanMapper extends BaseMapper<EntDeviceMain
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询企业设备保养计划
|
||||||
|
* @param maintenancePlanId 保养计划主键
|
||||||
|
* @return int
|
||||||
|
* */
|
||||||
|
int updateDelState(String maintenancePlanId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,4 +62,12 @@ public interface EntDeviceMapper extends BaseMapper<EntDevice> {
|
||||||
* */
|
* */
|
||||||
List<EntDevice> selectEntEquipmentOverdue(String enterpriseId);
|
List<EntDevice> selectEntEquipmentOverdue(String enterpriseId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 软删除设备
|
||||||
|
* @param deviceId 设备id
|
||||||
|
* @return int
|
||||||
|
* */
|
||||||
|
int updateDelState(String deviceId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,12 @@ public interface EntInsRecordMapper extends BaseMapper<EntInsRecord> {
|
||||||
List<EntInsRecord> selectInspectionRecord(@Param("deviceId") String deviceId,@Param("inspectionRecordName") String inspectionRecordName);
|
List<EntInsRecord> selectInspectionRecord(@Param("deviceId") String deviceId,@Param("inspectionRecordName") String inspectionRecordName);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 软删除巡检记录
|
||||||
|
* @param deviceEntInsRecordId 巡检记录主键
|
||||||
|
* @return int
|
||||||
|
* */
|
||||||
|
int updateDelState(String deviceEntInsRecordId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,16 @@ public class EntDeviceMaintenanceRecord implements Serializable {
|
||||||
@ApiModelProperty(value = "设备id")
|
@ApiModelProperty(value = "设备id")
|
||||||
private String deviceId;
|
private String deviceId;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDeviceId() {
|
public String getDeviceId() {
|
||||||
return deviceId;
|
return deviceId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,17 @@ public class EntEmExpert implements Serializable {
|
||||||
@TableField("modify_time")
|
@TableField("modify_time")
|
||||||
private Date modifyTime;
|
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() {
|
public Integer getAge() {
|
||||||
return age;
|
return age;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import java.util.Date;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
@ -26,11 +28,13 @@ public class EntEmRehearsal implements Serializable {
|
||||||
@TableId("ent_em_rehearsal_id")
|
@TableId("ent_em_rehearsal_id")
|
||||||
private String entEmRehearsalId;
|
private String entEmRehearsalId;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "应急演练开始时间")
|
@ApiModelProperty(value = "应急演练开始时间")
|
||||||
@TableField("ent_em_rehearsal_start_time")
|
@TableField("ent_em_rehearsal_start_time")
|
||||||
private Date entEmRehearsalStartTime;
|
private Date entEmRehearsalStartTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "应急演练开始时间")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "应急演练结束时间")
|
||||||
@TableField("ent_em_rehearsal_end_time")
|
@TableField("ent_em_rehearsal_end_time")
|
||||||
private Date entEmRehearsalEndTime;
|
private Date entEmRehearsalEndTime;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import java.util.Date;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
@ -26,9 +28,6 @@ public class EntInspectionRecord implements Serializable {
|
||||||
@TableId("inspection_id")
|
@TableId("inspection_id")
|
||||||
private String inspectionId;
|
private String inspectionId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "送检设备id")
|
|
||||||
@TableField("inspection_device_id")
|
|
||||||
private String inspectionDeviceId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "送检组织")
|
@ApiModelProperty(value = "送检组织")
|
||||||
@TableField("inspection_organization")
|
@TableField("inspection_organization")
|
||||||
|
|
@ -38,6 +37,7 @@ public class EntInspectionRecord implements Serializable {
|
||||||
@TableField("inspection_user_id")
|
@TableField("inspection_user_id")
|
||||||
private String inspectionUserId;
|
private String inspectionUserId;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "送检时间")
|
@ApiModelProperty(value = "送检时间")
|
||||||
@TableField("inspection_time")
|
@TableField("inspection_time")
|
||||||
private Date inspectionTime;
|
private Date inspectionTime;
|
||||||
|
|
@ -66,6 +66,19 @@ public class EntInspectionRecord implements Serializable {
|
||||||
@TableField("device_id")
|
@TableField("device_id")
|
||||||
private String deviceId;
|
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() {
|
public String getDeviceId() {
|
||||||
return deviceId;
|
return deviceId;
|
||||||
}
|
}
|
||||||
|
|
@ -82,14 +95,6 @@ public class EntInspectionRecord implements Serializable {
|
||||||
this.inspectionId = inspectionId;
|
this.inspectionId = inspectionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getInspectionDeviceId() {
|
|
||||||
return inspectionDeviceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInspectionDeviceId(String inspectionDeviceId) {
|
|
||||||
this.inspectionDeviceId = inspectionDeviceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInspectionOrganization() {
|
public String getInspectionOrganization() {
|
||||||
return inspectionOrganization;
|
return inspectionOrganization;
|
||||||
}
|
}
|
||||||
|
|
@ -158,7 +163,6 @@ public class EntInspectionRecord implements Serializable {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "EntInspectionRecord{" +
|
return "EntInspectionRecord{" +
|
||||||
"inspectionId=" + inspectionId +
|
"inspectionId=" + inspectionId +
|
||||||
", inspectionDeviceId=" + inspectionDeviceId +
|
|
||||||
", inspectionOrganization=" + inspectionOrganization +
|
", inspectionOrganization=" + inspectionOrganization +
|
||||||
", inspectionUserId=" + inspectionUserId +
|
", inspectionUserId=" + inspectionUserId +
|
||||||
", inspectionTime=" + inspectionTime +
|
", inspectionTime=" + inspectionTime +
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import java.util.Date;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
@ -37,10 +39,12 @@ public class EntRepairPlan implements Serializable {
|
||||||
@TableField("repair_state")
|
@TableField("repair_state")
|
||||||
private Integer repairState;
|
private Integer repairState;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "上一次维修时间")
|
@ApiModelProperty(value = "上一次维修时间")
|
||||||
@TableField("last_time_repair")
|
@TableField("last_time_repair")
|
||||||
private Date lastTimeRepair;
|
private Date lastTimeRepair;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "维修时间")
|
@ApiModelProperty(value = "维修时间")
|
||||||
@TableField("repair_time")
|
@TableField("repair_time")
|
||||||
private Date repairTime;
|
private Date repairTime;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ import java.util.Date;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
@ -66,7 +68,7 @@ public class EntRepairRecord implements Serializable {
|
||||||
@TableField("repair_level")
|
@TableField("repair_level")
|
||||||
private Integer repairLevel;
|
private Integer repairLevel;
|
||||||
|
|
||||||
@ApiModelProperty(value = "1. 否 2.是")
|
@ApiModelProperty(value = "关机 1.否 2.是")
|
||||||
@TableField("shutdown")
|
@TableField("shutdown")
|
||||||
private Integer shutdown;
|
private Integer shutdown;
|
||||||
|
|
||||||
|
|
@ -74,7 +76,7 @@ public class EntRepairRecord implements Serializable {
|
||||||
@TableField("down_time")
|
@TableField("down_time")
|
||||||
private Double downTime;
|
private Double downTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "1.否 2.是")
|
@ApiModelProperty(value = "影响生产 1.否 2.是")
|
||||||
@TableField("affected_generation")
|
@TableField("affected_generation")
|
||||||
private Integer affectedGeneration;
|
private Integer affectedGeneration;
|
||||||
|
|
||||||
|
|
@ -89,6 +91,7 @@ public class EntRepairRecord implements Serializable {
|
||||||
@TableField("create_by")
|
@TableField("create_by")
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@TableField("create_time")
|
@TableField("create_time")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,10 +57,22 @@ public class EntReportRepair implements Serializable {
|
||||||
@TableField("modify_time")
|
@TableField("modify_time")
|
||||||
private Date modifyTime;
|
private Date modifyTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "报修人名")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty(value = "故障发生时间")
|
@ApiModelProperty(value = "故障发生时间")
|
||||||
@TableField("fault_occurrence_time")
|
@TableField("fault_occurrence_time")
|
||||||
private String faultOccurrenceTime;
|
private String faultOccurrenceTime;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
public String getFaultOccurrenceTime() {
|
public String getFaultOccurrenceTime() {
|
||||||
return faultOccurrenceTime;
|
return faultOccurrenceTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,17 @@ public class EntEmExpertDto {
|
||||||
@ApiModelProperty(value = "专家住址")
|
@ApiModelProperty(value = "专家住址")
|
||||||
private String entEmExpertAddress;
|
private String entEmExpertAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "专家工作的单位")
|
||||||
|
private String entEmWorkUnit;
|
||||||
|
|
||||||
|
public String getEntEmWorkUnit() {
|
||||||
|
return entEmWorkUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEntEmWorkUnit(String entEmWorkUnit) {
|
||||||
|
this.entEmWorkUnit = entEmWorkUnit;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getAge() {
|
public Integer getAge() {
|
||||||
return age;
|
return age;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@ public class InspectionRecordDto {
|
||||||
@ApiModelProperty(value = "送检记录id")
|
@ApiModelProperty(value = "送检记录id")
|
||||||
private String inspectionId;
|
private String inspectionId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "送检设备id")
|
|
||||||
private Integer inspectionDeviceId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "送检组织")
|
@ApiModelProperty(value = "送检组织")
|
||||||
private String inspectionOrganization;
|
private String inspectionOrganization;
|
||||||
|
|
@ -36,6 +34,19 @@ public class InspectionRecordDto {
|
||||||
@ApiModelProperty(value = "检查结果")
|
@ApiModelProperty(value = "检查结果")
|
||||||
private String inspectionText;
|
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() {
|
public String getInspectionId() {
|
||||||
return inspectionId;
|
return inspectionId;
|
||||||
}
|
}
|
||||||
|
|
@ -44,13 +55,6 @@ public class InspectionRecordDto {
|
||||||
this.inspectionId = inspectionId;
|
this.inspectionId = inspectionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getInspectionDeviceId() {
|
|
||||||
return inspectionDeviceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInspectionDeviceId(Integer inspectionDeviceId) {
|
|
||||||
this.inspectionDeviceId = inspectionDeviceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInspectionOrganization() {
|
public String getInspectionOrganization() {
|
||||||
return inspectionOrganization;
|
return inspectionOrganization;
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,10 @@
|
||||||
select * from ent_device_ins_cycle where device_id = #{deviceId}
|
select * from ent_device_ins_cycle where device_id = #{deviceId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateDelState">
|
||||||
|
update ent_device_ins_cycle set del_state = 2 where inspection_id = #{deviceInspectionCycleId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -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
|
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}
|
where device_id = #{deviceId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateDelState">
|
||||||
|
update ent_device_maintenance_plan set del_state = 2 where maintenance_plan_id = #{maintenancePlanId}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
<result column="create_time" property="createTime" />
|
<result column="create_time" property="createTime" />
|
||||||
<result column="modify_by" property="modifyBy" />
|
<result column="modify_by" property="modifyBy" />
|
||||||
<result column="modify_time" property="modifyTime" />
|
<result column="modify_time" property="modifyTime" />
|
||||||
|
<result column="name" property="name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
|
|
@ -36,6 +37,9 @@
|
||||||
|
|
||||||
|
|
||||||
<select id="selectEntDeviceMaintenanceRecord" resultMap="BaseResultMap">
|
<select id="selectEntDeviceMaintenanceRecord" resultMap="BaseResultMap">
|
||||||
select * from ent_device_maintenance_record where device_id = #{deviceId}
|
select edmr.*, eu.name
|
||||||
|
from ent_device_maintenance_record edmr
|
||||||
|
left join ent_user eu on edmr.maintenance_charge_person = eu.ent_user_id
|
||||||
|
where device_id = #{deviceId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -72,13 +72,12 @@
|
||||||
|
|
||||||
|
|
||||||
<select id="entEquipmentStatistic" resultMap="statistic">
|
<select id="entEquipmentStatistic" resultMap="statistic">
|
||||||
select count(edmr.record_id) as entDeviceMaintenanceRecord ,count(eir.ins_record_id) as entInsRecord,
|
select t1.entDeviceMaintenanceRecord,t2.entInsRecord,t3.entRepairRecord,t4.entInspectionRecord
|
||||||
count(err.repair_record_id)as entRepairRecord,count(eisr.inspection_id) as entInspectionRecord
|
|
||||||
from ent_device ed
|
from ent_device ed
|
||||||
left join ent_device_maintenance_record edmr on ed.device_id = edmr.device_id
|
left join (select device_id,count(record_id) as entDeviceMaintenanceRecord from ent_device_maintenance_record where device_id = #{deviceId} ) as t1 on ed.device_id = t1.device_id
|
||||||
left join ent_ins_record eir on ed.device_id = eir.device_id
|
left join (select device_id,count(ins_record_id) as entInsRecord from ent_ins_record where device_id = #{deviceId} ) as t2 on ed.device_id = t2.device_id
|
||||||
left join ent_repair_record err on ed.device_id = err.device_id
|
left join (select device_id,count(repair_record_id) as entRepairRecord from ent_repair_record where device_id = #{deviceId} ) as t3 on ed.device_id = t3.device_id
|
||||||
left join ent_inspection_record eisr on ed.device_id = eisr.inspection_device_id
|
left join (select device_id,count(inspection_id) as entInspectionRecord from ent_inspection_record where device_id = #{deviceId} ) as t4 on ed.device_id = t4.device_id
|
||||||
where ed.device_id = #{deviceId}
|
where ed.device_id = #{deviceId}
|
||||||
<if test="null != enterpriseId and '' != enterpriseId ">
|
<if test="null != enterpriseId and '' != enterpriseId ">
|
||||||
and ed.enterprise_id = #{enterpriseId}
|
and ed.enterprise_id = #{enterpriseId}
|
||||||
|
|
@ -95,4 +94,8 @@
|
||||||
<update id="updateOverdueInspection">
|
<update id="updateOverdueInspection">
|
||||||
update ent_device set overdue_inspection = #{overdueState} where device_id = #{deviceId}
|
update ent_device set overdue_inspection = #{overdueState} where device_id = #{deviceId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateDelState">
|
||||||
|
update ent_device set del_state = 2 where device_id = #{deviceId}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
<result column="ent_em_expert_major" property="entEmExpertMajor" />
|
<result column="ent_em_expert_major" property="entEmExpertMajor" />
|
||||||
<result column="ent_em_expert_category" property="entEmExpertCategory" />
|
<result column="ent_em_expert_category" property="entEmExpertCategory" />
|
||||||
<result column="ent_em_expert_address" property="entEmExpertAddress" />
|
<result column="ent_em_expert_address" property="entEmExpertAddress" />
|
||||||
|
<result column="ent_em_work_unit" property="entEmWorkUnit" />
|
||||||
<result column="create_by" property="createBy" />
|
<result column="create_by" property="createBy" />
|
||||||
<result column="create_time" property="createTime" />
|
<result column="create_time" property="createTime" />
|
||||||
<result column="modify_by" property="modifyBy" />
|
<result column="modify_by" property="modifyBy" />
|
||||||
|
|
|
||||||
|
|
@ -38,4 +38,8 @@
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateDelState">
|
||||||
|
update ent_ins_record set del_state = 2 where ins_record_id = #{deviceEntInsRecordId}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
<!-- 通用查询映射结果 -->
|
<!-- 通用查询映射结果 -->
|
||||||
<resultMap id="BaseResultMap" type="com.rzyc.model.EntInspectionRecord">
|
<resultMap id="BaseResultMap" type="com.rzyc.model.EntInspectionRecord">
|
||||||
<id column="inspection_id" property="inspectionId" />
|
<id column="inspection_id" property="inspectionId" />
|
||||||
<result column="inspection_device_id" property="inspectionDeviceId" />
|
|
||||||
<result column="inspection_organization" property="inspectionOrganization" />
|
<result column="inspection_organization" property="inspectionOrganization" />
|
||||||
<result column="inspection_user_id" property="inspectionUserId" />
|
<result column="inspection_user_id" property="inspectionUserId" />
|
||||||
<result column="inspection_time" property="inspectionTime" />
|
<result column="inspection_time" property="inspectionTime" />
|
||||||
|
|
@ -15,15 +14,19 @@
|
||||||
<result column="create_time" property="createTime" />
|
<result column="create_time" property="createTime" />
|
||||||
<result column="modify_by" property="modifyBy" />
|
<result column="modify_by" property="modifyBy" />
|
||||||
<result column="modify_time" property="modifyTime" />
|
<result column="modify_time" property="modifyTime" />
|
||||||
|
<result column="name" property="name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
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
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectInspectionRecord" resultMap="BaseResultMap">
|
<select id="selectInspectionRecord" resultMap="BaseResultMap">
|
||||||
select * from ent_inspection_record where inspection_device_id = #{deviceId}
|
select eir.* ,eu.name
|
||||||
|
from ent_inspection_record eir
|
||||||
|
left join ent_user eu on eir.inspection_user_id = eu.ent_user_id
|
||||||
|
where device_id = #{deviceId}
|
||||||
<if test="startTime != null and '' != startTime">
|
<if test="startTime != null and '' != startTime">
|
||||||
and start_time = #{startTime}
|
and start_time = #{startTime}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -33,7 +36,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateEntInspectionRecord">
|
<update id="updateEntInspectionRecord">
|
||||||
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}
|
inspection_time = #{data.inspectionTime},inspection_state = #{data.inspectionState},inspection_text = #{data.inspectionText},modify_by = #{data.modifyBy},modify_time = #{data.modifyTime}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
<result column="create_time" property="createTime" />
|
<result column="create_time" property="createTime" />
|
||||||
<result column="modify_by" property="modifyBy" />
|
<result column="modify_by" property="modifyBy" />
|
||||||
<result column="modify_time" property="modifyTime" />
|
<result column="modify_time" property="modifyTime" />
|
||||||
|
<result column="name" property="name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
|
|
@ -22,7 +23,8 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="reportRecord" resultMap="BaseResultMap">
|
<select id="reportRecord" resultMap="BaseResultMap">
|
||||||
select * from ent_report_repair where device_id = #{deviceId}
|
select err.*,eu.name from ent_report_repair err left join ent_user eu on err.report_repair_person = eu.ent_user_id
|
||||||
|
where device_id = #{deviceId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -439,8 +439,8 @@ public class EnterpriseEquipmentController extends BaseController {
|
||||||
@PreAuthorize("hasAnyAuthority('operatingInstructions','operatingInstructions:update')")
|
@PreAuthorize("hasAnyAuthority('operatingInstructions','operatingInstructions:update')")
|
||||||
@MethodAnnotation(authorizations = {"operatingInstructions","operatingInstructions:update"},name = "操作规程")
|
@MethodAnnotation(authorizations = {"operatingInstructions","operatingInstructions:update"},name = "操作规程")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public SingleResult<EntOperatingInstruction> operatingInstructions(@RequestBody OperatingInstructionDto operatingInstructionDto)throws Exception{
|
public SingleResult<EntOperatingInstruction> operatingInstructions(String name,String deviceId,Integer page,Integer pageSize)throws Exception{
|
||||||
return pcBusinessService.operatingInstructions(operatingInstructionDto);
|
return pcBusinessService.operatingInstructions(name,deviceId,page,pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -475,6 +475,64 @@ 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 deviceEntInsRecordId)throws Exception{
|
||||||
|
return pcBusinessService.entDeviceMaintenancePlanDelete(deviceEntInsRecordId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ public class PcBusinessService extends BaseController {
|
||||||
public List<EntPostTask> entUserPostTask(EntUserPostTaskDto entUserPostTaskDto) throws Exception {
|
public List<EntPostTask> entUserPostTask(EntUserPostTaskDto entUserPostTaskDto) throws Exception {
|
||||||
entUserPostTaskDto.setPostId(getUserPostId());
|
entUserPostTaskDto.setPostId(getUserPostId());
|
||||||
//当listId为null时,默认第一个日常清单,查询所有正在进行中的任务
|
//当listId为null时,默认第一个日常清单,查询所有正在进行中的任务
|
||||||
if (null == entUserPostTaskDto.getListId()){
|
if (null == entUserPostTaskDto.getListId()&&entUserPostTaskDto.getTaskState()!=3){
|
||||||
//2为正在进行中
|
//2为正在进行中
|
||||||
entUserPostTaskDto.setTaskState(1);
|
entUserPostTaskDto.setTaskState(1);
|
||||||
}
|
}
|
||||||
|
|
@ -474,6 +474,7 @@ public class PcBusinessService extends BaseController {
|
||||||
Date nextTime = calculationDays(addOrUpdateDeviceInspectionCycleDto.getInspectionCycle());
|
Date nextTime = calculationDays(addOrUpdateDeviceInspectionCycleDto.getInspectionCycle());
|
||||||
entDeviceInsCycle.setNextTimeInspection(nextTime);
|
entDeviceInsCycle.setNextTimeInspection(nextTime);
|
||||||
if (null != addOrUpdateDeviceInspectionCycleDto && null != addOrUpdateDeviceInspectionCycleDto.getInspectionId()){
|
if (null != addOrUpdateDeviceInspectionCycleDto && null != addOrUpdateDeviceInspectionCycleDto.getInspectionId()){
|
||||||
|
|
||||||
result = entDeviceInsCycleMapper.updateDeviceInspectionCycle(entDeviceInsCycle);
|
result = entDeviceInsCycleMapper.updateDeviceInspectionCycle(entDeviceInsCycle);
|
||||||
}else {
|
}else {
|
||||||
result = entDeviceInsCycleMapper.insert(entDeviceInsCycle);
|
result = entDeviceInsCycleMapper.insert(entDeviceInsCycle);
|
||||||
|
|
@ -485,7 +486,7 @@ public class PcBusinessService extends BaseController {
|
||||||
return singleResult;
|
return singleResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SingleResult addOrUpdateInspectionRecord(AddOrUpdateInspectionRecordDto addOrUpdateInspectionRecordDto){
|
public SingleResult addOrUpdateInspectionRecord(AddOrUpdateInspectionRecordDto addOrUpdateInspectionRecordDto) throws Exception {
|
||||||
SingleResult singleResult = new SingleResult();
|
SingleResult singleResult = new SingleResult();
|
||||||
EntInsRecord entInsRecord = new EntInsRecord();
|
EntInsRecord entInsRecord = new EntInsRecord();
|
||||||
BeanUtils.copyProperties(addOrUpdateInspectionRecordDto,entInsRecord);
|
BeanUtils.copyProperties(addOrUpdateInspectionRecordDto,entInsRecord);
|
||||||
|
|
@ -496,11 +497,16 @@ public class PcBusinessService extends BaseController {
|
||||||
if (cycle != null) {
|
if (cycle != null) {
|
||||||
entInsRecord.setCycleId(cycle.getInspectionId());
|
entInsRecord.setCycleId(cycle.getInspectionId());
|
||||||
}
|
}
|
||||||
|
entInsRecord.setModifyBy(getUserId());
|
||||||
|
entInsRecord.setModifyTime(new Date());
|
||||||
result = entInsRecordMapper.updateInspectionRecord(entInsRecord);
|
result = entInsRecordMapper.updateInspectionRecord(entInsRecord);
|
||||||
}else {
|
}else {
|
||||||
if (cycle != null) {
|
if (cycle != null) {
|
||||||
entInsRecord.setCycleId(cycle.getInspectionId());
|
entInsRecord.setCycleId(cycle.getInspectionId());
|
||||||
}
|
}
|
||||||
|
entInsRecord.setInsRecordId(RandomNumber.getUUid());
|
||||||
|
entInsRecord.setCreateBy(getUserId());
|
||||||
|
entInsRecord.setCreateTime(new Date());
|
||||||
result = entInsRecordMapper.insert(entInsRecord);
|
result = entInsRecordMapper.insert(entInsRecord);
|
||||||
}
|
}
|
||||||
if (result != 1 ){
|
if (result != 1 ){
|
||||||
|
|
@ -647,6 +653,8 @@ public class PcBusinessService extends BaseController {
|
||||||
entInspectionRecord.setInspectionId(RandomNumber.getUUid());
|
entInspectionRecord.setInspectionId(RandomNumber.getUUid());
|
||||||
entInspectionRecord.setCreateBy(getUserId());
|
entInspectionRecord.setCreateBy(getUserId());
|
||||||
entInspectionRecord.setCreateTime(new Date());
|
entInspectionRecord.setCreateTime(new Date());
|
||||||
|
//state 1 是待检测
|
||||||
|
entInspectionRecord.setInspectionState(1);
|
||||||
result = entInspectionRecordMapper.insert(entInspectionRecord);
|
result = entInspectionRecordMapper.insert(entInspectionRecord);
|
||||||
}
|
}
|
||||||
if (result != 1 ){
|
if (result != 1 ){
|
||||||
|
|
@ -678,9 +686,9 @@ public class PcBusinessService extends BaseController {
|
||||||
BeanUtils.copyProperties(reportRecordDto,entReportRepair);
|
BeanUtils.copyProperties(reportRecordDto,entReportRepair);
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if (null != reportRecordDto && null != entReportRepair.getReportRepairId()){
|
if (null != reportRecordDto && null != entReportRepair.getReportRepairId()){
|
||||||
entReportRepairMapper.updateReportRecord(entReportRepair);
|
result = entReportRepairMapper.updateReportRecord(entReportRepair);
|
||||||
}else {
|
}else {
|
||||||
entReportRepairMapper.insert(entReportRepair);
|
result = entReportRepairMapper.insert(entReportRepair);
|
||||||
}
|
}
|
||||||
if (result != 1 ){
|
if (result != 1 ){
|
||||||
singleResult.setCode(Code.ERROR.getCode());
|
singleResult.setCode(Code.ERROR.getCode());
|
||||||
|
|
@ -690,10 +698,10 @@ public class PcBusinessService extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PageOperation
|
@PageOperation
|
||||||
public SingleResult operatingInstructions(OperatingInstructionDto operatingInstructionDto){
|
public SingleResult operatingInstructions(String name,String deviceId,Integer page,Integer pageSize){
|
||||||
SingleResult SingleResult = new SingleResult();
|
SingleResult SingleResult = new SingleResult();
|
||||||
Page<EntOperatingInstruction> page = (Page<EntOperatingInstruction>) entOperatingInstructionMapper.selectOperatingInstructions(operatingInstructionDto.getName(),operatingInstructionDto.getDeviceId());
|
Page<EntOperatingInstruction> p = (Page<EntOperatingInstruction>) entOperatingInstructionMapper.selectOperatingInstructions(name,deviceId);
|
||||||
SingleResult.setDataPager(page);
|
SingleResult.setDataPager(p);
|
||||||
return SingleResult;
|
return SingleResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1009,14 +1017,18 @@ public class PcBusinessService extends BaseController {
|
||||||
return singleResult;
|
return singleResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SingleResult repairRecordUpdate(EntRepairRecordDto entRepairRecordDto){
|
public SingleResult repairRecordUpdate(EntRepairRecordDto entRepairRecordDto) throws Exception {
|
||||||
SingleResult singleResult = new SingleResult();
|
SingleResult singleResult = new SingleResult();
|
||||||
EntRepairRecord entRepairRecord = new EntRepairRecord();
|
EntRepairRecord entRepairRecord = new EntRepairRecord();
|
||||||
BeanUtils.copyProperties(entRepairRecordDto,entRepairRecord);
|
BeanUtils.copyProperties(entRepairRecordDto,entRepairRecord);
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if (null != entRepairRecordDto && null != entRepairRecordDto.getRepairRecordId()){
|
if (null != entRepairRecordDto && null != entRepairRecordDto.getRepairRecordId()){
|
||||||
|
entRepairRecord.setModifyBy(getUserId());
|
||||||
|
entRepairRecord.setModifyTime(new Date());
|
||||||
result =entRepairRecordMapper.repairRecordUpdate(entRepairRecord);
|
result =entRepairRecordMapper.repairRecordUpdate(entRepairRecord);
|
||||||
}else {
|
}else {
|
||||||
|
entRepairRecord.setCreateBy(getUserId());
|
||||||
|
entRepairRecord.setCreateTime(new Date());
|
||||||
result = entRepairRecordMapper.insert(entRepairRecord);
|
result = entRepairRecordMapper.insert(entRepairRecord);
|
||||||
}
|
}
|
||||||
if (result <= 0){
|
if (result <= 0){
|
||||||
|
|
@ -1026,6 +1038,46 @@ public class PcBusinessService extends BaseController {
|
||||||
return singleResult;
|
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 maintenancePlanId){
|
||||||
|
SingleResult singleResult = new SingleResult();
|
||||||
|
int result = entDeviceMaintenancePlanMapper.updateDelState(maintenancePlanId);
|
||||||
|
if (result <= 0){
|
||||||
|
singleResult.setCode(Code.ERROR.getCode());
|
||||||
|
singleResult.setMessage(Message.ERROR);
|
||||||
|
}
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user