function get_goods_info()
 {
     $num = func_num_args();
     if ($num <= 0) {
         return false;
     }
     $params = func_get_args();
     $sql = "SELECT a.YDBH,a.QYDMC,a.MDDMC,a.SHFS,a.HWMC,a.JS,a.BZBH,a.ZL,a.TJ,a.YDZT,a.FSZT,a.DHCDH,b.GSJC,b.DH,b.ZS FROM HYDATA.LD_YD a LEFT JOIN HYDATA.LD_GS b ON a.MDDZBH=b.GSBH";
     //$sql = "SELECT * FROM "
     if ($num == 1) {
         //根据运单编号查询
         $sql .= " WHERE YDBH='{$params[0]}'";
     } else {
         if ($num == 2) {
             $a = explode('-', $params[0]);
             $sql .= " WHERE SUBSTR(a.HH,-5,5)='{$a[0]}' AND a.JS = {$a[1]}";
         }
     }
     $ret = query_oracle($sql);
     if ($ret === false || count($ret) <= 0) {
         return false;
     }
     $this->thfs = $ret[SHFS];
     $this->thgsmc = $ret[GSJC];
     //$this->thgsmc = iconv('GBK','UTF-8',$this->thgsmc);
     $this->qyd = $ret[QYDMC];
     $this->mdd = $ret[MDDMC];
     $this->hwmc = $ret[HWMC];
     $this->bz = $ret[BZBH];
     $this->zl = $ret[ZL];
     $this->tj = $ret[TJ];
     $this->js = $ret[JS];
     $this->thgsdh = $ret[DHCDH];
     $this->thgsdz = $ret[ZS];
     $this->kfdh = $ret[DH];
     return $ret[YDBH];
 }
Esempio n. 2
0
            } else {
                $fcbhs = array();
                $name = $_SESSION['dkh'];
                if ($_SESSION['dkh_admin'] != 'TRUE') {
                    $sql = "select to_char(RQ,'yyyy-mm-dd hh:mi:ss') as RQ,to_char(TYRQ,'yyyy-mm-dd hh:mi:ss') as TYRQ,YDBH,KHDDH,JS,TJ,HWMC,QYDMC,MDDMC,GZHJDYID,GSJC,SM,SHRMC,SHRLXR,SHRLXDH1,SHRDZ from hydata.ld_dkh_cx_v where {$key}='{$v}' and SSJTGS='{$name}'";
                } else {
                    $sql = "select to_char(RQ,'yyyy-mm-dd hh:mi:ss') as RQ,to_char(TYRQ,'yyyy-mm-dd hh:mi:ss') as TYRQ,YDBH,KHDDH,JS,TJ,HWMC,QYDMC,MDDMC,GZHJDYID,GSJC,SM,SHRMC,SHRLXR,SHRLXDH1,SHRDZ from hydata.ld_dkh_cx_v where {$key}='{$v}'";
                }
                $ret = query_oracle($sql);
                $count = count($ret);
                $ydh = $ret[YDBH][0];
                $sql = "select FHDBH from hydata.ld_fhdmx where YDBH='{$ydh}' order by record_date desc";
                $fhdbh = query_oracle($sql);
                $fhdbh = $fhdbh[FHDBH][0];
                $sql = "select FCBH from hydata.ld_fhd where FHDBH='{$fhdbh}'";
                $fcbh = query_oracle($sql);
                $fcbh = iconv('GBK', 'UTF-8', $fcbh[FCBH][0]);
                array_push($fcbhs, $fcbh);
                if ($ret === false || $count <= 0) {
                    echo '<tr><td>未找到相应运单信息</td></tr>';
                } else {
                    ?>
<tr>
	<td>
		<div style="float:left;">
			<div><font color="Black" size=2><b>运单号:<?php 
                    echo $ret[YDBH][0];
                    ?>
</b></font></div>
			<div><font color="Black" size=2><b>订单号:<?php 
                    echo $ret[KHDDH][0];