Commit 39e652db by 王昆

gsb

parent 31ad53df
...@@ -152,6 +152,10 @@ module.exports = function (sequelize, DataTypes) { ...@@ -152,6 +152,10 @@ module.exports = function (sequelize, DataTypes) {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true allowNull: true
}, },
data_ids: {
type: DataTypes.STRING,
allowNull: true
},
created_at: { created_at: {
type: DataTypes.DATE, type: DataTypes.DATE,
allowNull: false, allowNull: false,
......
...@@ -29,10 +29,15 @@ class SaasinvoiceapplyService extends ServiceBase { ...@@ -29,10 +29,15 @@ class SaasinvoiceapplyService extends ServiceBase {
} }
} }
async bulkSave(params) { async bulkSave(params) {
if (params.fee_type == "10") { if (params.fee_type == "00") {
} else if (params.fee_type == "10") {
return await this.bulkSave10(params); return await this.bulkSave10(params);
} else if (params.fee_type == "20") {
return await this.bulkSave20(params);
} }
} }
async bulkSave10(params) { async bulkSave10(params) {
if (params.parent_id) { if (params.parent_id) {
let exists = await this.dao.findOne({parent_id: params.parent_id}); let exists = await this.dao.findOne({parent_id: params.parent_id});
...@@ -46,6 +51,11 @@ class SaasinvoiceapplyService extends ServiceBase { ...@@ -46,6 +51,11 @@ class SaasinvoiceapplyService extends ServiceBase {
} }
return system.getResultSuccess(rs); return system.getResultSuccess(rs);
} }
async bulkSave20(params) {
let rs = await this.dao.bulkCreate(params.dataList);
return system.getResultSuccess(rs);
}
async save10(params) { async save10(params) {
let rs = await this.dao.create(params); let rs = await this.dao.create(params);
return system.getResultSuccess(rs); return system.getResultSuccess(rs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment