Exemplo n.º 1
0
 public function view_wedoSnModify()
 {
     $data = WedoApiAct::actWedoSnModify();
     $this->smarty->assign('title', '修改运德跟踪号生成信息');
     $this->smarty->assign('lists', $data['lists']);
     $this->smarty->assign('wedo_sn', $data['res']['wedo_sn']);
     $this->smarty->assign('id', $data['gid']);
     $this->smarty->assign('gids', $data['gids']);
     $this->smarty->display('wedoSnModify.htm');
 }
Exemplo n.º 2
0
 /**
  * WedoApiAct::act_orderExport()
  * 导出运德物流订单跟踪号信息
  * @param string $timeNode 时间节点
  * @return json string 
  */
 public function act_orderExport()
 {
     $uid = intval($_SESSION[C('USER_AUTH_SYS_ID')]);
     if (empty($uid)) {
         self::$errCode = 10001;
         self::$errMsg = "对不起,您尚未登录!";
         return false;
     }
     $timeNode = isset($_GET['timeNode']) ? post_check(trim($_GET['timeNode'])) : '';
     $condition = "1";
     $condition .= " AND add_user_id = '{$uid}'";
     if (!empty($timeNode)) {
         if (!in_array($timeNode, array('scanTime', 'addTime'))) {
             redirect_to("index.php?mod=wedoApi&act=orderExport");
         }
         $startTime = isset($_GET['startTime']) ? strtotime(trim($_GET['startTime']) . " 00:00:00") : strtotime(date("Y-m-d", time()) . " 00:00:00");
         $endTime = isset($_GET['endTime']) ? strtotime(trim($_GET['endTime']) . " 23:59:59") : strtotime(date("Y-m-d", time()) . " 23:59:59");
         if ($startTime && $endTime) {
             $condition .= ' AND ' . $timeNode . " BETWEEN '" . $startTime . "' AND " . "'" . $endTime . "'";
         }
     }
     $act = isset($_REQUEST["act"]) ? post_check($_REQUEST["act"]) : "";
     $mod = isset($_REQUEST["mod"]) ? post_check($_REQUEST["mod"]) : "";
     if (!AuthUser::checkLogin($mod, $act)) {
         self::$errCode = 10000;
         self::$errMsg = "对不起,您无跟踪号数据导出权限!";
         return false;
     }
     $res = WedoApiModel::orderWedoExport($condition);
     self::$errCode = WedoApiModel::$errCode;
     self::$errMsg = WedoApiModel::$errMsg;
     return $res;
 }