| | |
| | | on arc.button_id = abc.id |
| | | where arc.factory_id=#{factoryId}; |
| | | </select> |
| | | |
| | | <select id="queryUserAndonCallList" resultType="org.jeecg.modules.andon.dto.AndonButtonDTO"> |
| | | select arc.id, |
| | | abc.id as buttonId, |
| | |
| | | and ao.factory_id = arc.factory_id |
| | | and ao.order_status = '1') = 1 |
| | | </select> |
| | | <!-- <select id="queryUserAndonCallList" resultType="org.jeecg.modules.andon.dto.AndonButtonDTO">--> |
| | | <!-- select arc.id,--> |
| | | <!-- abc.id as buttonId,--> |
| | | <!-- abc.button_name as buttonName,--> |
| | | <!-- abc.button_code as buttonCode,--> |
| | | <!-- (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 blinkingFlag, 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 orderIds, bf.factory_name as factoryName, parent_bf.factory_name as parentFactoryName, abc.upgrade_response_duration as upgradeResponseDuration, abc.second_upgrade_response_duration as secondUpgradeResponseDuration, arc.firster_responder as responder, arc.second_responder, arc.third_responder, STUFF((SELECT ',' + ao.order_status--> |
| | | <!-- FROM andon_order ao--> |
| | | <!-- WHERE ao.button_id = arc.button_id--> |
| | | <!-- and ao.factory_id = arc.factory_id--> |
| | | <!-- and ao.order_status != '3'--> |
| | | <!-- FOR XML PATH ('')), 1, 1, '') as orderStatus--> |
| | | <!-- from andon_response_config arc--> |
| | | <!-- left join andon_button_config abc--> |
| | | <!-- on arc.button_id = abc.id--> |
| | | <!-- left join base_factory bf on arc.factory_id = bf.id--> |
| | | <!-- left join base_factory parent_bf on bf.parent_id = parent_bf.id--> |
| | | <!-- where arc.factory_id=#{factoryId}--> |
| | | <!-- and (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') = 1--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="queryUserAndonRespondList" resultType="org.jeecg.modules.andon.dto.AndonButtonDTO"> |
| | | select arc.id, |
| | |
| | | WHERE ao.button_id = arc.button_id |
| | | and ao.factory_id = arc.factory_id |
| | | and ao.order_status = '2' |
| | | FOR XML PATH ('')), 1, 1, '') as orderStatus |
| | | FOR XML PATH ('')), 1, 1, '') as orderStatus, |
| | | (SELECT TOP 1 ao.operator |
| | | FROM andon_order ao |
| | | WHERE ao.button_id = arc.button_id |
| | | and ao.factory_id = arc.factory_id |
| | | and ao.order_status = '2') as operator |
| | | from andon_response_config arc |
| | | left join andon_button_config abc |
| | | on arc.button_id = abc.id |
| | |
| | | and ao.factory_id = arc.factory_id |
| | | and ao.order_status = '2') = 1 |
| | | </select> |
| | | <!-- <select id="queryUserAndonRespondList" resultType="org.jeecg.modules.andon.dto.AndonButtonDTO">--> |
| | | <!-- select arc.id,--> |
| | | <!-- abc.id as buttonId,--> |
| | | <!-- abc.button_name as buttonName,--> |
| | | <!-- abc.button_code as buttonCode,--> |
| | | <!-- (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 = '2') as blinkingFlag,--> |
| | | <!-- 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--> |
| | | <!-- and ao.order_status = '2'--> |
| | | <!-- FOR XML PATH ('')), 1, 1, '') as orderIds,--> |
| | | <!-- bf.factory_name as factoryName,--> |
| | | <!-- parent_bf.factory_name as parentFactoryName,--> |
| | | <!-- abc.upgrade_response_duration as upgradeResponseDuration,--> |
| | | <!-- abc.second_upgrade_response_duration as secondUpgradeResponseDuration,--> |
| | | <!-- arc.firster_responder as responder,--> |
| | | <!-- arc.second_responder,--> |
| | | <!-- arc.third_responder,--> |
| | | <!-- STUFF((SELECT ',' + ao.order_status--> |
| | | <!-- FROM andon_order ao--> |
| | | <!-- WHERE ao.button_id = arc.button_id--> |
| | | <!-- and ao.factory_id = arc.factory_id--> |
| | | <!-- and ao.order_status = '2'--> |
| | | <!-- FOR XML PATH ('')), 1, 1, '') as orderStatus--> |
| | | <!-- from andon_response_config arc--> |
| | | <!-- left join andon_button_config abc--> |
| | | <!-- on arc.button_id = abc.id--> |
| | | <!-- left join base_factory bf on arc.factory_id = bf.id--> |
| | | <!-- left join base_factory parent_bf on bf.parent_id = parent_bf.id--> |
| | | <!-- where arc.factory_id = #{factoryId}--> |
| | | <!-- and (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 = '2') = 1--> |
| | | <!-- </select>--> |
| | | |
| | | |
| | | <select id="queryUserAndonHandelList" resultType="org.jeecg.modules.andon.dto.AndonButtonDTO"> |
| | | select arc.id, |
| | | abc.id as buttonId, |
| | | abc.button_name as buttonName, |
| | | abc.button_code as buttonCode, |
| | | (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 blinkingFlag, |
| | | 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 |
| | | and ao.order_status = '3' |
| | | FOR XML PATH ('')), 1, 1, '') as orderIds, |
| | | bf.factory_name as factoryName, |
| | | parent_bf.factory_name as parentFactoryName, |
| | | abc.upgrade_response_duration as upgradeResponseDuration, |
| | | abc.second_upgrade_response_duration as secondUpgradeResponseDuration, |
| | | arc.firster_responder as responder, |
| | | arc.second_responder, |
| | | arc.third_responder, |
| | | STUFF((SELECT ',' + ao.order_status |
| | | FROM andon_order ao |
| | | WHERE ao.button_id = arc.button_id |
| | | and ao.factory_id = arc.factory_id |
| | | and ao.order_status = '3' |
| | | FOR XML PATH ('')), 1, 1, '') as orderStatus |
| | | from andon_response_config arc |
| | | left join andon_button_config abc |
| | | on arc.button_id = abc.id |
| | | left join base_factory bf on arc.factory_id = bf.id |
| | | left join base_factory parent_bf on bf.parent_id = parent_bf.id |
| | | where arc.factory_id = #{factoryId} |
| | | and (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') = 1 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |