Merge remote-tracking branch 'origin/master'
commit
4a5d01c25c
@ -0,0 +1,61 @@
|
|||||||
|
package com.op.device.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.op.device.domain.EquOperationRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备运行记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author Open Platform
|
||||||
|
* @date 2023-11-27
|
||||||
|
*/
|
||||||
|
public interface EquOperationRecordMapper {
|
||||||
|
/**
|
||||||
|
* 查询设备运行记录
|
||||||
|
*
|
||||||
|
* @param id 设备运行记录主键
|
||||||
|
* @return 设备运行记录
|
||||||
|
*/
|
||||||
|
public EquOperationRecord selectEquOperationRecordById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备运行记录列表
|
||||||
|
*
|
||||||
|
* @param equOperationRecord 设备运行记录
|
||||||
|
* @return 设备运行记录集合
|
||||||
|
*/
|
||||||
|
public List<EquOperationRecord> selectEquOperationRecordList(EquOperationRecord equOperationRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设备运行记录
|
||||||
|
*
|
||||||
|
* @param equOperationRecord 设备运行记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertEquOperationRecord(EquOperationRecord equOperationRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改设备运行记录
|
||||||
|
*
|
||||||
|
* @param equOperationRecord 设备运行记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateEquOperationRecord(EquOperationRecord equOperationRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除设备运行记录
|
||||||
|
*
|
||||||
|
* @param id 设备运行记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteEquOperationRecordById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除设备运行记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteEquOperationRecordByIds(String[] ids);
|
||||||
|
}
|
@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.op.device.mapper.EquOperationRecordMapper">
|
||||||
|
|
||||||
|
<resultMap type="EquOperationRecord" id="EquOperationRecordResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="equipmentCode" column="equipment_code" />
|
||||||
|
<result property="startTime" column="start_time" />
|
||||||
|
<result property="endTime" column="end_time" />
|
||||||
|
<result property="type" column="type" />
|
||||||
|
<result property="maintenanceType" column="maintenance_type" />
|
||||||
|
<result property="parentId" column="parent_id" />
|
||||||
|
<result property="factoryCode" column="factory_code" />
|
||||||
|
<result property="attr1" column="attr1" />
|
||||||
|
<result property="attr2" column="attr2" />
|
||||||
|
<result property="attr3" column="attr3" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectEquOperationRecordVo">
|
||||||
|
select id, equipment_code, start_time, end_time, type, maintenance_type, parent_id, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_operation_record
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectEquOperationRecordList" parameterType="EquOperationRecord" resultMap="EquOperationRecordResult">
|
||||||
|
<include refid="selectEquOperationRecordVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
|
||||||
|
<if test="startTime != null "> and start_time = #{startTime}</if>
|
||||||
|
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||||
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||||
|
<if test="maintenanceType != null and maintenanceType != ''"> and maintenance_type = #{maintenanceType}</if>
|
||||||
|
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
|
||||||
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
||||||
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||||
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||||
|
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectEquOperationRecordById" parameterType="String" resultMap="EquOperationRecordResult">
|
||||||
|
<include refid="selectEquOperationRecordVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertEquOperationRecord" parameterType="EquOperationRecord">
|
||||||
|
insert into equ_operation_record
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">id,</if>
|
||||||
|
<if test="equipmentCode != null">equipment_code,</if>
|
||||||
|
<if test="startTime != null">start_time,</if>
|
||||||
|
<if test="endTime != null">end_time,</if>
|
||||||
|
<if test="type != null">type,</if>
|
||||||
|
<if test="maintenanceType != null">maintenance_type,</if>
|
||||||
|
<if test="parentId != null">parent_id,</if>
|
||||||
|
<if test="factoryCode != null">factory_code,</if>
|
||||||
|
<if test="attr1 != null">attr1,</if>
|
||||||
|
<if test="attr2 != null">attr2,</if>
|
||||||
|
<if test="attr3 != null">attr3,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">#{id},</if>
|
||||||
|
<if test="equipmentCode != null">#{equipmentCode},</if>
|
||||||
|
<if test="startTime != null">#{startTime},</if>
|
||||||
|
<if test="endTime != null">#{endTime},</if>
|
||||||
|
<if test="type != null">#{type},</if>
|
||||||
|
<if test="maintenanceType != null">#{maintenanceType},</if>
|
||||||
|
<if test="parentId != null">#{parentId},</if>
|
||||||
|
<if test="factoryCode != null">#{factoryCode},</if>
|
||||||
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
|
<if test="attr2 != null">#{attr2},</if>
|
||||||
|
<if test="attr3 != null">#{attr3},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateEquOperationRecord" parameterType="EquOperationRecord">
|
||||||
|
update equ_operation_record
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
|
||||||
|
<if test="startTime != null">start_time = #{startTime},</if>
|
||||||
|
<if test="endTime != null">end_time = #{endTime},</if>
|
||||||
|
<if test="type != null">type = #{type},</if>
|
||||||
|
<if test="maintenanceType != null">maintenance_type = #{maintenanceType},</if>
|
||||||
|
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||||
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
||||||
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||||
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||||
|
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteEquOperationRecordById" parameterType="String">
|
||||||
|
delete from equ_operation_record where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteEquOperationRecordByIds" parameterType="String">
|
||||||
|
delete from equ_operation_record where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue