|
@@ -5,6 +5,7 @@
|
|
|
*/
|
|
|
|
|
|
const BaseService = require('../base/base_service');
|
|
|
+const accountGroup = require('../const/account_group');
|
|
|
|
|
|
module.exports = app => {
|
|
|
|
|
@@ -116,6 +117,14 @@ module.exports = app => {
|
|
|
// 删除单位
|
|
|
return await this.db.delete(this.tableName, { id });
|
|
|
}
|
|
|
+
|
|
|
+ async getReportData(pid) {
|
|
|
+ const data = this.getAllDataByCondition({ where: { pid } });
|
|
|
+ data.forEach(x => {
|
|
|
+ x.type_str = accountGroup.group[x.type];
|
|
|
+ });
|
|
|
+ return data;
|
|
|
+ }
|
|
|
}
|
|
|
return ConstructionUnit;
|
|
|
};
|