|
|
@@ -37,6 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
@@ -71,6 +72,35 @@ public class IotDeviceCbdController extends BaseController {
|
|
|
private IotDeviceRefreshService iotDeviceRefreshService;
|
|
|
|
|
|
/**
|
|
|
+ * 获取测报灯列表数据
|
|
|
+ * 普通测报灯 pt
|
|
|
+ * 水稻测报灯 sc
|
|
|
+ * 高空测报灯 gk
|
|
|
+ * @param reqVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping({"/gk/list", "/sd/list", "/pt/list"})
|
|
|
+ public TableDataInfo list(HttpServletRequest request, IotDeviceListReqVo reqVo) {
|
|
|
+ startPage();
|
|
|
+ String reqUri = request.getRequestURI();
|
|
|
+ String[] devTypeList = null;
|
|
|
+ if(reqUri.endsWith("/gk/list")){
|
|
|
+ devTypeList = new String[]{IotDeviceDictConst.TYPE_YF_GKCBD};
|
|
|
+ }else if(reqUri.endsWith("/sd/list")){
|
|
|
+ devTypeList = new String[]{IotDeviceDictConst.TYPE_YF_SDCBD};
|
|
|
+ }else if(reqUri.endsWith("/pt/list")){
|
|
|
+ devTypeList = new String[]{IotDeviceDictConst.TYPE_YF_CBD};
|
|
|
+ }
|
|
|
+ List<IotDeviceListResVo> list = new ArrayList<>();
|
|
|
+ if(devTypeList != null){
|
|
|
+ reqVo.setDevtypeBidList(Arrays.asList(devTypeList));
|
|
|
+ list = iIotDeviceService.selectIotDeviceListByType(reqVo);
|
|
|
+ }
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
* 下发测报灯配置指令
|
|
|
*
|
|
|
* @return
|
|
|
@@ -204,4 +234,28 @@ public class IotDeviceCbdController extends BaseController {
|
|
|
}
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
+
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 水稻测报灯列表
|
|
|
+// * @param reqVo
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// @GetMapping("/sd/list")
|
|
|
+// public TableDataInfo sdList(IotDeviceListReqVo reqVo) {
|
|
|
+// startPage();
|
|
|
+// TosDevicetype tosDevicetype= typeCacheService.getCacheObjectByDevTypeCode(IotDeviceDictConst.TYPE_YF_CBD);
|
|
|
+// reqVo.setDevtypeBid(tosDevicetype.getDevtypeBid());
|
|
|
+// List<IotDeviceListResVo> list = iIotDeviceService.selectIotDeviceListByType(reqVo);
|
|
|
+// for (IotDeviceListResVo resVo : list) {
|
|
|
+// //查询图片数量
|
|
|
+// Map<String, Object> map = new HashMap<>();
|
|
|
+// map.put("devBid", resVo.getDevBid());
|
|
|
+// map.put("cbdimgDelstatus", "0");
|
|
|
+// long count = mongoService.count(IotCbdimg.class, map);
|
|
|
+// resVo.setImgCount(count);
|
|
|
+//
|
|
|
+// }
|
|
|
+// return getDataTable(list);
|
|
|
+// }
|
|
|
}
|