| 1234567891011121314151617181920212223242526272829303132333435363738394041 | 'use strict';/** * 工料历史期数据表 数据模型 * * @author Mai * @date 2018/8/13 * @version */module.exports = app => {    class MaterialBillsHistory extends app.BaseService {        /**         * 构造函数         *         * @param {Object} ctx - egg全局变量         * @return {void}         */        constructor(ctx) {            super(ctx);            this.tableName = 'material_bills_history';        }        /**         * 获取历史本期应耗数量和上期调差金额         * @param mid         * @param order         * @param mb_id         * @returns {Promise<*[]>}         */        async getByMbId(mid, order, mb_id) {            return await this.getDataByCondition({ mid, order, mb_id });            // if (result) {            //     return [result.quantity, result.pre_tp];            // }            // return [null, null];        }    }    return MaterialBillsHistory;};
 |