From bbfc6a9a5b3a899c7405d06454d315d8c283e23f Mon Sep 17 00:00:00 2001 From: yb <1113799@qq.com> Date: 星期四, 04 九月 2025 15:12:46 +0800 Subject: [PATCH] 倍率统计导出 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentMagnificationController.java | 67 +++++++++++++++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentMagnificationController.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentMagnificationController.java new file mode 100644 index 0000000..58091ab --- /dev/null +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcEquipmentMagnificationController.java @@ -0,0 +1,67 @@ +package org.jeecg.modules.mdc.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +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.vo.LoginUser; +import org.jeecg.modules.mdc.entity.MdcEquipmentMagnification; +import org.jeecg.modules.mdc.entity.MdcProcessQuantity; +import org.jeecg.modules.mdc.service.IMdcEquipmentMagnificationService; +import org.jeecg.modules.mdc.vo.MdcEquipmentMagnificationVo; +import org.jeecg.modules.mdc.vo.MdcProcessQuantityVo; +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; + +@Slf4j +@Api(tags = "鍊嶇巼缁熻") +@RestController +@RequestMapping("/mdc/magnification") +public class MdcEquipmentMagnificationController extends JeecgController<MdcEquipmentMagnification, IMdcEquipmentMagnificationService> { + + + /** + * 鍒嗛〉鍒楄〃鏌ヨ + * + * @param magnificationVo + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "鍒嗛〉鍒楄〃鏌ヨ") + @ApiOperation(value = "鍒嗛〉鍒楄〃鏌ヨ", notes = "鍒嗛〉鍒楄〃鏌ヨ") + @GetMapping(value = "/list") + public Result<IPage<MdcEquipmentMagnification>> queryPageList(MdcEquipmentMagnificationVo magnificationVo, + @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(); + IPage<MdcEquipmentMagnification> pageList = service.pageList(userId,magnificationVo,pageNo, pageSize, req); + return Result.OK(pageList); + } + + + + /** + * 瀵煎嚭excel + * + * @param request + * @param magnificationVo + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, MdcEquipmentMagnificationVo magnificationVo) { + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + String userId = user.getId(); + return service.exportXls(userId, magnificationVo); + } +} -- Gitblit v1.9.3