|
|
@ -25,10 +25,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<result property="routeId" column="route_id" />
|
|
|
|
<result property="routeId" column="route_id" />
|
|
|
|
<result property="routeVersion" column="route_version" />
|
|
|
|
<result property="routeVersion" column="route_version" />
|
|
|
|
<result property="routeCode" column="route_code" />
|
|
|
|
<result property="routeCode" column="route_code" />
|
|
|
|
|
|
|
|
<result property="nextProcessId" column="next_process_id" />
|
|
|
|
|
|
|
|
<result property="orderNum" column="order_num" />
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectProWorkorderProcessDetailVo">
|
|
|
|
<sql id="selectProWorkorderProcessDetailVo">
|
|
|
|
select record_id, workorder_id, process_id, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, prod_type, factory_code, machine_id, machine_code, route_id, route_version, route_code from pro_workorder_process_detail
|
|
|
|
select record_id, workorder_id, process_id, status, remark,
|
|
|
|
|
|
|
|
attr1, attr2, attr3, attr4, create_by, create_time,
|
|
|
|
|
|
|
|
update_by, update_time, prod_type, factory_code, machine_id,
|
|
|
|
|
|
|
|
machine_code, route_id, route_version, route_code ,
|
|
|
|
|
|
|
|
next_process_id,order_num
|
|
|
|
|
|
|
|
from pro_workorder_process_detail
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectProWorkorderProcessDetailList" parameterType="ProWorkorderProcessDetail" resultMap="ProWorkorderProcessDetailResult">
|
|
|
|
<select id="selectProWorkorderProcessDetailList" parameterType="ProWorkorderProcessDetail" resultMap="ProWorkorderProcessDetailResult">
|
|
|
@ -55,6 +62,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<include refid="selectProWorkorderProcessDetailVo"/>
|
|
|
|
<include refid="selectProWorkorderProcessDetailVo"/>
|
|
|
|
where record_id = #{recordId}
|
|
|
|
where record_id = #{recordId}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getWorkOrderDetailsByRouteCode" resultType="com.op.mes.domain.ProWorkorderProcessDetail">
|
|
|
|
|
|
|
|
select
|
|
|
|
|
|
|
|
r.route_id routeId,
|
|
|
|
|
|
|
|
r.route_code routeCode,
|
|
|
|
|
|
|
|
r.route_name routeName,
|
|
|
|
|
|
|
|
r.route_version routeVersion,
|
|
|
|
|
|
|
|
rp.process_id processId,
|
|
|
|
|
|
|
|
rp.next_process_id nextProcessId,
|
|
|
|
|
|
|
|
rp.process_name processName,
|
|
|
|
|
|
|
|
rp.order_num orderNum
|
|
|
|
|
|
|
|
from pro_route r
|
|
|
|
|
|
|
|
left join pro_route_process rp on r.route_id = rp.route_id
|
|
|
|
|
|
|
|
where r.route_code = #{routeCode}
|
|
|
|
|
|
|
|
order by rp.order_num
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertProWorkorderProcessDetail" parameterType="ProWorkorderProcessDetail">
|
|
|
|
<insert id="insertProWorkorderProcessDetail" parameterType="ProWorkorderProcessDetail">
|
|
|
|
insert into pro_workorder_process_detail
|
|
|
|
insert into pro_workorder_process_detail
|
|
|
@ -79,6 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="routeId != null">route_id,</if>
|
|
|
|
<if test="routeId != null">route_id,</if>
|
|
|
|
<if test="routeVersion != null">route_version,</if>
|
|
|
|
<if test="routeVersion != null">route_version,</if>
|
|
|
|
<if test="routeCode != null">route_code,</if>
|
|
|
|
<if test="routeCode != null">route_code,</if>
|
|
|
|
|
|
|
|
<if test="nextProcessId != null">next_process_id,</if>
|
|
|
|
|
|
|
|
<if test="orderNum != null">order_num,</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="recordId != null">#{recordId},</if>
|
|
|
|
<if test="recordId != null">#{recordId},</if>
|
|
|
@ -101,8 +125,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="routeId != null">#{routeId},</if>
|
|
|
|
<if test="routeId != null">#{routeId},</if>
|
|
|
|
<if test="routeVersion != null">#{routeVersion},</if>
|
|
|
|
<if test="routeVersion != null">#{routeVersion},</if>
|
|
|
|
<if test="routeCode != null">#{routeCode},</if>
|
|
|
|
<if test="routeCode != null">#{routeCode},</if>
|
|
|
|
|
|
|
|
<if test="nextProcessId != null">#{nextProcessId},</if>
|
|
|
|
|
|
|
|
<if test="orderNum != null">#{orderNum},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<insert id="addWorkOrderDetails">
|
|
|
|
|
|
|
|
<foreach collection="processes" item="process" index="index" separator=";">
|
|
|
|
|
|
|
|
insert into pro_workorder_process_detail
|
|
|
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="process.recordId != null">record_id,</if>
|
|
|
|
|
|
|
|
<if test="process.workorderId != null">workorder_id,</if>
|
|
|
|
|
|
|
|
<if test="process.processId != null">process_id,</if>
|
|
|
|
|
|
|
|
<if test="process.status != null">status,</if>
|
|
|
|
|
|
|
|
<if test="process.remark != null">remark,</if>
|
|
|
|
|
|
|
|
<if test="process.attr1 != null">attr1,</if>
|
|
|
|
|
|
|
|
<if test="process.attr2 != null">attr2,</if>
|
|
|
|
|
|
|
|
<if test="process.attr3 != null">attr3,</if>
|
|
|
|
|
|
|
|
<if test="process.attr4 != null">attr4,</if>
|
|
|
|
|
|
|
|
<if test="process.createBy != null">create_by,</if>
|
|
|
|
|
|
|
|
<if test="process.createTime != null">create_time,</if>
|
|
|
|
|
|
|
|
<if test="process.prodType != null">prod_type,</if>
|
|
|
|
|
|
|
|
<if test="process.factoryCode != null">factory_code,</if>
|
|
|
|
|
|
|
|
<if test="process.machineId != null">machine_id,</if>
|
|
|
|
|
|
|
|
<if test="process.machineCode != null">machine_code,</if>
|
|
|
|
|
|
|
|
<if test="process.routeId != null">route_id,</if>
|
|
|
|
|
|
|
|
<if test="process.routeVersion != null">route_version,</if>
|
|
|
|
|
|
|
|
<if test="process.routeCode != null">route_code,</if>
|
|
|
|
|
|
|
|
<if test="process.nextProcessId != null">next_process_id,</if>
|
|
|
|
|
|
|
|
<if test="process.orderNum != null">order_num,</if>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="process.recordId != null">#{process.recordId},</if>
|
|
|
|
|
|
|
|
<if test="process.workorderId != null">#{process.workorderId},</if>
|
|
|
|
|
|
|
|
<if test="process.processId != null">#{process.processId},</if>
|
|
|
|
|
|
|
|
<if test="process.status != null">#{process.status},</if>
|
|
|
|
|
|
|
|
<if test="process.remark != null">#{process.remark},</if>
|
|
|
|
|
|
|
|
<if test="process.attr1 != null">#{process.attr1},</if>
|
|
|
|
|
|
|
|
<if test="process.attr2 != null">#{process.attr2},</if>
|
|
|
|
|
|
|
|
<if test="process.attr3 != null">#{process.attr3},</if>
|
|
|
|
|
|
|
|
<if test="process.attr4 != null">#{process.attr4},</if>
|
|
|
|
|
|
|
|
<if test="process.createBy != null">#{process.createBy},</if>
|
|
|
|
|
|
|
|
<if test="process.createTime != null">#{process.createTime},</if>
|
|
|
|
|
|
|
|
<if test="process.prodType != null">#{process.prodType},</if>
|
|
|
|
|
|
|
|
<if test="process.factoryCode != null">#{process.factoryCode},</if>
|
|
|
|
|
|
|
|
<if test="process.machineId != null">#{process.machineId},</if>
|
|
|
|
|
|
|
|
<if test="process.machineCode != null">#{process.machineCode},</if>
|
|
|
|
|
|
|
|
<if test="process.routeId != null">#{process.routeId},</if>
|
|
|
|
|
|
|
|
<if test="process.routeVersion != null">#{process.routeVersion},</if>
|
|
|
|
|
|
|
|
<if test="process.routeCode != null">#{process.routeCode},</if>
|
|
|
|
|
|
|
|
<if test="process.nextProcessId != null">#{process.nextProcessId},</if>
|
|
|
|
|
|
|
|
<if test="process.orderNum != null">#{process.orderNum},</if>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateProWorkorderProcessDetail" parameterType="ProWorkorderProcessDetail">
|
|
|
|
<update id="updateProWorkorderProcessDetail" parameterType="ProWorkorderProcessDetail">
|
|
|
|
update pro_workorder_process_detail
|
|
|
|
update pro_workorder_process_detail
|
|
|
@ -126,6 +202,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="routeId != null">route_id = #{routeId},</if>
|
|
|
|
<if test="routeId != null">route_id = #{routeId},</if>
|
|
|
|
<if test="routeVersion != null">route_version = #{routeVersion},</if>
|
|
|
|
<if test="routeVersion != null">route_version = #{routeVersion},</if>
|
|
|
|
<if test="routeCode != null">route_code = #{routeCode},</if>
|
|
|
|
<if test="routeCode != null">route_code = #{routeCode},</if>
|
|
|
|
|
|
|
|
<if test="nextProcessId != null">next_process_id=#{nextProcessId},</if>
|
|
|
|
|
|
|
|
<if test="orderNum != null">order_num=#{orderNum},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
where record_id = #{recordId}
|
|
|
|
where record_id = #{recordId}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|