<?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.aucma.api.mapper.PdaBindingMapper">


    <select id="selectBoxNameByCode" resultType="string">
        SELECT MATERIAL_NAME
        FROM AUCMA_MES.BASE_BOMINFO
        WHERE MATERIAL_CODE = #{boxCode}
    </select>

    <insert id="insertBindingInfo">
        INSERT INTO AUCMA_SCADA.CODE_BINDING (OBJ_ID, BOX_CODE, BOX_NAME, PRODUCT_CODE, BINDING_RESULT, RECORD_TIME1,
                                              RECORD_TIME2)
        VALUES (SEQ_CODE_BINDING.nextval, #{boxCode}, #{boxName}, #{innerCode}, '成功', SYSDATE, SYSDATE)
    </insert>

</mapper>