| | |
| | | on e.id = ext.id |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | <select id="queryList" resultType="org.jeecg.modules.eam.entity.EamEquipment"> |
| | | select e.*, |
| | | ext.maintenance_status, |
| | | ext.repair_status, |
| | | ext.latest_second_maintenance, |
| | | ext.next_second_maintenance, |
| | | ext.latest_third_maintenance, |
| | | ext.next_third_maintenance, |
| | | ext.technology_status, |
| | | ext.third_maintenance_period, |
| | | ext.technology_check_period, |
| | | ext.latest_technology_check, |
| | | ext.next_technology_check |
| | | from eam_equipment e |
| | | left join eam_equipment_extend ext |
| | | on e.id = ext.id |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | <select id="queryByEamCenterId" resultType="org.jeecg.modules.eam.entity.EamEquipment"> |
| | | select * from |
| | | eam_equipment |
| | | where del_flag = 0 |
| | | and factory_org_code =(select org_code from eam_base_factory where eam_base_factory.id=#{eamCenterId}) |
| | | </select> |
| | | <select id="selectTechnicalEquipmentList" resultType="org.jeecg.modules.eam.entity.EamEquipment"> |
| | | select e.*, |
| | | ext.latest_third_maintenance, |
| | | ext.next_third_maintenance, |
| | | ext.technology_status, |
| | | ext.third_maintenance_period, |
| | | ext.technology_check_period, |
| | | ext.latest_technology_check, |
| | | ext.next_technology_check, |
| | | ext.technology_generate_flag, |
| | | ext.third_maintenance_generate_flag |
| | | from eam_equipment e |
| | | left join eam_equipment_extend ext |
| | | on e.id = ext.id |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | <select id="selectThreeMaintenanceEquipmentList" resultType="org.jeecg.modules.eam.entity.EamEquipment"> |
| | | select e.*, |
| | | ext.latest_third_maintenance, |
| | | ext.next_third_maintenance, |
| | | ext.technology_status, |
| | | ext.third_maintenance_period, |
| | | ext.technology_check_period, |
| | | ext.latest_technology_check, |
| | | ext.next_technology_check, |
| | | ext.technology_generate_flag, |
| | | ext.third_maintenance_generate_flag |
| | | from eam_equipment e |
| | | left join eam_equipment_extend ext |
| | | on e.id = ext.id |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | <select id="echartsList" resultType="org.jeecg.modules.eam.dto.EchartsDto"> |
| | | WITH TotalCount AS ( |
| | | SELECT COUNT(a.id) AS total_count |
| | | FROM eam_equipment_extend a |
| | | WHERE a.technology_status IS NOT NULL |
| | | <if test="ids != null and ids != ''"> |
| | | AND a.id IN |
| | | <foreach collection="ids" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | ) |
| | | SELECT |
| | | COUNT(t.technology_status) AS "value", |
| | | item.item_text AS "name", |
| | | item.item_value AS "code", |
| | | tc.total_count AS "total" |
| | | FROM sys_dict c |
| | | LEFT JOIN sys_dict_item item ON c.id = item.dict_id |
| | | LEFT JOIN eam_equipment_extend t ON t.technology_status = item.item_value |
| | | <if test="ids != null and ids != ''"> |
| | | AND t.id IN |
| | | <foreach collection="ids" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | CROSS JOIN TotalCount tc |
| | | WHERE c.dict_code = 'equipment_technology_status' |
| | | GROUP BY item.item_text, item.item_value, tc.total_count |
| | | ORDER BY item.item_value |
| | | </select> |
| | | </mapper> |