Files
l2/business/src/main/java/com/fizz/business/controller/DashboardController.java
2025-12-26 15:04:24 +08:00

38 lines
1.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.fizz.business.controller;
import com.fizz.common.core.domain.AjaxResult;
import com.fizz.business.service.DashboardService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 首页仪表板相关接口
*/
@RestController
public class DashboardController {
@Resource
private DashboardService dashboardService;
/**
* 当前生产中的计划信息crm_pdi_plan.status = 'PRODUCING'
*/
@GetMapping("/api/business/dashboard/currentPlan")
public AjaxResult getCurrentProducingPlan() {
return AjaxResult.success(dashboardService.getCurrentProducingPlan());
}
/**
* 当前生产卷的关键工艺参数
* - 从 cpl_segment_total.total_values_json 解析
* - 键名来自 DeviceEnum.paramFields
*/
@GetMapping("/api/business/dashboard/currentProcess")
public AjaxResult getCurrentProcessParams() {
return AjaxResult.success(dashboardService.getCurrentProcessParams());
}
}