From 30587170535f5a850c59b4a2323b1a311a22aa6a Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 22 四月 2026 09:35:44 +0800
Subject: [PATCH] refactor(production): 重构生产模块数据访问层
---
src/main/java/com/ruoyi/production/controller/ProductionPlanController.java | 146 ++++++++++++++++++++++++------------------------
1 files changed, 73 insertions(+), 73 deletions(-)
diff --git a/src/main/java/com/ruoyi/production/controller/ProductionPlanController.java b/src/main/java/com/ruoyi/production/controller/ProductionPlanController.java
index df8a6fd..5e73c4f 100644
--- a/src/main/java/com/ruoyi/production/controller/ProductionPlanController.java
+++ b/src/main/java/com/ruoyi/production/controller/ProductionPlanController.java
@@ -34,78 +34,78 @@
@Api(tags = "涓荤敓浜ц鍒�")
public class ProductionPlanController {
- private final ProductionPlanService productionPlanService;
-
- @GetMapping("/listPage")
- @ApiOperation("鑾峰彇鐢熶骇璁″垝鍒楄〃")
- public R<IPage<ProductionPlanVo>> productionPlanListPage(Page<ProductionPlanDto> page, ProductionPlanDto productionPlanDto) {
- return R.ok(productionPlanService.listPage(page, productionPlanDto));
- }
-
- @GetMapping("/loadProdData")
- @ApiOperation("鎷夊彇閿�鍞敓浜ц鍒�")
- @Log(title = "鎷夊彇閿�鍞敓浜ц鍒�", businessType = BusinessType.INSERT)
- public R loadProdData() {
- productionPlanService.loadProdData();
- return R.ok();
- }
-
- @PostMapping("/combine")
- @Log(title = "鍚堝苟鐢熶骇璁″垝", businessType = BusinessType.INSERT)
- @ApiOperation("鍚堝苟鐢熶骇璁″垝")
- public R combine(@RequestBody ProductionPlanDto productionPlanDto) {
- if (productionPlanDto.getIds() == null || productionPlanDto.getIds().isEmpty()) {
- return R.fail("璇烽�夋嫨瑕佷笅鍙戠殑鐢熶骇璁″垝");
- }
-
- if (productionPlanDto.getTotalAssignedQuantity() == null || productionPlanDto.getTotalAssignedQuantity().compareTo(BigDecimal.ZERO) <= 0) {
- return R.fail("璇疯緭鍏ヤ笅鍙戞暟閲�");
- }
- return R.ok(productionPlanService.combine(productionPlanDto));
- }
-
- @PostMapping("")
- @Log(title = "鍒涘缓鐢熶骇璁″垝", businessType = BusinessType.INSERT)
- @ApiOperation("鍒涘缓鐢熶骇璁″垝")
- public R add(@RequestBody ProductionPlanDto productionPlanDto) {
- return R.ok(productionPlanService.add(productionPlanDto));
- }
-
- @PutMapping("")
- @Log(title = "鏇存柊鐢熶骇璁″垝", businessType = BusinessType.UPDATE)
- @ApiOperation("鏇存柊鐢熶骇璁″垝")
- public R update(@RequestBody ProductionPlanDto productionPlanDto) {
- return R.ok(productionPlanService.update(productionPlanDto));
- }
-
- @DeleteMapping("")
- @Log(title = "鍒犻櫎鐢熶骇璁″垝", businessType = BusinessType.DELETE)
- @ApiOperation("鍒犻櫎鐢熶骇璁″垝")
- public R delete(@RequestBody List<Long> ids) {
- return R.ok(productionPlanService.removeByIds(ids));
- }
-
- @PostMapping("/downloadTemplate")
- @Log(title = "涓嬭浇涓荤敓浜ц鍒掑鍏ユā鏉�", businessType = BusinessType.EXPORT)
- @ApiOperation("涓嬭浇涓荤敓浜ц鍒掑鍏ユā鏉�")
- public void importTemplate(HttpServletResponse response) {
- ExcelUtil<ProductionPlanImportDto> excelUtil = new ExcelUtil<>(ProductionPlanImportDto.class);
- excelUtil.importTemplateExcel(response, "涓荤敓浜ц鍒掑鍏ユā鏉�");
- }
-
- @PostMapping("/import")
- @ApiOperation("涓荤敓浜ц鍒掓暟鎹鍏�")
- @Log(title = "涓荤敓浜ц鍒掓暟鎹鍏�", businessType = BusinessType.IMPORT)
- public R importProdData(@RequestParam("file") MultipartFile file) {
- productionPlanService.importProdData(file);
- return R.ok("瀵煎叆鎴愬姛");
- }
-
- @PostMapping("/export")
- @ApiOperation("涓荤敓浜ц鍒掓暟鎹鍑�")
- @Log(title = "涓荤敓浜ц鍒掓暟鎹鍑�", businessType = BusinessType.EXPORT)
- public void exportProdData(HttpServletResponse response, @RequestBody(required = false) List<Long> ids) {
- productionPlanService.exportProdData(response, ids);
- }
+// private final ProductionPlanService productionPlanService;
+//
+// @GetMapping("/listPage")
+// @ApiOperation("鑾峰彇鐢熶骇璁″垝鍒楄〃")
+// public R<IPage<ProductionPlanVo>> productionPlanListPage(Page<ProductionPlanDto> page, ProductionPlanDto productionPlanDto) {
+// return R.ok(productionPlanService.listPage(page, productionPlanDto));
+// }
+//
+// @GetMapping("/loadProdData")
+// @ApiOperation("鎷夊彇閿�鍞敓浜ц鍒�")
+// @Log(title = "鎷夊彇閿�鍞敓浜ц鍒�", businessType = BusinessType.INSERT)
+// public R loadProdData() {
+// productionPlanService.loadProdData();
+// return R.ok();
+// }
+//
+// @PostMapping("/combine")
+// @Log(title = "鍚堝苟鐢熶骇璁″垝", businessType = BusinessType.INSERT)
+// @ApiOperation("鍚堝苟鐢熶骇璁″垝")
+// public R combine(@RequestBody ProductionPlanDto productionPlanDto) {
+// if (productionPlanDto.getIds() == null || productionPlanDto.getIds().isEmpty()) {
+// return R.fail("璇烽�夋嫨瑕佷笅鍙戠殑鐢熶骇璁″垝");
+// }
+//
+// if (productionPlanDto.getTotalAssignedQuantity() == null || productionPlanDto.getTotalAssignedQuantity().compareTo(BigDecimal.ZERO) <= 0) {
+// return R.fail("璇疯緭鍏ヤ笅鍙戞暟閲�");
+// }
+// return R.ok(productionPlanService.combine(productionPlanDto));
+// }
+//
+// @PostMapping("")
+// @Log(title = "鍒涘缓鐢熶骇璁″垝", businessType = BusinessType.INSERT)
+// @ApiOperation("鍒涘缓鐢熶骇璁″垝")
+// public R add(@RequestBody ProductionPlanDto productionPlanDto) {
+// return R.ok(productionPlanService.add(productionPlanDto));
+// }
+//
+// @PutMapping("")
+// @Log(title = "鏇存柊鐢熶骇璁″垝", businessType = BusinessType.UPDATE)
+// @ApiOperation("鏇存柊鐢熶骇璁″垝")
+// public R update(@RequestBody ProductionPlanDto productionPlanDto) {
+// return R.ok(productionPlanService.update(productionPlanDto));
+// }
+//
+// @DeleteMapping("")
+// @Log(title = "鍒犻櫎鐢熶骇璁″垝", businessType = BusinessType.DELETE)
+// @ApiOperation("鍒犻櫎鐢熶骇璁″垝")
+// public R delete(@RequestBody List<Long> ids) {
+// return R.ok(productionPlanService.removeByIds(ids));
+// }
+//
+// @PostMapping("/downloadTemplate")
+// @Log(title = "涓嬭浇涓荤敓浜ц鍒掑鍏ユā鏉�", businessType = BusinessType.EXPORT)
+// @ApiOperation("涓嬭浇涓荤敓浜ц鍒掑鍏ユā鏉�")
+// public void importTemplate(HttpServletResponse response) {
+// ExcelUtil<ProductionPlanImportDto> excelUtil = new ExcelUtil<>(ProductionPlanImportDto.class);
+// excelUtil.importTemplateExcel(response, "涓荤敓浜ц鍒掑鍏ユā鏉�");
+// }
+//
+// @PostMapping("/import")
+// @ApiOperation("涓荤敓浜ц鍒掓暟鎹鍏�")
+// @Log(title = "涓荤敓浜ц鍒掓暟鎹鍏�", businessType = BusinessType.IMPORT)
+// public R importProdData(@RequestParam("file") MultipartFile file) {
+// productionPlanService.importProdData(file);
+// return R.ok("瀵煎叆鎴愬姛");
+// }
+//
+// @PostMapping("/export")
+// @ApiOperation("涓荤敓浜ц鍒掓暟鎹鍑�")
+// @Log(title = "涓荤敓浜ц鍒掓暟鎹鍑�", businessType = BusinessType.EXPORT)
+// public void exportProdData(HttpServletResponse response, @RequestBody(required = false) List<Long> ids) {
+// productionPlanService.exportProdData(response, ids);
+// }
}
--
Gitblit v1.9.3