فهرست منبع

卫健申报津补贴的时候判断现有人才不能申报一次性交通补贴

sugangqiang 1 سال پیش
والد
کامیت
2004333b28
2فایلهای تغییر یافته به همراه10 افزوده شده و 0 حذف شده
  1. 4 0
      app/enterprise/controller/TalentAllowance.php
  2. 6 0
      app/job/TalentAllowance.php

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

@@ -218,6 +218,10 @@ class TalentAllowance extends EnterpriseController {
 
             $user = $this->user;
             $ti = \app\common\api\VerifyApi::getTalentInfoById($param["talentId"]);
+            if ($ti["talent_type"] == 1 && $ti["enterpriseType"] == CommonConst::ENTERPRISE_WJ && $param["allowanceType"] == AllowanceTypeEnum::JBT_JT) {
+                $response->msg = "现有人才暂时不能申请一次性交通贴补";
+                return $response;
+            }
             $data = [
                 "talentId" => $param["talentId"],
                 "enterpriseId" => $ti["enterprise_id"],

+ 6 - 0
app/job/TalentAllowance.php

@@ -52,6 +52,9 @@ class TalentAllowance {
                     $allowanceType = $data["allowanceType"];
                     if ($method == 1) {
                         $ti = \app\common\api\VerifyApi::getTalentInfoById($talentId);
+                        if ($ti["talent_type"] == 1 && $ti["enterpriseType"] == \app\common\state\CommonConst::ENTERPRISE_WJ && $allowanceType == AllowanceTypeEnum::JBT_JT) {
+                            return false;
+                        }
                     } else {
                         $where[] = ["card_number", "=", $importRow[1]];
                         $where[] = ["delete", "=", 0];
@@ -59,6 +62,9 @@ class TalentAllowance {
                         $ti = Db::table("new_talent_info")->where($where)->find();
                         $talentId = $ti["id"];
                         $ti = \app\common\api\VerifyApi::getTalentInfoById($talentId);
+                        if ($ti["talent_type"] == 1 && $ti["enterpriseType"] == \app\common\state\CommonConst::ENTERPRISE_WJ && $allowanceType == AllowanceTypeEnum::JBT_JT) {
+                            return false;
+                        }
                     }
                     if ($ti["checkState"] != TalentState::CERTIFICATED || $ti["enterprise_id"] != $enterprise["uid"] || !$year || !$allowanceType) {
                         return false;