Files
klp-oa/klp-aps/src/main/java/com/klp/aps/controller/ApsGanttController.java
2026-03-08 16:02:44 +08:00

46 lines
1.4 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.klp.aps.controller;
import com.klp.common.core.controller.BaseController;
import com.klp.common.core.domain.R;
import com.klp.aps.domain.dto.ApsGanttQueryReq;
import com.klp.aps.domain.vo.ApsFactoryCalendarRespVo;
import com.klp.aps.domain.vo.ApsGanttItemVo;
import com.klp.aps.service.ApsGanttService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* APS 甘特图查询MVP
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/aps")
public class ApsGanttController extends BaseController {
private final ApsGanttService apsGanttService;
/**
* GET /aps/gantt
* 参数lineId/queryStart/queryEnd/planId/orderId
*/
@GetMapping("/gantt")
public R<List<ApsGanttItemVo>> gantt(@Validated ApsGanttQueryReq req) {
return R.ok(apsGanttService.selectGanttItems(req));
}
/**
* 工厂日历聚合接口(减轻前端计算压力)
*/
@GetMapping("/factory-calendar")
public R<ApsFactoryCalendarRespVo> factoryCalendar(@Validated ApsGanttQueryReq req) {
return R.ok(apsGanttService.queryFactoryCalendar(req));
}
}