|
|
@@ -1,15 +1,20 @@
|
|
|
import BaseOverwrite from './base/base';
|
|
|
-import ChongQing2018 from './chongqing-2018/chongQing2018';
|
|
|
+import ChongQing2018Base from './chongqing-2018/chongQing2018';
|
|
|
+
|
|
|
+/**
|
|
|
+ * 由于 client、server里重载的方法经常会依赖各自项目内的业务代码,且大部分业务代码无法抽离。
|
|
|
+ * 因此 此处overwrite只定义前后通用的,作为client和server内overwrite的基类被继承
|
|
|
+ */
|
|
|
|
|
|
// 费用定额ID 与 overwrite实例 映射
|
|
|
const overwriteMap: Record<string, BaseOverwrite> = {
|
|
|
- '5b52b027fd3bb0000b257cf8': new ChongQing2018(),
|
|
|
+ '5b52b027fd3bb0000b257cf8': new ChongQing2018Base(),
|
|
|
};
|
|
|
|
|
|
const baseOverwrite = new BaseOverwrite();
|
|
|
|
|
|
// 根据费用定额ID,获取overwrite单例
|
|
|
-export function getOverwrite(compilationID?: string): BaseOverwrite {
|
|
|
+export function getBaseOverwrite(compilationID?: string): BaseOverwrite {
|
|
|
return (compilationID && overwriteMap[compilationID]) || baseOverwrite;
|
|
|
}
|
|
|
|