|
|
@@ -40,7 +40,7 @@ class CompilationModel extends BaseModel {
|
|
|
*
|
|
|
* @return {Promise}
|
|
|
*/
|
|
|
- async getList(host, name_filter = true) {
|
|
|
+ async getList(host, from) {
|
|
|
// 筛选字段
|
|
|
let field = {_id: 1, name: 1, is_release: 1, description: 1, categoryID: 1};
|
|
|
let compilationData = await this.findDataByCondition({name: {$ne: '' }, is_release: true}, field, false);
|
|
|
@@ -48,22 +48,16 @@ class CompilationModel extends BaseModel {
|
|
|
compilationData === null ? [] : compilationData;
|
|
|
// 川高养护特殊处理费用定额
|
|
|
const cgCompilationNames = ['四川养护(2013)', '部颁2018计价标准'];
|
|
|
- let flag = true;
|
|
|
if (host) {
|
|
|
if (/cgyh.smartcost.com.cn/.test(host)) {
|
|
|
compilationData = compilationData.filter(item => cgCompilationNames.includes(item.name));
|
|
|
- flag = false;
|
|
|
} else if (/yhyun.smartcost.com.cn/.test(host)) {
|
|
|
compilationData = compilationData.filter(item => !cgCompilationNames.includes(item.name));
|
|
|
- flag = false;
|
|
|
}
|
|
|
}
|
|
|
- if (name_filter && flag) {
|
|
|
- compilationData = compilationData.filter(function (item) {
|
|
|
- return cgCompilationNames.indexOf(item.name) === -1;
|
|
|
- });
|
|
|
+ if (from === 'zplus') {
|
|
|
+ compilationData = compilationData.filter(item => !cgCompilationNames.includes(item.name));
|
|
|
}
|
|
|
-
|
|
|
return compilationData;
|
|
|
}
|
|
|
|