|
|
@ -4,28 +4,28 @@ |
|
|
|
|
|
|
|
<select id="count" resultType="java.lang.Long"> |
|
|
|
select count(1) from basic_device_info t where exists ( |
|
|
|
select 1 from strategy_mes_workstation_equipment where t.device_code=equipment_code and workstation_code=#{workstationCode} |
|
|
|
) |
|
|
|
select 1 from strategy_mes_workstation_equipment where deleted=0 and t.device_code=equipment_code and workstation_code=#{workstationCode} |
|
|
|
) and deleted=0 |
|
|
|
</select> |
|
|
|
<select id="listByWorkstationCode" resultType="com.win.module.mes.controller.workstation.vo.WorkstationEquipmentRespVO"> |
|
|
|
select t.device_code code,t.device_name name from basic_device_info t where exists ( |
|
|
|
select 1 from strategy_mes_workstation_equipment where t.device_code=equipment_code and workstation_code=#{workstationCode} |
|
|
|
) limit #{pageStart},#{pageSize} |
|
|
|
select 1 from strategy_mes_workstation_equipment where deleted=0 and t.device_code=equipment_code and workstation_code=#{workstationCode} |
|
|
|
) and deleted=0 limit #{pageStart},#{pageSize} |
|
|
|
</select> |
|
|
|
<select id="checkCountByWorkstationCode" resultType="java.lang.Long"> |
|
|
|
select count(1) from basic_device_info t where exists( |
|
|
|
select 1 from basic_workstation where code=#{workstationCode} and t.workroom_code=workshop_code |
|
|
|
select 1 from basic_workstation where deleted=0 and code=#{workstationCode} and t.workroom_code=workshop_code |
|
|
|
<if test="productionLineCodeCheck"> |
|
|
|
and t.line_code=production_line_code |
|
|
|
</if> |
|
|
|
) |
|
|
|
) and deleted=0 |
|
|
|
</select> |
|
|
|
<select id="checkListByWorkstationCode" resultType="com.win.module.mes.controller.workstation.vo.WorkstationEquipmentRespVO"> |
|
|
|
select t.device_code code,t.device_name name from basic_device_info t where exists( |
|
|
|
select 1 from basic_workstation where code=#{workstationCode} and t.workroom_code=workshop_code |
|
|
|
select 1 from basic_workstation where deleted=0 and code=#{workstationCode} and t.workroom_code=workshop_code |
|
|
|
<if test="productionLineCodeCheck"> |
|
|
|
and t.line_code=production_line_code |
|
|
|
</if> |
|
|
|
) limit #{pageStart},#{pageSize} |
|
|
|
) and deleted=0 limit #{pageStart},#{pageSize} |
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|