invoiceManage.php 976 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. Doo::loadCore ( 'db/DooModel' );
  3. /**
  4. * 发票相关管理相关信息及其操作业务逻辑
  5. * @author CP.
  6. * @version 1.0
  7. * @namespace invoice
  8. * @package invoiceModel
  9. */
  10. class invoiceManage extends DooModel {
  11. /**
  12. *
  13. * @var integer $iid 管理组ID
  14. */
  15. public $iid;
  16. /**
  17. *
  18. * @var string $staff 管理组人员
  19. */
  20. public $staff;
  21. /**
  22. *
  23. * @var string $mold 管理组名称
  24. */
  25. public $mold;
  26. public $_table = 'CLD_invoiceManage';
  27. public $_primarykey = 'iid';
  28. public $_fields = array (
  29. 'iid',
  30. 'staff',
  31. 'mold'
  32. );
  33. /**
  34. * 根据管理组获取审批组成员
  35. * @return array|array() 该管理组相关数据,人员数据数组化
  36. */
  37. public function getInvoiceByMold($mold = "") {
  38. $detail = array ();
  39. if (! empty ( $mold )) {
  40. $detail = $this->getOne ( array (
  41. 'where' => 'mold="' . $mold . '"',
  42. 'asArray' => TRUE
  43. ) );
  44. $detail ['staff'] = json_decode ( $detail ['staff'] );
  45. }
  46. return $detail;
  47. }
  48. }
  49. // ?>