|
|
|
|
@ -49,6 +49,15 @@ public class DataPetition12337Service extends ServiceImpl<DataPetition12337Mappe
|
|
|
|
|
.eq(StrUtil.isNotBlank(queryParam.getCheckStatus()), DataPetition12337::getIsReal, queryParam.getCheckStatus()) |
|
|
|
|
// 按创建时间倒序排序
|
|
|
|
|
.orderByDesc(DataPetition12337::getDiscoverTime); |
|
|
|
|
if(queryParam.getDepartId()!=null){ |
|
|
|
|
SupDepart byId = departService.getById(queryParam.getDepartId()); |
|
|
|
|
if (byId.getLevel()==2){ |
|
|
|
|
queryWrapper.eq(DataPetition12337::getSecondDepartId, queryParam.getDepartId()); |
|
|
|
|
} |
|
|
|
|
if (byId.getLevel()==3){ |
|
|
|
|
queryWrapper.eq(DataPetition12337::getThirdDepartId, queryParam.getDepartId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 如果 discoveryTime 有两个值(表示时间范围),则添加范围查询条件
|
|
|
|
|
if (queryParam.getDiscoveryTime().size() == 2) { |
|
|
|
|
queryWrapper.between(DataPetition12337::getDiscoverTime, queryParam.getDiscoveryTime().get(0), queryParam.getDiscoveryTime().get(1)); |
|
|
|
|
|