|
|
|
|
@@ -2559,7 +2559,7 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
|
|
|
|
String approveContents = JSONObject.toJSONString(req);
|
|
|
|
|
int approveAction = 2;
|
|
|
|
|
// 发起评审
|
|
|
|
|
if(launchTaskPoolApprove(req.approveTemplateId,req.approveTemplateName,approveContents,approveAction)) {
|
|
|
|
|
if(launchDesignApprove(req.approveTemplateId,req.approveTemplateName,approveContents,approveAction)) {
|
|
|
|
|
return SdmResponse.success();
|
|
|
|
|
} else {
|
|
|
|
|
return SdmResponse.failed("发起评审失败");
|
|
|
|
|
@@ -2602,9 +2602,10 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
|
|
|
|
newDesignVersion.setCreator(userId);
|
|
|
|
|
newDesignVersion.setVersionContents(viewContents);
|
|
|
|
|
newDesignVersion.setBeforeContents(beforeContents);
|
|
|
|
|
newDesignVersion.setCidFlowId(req.getCidFlowId());
|
|
|
|
|
simulationDesignVersionsService.save(newDesignVersion);
|
|
|
|
|
} else {
|
|
|
|
|
addNewVersion(req.getProjectNodeId(), req.getPhaseNodeId(), "V1.0", viewContents, userId);
|
|
|
|
|
addNewVersion(req.getProjectNodeId(), req.getPhaseNodeId(), "V1.0", viewContents, userId, req.getCidFlowId());
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return SdmResponse.failed("获取不到任务树");
|
|
|
|
|
@@ -2642,9 +2643,10 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
|
|
|
|
.eq(SimulationDesignVersions::getCurrentVersion, latestVersion)
|
|
|
|
|
.set(SimulationDesignVersions::getVersionContents, viewContents)
|
|
|
|
|
.set(SimulationDesignVersions::getBeforeContents, beforeContents)
|
|
|
|
|
.set(ObjectUtils.isNotEmpty(req.getCidFlowId()), SimulationDesignVersions::getCidFlowId, req.getCidFlowId())
|
|
|
|
|
.update();
|
|
|
|
|
} else {
|
|
|
|
|
addNewVersion(req.getProjectNodeId(), req.getPhaseNodeId(),"V1.0", viewContents, userId);
|
|
|
|
|
addNewVersion(req.getProjectNodeId(), req.getPhaseNodeId(),"V1.0", viewContents, userId, req.getCidFlowId());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -2661,13 +2663,14 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
|
|
|
|
getTaskTreeReq.setTagMap(tagList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addNewVersion(String projectId, String phaseId, String version, String viewContents, Long userId) {
|
|
|
|
|
private void addNewVersion(String projectId, String phaseId, String version, String viewContents, Long userId, String cidFlowId) {
|
|
|
|
|
SimulationDesignVersions designVersions = new SimulationDesignVersions();
|
|
|
|
|
designVersions.setProjectId(projectId);
|
|
|
|
|
designVersions.setPhaseId(phaseId);
|
|
|
|
|
designVersions.setCurrentVersion(version);
|
|
|
|
|
designVersions.setVersionContents(viewContents);
|
|
|
|
|
designVersions.setCreator(userId);
|
|
|
|
|
designVersions.setCidFlowId(cidFlowId);
|
|
|
|
|
simulationDesignVersionsService.save(designVersions);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2798,7 +2801,7 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
|
|
|
|
/**
|
|
|
|
|
* 发起仿真策划评审
|
|
|
|
|
*/
|
|
|
|
|
private boolean launchTaskPoolApprove(String templateId, String templateName,String approveContents,int approveAction)
|
|
|
|
|
private boolean launchDesignApprove(String templateId, String templateName,String approveContents,int approveAction)
|
|
|
|
|
{
|
|
|
|
|
LaunchApproveReq req = new LaunchApproveReq();
|
|
|
|
|
req.templateId = templateId;
|
|
|
|
|
@@ -2835,6 +2838,7 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
|
|
|
|
if(req != null) {
|
|
|
|
|
// 清除上次评审标记
|
|
|
|
|
req.setBApprove(false);
|
|
|
|
|
req.setCidFlowId(approveReq.cidFlowId);
|
|
|
|
|
modifyWithApprove(req);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|