فهرست منبع

修复购房补贴中的错误

sugangqiang 8 ماه پیش
والد
کامیت
71d68508b4
1فایلهای تغییر یافته به همراه14 افزوده شده و 15 حذف شده
  1. 14 15
      app/common/api/HouseApi.php

+ 14 - 15
app/common/api/HouseApi.php

@@ -123,40 +123,40 @@ class HouseApi {
         if (($company["name"] == "super" || $company["code"] == "rsj") && \StrUtil::isNotEmpAndNull($query["companyName"])) {
             $where[] = ["t3.name", "like", "%" . $query["companyName"] . "%"];
         }
-        if (\StrUtil::isEmpOrNull($query["year"])) {
+        if (\StrUtil::isNotEmpAndNull($query["year"])) {
             $where[] = ["t2.year", "=", $query["year"]];
         }
-        if (\StrUtil::isEmpOrNull($query["name"])) {
+        if (\StrUtil::isNotEmpAndNull($query["name"])) {
             $where[] = ["t2.name", "like", "%" . $query["name"] . "%"];
         }
-        if (\StrUtil::isEmpOrNull($query["idCard"])) {
+        if (\StrUtil::isNotEmpAndNull($query["idCard"])) {
             $where[] = ["t2.idCard", "like", "%" . $query["idCard"] . "%"];
         }
-        if (\StrUtil::isEmpOrNull($query["spouseName"])) {
+        if (\StrUtil::isNotEmpAndNull($query["spouseName"])) {
             $where[] = ["t2.spouseName", "like", "%" . $query["spouseName"] . "%"];
         }
-        if (\StrUtil::isEmpOrNull($query["spouseIdcard"])) {
+        if (\StrUtil::isNotEmpAndNull($query["spouseIdcard"])) {
             $where[] = ["t2.spouseIdcard", "like", "%" . $query["spouseIdcard"] . "%"];
         }
-        if (\StrUtil::isEmpOrNull($query["childName"])) {
+        if (\StrUtil::isNotEmpAndNull($query["childName"])) {
             $where[] = ["t2.childName", "like", "%" . $query["childName"] . "%"];
         }
-        if (\StrUtil::isEmpOrNull($query["childIdCard"])) {
+        if (\StrUtil::isNotEmpAndNull($query["childIdCard"])) {
             $where[] = ["t2.childIdCard", "like", "%" . $query["childIdCard"] . "%"];
         }
-        if (\StrUtil::isEmpOrNull($query["talentArrange"])) {
+        if (\StrUtil::isNotEmpAndNull($query["talentArrange"])) {
             $where[] = ["t2.talentArrange", "=", $query["talentArrange"]];
         }
-        if (\StrUtil::isEmpOrNull($query["marryStatus"])) {
+        if (\StrUtil::isNotEmpAndNull($query["marryStatus"])) {
             $where[] = ["t2.marryStatus", "=", $query["marryStatus"]];
         }
-        if (\StrUtil::isEmpOrNull($query["state"])) {
+        if (\StrUtil::isNotEmpAndNull($query["state"])) {
             $where[] = ["t1.state", "=", $query["state"]];
         }
-        if (\StrUtil::isEmpOrNull($query["isConflict"])) {
+        if (\StrUtil::isNotEmpAndNull($query["isConflict"])) {
             $where[] = ["t2.isConflict", "=", $query["isConflict"]];
         }
-        if (\StrUtil::isEmpOrNull($query["isRecover"])) {
+        if (\StrUtil::isNotEmpAndNull($query["isRecover"])) {
             $where[] = ["t2.isRecover", "=", $query["isRecover"]];
         }
         $where[] = ["t1.type", "=", $type];
@@ -168,15 +168,14 @@ class HouseApi {
                 ->count();
 
         $list = Db::table("un_talent_depcheckstate")->alias("t1")
-                        ->field("t2.*,t1.companyId,t1.state,t3.`name` AS companyName,t5.description AS checkMsg,")
+                        ->field("t2.*,t1.companyId,t1.state,t3.`name` AS companyName,t5.description AS checkMsg")
                         ->leftJoin("un_housepurchase t2", "t2.id=t1.mainId")
                         ->leftJoin("sys_company t3", "t3.id=t1.companyId")
-                        ->leftJoin("(SELECT t4.mainId,t4.createTime,t4.companyId,t4.description FROM (SELECT * FROM un_talent_checklog WHERE type = #{type} AND step = 2 AND state != 8 ORDER BY createTime DESC LIMIT 100000) t4 GROUP BY t4.mainId,t4.companyId ORDER BY t4.createTime DESC) t5", "t1.mainId = t5.mainId AND t1.companyId = t5.companyId")
+                        ->leftJoin("(SELECT t4.mainId,t4.createTime,t4.companyId,t4.description FROM (SELECT * FROM new_talent_checklog WHERE type = {$type} AND step = 2 AND state != 8 ORDER BY createTime DESC LIMIT 100000) t4 GROUP BY t4.mainId,t4.companyId ORDER BY t4.createTime DESC) t5", "t1.mainId = t5.mainId AND t1.companyId = t5.companyId")
                         ->where($where)
                         ->limit($offset, $limit)
                         ->order("t1.createTime DESC")
                         ->select()->toArray();
-
         return ["total" => $count, "rows" => $list];
     }