Prechádzať zdrojové kódy

增加两个方法,根据条件获得企业和津补贴附件

sugangqiang 1 rok pred
rodič
commit
649377ade6
1 zmenil súbory, kde vykonal 19 pridanie a 1 odobranie
  1. 19 1
      app/common/controller/Api.php

+ 19 - 1
app/common/controller/Api.php

@@ -892,6 +892,12 @@ class Api extends BaseController {
         return json($companys);
     }
 
+    public function getEnterpriseKvs() {
+        $where[] = ["type", "=", $this->user["type"]];
+        $enterprises = \app\common\model\Enterprise::field("name,id")->where($where)->select();
+        return json($enterprises);
+    }
+
     public function getLayerCatsByLayer() {
         $lv = $this->request->param("level");
         return json(DictApi::getLayerCatsByLayer($lv));
@@ -1098,8 +1104,20 @@ class Api extends BaseController {
         return view("admin@talent/filesShow");
     }
 
-    public function getEnterpriseData(){
+    public function getJbtFiletypesExceptCommon() {
+        $type = $this->user["type"];
+        $where[] = ["type", "=", $type];
+        $where[] = ["project", "=", 2];
+        $where[] = ["isConditionFile", "in", [1, 2]];
+        $fileTypes = \app\common\api\FileTypeApi::getAll($where);
+        foreach ($fileTypes as &$ft) {
+            $ft["name"] = sprintf("%s(%s)", $ft["name"], \app\common\state\AllowanceTypeEnum::getTypeName($ft["isConditionFile"]));
+        }
+        return json($fileTypes);
+    }
 
+    public function getEnterpriseData() {
+        
     }
 
 }