| | |
| | | LIMIT 0,1 |
| | | </select> |
| | | |
| | | <select id="getCommandHistories" resultType="com.dy.pipIrrGlobal.voRm.VoCommand"> |
| | | |
| | | SELECT |
| | | his.id, |
| | | his.command_name AS commandName, |
| | | inta.name AS intakeName, |
| | | his.rtu_addr AS rtuAddr, |
| | | his.protocol, |
| | | his.send_time AS sendTime, |
| | | his.result_time AS resultTime, |
| | | (CASE |
| | | WHEN his.result = 1 THEN "成功" |
| | | ELSE "失败" |
| | | END) AS result, |
| | | his.result_text, |
| | | IFNULL(cli.name, user.name) AS userName |
| | | FROM rm_command_history his |
| | | INNER JOIN pr_intake inta ON inta.id = his.intake_id |
| | | LEFT JOIN se_client cli ON cli.id = his.operator |
| | | LEFT JOIN ba_user user ON user.id = his.operator |
| | | WHERE his.command_name LIKE '%关阀%' AND his.result =1 AND his.send_time BETWEEN '2024-06-01 00:00:00' AND '2024-07-31 23:59:59' |
| | | </select> |
| | | |
| | | </mapper> |