|
|
@@ -107,6 +107,7 @@ public class MztbController { |
|
|
|
List<UserStatu> addUserStatuList = new ArrayList<>(); |
|
|
|
Set<String> orgCodeMap = new HashSet<>(); |
|
|
|
for (Map<String, Object> orgInfo : paramData) { |
|
|
|
orgInfo.remove("pt_id"); //不要民政端的主键 |
|
|
|
SwMap data = new SwMap(); |
|
|
|
data.putAll(orgInfo); |
|
|
|
String orgCode = data.readString("pi_credit_code"); |
|
|
@@ -120,7 +121,7 @@ public class MztbController { |
|
|
|
//新增或同步机构数据 |
|
|
|
PartyInfo partyInfo = new PartyInfo(); |
|
|
|
partyInfo.init(); |
|
|
|
partyInfo.getData().putAll(orgInfo); |
|
|
|
|
|
|
|
if(tbPartyInfoMapByCode.containsKey(orgCode)){ |
|
|
|
//机构已存在,只更新数据 |
|
|
|
partyInfo.setId(tbPartyInfoMapByCode.get(orgCode).getId()); |
|
|
@@ -130,7 +131,7 @@ public class MztbController { |
|
|
|
partyInfo.setId(DbEngine.getInstance().nextId()); |
|
|
|
addPartyInfoList.add(partyInfo); |
|
|
|
} |
|
|
|
|
|
|
|
partyInfo.getData().putAll(orgInfo); |
|
|
|
//判断系统机构是否存在 ,不存在 则新增 |
|
|
|
Party party = PartyCache.getInstance().getByCode(orgCode); |
|
|
|
if (party == null) { |
|
|
@@ -144,7 +145,6 @@ public class MztbController { |
|
|
|
addPartyList.add(party); |
|
|
|
addPartyIdSet.add(String.valueOf(party.getId())); |
|
|
|
} |
|
|
|
partyInfo.setSysPartyId(party.getId()); |
|
|
|
//添加系统用户 |
|
|
|
User user = UserCache.getInstance().getByCode(partyInfo.getCreditCode()); |
|
|
|
if(user == null){ |
|
|
|