receiptAuthorityManage.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 receiptAuthorityManage extends DooModel {
  11. /**
  12. *
  13. * @var integer $iid 管理组ID
  14. */
  15. public $icid;
  16. /**
  17. *
  18. * @var string $staff 管理组人员
  19. */
  20. public $staff;
  21. public $category;
  22. public $cid;
  23. public $_table = 'CLD_receiptAuthorityManage';
  24. public $_primarykey = 'icid';
  25. public $_fields = array (
  26. 'icid',
  27. 'staff',
  28. 'category',
  29. 'cid'
  30. );
  31. /**
  32. * 获得查看人员
  33. * @param number $icid
  34. */
  35. public function getInvoiceCMByIcid($icid=0){
  36. $lsit=array();
  37. if (! empty ( $icid ))
  38. $lsit = $this->getOne ( array (
  39. 'where' => 'icid='.$icid,
  40. 'asArray' => TRUE
  41. ) );
  42. return $lsit;
  43. }
  44. /**
  45. * 是否有该用户在权限列表中
  46. * @param number $sid
  47. */
  48. public function getInvoiceCMByStaff($sid = 0) {
  49. $lsit=array();
  50. if (! empty ( $sid ))
  51. $lsit = $this->find ( array (
  52. 'select'=>'cid',
  53. 'where' => 'staff like "%[\"' . $sid . '\",%"',
  54. 'asArray' => TRUE
  55. ) );
  56. return $lsit;
  57. }
  58. }
  59. // ?>