Commit ee44a087 authored by tianbo's avatar tianbo

修改提交

parent 359f4c40
......@@ -216,4 +216,12 @@ public interface IOrgUsrService {
* @return
*/
List<OrgUsrExcelDto> exportPersonToExcelByParentId(Long parentId);
/**
* 根据机场人员id获取amos账号id
*
* @param orgUserId
* @return
*/
String getAmosIdByOrgUserId(String orgUserId) throws Exception;
}
......@@ -478,5 +478,16 @@ public class OrgUsrController extends BaseController {
return ResponseHelper.buildResponse(iOrgUsrService.amosIdExist(amosId));
}
/**
* 根据机场人员id获取amos平台人员id
*
* @param
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/amos/{orgUserId}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据机场人员id获取amos平台人员id", notes = "根据机场人员id获取amos平台人员id")
public ResponseModel<String> getAmosIdByOrgUserId(@PathVariable String orgUserId) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.getAmosIdByOrgUserId(orgUserId));
}
}
\ No newline at end of file
......@@ -32,6 +32,7 @@ import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import javax.annotation.Resource;
......@@ -1539,6 +1540,15 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return true;
}
@Override
public String getAmosIdByOrgUserId(String orgUserId) throws Exception {
OrgUsr orgUsr = this.baseMapper.selectOne(new LambdaQueryWrapper<OrgUsr>().eq(OrgUsr::getSequenceNbr,
orgUserId));
if (ValidationUtil.isEmpty(orgUsr)) {
throw new Exception("账号不存在");
}
return orgUsr.getAmosOrgId();
}
}
package com.yeejoin.amos.latentdanger.business.feign;
import com.yeejoin.amos.boot.module.common.api.feign.MultipartSupportConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
/**
* 机场服务feign
*
* @author Dell
*/
@FeignClient(name = "${jcs.fegin.name}", path = "jcs", configuration = {MultipartSupportConfig.class})
public interface JcsFeignClient {
/**
* 根据机场人员id获取amos平台人员id
**/
@RequestMapping(value = "/org-usr/amos/{orgUserId}", method = RequestMethod.GET)
ResponseModel<String> getAmosIdByUserId(@PathVariable String orgUserId);
}
......@@ -90,4 +90,5 @@ file.url=http://39.98.45.134:9000/
iot.fegin.name=AMOS-API-IOT
control.fegin.name=JCS-API-CONTROL
supervision.feign.name=AMOS-SUPERVISION-API
\ No newline at end of file
supervision.feign.name=AMOS-SUPERVISION-API
jcs.fegin.name=JCS-tb
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment