|
|
@ -147,13 +147,19 @@ class Group_model extends CI_Model {
|
|
|
|
where CII2_CII_SN=ACI_ToCity and CII2_LGC=2) as tocity,
|
|
|
|
where CII2_CII_SN=ACI_ToCity and CII2_LGC=2) as tocity,
|
|
|
|
(select CII_PKCode from CItyInfo
|
|
|
|
(select CII_PKCode from CItyInfo
|
|
|
|
where CII_SN=ACI_ToCity ) as citycode,
|
|
|
|
where CII_SN=ACI_ToCity ) as citycode,
|
|
|
|
PAG_Code,PAG_ExtendType,PAG_DEI_SN,
|
|
|
|
isnull(pag_for_channel.PAG_Code,pag_tp.PAG_Code) as PAG_Code,
|
|
|
|
*
|
|
|
|
isnull(pag_for_channel.PAG_ExtendType,pag_tp.PAG_ExtendType) as PAG_ExtendType,
|
|
|
|
|
|
|
|
isnull(pag_for_channel.PAG_Type,pag_tp.PAG_Type) as PAG_Type,
|
|
|
|
|
|
|
|
isnull(pag_for_channel.PAG_DEI_SN,pag_tp.PAG_DEI_SN) as PAG_DEI_SN,
|
|
|
|
|
|
|
|
-- (select PAG_DEI_SN from BIZ_PackageInfo where PAG_SN=ACI_ServiceSN) as raw_PAG_DEI_SN,
|
|
|
|
|
|
|
|
aci.*
|
|
|
|
from ArrangeConfirmInfo aci
|
|
|
|
from ArrangeConfirmInfo aci
|
|
|
|
left join BIZ_PackageInfo on PAG_SN=ACI_ServiceSN
|
|
|
|
left join [Tourmanager].[dbo].[BIZ_PackageInfoRelate] pl on pl.PAGR_PAG_SN_channel=ACI_ServiceSN
|
|
|
|
and ACI_ServiceType='D' --and PAG_DefaultVEI_SN=ACI_VEI_SN
|
|
|
|
and isnull(pl.PAGR_DeleteFlag,0) = 0
|
|
|
|
-- 增加是否目的地产品的判断
|
|
|
|
left join BIZ_PackageInfo pag_for_channel on pag_for_channel.PAG_SN=pl.PAGR_PAG_SN_host
|
|
|
|
and SUBSTRING(CONVERT(varchar(10), PAG_SourceType) ,1,3)='132'
|
|
|
|
and pag_for_channel.PAG_DEI_SN=30
|
|
|
|
|
|
|
|
left join BIZ_PackageInfo pag_tp on pag_tp.PAG_SN=ACI_ServiceSN
|
|
|
|
|
|
|
|
and pag_tp.PAG_DEI_SN=30
|
|
|
|
where 1=1
|
|
|
|
where 1=1
|
|
|
|
and aci.ACI_GRI_SN=?
|
|
|
|
and aci.ACI_GRI_SN=?
|
|
|
|
$vendor_sql
|
|
|
|
$vendor_sql
|
|
|
@ -166,14 +172,21 @@ class Group_model extends CI_Model {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$sql = "SELECT
|
|
|
|
$sql = "SELECT
|
|
|
|
(select CII2_Name from CItyInfo2
|
|
|
|
(select CII2_Name from CItyInfo2
|
|
|
|
where CII2_CII_SN=PAG_CII_SN and CII2_LGC=2) as tocity,
|
|
|
|
where CII2_CII_SN=isnull(pag_for_channel.PAG_CII_SN,pag_tp.PAG_CII_SN) and CII2_LGC=2) as tocity,
|
|
|
|
(select CII_PKCode from CItyInfo
|
|
|
|
(select CII_PKCode from CItyInfo
|
|
|
|
where CII_SN=PAG_CII_SN ) as citycode,
|
|
|
|
where CII_SN=isnull(pag_for_channel.PAG_CII_SN,pag_tp.PAG_CII_SN) ) as citycode,
|
|
|
|
PAG_Code,PAG_ExtendType,PAG_DEI_SN,
|
|
|
|
isnull(pag_for_channel.PAG_Code,pag_tp.PAG_Code) as PAG_Code,
|
|
|
|
* from BIZ_ConfirmLineDetail cold
|
|
|
|
isnull(pag_for_channel.PAG_ExtendType,pag_tp.PAG_ExtendType) as PAG_ExtendType,
|
|
|
|
left join BIZ_PackageInfo on PAG_SN=COLD_ServiceSN
|
|
|
|
isnull(pag_for_channel.PAG_Type,pag_tp.PAG_Type) as PAG_Type,
|
|
|
|
and COLD_ServiceType='D' and PAG_DefaultVEI_SN=COLD_PlanVEI_SN
|
|
|
|
isnull(pag_for_channel.PAG_DEI_SN,pag_tp.PAG_DEI_SN) as PAG_DEI_SN,
|
|
|
|
and SUBSTRING(CONVERT(varchar(10), PAG_SourceType) ,1,3)='132'
|
|
|
|
-- (select PAG_DEI_SN from BIZ_PackageInfo where PAG_SN=COLD_ServiceSN) as raw_PAG_DEI_SN,
|
|
|
|
|
|
|
|
cold.* from BIZ_ConfirmLineDetail cold
|
|
|
|
|
|
|
|
left join [Tourmanager].[dbo].[BIZ_PackageInfoRelate] pl on pl.PAGR_PAG_SN_channel=COLD_ServiceSN
|
|
|
|
|
|
|
|
and isnull(pl.PAGR_DeleteFlag,0) = 0
|
|
|
|
|
|
|
|
left join BIZ_PackageInfo pag_for_channel on pag_for_channel.PAG_SN=pl.PAGR_PAG_SN_host
|
|
|
|
|
|
|
|
and pag_for_channel.PAG_DEI_SN=30
|
|
|
|
|
|
|
|
left join BIZ_PackageInfo pag_tp on pag_tp.PAG_SN=COLD_ServiceSN
|
|
|
|
|
|
|
|
and pag_tp.PAG_DEI_SN=30
|
|
|
|
where 1=1
|
|
|
|
where 1=1
|
|
|
|
and COLD_SN in (
|
|
|
|
and COLD_SN in (
|
|
|
|
$cold_sn_str
|
|
|
|
$cold_sn_str
|
|
|
|