| | |
| | | <mapper namespace="org.jeecg.modules.eam.mapper.EamSecondMaintenanceOrderMapper"> |
| | | |
| | | <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamSecondMaintenanceOrder"> |
| | | select wmo.*, e.equipment_code, e.equipment_name,e.equipment_model,f.process_instance_id as 'procInstId', |
| | | f.process_definition_key, |
| | | f.process_definition_id, |
| | | f.process_instance_id |
| | | from eam_second_maintenance_order wmo |
| | | inner join eam_equipment e |
| | | on wmo.equipment_id = e.id |
| | | left join flow_my_business f on f.data_id=wmo.id |
| | | SELECT |
| | | wmo.*, |
| | | e.equipment_code, |
| | | e.equipment_name, |
| | | e.equipment_model, |
| | | f.process_instance_id AS 'procInstId', |
| | | f.process_definition_key, |
| | | f.process_definition_id, |
| | | f.process_instance_id |
| | | FROM eam_second_maintenance_order wmo |
| | | INNER JOIN eam_equipment e ON wmo.equipment_id = e.id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | data_id, |
| | | MAX(id) AS max_id -- 获取最大ID |
| | | FROM flow_my_business |
| | | GROUP BY data_id |
| | | ) latest ON wmo.id = latest.data_id |
| | | LEFT JOIN flow_my_business f ON f.id = latest.max_id |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | <select id="queryList" resultType="org.jeecg.modules.eam.dto.EamSecondMaintenanceOrderExport"> |