From f84d9e69907cb678150eaa6393fd74cf042fcca4 Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期四, 28 九月 2023 14:39:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into develop

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentOvertimeController.java |  159 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 159 insertions(+), 0 deletions(-)

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentOvertimeController.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentOvertimeController.java
new file mode 100644
index 0000000..15326dc
--- /dev/null
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentOvertimeController.java
@@ -0,0 +1,159 @@
+package org.jeecg.modules.mdc.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.apache.shiro.SecurityUtils;
+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.common.system.vo.LoginUser;
+import org.jeecg.modules.mdc.entity.MdcEquipmentOvertime;
+import org.jeecg.modules.mdc.service.IMdcEquipmentOvertimeService;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+
+/**
+ * @Description: 璁惧鍔犵彮绠$悊
+ * @Author: Lius
+ * @Date: 2023-08-25
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags = "璁惧鍔犵彮绠$悊")
+@RestController
+@RequestMapping("/mdc/mdcEquipmentOvertime")
+public class MdcEquipmentOvertimeController extends JeecgController<MdcEquipmentOvertime, IMdcEquipmentOvertimeService> {
+
+    @Resource
+    private IMdcEquipmentOvertimeService mdcEquipmentOvertimeService;
+
+    /**
+     * 鍒嗛〉鍒楄〃鏌ヨ
+     *
+     * @param mdcEquipmentOvertime
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "璁惧鍔犵彮绠$悊-鍒嗛〉鍒楄〃鏌ヨ")
+    @ApiOperation(value = "璁惧鍔犵彮绠$悊-鍒嗛〉鍒楄〃鏌ヨ", notes = "璁惧鍔犵彮绠$悊-鍒嗛〉鍒楄〃鏌ヨ")
+    @GetMapping(value = "/list")
+    public Result<?> queryPageList(MdcEquipmentOvertime mdcEquipmentOvertime,
+                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                   HttpServletRequest req) {
+        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        String userId = user.getId();
+        Page<MdcEquipmentOvertime> page = new Page<MdcEquipmentOvertime>(pageNo, pageSize);
+        IPage<MdcEquipmentOvertime> pageList = mdcEquipmentOvertimeService.pageList(userId, page, mdcEquipmentOvertime, req);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 娣诲姞
+     *
+     * @param mdcEquipmentOvertime
+     * @return
+     */
+    @AutoLog(value = "璁惧鍔犵彮绠$悊-娣诲姞")
+    @ApiOperation(value = "璁惧鍔犵彮绠$悊-娣诲姞", notes = "璁惧鍔犵彮绠$悊-娣诲姞")
+    @PostMapping(value = "/add")
+    public Result<?> add(@RequestBody MdcEquipmentOvertime mdcEquipmentOvertime) {
+        mdcEquipmentOvertimeService.save(mdcEquipmentOvertime);
+        return Result.OK("娣诲姞鎴愬姛锛�");
+    }
+
+    /**
+     * 缂栬緫
+     *
+     * @param mdcEquipmentOvertime
+     * @return
+     */
+    @AutoLog(value = "璁惧鍔犵彮绠$悊-缂栬緫")
+    @ApiOperation(value = "璁惧鍔犵彮绠$悊-缂栬緫", notes = "璁惧鍔犵彮绠$悊-缂栬緫")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<?> edit(@RequestBody MdcEquipmentOvertime mdcEquipmentOvertime) {
+        mdcEquipmentOvertimeService.updateById(mdcEquipmentOvertime);
+        return Result.OK("缂栬緫鎴愬姛!");
+    }
+
+    /**
+     * 閫氳繃id鍒犻櫎
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "璁惧鍔犵彮绠$悊-閫氳繃id鍒犻櫎")
+    @ApiOperation(value = "璁惧鍔犵彮绠$悊-閫氳繃id鍒犻櫎", notes = "璁惧鍔犵彮绠$悊-閫氳繃id鍒犻櫎")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        mdcEquipmentOvertimeService.removeById(id);
+        return Result.OK("鍒犻櫎鎴愬姛!");
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "璁惧鍔犵彮绠$悊-鎵归噺鍒犻櫎")
+    @ApiOperation(value = "璁惧鍔犵彮绠$悊-鎵归噺鍒犻櫎", notes = "璁惧鍔犵彮绠$悊-鎵归噺鍒犻櫎")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.mdcEquipmentOvertimeService.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<?> queryById(@RequestParam(name = "id", required = true) String id) {
+        MdcEquipmentOvertime mdcEquipmentOvertime = mdcEquipmentOvertimeService.getById(id);
+        return Result.OK(mdcEquipmentOvertime);
+    }
+
+    /**
+     * 瀵煎嚭excel
+     *
+     * @param request
+     * @param mdcEquipmentOvertime
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, MdcEquipmentOvertime mdcEquipmentOvertime) {
+        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        String userId = user.getId();
+        return mdcEquipmentOvertimeService.exportXls(userId, mdcEquipmentOvertime);
+    }
+
+    /**
+     * 閫氳繃excel瀵煎叆鏁版嵁
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, MdcEquipmentOvertime.class);
+    }
+
+}

--
Gitblit v1.9.3