| | |
| | | import com.java110.core.smo.store.IStoreInnerServiceSMO; |
| | | import com.java110.dto.store.StoreAttrDto; |
| | | import com.java110.dto.store.StoreDto; |
| | | import com.java110.po.org.OrgPo; |
| | | import com.java110.po.org.OrgStaffRelPo; |
| | | import com.java110.po.store.StoreAttrPo; |
| | | import com.java110.po.store.StoreCerdentialPo; |
| | | import com.java110.po.store.StorePhotoPo; |
| | | import com.java110.po.store.StorePo; |
| | | import com.java110.po.store.StoreUserPo; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | |
| | | businessStore.putAll(BeanConvertUtil.beanCovertMap(storeDtos.get(0))); |
| | | businessStore.putAll(paramInJson); |
| | | //计算 应收金额 |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessStore", businessStore); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(StorePo.class.getSimpleName(), businessStore); |
| | | return business; |
| | | } |
| | | |
| | |
| | | businessStoreUser.put("userId", paramInJson.getJSONObject("businessStore").getString("userId")); |
| | | businessStoreUser.put("relCd", StoreUserRelConstant.REL_ADMIN); |
| | | businessStoreUsers.add(businessStoreUser); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessStoreUser", businessStoreUsers); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(StoreUserPo.class.getSimpleName(), businessStoreUsers); |
| | | |
| | | return business; |
| | | } |
| | |
| | | |
| | | String storeId = GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_storeId); |
| | | paramObj.put("storeId", storeId); |
| | | if (paramObj.containsKey("businessStore")) { |
| | | JSONObject businessStoreObj = paramObj.getJSONObject("businessStore"); |
| | | if (paramObj.containsKey(StorePo.class.getSimpleName())) { |
| | | JSONObject businessStoreObj = paramObj.getJSONObject(StorePo.class.getSimpleName()); |
| | | businessStoreObj.put("storeId", storeId); |
| | | if (!businessStoreObj.containsKey("password")) { |
| | | String staffDefaultPassword = MappingCache.getValue(MappingConstant.KEY_STAFF_DEFAULT_PASSWORD); |
| | |
| | | } |
| | | } |
| | | |
| | | if (paramObj.containsKey("businessStoreAttr")) { |
| | | JSONArray attrs = paramObj.getJSONArray("businessStoreAttr"); |
| | | if (paramObj.containsKey(StoreAttrPo.class.getSimpleName())) { |
| | | JSONArray attrs = paramObj.getJSONArray(StoreAttrPo.class.getSimpleName()); |
| | | |
| | | for (int businessStoreAttrIndex = 0; businessStoreAttrIndex < attrs.size(); businessStoreAttrIndex++) { |
| | | JSONObject attr = attrs.getJSONObject(businessStoreAttrIndex); |
| | |
| | | } |
| | | } |
| | | |
| | | if (paramObj.containsKey("businessStorePhoto")) { |
| | | JSONArray photos = paramObj.getJSONArray("businessStorePhoto"); |
| | | if (paramObj.containsKey(StorePhotoPo.class.getSimpleName())) { |
| | | JSONArray photos = paramObj.getJSONArray(StorePhotoPo.class.getSimpleName()); |
| | | |
| | | for (int businessStorePhotoIndex = 0; businessStorePhotoIndex < photos.size(); businessStorePhotoIndex++) { |
| | | JSONObject attr = photos.getJSONObject(businessStorePhotoIndex); |
| | |
| | | } |
| | | } |
| | | |
| | | if (paramObj.containsKey("businessStoreCerdentials")) { |
| | | JSONArray cerdentials = paramObj.getJSONArray("businessStoreCerdentials"); |
| | | if (paramObj.containsKey(StoreCerdentialPo.class.getSimpleName())) { |
| | | JSONArray cerdentials = paramObj.getJSONArray(StoreCerdentialPo.class.getSimpleName()); |
| | | |
| | | for (int businessStoreCerdentialsIndex = 0; businessStoreCerdentialsIndex < cerdentials.size(); businessStoreCerdentialsIndex++) { |
| | | JSONObject attr = cerdentials.getJSONObject(businessStoreCerdentialsIndex); |
| | |
| | | businessOrg.put("allowOperation", "F"); |
| | | businessOrg.put("storeId", paramInJson.getString("storeId")); |
| | | //计算 应收金额 |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessOrg", businessOrg); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(OrgPo.class.getSimpleName(), businessOrg); |
| | | return business; |
| | | } |
| | | |
| | |
| | | businessOrg.put("allowOperation", "F"); |
| | | businessOrg.put("storeId", paramInJson.getString("storeId")); |
| | | //计算 应收金额 |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessOrg", businessOrg); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(OrgPo.class.getSimpleName(), businessOrg); |
| | | return business; |
| | | } |
| | | |
| | |
| | | businessOrg.put("storeId", paramInJson.getString("storeId")); |
| | | businessOrg.put("allowOperation", "F"); |
| | | //计算 应收金额 |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessOrg", businessOrg); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(OrgPo.class.getSimpleName(), businessOrg); |
| | | return business; |
| | | } |
| | | |
| | |
| | | businessOrgStaffRel.put("orgId", paramInJson.getString("levelThreeOrgId")); |
| | | businessOrgStaffRel.put("relCd", StoreUserRelConstant.REL_ADMIN); |
| | | businessOrgStaffRels.add(businessOrgStaffRel); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessOrgStaffRel", businessOrgStaffRels); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(OrgStaffRelPo.class.getSimpleName(), businessOrgStaffRels); |
| | | |
| | | return business; |
| | | } |