From 8c945d42c6610abd9ef17bc153114024175bec2a Mon Sep 17 00:00:00 2001
From: houshuai <17802598606@163.com>
Date: 星期四, 03 七月 2025 19:43:12 +0800
Subject: [PATCH] 线边库和订单 基本搭建

---
 src/main/java/org/jeecg/modules/pms/controller/PmsProcessBillMaterialsDetailController.java |  182 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 182 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/jeecg/modules/pms/controller/PmsProcessBillMaterialsDetailController.java b/src/main/java/org/jeecg/modules/pms/controller/PmsProcessBillMaterialsDetailController.java
new file mode 100644
index 0000000..8f93da4
--- /dev/null
+++ b/src/main/java/org/jeecg/modules/pms/controller/PmsProcessBillMaterialsDetailController.java
@@ -0,0 +1,182 @@
+package org.jeecg.modules.pms.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.pms.entity.PmsProcessBillMaterials;
+import org.jeecg.modules.pms.entity.PmsProcessBillMaterialsDetail;
+import org.jeecg.modules.pms.service.IPmsProcessBillMaterialsDetailService;
+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;
+import java.util.Map;
+
+/**
+* @Description: 鐗╂枡娓呭崟
+* @Author: jeecg-boot
+* @Date:   2025-07-01
+* @Version: V1.0
+*/
+@Api(tags="鐗╂枡娓呭崟")
+@RestController
+@RequestMapping("/pms/pmsProcessBillMaterialsDetail")
+@Slf4j
+public class PmsProcessBillMaterialsDetailController extends JeecgController<PmsProcessBillMaterialsDetail, IPmsProcessBillMaterialsDetailService> {
+   @Autowired
+   private IPmsProcessBillMaterialsDetailService pmsProcessBillMaterialsDetailService;
+
+   /**
+    * 鍒嗛〉鍒楄〃鏌ヨ
+    *
+    * @param pmsProcessBillMaterialsDetail
+    * @param pageNo
+    * @param pageSize
+    * @param req
+    * @return
+    */
+   //@AutoLog(value = "鐗╂枡娓呭崟-鍒嗛〉鍒楄〃鏌ヨ")
+   @ApiOperation(value="鐗╂枡娓呭崟-鍒嗛〉鍒楄〃鏌ヨ", notes="鐗╂枡娓呭崟-鍒嗛〉鍒楄〃鏌ヨ")
+   @GetMapping(value = "/list")
+   public Result<IPage<PmsProcessBillMaterialsDetail>> queryPageList(PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail,
+                                  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+                                  HttpServletRequest req) {
+       QueryWrapper<PmsProcessBillMaterialsDetail> queryWrapper = QueryGenerator.initQueryWrapper(pmsProcessBillMaterialsDetail, req.getParameterMap());
+       Page<PmsProcessBillMaterialsDetail> page = new Page<PmsProcessBillMaterialsDetail>(pageNo, pageSize);
+       IPage<PmsProcessBillMaterialsDetail> pageList = pmsProcessBillMaterialsDetailService.page(page, queryWrapper);
+       return Result.OK(pageList);
+   }
+
+   /**
+    *   娣诲姞
+    *
+    * @param pmsProcessBillMaterialsDetail
+    * @return
+    */
+   @AutoLog(value = "鐗╂枡娓呭崟-娣诲姞")
+   @ApiOperation(value="鐗╂枡娓呭崟-娣诲姞", notes="鐗╂枡娓呭崟-娣诲姞")
+   //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials_detail:add")
+   @PostMapping(value = "/add")
+   public Result<String> add(@RequestBody PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail) {
+       pmsProcessBillMaterialsDetailService.save(pmsProcessBillMaterialsDetail);
+       return Result.OK("娣诲姞鎴愬姛锛�");
+   }
+
+   /**
+    *  缂栬緫
+    *
+    * @param pmsProcessBillMaterialsDetail
+    * @return
+    */
+   @AutoLog(value = "鐗╂枡娓呭崟-缂栬緫")
+   @ApiOperation(value="鐗╂枡娓呭崟-缂栬緫", notes="鐗╂枡娓呭崟-缂栬緫")
+   //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials_detail:edit")
+   @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+   public Result<String> edit(@RequestBody PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail) {
+       pmsProcessBillMaterialsDetailService.updateById(pmsProcessBillMaterialsDetail);
+       return Result.OK("缂栬緫鎴愬姛!");
+   }
+
+   /**
+    *   閫氳繃id鍒犻櫎
+    *
+    * @param id
+    * @return
+    */
+   @AutoLog(value = "鐗╂枡娓呭崟-閫氳繃id鍒犻櫎")
+   @ApiOperation(value="鐗╂枡娓呭崟-閫氳繃id鍒犻櫎", notes="鐗╂枡娓呭崟-閫氳繃id鍒犻櫎")
+   //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials_detail:delete")
+   @DeleteMapping(value = "/delete")
+   public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+       pmsProcessBillMaterialsDetailService.removeById(id);
+       return Result.OK("鍒犻櫎鎴愬姛!");
+   }
+
+   /**
+    *  鎵归噺鍒犻櫎
+    *
+    * @param ids
+    * @return
+    */
+   @AutoLog(value = "鐗╂枡娓呭崟-鎵归噺鍒犻櫎")
+   @ApiOperation(value="鐗╂枡娓呭崟-鎵归噺鍒犻櫎", notes="鐗╂枡娓呭崟-鎵归噺鍒犻櫎")
+   //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials_detail:deleteBatch")
+   @DeleteMapping(value = "/deleteBatch")
+   public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+       this.pmsProcessBillMaterialsDetailService.removeByIds(Arrays.asList(ids.split(",")));
+       return Result.OK("鎵归噺鍒犻櫎鎴愬姛!");
+   }
+
+   /**
+    * 閫氳繃id鏌ヨ
+    *
+    * @param id
+    * @return
+    */
+   //@AutoLog(value = "鐗╂枡娓呭崟-閫氳繃id鏌ヨ")
+   @ApiOperation(value="鐗╂枡娓呭崟-閫氳繃id鏌ヨ", notes="鐗╂枡娓呭崟-閫氳繃id鏌ヨ")
+   @GetMapping(value = "/queryById")
+   public Result<PmsProcessBillMaterialsDetail> queryById(@RequestParam(name="id",required=true) String id) {
+       PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail = pmsProcessBillMaterialsDetailService.getById(id);
+       if(pmsProcessBillMaterialsDetail==null) {
+           return Result.error("鏈壘鍒板搴旀暟鎹�");
+       }
+       return Result.OK(pmsProcessBillMaterialsDetail);
+   }
+
+   /**
+   * 瀵煎嚭excel
+   *
+   * @param request
+   * @param pmsProcessBillMaterialsDetail
+   */
+   //@RequiresPermissions("org.jeecg.modules:pms_process_bill_materials_detail:exportXls")
+   @RequestMapping(value = "/exportXls")
+   public ModelAndView exportXls(HttpServletRequest request, PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail) {
+       return super.exportXls(request, pmsProcessBillMaterialsDetail, PmsProcessBillMaterialsDetail.class, "鐗╂枡娓呭崟");
+   }
+
+   /**
+     * 閫氳繃excel瀵煎叆鏁版嵁
+   *
+   * @param request
+   * @param response
+   * @return
+   */
+   //@RequiresPermissions("pms_process_bill_materials_detail:importExcel")
+   @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+   public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+       return super.importExcel(request, response, PmsProcessBillMaterialsDetail.class);
+   }
+    @ApiOperation(value="鐗╂枡娓呭崟-閫氳繃鐢熶骇鐗╂枡ID鏌ヨ", notes="鐗╂枡娓呭崟-閫氳繃id鏌ヨ")
+    @GetMapping(value = "/queryByMaterialId")
+    public Result<PmsProcessBillMaterialsDetail> queryByMaterialId(@RequestParam(name="materialId",required=true) String materialId) {
+        PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail = pmsProcessBillMaterialsDetailService.queryByMaterialId(materialId);
+        if(pmsProcessBillMaterialsDetail==null) {
+            return Result.error("鏈壘鍒板搴旀暟鎹�");
+        }
+        return Result.OK(pmsProcessBillMaterialsDetail);
+    }
+
+    @GetMapping(value = "/searchlikeQuery")
+    public Result<?> searchlikeQuery(PmsProcessBillMaterialsDetail pmsProcessBillMaterialsDetail,
+                                     @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                     @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+                                     HttpServletRequest req){
+        IPage<Map<String, Object>> pageList = pmsProcessBillMaterialsDetailService.getpmsProcessBillMaterialsDetailListData(pageNo,pageSize,req);
+
+        return Result.OK(pageList);
+    }
+
+}

--
Gitblit v1.9.3