| | |
| | | <select id="getAndonButtonById" resultType="org.jeecg.modules.andon.entity.AndonButtonConfig"> |
| | | SELECT * FROM andon_button_config WHERE id = #{id} and del_flag = 0 and button_status = '启用' |
| | | </select> |
| | | <select id="queryUserAndonButtonList" resultType="org.jeecg.modules.andon.dto.AndonButtonDTO"> |
| | | select arc.id, |
| | | abc.id as button_id, |
| | | abc.button_name, |
| | | abc.button_code, |
| | | (select count(1) |
| | | from andon_order ao |
| | | where ao.button_id = arc.button_id |
| | | and ao.factory_id = arc.factory_id |
| | | and ao.order_status != '3') as blinking_flag, |
| | | STUFF((SELECT ',' + CAST(ao.id AS VARCHAR) |
| | | FROM andon_order ao |
| | | WHERE ao.button_id = arc.button_id |
| | | and ao.factory_id = arc.factory_id |
| | | FOR XML PATH('')), 1, 1, '') as order_ids |
| | | from andon_response_config arc |
| | | left join andon_button_config abc |
| | | on arc.button_id = abc.id |
| | | where arc.factory_id=#{factoryId}; |
| | | </select> |
| | | </mapper> |