|
|
|
@ -13,7 +13,7 @@ class Group_model extends CI_Model {
|
|
|
|
|
$top_sql = $top>0 ? " TOP $top " : "";
|
|
|
|
|
$gri_sql = $gri_sn===0 ? "" : " and GRI_SN=$gri_sn ";
|
|
|
|
|
$sql = "SELECT $top_sql VAS_IsConfirm, VAS_SendVary,
|
|
|
|
|
GRI_OrderType, GRI_SN, GRI_No, GRI_operator,
|
|
|
|
|
GRI_OrderType, GRI_SN, GRI_No, GRI_operator,GRI_Name,
|
|
|
|
|
(select OPI_DEI_SN from OperatorInfo where OPI_SN=GRI_operator) as department,
|
|
|
|
|
vas.*
|
|
|
|
|
from VendorArrangeState vas
|
|
|
|
@ -26,7 +26,7 @@ class Group_model extends CI_Model {
|
|
|
|
|
and VAS_IsConfirm=0
|
|
|
|
|
and EOI_GetDate between '$start_date' and '$end_date'
|
|
|
|
|
-- and VAS_VEI_SN in (29188, 1343, 30548) -- test
|
|
|
|
|
and GRI_OrderType=227002 -- test
|
|
|
|
|
-- and GRI_OrderType=227002 -- test
|
|
|
|
|
and (VAS_IsReceive=0 or (VAS_SendTime > ISNULL(VAS_ReceiveTime,0))) ";
|
|
|
|
|
$sql .= " order by EOI_GetDate asc, vas.VAS_IsConfirm asc";
|
|
|
|
|
return $this->HT->query($sql)->result();
|
|
|
|
@ -54,6 +54,54 @@ class Group_model extends CI_Model {
|
|
|
|
|
return $this->HT->query($sql)->result();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function get_arrange_info($gri_sn, $vendor_id)
|
|
|
|
|
{
|
|
|
|
|
$param_arr = array($gri_sn, $vendor_id);
|
|
|
|
|
$sql = "SELECT
|
|
|
|
|
(select CII2_Name from CItyInfo2
|
|
|
|
|
where CII2_CII_SN=ACI_FromCity and CII2_LGC=2) as fromcity,
|
|
|
|
|
(select CII2_Name from CItyInfo2
|
|
|
|
|
where CII2_CII_SN=ACI_ToCity and CII2_LGC=2) as tocity,
|
|
|
|
|
*
|
|
|
|
|
from ArrangeConfirmInfo aci
|
|
|
|
|
where 1=1
|
|
|
|
|
and aci.ACI_GRI_SN=?
|
|
|
|
|
and aci.ACI_VEI_SN=?
|
|
|
|
|
order by ACI_DayNo,ACI_SNInOneDay ";
|
|
|
|
|
return $this->HT->query($sql, $param_arr)->result();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function get_customer_list($gri_sn)
|
|
|
|
|
{
|
|
|
|
|
$sql = "SELECT (
|
|
|
|
|
SELECT (isnull(MEI_LastName,'') +' / '+ isnull(MEI_FirstName,'')) CustomerName
|
|
|
|
|
from MemberInfo
|
|
|
|
|
where MEI_SN=CUL_CUI_SN
|
|
|
|
|
) as MemberName,
|
|
|
|
|
(select MEI_BirthDay from MemberInfo where MEI_SN=CUL_CUI_SN) as BirthDay,
|
|
|
|
|
ISNULL((select SYC2_CodeDiscribe
|
|
|
|
|
from V_System_Code
|
|
|
|
|
where LGC_LGC=2
|
|
|
|
|
and SYC_SN=(
|
|
|
|
|
select top 1 MEI_Gender from MemberInfo
|
|
|
|
|
where MEI_SN=CUL_CUI_SN)),''
|
|
|
|
|
) Gender,
|
|
|
|
|
(select COI2_Country from V_Country_Info
|
|
|
|
|
where LGC_LGC = 2
|
|
|
|
|
and COI_SN in (select MEI_Country from MemberInfo where MEI_SN=CUL_CUI_SN)
|
|
|
|
|
) as Country,
|
|
|
|
|
(select MEI_PassportNo from MemberInfo where MEI_SN=CUL_CUI_SN) PassportNo,
|
|
|
|
|
(select MEI_PassportValidDate from MemberInfo where MEI_SN=CUL_CUI_SN) PassportValidDate
|
|
|
|
|
-- ,(select dbo.GetSysCodeName(MEI_Occupation,2) from MemberInfo where MEI_SN=CUL_CUI_SN) as Occupation
|
|
|
|
|
from CustomerList
|
|
|
|
|
where isnull(CUL_IsAgent,0)=0
|
|
|
|
|
and isnull(CUL_IsEmergency,0)=0
|
|
|
|
|
and isnull(CUL_IsTJR,0)=0
|
|
|
|
|
and CUL_COLI_SN in (select COLI_SN from ConfirmLineInfo where COLI_GRI_SN=?)
|
|
|
|
|
order by CUL_Order";
|
|
|
|
|
return $this->HT->query($sql, array($gri_sn))->result();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function get_sync_info($vas, $tour_code="")
|
|
|
|
|
{
|
|
|
|
|
$sql = "SELECT *
|
|
|
|
|