888
Jinquan_Ou
2023-04-21 923af8f8eb0d849b92afa8b567036aae2837f202
888
6个文件已修改
116 ■■■■ 已修改文件
zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfEvent.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfProperty.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java
@@ -32,13 +32,6 @@
    private Integer id;
    /**
     * 获得时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd")
    private Date getTime;
    /**
     * 类别
     */
    @Excel(name = "类别")
@@ -88,7 +81,7 @@
    /**
     * 所属家庭id
     */
    @Excel(name = "所属家庭编号")
    @Excel(name = "所属家庭编号(导入数据时请删除此栏)")
    private String familyId;
    /**
@@ -97,5 +90,30 @@
    @TableField(exist = false)
    private Integer ownData = 0;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;
    /**
     * 开始时间
     */
    @TableField(exist = false)
    private Date happenStartTime;
    /**
     * 结束时间
     */
    @TableField(exist = false)
    private Date happenEndTime;
    /**
     * 获得时间
     */
    @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/ZfEvent.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;
@@ -34,7 +35,6 @@
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd")
    private Date createTime;
    /**
@@ -63,7 +63,27 @@
    private String url;
    @Excel(name="家庭编号")
    @Excel(name="所属家庭编号(导入数据时请删除此栏)")
    private String familyId;
    /**
     * 开始时间
     */
    @TableField(exist = false)
    private Date happenStartTime;
    /**
     * 结束时间
     */
    @TableField(exist = false)
    private Date happenEndTime;
    /**
     * 发生时间
     */
    @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/ZfProperty.java
@@ -57,15 +57,21 @@
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd")
    private Date createTime;
    /**
     * 发生时间
     */
    @Excel(name = "发生时间", dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date happenTime;
    private String url;
    /**
     * 家庭id
     */
    @Excel(name = "所属家庭编号")
    @Excel(name = "所属家庭编号(导入数据时请删除此栏)")
    private String familyId;
    /**
@@ -74,8 +80,22 @@
    @TableField(exist = false)
    private Integer ownData = 0;
    /**
     * 数据状态
     */
    @Excel(name = "是否注销",readConverterExp = "0=正常,1=已注销")
    private Integer status;
    /**
     * 开始时间
     */
    @TableField(exist = false)
    private Date happenStartTime;
    /**
     * 结束时间
     */
    @TableField(exist = false)
    private Date happenEndTime;
}
zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
@@ -22,6 +22,9 @@
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
@@ -38,14 +41,26 @@
@Service
public class IZfPropertyServiceImpl extends ServiceImpl<ZfPropertyMapper, ZfProperty> implements IZfPropertyService {
    @Resource
    IZfPropertyService zfPropertyService;
    @Resource
    ZInfoUserService zInfoUserService;
//    private Date getHappenTime(ZfProperty zfProperty) {
//        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
//        String happenTimeStr = format.format(zfProperty.getHappenTime());
//
//        Date happenTime = null;
//        try {
//            happenTime = format.parse(happenTimeStr);
//            System.out.println("方法里的:" + happenTime);
//        } catch (ParseException e) {
//            throw new RuntimeException("时间格式转换有误");
//        }
//        return happenTime;
//    }
    private LambdaQueryWrapper<ZfProperty> buildCondition(ZfProperty zfProperty) {
@@ -57,7 +72,8 @@
                .like(!StringUtils.isEmpty(zfProperty.getHolder()), ZfProperty::getHolder, zfProperty.getHolder())
                .like(!StringUtils.isEmpty(zfProperty.getAddress()), ZfProperty::getAddress, zfProperty.getAddress())
                .like(!StringUtils.isEmpty(zfProperty.getRemark()), ZfProperty::getRemark, zfProperty.getRemark())
                .like(zfProperty.getCreateTime() != null, ZfProperty::getCreateTime, zfProperty.getCreateTime());
                .eq(zfProperty.getHappenTime()!=null,ZfProperty::getHappenTime,zfProperty.getHappenTime())
                .between(zfProperty.getHappenStartTime() != null && zfProperty.getHappenEndTime() != null, ZfProperty::getHappenTime, zfProperty.getHappenStartTime(), zfProperty.getHappenEndTime());
        return lqw;
    }
@@ -140,7 +156,7 @@
        }
        lqw.orderByDesc(ZfProperty::getId);
        lqw.orderByDesc(ZfProperty::getCreateTime);
        return lqw;
    }
@@ -283,7 +299,6 @@
            return AjaxResult.error();
        }
    }
    @Override
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
@@ -13,6 +13,7 @@
import com.ruoyi.domain.ZInfoUser;
import com.ruoyi.domain.ZfCollection;
import com.ruoyi.domain.ZfCollection;
import com.ruoyi.domain.ZfCollection;
import com.ruoyi.mapper.ZfCollectionMapper;
import com.ruoyi.service.ZInfoUserService;
import com.ruoyi.service.ZfCollectionService;
@@ -56,7 +57,8 @@
        lqw.like(StringUtils.isNotEmpty(zfCollection.getPrice()),ZfCollection::getPrice,zfCollection.getPrice());
        lqw.like(StringUtils.isNotEmpty(zfCollection.getLocation()),ZfCollection::getLocation,zfCollection.getLocation());
        lqw.like(StringUtils.isNotEmpty(zfCollection.getRemark()),ZfCollection::getRemark,zfCollection.getRemark());
        lqw.like(zfCollection.getGetTime()!=null,ZfCollection::getGetTime,zfCollection.getGetTime());
        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;
    }
@@ -139,7 +141,7 @@
        }
        lqw.orderByDesc(ZfCollection::getId);
        lqw.orderByDesc(ZfCollection::getCreateTime);
        return lqw;
    }
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
@@ -123,7 +123,8 @@
        lqw.like(!StringUtils.isEmpty(zfEvent.getPeople()),ZfEvent::getPeople,zfEvent.getPeople());
        lqw.like(!StringUtils.isEmpty(zfEvent.getTitle()),ZfEvent::getTitle,zfEvent.getTitle());
        lqw.like(!StringUtils.isEmpty(zfEvent.getRemark()),ZfEvent::getRemark,zfEvent.getRemark());
        lqw.like(zfEvent.getCreateTime()!=null,ZfEvent::getCreateTime,zfEvent.getCreateTime());
        lqw.eq(zfEvent.getHappenTime() != null, ZfEvent::getHappenTime, zfEvent.getHappenTime());
        lqw.between(zfEvent.getHappenStartTime() != null && zfEvent.getHappenEndTime() != null, ZfEvent::getHappenTime, zfEvent.getHappenStartTime(), zfEvent.getHappenEndTime());
        return lqw;
    }