|
|
@ -457,4 +457,26 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPart |
|
|
|
map.put("namePath", StringUtils.join(names.toArray(),StrConstant.HYPHEN)); |
|
|
|
return map; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 调整历史数据 ORG_PIDS |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void adjustOrgPath(List<String> customerIds) { |
|
|
|
LambdaQueryWrapper<IcPartyOrgEntity> queryWrapper=new LambdaQueryWrapper<>(); |
|
|
|
queryWrapper.in(org.apache.commons.collections4.CollectionUtils.isNotEmpty(customerIds),IcPartyOrgEntity::getCustomerId,customerIds); |
|
|
|
List<IcPartyOrgEntity> list=baseDao.selectList(queryWrapper); |
|
|
|
int num=1; |
|
|
|
for(IcPartyOrgEntity entity:list){ |
|
|
|
List<String> pids=new ArrayList<>(); |
|
|
|
List<String> names=new ArrayList<>(); |
|
|
|
Map<String,String> map=getPartyOrgIdPath(pids,names,entity.getOrgPid()); |
|
|
|
String partyOrgIdPath = map.containsKey("idPath") ? map.get("idPath") : StrConstant.EPMETY_STR; |
|
|
|
String partyOrgNamePath = map.containsKey("namePath") ? map.get("namePath") : StrConstant.EPMETY_STR; |
|
|
|
log.info(num+":::"+entity.getId()+entity.getPartyOrgName()+";path="+partyOrgIdPath+";"+partyOrgNamePath); |
|
|
|
entity.setOrgPids(partyOrgIdPath); |
|
|
|
baseDao.updateById(entity); |
|
|
|
num++; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|