b.instance_activity_id as sub_instance_activity_id, b.repair_instance_id as sub_repair_instance_id, b.process_activity_id as sub_process_activity_id, b.fault_type as sub_fault_type, b.fault_description as sub_fault_description, b.design_operations as sub_design_operations, b.device_id as sub_device_id, b.repair_type as sub_repair_type, b.outsrc_id as sub_outsrc_id, b.process_handle_resolution as sub_process_handle_resolution, b.remark as sub_remark, b.process_handle_status as sub_process_handle_status, b.process_step_order as sub_process_step_order, b.start_time as sub_start_time, b.end_time as sub_end_time, b.handle_user_id as sub_handle_user_id, b.handle_by as sub_handle_by, b.handle_time as sub_handle_time
b.instance_activity_id as sub_instance_activity_id, b.repair_instance_id as sub_repair_instance_id, b.process_activity_id as sub_process_activity_id, b.fault_type as sub_fault_type, b.fault_description as sub_fault_description, b.design_operations as sub_design_operations, b.device_id as sub_device_id, b.repair_type as sub_repair_type, b.outsrc_id as sub_outsrc_id, b.process_handle_resolution as sub_process_handle_resolution, b.remark as sub_remark, b.process_handle_status as sub_process_handle_status, b.process_step_order as sub_process_step_order, b.start_time as sub_start_time, b.end_time as sub_end_time, b.handle_user_id as sub_handle_user_id, b.handle_by as sub_handle_by, b.handle_time as sub_handle_time
from dms_bills_fault_instance a
from dms_bills_fault_instance a
left join dms_base_device_ledger dbdl on a.device_id=dbdl.device_id
left join dms_base_device_ledger dbdl on a.device_id=dbdl.device_id
left join dms_fault_instance_activity b on b.repair_instance_id = a.repair_instance_id
left join dms_fault_instance_activity b on b.repair_instance_id = a.repair_instance_id
where a.repair_instance_id = #{repairInstanceId} order by b.process_step_order
where a.repair_instance_id = #{repairInstanceId} order by b.process_step_order
</select>
</select>
@ -253,6 +262,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join dms_fault_instance_activity dfia on dbfi.repair_instance_id=dfia.repair_instance_id
left join dms_fault_instance_activity dfia on dbfi.repair_instance_id=dfia.repair_instance_id
where dbfi.repair_instance_id = #{repairInstanceId} and dfia.process_step_order=1
where dbfi.repair_instance_id = #{repairInstanceId} and dfia.process_step_order=1
select * from dms_fault_instance_activity where instance_activity_id = (select min(instance_activity_id) FROM dms_fault_instance_activity where repair_instance_id = #{repairInstanceId})
select * from dms_fault_instance_activity where instance_activity_id = (select min(instance_activity_id) FROM dms_fault_instance_activity where repair_instance_id = #{repairInstanceId})