修改查询控制器 增加显示在线状态字段 具体数据待对接
| | |
| | | @ColumnWidth(30) |
| | | private Date findDt; |
| | | |
| | | /** |
| | | * 在线状态;1-在线,2-离线 |
| | | */ |
| | | @Schema(description = "在线状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Schema(title = "在线状态") |
| | | @ExcelProperty("在线状态") |
| | | @ColumnWidth(1) |
| | | @Max(message = "在线状态只能1或2", value = 2) |
| | | @Min(message = "在线状态只能1或2",value = 1) |
| | | private byte onlineState; |
| | | @ColumnWidth(6) |
| | | private String onlineState; |
| | | } |
| | |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from pr_controller |
| | | where id = #{id,jdbcType=BIGINT} |
| | |
| | | CAST(con.id AS char) AS id, |
| | | con.rtuAddr AS rtuAddr, |
| | | inta.name AS intakeName, |
| | | "在线" AS onlineState, |
| | | (SELECT COUNT(*) FROM pr_intake_controller WHERE controllerId = con.id AND intakeId = inta.id AND operateType = 1) AS bindNumber, |
| | | con.findDt |
| | | con.findDt AS findDt |
| | | FROM pr_controller con |
| | | INNER JOIN pr_intake_controller ic ON ic.controllerId = con.id |
| | | INNER JOIN pr_intake inta ON con.intakeId = inta.id |