|
|
@@ -84,3 +84,49 @@ export interface IBulkWrite<T extends IAny> {
|
|
|
create?: ICreate<T>[];
|
|
|
remove?: IDelete<T>[];
|
|
|
}
|
|
|
+
|
|
|
+export enum CptModelName {
|
|
|
+ projects = 'projects',
|
|
|
+ bills = 'bills',
|
|
|
+ rations = 'rations',
|
|
|
+ rationGljs = 'rationGljs',
|
|
|
+ shareList = 'shareList',
|
|
|
+ unitPriceFile = 'unitPriceFile',
|
|
|
+ feeRateFile = 'feeRateFile',
|
|
|
+ labourCoeFile = 'labourCoeFile',
|
|
|
+ importLogs = 'importLogs',
|
|
|
+ cptRationSectionTpl = 'cptRationSectionTpl',
|
|
|
+ cptGljLib = 'cptGljLib',
|
|
|
+ cptGljSection = 'cptGljSection',
|
|
|
+ cptGljSectionTpl = 'cptGljSectionTpl',
|
|
|
+ cptRationCoeList = 'cptRationCoeList',
|
|
|
+ cptRationInstallation = 'cptRationInstallation',
|
|
|
+ cptRationInstallationSection = 'cptRationInstallationSection',
|
|
|
+ cptRationItems = 'cptRationItems',
|
|
|
+ cptRationChapterTrees = 'cptRationChapterTrees',
|
|
|
+ configMaterials = 'configMaterials',
|
|
|
+ projectGljs = 'projectGljs',
|
|
|
+ calcProgramFile = 'calcProgramFile',
|
|
|
+ options = 'options',
|
|
|
+ installationFee = 'installationFee',
|
|
|
+}
|
|
|
+
|
|
|
+export enum ActionType {
|
|
|
+ ADD = 'add',
|
|
|
+ UPDATE = 'update',
|
|
|
+ REPLACE = 'replace', // 和update不同,如替换定额,替换清单等,操作不一样
|
|
|
+ DELETE = 'delete',
|
|
|
+}
|
|
|
+
|
|
|
+// 统一subject更新提交数据入口,为撤销功能做准备
|
|
|
+export interface ISetData<T> {
|
|
|
+ projectID: string; // 考虑到可能会跨项目更新,提高一层
|
|
|
+ module: CptModelName;
|
|
|
+ action: ActionType;
|
|
|
+ actionName?: string; // 除了增删改查,还会有更复杂的操作,用这个来区分
|
|
|
+ filter?: T; // 查询条件
|
|
|
+ update?: T; // 和update类型对应,
|
|
|
+ documents?: T[]; // add 类型对应,批量插入
|
|
|
+ odocs?: any[]; // 存放撤销的原始数据?
|
|
|
+ result?: any; // 特殊的返回结果
|
|
|
+}
|