Browse Source

导出会议列表调整规则为到达办公室

qr 2 months ago
parent
commit
20f12875d4
1 changed files with 30 additions and 0 deletions
  1. 30 0
      webmain/model/sealaplModel.php

+ 30 - 0
webmain/model/sealaplModel.php

@@ -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;
+    }
+
+
+}