From 904727f59b7e10a291ce7d1576e33192a619f2f2 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期二, 05 八月 2025 17:08:39 +0800
Subject: [PATCH] MDC设备树和设备权限改造

---
 src/main/java/org/jeecg/modules/mes/controller/MesProductionOrderController.java |  191 ++++++++++++++---------------------------------
 1 files changed, 57 insertions(+), 134 deletions(-)

diff --git a/src/main/java/org/jeecg/modules/mes/controller/MesProductionOrderController.java b/src/main/java/org/jeecg/modules/mes/controller/MesProductionOrderController.java
index 63d55ef..7003c7f 100644
--- a/src/main/java/org/jeecg/modules/mes/controller/MesProductionOrderController.java
+++ b/src/main/java/org/jeecg/modules/mes/controller/MesProductionOrderController.java
@@ -14,148 +14,71 @@
 import org.jeecg.modules.mes.service.IMesProductionOrderService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.Arrays;
 
 /**
-* @Description: SAP鐢熶骇璁㈠崟
-* @Author: jeecg-boot
-* @Date:   2025-07-04
-* @Version: V1.0
-*/
-@Api(tags="SAP鐢熶骇璁㈠崟")
+ * @Description: SAP鐢熶骇璁㈠崟
+ * @Author: jeecg-boot
+ * @Date: 2025-07-04
+ * @Version: V1.0
+ */
+@Api(tags = "SAP鐢熶骇璁㈠崟")
 @RestController
-@RequestMapping("/mesproductionwork/mesProductionOrder")
+@RequestMapping("/mes/productionOrder")
 @Slf4j
 public class MesProductionOrderController extends JeecgController<MesProductionOrder, IMesProductionOrderService> {
-   @Autowired
-   private IMesProductionOrderService mesProductionOrderService;
+    @Autowired
+    private IMesProductionOrderService mesProductionOrderService;
 
-   /**
-    * 鍒嗛〉鍒楄〃鏌ヨ
-    *
-    * @param mesProductionOrder
-    * @param pageNo
-    * @param pageSize
-    * @param req
-    * @return
-    */
-   //@AutoLog(value = "SAP鐢熶骇璁㈠崟-鍒嗛〉鍒楄〃鏌ヨ")
-   @ApiOperation(value="SAP鐢熶骇璁㈠崟-鍒嗛〉鍒楄〃鏌ヨ", notes="SAP鐢熶骇璁㈠崟-鍒嗛〉鍒楄〃鏌ヨ")
-   @GetMapping(value = "/list")
-   public Result<IPage<MesProductionOrder>> queryPageList(MesProductionOrder mesProductionOrder,
-                                  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-                                  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-                                  HttpServletRequest req) {
-       QueryWrapper<MesProductionOrder> queryWrapper = QueryGenerator.initQueryWrapper(mesProductionOrder, req.getParameterMap());
-       Page<MesProductionOrder> page = new Page<MesProductionOrder>(pageNo, pageSize);
-       IPage<MesProductionOrder> pageList = mesProductionOrderService.page(page, queryWrapper);
-       return Result.OK(pageList);
-   }
+    /**
+     * 鍒嗛〉鍒楄〃鏌ヨ
+     *
+     * @param mesProductionOrder
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "SAP鐢熶骇璁㈠崟-鍒嗛〉鍒楄〃鏌ヨ", notes = "SAP鐢熶骇璁㈠崟-鍒嗛〉鍒楄〃鏌ヨ")
+    @GetMapping(value = "/list")
+    public Result<IPage<MesProductionOrder>> queryPageList(MesProductionOrder mesProductionOrder,
+                                                           @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                           @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                           HttpServletRequest req) {
+        QueryWrapper<MesProductionOrder> queryWrapper = QueryGenerator.initQueryWrapper(mesProductionOrder, req.getParameterMap());
+        Page<MesProductionOrder> page = new Page<MesProductionOrder>(pageNo, pageSize);
+        IPage<MesProductionOrder> pageList = mesProductionOrderService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
 
-   /**
-    *   娣诲姞
-    *
-    * @param mesProductionOrder
-    * @return
-    */
-   @AutoLog(value = "SAP鐢熶骇璁㈠崟-娣诲姞")
-   @ApiOperation(value="SAP鐢熶骇璁㈠崟-娣诲姞", notes="SAP鐢熶骇璁㈠崟-娣诲姞")
-   //@RequiresPermissions("org.jeecg.modules:mes_production_order:add")
-   @PostMapping(value = "/add")
-   public Result<String> add(@RequestBody MesProductionOrder mesProductionOrder) {
-       mesProductionOrderService.save(mesProductionOrder);
-       return Result.OK("娣诲姞鎴愬姛锛�");
-   }
+    /**
+     *  缂栬緫
+     *
+     * @param mesProductionOrder
+     * @return
+     */
+    @AutoLog(value = "SAP鐢熶骇璁㈠崟-缂栬緫")
+    @ApiOperation(value = "SAP鐢熶骇璁㈠崟-缂栬緫", notes = "SAP鐢熶骇璁㈠崟-缂栬緫")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody MesProductionOrder mesProductionOrder) {
+        mesProductionOrderService.updateById(mesProductionOrder);
+        return Result.OK("缂栬緫鎴愬姛!");
+    }
 
-   /**
-    *  缂栬緫
-    *
-    * @param mesProductionOrder
-    * @return
-    */
-   @AutoLog(value = "SAP鐢熶骇璁㈠崟-缂栬緫")
-   @ApiOperation(value="SAP鐢熶骇璁㈠崟-缂栬緫", notes="SAP鐢熶骇璁㈠崟-缂栬緫")
-   //@RequiresPermissions("org.jeecg.modules:mes_production_order:edit")
-   @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
-   public Result<String> edit(@RequestBody MesProductionOrder mesProductionOrder) {
-       mesProductionOrderService.updateById(mesProductionOrder);
-       return Result.OK("缂栬緫鎴愬姛!");
-   }
-
-   /**
-    *   閫氳繃id鍒犻櫎
-    *
-    * @param id
-    * @return
-    */
-   @AutoLog(value = "SAP鐢熶骇璁㈠崟-閫氳繃id鍒犻櫎")
-   @ApiOperation(value="SAP鐢熶骇璁㈠崟-閫氳繃id鍒犻櫎", notes="SAP鐢熶骇璁㈠崟-閫氳繃id鍒犻櫎")
-   //@RequiresPermissions("org.jeecg.modules:mes_production_order:delete")
-   @DeleteMapping(value = "/delete")
-   public Result<String> delete(@RequestParam(name="id",required=true) String id) {
-       mesProductionOrderService.removeById(id);
-       return Result.OK("鍒犻櫎鎴愬姛!");
-   }
-
-   /**
-    *  鎵归噺鍒犻櫎
-    *
-    * @param ids
-    * @return
-    */
-   @AutoLog(value = "SAP鐢熶骇璁㈠崟-鎵归噺鍒犻櫎")
-   @ApiOperation(value="SAP鐢熶骇璁㈠崟-鎵归噺鍒犻櫎", notes="SAP鐢熶骇璁㈠崟-鎵归噺鍒犻櫎")
-   //@RequiresPermissions("org.jeecg.modules:mes_production_order:deleteBatch")
-   @DeleteMapping(value = "/deleteBatch")
-   public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-       this.mesProductionOrderService.removeByIds(Arrays.asList(ids.split(",")));
-       return Result.OK("鎵归噺鍒犻櫎鎴愬姛!");
-   }
-
-   /**
-    * 閫氳繃id鏌ヨ
-    *
-    * @param id
-    * @return
-    */
-   //@AutoLog(value = "SAP鐢熶骇璁㈠崟-閫氳繃id鏌ヨ")
-   @ApiOperation(value="SAP鐢熶骇璁㈠崟-閫氳繃id鏌ヨ", notes="SAP鐢熶骇璁㈠崟-閫氳繃id鏌ヨ")
-   @GetMapping(value = "/queryById")
-   public Result<MesProductionOrder> queryById(@RequestParam(name="id",required=true) String id) {
-       MesProductionOrder mesProductionOrder = mesProductionOrderService.getById(id);
-       if(mesProductionOrder==null) {
-           return Result.error("鏈壘鍒板搴旀暟鎹�");
-       }
-       return Result.OK(mesProductionOrder);
-   }
-
-   /**
-   * 瀵煎嚭excel
-   *
-   * @param request
-   * @param mesProductionOrder
-   */
-   //@RequiresPermissions("org.jeecg.modules:mes_production_order:exportXls")
-   @RequestMapping(value = "/exportXls")
-   public ModelAndView exportXls(HttpServletRequest request, MesProductionOrder mesProductionOrder) {
-       return super.exportXls(request, mesProductionOrder, MesProductionOrder.class, "SAP鐢熶骇璁㈠崟");
-   }
-
-   /**
-     * 閫氳繃excel瀵煎叆鏁版嵁
-   *
-   * @param request
-   * @param response
-   * @return
-   */
-   //@RequiresPermissions("mes_production_order:importExcel")
-   @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-   public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-       return super.importExcel(request, response, MesProductionOrder.class);
-   }
-
+    /**
+     * 閫氳繃id鏌ヨ
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "SAP鐢熶骇璁㈠崟-閫氳繃id鏌ヨ", notes = "SAP鐢熶骇璁㈠崟-閫氳繃id鏌ヨ")
+    @GetMapping(value = "/queryById")
+    public Result<MesProductionOrder> queryById(@RequestParam(name = "id", required = true) String id) {
+        MesProductionOrder mesProductionOrder = mesProductionOrderService.getById(id);
+        if (mesProductionOrder == null) {
+            return Result.error("鏈壘鍒板搴旀暟鎹�");
+        }
+        return Result.OK(mesProductionOrder);
+    }
 }

--
Gitblit v1.9.3