|
@ -488,6 +488,9 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp |
|
|
String natResult = e.getNatResult(); |
|
|
String natResult = e.getNatResult(); |
|
|
String natAddress = e.getNatAddress(); |
|
|
String natAddress = e.getNatAddress(); |
|
|
|
|
|
|
|
|
|
|
|
// 居民信息
|
|
|
|
|
|
IcResiUserEntity resi = getResi(customerId, idCard, null); |
|
|
|
|
|
|
|
|
//1.先看客户下有没有这个人
|
|
|
//1.先看客户下有没有这个人
|
|
|
IcNatEntity resiNat = getResiNat(customerId, idCard, natTime); |
|
|
IcNatEntity resiNat = getResiNat(customerId, idCard, natTime); |
|
|
if (resiNat != null && !"import".equals(resiNat.getUserType())) { |
|
|
if (resiNat != null && !"import".equals(resiNat.getUserType())) { |
|
@ -547,7 +550,6 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp |
|
|
resiNat.setUpdatedBy(currentUserId); |
|
|
resiNat.setUpdatedBy(currentUserId); |
|
|
resiNat.setUpdatedTime(new Date()); |
|
|
resiNat.setUpdatedTime(new Date()); |
|
|
|
|
|
|
|
|
IcResiUserEntity resi = getResi(customerId, idCard, null); |
|
|
|
|
|
resiNat.setIsResiUser(resi != null ? "1" : "0"); |
|
|
resiNat.setIsResiUser(resi != null ? "1" : "0"); |
|
|
resiNat.setUserId(resi != null ? resi.getId() : ""); |
|
|
resiNat.setUserId(resi != null ? resi.getId() : ""); |
|
|
|
|
|
|
|
@ -555,15 +557,14 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 还要创建关系。只有本辖区及下级居民,才建立关系
|
|
|
// 还要创建关系。只有本辖区及下级居民,才建立关系
|
|
|
if (getResi(customerId, idCard, String.join(":", Arrays.asList(agencyPids, agencyId))) != null) { |
|
|
if (resi != null) { |
|
|
createNatRelation(resiNat.getId(), listener.getCurrentAgencyId(), listener.getCurrentAgencyPids()); |
|
|
createNatRelation(resiNat.getId(), resi.getAgencyId(), resi.getPids()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 执行新增操作
|
|
|
// 执行新增操作
|
|
|
IcResiUserEntity resi = getResi(customerId, idCard, null); |
|
|
|
|
|
e.setIsResiUser(resi != null ? "1" : "0"); |
|
|
e.setIsResiUser(resi != null ? "1" : "0"); |
|
|
e.setUserId(resi != null ? resi.getId() : ""); |
|
|
e.setUserId(resi != null ? resi.getId() : ""); |
|
|
e.setUserType("import"); |
|
|
e.setUserType("import"); |
|
@ -571,8 +572,8 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp |
|
|
baseDao.insert(e); |
|
|
baseDao.insert(e); |
|
|
|
|
|
|
|
|
// 还要创建关系。只有本辖区及下级居民,才建立关系
|
|
|
// 还要创建关系。只有本辖区及下级居民,才建立关系
|
|
|
if (getResi(customerId, idCard, String.join(":", Arrays.asList(agencyPids, agencyId))) != null) { |
|
|
if (resi != null) { |
|
|
createNatRelation(e.getId(), listener.getCurrentAgencyId(), listener.getCurrentAgencyPids()); |
|
|
createNatRelation(e.getId(), resi.getAgencyId(), resi.getPids()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|