|
@@ -41,6 +41,8 @@ let fileType = {
|
|
|
let ProjectsDAO = function () {
|
|
|
};
|
|
|
|
|
|
+let G_FILE_VER = '1.0.1';
|
|
|
+
|
|
|
ProjectsDAO.prototype.getUserProjects = async function (userId, compilation, callback) {
|
|
|
try {
|
|
|
let projects = await Projects.find({
|
|
@@ -105,6 +107,7 @@ ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId
|
|
|
data.updateData['userID'] = userId;
|
|
|
data.updateData['compilation'] = compilationId;
|
|
|
data.updateData['createDateTime'] = new Date();
|
|
|
+ data.updateData['fileVer'] = G_FILE_VER;
|
|
|
// 如果没有选中单价文件则新增单价文件
|
|
|
if (data.updateData.projType === projectType.tender && data.updateData.property !== null &&
|
|
|
Object.keys(data.updateData.property.unitPriceFile).length > 0 &&
|
|
@@ -313,6 +316,7 @@ ProjectsDAO.prototype.copyUserProjects = function (userId, compilationId, datas,
|
|
|
data.updateData['userID'] = userId;
|
|
|
data.updateData['compilation'] = compilationId;
|
|
|
data.updateData['createDateTime'] = new Date();
|
|
|
+ data.updateData['fileVer'] = G_FILE_VER;
|
|
|
let newProject = new Projects(data.updateData);
|
|
|
newProject['srcProjectId'] = data.srcProjectId;
|
|
|
newProject.save(function (err, result) {
|