Add new Filter
这个提交包含在:
		
							父节点
							
								
									803b0d06bd
								
							
						
					
					
						当前提交
						5aa0b48e68
					
				
					共有  1 个文件被更改,包括 18 次插入 和 8 次删除
				
			
		|  | @ -13,25 +13,30 @@ class Logbookadvanced_model extends CI_Model { | ||||||
| 			$conditions[] = "date(COL_TIME_ON) >= ?"; | 			$conditions[] = "date(COL_TIME_ON) >= ?"; | ||||||
| 			$binding[] = $from; | 			$binding[] = $from; | ||||||
| 		} | 		} | ||||||
|  | 		 | ||||||
|         if ($searchCriteria['dateTo'] !== '') { |         if ($searchCriteria['dateTo'] !== '') { | ||||||
|             $to = DateTime::createFromFormat('d/m/Y', $searchCriteria['dateTo']); |             $to = DateTime::createFromFormat('d/m/Y', $searchCriteria['dateTo']); | ||||||
| 			$to = $to->format('Y-m-d'); | 			$to = $to->format('Y-m-d'); | ||||||
| 			$conditions[] = "date(COL_TIME_ON) <= ?"; | 			$conditions[] = "date(COL_TIME_ON) <= ?"; | ||||||
| 			$binding[] = $to; | 			$binding[] = $to; | ||||||
| 		} | 		} | ||||||
|  | 
 | ||||||
| 		if ($searchCriteria['de'] !== '') { | 		if ($searchCriteria['de'] !== '') { | ||||||
| 			$conditions[] = "COL_STATION_CALLSIGN = ?"; | 			$conditions[] = "COL_STATION_CALLSIGN = ?"; | ||||||
| 			$binding[] = trim($searchCriteria['de']); | 			$binding[] = trim($searchCriteria['de']); | ||||||
| 		} | 		} | ||||||
|  | 
 | ||||||
| 		if ($searchCriteria['dx'] !== '') { | 		if ($searchCriteria['dx'] !== '') { | ||||||
| 			$conditions[] = "COL_CALL LIKE ?"; | 			$conditions[] = "COL_CALL LIKE ?"; | ||||||
| 			$binding[] = '%' . trim($searchCriteria['dx']) . '%'; | 			$binding[] = '%' . trim($searchCriteria['dx']) . '%'; | ||||||
| 		} | 		} | ||||||
|  | 
 | ||||||
| 		if ($searchCriteria['mode'] !== '') { | 		if ($searchCriteria['mode'] !== '') { | ||||||
| 			$conditions[] = "(COL_MODE = ? or COL_SUBMODE = ?)"; | 			$conditions[] = "(COL_MODE = ? or COL_SUBMODE = ?)"; | ||||||
| 			$binding[] = $searchCriteria['mode']; | 			$binding[] = $searchCriteria['mode']; | ||||||
| 			$binding[] = $searchCriteria['mode']; | 			$binding[] = $searchCriteria['mode']; | ||||||
| 		} | 		} | ||||||
|  | 
 | ||||||
| 		if ($searchCriteria['band'] !== '') { | 		if ($searchCriteria['band'] !== '') { | ||||||
| 			if($searchCriteria['band'] != "SAT") { | 			if($searchCriteria['band'] != "SAT") { | ||||||
| 				$conditions[] = "COL_BAND = ? and COL_PROP_MODE != 'SAT'"; | 				$conditions[] = "COL_BAND = ? and COL_PROP_MODE != 'SAT'"; | ||||||
|  | @ -44,6 +49,7 @@ class Logbookadvanced_model extends CI_Model { | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | 
 | ||||||
| 		if ($searchCriteria['qslSent'] !== '') { | 		if ($searchCriteria['qslSent'] !== '') { | ||||||
| 			$condition = "COL_QSL_SENT = ?"; | 			$condition = "COL_QSL_SENT = ?"; | ||||||
| 			if ($searchCriteria['qslSent'] == 'N') { | 			if ($searchCriteria['qslSent'] == 'N') { | ||||||
|  | @ -53,6 +59,7 @@ class Logbookadvanced_model extends CI_Model { | ||||||
| 			$conditions[] = $condition; | 			$conditions[] = $condition; | ||||||
| 			$binding[] = $searchCriteria['qslSent']; | 			$binding[] = $searchCriteria['qslSent']; | ||||||
| 		} | 		} | ||||||
|  | 
 | ||||||
| 		if ($searchCriteria['qslReceived'] !== '') { | 		if ($searchCriteria['qslReceived'] !== '') { | ||||||
| 			$condition = "COL_QSL_RCVD = ?"; | 			$condition = "COL_QSL_RCVD = ?"; | ||||||
| 			if ($searchCriteria['qslReceived'] == 'N') { | 			if ($searchCriteria['qslReceived'] == 'N') { | ||||||
|  | @ -62,24 +69,27 @@ class Logbookadvanced_model extends CI_Model { | ||||||
| 			$conditions[] = $condition; | 			$conditions[] = $condition; | ||||||
| 			$binding[] = $searchCriteria['qslReceived']; | 			$binding[] = $searchCriteria['qslReceived']; | ||||||
| 		} | 		} | ||||||
|  | 
 | ||||||
| 		if ($searchCriteria['qslSentMethod'] !== '') { | 		if ($searchCriteria['qslSentMethod'] !== '') { | ||||||
| 			$condition = "COL_QSL_SENT_VIA = ?"; | 			$condition = "COL_QSL_SENT_VIA like ?"; | ||||||
| 			if ($searchCriteria['qslSentMethod'] == 'N') { | 			/*if ($searchCriteria['qslSentMethod'] == 'N') { | ||||||
| 				$condition = '('.$condition; | 				$condition = '('.$condition; | ||||||
| 				$condition .= " OR COL_QSL_SENT_VIA OR COL_QSL_SENT_VIA = '')"; | 				$condition .= " OR COL_QSL_SENT_VIA OR COL_QSL_SENT_VIA = '')"; | ||||||
| 			} | 			}*/ | ||||||
| 			$conditions[] = $condition; | 			$conditions[] = $condition; | ||||||
| 			$binding[] = $searchCriteria['qslSentMethod']; | 			$binding[] = $searchCriteria['qslSentMethod'].'%'; | ||||||
| 		} | 		} | ||||||
|  | 
 | ||||||
| 		if ($searchCriteria['qslReceivedMethod'] !== '') { | 		if ($searchCriteria['qslReceivedMethod'] !== '') { | ||||||
| 			$condition = "COL_QSL_RECV_VIA = ?"; | 			$condition = "COL_QSL_RECV_VIA like ?"; | ||||||
| 			if ($searchCriteria['qslReceivedMethod'] == 'N') { | 			/*if ($searchCriteria['qslReceivedMethod'] == 'N') { | ||||||
| 				$condition = '('.$condition; | 				$condition = '('.$condition; | ||||||
| 				$condition .= " OR COL_QSL_RECV_VIA OR COL_QSL_RECV_VIA = '')"; | 				$condition .= " OR COL_QSL_RECV_VIA OR COL_QSL_RECV_VIA = '')"; | ||||||
| 			} | 			}*/ | ||||||
| 			$conditions[] = $condition; | 			$conditions[] = $condition; | ||||||
| 			$binding[] = $searchCriteria['qslReceivedMethod']; | 			$binding[] = $searchCriteria['qslReceivedMethod'].'%'; | ||||||
| 		} | 		} | ||||||
|  | 
 | ||||||
| 		if ($searchCriteria['lotwSent'] !== '') { | 		if ($searchCriteria['lotwSent'] !== '') { | ||||||
| 			$condition = "COL_LOTW_QSL_SENT = ?"; | 			$condition = "COL_LOTW_QSL_SENT = ?"; | ||||||
| 			if ($searchCriteria['lotwSent'] == 'N') { | 			if ($searchCriteria['lotwSent'] == 'N') { | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用