<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
~
|
~ Copyright (c) 2018-2025, ztt All rights reserved.
|
~
|
~ Redistribution and use in source and binary forms, with or without
|
~ modification, are permitted provided that the following conditions are met:
|
~
|
~ Redistributions of source code must retain the above copyright notice,
|
~ this list of conditions and the following disclaimer.
|
~ Redistributions in binary form must reproduce the above copyright
|
~ notice, this list of conditions and the following disclaimer in the
|
~ documentation and/or other materials provided with the distribution.
|
~ Neither the name of the pig4cloud.com developer nor the names of its
|
~ contributors may be used to endorse or promote products derived from
|
~ this software without specific prior written permission.
|
~ Author: ztt
|
~
|
-->
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.chinaztt.mes.plan.mapper.ManufacturingOrderOperationTemplateMapper">
|
|
<resultMap id="routingOperationTemplateMap" type="com.chinaztt.mes.plan.entity.ManufacturingOrderOperationTemplate">
|
<id property="id" column="id"/>
|
<result property="operationTemplateName" column="operation_template_name"/>
|
<result property="operationTemplateNo" column="operation_template_no"/>
|
<result property="operationTemplateType" column="operation_template_type"/>
|
<result property="remark" column="remark"/>
|
<result property="routingOperationId" column="routing_operation_id"/>
|
<result property="dataType" column="data_type"/>
|
<result property="systemNo" column="system_no"/>
|
<result property="moId" column="mo_id"/>
|
</resultMap>
|
<insert id="copy">
|
insert into plan_routing_operation_template
|
(operation_template_name,
|
operation_template_no,
|
operation_template_type,
|
remark,
|
routing_operation_id,
|
data_type,
|
system_no,
|
mo_id)
|
select
|
operation_template_name,
|
operation_template_no,
|
operation_template_type,
|
remark,
|
routing_operation_id,
|
data_type,
|
#{no},
|
#{id1}
|
from technology_routing_operation_template where id= #{id}
|
</insert>
|
<select id="getTemplate" resultType="com.chinaztt.mes.plan.dto.ManufacturingOrderOperationTemplateDTO">
|
SELECT B.*
|
FROM plan_routing_operation_template B
|
LEFT JOIN production_operation_task_supply C ON C.mo_id = B.mo_id
|
LEFT JOIN production_operation_task pot on pot."id"=C.operation_task_id
|
WHERE pot."id" =#{id} and B.mo_routing_operation_id=pot.mo_routing_operation_id
|
|
</select>
|
</mapper>
|