| | |
| | | WHERE |
| | | med.equipment_id = me.id |
| | | AND med.dep_id = #{ departId } |
| | | ORDER BY me.equipment_id |
| | | </select> |
| | | |
| | | <!--根据产线id查询设备--> |
| | |
| | | WHERE |
| | | mpe.equipment_id = me.id |
| | | AND mpe.production_id = #{ productionId } |
| | | ORDER BY me.equipment_id |
| | | </select> |
| | | |
| | | <!--根据产线id查询设备id集合--> |
| | |
| | | k.equipment_type, |
| | | k.equipment_type_pictures |
| | | ORDER BY |
| | | equipmentName |
| | | EquipmentID |
| | | </select> |
| | | |
| | | <!--根据部门id查询设备id集合--> |
| | |
| | | </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> |
| | | ORDER BY sd.depart_order |
| | | </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> |
| | | ORDER BY mp.production_order |
| | | </select> |
| | | |
| | | <!--根据大屏车间id查询设备列表--> |
| | | <select id="getEquipmentByWorkshopId" resultType="org.jeecg.modules.mdc.entity.MdcEquipment"> |
| | | SELECT |
| | | me.* |
| | | FROM |
| | | mdc_workshop_equipment mwe |
| | | LEFT JOIN mdc_equipment me ON me.equipment_id = mwe.equipment_id |
| | | <where> |
| | | AND mwe.workshop_id = #{ workshopEquipmentVo.workshopId } |
| | | <if test="workshopEquipmentVo.equipmentId != null and workshopEquipmentVo.equipmentId != ''"> |
| | | AND mwe.equipment_id = #{ workshopEquipmentVo.equipmentId } |
| | | </if> |
| | | </where> |
| | | ORDER BY me.equipment_id |
| | | </select> |
| | | |
| | | |
| | | </mapper> |