material_exponent_history.js 820 B

12345678910111213141516171819202122232425262728293031323334353637
  1. 'use strict';
  2. /**
  3. * 指数历史期数据表 数据模型
  4. *
  5. * @author Mai
  6. * @date 2018/8/13
  7. * @version
  8. */
  9. module.exports = app => {
  10. class MaterialExponentHistory extends app.BaseService {
  11. /**
  12. * 构造函数
  13. *
  14. * @param {Object} ctx - egg全局变量
  15. * @return {void}
  16. */
  17. constructor(ctx) {
  18. super(ctx);
  19. this.tableName = 'material_exponent_history';
  20. }
  21. /**
  22. * 获取历史本期应耗数量和上期调差金额
  23. * @param mid
  24. * @param order
  25. * @param mb_id
  26. * @returns {Promise<*[]>}
  27. */
  28. async getByMeId(mid, order, me_id) {
  29. return await this.getDataByCondition({ mid, order, me_id });
  30. }
  31. }
  32. return MaterialExponentHistory;
  33. };