1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?php
- Doo::loadCore ( 'db/DooModel' );
- /**
- *
- * @author CP.
- * @version 1.0
- * @namespace invoice
- * @package invoiceModel
- */
- class reentryManage extends DooModel {
- /**
- *
- * @var integer $iid 管理组ID
- */
- public $icid;
- /**
- *
- * @var string $staff 管理组人员
- */
- public $staff;
- public $category;
- public $cid;
- public $CC;
- public $_table = 'CLD_reentryManage';
- 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 (! is_numeric ( $sid )) {
- Doo::loadClass ( 'XDeode' );
- $XDeode = new XDeode ( 5 );
-
- $sid = $XDeode->decode ( $sid );
- }
-
- 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 );
-
- if (empty ( $detail ['CC'] ))
- $detail ['staffList'] = array ();
- else
- $detail ['staffList'] = json_decode ( $detail ['staff'], true );
-
- return $detail;
- }
- }
- // ?>
|