瀏覽代碼

津补贴增加卫健高教

sugangqiang 1 年之前
父節點
當前提交
f080dbe241

+ 39 - 24
app/admin/controller/TalentAllowance.php

@@ -16,6 +16,7 @@ use app\common\state\AllowanceStateEnum;
 use app\common\state\AllowanceProjectEnum;
 use app\common\state\AllowanceTypeEnum;
 use app\common\model\AmountStandard as AsModel;
+use app\common\state\CommonConst;
 
 /**
  * Description of TalentAllowance
@@ -29,20 +30,34 @@ class TalentAllowance extends AdminController {
         $type = $this->user["type"];
         $assigns = ["process" => $process, "type" => $type];
         if ($process == 4) {
-            if ($type == 1) {
+            if ($type == CommonConst::ENTERPRISE_NORMAL) {
                 $msgBody["typeName"] = "晋江市现代产业体系人才津补贴申报";
                 $msgBody["address"] = "聚才网/人才晋江微信公众号";
                 $msgBody["dep"] = "中共晋江市委人才办、晋江市纪委监委驻市人力资源和社会保障局纪检监察组或晋江市公共就业和人才服务中心";
                 $msgBody["phone"] = "0595-85633128";
                 $msgBody["email"] = "jjrc85661234@163.com";
             }
-            if ($type == 2) {
+            if ($type == CommonConst::ENTERPRISE_JC) {
                 $msgBody["typeName"] = "晋江市集成电路产业优秀人才津补贴申报";
                 $msgBody["address"] = "福建(晋江)集成电路产业园官方网站及微信公众号";
                 $msgBody["dep"] = "集成电路产业园区";
                 $msgBody["phone"] = "0595-82250007、0595-82250001";
                 $msgBody["email"] = "jjjcdr@163.com";
             }
+            if ($type == CommonConst::ENTERPRISE_WJ) {
+                $msgBody["typeName"] = "晋江市医疗卫生人才津补贴申报";
+                $msgBody["address"] = "“健康晋江”微信公众号";
+                $msgBody["dep"] = "晋江市卫生健康局";
+                $msgBody["phone"] = "0595-85636159";
+                $msgBody["email"] = "jjswjjrsk@163.com";
+            }
+            if ($type == CommonConst::ENTERPRISE_GJ) {
+                $msgBody["typeName"] = "晋江市高等教育人才津补贴申报";
+                $msgBody["address"] = "“泉州市高教发展中心”微信公众号";
+                $msgBody["dep"] = "泉州市高教发展中心";
+                $msgBody["phone"] = "0595-85002588";
+                $msgBody["email"] = "jjsgjrc@126.com";
+            }
             $assigns["message"] = $msgBody;
         }
 
@@ -886,7 +901,7 @@ class TalentAllowance extends AdminController {
                 $i + 1, $item["name"], $enterpriseMap[$item["enterpriseId"]], $streetMap[$item["address"]], $levelMap[$item["talentArrange"]], $item["description"]
             ];
         }
-        $filename = ($this->user["type"] == 1 ? "晋江市优秀人才" : "晋江市集成电路人才") . $allList[0]["year"] . "年度津补贴不予兑现对象名单";
+        $filename = CommonConst::getTypeName($this->user["type"]) . $allList[0]["year"] . "年度津补贴不予兑现对象名单";
         $columns = ["序号", "姓名", "工作单位", "镇(街道)", "人才层次", "备注"];
         if ($rows) {
             export($columns, $rows, $filename);
@@ -930,7 +945,7 @@ class TalentAllowance extends AdminController {
           sheetSize++;
           }
           } */
-        $filename = ($this->user["type"] == 1 ? "晋江市优秀人才" : "晋江市集成电路人才") . $list[0]["year"] . "年度津补贴拟发放对象名单";
+        $filename = CommonConst::getTypeName($this->user["type"]) . $list[0]["year"] . "年度津补贴拟发放对象名单";
         $columns = ["序号", "姓名", "工作单位", "镇(街道)", "人才层次", "津补贴享受月份数", "每月享受津贴标准(元)", $list[0]["year"] . "年度累计应享受津补贴金额(元)", "备注"];
     }
 
@@ -1109,26 +1124,26 @@ class TalentAllowance extends AdminController {
             $detailMonthList[] = $detail;
         }
         /*         * 集成电路优秀人才 */
-        if ($this->user["type"] == 2) {
-            /*             * 获取各个项目的综合月份 */
-            $monthMap = $this->mergeMonth($detailMonthList);
-            $monthAndDayMap = $this->mergeMonthNeedDay($detailMonthList);
-            $info["recommendAllowanceType"] = 1;
-            $info["recommendAllowanceMsg"] = "";
-            $projectList = \app\common\model\TalentAllowanceProject::where("mainId", $info["id"])->select()->toArray();
-            $set = $this->valideAllowanceType($info, $projectList, $monthMap, $monthAndDayMap);
-            $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "\n综合以上所有判断得到最终补贴类型为:";
-            if ($info["recommendAllowanceType"] == 1) {
-                $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "工作津贴;可享受月份为:" . implode(",", $set) . "\n";
-            }
-            if ($info["recommendAllowanceType"] == 2)
-                $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "一次性交通补贴;";
-            if ($info["recommendAllowanceType"] == 3)
-                $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "不予兑现;";
-            usort($set, function($a, $b) {
-                return (int) $a - (int) $b;
-            });
+        //if ($this->user["type"] == 2) {
+        /*         * 获取各个项目的综合月份 */
+        $monthMap = $this->mergeMonth($detailMonthList);
+        $monthAndDayMap = $this->mergeMonthNeedDay($detailMonthList);
+        $info["recommendAllowanceType"] = 1;
+        $info["recommendAllowanceMsg"] = "";
+        $projectList = \app\common\model\TalentAllowanceProject::where("mainId", $info["id"])->select()->toArray();
+        $set = $this->valideAllowanceType($info, $projectList, $monthMap, $monthAndDayMap);
+        $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "\n综合以上所有判断得到最终补贴类型为:";
+        if ($info["recommendAllowanceType"] == 1) {
+            $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "工作津贴;可享受月份为:" . implode(",", $set) . "\n";
         }
+        if ($info["recommendAllowanceType"] == 2)
+            $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "一次性交通补贴;";
+        if ($info["recommendAllowanceType"] == 3)
+            $info["recommendAllowanceMsg"] = $info["recommendAllowanceMsg"] . "不予兑现;";
+        usort($set, function($a, $b) {
+            return (int) $a - (int) $b;
+        });
+        //}
         $info["recommendMonths"] = implode(",", $set);
         $arrangeList = $this->calculateAllowance($info, $set, $detailMonthList);
         return $arrangeList;
@@ -1647,7 +1662,7 @@ class TalentAllowance extends AdminController {
         foreach ($list as &$arrange) {
             $condition = \app\common\api\TalentConditionApi::getOne($arrange["identifyCondition"]);
             $arrange["identifyConditionText"] = $condition["name"];
-            $arrange["talentArrangeName"] = \app\common\state\CommonConst::getLayerNameByLayer($arrange["talentArrange"]);
+            $arrange["talentArrangeName"] = CommonConst::getLayerNameByLayer($arrange["talentArrange"]);
         }unset($arrange);
         return json(["rows" => $list, "total" => $count]);
     }

+ 15 - 0
app/common/state/CommonConst.php

@@ -96,6 +96,21 @@ class CommonConst {
         return $levelAndNames[$level];
     }
 
+    /**
+     * 通过层次得到层次名
+     * @param type $level
+     * @return string
+     */
+    public static function getTypeName($type) {
+        $typeAndNames = [
+            1 => "晋江市现代产业体系人才",
+            2 => "晋江市集成电路产业优秀人才",
+            5 => "晋江市医疗卫生人才",
+            6 => "晋江市高等教育人才"
+        ];
+        return $typeAndNames[$type];
+    }
+
     /**
      * 通过积分得到层次
      * @param type $points

+ 2 - 0
app/enterprise/controller/TalentAllowance.php

@@ -34,6 +34,8 @@ class TalentAllowance extends EnterpriseController {
     public function index() {
         $tpl = "";
         switch ($this->user["type"]) {
+            case CommonConst::ENTERPRISE_WJ:
+            case CommonConst::ENTERPRISE_GJ:
             case CommonConst::ENTERPRISE_JC:
                 $tpl = "indexIC";
                 break;