|
@@ -153,8 +153,8 @@ public class AccountUtils {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 根据营业执照号获得企业信息
|
|
|
|
|
- * @param spaceName 营业执照号
|
|
|
|
|
|
|
+ * 根据企业名获得企业信息
|
|
|
|
|
+ * @param spaceName 企业名
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
public UserSpaceView findBySpaceName(String spaceName) throws Exception {
|
|
public UserSpaceView findBySpaceName(String spaceName) throws Exception {
|
|
@@ -240,7 +240,7 @@ public class AccountUtils {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 统计该企业审批记录数量
|
|
|
|
|
|
|
+ * 统计该企业申请记录数量
|
|
|
* @param spaceUU 企业uu号
|
|
* @param spaceUU 企业uu号
|
|
|
* @return
|
|
* @return
|
|
|
* @throws Exception
|
|
* @throws Exception
|
|
@@ -338,7 +338,7 @@ public class AccountUtils {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 根据用户uu号获取用户信息
|
|
|
|
|
|
|
+ * 根据企业uu号获取企业信息
|
|
|
* @param spaceUU 企业uu号
|
|
* @param spaceUU 企业uu号
|
|
|
* @return
|
|
* @return
|
|
|
* @throws Exception
|
|
* @throws Exception
|
|
@@ -827,91 +827,74 @@ public class AccountUtils {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// /**
|
|
|
|
|
-// * ERP、SAAS新开账套名称校验
|
|
|
|
|
-// *
|
|
|
|
|
-// * @param name
|
|
|
|
|
-// * @return
|
|
|
|
|
-// * @throws Exception
|
|
|
|
|
-// */
|
|
|
|
|
-// public static String validName(String name) throws Exception {
|
|
|
|
|
-// String result = null;
|
|
|
|
|
-// String url = AccountConfig.getSpaceSaveUrl();
|
|
|
|
|
-// if (!StringUtils.isEmpty(url)) {
|
|
|
|
|
-// ResponseWrap res = HttpUtil.doGet(url, new ModelMap("_operate", "validName").addAttribute("name", name),
|
|
|
|
|
-// 50);
|
|
|
|
|
-// if (!res.isSuccess())
|
|
|
|
|
-// throw new Exception(res.getContent());
|
|
|
|
|
-// else
|
|
|
|
|
-// result = res.getContent();
|
|
|
|
|
-// }
|
|
|
|
|
-// return result;
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// /**
|
|
|
|
|
-// * ERP、SAAS新开账套名称校验
|
|
|
|
|
-// *
|
|
|
|
|
-// * @param businessCode
|
|
|
|
|
-// * @return
|
|
|
|
|
-// * @throws Exception
|
|
|
|
|
-// */
|
|
|
|
|
-// public static String validBusinessCode(String businessCode) throws Exception {
|
|
|
|
|
-// String result = null;
|
|
|
|
|
-// String url = AccountConfig.getSpaceSaveUrl();
|
|
|
|
|
-// if (!StringUtils.isEmpty(url)) {
|
|
|
|
|
-// ResponseWrap res = HttpUtil.doGet(url,
|
|
|
|
|
-// new ModelMap("_operate", "validBusinessCode").addAttribute("businessCode", businessCode), 50);
|
|
|
|
|
-// if (!res.isSuccess())
|
|
|
|
|
-// throw new Exception(res.getContent());
|
|
|
|
|
-// else
|
|
|
|
|
-// result = res.getContent();
|
|
|
|
|
-// }
|
|
|
|
|
-// return result;
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// /**
|
|
|
|
|
-// * 通过营业执照号查找 企业详细信息
|
|
|
|
|
-// *
|
|
|
|
|
-// * @param
|
|
|
|
|
-// * @return
|
|
|
|
|
-// * @throws Exception
|
|
|
|
|
-// */
|
|
|
|
|
-// public static UserSpaceDetail findByBusinessCode(String businessCode) throws Exception {
|
|
|
|
|
-// String result = null;
|
|
|
|
|
-// String url = AccountConfig.getSpaceSaveUrl();
|
|
|
|
|
-// if (!StringUtils.isEmpty(url)) {
|
|
|
|
|
-// ResponseWrap res = HttpUtil.doGet(url,
|
|
|
|
|
-// new ModelMap("_operate", "findByBusinessCode").addAttribute("businessCode", businessCode), 50);
|
|
|
|
|
-// if (!res.isSuccess())
|
|
|
|
|
-// throw new Exception(res.getContent());
|
|
|
|
|
-// else
|
|
|
|
|
-// result = res.getContent();
|
|
|
|
|
-// }
|
|
|
|
|
-// return JSON.parseObject(result,UserSpaceDetail.class);
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// /**
|
|
|
|
|
-// * ERP、SAAS新开账套
|
|
|
|
|
-// *
|
|
|
|
|
-// * @param userSpaceDetail
|
|
|
|
|
-// * @param users
|
|
|
|
|
-// * @throws Exception
|
|
|
|
|
-// */
|
|
|
|
|
-// public static String applyApp(UserSpaceDetail userSpaceDetail, List<UserDetail> users) throws Exception {
|
|
|
|
|
-// String url = AccountConfig.getSpaceSaveUrl();
|
|
|
|
|
-// String result = null;
|
|
|
|
|
-// if (!StringUtils.isEmpty(url)) {
|
|
|
|
|
-// ResponseWrap res = HttpUtil.doPost(url, new ModelMap("_operate", "registerBranchAccount")
|
|
|
|
|
-// .addAttribute("detail", JSON.toJSON(userSpaceDetail))
|
|
|
|
|
-// .addAttribute("userInfos", JSON.toJSON(users)));
|
|
|
|
|
-// if (!res.isSuccess())
|
|
|
|
|
-// throw new Exception(res.getContent());
|
|
|
|
|
-// else
|
|
|
|
|
-// result = res.getContent();
|
|
|
|
|
-// }
|
|
|
|
|
-// return result;
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * ERP、SAAS新开账套名称校验
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param name
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @throws Exception
|
|
|
|
|
+ */
|
|
|
|
|
+ public static String validName(String name) throws Exception {
|
|
|
|
|
+ String result = null;
|
|
|
|
|
+ String url = AccountConfig.getSpaceSaveUrl();
|
|
|
|
|
+ if (!StringUtils.isEmpty(url)) {
|
|
|
|
|
+ HttpUtil.ResponseWrap res = HttpUtil.doGet(url, new ModelMap("_operate", "validName").addAttribute("name", name),
|
|
|
|
|
+ 50);
|
|
|
|
|
+ if (!res.isSuccess()) {
|
|
|
|
|
+ throw new Exception(res.getContent());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ result = res.getContent();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * ERP、SAAS新开账套名称校验
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param businessCode
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @throws Exception
|
|
|
|
|
+ */
|
|
|
|
|
+ public static String validBusinessCode(String businessCode) throws Exception {
|
|
|
|
|
+ String result = null;
|
|
|
|
|
+ String url = AccountConfig.getSpaceSaveUrl();
|
|
|
|
|
+ if (!StringUtils.isEmpty(url)) {
|
|
|
|
|
+ HttpUtil.ResponseWrap res = HttpUtil.doGet(url,
|
|
|
|
|
+ new ModelMap("_operate", "validBusinessCode").addAttribute("businessCode", businessCode), 50);
|
|
|
|
|
+ if (!res.isSuccess()) {
|
|
|
|
|
+ throw new Exception(res.getContent());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ result = res.getContent();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * ERP、SAAS新开账套
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param userSpaceDetail
|
|
|
|
|
+ * @param users
|
|
|
|
|
+ * @throws Exception
|
|
|
|
|
+ */
|
|
|
|
|
+ public static String applyApp(UserSpaceView userSpaceDetail, List<UserView> users) throws Exception {
|
|
|
|
|
+ String url = AccountConfig.getSpaceSaveUrl();
|
|
|
|
|
+ String result = null;
|
|
|
|
|
+ if (!StringUtils.isEmpty(url)) {
|
|
|
|
|
+ HttpUtil.ResponseWrap res = HttpUtil.doPost(url, new ModelMap("_operate", "registerBranchAccount")
|
|
|
|
|
+ .addAttribute("detail", JSON.toJSON(userSpaceDetail))
|
|
|
|
|
+ .addAttribute("userInfos", JSON.toJSON(users)));
|
|
|
|
|
+ if (!res.isSuccess()) {
|
|
|
|
|
+ throw new Exception(res.getContent());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ result = res.getContent();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// /**
|
|
// /**
|
|
|
// * 商城个人账号增加企业注册
|
|
// * 商城个人账号增加企业注册
|
|
|
// *
|
|
// *
|