fix[project]: 修改对接MES接口的选择确认人逻辑

This commit is contained in:
2026-04-15 17:57:16 +08:00
parent f67487e3ae
commit c7e4ec9557

View File

@@ -245,6 +245,7 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
// 用于判断查询事业部用户信息的一些常量 // 用于判断查询事业部用户信息的一些常量
private static final String DESIGN_PHASE = "设计"; private static final String DESIGN_PHASE = "设计";
private static final String UN_DESIGN_PHASE = "非设计";
private static final String STRUCTURE = "结构仿真"; private static final String STRUCTURE = "结构仿真";
private static final String TECHNOLOGY_CENTER = "技术中心"; private static final String TECHNOLOGY_CENTER = "技术中心";
@@ -4720,25 +4721,17 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
* @param projectUndertaker * @param projectUndertaker
* @return * @return
*/ */
private SysDeptUserResp queryMemberByGroup(String projectUndertaker, String currenPhase) { private SysDeptUserResp queryMemberByGroup(String projectUndertaker, String currentPhase) {
String deptName;
if (DESIGN_PHASE.equals(currenPhase)) {
deptName = projectUndertaker + "-" + STRUCTURE;
} else {
deptName = projectUndertaker + "-" + STRUCTURE + "-" + TECHNOLOGY_CENTER;
}
// 待调用system的查询部门用户feign接口
DeptQueryReq req = new DeptQueryReq(); DeptQueryReq req = new DeptQueryReq();
req.setDeptName(deptName); req.setDeptName(projectUndertaker);
req.setCurrent(1); req.setDiscipline(STRUCTURE);
req.setSize(1); SdmResponse<List<SysDeptUserResp>> resp = sysDeptFeignClient.queryByDeptAndDiscipline(req);
log.info("listDept params{}", req); List<SysDeptUserResp> userRespList = resp.getData();
SdmResponse<PageDataResp<List<SysDeptUserResp>>> pageDataRespSdmResponse = sysDeptFeignClient.listDept(req); if (!resp.isSuccess() || CollectionUtils.isEmpty(userRespList)) {
SysDeptUserResp sysDeptUserResp = null; return null;
if (pageDataRespSdmResponse.isSuccess()) {
sysDeptUserResp = pageDataRespSdmResponse.getData().getData().get(0);
} }
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) { private List<SpdmProjectNodeEditReq> syncProjectInfo(LyricVProjectToDM lyricVProjectToDM, Long tenantId, Long userId, String jobNumber, String userName) {