feat: 根据组织编码获取组织信息

release
liufeilong 2 years ago
parent 570e93344f
commit b9c967314f
  1. 9
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/config/UserCenterConfig.java
  2. 8
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/thirdservice/user/service/UserInfoService.java
  3. 26
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/thirdservice/user/service/impl/UserInfoServiceImpl.java

@ -117,6 +117,15 @@ public class UserCenterConfig {
public String configQueryBigBOrgInfoByCode() { public String configQueryBigBOrgInfoByCode() {
return dbUserInfoUrl + "/api/dept/queryOrgInfoByCode"; return dbUserInfoUrl + "/api/dept/queryOrgInfoByCode";
} }
/**
* 根据组织编码获取销方信息
*
* @return
*/
public String configQueryBigBOrgInfoByEnterpriseNumbers() {
return dbUserInfoUrl + "/api/dept/queryDeptInfoByEnterpriseNumber";
}
/** /**
* 推送大B日志消息 * 推送大B日志消息

@ -78,6 +78,14 @@ public interface UserInfoService {
* @return * @return
*/ */
DeptEntity querySysDeptEntityByTaxplayercode(String taxpayerCode); DeptEntity querySysDeptEntityByTaxplayercode(String taxpayerCode);
/**
* 根据组织编号获取组织信息
*
* @param enterpriseNumbers
* @return
*/
DeptEntity querySysDeptEntityByEnterpriseNumbers(String enterpriseNumbers);
/** /**
* 获取企业初始化信息 * 获取企业初始化信息

@ -264,7 +264,31 @@ public class UserInfoServiceImpl implements UserInfoService {
} }
return null; return null;
} }
@Override
public DeptEntity querySysDeptEntityByEnterpriseNumbers(String enterpriseNumbers) {
Map<String, String> paraMap = new HashMap<>(2);
paraMap.put("enterpriseNumber", enterpriseNumbers);
Map<String, String> headMap = new HashMap<>(2);
headMap.put("Content-Type", ConfigureConstant.STRING_APPLICATION_JSON);
try {
String queryTaxInfo = userCenterConfig.configQueryBigBOrgInfoByEnterpriseNumbers();
log.info("{},获取企业信息的接口,url:{},入参:{}", LOGGER_MSG, queryTaxInfo, JsonUtils.getInstance().toJsonString(paraMap));
String result = HttpUtils.doPostWithHeader(queryTaxInfo, JsonUtils.getInstance().toJsonString(paraMap), headMap);
log.info("{}调用用户信息获取信息为:{}", LOGGER_MSG, result);
if (StringUtils.isNotBlank(result)) {
JSONObject jsonObject = JSON.parseObject(result);
if (!jsonObject.isEmpty() && ConfigureConstant.STRING_0000.equals(jsonObject.get(OrderManagementConstant.CODE))) {
return JsonUtils.getInstance().parseObject(jsonObject.getString(OrderManagementConstant.DATA), DeptEntity.class);
}
}
} catch (Exception e) {
log.error("{}调用用户信息获取服务异常:{}", LOGGER_MSG, e);
return null;
}
return null;
}
@Override @Override
public DeptEntity querySysDeptEntityFromUrl(String taxpayerCode, String taxpayerName, String entId) { public DeptEntity querySysDeptEntityFromUrl(String taxpayerCode, String taxpayerName, String entId) {
Map<String, String> paraMap = new HashMap<>(2); Map<String, String> paraMap = new HashMap<>(2);

Loading…
Cancel
Save