|
|
@@ -618,13 +618,19 @@ class PhasePayDetail extends TreeService {
|
|
|
ud.update_user_id = this.ctx.session.sessionUser.accountId;
|
|
|
updateDatas.push(ud);
|
|
|
}
|
|
|
- if (updateDatas.length > 0) await this.db.updateRows(this.tableName, updateDatas);
|
|
|
+ if (updateDatas.length > 0) {
|
|
|
+ await this.db.updateRows(this.tableName, updateDatas);
|
|
|
+ return await this.getAllDataByCondition({ where: { id: data.map(d => { return d.id; }) } });
|
|
|
+ } else {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
} else {
|
|
|
const node = await this.getDataById(data.id);
|
|
|
if (!node || masterId !== node[this.setting.mid]) throw '提交数据错误';
|
|
|
const updateData = this._filterValidField(node.id, data);
|
|
|
updateData.update_user_id = this.ctx.session.sessionUser.accountId;
|
|
|
await this.db.update(this.tableName, updateData);
|
|
|
+ return this.getDataById(data.id);
|
|
|
}
|
|
|
}
|
|
|
}
|