|
|
@ -40,10 +40,8 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
import com.epmet.commons.tools.utils.HttpContextUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.constant.IcPlatformConstant; |
|
|
|
import com.epmet.constant.IcResiUserConstant; |
|
|
@ -73,7 +71,6 @@ import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.RoundingMode; |
|
|
|
import java.sql.Date; |
|
|
@ -988,7 +985,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception ex) { |
|
|
|
log.warn("listRemoteOptions url:{}", e.getOptionSourceValue()); |
|
|
|
log.error("listRemoteOptions url:{}", e.getOptionSourceValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -1186,8 +1183,19 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
if (CollectionUtils.isEmpty(configListResult.getData())){ |
|
|
|
return result; |
|
|
|
} |
|
|
|
List<CustomerCategoryShowAndWarnListResultDTO> configList = configListResult.getData(); |
|
|
|
PageInfo<Map<String, Object>> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectResiUsers(configList.stream().map(m -> m.getColumnName()).collect(Collectors.toList()), staffInfo.getAgencyId())); |
|
|
|
List<CustomerCategoryShowAndWarnListResultDTO> configListOrigin = configListResult.getData(); |
|
|
|
List<CustomerCategoryShowAndWarnListResultDTO> configList = new ArrayList<>(); |
|
|
|
if (StringUtils.isNotBlank(formDTO.getCategoryCode())){ |
|
|
|
for (CustomerCategoryShowAndWarnListResultDTO c : configListOrigin) { |
|
|
|
if (c.getColumnName().equals(formDTO.getCategoryCode())){ |
|
|
|
configList.add(c); |
|
|
|
} |
|
|
|
} |
|
|
|
}else { |
|
|
|
configList = configListOrigin; |
|
|
|
} |
|
|
|
List<CustomerCategoryShowAndWarnListResultDTO> finalConfigList = configList; |
|
|
|
PageInfo<Map<String, Object>> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectResiUsers(finalConfigList.stream().map(m -> m.getColumnName()).collect(Collectors.toList()), staffInfo.getAgencyId())); |
|
|
|
List<Map<String, Object>> list = pageInfo.getList(); |
|
|
|
if (CollectionUtils.isEmpty(list)) { |
|
|
|
return result; |
|
|
@ -1200,7 +1208,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
} |
|
|
|
List<HouseInfoDTO> houseInfos = houseInfosResult.getData(); |
|
|
|
userList.forEach(u -> houseInfos.stream().filter(h -> h.getHomeId().equals(u.getHomeId())).forEach(h -> u.setFamily(h.getAllName()))); |
|
|
|
result.setList(userList); |
|
|
|
// 类型+网格+家庭 排序
|
|
|
|
userList.forEach(u -> { |
|
|
|
String types = u.getType().stream().map(String::valueOf).collect(Collectors.joining("、")); |
|
|
|
String s = types + u.getGridName() + u.getFamily(); |
|
|
|
u.setSortString(s); |
|
|
|
}); |
|
|
|
List<PersonWarnRightListResultDTO.PersonWarnRightList> finalResult = userList.stream().sorted(Comparator.comparing(PersonWarnRightListResultDTO.PersonWarnRightList::getSortString)).collect(Collectors.toList()); |
|
|
|
result.setList(finalResult); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|