|
|
@ -1,16 +1,22 @@ |
|
|
|
package com.yxt.supervise.report.biz.datacenter; |
|
|
|
|
|
|
|
import com.yxt.common.core.result.ResultBean; |
|
|
|
import com.yxt.supervise.report.api.reportinventorydaygather.ReportInventoryDayGatherVo; |
|
|
|
import com.yxt.supervise.report.biz.projectdaily.ProjectDailyQuery; |
|
|
|
import com.yxt.supervise.report.biz.projectdaily.ProjectDailyService; |
|
|
|
import com.yxt.supervise.report.biz.projectdaily.ProjectDailyVos; |
|
|
|
import com.yxt.supervise.report.biz.projectdaily.ProjectDailys; |
|
|
|
import com.yxt.supervise.report.biz.reportinventory.ReportInventoryDayGatherService; |
|
|
|
import com.yxt.supervise.report.biz.reportinventory.ReportInventoryService; |
|
|
|
import com.yxt.supervise.report.feign.monitor.YDeviceFeign; |
|
|
|
import com.yxt.supervise.report.feign.monitor.YDeviceImageFeign; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author wangpengfei |
|
|
|
* @date 2023/11/13 18:15 |
|
|
@ -24,6 +30,11 @@ public class DataCenterRest { |
|
|
|
YDeviceImageFeign yDeviceImageFeign; |
|
|
|
@Autowired |
|
|
|
YDeviceFeign yDeviceFeign; |
|
|
|
@Autowired |
|
|
|
ReportInventoryDayGatherService reportInventoryDayGatherService; |
|
|
|
@Autowired |
|
|
|
DataCenterService dataCenterService; |
|
|
|
|
|
|
|
//数据总览
|
|
|
|
@PostMapping("/getProjectDaily") |
|
|
|
public ResultBean<ProjectDailyVos> getProjectDaily(@RequestBody ProjectDailys ProjectDailys) { |
|
|
@ -50,23 +61,36 @@ public class DataCenterRest { |
|
|
|
} |
|
|
|
@ApiOperation("获取指定设备列表") |
|
|
|
@GetMapping("/getOtherList") |
|
|
|
public ResultBean getOtherList(@RequestParam(value = "type") String type, @RequestParam(value = "ckId") String ckId){ |
|
|
|
public ResultBean getOtherList( String type, String ckId){ |
|
|
|
return yDeviceFeign.getOtherList(type, ckId); |
|
|
|
} |
|
|
|
@ApiOperation("获取状态数量") |
|
|
|
@GetMapping("/getStatusCount") |
|
|
|
public ResultBean getStatusCount(String deviceType, String statusType, String ckId){ |
|
|
|
return yDeviceFeign.getStatusCount(deviceType, statusType, ckId); |
|
|
|
} |
|
|
|
//库存分析图
|
|
|
|
// @PostMapping("/getProjectDailys")
|
|
|
|
// public ResultBean<ProjectDailyVos> getProjectDailys(@RequestBody ProjectDailyQuery ProjectDailys) {
|
|
|
|
@PostMapping("/getReportInventory") |
|
|
|
public ResultBean<ProjectDailyVos> getReportInventory() { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
Map<String,Object> pv = reportInventoryDayGatherService.getReportInventoryByOrderDate(); |
|
|
|
return rb.success().setData(pv); |
|
|
|
} |
|
|
|
//告警消息
|
|
|
|
|
|
|
|
// @PostMapping("/getRisk")
|
|
|
|
// public ResultBean<ProjectDailyVos> getRisk() {
|
|
|
|
// ResultBean rb = ResultBean.fireFail();
|
|
|
|
//// ResultBean b=projectDailyService.ww(ProjectDailys);
|
|
|
|
//// if(!b.getCode().equals("200")){
|
|
|
|
//// return b;
|
|
|
|
//// }
|
|
|
|
// ProjectDailyVos pv = projectDailyService.fetchByProjectAndDay2(ProjectDailys);
|
|
|
|
// List<ReportInventoryDayGatherVo> pv = reportInventoryDayGatherService.getReportInventoryByOrderDate();
|
|
|
|
// return rb.success().setData(pv);
|
|
|
|
// }
|
|
|
|
//告警消息
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//仓库库存表
|
|
|
|
|
|
|
|
@GetMapping("/getInventory") |
|
|
|
public ResultBean getInventory(String orderDate) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
Map<String,Object> pv = dataCenterService.getInventoryByOrderDate(orderDate); |
|
|
|
return rb.success().setData(pv); |
|
|
|
} |
|
|
|
} |
|
|
|