38 lines
1.1 KiB
Java
38 lines
1.1 KiB
Java
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());
|
||
}
|
||
}
|
||
|