SELECT
workOrder.work_id,workOrder.create_type,
workOrder.work_title,
workOrder.work_type,
workOrder.work_content,
workOrder.work_create_enterprise_name,
workOrder.work_create_enterprise_id,
info.enterprise_name AS work_assign_enterprose_name,
workOrder.work_assign_enterprose_id,
workOrder.work_assign_man_id,
usr.nick_name AS work_assign_man,
workOrder.work_status,
workOrder.inspection_date,
workOrder.inspection_route,
workOrder.problem_description,
workOrder.icon_url,
workOrder.rectification_plan,
workOrder.rectification_result,
workOrder.responsible_unit,
workOrder.responsible_person,
workOrder.expiry_date,
workOrder.create_by,
workOrder.create_time,
workOrder.update_by,
workOrder.update_time,
workOrder.is_del,
workOrder.remarks,
workOrder.shangbao_time,
workOrder.jiedan_time
FROM
t_work_order workOrder
LEFT JOIN sys_user usr ON usr.user_id = workOrder.work_assign_man_id
LEFT JOIN t_enterprise_info info ON info.enterprise_id = workOrder.work_assign_enterprose_id
insert into t_work_order
work_title,
work_type,
work_content,
work_create_enterprise_name,
work_create_enterprise_id,
work_assign_enterprose_name,
work_assign_enterprose_id,
work_assign_man_id,
work_assign_man,
work_status,
inspection_date,
inspection_route,
problem_description,
icon_url,
rectification_plan,
rectification_result,
responsible_unit,
responsible_person,
expiry_date,
jiedan_time,
shangbao_time,
create_by,
create_time,
update_by,
update_time,
is_del,
remarks,
create_type,
#{workTitle},
#{workType},
#{workContent},
#{workCreateEnterpriseName},
#{workCreateEnterpriseId},
#{workAssignEnterproseName},
#{workAssignEnterproseId},
#{workAssignManId},
#{workAssignMan},
#{workStatus},
#{inspectionDate},
#{inspectionRoute},
#{problemDescription},
#{iconUrl},
#{rectificationPlan},
#{rectificationResult},
#{responsibleUnit},
#{responsiblePerson},
#{expiryDate},
#{jiedanTime},
#{shangbaoTime},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{isDel},
#{remarks},
#{createType},
INSERT INTO t_user_location (user_id,longitude,latitude,create_time)
VALUES
(#{item.userId},
#{item.longitude},
#{item.latitude},
#{item.createTime})
update t_work_order
work_title = #{workTitle},
work_type = #{workType},
work_content = #{workContent},
work_create_enterprise_name = #{workCreateEnterpriseName},
work_create_enterprise_id = #{workCreateEnterpriseId},
work_assign_enterprose_name = #{workAssignEnterproseName},
work_assign_enterprose_id = #{workAssignEnterproseId},
work_assign_man_id = null,
work_assign_man_id = #{workAssignManId},
work_assign_man = #{workAssignMan},
work_status = #{workStatus},
inspection_date = #{inspectionDate},
inspection_route = #{inspectionRoute},
problem_description = #{problemDescription},
icon_url = #{iconUrl},
rectification_plan = #{rectificationPlan},
rectification_result = #{rectificationResult},
responsible_unit = #{responsibleUnit},
responsible_person = #{responsiblePerson},
expiry_date = #{expiryDate},
jiedan_time = #{jiedanTime},
shangbao_time = #{shangbaoTime},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
is_del = #{isDel},
remarks = #{remarks},
create_type = #{createType},
where work_id = #{workId}
delete from t_work_order where work_id = #{workId}
delete from t_work_order where work_id in
#{workId}