| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- Doo::loadCore ( 'db/DooModel' );
- /**
- *
- * @author CP.
- * @version 1.0
- * @namespace invoice
- * @package invoiceModel
- */
- class staffManage extends DooModel {
- /**
- *
- * @var integer $iid 管理组ID
- */
- public $icid;
- /**
- *
- * @var string $staff 管理组人员
- */
- public $staff;
- public $category;
- public $cid;
- public $CC;
- public $_table = 'CLD_staffManage';
- public $_primarykey = 'icid';
- public $_fields = array (
- 'icid',
- 'staff',
- 'category',
- 'CC',
- 'cid'
- );
-
- /**
- * 获得查看人员
- * @param number $icid
- */
- public function getInvoiceCMByIcid($icid = 0) {
- $lsit = array ();
- if (! empty ( $icid ))
- $lsit = $this->getOne ( array (
- 'where' => 'icid=' . $icid,
- 'asArray' => TRUE
- ) );
-
- return $lsit;
- }
-
- /**
- * 是否有该用户在权限列表中
- * @param number $sid
- */
- public function getInvoiceCMByStaff($sid = 0) {
- $lsit = array ();
- if (! empty ( $sid ))
- $lsit = $this->find ( array (
- 'select' => 'cid',
- 'where' => 'staff like "%[\"' . $sid . '\",%"',
- 'asArray' => TRUE
- ) );
-
- return $lsit;
- }
-
- /**
- * 根据cid获得审批组
- * @param string $cidMode
- */
- public function getStaffManageByCid($cidMode = '') {
- $detail = array ();
- if (! empty ( $cidMode ))
- $detail = $this->getOne ( array (
- 'where' => 'cid ="' . $cidMode . '" ',
- 'asArray' => true
- ) );
- if (empty ( $detail ['staff'] ))
- $detail ['staffList'] = array ();
- else
- $detail ['staffList'] = json_decode ( $detail ['staff'], true );
- return $detail;
- }
- }
- // ?>
|