|
|
@ -345,11 +345,11 @@ class BIZ_train_model extends CI_Model {
|
|
|
|
FROM InfoManager.dbo.trainsystem
|
|
|
|
FROM InfoManager.dbo.trainsystem
|
|
|
|
WHERE ts_cold_sn = COLD_SN
|
|
|
|
WHERE ts_cold_sn = COLD_SN
|
|
|
|
) or EXISTS(select Top 1 1 from InfoManager.dbo.trainsystem WHERE ts_cold_sn = COLD_SN
|
|
|
|
) or EXISTS(select Top 1 1 from InfoManager.dbo.trainsystem WHERE ts_cold_sn = COLD_SN
|
|
|
|
and (ts_status = '5' or ts_status=1 or ts_status='11')
|
|
|
|
and (ts_status = '5' or ts_status='11')
|
|
|
|
and ts_cold_sn not in (select ts_cold_sn from InfoManager.dbo.trainsystem
|
|
|
|
and ts_cold_sn not in (select ts_cold_sn from InfoManager.dbo.trainsystem
|
|
|
|
where (ts_status='4' or ts_status='3' or ts_status='10') and ts_cold_sn = COLD_SN) ))
|
|
|
|
where (ts_status='4' or ts_status='3' or ts_status='10') and ts_cold_sn = COLD_SN) ))
|
|
|
|
AND COLD_SN NOT IN ( select FOI_COLD_SN from BIZ_FlightsOrderInfo where FOI_COLD_SN=COLD_SN and FOI_TrainNetOrderNo>'')
|
|
|
|
AND COLD_SN NOT IN ( select FOI_COLD_SN from BIZ_FlightsOrderInfo where FOI_COLD_SN=COLD_SN and FOI_TrainNetOrderNo>'')
|
|
|
|
and (COLD_StartDate between GETDATE() and CONVERT(varchar(100),GETDATE()+15,23)+' 23:59')
|
|
|
|
and (COLD_StartDate between GETDATE() and CONVERT(varchar(100),GETDATE()+14,23)+' 23:59')
|
|
|
|
";
|
|
|
|
";
|
|
|
|
$query = $this->HT->query($sql);
|
|
|
|
$query = $this->HT->query($sql);
|
|
|
|
return $query->result();
|
|
|
|
return $query->result();
|
|
|
|