|
@@ -1287,8 +1287,8 @@ public class NewLampPoleController {
|
|
|
}
|
|
|
/**
|
|
|
* 设置云盒电源
|
|
|
- * @param request sectionList
|
|
|
- * @return 获取故障数
|
|
|
+ * @param wifiDTO WifiDTO
|
|
|
+ * @return 设置云盒电源
|
|
|
*/
|
|
|
@RequestMapping(value = "/setWifiOutInfo", method = RequestMethod.POST)
|
|
|
// public BaseResult<?> setWifiOutInfo(HttpServletRequest request) {
|
|
@@ -1485,4 +1485,89 @@ public class NewLampPoleController {
|
|
|
userVO.setList(reviewerList);
|
|
|
return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,userVO);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 回路概览信息
|
|
|
+ * @param request sectionList
|
|
|
+ * @return 回路概览信息
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/loopInfo", method = RequestMethod.POST)
|
|
|
+ public BaseResult<?> loopInfo(HttpServletRequest request) {
|
|
|
+ Integer version = (Integer) toolUtils.getRequestContent(request, "version", 1);
|
|
|
+ Integer areaId = (Integer) toolUtils.getRequestContent(request, "areaId", 1);
|
|
|
+ Integer sectionId = (Integer) toolUtils.getRequestContent(request, "sectionId", 1);
|
|
|
+ LoopDTO loopDTO = new LoopDTO();
|
|
|
+ loopDTO.setAreaId(areaId);
|
|
|
+ loopDTO.setSectionId(sectionId);
|
|
|
+ loopDTO.setSectionList(toolUtils.getSectionList(request));
|
|
|
+ Integer total = loopService.getLoopTotalByDTO(loopDTO);
|
|
|
+ Integer onlineTotal = loopService.getOnlineLoopTotalByDTO(loopDTO);
|
|
|
+ Integer closeTotal = loopService.getCloseLoopTotalByDTO(loopDTO);
|
|
|
+ Integer alarmTotal = loopService.getAlarmLoopTotalByDTO(loopDTO);
|
|
|
+ LoopDTO dto = loopService.getLoopEleCom(loopDTO);
|
|
|
+ LoopDataVO loopDataVO = new LoopDataVO();
|
|
|
+ loopDataVO.setTotalCount(total);
|
|
|
+ loopDataVO.setOnlineCount(onlineTotal);
|
|
|
+ loopDataVO.setFaultCount(alarmTotal);
|
|
|
+ loopDataVO.setCloseCount(closeTotal);
|
|
|
+ DecimalFormat decimalFormat = new DecimalFormat("0.00");
|
|
|
+ if (dto == null) {
|
|
|
+ loopDataVO.setDayCom(0f);
|
|
|
+ loopDataVO.setMonthCom(0f);
|
|
|
+ loopDataVO.setTotalCom(0f);
|
|
|
+ } else {
|
|
|
+ if (dto.getDayCom() == null) {
|
|
|
+ loopDataVO.setDayCom(0f);
|
|
|
+ } else {
|
|
|
+ Float dayCom = dto.getDayCom();
|
|
|
+ String format = decimalFormat.format(dayCom);
|
|
|
+ loopDataVO.setDayCom(Float.valueOf(format));
|
|
|
+ }
|
|
|
+ if (dto.getMonthCom() == null) {
|
|
|
+ loopDataVO.setMonthCom(0f);
|
|
|
+ } else {
|
|
|
+ Float monthCom = dto.getMonthCom();
|
|
|
+ String format = decimalFormat.format(monthCom);
|
|
|
+ loopDataVO.setMonthCom(Float.valueOf(format));
|
|
|
+ }
|
|
|
+ if (dto.getTotalCom() == null) {
|
|
|
+ loopDataVO.setTotalCom(0f);
|
|
|
+ } else {
|
|
|
+ Float totalCom = dto.getTotalCom();
|
|
|
+ String format = decimalFormat.format(totalCom);
|
|
|
+ loopDataVO.setTotalCom(Float.valueOf(format));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,loopDataVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 回路列表
|
|
|
+ * @return 回路列表
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/loopList", method = RequestMethod.POST)
|
|
|
+ public BaseResult<?> loopList(HttpServletRequest request) {
|
|
|
+ Integer version = (Integer) toolUtils.getRequestContent(request, "version", 1);
|
|
|
+ Integer areaId = (Integer) toolUtils.getRequestContent(request, "areaId", 1);
|
|
|
+ Integer sectionId = (Integer) toolUtils.getRequestContent(request, "sectionId", 1);
|
|
|
+ String keyword = (String) toolUtils.getRequestContent(request, "keyword", 2);
|
|
|
+ Integer page = (Integer) toolUtils.getRequestContent(request, "page", 1);
|
|
|
+ Integer count = (Integer) toolUtils.getRequestContent(request, "count", 1);
|
|
|
+ Integer online = (Integer) toolUtils.getRequestContent(request, "online", 1);
|
|
|
+ if (page == 0) page = 1;
|
|
|
+ if (count == 0) count = 16;
|
|
|
+ LoopDTO loopDTO = new LoopDTO();
|
|
|
+ loopDTO.setAreaId(areaId);
|
|
|
+ loopDTO.setSectionId(sectionId);
|
|
|
+ loopDTO.setKeyword(keyword);
|
|
|
+ loopDTO.setPage(count * (page - 1));
|
|
|
+ loopDTO.setCount(count);
|
|
|
+ loopDTO.setNetStatus(online);
|
|
|
+ loopDTO.setSectionList(toolUtils.getSectionList(request));
|
|
|
+ List<LoopDTO> loopList = loopService.getLoopListByDTO(loopDTO);
|
|
|
+ loopList.forEach(dto -> dto.setPolicyList(new ArrayList<>()));
|
|
|
+ LoopVO loopVO = new LoopVO();
|
|
|
+ loopVO.setList(loopList);
|
|
|
+ return toolUtils.response(InterfaceResultEnum.OPERATION_SUCCESS,version,loopVO);
|
|
|
+ }
|
|
|
}
|