1、新增获取海葵云接口
This commit is contained in:
@@ -489,6 +489,9 @@ public class LyricIntegrateService {
|
||||
return response;
|
||||
}
|
||||
|
||||
public String getHkToken(String jobNo) {
|
||||
return getHKCloudToken(jobNo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.sdm.project.controller;
|
||||
|
||||
import com.sdm.common.common.SdmResponse;
|
||||
import com.sdm.outbridge.mode.GetProcessDataReq;
|
||||
import com.sdm.outbridge.service.lyric.LyricIntegrateService;
|
||||
import com.sdm.project.model.req.PushReportReq;
|
||||
import com.sdm.project.model.req.ep.EpProjectQueryReq;
|
||||
import com.sdm.project.model.req.ep.EpSyncPhaseReq;
|
||||
@@ -24,6 +25,9 @@ public class SimulationLyricNodeController {
|
||||
@Autowired
|
||||
private ILyricInternalService lyricInternalService;
|
||||
|
||||
@Autowired
|
||||
private LyricIntegrateService lyricIntegrateService;
|
||||
|
||||
@GetMapping("/updateApprovalStatus")
|
||||
@Operation(summary = "仿真节点审批状态更新", description = "仿真节点审批状态更新")
|
||||
public SdmResponse updateApprovalStatus(@RequestParam(value = "projectName") @Validated String projectName, @RequestParam(value = "workspaceName") @Validated String workspaceName, @RequestParam(value = "approvalStatus") @Validated Integer approvalStatus) {
|
||||
@@ -141,5 +145,16 @@ public class SimulationLyricNodeController {
|
||||
return lyricInternalService.syncPhase(req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取海葵云token
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getHkToken")
|
||||
@Operation(summary = "获取海葵云token", description = "获取海葵云token")
|
||||
public SdmResponse getHkToken(@RequestBody @Validated GetProcessDataReq req) {
|
||||
return lyricInternalService.getHkToken(req);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -35,4 +35,6 @@ public interface ILyricInternalService {
|
||||
|
||||
SdmResponse syncPhase(EpSyncPhaseReq req);
|
||||
|
||||
SdmResponse getHkToken(GetProcessDataReq req);
|
||||
|
||||
}
|
||||
|
||||
@@ -1367,11 +1367,20 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
// preTag = entry.getKey() = "tag1"
|
||||
String preTag = entry.getKey();
|
||||
log.info("preTag为:{}", preTag);
|
||||
try {
|
||||
// entry.getValue() = "uuid1,uuid2"
|
||||
setTagProperty(addNode, preTag, entry.getValue());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
if (NodeTypeEnum.WORKSPACE.getValue().equals(currentNodeType) && "tag4".equals(preTag)) {
|
||||
try {
|
||||
// entry.getValue() = "uuid1,uuid2"
|
||||
setTagProperty(addNode, preTag, addNode.getPid());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}else {
|
||||
try {
|
||||
// entry.getValue() = "uuid1,uuid2"
|
||||
setTagProperty(addNode, preTag, entry.getValue());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1417,4 +1426,17 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
return SdmResponse.success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdmResponse getHkToken(GetProcessDataReq req) {
|
||||
UserQueryReq userQueryReq = new UserQueryReq();
|
||||
userQueryReq.setUserId(ThreadLocalContext.getUserId());
|
||||
userQueryReq.setTenantId(ThreadLocalContext.getTenantId());
|
||||
SdmResponse<CIDUserResp> cidUserRespSdmResponse = sysUserFeignClient.queryUserDetail(userQueryReq);
|
||||
if (cidUserRespSdmResponse.getData() == null) {
|
||||
return SdmResponse.failed("根据工号获取username失败");
|
||||
}
|
||||
String token = lyricIntegrateService.getHkToken(cidUserRespSdmResponse.getData().getUsername());
|
||||
return SdmResponse.success(token);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user