fix:任务新增提出人

This commit is contained in:
2026-01-26 20:34:49 +08:00
parent b1120b4376
commit d048efe94d
4 changed files with 41 additions and 0 deletions

View File

@@ -120,6 +120,16 @@ public class SpdmTaskVo extends BaseEntity {
*/
private String demandId;
/**
* 关联的需求提出人
*/
private String submitter;
/**
* 关联的需求提出人名称
*/
private String submitterName;
/**
* 仿真负责人
*/

View File

@@ -111,6 +111,10 @@ public class SpdmDemandVo extends BaseEntity {
private String demandType;
private String simType;
/**
* 需求备注
*/
private String description;
/**
* 3D负责人

View File

@@ -1,5 +1,6 @@
package com.sdm.project.model.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.sdm.common.entity.pojo.BaseEntity;
@@ -160,6 +161,16 @@ public class SpdmNewTaskVo extends BaseEntity {
*/
private String demandName;
/**
* 关联的需求提出人
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long submitter;
/**
* 关联的需求提出人名称
*/
private String submitterName;

View File

@@ -403,11 +403,13 @@ public class TaskServiceImpl implements ITaskService {
if (CollectionUtils.isNotEmpty(taskList)) {
List<String> demandIdList = taskList.stream().map(SpdmTaskVo::getDemandId).toList();
Map<String, String> demandMap = Map.of();
Map<String, Long> demandSubmitMap = Map.of();
if (CollectionUtils.isNotEmpty(demandIdList)) {
// 根据demandId查询demandName
List<SpdmDemandVo> demandVoList = demandMapper.getDemandListById(demandIdList);
if (CollectionUtils.isNotEmpty(demandVoList)) {
demandMap = demandVoList.stream().collect(Collectors.toMap(SpdmDemandVo::getUuid, SpdmDemandVo::getDemandName));
demandSubmitMap = demandVoList.stream().collect(Collectors.toMap(SpdmDemandVo::getUuid, SpdmDemandVo::getCreator));
}
}
for (SpdmTaskVo taskVo : taskList) {
@@ -428,6 +430,12 @@ public class TaskServiceImpl implements ITaskService {
spdmNewTaskVo.setExtras(taskExtraMap.get(taskVo.getUuid()));
if (StringUtils.isNotBlank(spdmNewTaskVo.getDemandId())) {
spdmNewTaskVo.setDemandName(demandMap.get(spdmNewTaskVo.getDemandId()));
// 任务列表新增提出人(关联的需求创建人)
spdmNewTaskVo.setSubmitter(demandSubmitMap.get(spdmNewTaskVo.getDemandId()));
SdmResponse<CIDUserResp> cidUserResp = sysUserFeignClient.queryUserDetail(UserQueryReq.builder().userId(userId).build());
if (ObjectUtils.isNotEmpty(cidUserResp.getData())) {
spdmNewTaskVo.setSubmitterName(cidUserResp.getData().getNickname());
}
}
newTaskList.add(spdmNewTaskVo);
}
@@ -544,11 +552,13 @@ public class TaskServiceImpl implements ITaskService {
}
List<String> demandIdList = taskList.stream().map(SpdmTaskVo::getDemandId).toList();
Map<String, String> demandMap = Map.of();
Map<String, Long> demandSubmitMap = Map.of();
if (CollectionUtils.isNotEmpty(demandIdList)) {
// 根据demandId查询demandName
List<SpdmDemandVo> demandVoList = demandMapper.getDemandListById(demandIdList);
if (CollectionUtils.isNotEmpty(demandVoList)) {
demandMap = demandVoList.stream().collect(Collectors.toMap(SpdmDemandVo::getUuid, SpdmDemandVo::getDemandName));
demandSubmitMap = demandVoList.stream().collect(Collectors.toMap(SpdmDemandVo::getUuid, SpdmDemandVo::getCreator));
}
}
for (SpdmTaskVo spdmTaskVo : taskList) {
@@ -674,6 +684,12 @@ public class TaskServiceImpl implements ITaskService {
spdmNewTaskVo.setExtras(taskExtraMap.get(taskVo.getUuid()));
if (StringUtils.isNotBlank(spdmNewTaskVo.getDemandId())) {
spdmNewTaskVo.setDemandName(demandMap.get(spdmNewTaskVo.getDemandId()));
// 任务列表新增提出人(关联的需求创建人)
spdmNewTaskVo.setSubmitter(demandSubmitMap.get(spdmNewTaskVo.getDemandId()));
SdmResponse<CIDUserResp> cidUserResp = sysUserFeignClient.queryUserDetail(UserQueryReq.builder().userId(userId).build());
if (ObjectUtils.isNotEmpty(cidUserResp.getData())) {
spdmNewTaskVo.setSubmitterName(cidUserResp.getData().getNickname());
}
}
// 设置工位号
setWorkSpaceNodeCode(spdmNewTaskVo,taskVo,allNodeMap,taskNodeTag);