| | |
| | | </foreach> |
| | | </select> |
| | | |
| | | <!--根据设备编号查询设备信息和部门信息--> |
| | | <select id="findEquDepList" resultType="org.jeecg.modules.mdc.dto.MdcEquDepDto"> |
| | | SELECT |
| | | sd.id, |
| | | sd.parent_id, |
| | | sd.depart_name, |
| | | sd.org_type, |
| | | me.equipment_id, |
| | | me.equipment_name, |
| | | me.equipment_type |
| | | FROM |
| | | mdc_equipment_depart med |
| | | LEFT JOIN sys_depart sd ON med.dep_id = sd.id |
| | | LEFT JOIN mdc_equipment me ON me.id = med.equipment_id |
| | | <where> |
| | | me.equipment_id IN |
| | | <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据设备编号查询设备信息和产线信息--> |
| | | <select id="findEquProList" resultType="org.jeecg.modules.mdc.dto.MdcEquProDto"> |
| | | SELECT |
| | | mp.id, |
| | | mp.parent_id, |
| | | mp.production_name, |
| | | mp.org_type, |
| | | me.equipment_id, |
| | | me.equipment_name, |
| | | me.equipment_type |
| | | FROM |
| | | mdc_production_equipment mpe |
| | | LEFT JOIN mdc_production mp ON mpe.production_id = mp.id |
| | | LEFT JOIN mdc_equipment me ON me.id = mpe.equipment_id |
| | | <where> |
| | | me.equipment_id IN |
| | | <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |