|
@@ -0,0 +1,30 @@
|
|
|
+<?php
|
|
|
+class sealaplClassModel extends Model
|
|
|
+{
|
|
|
+
|
|
|
+
|
|
|
+ public function getSealaplList($whereArr) {
|
|
|
+
|
|
|
+ $where = "1=1";
|
|
|
+
|
|
|
+ if (isset($whereArr['startDate']) && isset($whereArr['stopDate'])) {
|
|
|
+ $startDate = $whereArr['startDate'];
|
|
|
+ $stopDate = $whereArr['stopDate'];
|
|
|
+// $where .= " and IFNULL(`office_date`, `applydt`) >= '{$startDate}' and IFNULL(`office_date`, `applydt`) <= '{$stopDate}'";
|
|
|
+ $where .= " and DATE_FORMAT(`office_date`,'%Y-%m-%d') >= '{$startDate}' and DATE_FORMAT(`office_date`,'%Y-%m-%d') <= '{$stopDate}'";
|
|
|
+ }
|
|
|
+ if (isset($whereArr['status']) && $whereArr['status'] == 1) {
|
|
|
+ $where .= " and `status` = 1";
|
|
|
+ }
|
|
|
+ if (isset($whereArr['export_type']) && $whereArr['export_type'] != 0) {
|
|
|
+ $where .= " and `seal_name` = '".$whereArr['export_type']."'";
|
|
|
+ }
|
|
|
+
|
|
|
+ $list = m("sealapl")
|
|
|
+ ->getall($where, "*", "substr(applydt, 1, 4) desc, id asc");
|
|
|
+
|
|
|
+ return $list;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|