From 78694f580367d8825025a0d32beccbd9662764b7 Mon Sep 17 00:00:00 2001
From: whywhyo <1511349576@qq.com>
Date: 星期六, 13 五月 2023 21:33:54 +0800
Subject: [PATCH] 导入模板
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCleanController.java | 12
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java | 17 +
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetNoteController.java | 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfContactController.java | 12
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfPropertyExcelBean.java | 55 +++
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java | 25 +
zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java | 2
zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java | 2
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java | 27 +
zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java | 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java | 14
zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java | 1
zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java | 2
zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java | 36 ++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java | 13
zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java | 3
zhang-content/src/main/java/com/ruoyi/service/impl/ZfMasterServiceImpl.java | 33 ++
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java | 23 +
zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java | 9
zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java | 27 +
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEquipmentController.java | 14
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java | 40 ++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java | 2
zhang-content/src/main/java/com/ruoyi/service/ZfMasterService.java | 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java | 13
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEventExcelBean.java | 42 ++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEconomyController.java | 13
zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java | 9
zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java | 2
zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java | 3
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java | 20 +
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCleanExcelBean.java | 61 +++
zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java | 20 +
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java | 36 ++
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEconomyExcelBean.java | 65 ++++
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfContactExcelBean.java | 77 ++++
zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java | 22 +
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEquipmentExcelBean.java | 58 +++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfMasterController.java | 2
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCollectionExcelBean.java | 68 ++++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java | 16
41 files changed, 876 insertions(+), 25 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCleanController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCleanController.java
index d464645..3a98096 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCleanController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCleanController.java
@@ -9,6 +9,7 @@
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZfClean;
+import com.ruoyi.domain.excel.ZfCleanExcelBean;
import com.ruoyi.service.ZfCleanService;
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;
@@ -45,6 +47,16 @@
return zfCleanService.selectDataList(zfClean, pageNum, pageSize);
}
+ /**
+ * 鑾峰彇瀵煎叆妯℃澘
+ */
+ @GetMapping("/model")
+ public void getExportModel(HttpServletResponse response){
+ List<ZfCleanExcelBean> list = Collections.singletonList(new ZfCleanExcelBean());
+ ExcelUtil<ZfCleanExcelBean> util = new ExcelUtil<>(ZfCleanExcelBean.class);
+ util.exportExcel(response,list,"淇濇磥鏀剁撼璁板綍鏁版嵁");
+ }
+
/**
* 瀵煎嚭淇濇磥鏀剁撼璁板綍鍒楄〃
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java
index 73aa728..b26002a 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java
@@ -9,6 +9,8 @@
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZfCollection;
+import com.ruoyi.domain.excel.ZfCleanExcelBean;
+import com.ruoyi.domain.excel.ZfCollectionExcelBean;
import com.ruoyi.service.ZfCollectionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -17,6 +19,7 @@
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;
@@ -47,6 +50,16 @@
}
/**
+ * 鑾峰彇瀵煎叆妯℃澘
+ */
+ @GetMapping("/model")
+ public void getExportModel(HttpServletResponse response){
+ List<ZfCollectionExcelBean> list = Collections.singletonList(new ZfCollectionExcelBean());
+ ExcelUtil<ZfCollectionExcelBean> util = new ExcelUtil<>(ZfCollectionExcelBean.class);
+ util.exportExcel(response,list,"鏀惰棌鑽h獕璁板綍鏁版嵁");
+ }
+
+ /**
* 瀵煎嚭鏀惰棌鍜岃崳瑾夎褰曞垪琛�
*/
// @PreAuthorize("@ss.hasPermi('system:property:export')")
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfContactController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfContactController.java
index 1434285..b8acd25 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfContactController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfContactController.java
@@ -9,6 +9,8 @@
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZfContact;
+import com.ruoyi.domain.excel.ZfCollectionExcelBean;
+import com.ruoyi.domain.excel.ZfContactExcelBean;
import com.ruoyi.service.ZfContactService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
@@ -17,6 +19,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;
@@ -44,6 +47,15 @@
return zfContactService.selectDataList(zfContact, pageNum, pageSize);
}
+ /**
+ * 鑾峰彇瀵煎叆妯℃澘
+ */
+ @GetMapping("/model")
+ public void getExportModel(HttpServletResponse response){
+ List<ZfContactExcelBean> list = Collections.singletonList(new ZfContactExcelBean());
+ ExcelUtil<ZfContactExcelBean> util = new ExcelUtil<>(ZfContactExcelBean.class);
+ util.exportExcel(response,list,"閫氳褰曟暟鎹�");
+ }
/**
* 瀵煎嚭閫氳褰曡褰曞垪琛�
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);
}
/**
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEconomyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEconomyController.java
index 4835abe..d81738e 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEconomyController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEconomyController.java
@@ -8,7 +8,9 @@
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.domain.ZfEconomy;
+import com.ruoyi.domain.excel.ZfEconomyExcelBean;
import com.ruoyi.service.ZfEconomyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -17,6 +19,7 @@
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;
@@ -45,6 +48,16 @@
}
/**
+ * 鑾峰彇瀵煎叆妯℃澘
+ */
+ @GetMapping("/model")
+ public void getExportModel(HttpServletResponse response){
+ List<ZfEconomyExcelBean> list = Collections.singletonList(new ZfEconomyExcelBean());
+ ExcelUtil<ZfEconomyExcelBean> util = new ExcelUtil<>(ZfEconomyExcelBean.class);
+ util.exportExcel(response,list,"瀹跺涵鏀舵敮鍙拌处璁板綍鏁版嵁");
+ }
+
+ /**
* 瀵煎嚭瀹跺涵鏀舵敮鍙拌处璁板綍鍒楄〃
*/
// @PreAuthorize("@ss.hasPermi('system:property:export')")
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEquipmentController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEquipmentController.java
index 978344c..4d2309c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEquipmentController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEquipmentController.java
@@ -9,6 +9,8 @@
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZfEquipment;
+import com.ruoyi.domain.excel.ZfEconomyExcelBean;
+import com.ruoyi.domain.excel.ZfEquipmentExcelBean;
import com.ruoyi.service.ZfEquipmentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -17,6 +19,7 @@
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;
@@ -40,12 +43,21 @@
@GetMapping("/all")
public AjaxResult listAll(ZfEquipment zfEquipment){
-
Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
return zfEquipmentService.selectDataList(zfEquipment, pageNum, pageSize);
}
+ /**
+ * 鑾峰彇瀵煎叆妯℃澘
+ */
+ @GetMapping("/model")
+ public void getExportModel(HttpServletResponse response){
+ List<ZfEquipmentExcelBean> list = Collections.singletonList(new ZfEquipmentExcelBean());
+ ExcelUtil<ZfEquipmentExcelBean> util = new ExcelUtil<>(ZfEquipmentExcelBean.class);
+ util.exportExcel(response,list,"瀹跺涵璁惧璁板綍鏁版嵁");
+ }
+
/**
* 瀵煎嚭瀹跺涵璁惧璁板綍鍒楄〃
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java
index 264df42..a45c468 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java
@@ -9,6 +9,8 @@
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZfEvent;
+import com.ruoyi.domain.excel.ZfEquipmentExcelBean;
+import com.ruoyi.domain.excel.ZfEventExcelBean;
import com.ruoyi.service.ZfEventService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
@@ -17,6 +19,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;
@@ -45,6 +48,16 @@
return zfEventService.selectDataList(zfEvent, pageNum, pageSize);
}
+ /**
+ * 鑾峰彇瀵煎叆妯℃澘
+ */
+ @GetMapping("/model")
+ public void getExportModel(HttpServletResponse response){
+ List<ZfEventExcelBean> list = Collections.singletonList(new ZfEventExcelBean());
+ ExcelUtil<ZfEventExcelBean> util = new ExcelUtil<>(ZfEventExcelBean.class);
+ util.exportExcel(response,list,"瀹跺ぇ浜嬭璁板綍鏁版嵁");
+ }
+
/**
* 瀵煎嚭瀹跺涵澶т簨浠惰褰曞垪琛�
@@ -60,9 +73,6 @@
}
- public static void main(String[] args) {
- System.out.println();
- }
/**
* 瀵煎叆瀹跺涵澶т簨浠惰褰曞垪琛�
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 5c1b360..342fba4 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
@@ -103,7 +103,7 @@
@PostMapping
public AjaxResult add(@RequestBody ZfMaster zfMaster)
{
- return toAjax(zfMasterService.save(zfMaster));
+ return zfMasterService.mySave(zfMaster);
}
/**
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 7096e0b..575b503 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
@@ -93,7 +93,7 @@
@PostMapping
public AjaxResult add(@RequestBody ZfPet zfPet)
{
- return toAjax(zfPetService.save(zfPet));
+ return zfPetService.mySave(zfPet);
}
/**
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 4e2f4a6..90ee3e9 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
@@ -104,7 +104,7 @@
@PostMapping
public AjaxResult add(@RequestBody ZfPetNote zfPetNote)
{
- return toAjax(zfPetNoteService.save(zfPetNote));
+ return zfPetNoteService.mySave(zfPetNote);
}
/**
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java
index cd2cfa9..bb1eb28 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java
@@ -8,6 +8,8 @@
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZfProperty;
+import com.ruoyi.domain.excel.ZfEconomyExcelBean;
+import com.ruoyi.domain.excel.ZfPropertyExcelBean;
import com.ruoyi.service.IZfPropertyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -16,6 +18,7 @@
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 +45,16 @@
}
/**
+ * 鑾峰彇瀵煎叆妯℃澘
+ */
+ @GetMapping("/model")
+ public void getExportModel(HttpServletResponse response){
+ List<ZfPropertyExcelBean> list = Collections.singletonList(new ZfPropertyExcelBean());
+ ExcelUtil<ZfPropertyExcelBean> util = new ExcelUtil<>(ZfPropertyExcelBean.class);
+ util.exportExcel(response,list,"瀹跺涵璧勪骇璁板綍鏁版嵁");
+ }
+
+ /**
* 瀵煎嚭瀹跺涵璧勪骇璁板綍鍒楄〃
*/
// @PreAuthorize("@ss.hasPermi('system:property:export')")
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java
index 0e93e46..dcd3483 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java
@@ -31,36 +31,43 @@
/**
* 0锛氫繚娲侊紝1锛氭敹绾�
*/
+ @Excel(name = "绫诲瀷",readConverterExp = "0=淇濇磥,1=鏀剁撼")
private Integer kind;
/**
* 閫傜敤浜�
*/
+ @Excel(name = "閫傜敤浜�")
private String suitable;
/**
* 绫诲埆
*/
+ @Excel(name = "绫诲埆")
private String type;
/**
* 淇濇磥鏂规硶
*/
+ @Excel(name = "淇濇磥鏂规硶")
private String method;
/**
* 鏉愭枡瀛樻斁鍦�
*/
+ @Excel(name = "鏉愭枡瀛樻斁鍦�")
private String place;
/**
* 鏀剧疆鍦扮偣
*/
+ @Excel(name = "鏀剧疆鍦扮偣")
private String location;
/**
* 澶囨敞
*/
+ @Excel(name = "澶囨敞")
private String remark;
/**
@@ -99,7 +106,7 @@
/**
* 鍙戠敓鏃堕棿
*/
- @Excel(name = "鍙戠敓鏃堕棿", dateFormat = "yyyy-MM-dd")
+// @Excel(name = "璁板綍鏃堕棿", dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date happenTime;
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java
index 3a2530d..3d84bda 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java
@@ -111,7 +111,7 @@
/**
* 鑾峰緱鏃堕棿
*/
- @Excel(name = "鍙戠敓鏃堕棿", dateFormat = "yyyy-MM-dd")
+ @Excel(name = "鑾峰緱鏃堕棿", dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date happenTime;
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java
index d64b3fe..c44af1c 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java
@@ -124,7 +124,6 @@
/**
* 鍙戠敓鏃堕棿
*/
- @Excel(name = "鍙戠敓鏃堕棿", dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date happenTime;
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 d8200f8..afa9cb8 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java
@@ -3,11 +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.util.Date;
/**
* <p>
@@ -48,13 +50,13 @@
/**
* 涓尰
*/
- @Excel(name = "涓尰")
+ @Excel(name = "涓尰澶勬柟")
private String cmedical;
/**
* 瑗垮尰
*/
- @Excel(name = "瑗垮尰")
+ @Excel(name = "瑗垮尰澶勬柟")
private String wmedical;
/**
@@ -77,4 +79,7 @@
private String url;
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date createTime;
+
}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java
index 889ad2d..33485af 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java
@@ -105,7 +105,7 @@
/**
* 鍙戠敓鏃堕棿
*/
- @Excel(name = "鍙戠敓鏃堕棿", dateFormat = "yyyy-MM-dd")
+ @Excel(name = "鏃堕棿", dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date happenTime;
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java
index 6d7e308..c83430f 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java
@@ -98,7 +98,7 @@
/**
* 璁板綍鏃堕棿
*/
- @Excel(name = "璁板綍鏃堕棿", dateFormat = "yyyy-MM-dd")
+ @Excel(name = "鏃堕棿", dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date happenTime;
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 9ae3d69..6b93ad1 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java
@@ -111,4 +111,7 @@
private String url;
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date createTime;
+
}
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 83adbd4..97e96f7 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java
@@ -1,6 +1,7 @@
package com.ruoyi.domain;
import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -38,8 +39,8 @@
* 璁板綍鏃堕棿
*/
@JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "璁板綍鏃堕棿", dateFormat = "yyyy-MM-dd")
- private Date createTime;
+ @Excel(name = "鏃ユ湡", dateFormat = "yyyy-MM-dd")
+ private Date happenTime;
/**
* 棰樺悕
@@ -55,6 +56,11 @@
private Date remindTime;
/**
+ * 鍒涘缓鏃堕棿
+ */
+ private Date createTime;
+
+ /**
* 澶囨敞
*/
@Excel(name = "澶囨敞")
@@ -62,4 +68,21 @@
private String url;
+
+ @TableField(exist = false)
+ private Date happenStartTime;
+
+ @TableField(exist = false)
+ private Date happenEndTime;
+
+ @TableField(exist = false)
+ private Date remindStartTime;
+
+ @TableField(exist = false)
+ private Date remindEndTime;
+
+
+
+
+
}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCleanExcelBean.java b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCleanExcelBean.java
new file mode 100644
index 0000000..e9c57ef
--- /dev/null
+++ b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCleanExcelBean.java
@@ -0,0 +1,61 @@
+package com.ruoyi.domain.excel;
+
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+
+/**
+ * @Author Jinquan_Ou
+ * @Description
+ * @Date 2023-05-13 20:08
+ * @Version 1.0.0
+ **/
+@Data
+@ToString
+public class ZfCleanExcelBean implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 0锛氫繚娲侊紝1锛氭敹绾�
+ */
+ @Excel(name = "绫诲瀷",readConverterExp = "0=淇濇磥,1=鏀剁撼")
+ private Integer kind;
+
+ /**
+ * 閫傜敤浜�
+ */
+ @Excel(name = "閫傜敤浜�")
+ private String suitable;
+
+ /**
+ * 绫诲埆
+ */
+ @Excel(name = "绫诲埆")
+ private String type;
+
+ /**
+ * 淇濇磥鏂规硶
+ */
+ @Excel(name = "淇濇磥鏂规硶")
+ private String method;
+
+ /**
+ * 鏉愭枡瀛樻斁鍦�
+ */
+ @Excel(name = "鏉愭枡瀛樻斁鍦�")
+ private String place;
+
+ /**
+ * 鏀剧疆鍦扮偣
+ */
+ @Excel(name = "鏀剧疆鍦扮偣")
+ private String location;
+
+ /**
+ * 澶囨敞
+ */
+ @Excel(name = "澶囨敞")
+ private String remark;
+}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCollectionExcelBean.java b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCollectionExcelBean.java
new file mode 100644
index 0000000..94c8883
--- /dev/null
+++ b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCollectionExcelBean.java
@@ -0,0 +1,68 @@
+package com.ruoyi.domain.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Author Jinquan_Ou
+ * @Description
+ * @Date 2023-05-13 20:17
+ * @Version 1.0.0
+ **/
+@Data
+public class ZfCollectionExcelBean implements Serializable {
+ private static final long serialVersionUID = 1L;
+ /**
+ * 绫诲埆
+ */
+ @Excel(name = "绫诲埆")
+ private String type;
+
+ /**
+ * 鍚嶅瓧
+ */
+ @Excel(name = "鍚嶅瓧")
+ private String name;
+
+ /**
+ * 鏉ユ簮
+ */
+ @Excel(name = "鏉ユ簮")
+ private String source;
+
+ /**
+ * 鎷ユ湁鑰�
+ */
+ @Excel(name = "鎷ユ湁鑰�")
+ private String owner;
+
+ /**
+ * 浠峰��
+ */
+ @Excel(name = "浠峰��")
+ private String price;
+
+ /**
+ * 瀛樻斁浣嶇疆
+ */
+ @Excel(name = "瀛樻斁浣嶇疆")
+ private String location;
+
+ /**
+ * 澶囨敞
+ */
+ @Excel(name = "澶囨敞")
+ private String remark;
+
+ /**
+ * 鑾峰緱鏃堕棿
+ */
+ @Excel(name = "鍙戠敓鏃堕棿", dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ private Date happenTime;
+
+}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfContactExcelBean.java b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfContactExcelBean.java
new file mode 100644
index 0000000..75417aa
--- /dev/null
+++ b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfContactExcelBean.java
@@ -0,0 +1,77 @@
+package com.ruoyi.domain.excel;
+
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author Jinquan_Ou
+ * @Description
+ * @Date 2023-05-13 20:29
+ * @Version 1.0.0
+ **/
+@Data
+public class ZfContactExcelBean implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 鎴愬憳濮撳悕
+ */
+ @Excel(name = "鎴愬憳濮撳悕")
+ private String myName;
+
+ /**
+ * 绉板懠
+ */
+ @Excel(name = "绉板懠")
+ private String nickName;
+
+ /**
+ * 绉板懠鑰呭鍚�
+ */
+ @Excel(name = "绉板懠鑰呭鍚�")
+ private String name;
+
+ /**
+ * 宸ヤ綔鍗曚綅
+ */
+ @Excel(name = "宸ヤ綔鍗曚綅")
+ private String work;
+
+ /**
+ * 鎵嬫満鍙风爜
+ */
+ @Excel(name = "鎵嬫満鍙风爜")
+ private String phone;
+
+ /**
+ * 寰俊鍙�
+ */
+ @Excel(name = "寰俊鍙�")
+ private String wx;
+
+ /**
+ * qq鍙�
+ */
+ @Excel(name = "qq鍙�")
+ private String qq;
+
+ /**
+ * 鎺ㄧ壒鍙�
+ */
+ @Excel(name = "鎺ㄧ壒鍙�")
+ private String twitter;
+
+ /**
+ * 鏄惁甯歌仈绯�,0:鍚�,1:鏄�
+ */
+ @Excel(name = "鏄惁甯歌仈绯�",readConverterExp = "0=鍚�,1=鏄�")
+ private Integer isAlways;
+
+ /**
+ * 澶囨敞
+ */
+ @Excel(name = "澶囨敞")
+ private String remark;
+}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEconomyExcelBean.java b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEconomyExcelBean.java
new file mode 100644
index 0000000..e549d97
--- /dev/null
+++ b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEconomyExcelBean.java
@@ -0,0 +1,65 @@
+package com.ruoyi.domain.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Author Jinquan_Ou
+ * @Description
+ * @Date 2023-05-13 20:40
+ * @Version 1.0.0
+ **/
+public class ZfEconomyExcelBean implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 0锛氬熀閲戙��1锛氬彴璐�
+ */
+ @Excel(name = "鏀舵敮绫诲瀷",readConverterExp = "0=鍩洪噾,1=鍙拌处")
+ private Integer type;
+ /**
+ * 鏀跺叆/鏀嚭
+ */
+ @Excel(name = "鏀跺叆/鏀嚭")
+ private String price;
+
+ /**
+ * 鐢ㄩ��
+ */
+ @Excel(name = "鐢ㄩ��")
+ private String useFor;
+
+ /**
+ * 浣跨敤浜�
+ */
+ @Excel(name = "浣跨敤浜�")
+ private String usePeople;
+
+ /**
+ * 0:鐜伴噾,1:鑷姩鍒掓墸
+ */
+ @Excel(name = "鐜伴噾/鑷姩鍒掓墸",readConverterExp = "0=鐜伴噾,1=鑷姩鍒掓墸")
+ private Integer kind;
+
+ /**
+ * 浣欓
+ */
+ @Excel(name = "浣欓")
+ private String balance;
+
+ /**
+ * 澶囨敞
+ */
+ @Excel(name = "澶囨敞")
+ private String remark;
+
+ /**
+ * 鍙戠敓鏃堕棿
+ */
+ @Excel(name = "鏃堕棿", dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ private Date happenTime;
+}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEquipmentExcelBean.java b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEquipmentExcelBean.java
new file mode 100644
index 0000000..1aaaada
--- /dev/null
+++ b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEquipmentExcelBean.java
@@ -0,0 +1,58 @@
+package com.ruoyi.domain.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Author Jinquan_Ou
+ * @Description
+ * @Date 2023-05-13 21:11
+ * @Version 1.0.0
+ **/
+@Data
+public class ZfEquipmentExcelBean implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 璁惧鍚嶇О
+ */
+ @Excel(name = "璁惧鍚嶇О")
+ private String name;
+
+ /**
+ * 璐拱浜�
+ */
+ @Excel(name = "璐拱浜�")
+ private String buyer;
+
+ /**
+ * 浜嬮」鍐呭
+ */
+ @Excel(name = "浜嬮」鍐呭")
+ private String content;
+
+ /**
+ * 瀛樻斁鍦扮偣
+ */
+ @Excel(name = "瀛樻斁鍦扮偣")
+ private String location;
+
+ /**
+ * 澶囨敞
+ */
+ @Excel(name = "澶囨敞")
+ private String remark;
+
+ /**
+ * 璁板綍鏃堕棿
+ */
+ @Excel(name = "鏃堕棿", dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ private Date happenTime;
+
+
+}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEventExcelBean.java b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEventExcelBean.java
new file mode 100644
index 0000000..01e7276
--- /dev/null
+++ b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEventExcelBean.java
@@ -0,0 +1,42 @@
+package com.ruoyi.domain.excel;
+
+import com.ruoyi.common.annotation.Excel;
+import io.netty.buffer.search.SearchProcessor;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author Jinquan_Ou
+ * @Description
+ * @Date 2023-05-13 21:19
+ * @Version 1.0.0
+ **/
+@Data
+public class ZfEventExcelBean implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 鍙備笌鏈澶т簨鐨勪汉鐗╁悕瀛�
+ */
+ @Excel(name="鍙備笌鏈澶т簨鐨勪汉鐗╁悕瀛�")
+ private String people;
+
+ /**
+ * 鍦扮偣
+ */
+ @Excel(name="鍦扮偣")
+ private String address;
+
+ /**
+ * 鏈澶т簨浠剁殑鏍囬
+ */
+ @Excel(name="鏈澶т簨浠剁殑鏍囬")
+ private String title;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Excel(name="澶囨敞淇℃伅")
+ private String remark;
+}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfPropertyExcelBean.java b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfPropertyExcelBean.java
new file mode 100644
index 0000000..fb80f8c
--- /dev/null
+++ b/zhang-content/src/main/java/com/ruoyi/domain/excel/ZfPropertyExcelBean.java
@@ -0,0 +1,55 @@
+package com.ruoyi.domain.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Author Jinquan_Ou
+ * @Description
+ * @Date 2023-05-13 21:29
+ * @Version 1.0.0
+ **/
+@Data
+public class ZfPropertyExcelBean implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /** 璧勪骇绫诲瀷 */
+ @Excel(name = "璧勪骇绫诲瀷")
+ private String type;
+
+ /** 鏍囬(璐﹀彿銆佸崱鍙�) */
+ @Excel(name = "鏍囬(璐﹀彿銆佸崱鍙�)")
+ private String title;
+
+ /** 寮�鎴疯(璧勪骇鍦板潃) */
+ @Excel(name = "寮�鎴疯(璧勪骇鍦板潃)")
+ private String location;
+
+ /** 鎸佹湁浜哄悕瀛� */
+ @Excel(name = "鎸佹湁浜哄悕瀛�")
+ private String holder;
+
+ /** 瀛樻斁鍦板潃 */
+ @Excel(name = "瀛樻斁鍦板潃")
+ private String address;
+
+ @Excel(name="澶囨敞")
+ private String remark;
+
+ /**
+ * 鏁版嵁鐘舵��
+ */
+ @Excel(name = "鏄惁娉ㄩ攢",readConverterExp = "0=姝e父,1=宸叉敞閿�")
+ private Integer status;
+
+ /**
+ * 鍙戠敓鏃堕棿
+ */
+ @Excel(name = "鏃堕棿", dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ private Date happenTime;
+}
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 edaa136..a2112ac 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java
@@ -20,4 +20,7 @@
AjaxResult selectDoctorList(ZfDoctor zfDoctor, Integer pageNum, Integer pageSize);
List<ZfDoctor> selectByCondition(ZfDoctor zfDoctor);
+
+ AjaxResult mySave(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 f5eba13..63da86e 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfMasterService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfMasterService.java
@@ -21,4 +21,5 @@
List<ZfMaster> selectByCondition(ZfMaster zfMaster);
+ AjaxResult mySave(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 1b390c8..f3467a2 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java
@@ -22,4 +22,6 @@
List<ZfPetNote> selectByCondition(ZfPetNote zfPetNote);
AjaxResult getAllPetNoteByPetId(Long pid);
+
+ AjaxResult mySave(ZfPetNote zfPetNote);
}
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 8514109..de1d08a 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java
@@ -20,4 +20,6 @@
AjaxResult selectPetList(ZfPet zfPet, Integer pageNum, Integer pageSize);
List<ZfPet> selectByCondition(ZfPet zfPet);
+
+ AjaxResult mySave(ZfPet zfPet);
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
index dda52e9..6fd2c53 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
@@ -11,6 +11,7 @@
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZInfoUser;
+import com.ruoyi.domain.ZfEvent;
import com.ruoyi.domain.ZfProperty;
import com.ruoyi.mapper.ZfPropertyMapper;
import com.ruoyi.service.IZfPropertyService;
@@ -278,6 +279,13 @@
zfProperty.setFamilyId(myFamilyId);
}
+ //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
+ LambdaQueryWrapper<ZfProperty> lqw = uniqueCondition(zfProperty);
+ List<ZfProperty> list = list(lqw);
+ if(list.size()>0){
+ throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
+ }
+
if (save(zfProperty)) {
return AjaxResult.success();
} else {
@@ -285,6 +293,18 @@
}
}
+ private LambdaQueryWrapper<ZfProperty> uniqueCondition(ZfProperty zfProperty) {
+ LambdaQueryWrapper<ZfProperty> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(!StringUtils.isEmpty(zfProperty.getType()), ZfProperty::getType, zfProperty.getType())
+ .eq(!StringUtils.isEmpty(zfProperty.getTitle()), ZfProperty::getTitle, zfProperty.getTitle())
+ .eq(!StringUtils.isEmpty(zfProperty.getLocation()), ZfProperty::getLocation, zfProperty.getLocation())
+ .eq(!StringUtils.isEmpty(zfProperty.getHolder()), ZfProperty::getHolder, zfProperty.getHolder())
+ .eq(!StringUtils.isEmpty(zfProperty.getAddress()), ZfProperty::getAddress, zfProperty.getAddress())
+ .eq(!StringUtils.isEmpty(zfProperty.getRemark()), ZfProperty::getRemark, zfProperty.getRemark())
+ .eq(zfProperty.getHappenTime()!=null,ZfProperty::getHappenTime,zfProperty.getHappenTime());
+ return lqw;
+
+ }
@Override
@Transactional
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
index cdb1eec..e2e279b 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
@@ -14,6 +14,7 @@
import com.ruoyi.domain.ZfClean;
import com.ruoyi.domain.ZfClean;
+import com.ruoyi.domain.ZfProperty;
import com.ruoyi.mapper.ZfCleanMapper;
import com.ruoyi.service.ZInfoUserService;
import com.ruoyi.service.ZfCleanService;
@@ -60,6 +61,19 @@
.like(StringUtils.isNotEmpty(zfClean.getRemark()), ZfClean::getRemark, zfClean.getRemark())
.eq(zfClean.getHappenTime() != null, ZfClean::getHappenTime, zfClean.getHappenTime())
.between(zfClean.getHappenStartTime() != null && zfClean.getHappenEndTime() != null, ZfClean::getHappenTime, zfClean.getHappenStartTime(), zfClean.getHappenEndTime());
+ return lqw;
+ }
+
+ private LambdaQueryWrapper<ZfClean> uniqueCondition(ZfClean zfClean) {
+ LambdaQueryWrapper<ZfClean> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(zfClean.getKind() != null, ZfClean::getKind, zfClean.getKind())
+ .eq(StringUtils.isNotEmpty(zfClean.getSuitable()), ZfClean::getSuitable, zfClean.getSuitable())
+ .eq(StringUtils.isNotEmpty(zfClean.getType()), ZfClean::getType, zfClean.getType())
+ .eq(StringUtils.isNotEmpty(zfClean.getMethod()), ZfClean::getMethod, zfClean.getMethod())
+ .eq(StringUtils.isNotEmpty(zfClean.getPlace()), ZfClean::getPlace, zfClean.getPlace())
+ .eq(StringUtils.isNotEmpty(zfClean.getLocation()), ZfClean::getLocation, zfClean.getLocation())
+ .eq(StringUtils.isNotEmpty(zfClean.getRemark()), ZfClean::getRemark, zfClean.getRemark())
+ .eq(zfClean.getHappenTime() != null, ZfClean::getHappenTime, zfClean.getHappenTime());
return lqw;
}
@@ -279,6 +293,13 @@
zfClean.setFamilyId(myFamilyId);
}
+ //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
+ LambdaQueryWrapper<ZfClean> lqw = uniqueCondition(zfClean);
+ List<ZfClean> list = list(lqw);
+ if(list.size()>0){
+ throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
+ }
+
if (save(zfClean)) {
return AjaxResult.success();
} else {
@@ -287,6 +308,8 @@
}
+
+
@Override
@Transactional
public AjaxResult importExcel(MultipartFile file) {
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
index f61f637..080b9f5 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
@@ -10,8 +10,7 @@
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.domain.ZInfoUser;
-import com.ruoyi.domain.ZfCollection;
+import com.ruoyi.domain.*;
import com.ruoyi.domain.ZfCollection;
import com.ruoyi.domain.ZfCollection;
import com.ruoyi.mapper.ZfCollectionMapper;
@@ -59,6 +58,19 @@
lqw.like(StringUtils.isNotEmpty(zfCollection.getRemark()),ZfCollection::getRemark,zfCollection.getRemark());
lqw.eq(zfCollection.getHappenTime() != null, ZfCollection::getHappenTime, zfCollection.getHappenTime());
lqw.between(zfCollection.getHappenStartTime() != null && zfCollection.getHappenEndTime() != null, ZfCollection::getHappenTime, zfCollection.getHappenStartTime(), zfCollection.getHappenEndTime());
+ return lqw;
+ }
+
+ private LambdaQueryWrapper<ZfCollection> uniqueCondition(ZfCollection zfCollection) {
+ LambdaQueryWrapper<ZfCollection> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(StringUtils.isNotEmpty(zfCollection.getType()),ZfCollection::getType,zfCollection.getType());
+ lqw.eq(StringUtils.isNotEmpty(zfCollection.getName()),ZfCollection::getName,zfCollection.getName());
+ lqw.eq(StringUtils.isNotEmpty(zfCollection.getSource()),ZfCollection::getSource,zfCollection.getSource());
+ lqw.eq(StringUtils.isNotEmpty(zfCollection.getOwner()),ZfCollection::getOwner,zfCollection.getOwner());
+ lqw.eq(StringUtils.isNotEmpty(zfCollection.getPrice()),ZfCollection::getPrice,zfCollection.getPrice());
+ lqw.eq(StringUtils.isNotEmpty(zfCollection.getLocation()),ZfCollection::getLocation,zfCollection.getLocation());
+ lqw.eq(StringUtils.isNotEmpty(zfCollection.getRemark()),ZfCollection::getRemark,zfCollection.getRemark());
+ lqw.eq(zfCollection.getHappenTime() != null, ZfCollection::getHappenTime, zfCollection.getHappenTime());
return lqw;
}
@@ -250,13 +262,22 @@
zfCollection.setFamilyId(myFamilyId);
}
+ //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
+ LambdaQueryWrapper<ZfCollection> lqw = uniqueCondition(zfCollection);
+ List<ZfCollection> list = list(lqw);
+ if(list.size()>0){
+ throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
+ }
+
if (save(zfCollection)) {
return AjaxResult.success();
}else {
return AjaxResult.error();
}
}
-
+
+
+
@Override
@Transactional
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java
index 086057a..6677c56 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java
@@ -281,6 +281,13 @@
zfContact.setFamilyId(myFamilyId);
}
+ //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
+ LambdaQueryWrapper<ZfContact> lqw = uniqueCondition(zfContact);
+ List<ZfContact> list = list(lqw);
+ if(list.size()>0){
+ throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
+ }
+
if (save(zfContact)) {
return AjaxResult.success();
} else {
@@ -288,6 +295,21 @@
}
}
+ private LambdaQueryWrapper<ZfContact> uniqueCondition(ZfContact zfContact) {
+ LambdaQueryWrapper<ZfContact> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(StringUtils.isNotEmpty(zfContact.getMyName()),ZfContact::getMyName,zfContact.getMyName());
+ lqw.eq(StringUtils.isNotEmpty(zfContact.getNickName()),ZfContact::getNickName,zfContact.getNickName());
+ lqw.eq(StringUtils.isNotEmpty(zfContact.getName()),ZfContact::getName,zfContact.getName());
+ lqw.eq(StringUtils.isNotEmpty(zfContact.getWork()),ZfContact::getWork,zfContact.getWork());
+ lqw.eq(StringUtils.isNotEmpty(zfContact.getPhone()),ZfContact::getPhone,zfContact.getPhone());
+ lqw.eq(StringUtils.isNotEmpty(zfContact.getWx()),ZfContact::getWx,zfContact.getWx());
+ lqw.eq(StringUtils.isNotEmpty(zfContact.getQq()),ZfContact::getQq,zfContact.getQq());
+ lqw.eq(StringUtils.isNotEmpty(zfContact.getTwitter()),ZfContact::getTwitter,zfContact.getTwitter());
+ lqw.eq(StringUtils.isNotEmpty(zfContact.getRemark()),ZfContact::getRemark,zfContact.getRemark());
+ lqw.eq(zfContact.getHappenTime() != null, ZfContact::getHappenTime, zfContact.getHappenTime());
+ return lqw;
+ }
+
@Override
@Transactional
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 ff09580..30e7509 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
@@ -8,6 +8,7 @@
import com.ruoyi.common.utils.MapUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.domain.ZfDoctor;
+import com.ruoyi.domain.ZfPet;
import com.ruoyi.mapper.ZfDoctorMapper;
import com.ruoyi.service.ZfDoctorService;
import lombok.extern.slf4j.Slf4j;
@@ -31,7 +32,7 @@
@Override
public AjaxResult selectDoctorList(ZfDoctor zfDoctor, Integer pageNum, Integer pageSize) {
LambdaQueryWrapper<ZfDoctor> lqw = buildCondition(zfDoctor);
- lqw.orderByDesc(ZfDoctor::getId);
+ lqw.orderByDesc(ZfDoctor::getCreateTime);
Page<ZfDoctor> ZfDoctorPage = new Page<>(pageNum,pageSize);
Page<ZfDoctor> pageResult = page(ZfDoctorPage, lqw);
@@ -43,11 +44,44 @@
@Override
public List<ZfDoctor> selectByCondition(ZfDoctor zfDoctor) {
LambdaQueryWrapper<ZfDoctor> lambdaQueryWrapper = buildCondition(zfDoctor);
+ lambdaQueryWrapper.orderByDesc(ZfDoctor::getCreateTime);
List<ZfDoctor> list = list(lambdaQueryWrapper);
log.info("杩斿洖鐨勬暟鎹负:{}",list);
return list;
}
+ @Override
+ public AjaxResult mySave(ZfDoctor zfDoctor) {
+ //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
+ LambdaQueryWrapper<ZfDoctor> lqw = uniqueCondition(zfDoctor);
+ List<ZfDoctor> list = list(lqw);
+ if(list.size()>0){
+ throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
+ }
+
+ if(save(zfDoctor)){
+ return AjaxResult.success();
+ }else {
+ return AjaxResult.error();
+ }
+
+
+ }
+
+ private LambdaQueryWrapper<ZfDoctor> uniqueCondition(ZfDoctor zfDoctor) {
+ LambdaQueryWrapper<ZfDoctor> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(StringUtils.isNotEmpty(zfDoctor.getType()),ZfDoctor::getType,zfDoctor.getType());
+ lqw.eq(StringUtils.isNotEmpty(zfDoctor.getSymptom()),ZfDoctor::getSymptom,zfDoctor.getSymptom());
+ lqw.eq(StringUtils.isNotEmpty(zfDoctor.getDuration()),ZfDoctor::getDuration,zfDoctor.getDuration());
+ lqw.eq(StringUtils.isNotEmpty(zfDoctor.getCmedical()),ZfDoctor::getCmedical,zfDoctor.getCmedical());
+ lqw.eq(StringUtils.isNotEmpty(zfDoctor.getWmedical()),ZfDoctor::getWmedical,zfDoctor.getWmedical());
+ lqw.eq(StringUtils.isNotEmpty(zfDoctor.getEffect()),ZfDoctor::getEffect,zfDoctor.getEffect());
+ lqw.eq(StringUtils.isNotEmpty(zfDoctor.getSuitable()),ZfDoctor::getSuitable,zfDoctor.getSuitable());
+ lqw.eq(StringUtils.isNotEmpty(zfDoctor.getRemark()),ZfDoctor::getRemark,zfDoctor.getRemark());
+ return lqw;
+
+ }
+
private LambdaQueryWrapper<ZfDoctor> buildCondition(ZfDoctor zfDoctor) {
LambdaQueryWrapper<ZfDoctor> lqw = new LambdaQueryWrapper<>();
lqw.like(StringUtils.isNotEmpty(zfDoctor.getType()),ZfDoctor::getType,zfDoctor.getType());
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
index 88df0af..4525007 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
@@ -10,8 +10,7 @@
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.domain.ZInfoUser;
-import com.ruoyi.domain.ZfEconomy;
+import com.ruoyi.domain.*;
import com.ruoyi.domain.ZfEconomy;
import com.ruoyi.domain.ZfEconomy;
import com.ruoyi.mapper.ZfEconomyMapper;
@@ -59,6 +58,19 @@
lqw.like(StringUtils.isNotEmpty(zfEconomy.getRemark()),ZfEconomy::getRemark,zfEconomy.getRemark());
lqw.eq(zfEconomy.getHappenTime() != null, ZfEconomy::getHappenTime, zfEconomy.getHappenTime());
lqw.between(zfEconomy.getHappenStartTime() != null && zfEconomy.getHappenEndTime() != null, ZfEconomy::getHappenTime, zfEconomy.getHappenStartTime(), zfEconomy.getHappenEndTime());
+ return lqw;
+ }
+
+ private LambdaQueryWrapper<ZfEconomy> uniqueCondition(ZfEconomy zfEconomy) {
+ LambdaQueryWrapper<ZfEconomy> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(zfEconomy.getType()!=null,ZfEconomy::getType,zfEconomy.getType());
+ lqw.eq(zfEconomy.getKind()!=null,ZfEconomy::getKind,zfEconomy.getKind());
+ lqw.eq(StringUtils.isNotEmpty(zfEconomy.getPrice()),ZfEconomy::getPrice,zfEconomy.getPrice());
+ lqw.eq(StringUtils.isNotEmpty(zfEconomy.getUseFor()),ZfEconomy::getUseFor,zfEconomy.getUseFor());
+ lqw.eq(StringUtils.isNotEmpty(zfEconomy.getUsePeople()),ZfEconomy::getUsePeople,zfEconomy.getUsePeople());
+ lqw.eq(StringUtils.isNotEmpty(zfEconomy.getBalance()),ZfEconomy::getBalance,zfEconomy.getBalance());
+ lqw.eq(StringUtils.isNotEmpty(zfEconomy.getRemark()),ZfEconomy::getRemark,zfEconomy.getRemark());
+ lqw.eq(zfEconomy.getHappenTime() != null, ZfEconomy::getHappenTime, zfEconomy.getHappenTime());
return lqw;
}
@@ -250,6 +262,13 @@
zfEconomy.setFamilyId(myFamilyId);
}
+ //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
+ LambdaQueryWrapper<ZfEconomy> lqw = uniqueCondition(zfEconomy);
+ List<ZfEconomy> list = list(lqw);
+ if(list.size()>0){
+ throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
+ }
+
if (save(zfEconomy)) {
return AjaxResult.success();
}else {
@@ -258,6 +277,8 @@
}
+
+
@Override
@Transactional
public AjaxResult importExcel(MultipartFile file) {
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
index 052b480..d805402 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
@@ -58,6 +58,17 @@
return lqw;
}
+ private LambdaQueryWrapper<ZfEquipment> uniqueCondition(ZfEquipment zfEquipment) {
+ LambdaQueryWrapper<ZfEquipment> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(StringUtils.isNotEmpty(zfEquipment.getName()), ZfEquipment::getName, zfEquipment.getName());
+ lqw.eq(StringUtils.isNotEmpty(zfEquipment.getBuyer()), ZfEquipment::getBuyer, zfEquipment.getBuyer());
+ lqw.eq(StringUtils.isNotEmpty(zfEquipment.getContent()), ZfEquipment::getContent, zfEquipment.getContent());
+ lqw.eq(StringUtils.isNotEmpty(zfEquipment.getLocation()), ZfEquipment::getLocation, zfEquipment.getLocation());
+ lqw.eq(StringUtils.isNotEmpty(zfEquipment.getRemark()), ZfEquipment::getRemark, zfEquipment.getRemark());
+ lqw.eq(zfEquipment.getHappenTime() != null, ZfEquipment::getHappenTime, zfEquipment.getHappenTime());
+ return lqw;
+ }
+
//------------------------------------------------------------------------------------------
@@ -277,6 +288,13 @@
zfEquipment.setFamilyId(myFamilyId);
}
+ //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
+ LambdaQueryWrapper<ZfEquipment> lqw = uniqueCondition(zfEquipment);
+ List<ZfEquipment> list = list(lqw);
+ if(list.size()>0){
+ throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
+ }
+
if (save(zfEquipment)) {
return AjaxResult.success();
} else {
@@ -285,6 +303,8 @@
}
+
+
@Override
@Transactional
public AjaxResult importExcel(MultipartFile file) {
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
index 6d4d8e6..97d08ef 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
@@ -60,6 +60,16 @@
return lqw;
}
+ private LambdaQueryWrapper<ZfEvent> uniqueCondition(ZfEvent zfEvent){
+ LambdaQueryWrapper<ZfEvent> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(!StringUtils.isEmpty(zfEvent.getAddress()), ZfEvent::getAddress, zfEvent.getAddress());
+ lqw.eq(!StringUtils.isEmpty(zfEvent.getPeople()), ZfEvent::getPeople, zfEvent.getPeople());
+ lqw.eq(!StringUtils.isEmpty(zfEvent.getTitle()), ZfEvent::getTitle, zfEvent.getTitle());
+ lqw.eq(!StringUtils.isEmpty(zfEvent.getRemark()), ZfEvent::getRemark, zfEvent.getRemark());
+ lqw.eq(zfEvent.getHappenTime() != null, ZfEvent::getHappenTime, zfEvent.getHappenTime());
+ return lqw;
+ }
+
private LambdaQueryWrapper<ZfEvent> buildCondition(ZfEvent zfEvent, String familyIds, String secondFamilyAuthority) {
//妯$硦鏌ヨ鐨勬潯浠�
LambdaQueryWrapper<ZfEvent> lqw = buildCondition(zfEvent);
@@ -276,6 +286,13 @@
zfEvent.setFamilyId(myFamilyId);
}
+ //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
+ LambdaQueryWrapper<ZfEvent> zfEventLambdaQueryWrapper = uniqueCondition(zfEvent);
+ List<ZfEvent> list = list(zfEventLambdaQueryWrapper);
+ if(list.size()>0){
+ throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
+ }
+
if (save(zfEvent)) {
return AjaxResult.success();
} else {
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 1bbc8a3..c458693 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
@@ -6,6 +6,7 @@
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.domain.ZfMaster;
+import com.ruoyi.domain.ZfPet;
import com.ruoyi.mapper.ZfMasterMapper;
import com.ruoyi.service.ZfMasterService;
import lombok.extern.slf4j.Slf4j;
@@ -41,6 +42,38 @@
return list;
}
+ @Override
+ public AjaxResult mySave(ZfMaster zfMaster) {
+ //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
+ LambdaQueryWrapper<ZfMaster> lqw = uniqueCondition(zfMaster);
+ List<ZfMaster> list = list(lqw);
+ if(list.size()>0){
+ throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
+ }
+
+ if(save(zfMaster)){
+ return AjaxResult.success();
+ }else {
+ return AjaxResult.error();
+ }
+
+ }
+
+ private LambdaQueryWrapper<ZfMaster> uniqueCondition(ZfMaster zfMaster) {
+ LambdaQueryWrapper<ZfMaster> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(zfMaster.getPetId()!=null,ZfMaster::getPetId,zfMaster.getPetId());
+ lqw.eq(StringUtils.isNotEmpty(zfMaster.getName()),ZfMaster::getName,zfMaster.getName());
+ lqw.eq(StringUtils.isNotEmpty(zfMaster.getCertificateType()),ZfMaster::getCertificateType,zfMaster.getCertificateType());
+ lqw.eq(StringUtils.isNotEmpty(zfMaster.getFixedNo()),ZfMaster::getFixedNo,zfMaster.getFixedNo());
+ lqw.eq(StringUtils.isNotEmpty(zfMaster.getPhoneNo()),ZfMaster::getPhoneNo,zfMaster.getPhoneNo());
+ lqw.eq(zfMaster.getMany()!=null,ZfMaster::getMany,zfMaster.getMany());
+ lqw.eq(StringUtils.isNotEmpty(zfMaster.getAddress()),ZfMaster::getAddress,zfMaster.getAddress());
+ lqw.eq(StringUtils.isNotEmpty(zfMaster.getProperty()),ZfMaster::getProperty,zfMaster.getProperty());
+ lqw.eq(StringUtils.isNotEmpty(zfMaster.getEmail()),ZfMaster::getEmail,zfMaster.getEmail());
+ return lqw;
+
+ }
+
private LambdaQueryWrapper<ZfMaster> buildCondition(ZfMaster zfMaster) {
LambdaQueryWrapper<ZfMaster> lqw = new LambdaQueryWrapper<>();
lqw.like(zfMaster.getPetId()!=null,ZfMaster::getPetId,zfMaster.getPetId());
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 f719a0e..00bca60 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
@@ -7,6 +7,8 @@
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.MapUtils;
import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.domain.ZfEvent;
+import com.ruoyi.domain.ZfPet;
import com.ruoyi.domain.ZfPetNote;
import com.ruoyi.mapper.ZfPetNoteMapper;
import com.ruoyi.service.ZfPetNoteService;
@@ -31,6 +33,7 @@
@Override
public AjaxResult selectPetNoteList(ZfPetNote zfPetNote, Integer pageNum, Integer pageSize) {
LambdaQueryWrapper<ZfPetNote> lqw = buildCondition(zfPetNote);
+ lqw.orderByDesc(ZfPetNote::getCreateTime);
Page<ZfPetNote> ZfPetNotePage = new Page<>(pageNum,pageSize);
Page<ZfPetNote> pageResult = page(ZfPetNotePage, lqw);
HashMap<String, Object> data = MapUtils.getResult(pageResult);
@@ -40,6 +43,7 @@
@Override
public List<ZfPetNote> selectByCondition(ZfPetNote zfPetNote) {
LambdaQueryWrapper<ZfPetNote> lambdaQueryWrapper = buildCondition(zfPetNote);
+ lambdaQueryWrapper.orderByDesc(ZfPetNote::getCreateTime);
List<ZfPetNote> list = list(lambdaQueryWrapper);
log.info("杩斿洖鐨勬暟鎹负:{}",list);
return list;
@@ -49,16 +53,46 @@
public AjaxResult getAllPetNoteByPetId(Long pid) {
LambdaQueryWrapper<ZfPetNote> lqw = new LambdaQueryWrapper<>();
lqw.eq(ZfPetNote::getPid,pid);
+ lqw.orderByDesc(ZfPetNote::getCreateTime);
List<ZfPetNote> list = list(lqw);
return AjaxResult.success(list);
+ }
+
+ @Override
+ public AjaxResult mySave(ZfPetNote zfPetNote) {
+
+ //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
+ LambdaQueryWrapper<ZfPetNote> lqw = uniqueCondition(zfPetNote);
+ List<ZfPetNote> list = list(lqw);
+ if(list.size()>0){
+ throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
+ }
+
+ if(save(zfPetNote)){
+ return AjaxResult.success();
+ }else {
+ return AjaxResult.error();
+ }
+ }
+
+ private LambdaQueryWrapper<ZfPetNote> uniqueCondition(ZfPetNote zfPetNote) {
+ LambdaQueryWrapper<ZfPetNote> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(StringUtils.isNotEmpty(zfPetNote.getTitle()),ZfPetNote::getTitle,zfPetNote.getTitle());
+ lqw.eq(zfPetNote.getRemindTime()!=null,ZfPetNote::getRemindTime,zfPetNote.getRemindTime());
+ lqw.eq(zfPetNote.getHappenTime()!=null,ZfPetNote::getHappenTime,zfPetNote.getHappenTime());
+ lqw.eq(StringUtils.isNotEmpty(zfPetNote.getRemark()),ZfPetNote::getRemark,zfPetNote.getRemark());
+ return lqw;
}
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());
+ lqw.eq(zfPetNote.getHappenTime()!=null,ZfPetNote::getHappenTime,zfPetNote.getHappenTime());
+ lqw.eq(zfPetNote.getRemindTime()!=null,ZfPetNote::getRemindTime,zfPetNote.getRemindTime());
+ lqw.between(zfPetNote.getHappenStartTime() != null && zfPetNote.getHappenEndTime() != null, ZfPetNote::getHappenTime, zfPetNote.getHappenStartTime(), zfPetNote.getHappenEndTime());
+ lqw.between(zfPetNote.getRemindStartTime() != null && zfPetNote.getRemindEndTime() != null, ZfPetNote::getRemindTime, zfPetNote.getRemindStartTime(), zfPetNote.getRemindEndTime());
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 0f9a065..f78c260 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
@@ -8,6 +8,7 @@
import com.ruoyi.common.utils.MapUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.domain.ZfPet;
+import com.ruoyi.domain.ZfProperty;
import com.ruoyi.mapper.ZfPetMapper;
import com.ruoyi.service.ZfPetService;
import lombok.extern.slf4j.Slf4j;
@@ -32,7 +33,7 @@
@Override
public AjaxResult selectPetList(ZfPet zfPet, Integer pageNum, Integer pageSize) {
LambdaQueryWrapper<ZfPet> lqw = buildCondition(zfPet);
- lqw.orderByDesc(ZfPet::getId);
+ lqw.orderByDesc(ZfPet::getCreateTime);
Page<ZfPet> ZfPetPage = new Page<>(pageNum,pageSize);
Page<ZfPet> pageResult = page(ZfPetPage, lqw);
HashMap<String, Object> data = MapUtils.getResult(pageResult);
@@ -42,11 +43,48 @@
@Override
public List<ZfPet> selectByCondition(ZfPet zfPet) {
LambdaQueryWrapper<ZfPet> lambdaQueryWrapper = buildCondition(zfPet);
+ lambdaQueryWrapper.orderByDesc(ZfPet::getCreateTime);
List<ZfPet> list = list(lambdaQueryWrapper);
log.info("杩斿洖鐨勬暟鎹负:{}",list);
return list;
}
+ @Override
+ public AjaxResult mySave(ZfPet zfPet) {
+ //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
+ LambdaQueryWrapper<ZfPet> lqw = uniqueCondition(zfPet);
+ List<ZfPet> list = list(lqw);
+ if(list.size()>0){
+ throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
+ }
+
+ if(save(zfPet)){
+ return AjaxResult.success();
+ }else {
+ return AjaxResult.error();
+ }
+
+ }
+
+ private LambdaQueryWrapper<ZfPet> uniqueCondition(ZfPet zfPet) {
+ LambdaQueryWrapper<ZfPet> lqw = new LambdaQueryWrapper<>();
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getIdNum()),ZfPet::getIdNum,zfPet.getIdNum());
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getSecurityCode()),ZfPet::getSecurityCode,zfPet.getSecurityCode());
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getType()),ZfPet::getType,zfPet.getType());
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getName()),ZfPet::getName,zfPet.getName());
+ lqw.eq(zfPet.getBirth()!=null,ZfPet::getBirth,zfPet.getBirth());
+ lqw.eq(zfPet.getSex()!=null,ZfPet::getSex,zfPet.getSex());
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getColor()),ZfPet::getColor,zfPet.getColor());
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getProperties()),ZfPet::getProperties,zfPet.getProperties());
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getEatHabit()),ZfPet::getEatHabit,zfPet.getEatHabit());
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getLifeHabit()),ZfPet::getLifeHabit,zfPet.getLifeHabit());
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getAddress()),ZfPet::getAddress,zfPet.getAddress());
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getDialect()),ZfPet::getDialect,zfPet.getDialect());
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getDisEatHabit()),ZfPet::getDisEatHabit,zfPet.getDisEatHabit());
+ lqw.eq(StringUtils.isNotEmpty(zfPet.getDisLifeHabit()),ZfPet::getDisLifeHabit,zfPet.getDisLifeHabit());
+ return lqw;
+ }
+
private LambdaQueryWrapper<ZfPet> buildCondition(ZfPet zfPet) {
LambdaQueryWrapper<ZfPet> lqw = new LambdaQueryWrapper<>();
lqw.like(StringUtils.isNotEmpty(zfPet.getIdNum()),ZfPet::getIdNum,zfPet.getIdNum());
--
Gitblit v1.9.1