From d31920a1233ab14cdd5e33756bb1b0e3ed235e66 Mon Sep 17 00:00:00 2001
From: 1098226878 <1098226878@qq.com>
Date: 星期三, 08 九月 2021 12:39:48 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

---
 service-job/src/main/java/com/java110/job/adapt/hcToTianchuang/PersonToTianchuangAdapt.java |  364 +++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 329 insertions(+), 35 deletions(-)

diff --git a/service-job/src/main/java/com/java110/job/adapt/hcToTianchuang/PersonToTianchuangAdapt.java b/service-job/src/main/java/com/java110/job/adapt/hcToTianchuang/PersonToTianchuangAdapt.java
index a9a104f..4b7b805 100644
--- a/service-job/src/main/java/com/java110/job/adapt/hcToTianchuang/PersonToTianchuangAdapt.java
+++ b/service-job/src/main/java/com/java110/job/adapt/hcToTianchuang/PersonToTianchuangAdapt.java
@@ -17,34 +17,50 @@
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.java110.dto.UnitDto;
+import com.java110.core.client.RestTemplate;
+import com.java110.core.factory.AuthenticationFactory;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.RoomAttrDto;
+import com.java110.dto.RoomDto;
 import com.java110.dto.businessDatabus.CustomBusinessDatabusDto;
 import com.java110.dto.community.CommunityAttrDto;
 import com.java110.dto.community.CommunityDto;
-import com.java110.dto.communityLocationAttr.CommunityLocationAttrDto;
 import com.java110.dto.file.FileRelDto;
+import com.java110.dto.machine.MachineAttrDto;
 import com.java110.dto.machine.MachineDto;
+import com.java110.dto.owner.OwnerAttrDto;
+import com.java110.dto.owner.OwnerDto;
+import com.java110.dto.owner.OwnerRoomRelDto;
 import com.java110.entity.order.Business;
 import com.java110.intf.common.IFileRelInnerServiceSMO;
+import com.java110.intf.common.IMachineAttrInnerServiceSMO;
 import com.java110.intf.common.IMachineInnerServiceSMO;
 import com.java110.intf.community.ICommunityInnerServiceSMO;
 import com.java110.intf.community.ICommunityLocationAttrInnerServiceSMO;
-import com.java110.intf.community.IUnitInnerServiceSMO;
+import com.java110.intf.community.IRoomInnerServiceSMO;
+import com.java110.intf.user.IOwnerAttrInnerServiceSMO;
+import com.java110.intf.user.IOwnerInnerServiceSMO;
+import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO;
 import com.java110.job.adapt.DatabusAdaptImpl;
-import com.java110.job.adapt.hcGov.HcGovConstant;
 import com.java110.job.adapt.hcGov.asyn.BaseHcGovSendAsyn;
-import com.java110.po.floor.FloorPo;
+import com.java110.po.community.CommunityAttrPo;
+import com.java110.po.machine.MachineAttrPo;
 import com.java110.po.machine.MachineRecordPo;
+import com.java110.po.owner.OwnerAttrPo;
 import com.java110.utils.cache.MappingCache;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.utils.util.StringUtil;
+import com.java110.utils.util.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
 
 /**
+ * databus 鐩戝惉涓氬姟绫诲瀷 990000060001
  * 寮�闂ㄨ褰曚俊鎭� 鍚屾澶╃獥鎺ュ彛
  * <p>
  * 鎺ュ彛鍗忚鍦板潃锛� https://gitee.com/java110/microCommunityInformation/tree/master/info-doc#1%E6%A5%BC%E6%A0%8B%E4%B8%8A%E4%BC%A0
@@ -54,8 +70,10 @@
 @Component(value = "personToTianchuangAdapt")
 public class PersonToTianchuangAdapt extends DatabusAdaptImpl {
 
+    private static Logger logger = LoggerFactory.getLogger(PersonToTianchuangAdapt.class);
     @Autowired
     private ICommunityInnerServiceSMO communityInnerServiceSMOImpl;
+
 
     @Autowired
     private BaseHcGovSendAsyn baseHcGovSendAsynImpl;
@@ -64,10 +82,29 @@
     private IMachineInnerServiceSMO machineInnerServiceSMOImpl;
 
     @Autowired
+    private IMachineAttrInnerServiceSMO machineAttrInnerServiceSMOImpl;
+
+    @Autowired
     private ICommunityLocationAttrInnerServiceSMO communityLocationAttrInnerServiceSMOImpl;
 
     @Autowired
     private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl;
+
+    @Autowired
+    private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl;
+
+    @Autowired
+    private IOwnerAttrInnerServiceSMO ownerAttrInnerServiceSMOImpl;
+
+    @Autowired
+    private IOwnerRoomRelInnerServiceSMO ownerRoomRelInnerServiceSMOImpl;
+
+    @Autowired
+    private IRoomInnerServiceSMO roomInnerServiceSMOImpl;
+
+    @Autowired
+    private RestTemplate outRestTemplate;
+
     /**
      * @param customBusinessDatabusDto 褰撳墠澶勭悊涓氬姟
      */
@@ -91,29 +128,78 @@
         String machineRecordId = machineRecordPo.getMachineRecordId();
 
         for (CommunityAttrDto communityAttrDto : tmpCommunityDto.getCommunityAttrDtos()) {
-            if (HcGovConstant.EXT_COMMUNITY_ID.equals(communityAttrDto.getSpecCd())) {
+            if (TianChuangConstant.EXT_TC_COMMUNITY_ID.equals(communityAttrDto.getSpecCd())) {
                 extCommunityId = communityAttrDto.getValue();
             }
         }
+        if (StringUtil.isEmpty(extCommunityId)) {
+            //浼犻�佸皬鍖轰俊鎭�
+            extCommunityId = sendCommunity(communityDtos.get(0));
+        }
 
-        //鏌ヨ璁惧瀵瑰簲鐨勪綅缃�
+        //鍒ゆ柇璁惧鏄惁 浼犲ぉ鍒�
         MachineDto machineDto = new MachineDto();
         machineDto.setCommunityId(communityId);
         machineDto.setMachineId(machineRecordPo.getMachineId());
         List<MachineDto> machineDtos = machineInnerServiceSMOImpl.queryMachines(machineDto);
-
         Assert.listOnlyOne(machineDtos, "涓嶅寘鍚� 璁惧淇℃伅");
+        String extMachineId = "";
+        for (MachineAttrDto machineAttrDto : machineDtos.get(0).getMachineAttrs()) {
+            if (TianChuangConstant.EXT_TC_MACHINE_ID.equals(machineAttrDto.getSpecCd())) {
+                extMachineId = machineAttrDto.getValue();
+            }
+        }
 
-        String locationId = machineDtos.get(0).getLocationTypeCd();
+        if (StringUtil.isEmpty(extMachineId)) {
+            //浼犻�侀棬绂佷俊鎭�
+            extMachineId = sendMachine(machineDtos.get(0), extCommunityId, tmpCommunityDto);
+        }
 
-        CommunityLocationAttrDto communityLocationAttrDto = new CommunityLocationAttrDto();
-        communityLocationAttrDto.setCommunityId(machineDtos.get(0).getCommunityId());
-        communityLocationAttrDto.setLocationId(locationId);
-        communityLocationAttrDto.setSpecCd(HcGovConstant.EXT_COMMUNITY_ID);
-        List<CommunityLocationAttrDto> communityLocationAttrDtos
-                = communityLocationAttrInnerServiceSMOImpl.queryCommunityLocationAttrs(communityLocationAttrDto);
+        //鍒ゆ柇浣忔埛鏄惁浼犲ぉ鍒�
+        String idCard = machineRecordPo.getIdCard();
 
-        Assert.listOnlyOne(communityLocationAttrDtos, "鏈壘鍒� 浣嶇疆澶栭儴ID");
+        //韬唤璇佷负绌烘椂 锛岄棬绂佽褰曟病娉曚紶 鎵�浠ュ氨涓嶄紶浜�
+        if (StringUtil.isEmpty(idCard)) {
+            return;
+        }
+        OwnerDto ownerDto = new OwnerDto();
+        ownerDto.setIdCard(idCard);
+        List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwnerMembers(ownerDto);
+
+        if (ownerDtos == null || ownerDtos.size() < 1) {
+            throw new IllegalArgumentException("涓氫富涓嶅瓨鍦�");
+        }
+
+        String extMemberId = "";
+        for (OwnerAttrDto ownerAttrDto : ownerDtos.get(0).getOwnerAttrDtos()) {
+            if (TianChuangConstant.EXT_TC_OWNER_ID.equals(ownerAttrDto.getSpecCd())) {
+                extMemberId = ownerAttrDto.getValue();
+            }
+        }
+
+        if (StringUtil.isEmpty(extMemberId)) {
+            //浼犻�侀棬绂佷俊鎭�
+            extMemberId = sendOwner(ownerDtos.get(0), extCommunityId, tmpCommunityDto);
+        }
+
+        // 閫佷汉鍛樿繘鍑鸿褰�
+        sendPersonInout(machineRecordPo, extCommunityId, machineDtos.get(0), ownerDtos.get(0));
+    }
+
+    private void sendPersonInout(MachineRecordPo machineRecordPo, String extCommunityId, MachineDto machineDto, OwnerDto ownerDto) {
+        JSONObject data = new JSONObject();
+        JSONArray datas = new JSONArray();
+        JSONObject dataObj = new JSONObject();
+        dataObj.put("lv_ssxqbm", extCommunityId);
+        dataObj.put("lv_gmsfhm", machineRecordPo.getIdCard());
+        dataObj.put("lv_crlb", "3306".equals(machineDto.getDirection()) ? "1" : "2");
+        dataObj.put("lv_zpsj", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_DEFAULT));
+        dataObj.put("lv_sbxt", "灏忓尯绠$悊绯荤粺");
+        dataObj.put("lv_mjxtwybm", machineDto.getMachineId());
+        dataObj.put("lv_ry_id", ownerDto.getMemberId());
+        dataObj.put("lv_ffms", "1");
+        dataObj.put("lv_kmfs", "1");
+        dataObj.put("lv_procmode", "PMINSERT");
 
         FileRelDto fileRelDto = new FileRelDto();
         fileRelDto.setRelTypeCd("60000");
@@ -126,25 +212,233 @@
             url = imgUrl + fileRelDtos.get(0).getFileRealName();
         }
 
-        JSONObject body = new JSONObject();
-        body.put("extLocationId", communityLocationAttrDtos.get(0).getValue());
-        body.put("name", machineRecordPo.getName());
-        body.put("openTypeCd", machineRecordPo.getOpenTypeCd());
-        body.put("tel", machineRecordPo.getTel());
-        body.put("idCard", machineRecordPo.getIdCard());
-        body.put("recordTypeCd", machineRecordPo.getRecordTypeCd());
-        body.put("faceUrl", url);
-        String state = "F";
-        if (StringUtil.isNumber(machineRecordPo.getSimilar())) {
-            double similar = Double.parseDouble(machineRecordPo.getSimilar());
-            if (similar > 0.5) {
-                state = "C";
+        dataObj.put("lv_zpzpa", ImageUtils.getBase64ByImgUrl(url));
+
+        datas.add(dataObj);
+
+        data.put("datas", datas);
+
+        JSONArray pages = new JSONArray();
+        JSONObject page = new JSONObject();
+        page.put("psize", "100");
+        page.put("tcount", "1");
+        page.put("pno", "1");
+        page.put("tsize", "");
+        pages.add(page);
+
+        data.put("pages", pages);
+
+        String dataStr = AuthenticationFactory.AesDecrypt(data.toJSONString(), TianChuangConstant.getAppSecret());
+
+        HttpEntity httpEntity = new HttpEntity(dataStr, GetTianChuangToken.getHeaders(TianChuangConstant.SERVICE_ID_PERSON_INOUT, dataStr));
+        ResponseEntity<String> responseEntity = outRestTemplate.exchange(TianChuangConstant.getUrl(), HttpMethod.POST, httpEntity, String.class);
+        logger.debug("璋冪敤HC IOT淇℃伅锛�" + responseEntity);
+        JSONObject paramOut = JSONObject.parseObject(AuthenticationFactory.AesEncrypt(responseEntity.getBody(), TianChuangConstant.getAppSecret()));
+
+        String code = paramOut.getJSONObject("sta").getString("cod");
+        if (!"0000".equals(code)) {
+            throw new IllegalArgumentException("鍚屾灏忓尯澶辫触锛�" + paramOut.toJSONString());
+        }
+    }
+
+    /**
+     * 浣忔埛淇℃伅涓婃姤
+     *
+     * @param ownerDto
+     * @param tmpCommunityDto
+     * @return
+     */
+    private String sendOwner(OwnerDto ownerDto, String extCommunityId, CommunityDto tmpCommunityDto) {
+        //鏌ヨ涓氫富鎴垮眿
+        OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto();
+        ownerRoomRelDto.setOwnerId(ownerDto.getOwnerId());
+        List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
+        //
+        if (ownerRoomRelDtos == null || ownerRoomRelDtos.size() < 1) {
+            throw new IllegalArgumentException("涓氫富涓嶅瓨鍦ㄦ埧灞嬫棤娉曞悓姝ワ紝鍥犱负娌℃湁鍦板潃浜岀淮鐮佺紪鐮�");
+        }
+        RoomDto roomDto = new RoomDto();
+        roomDto.setCommunityId(ownerDto.getCommunityId());
+        roomDto.setRoomId(ownerRoomRelDtos.get(0).getRoomId());
+        List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto);
+
+        Assert.listOnlyOne(roomDtos, "鎴垮眿涓嶅瓨鍦�");
+
+        JSONObject data = new JSONObject();
+        JSONArray datas = new JSONArray();
+        JSONObject dataObj = new JSONObject();
+        dataObj.put("lvgmsfhm", ownerDto.getIdCard());
+        dataObj.put("lvxm", ownerDto.getName());
+        dataObj.put("lvlxdh", ownerDto.getLink());
+        dataObj.put("lvdjsj", ownerDto.getCreateTime());
+        dataObj.put("lvrybm", ownerDto.getMemberId());
+        String qrCodeAddress = "";
+        for (RoomAttrDto roomAttrDto : roomDtos.get(0).getRoomAttrDto()) {
+            if (TianChuangConstant.EXT_TC_ROOM_QRCODE.equals(roomAttrDto.getSpecCd())) {
+                qrCodeAddress = roomAttrDto.getValue();
             }
         }
-        body.put("state", state);
+        dataObj.put("lvdzbm", qrCodeAddress);
+        dataObj.put("lvzhlx", OwnerDto.OWNER_TYPE_CD_OWNER.equals(ownerDto.getOwnerTypeCd()) ? "10" : "11");
+        dataObj.put("lvssxqbm", extCommunityId);
+        dataObj.put("lv_procmode", "PMINSERT");
 
-        JSONObject kafkaData = baseHcGovSendAsynImpl.createHeadersOrBody(body, extCommunityId, HcGovConstant.ADD_INOUT_RECORD_ACTION, HcGovConstant.COMMUNITY_SECURE);
-        baseHcGovSendAsynImpl.sendKafka(HcGovConstant.GOV_TOPIC, kafkaData, communityId, machineRecordId, HcGovConstant.COMMUNITY_SECURE);
+        datas.add(dataObj);
+
+        data.put("datas", datas);
+
+        JSONArray pages = new JSONArray();
+        JSONObject page = new JSONObject();
+        page.put("psize", "100");
+        page.put("tcount", "1");
+        page.put("pno", "1");
+        page.put("tsize", "");
+        pages.add(page);
+
+        data.put("pages", pages);
+
+        String dataStr = AuthenticationFactory.AesDecrypt(data.toJSONString(), TianChuangConstant.getAppSecret());
+
+        HttpEntity httpEntity = new HttpEntity(dataStr, GetTianChuangToken.getHeaders(TianChuangConstant.SERVICE_ID_OWNER, dataStr));
+        ResponseEntity<String> responseEntity = outRestTemplate.exchange(TianChuangConstant.getUrl(), HttpMethod.POST, httpEntity, String.class);
+        logger.debug("璋冪敤HC IOT淇℃伅锛�" + responseEntity);
+        JSONObject paramOut = JSONObject.parseObject(AuthenticationFactory.AesEncrypt(responseEntity.getBody(), TianChuangConstant.getAppSecret()));
+
+        String code = paramOut.getJSONObject("sta").getString("cod");
+        if (!"0000".equals(code)) {
+            throw new IllegalArgumentException("鍚屾灏忓尯澶辫触锛�" + paramOut.toJSONString());
+        }
+        String extTcOwnerId = paramOut.getJSONArray("data").getJSONObject(0).getString("result");
+        OwnerAttrPo ownerAttrPo = new OwnerAttrPo();
+        ownerAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId));
+        ownerAttrPo.setCommunityId(ownerDto.getCommunityId());
+        ownerAttrPo.setMemberId(ownerDto.getMemberId());
+        ownerAttrPo.setSpecCd(TianChuangConstant.EXT_TC_OWNER_ID);
+        ownerAttrPo.setValue(extTcOwnerId);
+        ownerAttrInnerServiceSMOImpl.saveOwnerAttr(ownerAttrPo);
+
+        return extTcOwnerId;
+    }
+
+    /**
+     * 闂ㄧ淇℃伅涓婃姤
+     *
+     * @param machineDto
+     * @return
+     */
+    private String sendMachine(MachineDto machineDto, String extCommunityId, CommunityDto communityDto) {
+        JSONObject data = new JSONObject();
+        JSONArray datas = new JSONArray();
+        JSONObject dataObj = new JSONObject();
+        dataObj.put("lv_mjmc", machineDto.getMachineName());
+        dataObj.put("lv_wzms", machineDto.getLocationObjName());
+        dataObj.put("lv_sfysxt", "1");
+        dataObj.put("lv_ssxqbm", extCommunityId);
+        dataObj.put("lv_mjxtwybm", machineDto.getMachineId());
+        String qrCodeAddress = "";
+        for (CommunityAttrDto communityAttrDto : communityDto.getCommunityAttrDtos()) {
+            if (TianChuangConstant.EXT_TC_COMMUNITY_QRCODE.equals(communityAttrDto.getSpecCd())) {
+                qrCodeAddress = communityAttrDto.getValue();
+            }
+        }
+        dataObj.put("lv_dzewmbm", qrCodeAddress);
+        dataObj.put("lv_sbxt", "灏忓尯绠$悊绯荤粺");
+        dataObj.put("lv_procmode", "PMINSERT");
+
+        datas.add(dataObj);
+
+        data.put("datas", datas);
+
+        JSONArray pages = new JSONArray();
+        JSONObject page = new JSONObject();
+        page.put("psize", "100");
+        page.put("tcount", "1");
+        page.put("pno", "1");
+        page.put("tsize", "");
+        pages.add(page);
+
+        data.put("pages", pages);
+
+        String dataStr = AuthenticationFactory.AesDecrypt(data.toJSONString(), TianChuangConstant.getAppSecret());
+
+        HttpEntity httpEntity = new HttpEntity(dataStr, GetTianChuangToken.getHeaders(TianChuangConstant.SERVICE_ID_MACHINE, dataStr));
+        ResponseEntity<String> responseEntity = outRestTemplate.exchange(TianChuangConstant.getUrl(), HttpMethod.POST, httpEntity, String.class);
+        logger.debug("璋冪敤HC IOT淇℃伅锛�" + responseEntity);
+        JSONObject paramOut = JSONObject.parseObject(AuthenticationFactory.AesEncrypt(responseEntity.getBody(), TianChuangConstant.getAppSecret()));
+
+        String code = paramOut.getJSONObject("sta").getString("cod");
+        if (!"0000".equals(code)) {
+            throw new IllegalArgumentException("鍚屾灏忓尯澶辫触锛�" + paramOut.toJSONString());
+        }
+        String extTcMachineId = paramOut.getJSONArray("data").getJSONObject(0).getString("result");
+        MachineAttrPo machineAttrPo = new MachineAttrPo();
+        machineAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId));
+        machineAttrPo.setCommunityId(communityDto.getCommunityId());
+        machineAttrPo.setMachineId(machineDto.getMachineId());
+        machineAttrPo.setSpecCd(TianChuangConstant.EXT_TC_MACHINE_ID);
+        machineAttrPo.setValue(extTcMachineId);
+        machineAttrInnerServiceSMOImpl.saveMachineAttrs(machineAttrPo);
+
+        return extTcMachineId;
+    }
+
+    /**
+     * 鍙戦�佸皬鍖轰唬鐮�
+     *
+     * @param communityDto
+     */
+    private String sendCommunity(CommunityDto communityDto) {
+        JSONObject data = new JSONObject();
+        JSONArray datas = new JSONArray();
+        JSONObject dataObj = new JSONObject();
+        dataObj.put("lv_mjbh", TianChuangConstant.getCompany());
+        dataObj.put("lv_sbxqmc", communityDto.getName());
+        dataObj.put("lv_zt", "0");
+        dataObj.put("lv_dxtzhm", StringUtil.isEmpty(communityDto.getTel()) ? "18909711234" : communityDto.getTel());
+        String qrCodeAddress = "";
+        for (CommunityAttrDto communityAttrDto : communityDto.getCommunityAttrDtos()) {
+            if (TianChuangConstant.EXT_TC_COMMUNITY_QRCODE.equals(communityAttrDto.getSpecCd())) {
+                qrCodeAddress = communityAttrDto.getValue();
+            }
+        }
+
+        dataObj.put("lv_sbxqdzbm", qrCodeAddress);
+        dataObj.put("lv_procmode", "PMINSERT");
+
+        datas.add(dataObj);
+
+        data.put("datas", datas);
+
+        JSONArray pages = new JSONArray();
+        JSONObject page = new JSONObject();
+        page.put("psize", "100");
+        page.put("tcount", "1");
+        page.put("pno", "1");
+        page.put("tsize", "");
+        pages.add(page);
+
+        data.put("pages", pages);
+
+        String dataStr = AuthenticationFactory.AesDecrypt(data.toJSONString(), TianChuangConstant.getAppSecret());
+
+        HttpEntity httpEntity = new HttpEntity(dataStr, GetTianChuangToken.getHeaders(TianChuangConstant.SERVICE_ID_COMMUNITY, dataStr));
+        ResponseEntity<String> responseEntity = outRestTemplate.exchange(TianChuangConstant.getUrl(), HttpMethod.POST, httpEntity, String.class);
+        logger.debug("璋冪敤HC IOT淇℃伅锛�" + responseEntity);
+        JSONObject paramOut = JSONObject.parseObject(AuthenticationFactory.AesEncrypt(responseEntity.getBody(), TianChuangConstant.getAppSecret()));
+
+        String code = paramOut.getJSONObject("sta").getString("cod");
+        if (!"0000".equals(code)) {
+            throw new IllegalArgumentException("鍚屾灏忓尯澶辫触锛�" + paramOut.toJSONString());
+        }
+        String extTcCommunityId = paramOut.getJSONArray("data").getJSONObject(0).getString("result");
+        CommunityAttrPo communityAttrPo = new CommunityAttrPo();
+        communityAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId));
+        communityAttrPo.setCommunityId(communityDto.getCommunityId());
+        communityAttrPo.setSpecCd(TianChuangConstant.EXT_TC_COMMUNITY_ID);
+        communityAttrPo.setValue(extTcCommunityId);
+        communityInnerServiceSMOImpl.saveCommunityAttr(communityAttrPo);
+
+        return extTcCommunityId;
     }
 
 }

--
Gitblit v1.8.0