OEE初版,错误问题和交互问题1.29再说
This commit is contained in:
@@ -8,10 +8,10 @@ import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.da.domain.bo.OeeQueryBo;
|
||||
import com.klp.da.domain.vo.OeeLineSummaryVo;
|
||||
import com.klp.da.domain.vo.OeeLossCategorySummaryVo;
|
||||
import com.klp.da.domain.vo.OeeLossReasonVo;
|
||||
import com.klp.da.domain.vo.OeeEventVo;
|
||||
import com.klp.da.service.IOeeReportService;
|
||||
import com.klp.da.service.OeeSummaryJobService;
|
||||
import com.klp.da.service.OeeTheoryCycleJobService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -40,6 +40,8 @@ import java.util.Map;
|
||||
public class OeeReportController extends BaseController {
|
||||
|
||||
private final IOeeReportService oeeReportService;
|
||||
private final OeeTheoryCycleJobService oeeTheoryCycleJobService;
|
||||
private final OeeSummaryJobService oeeSummaryJobService;
|
||||
|
||||
/**
|
||||
* KPI + 趋势汇总
|
||||
@@ -50,6 +52,24 @@ public class OeeReportController extends BaseController {
|
||||
return R.ok(oeeReportService.summary(queryBo));
|
||||
}
|
||||
|
||||
/**
|
||||
* KPI + 趋势汇总(异步任务):立即返回 jobId,通过 WebSocket 推送进度与结果。
|
||||
*
|
||||
* 前端订阅:
|
||||
* ws://{host}/websocket?type={wsType}
|
||||
*/
|
||||
@Log(title = "OEE 报表-汇总(异步)", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/summary/job")
|
||||
public R<Map<String, Object>> summaryJob(OeeQueryBo queryBo) {
|
||||
System.out.println("[OEE][summary][job][controller] request received, thread=" + Thread.currentThread().getName()
|
||||
+ ", startDate=" + (queryBo == null ? null : queryBo.getStartDate())
|
||||
+ ", endDate=" + (queryBo == null ? null : queryBo.getEndDate())
|
||||
+ ", lineIds=" + (queryBo == null ? null : queryBo.getLineIds()));
|
||||
Map<String, Object> resp = oeeSummaryJobService.createAndStart(queryBo);
|
||||
System.out.println("[OEE][summary][job][controller] job created, resp=" + resp);
|
||||
return R.ok(resp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 7 大损失汇总
|
||||
*/
|
||||
@@ -77,5 +97,34 @@ public class OeeReportController extends BaseController {
|
||||
public void exportWord(OeeQueryBo queryBo, HttpServletResponse response) {
|
||||
oeeReportService.exportWord(queryBo, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 理论节拍回归(散点+拟合线)
|
||||
*
|
||||
* 说明:该接口用于前端绘制“散点+回归折线”的图形,节拍数据来源于 WMS 回归结果。
|
||||
*/
|
||||
@Log(title = "OEE 报表-理论节拍回归", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/theoryCycle/regression")
|
||||
public R<Map<String, Object>> theoryCycleRegression(OeeQueryBo queryBo) {
|
||||
return R.ok(oeeReportService.theoryCycleRegression(queryBo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 理论节拍回归(异步任务):立即返回 jobId,通过 WebSocket 推送进度与结果。
|
||||
*
|
||||
* 前端订阅:
|
||||
* ws://{host}/websocket?type={wsType}
|
||||
*/
|
||||
@Log(title = "OEE 报表-理论节拍回归(异步)", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/theoryCycle/regression/job")
|
||||
public R<Map<String, Object>> theoryCycleRegressionJob(OeeQueryBo queryBo) {
|
||||
System.out.println("[OEE][theoryCycle][job][controller] request received, thread=" + Thread.currentThread().getName()
|
||||
+ ", startTime=" + (queryBo == null ? null : queryBo.getStartTime())
|
||||
+ ", endTime=" + (queryBo == null ? null : queryBo.getEndTime())
|
||||
+ ", lineIds=" + (queryBo == null ? null : queryBo.getLineIds()));
|
||||
Map<String, Object> resp = oeeTheoryCycleJobService.createAndStart(queryBo);
|
||||
System.out.println("[OEE][theoryCycle][job][controller] job created, resp=" + resp);
|
||||
return R.ok(resp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user