From c5525856b70f4ac7b0c7085a8db4fbd5a09928af Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期三, 17 五月 2023 09:36:26 +0800
Subject: [PATCH] 导入的发生时间也添加了,ZfEventExcelBean
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java
index c76275d..a9bc22e 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java
@@ -9,6 +9,7 @@
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZfDoctor;
+import com.ruoyi.domain.excel.ZfCollectionExcelBean;
import com.ruoyi.service.ZfDoctorService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
@@ -17,6 +18,7 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
@@ -42,6 +44,16 @@
Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
return zfDoctorService.selectDoctorList(zfDoctor, pageNum, pageSize);
+ }
+
+ /**
+ * 鑾峰彇瀵煎叆妯℃澘
+ */
+ @GetMapping("/model")
+ public void getExportModel(HttpServletResponse response){
+ List<ZfDoctor> list = Collections.singletonList(new ZfDoctor());
+ ExcelUtil<ZfDoctor> util = new ExcelUtil<>(ZfDoctor.class);
+ util.exportExcel(response,list,"灏忓尰鐢熻褰曟暟鎹�");
}
@@ -94,7 +106,7 @@
@PostMapping
public AjaxResult add(@RequestBody ZfDoctor zfDoctor)
{
- return toAjax(zfDoctorService.save(zfDoctor));
+ return zfDoctorService.mySave(zfDoctor);
}
/**
--
Gitblit v1.9.1