Просмотр исходного кода

Merge branch 'master' of https://github.com/java110/MicroCommunity

15178832520 лет назад: 5
Родитель
Сommit
4abc21891d

+ 146 - 0
java110-bean/src/main/java/com/java110/entity/assetImport/ImportFee.java

@@ -0,0 +1,146 @@
+package com.java110.entity.assetImport;
+
+import java.io.Serializable;
+
+/**
+ * 房屋导入对象
+ */
+public class ImportFee implements Serializable {
+
+
+    private String id;
+    private String configId;
+    private String communityId;
+    private String feeTypeCd;
+    private String squarePrice;
+    private String additionalAmount;
+    private String isDefault;
+    private String startTime;
+    private String endTime;
+    private String feeFlag;
+    private String feeName;
+    private String computingFormula;
+    private String billType;
+    private String paymentCycle;
+    private String paymentCd;
+
+    public String getConfigId() {
+        return configId;
+    }
+
+    public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+
+    public String getCommunityId() {
+        return communityId;
+    }
+
+    public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+    public String getFeeTypeCd() {
+        return feeTypeCd;
+    }
+
+    public void setFeeTypeCd(String feeTypeCd) {
+        this.feeTypeCd = feeTypeCd;
+    }
+
+    public String getSquarePrice() {
+        return squarePrice;
+    }
+
+    public void setSquarePrice(String squarePrice) {
+        this.squarePrice = squarePrice;
+    }
+
+    public String getAdditionalAmount() {
+        return additionalAmount;
+    }
+
+    public void setAdditionalAmount(String additionalAmount) {
+        this.additionalAmount = additionalAmount;
+    }
+
+    public String getIsDefault() {
+        return isDefault;
+    }
+
+    public void setIsDefault(String isDefault) {
+        this.isDefault = isDefault;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getFeeFlag() {
+        return feeFlag;
+    }
+
+    public void setFeeFlag(String feeFlag) {
+        this.feeFlag = feeFlag;
+    }
+
+    public String getFeeName() {
+        return feeName;
+    }
+
+    public void setFeeName(String feeName) {
+        this.feeName = feeName;
+    }
+
+    public String getComputingFormula() {
+        return computingFormula;
+    }
+
+    public void setComputingFormula(String computingFormula) {
+        this.computingFormula = computingFormula;
+    }
+
+    public String getBillType() {
+        return billType;
+    }
+
+    public void setBillType(String billType) {
+        this.billType = billType;
+    }
+
+    public String getPaymentCycle() {
+        return paymentCycle;
+    }
+
+    public void setPaymentCycle(String paymentCycle) {
+        this.paymentCycle = paymentCycle;
+    }
+
+    public String getPaymentCd() {
+        return paymentCd;
+    }
+
+    public void setPaymentCd(String paymentCd) {
+        this.paymentCd = paymentCd;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+}

+ 20 - 0
java110-bean/src/main/java/com/java110/entity/assetImport/ImportRoom.java

@@ -15,6 +15,10 @@ public class ImportRoom {
 
     private double builtUpArea;
 
+    private String roomFeeId;
+
+    private String feeEndDate;
+
     private ImportOwner importOwner;
 
     public ImportFloor getFloor() {
@@ -64,4 +68,20 @@ public class ImportRoom {
     public void setImportOwner(ImportOwner importOwner) {
         this.importOwner = importOwner;
     }
+
+    public String getRoomFeeId() {
+        return roomFeeId;
+    }
+
+    public void setRoomFeeId(String roomFeeId) {
+        this.roomFeeId = roomFeeId;
+    }
+
+    public String getFeeEndDate() {
+        return feeEndDate;
+    }
+
+    public void setFeeEndDate(String feeEndDate) {
+        this.feeEndDate = feeEndDate;
+    }
 }

+ 18 - 5
service-api/src/main/java/com/java110/api/bmo/community/impl/CommunityBMOImpl.java

@@ -106,7 +106,7 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
         String auditStatusCd = MappingCache.getValue(MappingConstant.DOMAIN_COMMUNITY_MEMBER_AUDIT, paramInJson.getString("memberTypeCd"));
         auditStatusCd = StringUtils.isEmpty(auditStatusCd) ? StateConstant.AGREE_AUDIT : auditStatusCd;
         businessCommunityMember.put("auditStatusCd", auditStatusCd);
-        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessCommunityMember", businessCommunityMember);
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(CommunityMemberPo.class.getSimpleName(), businessCommunityMember);
 
         return business;
     }
@@ -125,7 +125,7 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
         business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
         JSONObject businessCommunityMember = new JSONObject();
         businessCommunityMember.put("communityMemberId", paramInJson.getString("communityMemberId"));
-        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessCommunityMember", businessCommunityMember);
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(CommunityMemberPo.class.getSimpleName(), businessCommunityMember);
 
         return business;
     }
@@ -157,7 +157,7 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
 
 
         businessCommunityMember.put("communityMemberId", communityMemberDtoList.get(0).getCommunityMemberId());
-        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessCommunityMember", businessCommunityMember);
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(CommunityMemberPo.class.getSimpleName(), businessCommunityMember);
 
         businesses.add(business);
 
@@ -179,7 +179,7 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
 
 
         businessCommunityMember.put("communityMemberId", communityMemberDtoList.get(0).getCommunityMemberId());
-        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessCommunityMember", businessCommunityMember);
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(CommunityMemberPo.class.getSimpleName(), businessCommunityMember);
 
         businesses.add(business);
         //运维团队
@@ -200,7 +200,7 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
 
 
         businessCommunityMember.put("communityMemberId", communityMemberDtoList.get(0).getCommunityMemberId());
-        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessCommunityMember", businessCommunityMember);
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(CommunityMemberPo.class.getSimpleName(), businessCommunityMember);
 
         businesses.add(business);
 
@@ -241,10 +241,12 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
         businessFeeConfig.put("endTime", DateUtil.LAST_TIME);
         businessFeeConfig.put("computingFormula", "1001");
         businessFeeConfig.put("squarePrice", "0.00");
+        businessFeeConfig.put("paymentCd", "1200");
         businessFeeConfig.put("additionalAmount", "0.00");
         businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
         businessFeeConfig.put("configId", paramInJson.getString("configId"));
         businessFeeConfig.put("billType", "002");//按月出账
+        businessFeeConfig.put("paymentCycle", "1");//按月出账
         businessFeeConfig.put("isDefault", "T");
         PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
         super.insert(dataFlowContext, payFeeConfigPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_FEE_CONFIG);
@@ -272,6 +274,8 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
         businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
         businessFeeConfig.put("configId", paramInJson.getString("configId"));
         businessFeeConfig.put("billType", "003");//按天出账
+        businessFeeConfig.put("paymentCd", "1200");
+        businessFeeConfig.put("paymentCycle", "1");//按月出账
         businessFeeConfig.put("isDefault", "T");
         PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
 
@@ -300,6 +304,8 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
         businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
         businessFeeConfig.put("configId", paramInJson.getString("configId"));
         businessFeeConfig.put("billType", "003");//按天出账
+        businessFeeConfig.put("paymentCd", "1200");
+        businessFeeConfig.put("paymentCycle", "1");//按月出账
         businessFeeConfig.put("isDefault", "T");
         PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
 
@@ -328,6 +334,8 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
         businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
         businessFeeConfig.put("configId", paramInJson.getString("configId"));
         businessFeeConfig.put("billType", "003");//按天出账
+        businessFeeConfig.put("paymentCd", "1200");
+        businessFeeConfig.put("paymentCycle", "1");//按月出账
         businessFeeConfig.put("isDefault", "T");
         PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
 
@@ -356,6 +364,9 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
         businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
         businessFeeConfig.put("configId", paramInJson.getString("configId"));
         businessFeeConfig.put("billType", "003");//按天出账
+
+        businessFeeConfig.put("paymentCd", "1200");
+        businessFeeConfig.put("paymentCycle", "1");//按月出账
         businessFeeConfig.put("isDefault", "T");
         PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
 
@@ -384,6 +395,8 @@ public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO {
         businessFeeConfig.put("communityId", paramInJson.getString("communityId"));
         businessFeeConfig.put("configId", paramInJson.getString("configId"));
         businessFeeConfig.put("billType", "004");//按天出账
+        businessFeeConfig.put("paymentCd", "1200");
+        businessFeeConfig.put("paymentCycle", "1");//按月出账
         businessFeeConfig.put("isDefault", "T");
         PayFeeConfigPo payFeeConfigPo = BeanConvertUtil.covertBean(businessFeeConfig, PayFeeConfigPo.class);
 

+ 3 - 2
service-api/src/main/java/com/java110/api/bmo/room/impl/RoomBMOImpl.java

@@ -4,10 +4,10 @@ import com.alibaba.fastjson.JSONObject;
 import com.java110.api.bmo.ApiBaseBMO;
 import com.java110.api.bmo.room.IRoomBMO;
 import com.java110.core.context.DataFlowContext;
+import com.java110.core.smo.community.IRoomInnerServiceSMO;
 import com.java110.core.smo.fee.IFeeConfigInnerServiceSMO;
 import com.java110.core.smo.fee.IFeeInnerServiceSMO;
 import com.java110.core.smo.user.IOwnerRoomRelInnerServiceSMO;
-import com.java110.core.smo.community.IRoomInnerServiceSMO;
 import com.java110.dto.RoomDto;
 import com.java110.dto.fee.FeeConfigDto;
 import com.java110.dto.fee.FeeDto;
@@ -247,7 +247,8 @@ public class RoomBMOImpl extends ApiBaseBMO implements IRoomBMO {
         businessUnit.put("incomeObjId", paramInJson.getString("storeId"));
         businessUnit.put("amount", "-1.00");
         businessUnit.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
-        businessUnit.put("endTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
+        businessUnit.put("endTime", paramInJson.containsKey("feeEndDate") ? paramInJson.getString("feeEndDate")
+                : DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
         businessUnit.put("communityId", paramInJson.getString("communityId"));
         businessUnit.put("payerObjId", paramInJson.getString("roomId"));
         businessUnit.put("payerObjType", "3333");

+ 6 - 4
service-api/src/main/java/com/java110/api/bmo/store/impl/StoreBMOImpl.java

@@ -39,6 +39,7 @@ import java.util.List;
 public class StoreBMOImpl extends ApiBaseBMO implements IStoreBMO {
     @Autowired
     private IStoreInnerServiceSMO storeInnerServiceSMOImpl;
+
     /**
      * 添加商户
      *
@@ -92,13 +93,14 @@ public class StoreBMOImpl extends ApiBaseBMO implements IStoreBMO {
         JSONObject businessStoreUser = new JSONObject();
         businessStoreUser.put("storeId", paramInJson.getString("storeId"));
         businessStoreUser.put("storeUserId", "-1");
-        businessStoreUser.put("userId", paramInJson.getJSONObject("businessStore").getString("userId"));
+        businessStoreUser.put("userId", paramInJson.getJSONObject(StorePo.class.getSimpleName()).getString("userId"));
         businessStoreUser.put("relCd", StoreUserRelConstant.REL_ADMIN);
         businessStoreUsers.add(businessStoreUser);
         business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(StoreUserPo.class.getSimpleName(), businessStoreUsers);
 
         return business;
     }
+
     /**
      * 对请求报文处理
      *
@@ -175,7 +177,7 @@ public class StoreBMOImpl extends ApiBaseBMO implements IStoreBMO {
         business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 3);
         business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
         JSONObject businessOrg = new JSONObject();
-        businessOrg.put("orgName", paramInJson.getJSONObject("businessStore").getString("name"));
+        businessOrg.put("orgName", paramInJson.getJSONObject(StorePo.class.getSimpleName()).getString("name"));
         businessOrg.put("orgLevel", "1");
         businessOrg.put("parentOrgId", orgId);
         businessOrg.put("belongCommunityId", "9999");
@@ -246,13 +248,13 @@ public class StoreBMOImpl extends ApiBaseBMO implements IStoreBMO {
 
         JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
         business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_ORG_STAFF_REL);
-        business.put(CommonConstant.HTTP_SEQ,  DEFAULT_SEQ + 6);
+        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 6);
         business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
         JSONArray businessOrgStaffRels = new JSONArray();
         JSONObject businessOrgStaffRel = new JSONObject();
         businessOrgStaffRel.put("relId", "-1");
         businessOrgStaffRel.put("storeId", paramInJson.getString("storeId"));
-        businessOrgStaffRel.put("staffId", paramInJson.getJSONObject("businessStore").getString("userId"));
+        businessOrgStaffRel.put("staffId", paramInJson.getJSONObject(StorePo.class.getSimpleName()).getString("userId"));
         businessOrgStaffRel.put("orgId", paramInJson.getString("levelThreeOrgId"));
         businessOrgStaffRel.put("relCd", StoreUserRelConstant.REL_ADMIN);
         businessOrgStaffRels.add(businessOrgStaffRel);

+ 3 - 3
service-api/src/main/java/com/java110/api/listener/basePrivilege/CheckUserHasResourceListener.java

@@ -4,10 +4,10 @@ import com.alibaba.fastjson.JSONObject;
 import com.java110.api.listener.AbstractServiceApiDataFlowListener;
 import com.java110.core.annotation.Java110Listener;
 import com.java110.core.context.DataFlowContext;
+import com.java110.core.event.service.api.ServiceDataFlowEvent;
 import com.java110.core.smo.community.IMenuInnerServiceSMO;
 import com.java110.dto.basePrivilege.BasePrivilegeDto;
 import com.java110.entity.center.AppService;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
 import com.java110.utils.constant.ServiceCodeConstant;
 import com.java110.utils.util.Assert;
 import org.slf4j.Logger;
@@ -43,9 +43,9 @@ public class CheckUserHasResourceListener extends AbstractServiceApiDataFlowList
         DataFlowContext dataFlowContext = event.getDataFlowContext();
         AppService service = event.getAppService();
         JSONObject data = dataFlowContext.getReqJson();
-        logger.debug("请求信息:{}", JSONObject.toJSONString(dataFlowContext));
-        //Assert.hasKeyAndValue(data, "userId", "请求报文中未包含userId节点");
         Assert.hasKeyAndValue(data, "resource", "请求报文中未包含资源路径");
+        logger.debug("请求信息:{}", data);
+        //Assert.hasKeyAndValue(data, "userId", "请求报文中未包含userId节点");
         ResponseEntity<String> responseEntity = null;
 
         //判断资源路径是否配置权限 ,没有配置权限则都能访问

+ 4 - 3
service-api/src/main/java/com/java110/api/listener/store/SaveStoreServiceListener.java

@@ -9,6 +9,7 @@ import com.java110.core.context.DataFlowContext;
 import com.java110.core.factory.DataFlowFactory;
 import com.java110.entity.center.AppService;
 import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.po.store.StorePo;
 import com.java110.utils.constant.CommonConstant;
 import com.java110.utils.constant.ServiceCodeConstant;
 import com.java110.utils.util.Assert;
@@ -59,7 +60,7 @@ public class SaveStoreServiceListener extends AbstractServiceApiListener {
         Assert.isJsonObject(paramIn, "添加员工时请求参数有误,不是有效的json格式 " + paramIn);
 
         //校验json 格式中是否包含 name,email,levelCd,tel
-        Assert.jsonObjectHaveKey(paramIn, "businessStore", "请求参数中未包含businessStore 节点,请确认");
+        Assert.jsonObjectHaveKey(paramIn, StorePo.class.getSimpleName(), "请求参数中未包含businessStore 节点,请确认");
         JSONObject paramObj = JSONObject.parseObject(paramIn);
         HttpHeaders header = new HttpHeaders();
         dataFlowContext.getRequestCurrentHeaders().put(CommonConstant.HTTP_USER_ID, "-1");
@@ -109,8 +110,8 @@ public class SaveStoreServiceListener extends AbstractServiceApiListener {
         header.add(CommonConstant.HTTP_SERVICE.toLowerCase(), ServiceCodeConstant.SERVICE_CODE_SAVE_USER_DEFAULT_PRIVILEGE);
         storeBMOImpl.freshHttpHeader(header, dataFlowContext.getRequestCurrentHeaders());
         JSONObject paramInObj = new JSONObject();
-        paramInObj.put("userId", paramObj.getJSONObject("businessStore").getString("userId"));
-        paramInObj.put("storeTypeCd", paramObj.getJSONObject("businessStore").getString("storeTypeCd"));
+        paramInObj.put("userId", paramObj.getJSONObject(StorePo.class.getSimpleName()).getString("userId"));
+        paramInObj.put("storeTypeCd", paramObj.getJSONObject(StorePo.class.getSimpleName()).getString("storeTypeCd"));
         paramInObj.put("userFlag", "admin");
         HttpEntity<String> httpEntity = new HttpEntity<String>(paramInObj.toJSONString(), header);
         doRequest(dataFlowContext, appService, httpEntity);

+ 175 - 6
service-front/src/main/java/com/java110/front/smo/assetImport/impl/AssetImportSMOImpl.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.core.component.BaseComponentSMO;
 import com.java110.core.context.IPageData;
+import com.java110.entity.assetImport.ImportFee;
 import com.java110.entity.assetImport.ImportFloor;
 import com.java110.entity.assetImport.ImportOwner;
 import com.java110.entity.assetImport.ImportParkingSpace;
@@ -57,6 +58,7 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
         String[] headers = null;   //表头信息
         List<ImportFloor> floors = new ArrayList<ImportFloor>();
         List<ImportOwner> owners = new ArrayList<ImportOwner>();
+        List<ImportFee> fees = new ArrayList<>();
         List<ImportRoom> rooms = new ArrayList<ImportRoom>();
         List<ImportParkingSpace> parkingSpaces = new ArrayList<ImportParkingSpace>();
         workbook = ImportExcelUtils.createWorkbook(uploadFile);
@@ -65,6 +67,9 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
         //获取业主信息
         getOwners(workbook, owners);
 
+
+        getFee(workbook, fees);
+
         //获取房屋信息
         getRooms(workbook, rooms, floors, owners);
 
@@ -75,7 +80,7 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
         importExcelDataValidate(floors, owners, rooms, parkingSpaces);
 
         // 保存数据
-        return dealExcelData(pd, floors, owners, rooms, parkingSpaces, result);
+        return dealExcelData(pd, floors, owners, rooms, parkingSpaces, fees, result);
     }
 
     /**
@@ -86,7 +91,13 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
      * @param rooms         房屋信息
      * @param parkingSpaces 车位信息
      */
-    private ResponseEntity<String> dealExcelData(IPageData pd, List<ImportFloor> floors, List<ImportOwner> owners, List<ImportRoom> rooms, List<ImportParkingSpace> parkingSpaces, ComponentValidateResult result) {
+    private ResponseEntity<String> dealExcelData(IPageData pd,
+                                                 List<ImportFloor> floors,
+                                                 List<ImportOwner> owners,
+                                                 List<ImportRoom> rooms,
+                                                 List<ImportParkingSpace> parkingSpaces,
+                                                 List<ImportFee> fees,
+                                                 ComponentValidateResult result) {
         ResponseEntity<String> responseEntity = null;
         //保存单元信息 和 楼栋信息
         responseEntity = savedFloorAndUnitInfo(pd, floors, result);
@@ -101,8 +112,14 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
             return responseEntity;
         }
 
+        // 保存费用项
+        responseEntity = savedFeeInfo(pd, fees, result);
+        if (responseEntity == null || responseEntity.getStatusCode() != HttpStatus.OK) {
+            return responseEntity;
+        }
+
         //保存房屋
-        responseEntity = savedRoomInfo(pd, rooms, result);
+        responseEntity = savedRoomInfo(pd, rooms, fees, result);
         if (responseEntity == null || responseEntity.getStatusCode() != HttpStatus.OK) {
             return responseEntity;
         }
@@ -117,6 +134,34 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
         return responseEntity;
     }
 
+    private ResponseEntity<String> savedFeeInfo(IPageData pd, List<ImportFee> fees, ComponentValidateResult result) {
+        String apiUrl = "";
+        JSONObject paramIn = null;
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>("成功", HttpStatus.OK);
+        ImportOwner owner = null;
+        for (ImportFee fee : fees) {
+            JSONObject savedFeeConfigInfo = getExistsFee(pd, result, fee);
+            if (savedFeeConfigInfo != null) {
+                continue;
+            }
+
+            //paramIn = new JSONObject();
+            //保存 费用项
+
+            apiUrl = ServiceConstant.SERVICE_API_URL + "/api/feeConfig.saveFeeConfig";
+
+            paramIn = JSONObject.parseObject(JSONObject.toJSONString(fee));
+            paramIn.put("communityId", result.getCommunityId());
+
+            responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), apiUrl, HttpMethod.POST);
+            if (responseEntity.getStatusCode() != HttpStatus.OK) {
+                continue;
+            }
+        }
+
+        return responseEntity;
+    }
+
     /**
      * 保存车位信息
      *
@@ -225,7 +270,7 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
      * @param result
      * @return
      */
-    private ResponseEntity<String> savedRoomInfo(IPageData pd, List<ImportRoom> rooms, ComponentValidateResult result) {
+    private ResponseEntity<String> savedRoomInfo(IPageData pd, List<ImportRoom> rooms, List<ImportFee> fees, ComponentValidateResult result) {
         String apiUrl = "";
         JSONObject paramIn = null;
         ResponseEntity<String> responseEntity = new ResponseEntity<String>("成功", HttpStatus.OK);
@@ -240,7 +285,6 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
 
 
             //保存 房屋
-
             apiUrl = ServiceConstant.SERVICE_API_URL + "/api/room.saveRoom";
 
             paramIn.put("communityId", result.getCommunityId());
@@ -253,6 +297,7 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
             paramIn.put("builtUpArea", room.getBuiltUpArea());
             paramIn.put("unitPrice", "1000.00");
 
+
             responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), apiUrl, HttpMethod.POST);
             if (responseEntity.getStatusCode() != HttpStatus.OK) {
                 continue;
@@ -273,7 +318,47 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
             paramIn.put("roomId", savedRoomInfo.getString("roomId"));
             paramIn.put("state", "2001");
             paramIn.put("storeId", result.getStoreId());
+            if (!StringUtil.isEmpty(room.getRoomFeeId()) && "0".equals(room.getRoomFeeId())) {
+                paramIn.put("feeEndDate", room.getFeeEndDate());
+            }
             responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), apiUrl, HttpMethod.POST);
+            if (responseEntity.getStatusCode() != HttpStatus.OK) {
+                continue;
+            }
+            //创建费用
+            if (StringUtil.isEmpty(room.getRoomFeeId()) || "0".equals(room.getRoomFeeId())) {
+                continue;
+            }
+            String[] feeIds = room.getRoomFeeId().split("#");
+
+            for (int feeIndex = 0; feeIndex < feeIds.length; feeIndex++) {
+                String feeId = feeIds[feeIndex];
+                ImportFee tmpFee = null;
+                for (ImportFee fee : fees) {
+                    if (feeId.equals(fee.getId())) {
+                        tmpFee = fee;
+                    }
+                }
+
+                if (tmpFee == null) {
+                    continue;//没有费用项,可能写错了
+                }
+
+                JSONObject ttFee = getExistsFee(pd, result, tmpFee);
+
+                if (ttFee == null) {
+                    continue;//没有费用项,可能写错了
+                }
+
+                apiUrl = ServiceConstant.SERVICE_API_URL + "/api/fee.saveRoomCreateFee";
+                paramIn.put("communityId", result.getCommunityId());
+                paramIn.put("locationTypeCd", "3000");
+                paramIn.put("locationObjId", savedRoomInfo.getString("roomId"));
+                paramIn.put("configId", ttFee.getString("configId"));
+                paramIn.put("storeId", result.getStoreId());
+                paramIn.put("feeEndDate", room.getFeeEndDate().split("#")[feeIndex]);
+                responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), apiUrl, HttpMethod.POST);
+            }
 
         }
 
@@ -313,6 +398,39 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
         return savedParkingSpaceInfo;
     }
 
+    /**
+     * 查询存在的房屋信息
+     * room.queryRooms
+     *
+     * @param pd
+     * @param result
+     * @param fee
+     * @return
+     */
+    private JSONObject getExistsFee(IPageData pd, ComponentValidateResult result, ImportFee fee) {
+        String apiUrl = "";
+        ResponseEntity<String> responseEntity = null;
+        apiUrl = ServiceConstant.SERVICE_API_URL + "/api/feeConfig.listFeeConfigs?page=1&row=1&communityId=" + result.getCommunityId()
+                + "&feeName=" + fee.getFeeName();
+        responseEntity = this.callCenterService(restTemplate, pd, "", apiUrl, HttpMethod.GET);
+
+        if (responseEntity.getStatusCode() != HttpStatus.OK) { //跳过 保存单元信息
+            return null;
+        }
+
+        JSONObject savedRoomInfoResults = JSONObject.parseObject(responseEntity.getBody());
+
+
+        if (!savedRoomInfoResults.containsKey("feeConfigs") || savedRoomInfoResults.getJSONArray("feeConfigs").size() != 1) {
+            return null;
+        }
+
+
+        JSONObject savedFeeConfigInfo = savedRoomInfoResults.getJSONArray("feeConfigs").getJSONObject(0);
+
+        return savedFeeConfigInfo;
+    }
+
 
     /**
      * 查询存在的房屋信息
@@ -631,6 +749,11 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
             importRoom.setLayer(Integer.parseInt(os[3].toString()));
             importRoom.setSection(os[4].toString());
             importRoom.setBuiltUpArea(Double.parseDouble(os[5].toString()));
+
+            if (!StringUtil.isEmpty(os[7].toString())) {
+                importRoom.setRoomFeeId(os[7].toString());
+                importRoom.setFeeEndDate(os[8].toString());
+            }
             if (StringUtil.isNullOrNone(os[6])) {
                 rooms.add(importRoom);
                 continue;
@@ -640,6 +763,52 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
         }
     }
 
+    /**
+     * 获取 房屋信息
+     *
+     * @param workbook
+     * @param importFees
+     */
+    private void getFee(Workbook workbook, List<ImportFee> importFees) {
+        Sheet sheet = null;
+        sheet = ImportExcelUtils.getSheet(workbook, "费用设置");
+        List<Object[]> oList = ImportExcelUtils.listFromSheet(sheet);
+        ImportFee importFee = null;
+        for (int osIndex = 0; osIndex < oList.size(); osIndex++) {
+            Object[] os = oList.get(osIndex);
+            if (osIndex == 0) { // 第一行是 头部信息 直接跳过
+                continue;
+            }
+            if (StringUtil.isNullOrNone(os[0])) {
+                continue;
+            }
+            importFee = new ImportFee();
+            importFee.setId(os[0].toString());
+            importFee.setFeeTypeCd("物业费".equals(os[1]) ? "888800010001" : "888800010002");
+            importFee.setFeeName(os[2].toString());
+            importFee.setFeeFlag("周期性费用".equals(os[3]) ? "1003006" : "2006012");
+            importFee.setPaymentCd("预付费".equals(os[4]) ? "1200" : "2100");
+            String billType = "";
+            if ("每年1月1日".equals(os[5])) {
+                billType = "001";
+            } else if ("每月1日".equals(os[5])) {
+                billType = "002";
+            } else if ("每日".equals(os[5])) {
+                billType = "003";
+            } else {
+                billType = "004";
+            }
+            importFee.setBillType(billType);
+            importFee.setPaymentCycle(os[6].toString());
+            importFee.setStartTime(os[7].toString());
+            importFee.setEndTime(os[8].toString());
+            importFee.setComputingFormula(os[9].toString());
+            importFee.setSquarePrice(os[10].toString());
+            importFee.setAdditionalAmount(os[11].toString());
+            importFees.add(importFee);
+        }
+    }
+
     /**
      * 从导入的业主信息中获取业主,如果没有返回 null
      *
@@ -695,7 +864,7 @@ public class AssetImportSMOImpl extends BaseComponentSMO implements IAssetImport
             }
             String tel = StringUtil.isNullOrNone(os[4]) ? "19999999999" : os[4].toString();
             String idCard = StringUtil.isNullOrNone(os[5]) ? "10000000000000000001" : os[5].toString();
-            String age = StringUtil.isNullOrNone(os[2]) ? CommonUtil.getAgeByCertId(idCard) : os[2].toString();
+            String age = StringUtil.isNullOrNone(os[3]) ? CommonUtil.getAgeByCertId(idCard) : os[3].toString();
             importOwner = new ImportOwner();
             importOwner.setOwnerNum(os[0].toString());
             importOwner.setOwnerName(os[1].toString());

+ 3 - 3
service-front/src/main/java/com/java110/front/smo/impl/CompanyServiceSMOImpl.java

@@ -63,12 +63,12 @@ public class CompanyServiceSMOImpl extends BaseComponentSMO implements ICompanyS
         validateCompanyInfo(pd.getReqData());
 
 
-        JSONObject reqJson = JSONObject.parseObject("{\"businessStore\":{}}");
+        JSONObject reqJson = JSONObject.parseObject("{\""+StorePo.class.getSimpleName()+"\":{}}");
 
         JSONObject paramJson = JSONObject.parseObject(pd.getReqData());
 
         //基本信息
-        JSONObject businessStore = reqJson.getJSONObject("businessStore");
+        JSONObject businessStore = reqJson.getJSONObject(StorePo.class.getSimpleName());
         businessStore.put("userId", pd.getUserId());
         businessStore.put("name", paramJson.getString("name"));
         businessStore.put("address", paramJson.getString("areaAddress") + paramJson.getString("address"));
@@ -116,7 +116,7 @@ public class CompanyServiceSMOImpl extends BaseComponentSMO implements ICompanyS
 
         reqJson.put(StoreCerdentialPo.class.getSimpleName(), businessStoreCerdentials);
 
-        reqJson.put(StorePo.class.getSimpleName(), businessStore);
+        //reqJson.put(StorePo.class.getSimpleName(), businessStore);
 
 
         responseEntity = this.callCenterService(restTemplate, pd, reqJson.toJSONString(), ServiceConstant.SERVICE_API_URL + "/api/save.store.info", HttpMethod.POST);

+ 16 - 15
service-order/src/main/java/com/java110/order/listener/RefreshStaffStoreIdFromSaveStoreInfoListener.java

@@ -2,24 +2,24 @@ package com.java110.order.listener;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.BusinessTypeConstant;
 import com.java110.core.annotation.Java110Listener;
-import com.java110.entity.order.Business;
 import com.java110.core.event.app.order.Ordered;
 import com.java110.core.event.center.event.InvokeBusinessBSuccessEvent;
 import com.java110.core.event.center.listener.DataFlowListener;
+import com.java110.entity.order.Business;
+import com.java110.po.store.StoreUserPo;
+import com.java110.utils.constant.BusinessTypeConstant;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.util.List;
 
 /**
- *
  * 刷新 员工的storeId
  * Created by Administrator on 2019/3/30.
  */
 @Java110Listener(name = "refreshStaffStoreIdFromSaveStoreInfoListener")
-public class RefreshStaffStoreIdFromSaveStoreInfoListener implements DataFlowListener<InvokeBusinessBSuccessEvent>,Ordered {
+public class RefreshStaffStoreIdFromSaveStoreInfoListener implements DataFlowListener<InvokeBusinessBSuccessEvent>, Ordered {
 
     private final static Logger logger = LoggerFactory.getLogger(RefreshStaffStoreIdFromSaveStoreInfoListener.class);
 
@@ -32,39 +32,40 @@ public class RefreshStaffStoreIdFromSaveStoreInfoListener implements DataFlowLis
     public void soService(InvokeBusinessBSuccessEvent event) {
 
         Business business = event.getBusiness();
-        if(!BusinessTypeConstant.BUSINESS_TYPE_SAVE_STORE_INFO.equals(business.getBusinessTypeCd())){
-            return ;
+        if (!BusinessTypeConstant.BUSINESS_TYPE_SAVE_STORE_INFO.equals(business.getBusinessTypeCd())) {
+            return;
         }
         List<Business> businessList = event.getDataFlow().getBusinessList();
         JSONObject businessResponseData = event.getBusinessResponseData();
 
-        if(!businessResponseData.containsKey("storeId")) {
+        if (!businessResponseData.containsKey("storeId")) {
             return;
         }
 
         String storeId = businessResponseData.getString("storeId");
 
-        for(Business tmpBusiness : businessList){
-            if(!BusinessTypeConstant.BUSINESS_TYPE_SAVE_STORE_USER.equals(tmpBusiness.getBusinessTypeCd())){
+        for (Business tmpBusiness : businessList) {
+            if (!BusinessTypeConstant.BUSINESS_TYPE_SAVE_STORE_USER.equals(tmpBusiness.getBusinessTypeCd())) {
                 continue;
             }
 
-            JSONArray businessStoreUsers = tmpBusiness.getData().getJSONArray("businessStoreUser");
-            dealBusinessStoreUserStoreId(businessStoreUsers,storeId);
+            JSONArray businessStoreUsers = tmpBusiness.getData().getJSONArray(StoreUserPo.class.getSimpleName());
+            dealBusinessStoreUserStoreId(businessStoreUsers, storeId);
         }
     }
 
 
     /**
      * businessStoreUser 中storeId 为负数的问题
+     *
      * @param businessStoreUsers
      */
-    private void dealBusinessStoreUserStoreId(JSONArray businessStoreUsers,String storeId){
-        for(int bStoreUserIndex = 0 ; bStoreUserIndex < businessStoreUsers.size();bStoreUserIndex ++){
+    private void dealBusinessStoreUserStoreId(JSONArray businessStoreUsers, String storeId) {
+        for (int bStoreUserIndex = 0; bStoreUserIndex < businessStoreUsers.size(); bStoreUserIndex++) {
             JSONObject businessStoreUser = businessStoreUsers.getJSONObject(bStoreUserIndex);
 
-            if(!businessStoreUser.containsKey("storeId") || "-1".equals(businessStoreUser.getString("storeId"))){
-                businessStoreUser.put("storeId",storeId);
+            if (!businessStoreUser.containsKey("storeId") || "-1".equals(businessStoreUser.getString("storeId"))) {
+                businessStoreUser.put("storeId", storeId);
             }
 
         }

+ 155 - 123
service-store/src/main/java/com/java110/store/dao/impl/StoreServiceDaoImpl.java

@@ -1,11 +1,11 @@
 package com.java110.store.dao.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.store.dao.IStoreServiceDao;
 import com.java110.utils.constant.ResponseConstant;
 import com.java110.utils.exception.DAOException;
 import com.java110.utils.util.DateUtil;
-import com.java110.core.base.dao.BaseServiceDao;
-import com.java110.store.dao.IStoreServiceDao;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
@@ -25,6 +25,7 @@ public class StoreServiceDaoImpl extends BaseServiceDao implements IStoreService
 
     /**
      * 商户信息封装
+     *
      * @param businessStoreInfo 商户信息 封装
      * @throws DAOException
      */
@@ -32,16 +33,17 @@ public class StoreServiceDaoImpl extends BaseServiceDao implements IStoreService
     public void saveBusinessStoreInfo(Map businessStoreInfo) throws DAOException {
         businessStoreInfo.put("month", DateUtil.getCurrentMonth());
         // 查询business_user 数据是否已经存在
-        logger.debug("保存商户信息 入参 businessStoreInfo : {}",businessStoreInfo);
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStoreInfo",businessStoreInfo);
+        logger.debug("保存商户信息 入参 businessStoreInfo : {}", businessStoreInfo);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStoreInfo", businessStoreInfo);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户数据失败:"+ JSONObject.toJSONString(businessStoreInfo));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存商户数据失败:" + JSONObject.toJSONString(businessStoreInfo));
         }
     }
 
     /**
      * 商户属性信息分装
+     *
      * @param businessStoreAttr 商户属性信息封装
      * @throws DAOException
      */
@@ -49,51 +51,54 @@ public class StoreServiceDaoImpl extends BaseServiceDao implements IStoreService
     public void saveBusinessStoreAttr(Map businessStoreAttr) throws DAOException {
         businessStoreAttr.put("month", DateUtil.getCurrentMonth());
         // 查询business_user 数据是否已经存在
-        logger.debug("保存商户属性信息 入参 businessStoreAttr : {}",businessStoreAttr);
+        logger.debug("保存商户属性信息 入参 businessStoreAttr : {}", businessStoreAttr);
 
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStoreAttr",businessStoreAttr);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStoreAttr", businessStoreAttr);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户属性数据失败:"+ JSONObject.toJSONString(businessStoreAttr));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存商户属性数据失败:" + JSONObject.toJSONString(businessStoreAttr));
         }
     }
 
     /**
      * 保存商户照片信息
+     *
      * @param businessStorePhoto 商户照片
      * @throws DAOException
      */
     @Override
     public void saveBusinessStorePhoto(Map businessStorePhoto) throws DAOException {
         businessStorePhoto.put("month", DateUtil.getCurrentMonth());
-        logger.debug("保存商户照片信息 入参 businessStorePhoto : {}",businessStorePhoto);
+        logger.debug("保存商户照片信息 入参 businessStorePhoto : {}", businessStorePhoto);
 
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStorePhoto",businessStorePhoto);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStorePhoto", businessStorePhoto);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户照片数据失败:"+ JSONObject.toJSONString(businessStorePhoto));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存商户照片数据失败:" + JSONObject.toJSONString(businessStorePhoto));
         }
     }
 
     /**
      * 保存商户证件信息
+     *
      * @param businessStoreCerdentials 商户证件
      * @throws DAOException
      */
     @Override
     public void saveBusinessStoreCerdentials(Map businessStoreCerdentials) throws DAOException {
         businessStoreCerdentials.put("month", DateUtil.getCurrentMonth());
-        logger.debug("保存商户证件信息 入参 businessStoreCerdentials : {}",businessStoreCerdentials);
+        logger.debug("保存商户证件信息 入参 businessStoreCerdentials : {}", businessStoreCerdentials);
 
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStoreCerdentials",businessStoreCerdentials);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStoreCerdentials", businessStoreCerdentials);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户证件数据失败:"+ JSONObject.toJSONString(businessStoreCerdentials));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存商户证件数据失败:" + JSONObject.toJSONString(businessStoreCerdentials));
         }
     }
 
     /**
      * 查询商户信息
+     *
      * @param info bId 信息
      * @return 商户信息
      * @throws DAOException
@@ -101,14 +106,18 @@ public class StoreServiceDaoImpl extends BaseServiceDao implements IStoreService
     @Override
     public Map getBusinessStoreInfo(Map info) throws DAOException {
 
-        logger.debug("查询商户信息 入参 info : {}",info);
+        logger.debug("查询商户信息 入参 info : {}", info);
 
-        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStoreInfo",info);
-        if(businessStoreInfos == null){
+        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStoreInfo", info);
+        if (businessStoreInfos == null) {
             return null;
         }
-        if(businessStoreInfos.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:businessStoreInfos,"+ JSONObject.toJSONString(info));
+        if (businessStoreInfos.size() > 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:businessStoreInfos," + JSONObject.toJSONString(info));
+        }
+
+        if (businessStoreInfos == null || businessStoreInfos.size() < 1) {
+            return null;
         }
 
         return businessStoreInfos.get(0);
@@ -116,114 +125,119 @@ public class StoreServiceDaoImpl extends BaseServiceDao implements IStoreService
 
     /**
      * 查询商户属性
+     *
      * @param info bId 信息
      * @return 商户属性
      * @throws DAOException
      */
     @Override
     public List<Map> getBusinessStoreAttrs(Map info) throws DAOException {
-        logger.debug("查询商户属性信息 入参 info : {}",info);
+        logger.debug("查询商户属性信息 入参 info : {}", info);
 
-        List<Map> businessStoreAttrs = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStoreAttrs",info);
+        List<Map> businessStoreAttrs = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStoreAttrs", info);
 
         return businessStoreAttrs;
     }
 
     /**
      * 查询商户照片
+     *
      * @param info bId 信息
      * @return
      * @throws DAOException
      */
     @Override
     public List<Map> getBusinessStorePhoto(Map info) throws DAOException {
-        logger.debug("查询商户照片信息 入参 info : {}",info);
+        logger.debug("查询商户照片信息 入参 info : {}", info);
 
-        List<Map> businessStorePhotos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStorePhoto",info);
+        List<Map> businessStorePhotos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStorePhoto", info);
 
         return businessStorePhotos;
     }
 
     /**
      * 查询商户证件
+     *
      * @param info bId 信息
      * @return
      * @throws DAOException
      */
     @Override
     public List<Map> getBusinessStoreCerdentials(Map info) throws DAOException {
-        logger.debug("查询商户证件信息 入参 info : {}",info);
+        logger.debug("查询商户证件信息 入参 info : {}", info);
 
-        List<Map> businessStoreCerdentialses = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStoreCerdentials",info);
+        List<Map> businessStoreCerdentialses = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStoreCerdentials", info);
 
         return businessStoreCerdentialses;
     }
 
     /**
      * 保存商户信息 到 instance
-     * @param info   bId 信息
+     *
+     * @param info bId 信息
      * @throws DAOException
      */
     @Override
     public void saveStoreInfoInstance(Map info) throws DAOException {
-        logger.debug("保存商户信息Instance 入参 info : {}",info);
+        logger.debug("保存商户信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStoreInfoInstance",info);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStoreInfoInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存商户信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     @Override
     public void saveStoreAttrsInstance(Map info) throws DAOException {
-        logger.debug("保存商户属性信息Instance 入参 info : {}",info);
+        logger.debug("保存商户属性信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStoreAttrsInstance",info);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStoreAttrsInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存商户属性信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     @Override
     public void saveStorePhotoInstance(Map info) throws DAOException {
-        logger.debug("保存商户照片信息Instance 入参 info : {}",info);
+        logger.debug("保存商户照片信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStorePhotoInstance",info);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStorePhotoInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户照片信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存商户照片信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     @Override
     public void saveStoreCerdentialsInstance(Map info) throws DAOException {
-        logger.debug("保存商户证件信息Instance 入参 info : {}",info);
+        logger.debug("保存商户证件信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStoreCerdentialsInstance",info);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStoreCerdentialsInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户证件信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存商户证件信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     /**
      * 查询商户信息(instance)
+     *
      * @param info bId 信息
      * @return
      * @throws DAOException
      */
     @Override
     public Map getStoreInfo(Map info) throws DAOException {
-        logger.debug("查询商户信息 入参 info : {}",info);
+        logger.debug("查询商户信息 入参 info : {}", info);
 
-        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStoreInfo",info);
-        if(businessStoreInfos == null || businessStoreInfos.size() == 0){
+        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStoreInfo", info);
+        if (businessStoreInfos == null || businessStoreInfos.size() == 0) {
             return null;
         }
-        if(businessStoreInfos.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:getStoreInfo,"+ JSONObject.toJSONString(info));
+        if (businessStoreInfos.size() > 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:getStoreInfo," + JSONObject.toJSONString(info));
         }
 
         return businessStoreInfos.get(0);
@@ -231,160 +245,170 @@ public class StoreServiceDaoImpl extends BaseServiceDao implements IStoreService
 
     /**
      * 商户属性查询(instance)
+     *
      * @param info bId 信息
      * @return
      * @throws DAOException
      */
     @Override
     public List<Map> getStoreAttrs(Map info) throws DAOException {
-        logger.debug("查询商户属性信息 入参 info : {}",info);
+        logger.debug("查询商户属性信息 入参 info : {}", info);
 
-        List<Map> storeAttrs = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStoreAttrs",info);
+        List<Map> storeAttrs = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStoreAttrs", info);
 
         return storeAttrs;
     }
 
     /**
      * 商户照片查询(instance)
+     *
      * @param info bId 信息
      * @return
      * @throws DAOException
      */
     @Override
     public List<Map> getStorePhoto(Map info) throws DAOException {
-        logger.debug("查询商户照片信息 入参 info : {}",info);
+        logger.debug("查询商户照片信息 入参 info : {}", info);
 
-        List<Map> storePhotos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStorePhoto",info);
+        List<Map> storePhotos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStorePhoto", info);
 
         return storePhotos;
     }
 
     /**
      * 商户证件查询(instance)
+     *
      * @param info bId 信息
      * @return
      * @throws DAOException
      */
     @Override
     public List<Map> getStoreCerdentials(Map info) throws DAOException {
-        logger.debug("查询商户证件信息 入参 info : {}",info);
+        logger.debug("查询商户证件信息 入参 info : {}", info);
 
-        List<Map> storeCerdentialses = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStoreCerdentials",info);
+        List<Map> storeCerdentialses = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStoreCerdentials", info);
 
         return storeCerdentialses;
     }
 
     /**
      * 修改商户信息
+     *
      * @param info 修改信息
      * @throws DAOException
      */
     @Override
     public void updateStoreInfoInstance(Map info) throws DAOException {
-        logger.debug("修改商户信息Instance 入参 info : {}",info);
+        logger.debug("修改商户信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStoreInfoInstance",info);
+        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStoreInfoInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改商户信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改商户信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     /**
      * 修改商户属性信息(instance)
+     *
      * @param info 修改信息
      * @throws DAOException
      */
     @Override
     public void updateStoreAttrInstance(Map info) throws DAOException {
-        logger.debug("修改商户属性信息Instance 入参 info : {}",info);
+        logger.debug("修改商户属性信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStoreAttrInstance",info);
+        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStoreAttrInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改商户属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改商户属性信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     /**
      * 修改 商户照片信息
+     *
      * @param info 修改信息
      * @throws DAOException
      */
     @Override
     public void updateStorePhotoInstance(Map info) throws DAOException {
-        logger.debug("修改商户照片信息Instance 入参 info : {}",info);
+        logger.debug("修改商户照片信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStorePhotoInstance",info);
+        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStorePhotoInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改商户照片信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改商户照片信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     /**
      * 修改商户证件信息
+     *
      * @param info 修改信息
      * @throws DAOException
      */
     @Override
     public void updateStoreCerdentailsInstance(Map info) throws DAOException {
-        logger.debug("修改商户证件信息Instance 入参 info : {}",info);
+        logger.debug("修改商户证件信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStoreCerdentailsInstance",info);
+        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStoreCerdentailsInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改商户证件信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改商户证件信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     /**
      * 商户成员加入信息
+     *
      * @param businessMemberStore 商户成员信息 封装
      * @throws DAOException 操作数据库异常
      */
-    public void saveBusinessMemberStore(Map businessMemberStore) throws DAOException{
-        logger.debug("商户成员加入 入参 businessMemberStore : {}",businessMemberStore);
+    public void saveBusinessMemberStore(Map businessMemberStore) throws DAOException {
+        logger.debug("商户成员加入 入参 businessMemberStore : {}", businessMemberStore);
 
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessMemberStore",businessMemberStore);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessMemberStore", businessMemberStore);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"商户成员加入失败:"+ JSONObject.toJSONString(businessMemberStore));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "商户成员加入失败:" + JSONObject.toJSONString(businessMemberStore));
         }
     }
 
     /**
      * 成员加入 保存信息至instance
+     *
      * @param info
      * @throws DAOException
      */
     @Override
     public void saveMemberStoreInstance(Map info) throws DAOException {
-        logger.debug("商户成员加入Instance 入参 info : {}",info);
+        logger.debug("商户成员加入Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveMemberStoreInstance",info);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveMemberStoreInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户照片信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存商户照片信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     /**
      * 查询商户成员加入信息(business过程)
      * 根据bId 查询商户信息
+     *
      * @param info bId 信息
      * @return 商户信息
      * @throws DAOException
      */
-    public Map getBusinessMemberStore(Map info) throws DAOException{
-        logger.debug("查询商户成员加入信息 入参 info : {}",info);
+    public Map getBusinessMemberStore(Map info) throws DAOException {
+        logger.debug("查询商户成员加入信息 入参 info : {}", info);
 
-        List<Map> businessMemberStores = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessMemberStore",info);
-        if(businessMemberStores == null || businessMemberStores.size() == 0){
+        List<Map> businessMemberStores = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessMemberStore", info);
+        if (businessMemberStores == null || businessMemberStores.size() == 0) {
             return null;
         }
-        if(businessMemberStores.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:businessMemberStore,"+ JSONObject.toJSONString(info));
+        if (businessMemberStores.size() > 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:businessMemberStore," + JSONObject.toJSONString(info));
         }
 
         return businessMemberStores.get(0);
@@ -393,123 +417,131 @@ public class StoreServiceDaoImpl extends BaseServiceDao implements IStoreService
     /**
      * 查询商户成员加入信息(instance过程)
      * 根据bId 查询商户信息
+     *
      * @param info bId 信息
      * @return 商户信息
      * @throws DAOException
      */
-    public Map getMemberStore(Map info) throws DAOException{
-        logger.debug("查询商户成员加入信息 入参 info : {}",info);
+    public Map getMemberStore(Map info) throws DAOException {
+        logger.debug("查询商户成员加入信息 入参 info : {}", info);
 
-        List<Map> memberStores = sqlSessionTemplate.selectList("storeServiceDaoImpl.getMemberStore",info);
-        if(memberStores == null || memberStores.size() == 0){
+        List<Map> memberStores = sqlSessionTemplate.selectList("storeServiceDaoImpl.getMemberStore", info);
+        if (memberStores == null || memberStores.size() == 0) {
             return null;
         }
-        if(memberStores.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:getMemberStore,"+ JSONObject.toJSONString(info));
+        if (memberStores.size() > 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:getMemberStore," + JSONObject.toJSONString(info));
         }
 
         return memberStores.get(0);
     }
+
     /**
      * 修改商户成员加入信息
+     *
      * @param info 修改信息
      * @throws DAOException
      */
-    public void updateMemberStoreInstance(Map info) throws DAOException{
-        logger.debug("修改商户成员加入信息Instance 入参 info : {}",info);
+    public void updateMemberStoreInstance(Map info) throws DAOException {
+        logger.debug("修改商户成员加入信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateMemberStoreInstance",info);
+        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateMemberStoreInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改商户成员加入信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改商户成员加入信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
 
     /**
      * 保存物业用户信息
+     *
      * @param info
      * @throws DAOException
      */
-    public void saveBusinessStoreUser(Map info) throws DAOException{
+    public void saveBusinessStoreUser(Map info) throws DAOException {
         info.put("month", DateUtil.getCurrentMonth());
-        logger.debug("保存物业用户信息入参 info : {}",info);
+        logger.debug("保存物业用户信息入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStoreUser",info);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStoreUser", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户用户信息数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存商户用户信息数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     /**
      * 查询物业用户信息
+     *
      * @param info bId 信息
      * @return 物业照片
      * @throws DAOException
      */
-    public List<Map> getBusinessStoreUser(Map info) throws DAOException{
-        logger.debug("查询商户用户信息 入参 info : {}",info);
+    public List<Map> getBusinessStoreUser(Map info) throws DAOException {
+        logger.debug("查询商户用户信息 入参 info : {}", info);
 
-        List<Map> businessPropertyUsers = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStoreUser",info);
+        List<Map> businessPropertyUsers = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStoreUser", info);
 
         return businessPropertyUsers;
     }
 
     /**
      * 保存 物业用户信息 Business数据到 Instance中
+     *
      * @param info
      * @throws DAOException
      */
-    public void saveStoreUserInstance(Map info) throws DAOException{
-        logger.debug("保存商户用户信息Instance 入参 info : {}",info);
+    public void saveStoreUserInstance(Map info) throws DAOException {
+        logger.debug("保存商户用户信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStoreUserInstance",info);
+        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStoreUserInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户用户信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存商户用户信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     /**
      * 查询物业用户信息(instance 过程)
+     *
      * @param info bId 信息
      * @return 物业照片
      * @throws DAOException
      */
-    public List<Map> getStoreUser(Map info) throws DAOException{
-        logger.debug("查询商户用户信息 入参 info : {}",info);
+    public List<Map> getStoreUser(Map info) throws DAOException {
+        logger.debug("查询商户用户信息 入参 info : {}", info);
 
-        List<Map> propertyUsers = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStoreUser",info);
+        List<Map> propertyUsers = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStoreUser", info);
 
         return propertyUsers;
     }
 
     /**
      * 修改物业用户信息
+     *
      * @param info 修改信息
      * @throws DAOException
      */
-    public void updateStoreUserInstance(Map info) throws DAOException{
-        logger.debug("修改商户用户信息Instance 入参 info : {}",info);
+    public void updateStoreUserInstance(Map info) throws DAOException {
+        logger.debug("修改商户用户信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStoreUserInstance",info);
+        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStoreUserInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改商户用户信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改商户用户信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
     @Override
     public List<Map> getStores(Map info) throws DAOException {
-        logger.debug("查询商户信息 入参 info : {}",info);
+        logger.debug("查询商户信息 入参 info : {}", info);
 
-        List<Map> propertyUsers = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStores",info);
+        List<Map> propertyUsers = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStores", info);
 
         return propertyUsers;
     }
 
-    public int getStoreCount(Map info) throws DAOException{
+    public int getStoreCount(Map info) throws DAOException {
         List<Map> stores = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStoreCount", info);
         if (stores.size() < 1) {
             return 0;

+ 8 - 8
service-store/src/main/java/com/java110/store/listener/SaveStoreInfoListener.java

@@ -220,7 +220,7 @@ public class SaveStoreInfoListener extends AbstractStoreBusinessServiceDataFlowL
      */
     private void doSaveBusinessStoreAttrs(Business business, JSONArray businessStoreAttrs) {
         JSONObject data = business.getDatas();
-        JSONObject businessStore = data.getJSONObject("businessStore");
+        JSONObject businessStore = data.getJSONObject(StorePo.class.getSimpleName());
         for (int storeAttrIndex = 0; storeAttrIndex < businessStoreAttrs.size(); storeAttrIndex++) {
             JSONObject storeAttr = businessStoreAttrs.getJSONObject(storeAttrIndex);
             Assert.jsonObjectHaveKey(storeAttr, "attrId", "businessStoreAttr 节点下没有包含 attrId 节点");
@@ -281,27 +281,27 @@ public class SaveStoreInfoListener extends AbstractStoreBusinessServiceDataFlowL
     private void flushStoreId(JSONObject data) {
 
         String storeId = GenerateCodeFactory.getStoreId();
-        JSONObject businessStore = data.getJSONObject("businessStore");
+        JSONObject businessStore = data.getJSONObject(StorePo.class.getSimpleName());
         businessStore.put("storeId", storeId);
         //刷商户属性
-        if (data.containsKey("businessStoreAttr")) {
-            JSONArray businessStoreAttrs = data.getJSONArray("businessStoreAttr");
+        if (data.containsKey(StoreAttrPo.class.getSimpleName())) {
+            JSONArray businessStoreAttrs = data.getJSONArray(StoreAttrPo.class.getSimpleName());
             for (int businessStoreAttrIndex = 0; businessStoreAttrIndex < businessStoreAttrs.size(); businessStoreAttrIndex++) {
                 JSONObject businessStoreAttr = businessStoreAttrs.getJSONObject(businessStoreAttrIndex);
                 businessStoreAttr.put("storeId", storeId);
             }
         }
         //刷 是商户照片 的 storeId
-        if (data.containsKey("businessStorePhoto")) {
-            JSONArray businessStorePhotos = data.getJSONArray("businessStorePhoto");
+        if (data.containsKey(StorePhotoPo.class.getSimpleName())) {
+            JSONArray businessStorePhotos = data.getJSONArray(StorePhotoPo.class.getSimpleName());
             for (int businessStorePhotoIndex = 0; businessStorePhotoIndex < businessStorePhotos.size(); businessStorePhotoIndex++) {
                 JSONObject businessStorePhoto = businessStorePhotos.getJSONObject(businessStorePhotoIndex);
                 businessStorePhoto.put("storeId", storeId);
             }
         }
         //刷 商户证件 的storeId
-        if (data.containsKey("businessStoreCerdentials")) {
-            JSONArray businessStoreCerdentialses = data.getJSONArray("businessStoreCerdentials");
+        if (data.containsKey(StoreCerdentialPo.class.getSimpleName())) {
+            JSONArray businessStoreCerdentialses = data.getJSONArray(StoreCerdentialPo.class.getSimpleName());
             for (int businessStoreCerdentialsIndex = 0; businessStoreCerdentialsIndex < businessStoreCerdentialses.size(); businessStoreCerdentialsIndex++) {
                 JSONObject businessStoreCerdentials = businessStoreCerdentialses.getJSONObject(businessStoreCerdentialsIndex);
                 businessStoreCerdentials.put("storeId", storeId);