12345678910111213141516171819202122 |
- 'use strict';
- const { CrudService } = require('naf-framework-mongoose/lib/service');
- const { BusinessError, ErrorCode } = require('naf-core').Error;
- const _ = require('lodash');
- const assert = require('assert');
- const moment = require('moment');
- // 高企申报兑付
- class CashingService extends CrudService {
- constructor(ctx) {
- super(ctx, 'cashing');
- this.model = this.ctx.model.Cashing;
- }
- async create(body) {
- const cashing_no = `${moment().format('YYYYMMDD')}${moment().format('x')}DF`;
- const create_time = moment().format('YYYY-MM-DD HH:mm:ss');
- body = { ...body, cashing_no, create_time };
- return await this.model.create(body);
- }
- }
- module.exports = CashingService;
|