|
@@ -188,15 +188,24 @@ ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId
|
|
|
//data.updateData.property.basicInformation = basicInformation;
|
|
//data.updateData.property.basicInformation = basicInformation;
|
|
|
//工程特征
|
|
//工程特征
|
|
|
if(data.updateData.property.featureLibID){
|
|
if(data.updateData.property.featureLibID){
|
|
|
|
|
+ const matchedConstructionProject = datas.find(item => item.updateData.projType === projectType.project);
|
|
|
|
|
+ let constructionProjectName = '';
|
|
|
|
|
+ if (matchedConstructionProject) {
|
|
|
|
|
+ constructionProjectName = matchedConstructionProject.updateData.name;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ const findConstructionProject = await Projects.findOne({ ID: data.updateData.ParentID }).lean();
|
|
|
|
|
+ constructionProjectName = findConstructionProject && findConstructionProject.name || '';
|
|
|
|
|
+ }
|
|
|
//项目类别(valuationType)、养护类别(engineering)、费用标准(feeStandard)根据新建分选的选项去赋值
|
|
//项目类别(valuationType)、养护类别(engineering)、费用标准(feeStandard)根据新建分选的选项去赋值
|
|
|
let assign = {
|
|
let assign = {
|
|
|
valuationType: data.updateData.property.valuationType === ValuationType.BUDGET ? '预算' : '工程量清单',
|
|
valuationType: data.updateData.property.valuationType === ValuationType.BUDGET ? '预算' : '工程量清单',
|
|
|
engineering: data.updateData.property.engineeringName,
|
|
engineering: data.updateData.property.engineeringName,
|
|
|
feeStandard: data.updateData.property.feeStandardName,
|
|
feeStandard: data.updateData.property.feeStandardName,
|
|
|
- // 新建分段文件时,默认将“工程特征”-“单项工程名称”、“编制范围”填写分段文件的名称
|
|
|
|
|
|
|
+ // 新建分段文件时,默认将“编制范围”填写分段文件的名称
|
|
|
// 为了防止用户漏填,导出电子招标文件时,有数据
|
|
// 为了防止用户漏填,导出电子招标文件时,有数据
|
|
|
compilationScope: data.updateData.name,
|
|
compilationScope: data.updateData.name,
|
|
|
- singleProjName: data.updateData.name,
|
|
|
|
|
|
|
+ // 新建分段文件时,默认将“工程特征”-“单项工程名称”填写建设项目名称
|
|
|
|
|
+ singleProjName: constructionProjectName,
|
|
|
};
|
|
};
|
|
|
data.updateData.property.projectFeature = await pmFacade.getProjectFeature(data.updateData.property.featureLibID, assign);
|
|
data.updateData.property.projectFeature = await pmFacade.getProjectFeature(data.updateData.property.featureLibID, assign);
|
|
|
}
|
|
}
|