通讯录查询修改
parent
ac60358c11
commit
6c0303beb8
|
|
@ -10,6 +10,7 @@ import com.whdc.model.vo.AdcdTree;
|
||||||
import com.whdc.service.IAdinfoService;
|
import com.whdc.service.IAdinfoService;
|
||||||
import com.whdc.service.IOrganizationService;
|
import com.whdc.service.IOrganizationService;
|
||||||
import com.whdc.service.IUnitDictService;
|
import com.whdc.service.IUnitDictService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
@ -25,6 +26,7 @@ import java.util.stream.Collectors;
|
||||||
* @date 2024-05-11
|
* @date 2024-05-11
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Organization> implements IOrganizationService {
|
public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Organization> implements IOrganizationService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -50,14 +52,14 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||||
|
|
||||||
List<UnitDict> list = unitDictService.findByUserId(userId);
|
List<UnitDict> list = unitDictService.findByUserId(userId);
|
||||||
|
|
||||||
List<AdcdTree> tree = adinfoService.tree(null, null);
|
|
||||||
Map<Integer, List<UnitDict>> collect = list.stream().collect(Collectors.groupingBy(UnitDict::getOId));
|
Map<Integer, List<UnitDict>> collect = list.stream().collect(Collectors.groupingBy(UnitDict::getOId));
|
||||||
organizations.forEach(organization -> {
|
organizations.forEach(organization -> {
|
||||||
List<UnitDict> unitDicts = collect.get(organization.getId());
|
List<UnitDict> unitDicts = collect.get(organization.getId());
|
||||||
organization.setUnitDicts(unitDicts);
|
organization.setUnitDicts(unitDicts);
|
||||||
String name = organization.getName();
|
String name = organization.getName();
|
||||||
if (name.contains("市") && name.contains("县")){
|
if (name.contains("市") && name.contains("县")){
|
||||||
organization.setAdinfoList(tree);
|
organization.setAdinfoList(adinfoService.tree(null, null));
|
||||||
|
log.info("Organization:" + organization.getAdinfoList());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue