| | |
| | | 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.*; |
| | |
| | | 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; |
| | |
| | | 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,"保洁收纳记录数据"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出保洁收纳记录列表 |
| | |
| | | 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; |
| | |
| | | |
| | | 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; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取导入模板 |
| | | */ |
| | | @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')") |
| | |
| | | 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.*; |
| | |
| | | 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; |
| | |
| | | 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,"通讯录数据"); |
| | | } |
| | | |
| | | /** |
| | | * 导出通讯录记录列表 |
| | |
| | | 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.*; |
| | |
| | | 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; |
| | |
| | | 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,"小医生记录数据"); |
| | | } |
| | | |
| | | |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ZfDoctor zfDoctor) |
| | | { |
| | | return toAjax(zfDoctorService.save(zfDoctor)); |
| | | return zfDoctorService.mySave(zfDoctor); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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; |
| | |
| | | |
| | | 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; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取导入模板 |
| | | */ |
| | | @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')") |
| | |
| | | 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; |
| | |
| | | |
| | | 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; |
| | |
| | | |
| | | @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,"家庭设备记录数据"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出家庭设备记录列表 |
| | |
| | | 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.*; |
| | |
| | | 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; |
| | |
| | | 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,"家大事记记录数据"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出家庭大事件记录列表 |
| | |
| | | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(); |
| | | } |
| | | |
| | | /** |
| | | * 导入家庭大事件记录列表 |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ZfMaster zfMaster) |
| | | { |
| | | return toAjax(zfMasterService.save(zfMaster)); |
| | | return zfMasterService.mySave(zfMaster); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ZfPet zfPet) |
| | | { |
| | | return toAjax(zfPetService.save(zfPet)); |
| | | return zfPetService.mySave(zfPet); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ZfPetNote zfPetNote) |
| | | { |
| | | return toAjax(zfPetNoteService.save(zfPetNote)); |
| | | return zfPetNoteService.mySave(zfPetNote); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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; |
| | |
| | | |
| | | 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; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取导入模板 |
| | | */ |
| | | @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')") |
| | |
| | | /** |
| | | * 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; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 发生时间 |
| | | */ |
| | | @Excel(name = "发生时间", dateFormat = "yyyy-MM-dd") |
| | | // @Excel(name = "记录时间", dateFormat = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private Date happenTime; |
| | | |
| | |
| | | /** |
| | | * 获得时间 |
| | | */ |
| | | @Excel(name = "发生时间", dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = "获得时间", dateFormat = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private Date happenTime; |
| | | |
| | |
| | | /** |
| | | * 发生时间 |
| | | */ |
| | | @Excel(name = "发生时间", dateFormat = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private Date happenTime; |
| | | |
| | |
| | | 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> |
| | |
| | | /** |
| | | * 中医 |
| | | */ |
| | | @Excel(name = "中医") |
| | | @Excel(name = "中医处方") |
| | | private String cmedical; |
| | | |
| | | /** |
| | | * 西医 |
| | | */ |
| | | @Excel(name = "西医") |
| | | @Excel(name = "西医处方") |
| | | private String wmedical; |
| | | |
| | | /** |
| | |
| | | |
| | | private String url; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createTime; |
| | | |
| | | } |
| | |
| | | /** |
| | | * 发生时间 |
| | | */ |
| | | @Excel(name = "发生时间", dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = "时间", dateFormat = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private Date happenTime; |
| | | |
| | |
| | | /** |
| | | * 记录时间 |
| | | */ |
| | | @Excel(name = "记录时间", dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = "时间", dateFormat = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private Date happenTime; |
| | | |
| | |
| | | |
| | | private String url; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createTime; |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | * 记录时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "记录时间", dateFormat = "yyyy-MM-dd") |
| | | private Date createTime; |
| | | @Excel(name = "日期", dateFormat = "yyyy-MM-dd") |
| | | private Date happenTime; |
| | | |
| | | /** |
| | | * 题名 |
| | |
| | | private Date remindTime; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Excel(name = "备注") |
| | |
| | | |
| | | 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; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
| | |
| | | AjaxResult selectDoctorList(ZfDoctor zfDoctor, Integer pageNum, Integer pageSize); |
| | | |
| | | List<ZfDoctor> selectByCondition(ZfDoctor zfDoctor); |
| | | |
| | | AjaxResult mySave(ZfDoctor zfDoctor); |
| | | |
| | | } |
| | |
| | | |
| | | List<ZfMaster> selectByCondition(ZfMaster zfMaster); |
| | | |
| | | AjaxResult mySave(ZfMaster zfMaster); |
| | | } |
| | |
| | | List<ZfPetNote> selectByCondition(ZfPetNote zfPetNote); |
| | | |
| | | AjaxResult getAllPetNoteByPetId(Long pid); |
| | | |
| | | AjaxResult mySave(ZfPetNote zfPetNote); |
| | | } |
| | |
| | | AjaxResult selectPetList(ZfPet zfPet, Integer pageNum, Integer pageSize); |
| | | |
| | | List<ZfPet> selectByCondition(ZfPet zfPet); |
| | | |
| | | AjaxResult mySave(ZfPet zfPet); |
| | | } |
| | |
| | | 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; |
| | |
| | | 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 { |
| | |
| | | } |
| | | } |
| | | |
| | | 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 |
| | |
| | | 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; |
| | |
| | | .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; |
| | | } |
| | | |
| | |
| | | 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 { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public AjaxResult importExcel(MultipartFile file) { |
| | |
| | | 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; |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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 { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public AjaxResult importExcel(MultipartFile file) { |
| | |
| | | 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 { |
| | |
| | | } |
| | | } |
| | | |
| | | 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 |
| | |
| | | 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; |
| | |
| | | @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); |
| | |
| | | @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()); |
| | |
| | | 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; |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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 { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public AjaxResult importExcel(MultipartFile file) { |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | |
| | | //------------------------------------------------------------------------------------------ |
| | |
| | | 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 { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public AjaxResult importExcel(MultipartFile file) { |
| | |
| | | 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); |
| | |
| | | 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 { |
| | |
| | | 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; |
| | |
| | | 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()); |
| | |
| | | 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; |
| | |
| | | @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); |
| | |
| | | @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; |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | @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); |
| | |
| | | @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()); |