|
|
|
@ -175,6 +175,7 @@ class Orders_model extends CI_Model {
|
|
|
|
|
|
|
|
|
|
public function get_groupCombineInfo_finance()
|
|
|
|
|
{
|
|
|
|
|
return array(); // 历史数据已获取完毕, 财务数据的获取方法待定 2018-11-30
|
|
|
|
|
$sql = " SELECT top 1 coli.COLI_ID, coli.COLI_SN, coli.COLI_GRI_SN, cold.COLD_SN, coli.COLI_OrderDetailText, coli.COLI_Memo,coli.COLI_State,coli.COLI_OPI_ID,
|
|
|
|
|
cold.COLD_PlanVEI_SN, cold.COLD_MemoText, gci.*,'1' as 'isHistory'
|
|
|
|
|
from GroupCombineInfo gci
|
|
|
|
@ -188,6 +189,14 @@ class Orders_model extends CI_Model {
|
|
|
|
|
and GCI_leaveDate < '" . date('Y-m-d', strtotime("-7 days")) . "'
|
|
|
|
|
and gci.GCI_createTime < '" . date('Y-m-d') . "'
|
|
|
|
|
and GCI_combineNo not like '%取消%'
|
|
|
|
|
and not exists (
|
|
|
|
|
select GCOD_SN from GroupCombineOperationDetail gcod where gcod.GCOD_GCI_combineNo=GCI_combineNo
|
|
|
|
|
)
|
|
|
|
|
and 0 < (
|
|
|
|
|
select sum(isnull(COLD_PersonNum,0)+isnull(COLD_ChildNum,0)+isnull(COLD_BabyNum,0)) person from BIZ_ConfirmLineInfo
|
|
|
|
|
inner join BIZ_ConfirmLineDetail on COLD_COLI_SN=COLI_SN
|
|
|
|
|
where COLI_GRI_SN=gri_sn
|
|
|
|
|
)
|
|
|
|
|
";
|
|
|
|
|
$sql .= " ORDER BY isHistory ASC,GCI_createTime ASC ";
|
|
|
|
|
$query = $this->HT->query($sql);
|
|
|
|
|