|
@@ -2,10 +2,8 @@ import {IApiProcessor, ICachedData, IMethodParams, IRequest} from "@core/Defined
|
|
import {Resp} from "@util/Resp";
|
|
import {Resp} from "@util/Resp";
|
|
import {Oss} from "@util/Oss";
|
|
import {Oss} from "@util/Oss";
|
|
import {IdGen} from "@util/IdGen";
|
|
import {IdGen} from "@util/IdGen";
|
|
-import {PrjInfo} from "@core-models/PrjInfo";
|
|
|
|
import dayjs from "dayjs";
|
|
import dayjs from "dayjs";
|
|
import {PrjFile} from "@core-models/PrjFile";
|
|
import {PrjFile} from "@core-models/PrjFile";
|
|
-import {PrjFileCategory} from "@core-models/PrjFileCategory";
|
|
|
|
import {BpmnWork} from "@core-models/BpmnWork";
|
|
import {BpmnWork} from "@core-models/BpmnWork";
|
|
|
|
|
|
interface IData {
|
|
interface IData {
|
|
@@ -42,7 +40,7 @@ function get_upload_url(json: IRequest, params: IMethodParams, cached_data: ICac
|
|
id: object_name,
|
|
id: object_name,
|
|
filename: data.filename,
|
|
filename: data.filename,
|
|
creator_id: cached_data.user_id,
|
|
creator_id: cached_data.user_id,
|
|
- dependent_id: data.work_id
|
|
|
|
|
|
+ associate_work_id: data.work_id
|
|
}, {transaction: t});
|
|
}, {transaction: t});
|
|
|
|
|
|
let oss = Oss.get_instance('pmr-doc');
|
|
let oss = Oss.get_instance('pmr-doc');
|
|
@@ -57,7 +55,7 @@ function get_upload_url(json: IRequest, params: IMethodParams, cached_data: ICac
|
|
}
|
|
}
|
|
|
|
|
|
/// 检查工作项是否存在
|
|
/// 检查工作项是否存在
|
|
-function exists_guard(json: IRequest, cached_data: ICachedData): Promise<void> {
|
|
|
|
|
|
+function exists_guard(json: IRequest, _cached_data: ICachedData): Promise<void> {
|
|
return new Promise<void>(async (resolve, reject) => {
|
|
return new Promise<void>(async (resolve, reject) => {
|
|
let data = <IData>json.data;
|
|
let data = <IData>json.data;
|
|
let work = await BpmnWork.findOne({where: {id: data.work_id}, raw: true});
|
|
let work = await BpmnWork.findOne({where: {id: data.work_id}, raw: true});
|