| | |
| | | WHERE |
| | | mpe.equipment_id = me.id |
| | | AND mpe.production_id = #{ productionId } |
| | | <if test="type == 'DNC'"> |
| | | AND me.device_type_dnc = '1' |
| | | </if> |
| | | <if test="type == 'MDC'"> |
| | | AND me.device_type_mdc = '1' |
| | | </if> |
| | | ORDER BY me.equipment_id |
| | | </select> |
| | | |
| | |
| | | WHERE |
| | | t1.id = #{ id } |
| | | </select> |
| | | <select id="queryByProductionIdAndType" resultType="org.jeecg.modules.mdc.entity.MdcEquipment"> |
| | | SELECT |
| | | me.* |
| | | FROM |
| | | mdc_production_equipment mpe, |
| | | mdc_equipment me |
| | | WHERE |
| | | mpe.equipment_id = me.id |
| | | AND mpe.production_id = #{ productionId } |
| | | AND me.device_type_dnc = '1' |
| | | <if test="deviceIds != null and deviceIds.size() > 0"> |
| | | AND me.id IN |
| | | <foreach collection = "deviceIds" item = "id" index = "index" open = "(" close= ")" separator = ","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | ORDER BY me.equipment_id |
| | | </select> |
| | | |
| | | </mapper> |