<?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.rongwei.bscommon.sys.dao.ApsWorkInProgressInventoryDao">

    <resultMap id="BaseResultMap" type="com.rongwei.bsentity.domain.ApsWorkInProgressInventoryDo">
        <id property="id" column="ID" jdbcType="VARCHAR"/>
        <result property="tenantid" column="TENANTID" jdbcType="VARCHAR"/>
        <result property="roption" column="ROPTION" jdbcType="VARCHAR"/>
        <result property="deleted" column="DELETED" jdbcType="CHAR"/>
        <result property="remark" column="REMARK" jdbcType="VARCHAR"/>
        <result property="createdate" column="CREATEDATE" jdbcType="TIMESTAMP"/>
        <result property="createuserid" column="CREATEUSERID" jdbcType="VARCHAR"/>
        <result property="modifydate" column="MODIFYDATE" jdbcType="TIMESTAMP"/>
        <result property="modifyuserid" column="MODIFYUSERID" jdbcType="VARCHAR"/>
        <result property="createusername" column="CREATEUSERNAME" jdbcType="VARCHAR"/>
        <result property="modifyusername" column="MODIFYUSERNAME" jdbcType="VARCHAR"/>
        <result property="blankbatchnumber" column="BLANKBATCHNUMBER" jdbcType="VARCHAR"/>
        <result property="blankid" column="BLANKID" jdbcType="VARCHAR"/>
        <result property="blankname" column="BLANKNAME" jdbcType="VARCHAR"/>
        <result property="processoperationid" column="PROCESSOPERATIONID" jdbcType="VARCHAR"/>
        <result property="workreportrecordid" column="WORKREPORTRECORDID" jdbcType="VARCHAR"/>
        <result property="joboutputmaterialid" column="JOBOUTPUTMATERIALID" jdbcType="VARCHAR"/>
        <result property="reportoutputmaterialid" column="REPORTOUTPUTMATERIALID" jdbcType="VARCHAR"/>
        <result property="batchnumber" column="BATCHNUMBER" jdbcType="VARCHAR"/>
        <result property="workinprocess" column="WORKINPROCESS" jdbcType="VARCHAR"/>
        <result property="productdate" column="PRODUCTDATE" jdbcType="TIMESTAMP"/>
        <result property="productfactory" column="PRODUCTFACTORY" jdbcType="VARCHAR"/>
        <result property="productworkshop" column="PRODUCTWORKSHOP" jdbcType="VARCHAR"/>
        <result property="productdevice" column="PRODUCTDEVICE" jdbcType="VARCHAR"/>
        <result property="customername" column="CUSTOMERNAME" jdbcType="VARCHAR"/>
        <result property="ordernumber" column="ORDERNUMBER" jdbcType="VARCHAR"/>
        <result property="inspectionlevel" column="INSPECTIONLEVEL" jdbcType="VARCHAR"/>
        <result property="isqualified" column="ISQUALIFIED" jdbcType="VARCHAR"/>
        <result property="workinprocesstype" column="WORKINPROCESSTYPE" jdbcType="VARCHAR"/>
        <result property="workinprocessstatus" column="WORKINPROCESSSTATUS" jdbcType="VARCHAR"/>
        <result property="pendingprocessid" column="PENDINGPROCESSID" jdbcType="VARCHAR"/>
        <result property="planmaterialid" column="PLANMATERIALID" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        ID,TENANTID,ROPTION,
        DELETED,REMARK,CREATEDATE,
        CREATEUSERID,MODIFYDATE,MODIFYUSERID,
        CREATEUSERNAME,MODIFYUSERNAME,BLANKBATCHNUMBER,
        BLANKID,BLANKNAME,PROCESSOPERATIONID,
        WORKREPORTRECORDID,JOBOUTPUTMATERIALID,REPORTOUTPUTMATERIALID,
        BATCHNUMBER,WORKINPROCESS,PRODUCTDATE,
        PRODUCTFACTORY,PRODUCTWORKSHOP,PRODUCTDEVICE,
        CUSTOMERNAME,ORDERNUMBER,INSPECTIONLEVEL,
        ISQUALIFIED,WORKINPROCESSTYPE,WORKINPROCESSSTATUS,
        PENDINGPROCESSID,PLANMATERIALID
    </sql>
    <update id="updateWorkinprocessstatus">
        <foreach collection="datas" item="data" separator=";">
            UPDATE aps_work_in_progress_inventory
            SET WORKINPROCESSSTATUS = #{data.workinprocessstatus},
             WORKINPROCESSTYPE = #{data.workinprocesstype}
            WHERE ID = #{data.id}
        </foreach>
    </update>
</mapper>
