id
        ,pro_id,batch_id,
        process_id,name,number,
        status,creator,
        dt,start_date,end_date,
        deleted,content,input_number,output_number
    
    
        ${alias}.id,
        ${alias}.pro_id,
        ${alias}.batch_id,
        ${alias}.process_id,
        ${alias}.name,
        ${alias}.number,
        ${alias}.status,
        ${alias}.creator,
        ${alias}.dt,
        ${alias}.start_date,
        ${alias}.end_date,
        ${alias}.deleted,
        ${alias}.content,
        ${alias}.input_number,
        ${alias}.output_number
    
    
    
    
    
    
    
    
    
    
        delete
        from pr_assembly_plan
        where id = #{id,jdbcType=BIGINT}
    
    
        insert into pr_assembly_plan
        ( id, pro_id, batch_id
        , process_id, name, number
        , status, creator
        , dt, start_date, end_date
        , deleted, content, input_number, output_number)
        values ( #{id,jdbcType=BIGINT}, #{proId,jdbcType=BIGINT}, #{batchId,jdbcType=BIGINT}
               , #{processId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{number,jdbcType=INTEGER}
               , #{status,jdbcType=TINYINT}, #{creator,jdbcType=VARCHAR}
               , #{dt,jdbcType=TIMESTAMP}, #{startDate,jdbcType=VARCHAR}, #{endDate,jdbcType=VARCHAR}
               , #{deleted,jdbcType=TINYINT}, #{content,jdbcType=VARCHAR}, #{inputNumber,jdbcType=INTEGER}
               , #{outputNumber,jdbcType=INTEGER})
    
    
        insert into pr_assembly_plan
        
            id,
            pro_id,
            batch_id,
            process_id,
            name,
            number,
            status,
            creator,
            dt,
            start_date,
            end_date,
            deleted,
            content,
            input_number,
            output_number,
        
        
            #{id,jdbcType=BIGINT},
            #{proId,jdbcType=BIGINT},
            #{batchId,jdbcType=BIGINT},
            #{processId,jdbcType=BIGINT},
            #{name,jdbcType=VARCHAR},
            #{number,jdbcType=INTEGER},
            #{status,jdbcType=TINYINT},
            #{creator,jdbcType=VARCHAR},
            #{dt,jdbcType=TIMESTAMP},
            #{startDate,jdbcType=VARCHAR},
            #{endDate,jdbcType=VARCHAR},
            #{deleted,jdbcType=TINYINT},
            #{content,jdbcType=VARCHAR},
            #{inputNumber,jdbcType=INTEGER},
            #{outputNumber,jdbcType=INTEGER},
        
    
    
        update pr_assembly_plan
        
            
                pro_id = #{proId,jdbcType=BIGINT},
            
            
                batch_id = #{batchId,jdbcType=BIGINT},
            
            
                process_id = #{processId,jdbcType=BIGINT},
            
            
                name = #{name,jdbcType=VARCHAR},
            
            
                number = #{number,jdbcType=INTEGER},
            
            
                status = #{status,jdbcType=TINYINT},
            
            
                creator = #{creator,jdbcType=VARCHAR},
            
            
                dt = #{dt,jdbcType=TIMESTAMP},
            
            
                start_date = #{startDate,jdbcType=VARCHAR},
            
            
                end_date = #{endDate,jdbcType=VARCHAR},
            
            
                deleted = #{deleted,jdbcType=TINYINT},
            
            
                content = #{content,jdbcType=VARCHAR},
            
            
                input_number = #{inputNumber,jdbcType=INTEGER},
            
            
                output_number = #{outputNumber,jdbcType=INTEGER},
            
        
        where id = #{id,jdbcType=BIGINT}
    
    
        update pr_assembly_plan
        set pro_id        = #{proId,jdbcType=BIGINT},
            batch_id      = #{batchId,jdbcType=BIGINT},
            process_id    = #{processId,jdbcType=BIGINT},
            name          = #{name,jdbcType=VARCHAR},
            number        = #{number,jdbcType=INTEGER},
            status        = #{status,jdbcType=TINYINT},
            creator       = #{creator,jdbcType=VARCHAR},
            dt            = #{dt,jdbcType=TIMESTAMP},
            start_date    = #{startDate,jdbcType=VARCHAR},
            end_date      = #{endDate,jdbcType=VARCHAR},
            deleted       = #{deleted,jdbcType=TINYINT},
            content       = #{content,jdbcType=VARCHAR},
            input_number  = #{inputNumber,jdbcType=INTEGER},
            output_number = #{outputNumber,jdbcType=INTEGER}
        where id = #{id,jdbcType=BIGINT}
    
    
    
    
    
        update pr_assembly_plan
        set deleted = 1
        where id = #{id}