From 1dfe61fdf1b36061871ead5337172801e64df201 Mon Sep 17 00:00:00 2001
From: Jinquan_Ou <Jinquan@gdut.com>
Date: 星期一, 03 四月 2023 16:07:36 +0800
Subject: [PATCH] 魅宠、家庭小医生1.0
---
zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java | 85 ---
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java | 44 ++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java | 108 +++++
zhang-content/src/main/java/com/ruoyi/service/ZfMasterService.java | 7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetNoteController.java | 183 ++++----
ruoyi-admin/src/test/java/com/ruoyi/insertData.java | 35 +
zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java | 107 ----
zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java | 6
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java | 43 ++
zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java | 8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java | 108 +++++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfMasterController.java | 118 +++++
zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java | 6
zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java | 41 +
zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java | 158 +------
zhang-content/src/main/java/com/ruoyi/domain/ZfMaster.java | 125 -----
zhang-content/src/main/java/com/ruoyi/service/impl/ZfMasterServiceImpl.java | 36 +
17 files changed, 733 insertions(+), 485 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 87be596..c76275d 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
@@ -1,9 +1,26 @@
package com.ruoyi.web.controller.zhang;
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.domain.ZfDoctor;
+import com.ruoyi.service.ZfDoctorService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+
+import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
+import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE;
/**
* <p>
@@ -14,8 +31,93 @@
* @since 2023-03-12
*/
@RestController
+@Slf4j
@RequestMapping("/zfDoctor")
-public class ZfDoctorController {
+public class ZfDoctorController extends BaseController {
+ @Resource
+ private ZfDoctorService zfDoctorService;
+
+ @GetMapping("/all")
+ public AjaxResult listAll(ZfDoctor zfDoctor){
+ Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
+ Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
+ return zfDoctorService.selectDoctorList(zfDoctor, pageNum, pageSize);
+ }
+
+
+ /**
+ * 瀵煎嚭瀹跺涵灏忓尰鐢熻褰曞垪琛�
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:export')")
+ @Log(title = "瀹跺涵灏忓尰鐢熻褰�", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, ZfDoctor zfDoctor)
+ {
+ List<ZfDoctor> list = zfDoctorService.selectByCondition(zfDoctor);
+ log.info("瀵煎嚭璁板綍涓�:{}",list);
+ ExcelUtil<ZfDoctor> util = new ExcelUtil<>(ZfDoctor.class);
+ util.exportExcel(response, list, "瀹跺涵灏忓尰鐢熻褰曟暟鎹�");
+ }
+
+ /**
+ * 瀵煎叆瀹跺涵灏忓尰鐢熻褰曞垪琛�
+ */
+ @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.IMPORT)
+ @PostMapping("/importData")
+ public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception
+ {
+ ExcelUtil<ZfDoctor> util = new ExcelUtil<>(ZfDoctor.class);
+ List<ZfDoctor> eventList = util.importExcel(file.getInputStream());
+ log.info("瀹跺涵灏忓尰鐢熷垪琛ㄤ负锛歿}",eventList);
+
+ if (zfDoctorService.saveBatch(eventList)) {
+ return AjaxResult.success("瀵煎叆鏁版嵁鎴愬姛");
+ }
+ return AjaxResult.error("瀵煎叆鏁版嵁澶辫触");
+ }
+
+ /**
+ * 鑾峰彇瀹跺涵灏忓尰鐢熻褰曡缁嗕俊鎭�
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(zfDoctorService.getById(id));
+ }
+//
+ /**
+ * 鏂板瀹跺涵灏忓尰鐢熻褰�
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:add')")
+ @Log(title = "瀹跺涵灏忓尰鐢熻褰�", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody ZfDoctor zfDoctor)
+ {
+ return toAjax(zfDoctorService.save(zfDoctor));
+ }
+
+ /**
+ * 淇敼瀹跺涵灏忓尰鐢熻褰�
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:edit')")
+ @Log(title = "瀹跺涵灏忓尰鐢熻褰�", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody ZfDoctor zfDoctor)
+ {
+ return toAjax(zfDoctorService.updateById(zfDoctor));
+ }
+//
+ /**
+ * 鎵归噺鍒犻櫎瀹跺涵灏忓尰鐢熻褰�
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:remove')")
+ @Log(title = "瀹跺涵灏忓尰鐢熻褰�", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(zfDoctorService.removeByIds(Arrays.asList(ids)));
+ }
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfMasterController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfMasterController.java
index 36bf6c2..5c1b360 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfMasterController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfMasterController.java
@@ -1,9 +1,27 @@
package com.ruoyi.web.controller.zhang;
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.domain.ZfMaster;
+import com.ruoyi.service.ZfMasterService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import javax.websocket.server.PathParam;
+import java.util.Arrays;
+import java.util.List;
+
+import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
+import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE;
/**
* <p>
@@ -15,7 +33,101 @@
*/
@RestController
@RequestMapping("/zfMaster")
-public class ZfMasterController {
+@Slf4j
+public class ZfMasterController extends BaseController {
+
+ @Resource
+ private ZfMasterService zfMasterService;
+
+// @GetMapping("/all")
+// public AjaxResult listAll(ZfMaster zfMaster){
+// Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
+// Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
+// return zfMasterService.selectPetNoteList(zfMaster, pageNum, pageSize);
+// }
+
+ /**
+ * 鏍规嵁瀹犵墿id鑾峰彇鐩稿叧涓讳汉淇℃伅
+ */
+ @GetMapping()
+ public AjaxResult getByPetId(@PathParam("pid")Long pid){
+ return zfMasterService.getMasterInfoByPetId(pid);
+ }
+
+ /**
+ * 瀵煎嚭榄呭疇涓讳汉淇℃伅璁板綍鍒楄〃
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:export')")
+ @Log(title = "榄呭疇涓讳汉淇℃伅璁板綍", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, ZfMaster zfMaster)
+ {
+ List<ZfMaster> list = zfMasterService.selectByCondition(zfMaster);
+ log.info("瀵煎嚭璁板綍涓�:{}",list);
+ ExcelUtil<ZfMaster> util = new ExcelUtil<>(ZfMaster.class);
+ util.exportExcel(response, list, "榄呭疇涓讳汉淇℃伅璁板綍鏁版嵁");
+ }
+
+ /**
+ * 瀵煎叆榄呭疇涓讳汉淇℃伅璁板綍鍒楄〃
+ */
+ @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.IMPORT)
+ @PostMapping("/importData")
+ public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception
+ {
+ ExcelUtil<ZfMaster> util = new ExcelUtil<>(ZfMaster.class);
+ List<ZfMaster> eventList = util.importExcel(file.getInputStream());
+ log.info("榄呭疇涓讳汉淇℃伅鍒楄〃涓猴細{}",eventList);
+
+ if (zfMasterService.saveBatch(eventList)) {
+ return AjaxResult.success("瀵煎叆鏁版嵁鎴愬姛");
+ }
+ return AjaxResult.error("瀵煎叆鏁版嵁澶辫触");
+ }
+
+ /**
+ * 鑾峰彇榄呭疇涓讳汉淇℃伅璁板綍璇︾粏淇℃伅
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(zfMasterService.getById(id));
+ }
+//
+ /**
+ * 鏂板榄呭疇涓讳汉淇℃伅璁板綍
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:add')")
+ @Log(title = "榄呭疇涓讳汉淇℃伅璁板綍", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody ZfMaster zfMaster)
+ {
+ return toAjax(zfMasterService.save(zfMaster));
+ }
+
+ /**
+ * 淇敼榄呭疇涓讳汉淇℃伅璁板綍
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:edit')")
+ @Log(title = "榄呭疇涓讳汉淇℃伅璁板綍", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody ZfMaster zfMaster)
+ {
+ return toAjax(zfMasterService.updateById(zfMaster));
+ }
+//
+ /**
+ * 鎵归噺鍒犻櫎榄呭疇涓讳汉淇℃伅璁板綍
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:remove')")
+ @Log(title = "榄呭疇涓讳汉淇℃伅璁板綍", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(zfMasterService.removeByIds(Arrays.asList(ids)));
+ }
+
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java
index f9508f6..4a196cb 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java
@@ -1,9 +1,26 @@
package com.ruoyi.web.controller.zhang;
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.domain.ZfPet;
+import com.ruoyi.service.ZfPetService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+
+import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
+import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE;
/**
* <p>
@@ -15,7 +32,92 @@
*/
@RestController
@RequestMapping("/zfPet")
-public class ZfPetController {
+@Slf4j
+public class ZfPetController extends BaseController {
+ @Resource
+ private ZfPetService zfPetService;
+
+ @GetMapping("/all")
+ public AjaxResult listAll(ZfPet zfPet){
+ Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
+ Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
+ return zfPetService.selectPetList(zfPet, pageNum, pageSize);
+ }
+
+
+ /**
+ * 瀵煎嚭榄呭疇璁板綍鍒楄〃
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:export')")
+ @Log(title = "榄呭疇璁板綍", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, ZfPet zfPet)
+ {
+ List<ZfPet> list = zfPetService.selectByCondition(zfPet);
+ log.info("瀵煎嚭璁板綍涓�:{}",list);
+ ExcelUtil<ZfPet> util = new ExcelUtil<>(ZfPet.class);
+ util.exportExcel(response, list, "榄呭疇璁板綍鏁版嵁");
+ }
+
+ /**
+ * 瀵煎叆榄呭疇璁板綍鍒楄〃
+ */
+ @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.IMPORT)
+ @PostMapping("/importData")
+ public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception
+ {
+ ExcelUtil<ZfPet> util = new ExcelUtil<>(ZfPet.class);
+ List<ZfPet> eventList = util.importExcel(file.getInputStream());
+ log.info("榄呭疇鍒楄〃涓猴細{}",eventList);
+
+ if (zfPetService.saveBatch(eventList)) {
+ return AjaxResult.success("瀵煎叆鏁版嵁鎴愬姛");
+ }
+ return AjaxResult.error("瀵煎叆鏁版嵁澶辫触");
+ }
+
+ /**
+ * 鑾峰彇榄呭疇璁板綍璇︾粏淇℃伅
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(zfPetService.getById(id));
+ }
+//
+ /**
+ * 鏂板榄呭疇璁板綍
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:add')")
+ @Log(title = "榄呭疇璁板綍", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody ZfPet zfPet)
+ {
+ return toAjax(zfPetService.save(zfPet));
+ }
+
+ /**
+ * 淇敼榄呭疇璁板綍
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:edit')")
+ @Log(title = "榄呭疇璁板綍", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody ZfPet zfPet)
+ {
+ return toAjax(zfPetService.updateById(zfPet));
+ }
+//
+ /**
+ * 鎵归噺鍒犻櫎榄呭疇璁板綍
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:remove')")
+ @Log(title = "榄呭疇璁板綍", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(zfPetService.removeByIds(Arrays.asList(ids)));
+ }
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetNoteController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetNoteController.java
index 53052b1..4e2f4a6 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetNoteController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetNoteController.java
@@ -1,19 +1,29 @@
package com.ruoyi.web.controller.zhang;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.domain.ZfPetNote;
import com.ruoyi.domain.ZfProperty;
import com.ruoyi.service.ZfPetNoteService;
+import com.ruoyi.service.ZfPetNoteService;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
+import javax.websocket.server.PathParam;
+import java.util.Arrays;
import java.util.List;
+
+import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
+import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE;
/**
* <p>
@@ -25,96 +35,99 @@
*/
@RestController
@RequestMapping("/family/zfPetNote")
-public class ZfPetNoteController {
-
+@Slf4j
+public class ZfPetNoteController extends BaseController {
@Resource
private ZfPetNoteService zfPetNoteService;
-// @GetMapping("/all")
-// public AjaxResult listAll(ZfProperty zfProperty){
-// Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
-// Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
-// return zfPropertyService.selectUserList(zfProperty, pageNum, pageSize);
-// }
+ @GetMapping("/all")
+ public AjaxResult listAll(ZfPetNote zfPetNote){
+ Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
+ Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
+ return zfPetNoteService.selectPetNoteList(zfPetNote, pageNum, pageSize);
+ }
+
+ /**
+ * 鏍规嵁瀹犵墿id鑾峰彇鐩稿叧澶囧繕褰�
+ */
+ @GetMapping
+ public AjaxResult getByPetId(@PathParam("pid")Long pid){
+ return zfPetNoteService.getAllPetNoteByPetId(pid);
+ }
+
+ /**
+ * 瀵煎嚭榄呭疇澶囧繕褰曡褰曞垪琛�
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:export')")
+ @Log(title = "榄呭疇澶囧繕褰曡褰�", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, ZfPetNote zfPetNote)
+ {
+ List<ZfPetNote> list = zfPetNoteService.selectByCondition(zfPetNote);
+ log.info("瀵煎嚭璁板綍涓�:{}",list);
+ ExcelUtil<ZfPetNote> util = new ExcelUtil<>(ZfPetNote.class);
+ util.exportExcel(response, list, "榄呭疇澶囧繕褰曡褰曟暟鎹�");
+ }
+
+ /**
+ * 瀵煎叆榄呭疇澶囧繕褰曡褰曞垪琛�
+ */
+ @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.IMPORT)
+ @PostMapping("/importData")
+ public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception
+ {
+ ExcelUtil<ZfPetNote> util = new ExcelUtil<>(ZfPetNote.class);
+ List<ZfPetNote> eventList = util.importExcel(file.getInputStream());
+ log.info("榄呭疇澶囧繕褰曞垪琛ㄤ负锛歿}",eventList);
+
+ if (zfPetNoteService.saveBatch(eventList)) {
+ return AjaxResult.success("瀵煎叆鏁版嵁鎴愬姛");
+ }
+ return AjaxResult.error("瀵煎叆鏁版嵁澶辫触");
+ }
+
+ /**
+ * 鑾峰彇榄呭疇澶囧繕褰曡褰曡缁嗕俊鎭�
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(zfPetNoteService.getById(id));
+ }
//
+ /**
+ * 鏂板榄呭疇澶囧繕褰曡褰�
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:add')")
+ @Log(title = "榄呭疇澶囧繕褰曡褰�", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody ZfPetNote zfPetNote)
+ {
+ return toAjax(zfPetNoteService.save(zfPetNote));
+ }
+
+ /**
+ * 淇敼榄呭疇澶囧繕褰曡褰�
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:edit')")
+ @Log(title = "榄呭疇澶囧繕褰曡褰�", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody ZfPetNote zfPetNote)
+ {
+ return toAjax(zfPetNoteService.updateById(zfPetNote));
+ }
//
-// /**
-// * 瀵煎嚭瀹跺涵璧勪骇璁板綍鍒楄〃
-// */
-//// @PreAuthorize("@ss.hasPermi('system:property:export')")
-// @Log(title = "瀹跺涵璧勪骇璁板綍", businessType = BusinessType.EXPORT)
-// @PostMapping("/export")
-// public void export(HttpServletResponse response, ZfProperty zfProperty)
-// {
-// List<ZfProperty> list = zfPropertyService.selectByCondition(zfProperty);
-// log.info("瀵煎嚭璁板綍涓�:{}",list);
-// ExcelUtil<ZfProperty> util = new ExcelUtil<ZfProperty>(ZfProperty.class);
-// util.exportExcel(response, list, "瀹跺涵璧勪骇璁板綍鏁版嵁");
-// }
-////
-//
-// /**
-// * 瀵煎叆瀹跺涵璧勪骇璁板綍鍒楄〃
-// */
-// @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.IMPORT)
-// @PostMapping("/importData")
-// public AjaxResult importData(@RequestParam("excelImport") MultipartFile file) throws Exception
-// {
-// ExcelUtil<ZfProperty> util = new ExcelUtil<>(ZfProperty.class);
-// List<ZfProperty> propertyList = util.importExcel(file.getInputStream());
-// log.info("璧勪骇鍒楄〃涓猴細{}",propertyList);
-//
-// if (zfPropertyService.saveBatch(propertyList)) {
-// return AjaxResult.success("瀵煎叆鏁版嵁鎴愬姛");
-// }
-//
-// return AjaxResult.error("瀵煎叆鏁版嵁澶辫触");
-//
-// }
-//
-//
-// /**
-// * 鑾峰彇瀹跺涵璧勪骇璁板綍璇︾粏淇℃伅
-// */
-//// @PreAuthorize("@ss.hasPermi('system:property:query')")
-// @GetMapping(value = "/{id}")
-// public AjaxResult getInfo(@PathVariable("id") Long id)
-// {
-// return success(zfPropertyService.getById(id));
-// }
-////
-// /**
-// * 鏂板瀹跺涵璧勪骇璁板綍
-// */
-//// @PreAuthorize("@ss.hasPermi('system:property:add')")
-// @Log(title = "瀹跺涵璧勪骇璁板綍", businessType = BusinessType.INSERT)
-// @PostMapping
-// public AjaxResult add(@RequestBody ZfProperty zfProperty)
-// {
-// return toAjax(zfPropertyService.save(zfProperty));
-// }
-//
-// /**
-// * 淇敼瀹跺涵璧勪骇璁板綍
-// */
-//// @PreAuthorize("@ss.hasPermi('system:property:edit')")
-// @Log(title = "瀹跺涵璧勪骇璁板綍", businessType = BusinessType.UPDATE)
-// @PutMapping
-// public AjaxResult edit(@RequestBody ZfProperty zfProperty)
-// {
-// return toAjax(zfPropertyService.updateById(zfProperty));
-// }
-////
-// /**
-// * 鎵归噺鍒犻櫎瀹跺涵璧勪骇璁板綍
-// */
-//// @PreAuthorize("@ss.hasPermi('system:property:remove')")
-// @Log(title = "瀹跺涵璧勪骇璁板綍", businessType = BusinessType.DELETE)
-// @DeleteMapping("/{ids}")
-// public AjaxResult remove(@PathVariable Long[] ids)
-// {
-// return toAjax(zfPropertyService.removeByIds(Arrays.asList(ids)));
-// }
+ /**
+ * 鎵归噺鍒犻櫎榄呭疇澶囧繕褰曡褰�
+ */
+// @PreAuthorize("@ss.hasPermi('system:property:remove')")
+ @Log(title = "榄呭疇澶囧繕褰曡褰�", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(zfPetNoteService.removeByIds(Arrays.asList(ids)));
+ }
}
diff --git a/ruoyi-admin/src/test/java/com/ruoyi/insertData.java b/ruoyi-admin/src/test/java/com/ruoyi/insertData.java
index b8b722d..712e08a 100644
--- a/ruoyi-admin/src/test/java/com/ruoyi/insertData.java
+++ b/ruoyi-admin/src/test/java/com/ruoyi/insertData.java
@@ -1,6 +1,8 @@
package com.ruoyi;
+import com.ruoyi.domain.ZfDoctor;
import com.ruoyi.domain.ZfEvent;
+import com.ruoyi.service.ZfDoctorService;
import com.ruoyi.service.ZfEventService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -21,6 +23,9 @@
@Autowired
private ZfEventService zfEventService;
+
+ @Autowired
+ private ZfDoctorService zfDoctorService;
@Test
public void insert(){
@@ -49,4 +54,34 @@
}
}
+ @Test
+ void insertDoctor(){
+ List<String> l1 = Arrays.asList("鐗欑", "绁炵粡绉�","澶栫");
+ List<String> l2 = Arrays.asList("鐗欑棝", "澶寸棝", "鐨偆鐐�");
+ List<String> l3 = Arrays.asList("涓�涓湀", "鍗婁釜鏈�", "涓�澶�");
+ List<String> l4 = Arrays.asList("鐧借姺10g", "涓尰鑽�1", "涓尰鑽�2");
+ List<String> l5 = Arrays.asList("缁寸敓绱燙", "甯冩礇鑺�", "鐨悍闇�");
+ List<String> l6 = Arrays.asList("缂撹В鐗欑棝", "缂撹В澶寸棝", "缂撹В鐨偆鐐�");
+ List<String> l7 = Arrays.asList("寮犱笁", "鏉庡洓", "鐜嬩簲");
+ List<String> l8 = Arrays.asList("涓撴不鐗欑棝", "涓撴不澶寸棝", "涓撴不鐨偆鐐�");
+
+ ZfDoctor zfDoctor=null;
+ int count=0;
+ for (int i = 0; i < 200; i++) {
+ count=count%3;
+ zfDoctor=new ZfDoctor();
+ zfDoctor.setType(l1.get(count));
+ zfDoctor.setSymptom(l2.get(count));
+ zfDoctor.setDuration(l3.get(count));
+ zfDoctor.setCMedical(l4.get(count));
+ zfDoctor.setWMedical(l5.get(count));
+ zfDoctor.setEffect(l6.get(count));
+ zfDoctor.setSuitable(l7.get(count));
+ zfDoctor.setRemark(l8.get(count));
+ zfDoctor.setUrl("profile/upload/2023/03/19/test7_20230319222030A007.jpg");
+ count++;
+ zfDoctorService.save(zfDoctor);
+ }
+ }
+
}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java
index 54a2df7..d8200f8 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java
@@ -3,6 +3,10 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+import lombok.ToString;
+
import java.io.Serializable;
/**
@@ -14,138 +18,63 @@
* @since 2023-03-12
*/
@TableName("zf_doctor")
+@Data
+@ToString
public class ZfDoctor implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
- private Integer id;
+ private Long id;
/**
* 鐥呯殑绫诲瀷
*/
+ @Excel(name = "鐥呯殑绫诲瀷")
private String type;
/**
* 鐥囩姸
*/
+ @Excel(name = "鐥囩姸")
private String symptom;
/**
* 鎸佺画鏃堕棿
*/
+ @Excel(name = "鎸佺画鏃堕棿")
private String duration;
/**
* 涓尰
*/
- private String cMedical;
+ @Excel(name = "涓尰")
+ private String cmedical;
/**
* 瑗垮尰
*/
- private String wMedical;
+ @Excel(name = "瑗垮尰")
+ private String wmedical;
/**
* 鍔熸晥
*/
+ @Excel(name = "鍔熸晥")
private String effect;
/**
* 閫傜敤浜�
*/
+ @Excel(name = "閫傜敤浜�")
private String suitable;
/**
* 澶囨敞
*/
+ @Excel(name = "澶囨敞")
private String remark;
+ private String url;
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getSymptom() {
- return symptom;
- }
-
- public void setSymptom(String symptom) {
- this.symptom = symptom;
- }
-
- public String getDuration() {
- return duration;
- }
-
- public void setDuration(String duration) {
- this.duration = duration;
- }
-
- public String getcMedical() {
- return cMedical;
- }
-
- public void setcMedical(String cMedical) {
- this.cMedical = cMedical;
- }
-
- public String getwMedical() {
- return wMedical;
- }
-
- public void setwMedical(String wMedical) {
- this.wMedical = wMedical;
- }
-
- public String getEffect() {
- return effect;
- }
-
- public void setEffect(String effect) {
- this.effect = effect;
- }
-
- public String getSuitable() {
- return suitable;
- }
-
- public void setSuitable(String suitable) {
- this.suitable = suitable;
- }
-
- public String getRemark() {
- return remark;
- }
-
- public void setRemark(String remark) {
- this.remark = remark;
- }
-
- @Override
- public String toString() {
- return "ZfDoctor{" +
- "id=" + id +
- ", type=" + type +
- ", symptom=" + symptom +
- ", duration=" + duration +
- ", cMedical=" + cMedical +
- ", wMedical=" + wMedical +
- ", effect=" + effect +
- ", suitable=" + suitable +
- ", remark=" + remark +
- "}";
- }
}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfMaster.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfMaster.java
index 5d09b2c..90840e8 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfMaster.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfMaster.java
@@ -3,6 +3,9 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
import java.io.Serializable;
/**
@@ -14,166 +17,72 @@
* @since 2023-03-12
*/
@TableName("zf_master")
+@Data
public class ZfMaster implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
- private Integer id;
+ private Long id;
/**
- * 瀹犵墿琛╥d
+ * 瀹犵墿id
*/
- private Integer petId;
+ private Long petId;
/**
* 鍏荤姮浜哄鍚�
*/
+ @Excel(name = "name")
private String name;
/**
* 璇佷欢绫诲瀷
*/
+ @Excel(name="璇佷欢绫诲瀷")
private String certificateType;
/**
* 璇佷欢鍙风爜
*/
+ @Excel(name = "璇佷欢鍙风爜")
private String certificateNo;
/**
* 鍥哄畾鐢佃瘽
*/
+ @Excel(name = "鍥哄畾鐢佃瘽")
private String fixedNo;
/**
* 绉诲姩鐢佃瘽
*/
+ @Excel(name = "绉诲姩鐢佃瘽")
private String phoneNo;
/**
- * 鎷ユ湁鐘彧鏁伴噺
+ * 鎷ユ湁瀹犵墿鏁伴噺
*/
+ @Excel(name = "鎷ユ湁瀹犵墿鏁伴噺")
private Integer many;
/**
* 浣忔墍璇︾粏鍦板潃
*/
+ @Excel(name = "浣忔墍璇︾粏鍦板潃")
private String address;
/**
* 浣忔墍鎬ц川
*/
+ @Excel(name = "浣忔墍鎬ц川")
private String property;
/**
* 鐢靛瓙閭欢
*/
+ @Excel(name = "閭")
private String email;
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Integer getPetId() {
- return petId;
- }
-
- public void setPetId(Integer petId) {
- this.petId = petId;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getCertificateType() {
- return certificateType;
- }
-
- public void setCertificateType(String certificateType) {
- this.certificateType = certificateType;
- }
-
- public String getCertificateNo() {
- return certificateNo;
- }
-
- public void setCertificateNo(String certificateNo) {
- this.certificateNo = certificateNo;
- }
-
- public String getFixedNo() {
- return fixedNo;
- }
-
- public void setFixedNo(String fixedNo) {
- this.fixedNo = fixedNo;
- }
-
- public String getPhoneNo() {
- return phoneNo;
- }
-
- public void setPhoneNo(String phoneNo) {
- this.phoneNo = phoneNo;
- }
-
- public Integer getMany() {
- return many;
- }
-
- public void setMany(Integer many) {
- this.many = many;
- }
-
- public String getAddress() {
- return address;
- }
-
- public void setAddress(String address) {
- this.address = address;
- }
-
- public String getProperty() {
- return property;
- }
-
- public void setProperty(String property) {
- this.property = property;
- }
-
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
- @Override
- public String toString() {
- return "ZfMaster{" +
- "id=" + id +
- ", petId=" + petId +
- ", name=" + name +
- ", certificateType=" + certificateType +
- ", certificateNo=" + certificateNo +
- ", fixedNo=" + fixedNo +
- ", phoneNo=" + phoneNo +
- ", many=" + many +
- ", address=" + address +
- ", property=" + property +
- ", email=" + email +
- "}";
- }
}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java
index 9b3db02..7cba7ea 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java
@@ -3,8 +3,14 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+import lombok.ToString;
+
import java.io.Serializable;
import java.time.LocalDate;
+import java.util.Date;
/**
* <p>
@@ -15,194 +21,88 @@
* @since 2023-03-12
*/
@TableName("zf_pet")
+@Data
+@ToString
public class ZfPet implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
- private Integer id;
+ private Long id;
/**
- * 鐘瘉鍙风爜
+ * 瀹犵墿鍙风爜
*/
+ @Excel(name = "瀹犵墿鍙风爜")
private String idNum;
/**
* 闃蹭吉鐮�
*/
+ @Excel(name = "闃蹭吉鐮�")
private String securityCode;
/**
- * 鐘
+ * 瀹犵墿鍝佺
*/
+ @Excel(name = "瀹犵墿鍝佺")
private String type;
/**
- * 鐘悕
+ * 瀹犵墿鍚嶇О
*/
+ @Excel(name = "瀹犵墿鍚嶇О")
private String name;
/**
* 鍑虹敓鏃ユ湡
*/
- private LocalDate birth;
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "鍑虹敓鏃ユ湡", dateFormat = "yyyy-MM-dd")
+ private Date birth;
/**
* 鎬у埆,0:闆�,1:闆�
*/
+ @Excel(name = "鎬у埆",readConverterExp = "0=闆�,1=闆�")
private Integer sex;
/**
- * 鐘彧棰滆壊
+ * 瀹犵墿棰滆壊
*/
+ @Excel(name = "瀹犵墿棰滆壊")
private String color;
/**
- * 鐘彧鎬ц川
+ * 瀹犵墿鎬ц川
*/
+ @Excel(name = "瀹犵墿鎬ц川")
private String properties;
/**
* 楗涔犳儻
*/
+ @Excel(name = "楗涔犳儻")
private String eatHabit;
/**
* 鐢熸椿涔犳儻
*/
+ @Excel(name = "鐢熸椿涔犳儻")
private String lifeHabit;
/**
* 鐘眳浣忓湴鍧�
*/
+ @Excel(name = "瀹犵墿灞呬綇鍦板潃")
private String address;
/**
* 鑳藉惉鎳傜殑鏂硅█
*/
+ @Excel(name = "鑳藉惉鎳傜殑鏂硅█")
private String dialect;
+ private String url;
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getIdNum() {
- return idNum;
- }
-
- public void setIdNum(String idNum) {
- this.idNum = idNum;
- }
-
- public String getSecurityCode() {
- return securityCode;
- }
-
- public void setSecurityCode(String securityCode) {
- this.securityCode = securityCode;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public LocalDate getBirth() {
- return birth;
- }
-
- public void setBirth(LocalDate birth) {
- this.birth = birth;
- }
-
- public Integer getSex() {
- return sex;
- }
-
- public void setSex(Integer sex) {
- this.sex = sex;
- }
-
- public String getColor() {
- return color;
- }
-
- public void setColor(String color) {
- this.color = color;
- }
-
- public String getProperties() {
- return properties;
- }
-
- public void setProperties(String properties) {
- this.properties = properties;
- }
-
- public String getEatHabit() {
- return eatHabit;
- }
-
- public void setEatHabit(String eatHabit) {
- this.eatHabit = eatHabit;
- }
-
- public String getLifeHabit() {
- return lifeHabit;
- }
-
- public void setLifeHabit(String lifeHabit) {
- this.lifeHabit = lifeHabit;
- }
-
- public String getAddress() {
- return address;
- }
-
- public void setAddress(String address) {
- this.address = address;
- }
-
- public String getDialect() {
- return dialect;
- }
-
- public void setDialect(String dialect) {
- this.dialect = dialect;
- }
-
- @Override
- public String toString() {
- return "ZfPet{" +
- "id=" + id +
- ", idNum=" + idNum +
- ", securityCode=" + securityCode +
- ", type=" + type +
- ", name=" + name +
- ", birth=" + birth +
- ", sex=" + sex +
- ", color=" + color +
- ", properties=" + properties +
- ", eatHabit=" + eatHabit +
- ", lifeHabit=" + lifeHabit +
- ", address=" + address +
- ", dialect=" + dialect +
- "}";
- }
}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java
index 20a81d5..83adbd4 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java
@@ -3,8 +3,13 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+import lombok.ToString;
+
import java.io.Serializable;
-import java.time.LocalDateTime;
+import java.util.Date;
/**
* <p>
@@ -15,96 +20,46 @@
* @since 2023-03-12
*/
@TableName("zf_pet_note")
+@Data
+@ToString
public class ZfPetNote implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
- private Integer id;
+ private Long id;
/**
- * 瀹犵墿琛╥d
+ * 瀹犵墿id
*/
- private Integer pid;
+ private Long pid;
/**
* 璁板綍鏃堕棿
*/
- private LocalDateTime createTime;
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "璁板綍鏃堕棿", dateFormat = "yyyy-MM-dd")
+ private Date createTime;
/**
* 棰樺悕
*/
+ @Excel(name = "棰樺悕")
private String title;
/**
* 鎻愰啋鏃堕棿
*/
- private LocalDateTime remindTime;
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "鎻愰啋鏃堕棿", dateFormat = "yyyy-MM-dd")
+ private Date remindTime;
/**
* 澶囨敞
*/
+ @Excel(name = "澶囨敞")
private String remark;
+ private String url;
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Integer getPid() {
- return pid;
- }
-
- public void setPid(Integer pid) {
- this.pid = pid;
- }
-
- public LocalDateTime getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(LocalDateTime createTime) {
- this.createTime = createTime;
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
- public LocalDateTime getRemindTime() {
- return remindTime;
- }
-
- public void setRemindTime(LocalDateTime remindTime) {
- this.remindTime = remindTime;
- }
-
- public String getRemark() {
- return remark;
- }
-
- public void setRemark(String remark) {
- this.remark = remark;
- }
-
- @Override
- public String toString() {
- return "ZfPetNote{" +
- "id=" + id +
- ", pid=" + pid +
- ", createTime=" + createTime +
- ", title=" + title +
- ", remindTime=" + remindTime +
- ", remark=" + remark +
- "}";
- }
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java
index 82947a7..edaa136 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java
@@ -2,7 +2,10 @@
import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.ZfDoctor;
+
+import java.util.List;
/**
* <p>
@@ -14,4 +17,7 @@
*/
public interface ZfDoctorService extends IService<ZfDoctor> {
+ AjaxResult selectDoctorList(ZfDoctor zfDoctor, Integer pageNum, Integer pageSize);
+
+ List<ZfDoctor> selectByCondition(ZfDoctor zfDoctor);
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfMasterService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfMasterService.java
index 291e61d..f5eba13 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfMasterService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfMasterService.java
@@ -2,7 +2,10 @@
import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.ZfMaster;
+
+import java.util.List;
/**
* <p>
@@ -14,4 +17,8 @@
*/
public interface ZfMasterService extends IService<ZfMaster> {
+ AjaxResult getMasterInfoByPetId(Long pid);
+
+ List<ZfMaster> selectByCondition(ZfMaster zfMaster);
+
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java
index 8ac0e43..1b390c8 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java
@@ -2,7 +2,10 @@
import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.ZfPetNote;
+
+import java.util.List;
/**
* <p>
@@ -14,4 +17,9 @@
*/
public interface ZfPetNoteService extends IService<ZfPetNote> {
+ AjaxResult selectPetNoteList(ZfPetNote zfPetNote, Integer pageNum, Integer pageSize);
+
+ List<ZfPetNote> selectByCondition(ZfPetNote zfPetNote);
+
+ AjaxResult getAllPetNoteByPetId(Long pid);
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java
index 3d5a502..8514109 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java
@@ -2,7 +2,10 @@
import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.ZfPet;
+
+import java.util.List;
/**
* <p>
@@ -14,4 +17,7 @@
*/
public interface ZfPetService extends IService<ZfPet> {
+ AjaxResult selectPetList(ZfPet zfPet, Integer pageNum, Integer pageSize);
+
+ List<ZfPet> selectByCondition(ZfPet zfPet);
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
index 1a14ae8..24d293a 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
@@ -1,11 +1,20 @@
package com.ruoyi.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.MapUtils;
+import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.domain.ZfDoctor;
import com.ruoyi.mapper.ZfDoctorMapper;
import com.ruoyi.service.ZfDoctorService;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
/**
* <p>
@@ -16,6 +25,38 @@
* @since 2023-03-12
*/
@Service
+@Slf4j
public class ZfDoctorServiceImpl extends ServiceImpl<ZfDoctorMapper, ZfDoctor> implements ZfDoctorService {
+ @Override
+ public AjaxResult selectDoctorList(ZfDoctor zfDoctor, Integer pageNum, Integer pageSize) {
+ LambdaQueryWrapper<ZfDoctor> lqw = buildCondition(zfDoctor);
+
+ Page<ZfDoctor> ZfDoctorPage = new Page<>(pageNum,pageSize);
+ Page<ZfDoctor> pageResult = page(ZfDoctorPage, lqw);
+
+ HashMap<String, Object> data = MapUtils.getResult(pageResult);
+ return AjaxResult.success(data);
+ }
+
+ @Override
+ public List<ZfDoctor> selectByCondition(ZfDoctor zfDoctor) {
+ LambdaQueryWrapper<ZfDoctor> lambdaQueryWrapper = buildCondition(zfDoctor);
+ List<ZfDoctor> list = list(lambdaQueryWrapper);
+ log.info("杩斿洖鐨勬暟鎹负:{}",list);
+ return list;
+ }
+
+ private LambdaQueryWrapper<ZfDoctor> buildCondition(ZfDoctor zfDoctor) {
+ LambdaQueryWrapper<ZfDoctor> lqw = new LambdaQueryWrapper<>();
+ lqw.like(StringUtils.isNotEmpty(zfDoctor.getType()),ZfDoctor::getType,zfDoctor.getType());
+ lqw.like(StringUtils.isNotEmpty(zfDoctor.getSymptom()),ZfDoctor::getSymptom,zfDoctor.getSymptom());
+ lqw.like(StringUtils.isNotEmpty(zfDoctor.getDuration()),ZfDoctor::getDuration,zfDoctor.getDuration());
+ lqw.like(StringUtils.isNotEmpty(zfDoctor.getCmedical()),ZfDoctor::getCmedical,zfDoctor.getCmedical());
+ lqw.like(StringUtils.isNotEmpty(zfDoctor.getWmedical()),ZfDoctor::getWmedical,zfDoctor.getWmedical());
+ lqw.like(StringUtils.isNotEmpty(zfDoctor.getEffect()),ZfDoctor::getEffect,zfDoctor.getEffect());
+ lqw.like(StringUtils.isNotEmpty(zfDoctor.getSuitable()),ZfDoctor::getSuitable,zfDoctor.getSuitable());
+ lqw.like(StringUtils.isNotEmpty(zfDoctor.getRemark()),ZfDoctor::getRemark,zfDoctor.getRemark());
+ return lqw;
+ }
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfMasterServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfMasterServiceImpl.java
index 42e82dd..1bbc8a3 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfMasterServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfMasterServiceImpl.java
@@ -1,11 +1,17 @@
package com.ruoyi.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.domain.ZfMaster;
import com.ruoyi.mapper.ZfMasterMapper;
import com.ruoyi.service.ZfMasterService;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
+
+import java.util.List;
/**
* <p>
@@ -16,6 +22,36 @@
* @since 2023-03-12
*/
@Service
+@Slf4j
public class ZfMasterServiceImpl extends ServiceImpl<ZfMasterMapper, ZfMaster> implements ZfMasterService {
+ @Override
+ public AjaxResult getMasterInfoByPetId(Long pid) {
+ LambdaQueryWrapper<ZfMaster> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(ZfMaster::getPetId,pid);
+ ZfMaster master = getOne(lqw);
+ return AjaxResult.success(master);
+ }
+
+ @Override
+ public List<ZfMaster> selectByCondition(ZfMaster zfMaster) {
+ LambdaQueryWrapper<ZfMaster> lambdaQueryWrapper = buildCondition(zfMaster);
+ List<ZfMaster> list = list(lambdaQueryWrapper);
+ log.info("杩斿洖鐨勬暟鎹负:{}",list);
+ return list;
+ }
+
+ private LambdaQueryWrapper<ZfMaster> buildCondition(ZfMaster zfMaster) {
+ LambdaQueryWrapper<ZfMaster> lqw = new LambdaQueryWrapper<>();
+ lqw.like(zfMaster.getPetId()!=null,ZfMaster::getPetId,zfMaster.getPetId());
+ lqw.like(StringUtils.isNotEmpty(zfMaster.getName()),ZfMaster::getName,zfMaster.getName());
+ lqw.like(StringUtils.isNotEmpty(zfMaster.getCertificateType()),ZfMaster::getCertificateType,zfMaster.getCertificateType());
+ lqw.like(StringUtils.isNotEmpty(zfMaster.getFixedNo()),ZfMaster::getFixedNo,zfMaster.getFixedNo());
+ lqw.like(StringUtils.isNotEmpty(zfMaster.getPhoneNo()),ZfMaster::getPhoneNo,zfMaster.getPhoneNo());
+ lqw.eq(zfMaster.getMany()!=null,ZfMaster::getMany,zfMaster.getMany());
+ lqw.like(StringUtils.isNotEmpty(zfMaster.getAddress()),ZfMaster::getAddress,zfMaster.getAddress());
+ lqw.like(StringUtils.isNotEmpty(zfMaster.getProperty()),ZfMaster::getProperty,zfMaster.getProperty());
+ lqw.like(StringUtils.isNotEmpty(zfMaster.getEmail()),ZfMaster::getEmail,zfMaster.getEmail());
+ return lqw;
+ }
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java
index b394944..f719a0e 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java
@@ -1,11 +1,20 @@
package com.ruoyi.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.MapUtils;
+import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.domain.ZfPetNote;
import com.ruoyi.mapper.ZfPetNoteMapper;
import com.ruoyi.service.ZfPetNoteService;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
/**
* <p>
@@ -16,6 +25,40 @@
* @since 2023-03-12
*/
@Service
+@Slf4j
public class ZfPetNoteServiceImpl extends ServiceImpl<ZfPetNoteMapper, ZfPetNote> implements ZfPetNoteService {
+ @Override
+ public AjaxResult selectPetNoteList(ZfPetNote zfPetNote, Integer pageNum, Integer pageSize) {
+ LambdaQueryWrapper<ZfPetNote> lqw = buildCondition(zfPetNote);
+ Page<ZfPetNote> ZfPetNotePage = new Page<>(pageNum,pageSize);
+ Page<ZfPetNote> pageResult = page(ZfPetNotePage, lqw);
+ HashMap<String, Object> data = MapUtils.getResult(pageResult);
+ return AjaxResult.success(data);
+ }
+
+ @Override
+ public List<ZfPetNote> selectByCondition(ZfPetNote zfPetNote) {
+ LambdaQueryWrapper<ZfPetNote> lambdaQueryWrapper = buildCondition(zfPetNote);
+ List<ZfPetNote> list = list(lambdaQueryWrapper);
+ log.info("杩斿洖鐨勬暟鎹负:{}",list);
+ return list;
+ }
+
+ @Override
+ public AjaxResult getAllPetNoteByPetId(Long pid) {
+ LambdaQueryWrapper<ZfPetNote> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(ZfPetNote::getPid,pid);
+ List<ZfPetNote> list = list(lqw);
+ return AjaxResult.success(list);
+ }
+
+ private LambdaQueryWrapper<ZfPetNote> buildCondition(ZfPetNote zfPetNote) {
+ LambdaQueryWrapper<ZfPetNote> lqw = new LambdaQueryWrapper<>();
+ lqw.like(StringUtils.isNotEmpty(zfPetNote.getTitle()),ZfPetNote::getTitle,zfPetNote.getTitle());
+ lqw.like(zfPetNote.getCreateTime()!=null,ZfPetNote::getCreateTime,zfPetNote.getCreateTime());
+ lqw.like(zfPetNote.getRemindTime()!=null,ZfPetNote::getRemindTime,zfPetNote.getRemindTime());
+ lqw.like(StringUtils.isNotEmpty(zfPetNote.getRemark()),ZfPetNote::getRemark,zfPetNote.getRemark());
+ return lqw;
+ }
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
index 17cd163..4fb767a 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
@@ -1,11 +1,21 @@
package com.ruoyi.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.MapUtils;
+import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.domain.ZfPet;
import com.ruoyi.mapper.ZfPetMapper;
import com.ruoyi.service.ZfPetService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.util.StringUtil;
import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
/**
* <p>
@@ -16,6 +26,40 @@
* @since 2023-03-12
*/
@Service
+@Slf4j
public class ZfPetServiceImpl extends ServiceImpl<ZfPetMapper, ZfPet> implements ZfPetService {
+ @Override
+ public AjaxResult selectPetList(ZfPet zfPet, Integer pageNum, Integer pageSize) {
+ LambdaQueryWrapper<ZfPet> lqw = buildCondition(zfPet);
+ Page<ZfPet> ZfPetPage = new Page<>(pageNum,pageSize);
+ Page<ZfPet> pageResult = page(ZfPetPage, lqw);
+ HashMap<String, Object> data = MapUtils.getResult(pageResult);
+ return AjaxResult.success(data);
+ }
+
+ @Override
+ public List<ZfPet> selectByCondition(ZfPet zfPet) {
+ LambdaQueryWrapper<ZfPet> lambdaQueryWrapper = buildCondition(zfPet);
+ List<ZfPet> list = list(lambdaQueryWrapper);
+ log.info("杩斿洖鐨勬暟鎹负:{}",list);
+ return list;
+ }
+
+ private LambdaQueryWrapper<ZfPet> buildCondition(ZfPet zfPet) {
+ LambdaQueryWrapper<ZfPet> lqw = new LambdaQueryWrapper<>();
+ lqw.like(StringUtils.isNotEmpty(zfPet.getIdNum()),ZfPet::getIdNum,zfPet.getIdNum());
+ lqw.like(StringUtils.isNotEmpty(zfPet.getSecurityCode()),ZfPet::getSecurityCode,zfPet.getSecurityCode());
+ lqw.like(StringUtils.isNotEmpty(zfPet.getType()),ZfPet::getType,zfPet.getType());
+ lqw.like(StringUtils.isNotEmpty(zfPet.getName()),ZfPet::getName,zfPet.getName());
+ lqw.like(zfPet.getBirth()!=null,ZfPet::getBirth,zfPet.getBirth());
+ lqw.like(zfPet.getSex()!=null,ZfPet::getSex,zfPet.getSex());
+ lqw.like(StringUtils.isNotEmpty(zfPet.getColor()),ZfPet::getColor,zfPet.getColor());
+ lqw.like(StringUtils.isNotEmpty(zfPet.getProperties()),ZfPet::getProperties,zfPet.getProperties());
+ lqw.like(StringUtils.isNotEmpty(zfPet.getEatHabit()),ZfPet::getEatHabit,zfPet.getEatHabit());
+ lqw.like(StringUtils.isNotEmpty(zfPet.getLifeHabit()),ZfPet::getLifeHabit,zfPet.getLifeHabit());
+ lqw.like(StringUtils.isNotEmpty(zfPet.getAddress()),ZfPet::getAddress,zfPet.getAddress());
+ lqw.like(StringUtils.isNotEmpty(zfPet.getDialect()),ZfPet::getDialect,zfPet.getDialect());
+ return lqw;
+ }
}
--
Gitblit v1.9.1