fix[project]: 修改对接MES接口的选择确认人逻辑
This commit is contained in:
@@ -245,6 +245,7 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
|
||||
// 用于判断查询事业部用户信息的一些常量
|
||||
private static final String DESIGN_PHASE = "设计";
|
||||
private static final String UN_DESIGN_PHASE = "非设计";
|
||||
private static final String STRUCTURE = "结构仿真";
|
||||
private static final String TECHNOLOGY_CENTER = "技术中心";
|
||||
|
||||
@@ -4720,25 +4721,17 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
* @param projectUndertaker
|
||||
* @return
|
||||
*/
|
||||
private SysDeptUserResp queryMemberByGroup(String projectUndertaker, String currenPhase) {
|
||||
String deptName;
|
||||
if (DESIGN_PHASE.equals(currenPhase)) {
|
||||
deptName = projectUndertaker + "-" + STRUCTURE;
|
||||
} else {
|
||||
deptName = projectUndertaker + "-" + STRUCTURE + "-" + TECHNOLOGY_CENTER;
|
||||
}
|
||||
// 待调用system的查询部门用户feign接口
|
||||
private SysDeptUserResp queryMemberByGroup(String projectUndertaker, String currentPhase) {
|
||||
DeptQueryReq req = new DeptQueryReq();
|
||||
req.setDeptName(deptName);
|
||||
req.setCurrent(1);
|
||||
req.setSize(1);
|
||||
log.info("listDept params:{}", req);
|
||||
SdmResponse<PageDataResp<List<SysDeptUserResp>>> pageDataRespSdmResponse = sysDeptFeignClient.listDept(req);
|
||||
SysDeptUserResp sysDeptUserResp = null;
|
||||
if (pageDataRespSdmResponse.isSuccess()) {
|
||||
sysDeptUserResp = pageDataRespSdmResponse.getData().getData().get(0);
|
||||
req.setDeptName(projectUndertaker);
|
||||
req.setDiscipline(STRUCTURE);
|
||||
SdmResponse<List<SysDeptUserResp>> resp = sysDeptFeignClient.queryByDeptAndDiscipline(req);
|
||||
List<SysDeptUserResp> userRespList = resp.getData();
|
||||
if (!resp.isSuccess() || CollectionUtils.isEmpty(userRespList)) {
|
||||
return null;
|
||||
}
|
||||
return sysDeptUserResp;
|
||||
String stage = DESIGN_PHASE.equals(currentPhase) ? DESIGN_PHASE : UN_DESIGN_PHASE;
|
||||
return userRespList.stream().filter(userResp -> stage.equals(userResp.getStage())).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
private List<SpdmProjectNodeEditReq> syncProjectInfo(LyricVProjectToDM lyricVProjectToDM, Long tenantId, Long userId, String jobNumber, String userName) {
|
||||
|
||||
Reference in New Issue
Block a user