禅道BUG修改-部分功能接口
This commit is contained in:
parent
bacebc2246
commit
88f536a0e3
|
|
@ -36,6 +36,16 @@ public class EntDeviceInsStatistic {
|
|||
@ApiModelProperty("巡检次数")
|
||||
private long countRecord;
|
||||
|
||||
private List<Sysdocument>sysdocumentList;
|
||||
|
||||
public List<Sysdocument> getSysdocumentList() {
|
||||
return sysdocumentList;
|
||||
}
|
||||
|
||||
public void setSysdocumentList(List<Sysdocument> sysdocumentList) {
|
||||
this.sysdocumentList = sysdocumentList;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
|
@ -75,6 +76,18 @@ public class EntInsRecord implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private String inspectionName;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<Sysdocument> sysdocumentList;
|
||||
|
||||
public List<Sysdocument> getSysdocumentList() {
|
||||
return sysdocumentList;
|
||||
}
|
||||
|
||||
public void setSysdocumentList(List<Sysdocument> sysdocumentList) {
|
||||
this.sysdocumentList = sysdocumentList;
|
||||
}
|
||||
|
||||
public String getInspectionName() {
|
||||
return inspectionName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ import java.util.Date;
|
|||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
|
@ -56,9 +59,11 @@ public class EntRepairRecord implements Serializable {
|
|||
|
||||
@ApiModelProperty(value = "维修开始时间")
|
||||
@TableField("repair_start_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
|
||||
private Date repairStartTime;
|
||||
|
||||
@ApiModelProperty(value = "维修结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
|
||||
@TableField("repair_end_time")
|
||||
private Date repairEndTime;
|
||||
|
||||
|
|
@ -98,6 +103,17 @@ public class EntRepairRecord implements Serializable {
|
|||
@TableField("modify_time")
|
||||
private Date modifyTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<Sysdocument>sysdocumentList;
|
||||
|
||||
public List<Sysdocument> getList() {
|
||||
return sysdocumentList;
|
||||
}
|
||||
|
||||
public void setList(List<Sysdocument> list) {
|
||||
this.sysdocumentList = list;
|
||||
}
|
||||
|
||||
public String getRepairRecordId() {
|
||||
return repairRecordId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
* @since 2023-02-09
|
||||
*/
|
||||
@TableName("listchange")
|
||||
@ApiModel(value="Listchange对象", description="")
|
||||
@ApiModel(value="Listchange", description="")
|
||||
public class Listchange implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
|||
|
|
@ -108,11 +108,33 @@
|
|||
</if>
|
||||
order by ed.model_state desc
|
||||
</select>
|
||||
<select id="selectEntEquipmentListAndIns" resultType="com.rzyc.model.EntDeviceInsStatistic">
|
||||
select ed.device_id deviceId,ed.name,ed.number,ed.model_state state,count(eir.ins_record_id)as countRecord
|
||||
|
||||
|
||||
<resultMap id="mobileEntDeviceAndIns" type="com.rzyc.model.EntDeviceInsStatistic">
|
||||
<id column="device_id" property="deviceId" />
|
||||
<result column="name" property="name" />
|
||||
<result column="number" property="number" />
|
||||
<result column="model_state" property="state" />
|
||||
<result column="countRecord" property="countRecord"/>
|
||||
<collection property="sysdocumentList" ofType="com.rzyc.model.Sysdocument" column="SysDocumentId">
|
||||
<result column="SysDocumentId" jdbcType="VARCHAR" property="SysDocumentId" />
|
||||
<result column="BizFileName" jdbcType="VARCHAR" property="bizFileName" />
|
||||
<result column="SortId" jdbcType="INTEGER" property="sortId" />
|
||||
<result column="RealFileName" jdbcType="VARCHAR" property="RealFileName" />
|
||||
<result column="FilePath" jdbcType="VARCHAR" property="FilePath" />
|
||||
<result column="FileType" jdbcType="VARCHAR" property="fileType" />
|
||||
<result column="FileSize" jdbcType="VARCHAR" property="fileSize" />
|
||||
<result column="OTCId" jdbcType="VARCHAR" property="OTCId" />
|
||||
<result column="OTCType" jdbcType="VARCHAR" property="OTCType" />
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectEntEquipmentListAndIns" resultMap="mobileEntDeviceAndIns">
|
||||
select ed.device_id ,ed.name,ed.number,ed.model_state ,count(eir.ins_record_id)as countRecord,sd.*
|
||||
from ent_device ed
|
||||
left join (SELECT MAX( inspection_id ) as inspection_id,device_id FROM ent_device_ins_cycle where del_state = 1 GROUP BY device_id) as edic on ed.device_id = edic.device_id
|
||||
left join ent_ins_record eir on edic.inspection_id = eir.cycle_id
|
||||
left join ent_ins_record eir on ed.device_id = eir.device_id
|
||||
left join sysdocument sd on ed.device_id = sd.OTCId
|
||||
where ed.enterprise_id = #{enterpriseId} and ed.del_state = 1
|
||||
<if test="null != typeId and '' != typeId">
|
||||
and ed.type_path like concat('%',#{typeId},'%')
|
||||
|
|
@ -122,6 +144,7 @@
|
|||
or ed.number like concat('%',#{keyWord},'%')
|
||||
or ed.model_num like concat('%',#{keyWord},'%')
|
||||
</if>
|
||||
GROUP BY ed.device_id
|
||||
</select>
|
||||
|
||||
<update id="updateEntDevice" parameterType="com.rzyc.model.EntDevice">
|
||||
|
|
|
|||
|
|
@ -30,8 +30,38 @@
|
|||
device_id = #{entInsRecord.deviceId},spare_part_id = #{entInsRecord.spare_part_id} ,cycle_id = #{entInsRecord.cycleId} where ins_record_id = #{insRecordId}
|
||||
</update>
|
||||
|
||||
<select id="selectInspectionRecord" resultMap="BaseResultMap">
|
||||
select eir.*,edic.inspection_name as inspectionName from ent_ins_record eir left join ent_device_ins_cycle edic on eir.cycle_id = edic.inspection_id
|
||||
<resultMap id="BaseResultMapAndDocument" type="com.rzyc.model.EntInsRecord">
|
||||
<result column="ins_record_id" property="insRecordId" />
|
||||
<result column="ins_record_date" property="insRecordDate" />
|
||||
<result column="ins_record_working_hour" property="insRecordWorkingHour" />
|
||||
<result column="ins_record_person" property="insRecordPerson" />
|
||||
<result column="ins_record_situation" property="insRecordSituation" />
|
||||
<result column="device_id" property="deviceId" />
|
||||
<result column="enterprise_id" property="enterpriseId" />
|
||||
<result column="spare_part_id" property="sparePartId" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="modify_by" property="modifyBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="inspectionName" property="inspectionName"/>
|
||||
<collection property="sysdocumentList" ofType="com.rzyc.model.Sysdocument" column="SysDocumentId">
|
||||
<result column="SysDocumentId" jdbcType="VARCHAR" property="SysDocumentId" />
|
||||
<result column="BizFileName" jdbcType="VARCHAR" property="bizFileName" />
|
||||
<result column="SortId" jdbcType="INTEGER" property="sortId" />
|
||||
<result column="RealFileName" jdbcType="VARCHAR" property="RealFileName" />
|
||||
<result column="FilePath" jdbcType="VARCHAR" property="FilePath" />
|
||||
<result column="FileType" jdbcType="VARCHAR" property="fileType" />
|
||||
<result column="FileSize" jdbcType="VARCHAR" property="fileSize" />
|
||||
<result column="OTCId" jdbcType="VARCHAR" property="OTCId" />
|
||||
<result column="OTCType" jdbcType="VARCHAR" property="OTCType" />
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectInspectionRecord" resultMap="BaseResultMapAndDocument">
|
||||
select eir.*,edic.inspection_name as inspectionName,sd.* from ent_ins_record eir
|
||||
left join ent_device_ins_cycle edic on eir.cycle_id = edic.inspection_id
|
||||
left join sysdocument sd on eir.ins_record_id = sd.OTCId
|
||||
where eir.device_id = #{deviceId} and eir.del_state = 1
|
||||
<if test="null != inspectionRecordName and '' != inspectionRecordName">
|
||||
and eir.ins_record_situation like concat('%',#{inspectionRecordName},'%')
|
||||
|
|
|
|||
|
|
@ -26,17 +26,53 @@
|
|||
<result column="modify_time" property="modifyTime" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="BaseResultMapAndDocument" type="com.rzyc.model.EntRepairRecord">
|
||||
<id column="repair_record_id" property="repairRecordId" />
|
||||
<result column="device_id" property="deviceId" />
|
||||
<result column="repair_code" property="repairCode" />
|
||||
<result column="repair_time" property="repairTime" />
|
||||
<result column="cause_of_failure" property="causeOfFailure" />
|
||||
<result column="external_maintenance_unit" property="externalMaintenanceUnit" />
|
||||
<result column="external_maintenance_person_name" property="externalMaintenancePersonName" />
|
||||
<result column="repair_state" property="repairState" />
|
||||
<result column="repair_start_time" property="repairStartTime" />
|
||||
<result column="repair_end_time" property="repairEndTime" />
|
||||
<result column="repair_level" property="repairLevel" />
|
||||
<result column="shutdown" property="shutdown" />
|
||||
<result column="down_time" property="downTime" />
|
||||
<result column="affected_generation" property="affectedGeneration" />
|
||||
<result column="repair_cost" property="repairCost" />
|
||||
<result column="work_description" property="workDescription" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="modify_by" property="modifyBy" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<collection property="sysdocumentList" ofType="com.rzyc.model.Sysdocument" column="SysDocumentId">
|
||||
<result column="SysDocumentId" jdbcType="VARCHAR" property="SysDocumentId" />
|
||||
<result column="BizFileName" jdbcType="VARCHAR" property="bizFileName" />
|
||||
<result column="SortId" jdbcType="INTEGER" property="sortId" />
|
||||
<result column="RealFileName" jdbcType="VARCHAR" property="RealFileName" />
|
||||
<result column="FilePath" jdbcType="VARCHAR" property="FilePath" />
|
||||
<result column="FileType" jdbcType="VARCHAR" property="fileType" />
|
||||
<result column="FileSize" jdbcType="VARCHAR" property="fileSize" />
|
||||
<result column="OTCId" jdbcType="VARCHAR" property="OTCId" />
|
||||
<result column="OTCType" jdbcType="VARCHAR" property="OTCType" />
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
repair_record_id, device_id, repair_code, repair_time, cause_of_failure, external_maintenance_unit, external_maintenance_person_name, repair_state, repair_start_time, repair_end_time, repair_level, shutdown, down_time, affected_generation, repair_cost, work_description, create_by, create_time, modify_by, modify_time
|
||||
</sql>
|
||||
|
||||
<select id="repairRecord" resultMap="BaseResultMap">
|
||||
select * from ent_repair_record where device_id = #{deviceId} and del_state = 1
|
||||
<select id="repairRecord" resultMap="BaseResultMapAndDocument">
|
||||
select * from ent_repair_record err
|
||||
left join sysdocument sd on err.repair_record_id = sd.OTCId
|
||||
where err.device_id = #{deviceId} and err.del_state = 1
|
||||
</select>
|
||||
|
||||
<update id="repairRecordUpdate">
|
||||
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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user