whywhyo
2023-09-05 3f50e9e810b478dbbd3225d9e5cedf47f586b69b
45386
14个文件已修改
104 ■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZCertificateController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/domain/dto/Genealogy.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZCertificateService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZCertificateServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZInfoUserServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZCertificateController.java
@@ -43,6 +43,11 @@
        return AjaxResult.success(zCertificates);
    }
    @GetMapping("/type")
    public AjaxResult listType(){
        return zCertificateService.listType();
    }
    /**
     * 导出持有出入境证件情况记录列表
zhang-content/src/main/java/com/ruoyi/domain/dto/Genealogy.java
@@ -49,4 +49,7 @@
    @Excel(name = "是否是本家庭成员",readConverterExp = "0=否,1=是")
    private Integer isMyFamily;
    private Genealogy spouse;
}
zhang-content/src/main/java/com/ruoyi/service/ZCertificateService.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.ZCertificate;
import org.springframework.web.multipart.MultipartFile;
@@ -20,4 +21,7 @@
    List<ZCertificate> selectExperienceList(Long userId);
    boolean importExcel(MultipartFile file, Long userId);
    AjaxResult listType();
}
zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
@@ -277,7 +277,7 @@
                        bean.setOwnData(0);
                    }
                }
        ).collect(Collectors.toList());
        ).sorted((a,b)-> b.getOwnData()-a.getOwnData()).collect(Collectors.toList());
    }
    @Override
zhang-content/src/main/java/com/ruoyi/service/impl/ZCertificateServiceImpl.java
@@ -2,7 +2,9 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ZCertificate;
import com.ruoyi.domain.ZExperience;
@@ -12,6 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@@ -51,4 +54,17 @@
        return saveBatch(list);
    }
    @Override
    public AjaxResult listType() {
        List<ZCertificate> typeList = list(new QueryWrapper<ZCertificate>().select("distinct type"));
        ArrayList<String> types = new ArrayList<>();
        for (ZCertificate zCertificate : typeList) {
           types.add(zCertificate.getType());
        }
        return AjaxResult.success(types);
    }
}
zhang-content/src/main/java/com/ruoyi/service/impl/ZInfoUserServiceImpl.java
@@ -401,13 +401,23 @@
                    if (zInfoUser.getSpouseId() != null) {
                        ZInfoUser spouse = getById(zInfoUser.getSpouseId());
                        Genealogy spouseInfo = new Genealogy();
                        BeanUtils.copyProperties(spouse,spouseInfo);
                        newGenealogy.setSpouse(spouseInfo);
                        spouseInfo.setIdentity(newGenealogy.getIdentity());
                        spouseInfo.setSpouseName(zInfoUser.getNickName());
                        newGenealogy.setSpouseName(spouse.getNickName());
                    }
                    return newGenealogy;
                }
        ).collect(Collectors.toList());
        List<Genealogy> collect = allData.stream().distinct().sorted(Comparator.comparing(Genealogy::getIdentity)).collect(Collectors.toList());
        List<Genealogy> collect = allData.stream()
                .distinct()
                .filter((data)-> data.getIsMyFamily() == 1)
                .sorted(Comparator.comparing(Genealogy::getIdentity))
                .collect(Collectors.toList());
        List<Genealogy> resultData = new ArrayList<>();
        for (int i = (pageNum - 1) * pageSize; i < pageNum * pageSize + pageSize; i++) {
@@ -516,6 +526,11 @@
            BeanUtils.copyProperties(zInfoUser, genealogy);
            if (zInfoUser.getSpouseId() != null) {
                ZInfoUser spouse = getById(zInfoUser.getSpouseId());
                Genealogy spouseInfo = new Genealogy();
                BeanUtils.copyProperties(spouse,spouseInfo);
                spouseInfo.setIdentity(genealogy.getIdentity());
                spouseInfo.setSpouseName(zInfoUser.getNickName());
                genealogy.setSpouse(spouseInfo);
                genealogy.setSpouseName(spouse.getNickName());
            }
            result.add(genealogy);
@@ -541,7 +556,13 @@
            genealogy.setIdentity(params.get(i).getIdentity());
            if (zInfoUsers.get(i).getSpouseId() != null) {
                ZInfoUser spouse = getById(zInfoUsers.get(i).getSpouseId());
                Genealogy spouseInfo = new Genealogy();
                BeanUtils.copyProperties(spouse,spouseInfo);
                spouseInfo.setIdentity(genealogy.getIdentity());
                genealogy.setSpouseName(spouse.getNickName());
                spouseInfo.setSpouseName(zInfoUsers.get(i).getNickName());
                genealogy.setSpouse(spouseInfo);
            }
            result.add(genealogy);
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
@@ -267,7 +267,7 @@
                        bean.setOwnData(0);
                    }
                }
        ).collect(Collectors.toList());
        ).sorted((a,b)-> b.getOwnData()-a.getOwnData()).collect(Collectors.toList());
    }
    @Override
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
@@ -1,9 +1,11 @@
package com.ruoyi.service.impl;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.core.JsonParser;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.MapUtils;
@@ -24,10 +26,7 @@
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
import static com.ruoyi.constant.MenuAuthority.*;
@@ -268,7 +267,7 @@
                        bean.setOwnData(0);
                    }
                }
        ).collect(Collectors.toList());
        ).sorted((a,b)-> b.getOwnData()-a.getOwnData()).collect(Collectors.toList());
    }
    @Override
@@ -402,7 +401,30 @@
            throw new RuntimeException("你没有权限操作此家庭的数据");
        }
        //先记录下谁更新、何时更新、更新了哪里
        LambdaQueryWrapper<ZfCollection> lqw = new LambdaQueryWrapper<>();
        lqw.eq(ZfCollection::getId,zfCollection.getId());
        zfCollectionService.getOne(lqw);
        ZfCollection oldData = getOne(lqw);
        String oldJson = JSONObject.toJSONString(oldData);
        String newJson = JSONObject.toJSONString(zfCollection);
        Map oldMap = JSONObject.parseObject(oldJson, Map.class);
        Map newMap = JSONObject.parseObject(newJson, Map.class);
        for (Object key : oldMap.keySet()) {
            if(newMap.get(key)!=null && !newMap.get(key).equals(oldMap.get(key))){
                System.out.println(newMap.get(key)+"     "+oldMap.get(key));
                Date date = new Date();
                System.out.println("用户"+myself.getNickName()+"在"+date+"这个时间"+"修改了<收藏荣誉>模块的"+key+"字段");
            }
        }
        if(updateById(zfCollection)){
            return AjaxResult.success();
        }else {
            return AjaxResult.error();
zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java
@@ -253,7 +253,7 @@
                        bean.setOwnData(0);
                    }
                }
        ).collect(Collectors.toList());
        ).sorted((a,b)-> b.getOwnData()-a.getOwnData()).collect(Collectors.toList());
    }
    @Override
zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
@@ -117,7 +117,7 @@
                        bean.setOwnData(0);
                    }
                }
        ).collect(Collectors.toList());
        ).sorted((a,b)-> b.getOwnData()-a.getOwnData()).collect(Collectors.toList());
    }
    @Override
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
@@ -307,7 +307,7 @@
                        bean.setOwnData(0);
                    }
                }
        ).collect(Collectors.toList());
        ).sorted((a,b)-> b.getOwnData()-a.getOwnData()).collect(Collectors.toList());
    }
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
@@ -260,7 +260,7 @@
                        bean.setOwnData(0);
                    }
                }
        ).collect(Collectors.toList());
        ).sorted((a,b)-> b.getOwnData()-a.getOwnData()).collect(Collectors.toList());
    }
    @Override
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
@@ -24,10 +24,7 @@
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
import static com.ruoyi.constant.MenuAuthority.*;
@@ -236,7 +233,7 @@
                        bean.setOwnData(0);
                    }
                }
        ).collect(Collectors.toList());
        ).sorted((a,b)-> b.getOwnData()-a.getOwnData()).collect(Collectors.toList());
    }
//    private static List<ZfEvent> markOwnData(String familyIds, List<ZfEvent> beanRecords) {
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
@@ -98,7 +98,7 @@
                        bean.setOwnData(0);
                    }
                }
        ).collect(Collectors.toList());
        ).sorted((a,b)-> b.getOwnData()-a.getOwnData()).collect(Collectors.toList());
    }