完成排产(测试过了)
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
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.ApsScheduleSheetQueryReq;
|
||||
import com.klp.aps.domain.dto.ApsScheduleSheetSupplementSaveReq;
|
||||
import com.klp.aps.domain.vo.ApsScheduleSheetResp;
|
||||
import com.klp.aps.service.ApsScheduleSheetService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 统一排产表(查询 + 导出)
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/aps")
|
||||
public class ApsScheduleSheetController extends BaseController {
|
||||
|
||||
private final ApsScheduleSheetService apsScheduleSheetService;
|
||||
|
||||
/**
|
||||
* GET /aps/schedule-sheet
|
||||
*/
|
||||
@GetMapping("/schedule-sheet")
|
||||
public R<ApsScheduleSheetResp> query(@Validated ApsScheduleSheetQueryReq req) {
|
||||
return R.ok(apsScheduleSheetService.query(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /aps/schedule-sheet/export
|
||||
*/
|
||||
@GetMapping("/schedule-sheet/export")
|
||||
public void export(@Validated ApsScheduleSheetQueryReq req, HttpServletResponse response) {
|
||||
apsScheduleSheetService.exportExcel(req, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /aps/schedule-sheet/supplement/save
|
||||
*/
|
||||
@PostMapping("/schedule-sheet/supplement/save")
|
||||
public R<Void> saveSupplement(@Validated @RequestBody ApsScheduleSheetSupplementSaveReq req) {
|
||||
apsScheduleSheetService.saveSupplement(req, getUsername());
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user