Commit 223e5917 authored by 王晓倩's avatar 王晓倩

共用方法拆分

parent 41078752
...@@ -2,6 +2,7 @@ package com.zehong.system.mapper; ...@@ -2,6 +2,7 @@ package com.zehong.system.mapper;
import java.util.List; import java.util.List;
import com.zehong.system.domain.TEquipmentInfo; import com.zehong.system.domain.TEquipmentInfo;
import org.apache.ibatis.annotations.Param;
/** /**
* 生产设备信息Mapper接口 * 生产设备信息Mapper接口
...@@ -27,6 +28,14 @@ public interface TEquipmentInfoMapper ...@@ -27,6 +28,14 @@ public interface TEquipmentInfoMapper
*/ */
public List<TEquipmentInfo> selectTEquipmentInfoList(TEquipmentInfo tEquipmentInfo); public List<TEquipmentInfo> selectTEquipmentInfoList(TEquipmentInfo tEquipmentInfo);
/**
* 查询老化柜、标定柜信息列表
*
* @param types 生产设备类型
* @return 生产设备信息集合
*/
public List<TEquipmentInfo> selectTEquipmentList(@Param("types") List<String> types);
/** /**
* 新增生产设备信息 * 新增生产设备信息
* *
......
...@@ -43,6 +43,14 @@ public interface TStoreyInfoMapper ...@@ -43,6 +43,14 @@ public interface TStoreyInfoMapper
*/ */
public int updateTStoreyInfo(TStoreyInfo tStoreyInfo); public int updateTStoreyInfo(TStoreyInfo tStoreyInfo);
/**
* 修改老化层信息
*
* @param tStoreyInfo 老化层信息
* @return 结果
*/
public int updateTStoreyInfoByCode(TStoreyInfo tStoreyInfo);
/** /**
* 删除老化层信息 * 删除老化层信息
* *
......
...@@ -27,6 +27,14 @@ public interface ITEquipmentInfoService ...@@ -27,6 +27,14 @@ public interface ITEquipmentInfoService
*/ */
public List<TEquipmentInfo> selectTEquipmentInfoList(TEquipmentInfo tEquipmentInfo); public List<TEquipmentInfo> selectTEquipmentInfoList(TEquipmentInfo tEquipmentInfo);
/**
* 查询老化柜、标定柜信息列表
*
* @param types 生产设备类型
* @return 生产设备信息集合
*/
public List<TEquipmentInfo> selectTEquipmentList(List<String> types);
/** /**
* 新增生产设备信息 * 新增生产设备信息
* *
......
...@@ -43,6 +43,14 @@ public interface ITStoreyInfoService ...@@ -43,6 +43,14 @@ public interface ITStoreyInfoService
*/ */
public int updateTStoreyInfo(TStoreyInfo tStoreyInfo); public int updateTStoreyInfo(TStoreyInfo tStoreyInfo);
/**
* 修改老化层信息
*
* @param tStoreyInfo 老化层信息
* @return 结果
*/
public int updateTStoreyInfoByCode(TStoreyInfo tStoreyInfo);
/** /**
* 批量删除老化层信息 * 批量删除老化层信息
* *
......
...@@ -43,6 +43,18 @@ public class TEquipmentInfoServiceImpl implements ITEquipmentInfoService ...@@ -43,6 +43,18 @@ public class TEquipmentInfoServiceImpl implements ITEquipmentInfoService
return tEquipmentInfoMapper.selectTEquipmentInfoList(tEquipmentInfo); return tEquipmentInfoMapper.selectTEquipmentInfoList(tEquipmentInfo);
} }
/**
* 查询老化柜、标定柜信息列表
*
* @param types 生产设备类型
* @return 生产设备信息集合
*/
@Override
public List<TEquipmentInfo> selectTEquipmentList(List<String> types)
{
return tEquipmentInfoMapper.selectTEquipmentList(types);
}
/** /**
* 新增生产设备信息 * 新增生产设备信息
* *
......
...@@ -67,6 +67,11 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService ...@@ -67,6 +67,11 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
return tStoreyInfoMapper.updateTStoreyInfo(tStoreyInfo); return tStoreyInfoMapper.updateTStoreyInfo(tStoreyInfo);
} }
public int updateTStoreyInfoByCode(TStoreyInfo tStoreyInfo)
{
return tStoreyInfoMapper.updateTStoreyInfoByCode(tStoreyInfo);
}
/** /**
* 批量删除老化层信息 * 批量删除老化层信息
* *
......
...@@ -47,6 +47,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -47,6 +47,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fAlarmTime != null and fAlarmTime != ''"> and f_alarm_time = #{fAlarmTime}</if> <if test="fAlarmTime != null and fAlarmTime != ''"> and f_alarm_time = #{fAlarmTime}</if>
</where> </where>
</select> </select>
<select id="selectTEquipmentList" parameterType="List" resultMap="TEquipmentInfoResult">
<include refid="selectTEquipmentInfoVo"/>
where f_equipment_type in
<foreach item="item" collection="types" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectTEquipmentInfoById" parameterType="Long" resultMap="TEquipmentInfoResult"> <select id="selectTEquipmentInfoById" parameterType="Long" resultMap="TEquipmentInfoResult">
<include refid="selectTEquipmentInfoVo"/> <include refid="selectTEquipmentInfoVo"/>
......
...@@ -85,6 +85,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -85,6 +85,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where f_storey_id = #{fStoreyId} where f_storey_id = #{fStoreyId}
</update> </update>
<update id="updateTStoreyInfoByCode" parameterType="TStoreyInfo">
update t_storey_info
<trim prefix="SET" suffixOverrides=",">
<if test="fEquipmentId != null">f_equipment_id = #{fEquipmentId},</if>
<if test="fStoreyCode != null">f_storey_code = #{fStoreyCode},</if>
<if test="fTrayCode != null">f_tray_code = #{fTrayCode},</if>
<if test="fIp != null">f_ip = #{fIp},</if>
<if test="fStatus != null">f_status = #{fStatus},</if>
<if test="fPort != null">f_port = #{fPort},</if>
<if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
<if test="fCreateTime != null">f_create_time = #{fCreateTime},</if>
<if test="fAlarmTime != null">f_alarm_time = #{fAlarmTime},</if>
</trim>
where f_storey_code = #{fStoreyCode}
</update>
<delete id="deleteTStoreyInfoById" parameterType="Long"> <delete id="deleteTStoreyInfoById" parameterType="Long">
delete from t_storey_info where f_storey_id = #{fStoreyId} delete from t_storey_info where f_storey_id = #{fStoreyId}
</delete> </delete>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment