From 2e6403fdee19cffd3739224a7b48f4c52c1ec9ea Mon Sep 17 00:00:00 2001 From: liumingxiy Date: Tue, 12 Nov 2024 08:52:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=9B=E5=BB=BA=E8=80=85?= =?UTF-8?q?=E4=B8=8E=E6=9B=B4=E6=96=B0=E8=80=85=E7=9A=84=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WmsInventoryConfigureController.java | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsInventoryConfigureController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsInventoryConfigureController.java index d92664b..74f0ef5 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsInventoryConfigureController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsInventoryConfigureController.java @@ -2,6 +2,7 @@ package com.ktg.mes.md.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -23,14 +24,13 @@ import com.ktg.common.core.page.TableDataInfo; /** * 盘点计划配置Controller - * + * * @author yinjinlu * @date 2024-11-11 */ @RestController @RequestMapping("/md/CONFIGURE") -public class WmsInventoryConfigureController extends BaseController -{ +public class WmsInventoryConfigureController extends BaseController { @Autowired private IWmsInventoryConfigureService wmsInventoryConfigureService; @@ -39,8 +39,7 @@ public class WmsInventoryConfigureController extends BaseController */ @PreAuthorize("@ss.hasPermi('md:CONFIGURE:list')") @GetMapping("/list") - public TableDataInfo list(WmsInventoryConfigure wmsInventoryConfigure) - { + public TableDataInfo list(WmsInventoryConfigure wmsInventoryConfigure) { startPage(); List list = wmsInventoryConfigureService.selectWmsInventoryConfigureList(wmsInventoryConfigure); return getDataTable(list); @@ -52,8 +51,7 @@ public class WmsInventoryConfigureController extends BaseController @PreAuthorize("@ss.hasPermi('md:CONFIGURE:export')") @Log(title = "盘点计划配置", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, WmsInventoryConfigure wmsInventoryConfigure) - { + public void export(HttpServletResponse response, WmsInventoryConfigure wmsInventoryConfigure) { List list = wmsInventoryConfigureService.selectWmsInventoryConfigureList(wmsInventoryConfigure); ExcelUtil util = new ExcelUtil(WmsInventoryConfigure.class); util.exportExcel(response, list, "盘点计划配置数据"); @@ -64,8 +62,7 @@ public class WmsInventoryConfigureController extends BaseController */ @PreAuthorize("@ss.hasPermi('md:CONFIGURE:query')") @GetMapping(value = "/{wmsInventoryConfigureId}") - public AjaxResult getInfo(@PathVariable("wmsInventoryConfigureId") Long wmsInventoryConfigureId) - { + public AjaxResult getInfo(@PathVariable("wmsInventoryConfigureId") Long wmsInventoryConfigureId) { return AjaxResult.success(wmsInventoryConfigureService.selectWmsInventoryConfigureByWmsInventoryConfigureId(wmsInventoryConfigureId)); } @@ -75,8 +72,8 @@ public class WmsInventoryConfigureController extends BaseController @PreAuthorize("@ss.hasPermi('md:CONFIGURE:add')") @Log(title = "盘点计划配置", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody WmsInventoryConfigure wmsInventoryConfigure) - { + public AjaxResult add(@RequestBody WmsInventoryConfigure wmsInventoryConfigure) { + wmsInventoryConfigure.setCreateBy(getUsername()); return toAjax(wmsInventoryConfigureService.insertWmsInventoryConfigure(wmsInventoryConfigure)); } @@ -86,8 +83,8 @@ public class WmsInventoryConfigureController extends BaseController @PreAuthorize("@ss.hasPermi('md:CONFIGURE:edit')") @Log(title = "盘点计划配置", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody WmsInventoryConfigure wmsInventoryConfigure) - { + public AjaxResult edit(@RequestBody WmsInventoryConfigure wmsInventoryConfigure) { + wmsInventoryConfigure.setUpdateBy(getUsername()); return toAjax(wmsInventoryConfigureService.updateWmsInventoryConfigure(wmsInventoryConfigure)); } @@ -96,9 +93,8 @@ public class WmsInventoryConfigureController extends BaseController */ @PreAuthorize("@ss.hasPermi('md:CONFIGURE:remove')") @Log(title = "盘点计划配置", businessType = BusinessType.DELETE) - @DeleteMapping("/{wmsInventoryConfigureIds}") - public AjaxResult remove(@PathVariable Long[] wmsInventoryConfigureIds) - { + @DeleteMapping("/{wmsInventoryConfigureIds}") + public AjaxResult remove(@PathVariable Long[] wmsInventoryConfigureIds) { return toAjax(wmsInventoryConfigureService.deleteWmsInventoryConfigureByWmsInventoryConfigureIds(wmsInventoryConfigureIds)); } }