id,work_id,user_id,line_id,
        station_id,plan_id,process_id,
        node_id,dt,status,
        start_time,end_time,assistants
    
    
    
        delete from sta_assembly_work_history
        where  id = #{id,jdbcType=BIGINT} 
    
    
        insert into sta_assembly_work_history
        ( id,work_id,user_id,line_id
        ,station_id,plan_id,process_id
        ,node_id,dt,status
        ,start_time,end_time,assistants
        )
        values (#{id,jdbcType=BIGINT},#{workId,jdbcType=BIGINT},#{userId,jdbcType=BIGINT},#{lineId,jdbcType=BIGINT}
        ,#{stationId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT},#{processId,jdbcType=BIGINT}
        ,#{nodeId,jdbcType=BIGINT},#{dt,jdbcType=TIMESTAMP},#{status,jdbcType=TINYINT}
        ,#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{assistants,jdbcType=VARCHAR}
        )
    
    
        insert into sta_assembly_work_history
        
                id,
                work_id,
                user_id,
                line_id,
                station_id,
                plan_id,
                process_id,
                node_id,
                dt,
                status,
                start_time,
                end_time,
                assistants,
        
        
                #{id,jdbcType=BIGINT},
                #{workId,jdbcType=BIGINT},
                #{userId,jdbcType=BIGINT},
                #{lineId,jdbcType=BIGINT},
                #{stationId,jdbcType=BIGINT},
                #{planId,jdbcType=BIGINT},
                #{processId,jdbcType=BIGINT},
                #{nodeId,jdbcType=BIGINT},
                #{dt,jdbcType=TIMESTAMP},
                #{status,jdbcType=TINYINT},
                #{startTime,jdbcType=TIMESTAMP},
                #{endTime,jdbcType=TIMESTAMP},
                #{assistants,jdbcType=VARCHAR},
        
    
    
        update sta_assembly_work_history
        
                
                    work_id = #{workId,jdbcType=BIGINT},
                
                
                    user_id = #{userId,jdbcType=BIGINT},
                
                
                    line_id = #{lineId,jdbcType=BIGINT},
                
                
                    station_id = #{stationId,jdbcType=BIGINT},
                
                
                    plan_id = #{planId,jdbcType=BIGINT},
                
                
                    process_id = #{processId,jdbcType=BIGINT},
                
                
                    node_id = #{nodeId,jdbcType=BIGINT},
                
                
                    dt = #{dt,jdbcType=TIMESTAMP},
                
                
                    status = #{status,jdbcType=TINYINT},
                
                
                    start_time = #{startTime,jdbcType=TIMESTAMP},
                
                
                    end_time = #{endTime,jdbcType=TIMESTAMP},
                
                
                    assistants = #{assistants,jdbcType=VARCHAR},
                
        
        where   id = #{id,jdbcType=BIGINT} 
    
    
        update sta_assembly_work_history
        set
            work_id =  #{workId,jdbcType=BIGINT},
            user_id =  #{userId,jdbcType=BIGINT},
            line_id =  #{lineId,jdbcType=BIGINT},
            station_id =  #{stationId,jdbcType=BIGINT},
            plan_id =  #{planId,jdbcType=BIGINT},
            process_id =  #{processId,jdbcType=BIGINT},
            node_id =  #{nodeId,jdbcType=BIGINT},
            dt =  #{dt,jdbcType=TIMESTAMP},
            status =  #{status,jdbcType=TINYINT},
            start_time =  #{startTime,jdbcType=TIMESTAMP},
            end_time =  #{endTime,jdbcType=TIMESTAMP},
            assistants =  #{assistants,jdbcType=VARCHAR}
        where   id = #{id,jdbcType=BIGINT}