tender_financial.js 973 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. 'use strict';
  2. /**
  3. *
  4. *
  5. * @author Mai
  6. * @date
  7. * @version
  8. */
  9. class reportMemoryFinancial {
  10. constructor(ctx) {
  11. this.ctx = ctx;
  12. }
  13. async pay(tid) {
  14. return await this.ctx.service.financialPay.getAllDataByCondition({ where: { tid }});
  15. }
  16. async payContract(tid) {
  17. return await this.ctx.service.financialPayContract.getAllDataByCondition({ where: { tid } });
  18. }
  19. async payTender(tid) {
  20. return await this.ctx.service.financialPayTender.getAllDataByCondition({ where: { tid } });
  21. }
  22. async transfer(tid) {
  23. const tender = this.ctx.tender ? this.ctx.tender : await this.ctx.tender.getDataById(tid);
  24. return await this.ctx.service.financialTransfer.getAllDataByCondition({ where: { spid: tender.spid } });
  25. }
  26. async transferTender(tid) {
  27. return await this.ctx.service.financialTransferTender.getAllDataByCondition({ where: { tid } });
  28. }
  29. }
  30. module.exports = reportMemoryFinancial;