| | |
| | | <mapper namespace="org.jeecg.modules.eam.mapper.EamInspectionOrderMapper"> |
| | | |
| | | <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamInspectionOrder"> |
| | | select wmo.*, e.equipment_code, e.equipment_name, e.equipment_model |
| | | 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_inspection_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 |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | |
| | | ORDER BY |
| | | t1.plan_inspection_date ASC |
| | | </select> |
| | | <select id="queryList" resultType="org.jeecg.modules.eam.dto.EamInspectionOrderExport"> |
| | | SELECT |
| | | t2.equipment_name equipmentName, |
| | | t2.equipment_code equipmentCode, |
| | | t2.equipment_model equipmentModel, |
| | | SUBSTRING(t2.factory_org_code,1,6) factoryName, |
| | | DATEPART( YEAR, t1.inspection_date ) AS inspectionYear, |
| | | DATEPART( MONTH, t1.inspection_date ) AS inspectionMonth, |
| | | t1.hf_code hfCode |
| | | FROM |
| | | eam_inspection_order t1 |
| | | LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id |
| | | WHERE |
| | | 1=1 |
| | | <if test="ids != null and ids.size() > 0"> |
| | | AND t1.id IN |
| | | <foreach collection="ids" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | AND t1.inspection_status = 'COMPLETE' |
| | | GROUP BY |
| | | t2.equipment_name, |
| | | t2.equipment_code, |
| | | t2.equipment_model , |
| | | t2.factory_org_code , |
| | | DATEPART( YEAR, t1.inspection_date ), |
| | | DATEPART( MONTH, t1.inspection_date ), |
| | | t1.hf_code |
| | | </select> |
| | | |
| | | </mapper> |