whywhyo
2023-05-13 78694f580367d8825025a0d32beccbd9662764b7
导入模板
34个文件已修改
7个文件已添加
901 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCleanController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfCollectionController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfContactController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEconomyController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEquipmentController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfEventController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfMasterController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPetNoteController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfPropertyController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCleanExcelBean.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCollectionExcelBean.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfContactExcelBean.java 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEconomyExcelBean.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEquipmentExcelBean.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEventExcelBean.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfPropertyExcelBean.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZfMasterService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZfPetService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfMasterServiceImpl.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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,"保洁收纳记录数据");
    }
    /**
     * 导出保洁收纳记录列表
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,"收藏荣誉记录数据");
    }
    /**
     * 导出收藏和荣誉记录列表
     */
//    @PreAuthorize("@ss.hasPermi('system:property:export')")
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,"通讯录数据");
    }
    /**
     * 导出通讯录记录列表
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);
    }
    /**
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')")
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,"家庭设备记录数据");
    }
    /**
     * 导出家庭设备记录列表
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();
    }
    /**
     * 导入家庭大事件记录列表
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);
    }
    /**
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);
    }
    /**
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);
    }
    /**
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')")
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;
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;
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;
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;
}
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;
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;
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;
}
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;
}
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCleanExcelBean.java
New file
@@ -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;
}
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfCollectionExcelBean.java
New file
@@ -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;
}
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfContactExcelBean.java
New file
@@ -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;
}
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEconomyExcelBean.java
New file
@@ -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;
}
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEquipmentExcelBean.java
New file
@@ -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;
}
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfEventExcelBean.java
New file
@@ -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;
}
zhang-content/src/main/java/com/ruoyi/domain/excel/ZfPropertyExcelBean.java
New file
@@ -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=正常,1=已注销")
    private Integer status;
    /**
     * 发生时间
     */
    @Excel(name = "时间", dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date happenTime;
}
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);
}
zhang-content/src/main/java/com/ruoyi/service/ZfMasterService.java
@@ -21,4 +21,5 @@
    List<ZfMaster> selectByCondition(ZfMaster zfMaster);
    AjaxResult mySave(ZfMaster zfMaster);
}
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);
}
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);
}
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
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) {
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
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
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());
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) {
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) {
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 {
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());
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;
    }
}
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());