|
|
@@ -141,6 +141,32 @@ func (this *ChannelsController) List() {
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
|
|
|
+// @Title 设备列表
|
|
|
+// @Description 设备列表
|
|
|
+// @Success 200 {object} business.device.DeviceChannels
|
|
|
+// @router /entity [get]
|
|
|
+func (this *ChannelsController) Entity() {
|
|
|
+ equipMentId := this.GetString("equipMentId")
|
|
|
+ serial := this.GetString("serial")
|
|
|
+ if equipMentId == "" && serial == "" {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ svc := device.GetDeviceService(utils.DBE)
|
|
|
+ if equipMentId != "" {
|
|
|
+ c := svc.GetChannelsByEquipMentId(equipMentId)
|
|
|
+ this.Data["json"] = c
|
|
|
+ this.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if serial != "" {
|
|
|
+ c := svc.GetChannelsBySerial(serial)
|
|
|
+ this.Data["json"] = c
|
|
|
+ this.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// @Title 设备列表
|
|
|
// @Description 设备列表
|
|
|
// @Success 200 {object} business.device.DeviceChannels
|