Пример #1
0
 /**
  * 获取需要审核的出库单据列表
  */
 public function act_getAuditOutStoreList($uid = 0)
 {
     $uid = intval($uid);
     if (isset($_GET['uid']) && !empty($_GET['uid'])) {
         $uid = intval($_GET['uid']);
     }
     if ($uid == 0) {
         self::$errCode = 01;
         self::$errMsg = 'uid is error';
         return false;
     }
     //查询条件初始化
     $conditions = array();
     $conditions[] = 'ioType=1';
     $conditions[] = 'ioStatus=1';
     if (isset($_GET['ordersn']) && !empty($_GET['ordersn'])) {
         $_ordersn = trim($_GET['ordersn']);
         if (preg_match("/^[a-z\\-]*\$[\\d]*/i", $_ordersn)) {
             $conditions[] = "ordersn='{$_ordersn}'";
         }
         unset($_ordersn);
     }
     $conditions[] = "nextoperatorId={$uid}";
     $where = 'WHERE ' . implode(' AND ', $conditions);
     $sort = 'ORDER BY id DESC';
     $limit = 'LIMIT 100';
     $whIoStoreAct = new WhIoStoreModel();
     $AuditInStoreList = $whIoStoreAct->getAuditIOStoreList($where, $sort, $limit);
     return $AuditInStoreList;
 }