工艺建模
This commit is contained in:
parent
091f307764
commit
add7252c05
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,75 @@
|
||||
<?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.neu.carbon.mes.mapper.MesProcessModelMapper">
|
||||
|
||||
<resultMap type="MesProcessModel" id="MesProcessModelResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="description" column="description" />
|
||||
<result property="powerConsume" column="power_consume" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesProcessModelVo">
|
||||
select id, material_id, process_name, description, power_consume, remark from mes_process_model
|
||||
</sql>
|
||||
|
||||
<select id="selectMesProcessModelList" parameterType="MesProcessModel" resultMap="MesProcessModelResult">
|
||||
<include refid="selectMesProcessModelVo"/>
|
||||
<where>
|
||||
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="powerConsume != null "> and power_consume = #{powerConsume}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesProcessModelById" parameterType="Long" resultMap="MesProcessModelResult">
|
||||
<include refid="selectMesProcessModelVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesProcessModel" parameterType="MesProcessModel" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into mes_process_model
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="processName != null and processName != ''">process_name,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="powerConsume != null">power_consume,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="processName != null and processName != ''">#{processName},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
<if test="powerConsume != null">#{powerConsume},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesProcessModel" parameterType="MesProcessModel">
|
||||
update mes_process_model
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="processName != null and processName != ''">process_name = #{processName},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="powerConsume != null">power_consume = #{powerConsume},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesProcessModelById" parameterType="Long">
|
||||
delete from mes_process_model where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesProcessModelByIds" parameterType="String">
|
||||
delete from mes_process_model where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user