sugangqiang 1 year ago
parent
commit
866c944d40
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/enterprise/controller/TalentAllowance.php

+ 5 - 1
app/enterprise/controller/TalentAllowance.php

@@ -938,7 +938,11 @@ class TalentAllowance extends EnterpriseController {
         $whr[] = ["project", "=", ProjectState::JBT];
         $whr[] = ["project", "=", ProjectState::JBT];
         $whr[] = ["isConditionFile", "=", 0];
         $whr[] = ["isConditionFile", "=", 0];
         $whr[] = ["delete", "=", 0];
         $whr[] = ["delete", "=", 0];
-        $commonFileTypes = Db::table("new_common_filetype")->where($whr)->whereRaw("find_in_set(:enterpriseId,enterpriseIds)", ["enterpriseId" => $this->user["uid"]])->select()->toArray();
+        if ($this->user["type"] == CommonConst::ENTERPRISE_JC) {
+            $commonFileTypes = Db::table("new_common_filetype")->where($whr)->whereRaw("find_in_set(:enterpriseId,enterpriseIds)", ["enterpriseId" => $this->user["uid"]])->select()->toArray();
+        } else {
+            $commonFileTypes = Db::table("new_common_filetype")->where($whr)->select()->toArray();
+        }
 
 
         foreach ($list as $key => $item) {
         foreach ($list as $key => $item) {
             $list[$key]["ext"] = pathinfo($item["url"])["extension"];
             $list[$key]["ext"] = pathinfo($item["url"])["extension"];