2023.01.28

打开或关闭阀门、灌区时未推送状态时间:已完成

  • 新增:opTime
  • 新增:runtimes

/Device/GetDeviceDetail 接口调用失败:已完成

  • “gatewayId”: “551”,
  • “deviceId”: 9493
  • LEFT JOIN的问题
    • a.DEVICEMODEL 为null
    • 具体sql
      1. SELECT
      2. `a`.`DESCRIPTION` AS `Description`,
      3. `a`.`DEVICEID` AS `Deviceid`,
      4. `a`.`DEVICEMODEL` AS `DeviceSubType`,
      5. `a`.`DEVICEMODELNAME` AS `DeviceSubTypeName`,
      6. `a`.`DEVICENAME` AS `Devicename`,
      7. `a`.`ENABLE` AS `Enable`,
      8. `a`.`STATUS` AS `Status`,
      9. `a`.`SUBTYPE` AS `Subtype`,
      10. `a`.`DEVICETYPE` AS `Devicetype`,
      11. `a`.`PORT` AS `Port`,
      12. `a`.`STATIONID` AS `Stationid`,
      13. `a`.`CHARGETIME` AS `Chargetime`,
      14. `a`.`CLIKACTION` AS `Clikaction`,
      15. `a`.`CLIK_THRESHOLD` AS `clikMaxThreshold`,
      16. `a`.`CLIKMINTHRESHOLD` AS `Clikminthreshold`,
      17. `a`.`CLIKMODE` AS `Clikmode`,
      18. `a`.`CLIK_OUTPUT_MODE` AS `ClikOutputMode`,
      19. `a`.`CLIK_SETTLING_TIME` AS `ClikSettlingTime`,
      20. `a`.`DEFRUNTIME` AS `Defruntime`,
      21. `a`.`ISEXECUTING` AS `Isexecuting`,
      22. `a`.`MAXRANGE` AS `Maxrange`,
      23. `a`.`MINRANGE` AS `Minrange`,
      24. `a`.`PULSEPERCUBICMETER` AS `Pulsepercubicmeter`,
      25. `a`.`PULSEWIDTH` AS `Pulsewidth`,
      26. `a`.`SAMPLE_CYCLE` AS `SampleCycle`,
      27. `b`.`ENABLE` AS `StationEnable`,
      28. `b`.`ISONLINE` AS `StationIsonline`,
      29. `b`.`STATIONNAME` AS `Stationname`,
      30. `b`.`SIGNALLEVEL` AS `StationSignallevel`,
      31. `b`.`STATIONSN` AS `Stationsn`,
      32. `b`.`STATUS` AS `StationStatus`,
      33. `b`.`STATIONTYPE` AS `Stationtype`,
      34. `b`.`VISIABLE` AS `StationVisiable`,
      35. `a`.`SWITCHSTATUS` AS `Switchstatus`,
      36. `a`.`TIMING` AS `Timing`,
      37. `a`.`USESPMVINDEX` AS `Usespmvindex`,
      38. `a`.`VALVEDELAY` AS `Valvedelay`,
      39. `a`.`VALVEFLOWRATE` AS `Valveflowrate`,
      40. `a`.`VALVEMAINORSLAVE` AS `Valvemainorslave`,
      41. `a`.`VALVETYPE` AS `Valvetype`,
      42. `a`.`VOLTAGERANGE` AS `Voltagerange`,
      43. `b`.`PORTNO` AS `StationPortno`,
      44. `b`.`DECODERADDR` AS `StationDecoderaddr`,
      45. `b`.`DESCRIPTION` AS `StationDescription`,
      46. `b`.`PROTOCOLNUMBER` AS `StationProtocolnumber`,
      47. `c`.`NAME` AS `StationProtocolName`,
      48. `d`.`LAT` AS `DeviceLat`,
      49. `d`.`LNG` AS `DeviceLng`,
      50. `a`.`DEVICEINDEX` AS `DeviceIndex`,
      51. `e`.`MAXV` AS `Maxv`,
      52. `e`.`MINV` AS `Minv`,
      53. `e`.`SENSORENOBS` AS `Sensorenobs`,
      54. `e`.`UNIT` AS `Unit`,
      55. e.TYPE,
      56. a.deviceModel,
      57. `b`.`GATEWAYID` AS `GatewayId`
      58. FROM
      59. `device` a
      60. INNER JOIN `station` b ON ((
      61. `a`.`DEVICEID` = 9493
      62. )
      63. AND ( `a`.`STATIONID` = `b`.`STATIONID` ))
      64. LEFT JOIN `station_protocol` c ON ( `b`.`PROTOCOLNUMBER` = `c`.`PROTOCOLNUM` )
      65. LEFT JOIN `device_webmap` d ON ((
      66. `d`.`GATEWAY_ID` = `a`.`GATEWAYID`
      67. )
      68. AND ( `d`.`DEVICE_INDEX` = `a`.`DEVICEINDEX` ))
      69. LEFT JOIN `devicesubtype` e ON ( `a`.`DEVICEMODEL` = `e`.`TYPE` )
      70. LIMIT 0,1