id,device_no,work_id,
        repair_id,plan_id,station_id,
        curr_node,node_content,device_cycle_content,
        status,result,
        error_msg,assistants,
        updated_by,in_time,out_time,in_line_time,out_line_time,
        memo
    
    
    
    
        delete from sta_device_last
        where  id = #{id,jdbcType=BIGINT}
    
    
        insert into sta_device_last
        ( id,device_no,work_id
        ,repair_id,plan_id,station_id
        ,curr_node,node_content,device_cycle_content
        ,status,result
        ,error_msg,assistants
        ,updated_by,in_time,out_time
        ,memo)
        values (#{id,jdbcType=BIGINT},#{deviceNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT}
               ,#{repairId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT},#{stationId,jdbcType=BIGINT}
               ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{deviceCycleContent,jdbcType=VARCHAR}
               ,#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT}
               ,#{errorMsg,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR}
               ,#{updatedBy,jdbcType=BIGINT},#{inTime,jdbcType=TIMESTAMP},#{outTime,jdbcType=TIMESTAMP}
               ,#{inLineTime,jdbcType=TIMESTAMP},#{outLineTime,jdbcType=TIMESTAMP}
               ,#{memo,jdbcType=VARCHAR})
    
    
        insert into sta_device_last
        
            id,
            device_no,
            work_id,
            repair_id,
            plan_id,
            station_id,
            curr_node,
            node_content,
            device_cycle_content,
            status,
            result,
            error_msg,
            assistants,
            updated_by,
            in_time,
            out_time,
            in_line_time,
            out_line_time,
            memo,
        
        
            #{id,jdbcType=BIGINT},
            #{deviceNo,jdbcType=VARCHAR},
            #{workId,jdbcType=BIGINT},
            #{repairId,jdbcType=BIGINT},
            #{planId,jdbcType=BIGINT},
            #{stationId,jdbcType=BIGINT},
            #{currNode,jdbcType=BIGINT},
            #{nodeContent,jdbcType=VARCHAR},
            #{deviceCycleContent,jdbcType=VARCHAR},
            #{status,jdbcType=TINYINT},
            #{result,jdbcType=TINYINT},
            #{errorMsg,jdbcType=VARCHAR},
            #{assistants,jdbcType=VARCHAR},
            #{updatedBy,jdbcType=BIGINT},
            #{inTime,jdbcType=TIMESTAMP},
            #{outTime,jdbcType=TIMESTAMP},
            #{inLineTime,jdbcType=TIMESTAMP},
            #{outLineTime,jdbcType=TIMESTAMP},
            #{memo,jdbcType=VARCHAR},
        
    
    
        update sta_device_last
        
            
                device_no = #{deviceNo,jdbcType=VARCHAR},
            
            
                work_id = #{workId,jdbcType=BIGINT},
            
            
                repair_id = #{repairId,jdbcType=BIGINT},
            
            
                plan_id = #{planId,jdbcType=BIGINT},
            
            
                station_id = #{stationId,jdbcType=BIGINT},
            
            
                curr_node = #{currNode,jdbcType=BIGINT},
            
            
                node_content = #{nodeContent,jdbcType=VARCHAR},
            
            
                device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR},
            
            
                status = #{status,jdbcType=TINYINT},
            
            
                result = #{result,jdbcType=TINYINT},
            
            
                error_msg = #{errorMsg,jdbcType=VARCHAR},
            
            
                assistants = #{assistants,jdbcType=VARCHAR},
            
            
                updated_by = #{updatedBy,jdbcType=BIGINT},
            
            
                in_time = #{inTime,jdbcType=TIMESTAMP},
            
            
                out_time = #{outTime,jdbcType=TIMESTAMP},
            
            
                in_line_time = #{inLineTime,jdbcType=TIMESTAMP},
            
            
                out_line_time = #{outLineTime,jdbcType=TIMESTAMP},
            
            
                memo = #{memo,jdbcType=VARCHAR},
            
        
        where   id = #{id,jdbcType=BIGINT}
    
    
        update sta_device_last
        set
            device_no =  #{deviceNo,jdbcType=VARCHAR},
            work_id =  #{workId,jdbcType=BIGINT},
            repair_id =  #{repairId,jdbcType=BIGINT},
            plan_id =  #{planId,jdbcType=BIGINT},
            station_id =  #{stationId,jdbcType=BIGINT},
            curr_node =  #{currNode,jdbcType=BIGINT},
            node_content =  #{nodeContent,jdbcType=VARCHAR},
            device_cycle_content =  #{deviceCycleContent,jdbcType=VARCHAR},
            status =  #{status,jdbcType=TINYINT},
            result =  #{result,jdbcType=TINYINT},
            error_msg =  #{errorMsg,jdbcType=VARCHAR},
            assistants =  #{assistants,jdbcType=VARCHAR},
            updated_by =  #{updatedBy,jdbcType=BIGINT},
            in_time =  #{inTime,jdbcType=TIMESTAMP},
            out_time =  #{outTime,jdbcType=TIMESTAMP},
            in_line_time =  #{inLineTime,jdbcType=TIMESTAMP},
            out_line_time =  #{outLineTime,jdbcType=TIMESTAMP},
            memo =  #{memo,jdbcType=VARCHAR}
        where   id = #{id,jdbcType=BIGINT}