id, task_no, task_desc, order_user_id, send_time, send_by, plan_finish_date, finish_date, date_limit, urgency, address, contact_user, contact_phone, order_time, company_org_id, department_org_id, order_status, event_type, order_type_id, order_pid, tenant_id, process_instance_id, process_def_id, current_task_id, current_users, current_task_name, create_by, date_create, update_by, date_update, geo,videos, pictures, device_id, scenes_id, device_name, scenes_name,in_process_status delete from sc_work_order_manage where id = #{id,jdbcType=INTEGER} insert into sc_work_order_manage (id, task_no, task_desc, order_user_id, send_time, send_by, plan_finish_date, finish_date, date_limit, urgency, address, contact_user, contact_phone, order_time, company_org_id, department_org_id, order_status, event_type, order_type_id, order_pid, tenant_id, process_instance_id, process_def_id, current_task_id, current_users, current_task_name, create_by, date_create, update_by, date_update, geo,videos,pictures) values (#{id,jdbcType=INTEGER}, #{taskNo,jdbcType=VARCHAR}, #{taskDesc,jdbcType=VARCHAR}, #{orderUserId,jdbcType=VARCHAR}, #{sendTime,jdbcType=TIMESTAMP}, #{sendBy,jdbcType=VARCHAR}, #{planFinishDate,jdbcType=TIMESTAMP}, #{finishDate,jdbcType=TIMESTAMP}, #{dateLimit,jdbcType=VARCHAR}, #{urgency,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{contactUser,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR}, #{orderTime,jdbcType=VARCHAR}, #{companyOrgId,jdbcType=VARCHAR}, #{departmentOrgId,jdbcType=VARCHAR}, #{orderStatus,jdbcType=INTEGER}, #{eventType,jdbcType=INTEGER}, #{orderTypeId,jdbcType=INTEGER}, #{orderPid,jdbcType=VARCHAR}, #{tenantId,jdbcType=VARCHAR}, #{processInstanceId,jdbcType=VARCHAR}, #{processDefId,jdbcType=VARCHAR}, #{currentTaskId,jdbcType=VARCHAR}, #{currentUsers,jdbcType=VARCHAR}, #{currentTaskName,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{dateCreate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{dateUpdate,jdbcType=TIMESTAMP}, #{geo,jdbcType=VARCHAR},#{videos,jdbcType=VARCHAR},#{pictures,jdbcType=VARCHAR}) insert into sc_work_order_manage id, task_no, task_desc, order_user_id, send_time, send_by, plan_finish_date, finish_date, date_limit, urgency, address, contact_user, contact_phone, order_time, company_org_id, department_org_id, order_status, event_type, order_type_id, order_pid, tenant_id, process_instance_id, process_def_id, current_task_id, current_users, current_task_name, create_by, date_create, update_by, date_update, geo, videos, pictures, device_id, scenes_id, device_name, scenes_name, #{id,jdbcType=INTEGER}, #{taskNo,jdbcType=VARCHAR}, #{taskDesc,jdbcType=VARCHAR}, #{orderUserId,jdbcType=VARCHAR}, #{sendTime,jdbcType=TIMESTAMP}, #{sendBy,jdbcType=VARCHAR}, #{planFinishDate,jdbcType=TIMESTAMP}, #{finishDate,jdbcType=TIMESTAMP}, #{dateLimit,jdbcType=VARCHAR}, #{urgency,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{contactUser,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR}, #{orderTime,jdbcType=VARCHAR}, #{companyOrgId,jdbcType=VARCHAR}, #{departmentOrgId,jdbcType=VARCHAR}, #{orderStatus,jdbcType=INTEGER}, #{eventType,jdbcType=INTEGER}, #{orderTypeId,jdbcType=INTEGER}, #{orderPid,jdbcType=VARCHAR}, #{tenantId,jdbcType=VARCHAR}, #{processInstanceId,jdbcType=VARCHAR}, #{processDefId,jdbcType=VARCHAR}, #{currentTaskId,jdbcType=VARCHAR}, #{currentUsers,jdbcType=VARCHAR}, #{currentTaskName,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{dateCreate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{dateUpdate,jdbcType=TIMESTAMP}, #{geo,jdbcType=VARCHAR}, #{videos,jdbcType=VARCHAR}, #{pictures,jdbcType=VARCHAR}, #{deviceId,jdbcType=INTEGER}, #{scenesId,jdbcType=INTEGER}, #{deviceName,jdbcType=VARCHAR}, #{scenesName,jdbcType=VARCHAR}, update sc_work_order_manage task_no = #{taskNo,jdbcType=VARCHAR}, task_desc = #{taskDesc,jdbcType=VARCHAR}, order_user_id = #{orderUserId,jdbcType=VARCHAR}, send_time = #{sendTime,jdbcType=TIMESTAMP}, send_by = #{sendBy,jdbcType=VARCHAR}, plan_finish_date = #{planFinishDate,jdbcType=TIMESTAMP}, finish_date = #{finishDate,jdbcType=TIMESTAMP}, date_limit = #{dateLimit,jdbcType=VARCHAR}, urgency = #{urgency,jdbcType=VARCHAR}, address = #{address,jdbcType=VARCHAR}, contact_user = #{contactUser,jdbcType=VARCHAR}, contact_phone = #{contactPhone,jdbcType=VARCHAR}, order_time = #{orderTime,jdbcType=VARCHAR}, company_org_id = #{companyOrgId,jdbcType=VARCHAR}, department_org_id = #{departmentOrgId,jdbcType=VARCHAR}, order_status = #{orderStatus,jdbcType=INTEGER}, event_type = #{eventType,jdbcType=INTEGER}, order_type_id = #{orderTypeId,jdbcType=INTEGER}, order_pid = #{orderPid,jdbcType=VARCHAR}, tenant_id = #{tenantId,jdbcType=VARCHAR}, process_instance_id = #{processInstanceId,jdbcType=VARCHAR}, process_def_id = #{processDefId,jdbcType=VARCHAR}, current_task_id = #{currentTaskId,jdbcType=VARCHAR}, current_users = #{currentUsers,jdbcType=VARCHAR}, current_task_name = #{currentTaskName,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR}, date_create = #{dateCreate,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, date_update = #{dateUpdate,jdbcType=TIMESTAMP}, geo = #{geo,jdbcType=VARCHAR}, videos=#{videos,jdbcType=VARCHAR}, pictures=#{pictures,jdbcType=VARCHAR}, in_process_status=#{inProcessStatus,jdbcType=INTEGER}, where id = #{id,jdbcType=INTEGER} update sc_work_order_manage set task_no = #{taskNo,jdbcType=VARCHAR}, task_desc = #{taskDesc,jdbcType=VARCHAR}, order_user_id = #{orderUserId,jdbcType=VARCHAR}, send_time = #{sendTime,jdbcType=TIMESTAMP}, send_by = #{sendBy,jdbcType=VARCHAR}, plan_finish_date = #{planFinishDate,jdbcType=TIMESTAMP}, finish_date = #{finishDate,jdbcType=TIMESTAMP}, date_limit = #{dateLimit,jdbcType=VARCHAR}, urgency = #{urgency,jdbcType=VARCHAR}, address = #{address,jdbcType=VARCHAR}, contact_user = #{contactUser,jdbcType=VARCHAR}, contact_phone = #{contactPhone,jdbcType=VARCHAR}, order_time = #{orderTime,jdbcType=VARCHAR}, company_org_id = #{companyOrgId,jdbcType=VARCHAR}, department_org_id = #{departmentOrgId,jdbcType=VARCHAR}, order_status = #{orderStatus,jdbcType=INTEGER}, event_type = #{eventType,jdbcType=INTEGER}, order_type_id = #{orderTypeId,jdbcType=INTEGER}, order_pid = #{orderPid,jdbcType=VARCHAR}, tenant_id = #{tenantId,jdbcType=VARCHAR}, process_instance_id = #{processInstanceId,jdbcType=VARCHAR}, process_def_id = #{processDefId,jdbcType=VARCHAR}, current_task_id = #{currentTaskId,jdbcType=VARCHAR}, current_users = #{currentUsers,jdbcType=VARCHAR}, current_task_name = #{currentTaskName,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR}, date_create = #{dateCreate,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, date_update = #{dateUpdate,jdbcType=TIMESTAMP}, geo = #{geo,jdbcType=VARCHAR}, videos = #{videos,jdbcType=VARCHAR}, pictures = #{pictures,jdbcType=VARCHAR}, in_process_status=#{inProcessStatus,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER} insert into sc_work_order_manage( task_no, task_desc, address, order_time, company_org_id, department_org_id, order_status, event_type, order_pid, tenant_id, current_task_name, date_create, date_update, geo,scenes_id,scenes_name,device_id,device_name) values (#{item.taskNo} , #{item.taskDesc}, #{item.address}, #{item.orderTime}, #{item.companyOrgId}, #{item.departmentOrgId}, 0, 3, 0, #{item.tenantId}, '设备报警工单', now(), now(), #{item.geo}, #{item.parentSceneId}, #{item.parentSceneName}, #{item.deviceId}, #{item.deviceName}) delete from sc_work_order_manage where order_status = 0 and device_id in #{item} update sc_work_order_manage set task_desc =#{workOrderManage.taskDesc} ,date_update = now() where id=#{workOrderManage.id} delete from sc_work_order_manage where order_status = 0 and id in #{item}