浏览代码

高教增加项目

sugangqiang 10 月之前
父节点
当前提交
0c5e3f7a22

+ 3 - 0
app/admin/controller/TalentAllowance.php

@@ -1722,6 +1722,9 @@ class TalentAllowance extends AdminController {
                             AllowanceProjectEnum::PROJECT_SB_PENSION,
                             AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT,
                             AllowanceProjectEnum::PROJECT_SB_MEDICA,
+                            AllowanceProjectEnum::PROJECT_TEACHING,
+                            AllowanceProjectEnum::PROJECT_LESSON,
+                            AllowanceProjectEnum::PROJECT_TRAINING_PROGRAM,
                                 //AllowanceProjectEnum::PROJECT_WORKDAY
                         ]) ? 1 : 2;
             } else if ($info["checkState"] == 10 || $info["checkState"] == 8) {

+ 12 - 3
app/common/state/AllowanceProjectEnum.php

@@ -47,6 +47,8 @@ class AllowanceProjectEnum {
     const PROJECT_INBORDER = 15;
     //项目-工作日时间
     const PROJECT_WORKDAY = 16;
+    //项目-培养计划
+    const PROJECT_TRAINING_PROGRAM = 17;
     //合同满足两年
     const CONTRACT_YES = "是";
     //合同满足两年
@@ -63,9 +65,9 @@ class AllowanceProjectEnum {
             case self::PROJECT_ATTENDANCE:
                 return "考勤情况";
             case self::PROJECT_TEACHING:
-                return "授课计划情况";
+                return "授课计划";
             case self::PROJECT_LESSON:
-                return "备课教案情况";
+                return "备课教案";
             case self::PROJECT_SCIENTIFIC:
                 return "科研计划情况";
             case self::PROJECT_LETTER:
@@ -86,12 +88,14 @@ class AllowanceProjectEnum {
                 return "在境内时间";
             case self::PROJECT_WORKDAY:
                 return "在境工作日";
+            case self::PROJECT_TRAINING_PROGRAM:
+                return "培养计划";
             default:
                 return "";
         }
     }
 
-    static function getProjectsByEnterpriseType($type) {
+    static function getProjectsByEnterpriseType($type, $enterpriseId = 0) {
         $projects = [];
         if ($type == CommonConst::ENTERPRISE_WJ) {
             $projects = [
@@ -117,6 +121,11 @@ class AllowanceProjectEnum {
             ];
         }
 
+        $extraProjects = getJsonConfig("../sys_config.json", "talent_allowance_need_extra_project");
+        if ($enterpriseId && $extraProjects[$enterpriseId]) {
+            $projects = array_unique(array_merge($projects, $extraProjects[$enterpriseId]));
+        }
+
         return $projects;
     }
 

+ 38 - 6
app/enterprise/controller/TalentAllowance.php

@@ -41,7 +41,18 @@ class TalentAllowance extends EnterpriseController {
                 $tpl = "indexIC";
                 break;
         }
-        return view($tpl, ['type' => $this->user["type"]]);
+        $templateFile = "gjjbtbiao.xlsx";
+        if ($this->user["type"] == CommonConst::ENTERPRISE_GJ) {
+            $need_extra_project = getJsonConfig("../sys_config.json", "talent_allowance_need_extra_project");
+            if ($need_extra_project[$this->user["uid"]]) {
+                if ($need_extra_project[$this->user["uid"]][1] == AllowanceProjectEnum::PROJECT_TRAINING_PROGRAM) {
+                    $templateFile = "gjjbtbiao_2.xlsx";
+                } else {
+                    $templateFile = "gjjbtbiao_1.xlsx";
+                }
+            }
+        }
+        return view($tpl, ['type' => $this->user["type"], "templateFile" => $templateFile]);
     }
 
     public function list() {
@@ -137,7 +148,17 @@ class TalentAllowance extends EnterpriseController {
         array_shift($rows); //去标题行
         //检查excel文件有没有问题
         $checkMonths = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
-        $titles = ["姓名", "身份证", "申请补贴类型", "个税缴纳月份", "工资发放月份", "考勤情况", "养老保险", "失业保险", "医疗保险"];
+        $need_extra_project = getJsonConfig("../sys_config.json", "talent_allowance_need_extra_project");
+        if ($this->user["type"] == CommonConst::ENTERPRISE_GJ) {
+            $titles = ["姓名", "身份证", "申请补贴类型", "个税缴纳月份", "工资发放月份", "考勤情况", "养老保险"];
+            if ($need_extra_project[$this->user["uid"]]) {
+                for ($i = 0; $i < count($need_extra_project[$this->user["uid"]]); $i++) {
+                    $titles[] = AllowanceProjectEnum::getProjectName($need_extra_project[$this->user["uid"]][$i]);
+                }
+            }
+        } else {
+            $titles = ["姓名", "身份证", "申请补贴类型", "个税缴纳月份", "工资发放月份", "考勤情况", "养老保险", "失业保险", "医疗保险"];
+        }
         $allowanceTypes = ["工作津贴", "一次性交通补贴"];
         $idCards = [];
         foreach ($rows as $key => $row) {
@@ -156,7 +177,7 @@ class TalentAllowance extends EnterpriseController {
                 return \StrUtil::back(new Response(Response::ERROR, sprintf("第%d行申请补贴类型错误,请仔细检查内容无误后再重新提交", $no)), "TalentAllowanceInfo.importCallBack");
             }
             if ($allowanceType == "工作津贴") {
-                $projects = AllowanceProjectEnum::getProjectsByEnterpriseType($this->user["type"]);
+                $projects = AllowanceProjectEnum::getProjectsByEnterpriseType($this->user["type"], $this->user["uid"]);
                 for ($i = 3; $i < 9; $i++) {
                     $project = 1;
                     switch ($i) {
@@ -173,10 +194,18 @@ class TalentAllowance extends EnterpriseController {
                             $project = AllowanceProjectEnum::PROJECT_SB_PENSION;
                             break;
                         case 7:
-                            $project = AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT;
+                            if ($this->user["type"] == CommonConst::ENTERPRISE_GJ && $need_extra_project[$this->user["uid"]]) {
+                                $project = $need_extra_project[$this->user["uid"]][0];
+                            } else {
+                                $project = AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT;
+                            }
                             break;
                         case 8:
-                            $project = AllowanceProjectEnum::PROJECT_SB_MEDICA;
+                            if ($this->user["type"] == CommonConst::ENTERPRISE_GJ && $need_extra_project[$this->user["uid"]]) {
+                                $project = $need_extra_project[$this->user["uid"]][1];
+                            } else {
+                                $project = AllowanceProjectEnum::PROJECT_SB_MEDICA;
+                            }
                             break;
                     }
                     if (!in_array($project, $projects))
@@ -642,7 +671,7 @@ class TalentAllowance extends EnterpriseController {
         $count = 0;
         foreach ($contractList as $detail) {
             $count++;
-            $projects = AllowanceProjectEnum::getProjectsByEnterpriseType($info["type"]);
+            $projects = AllowanceProjectEnum::getProjectsByEnterpriseType($info["type"], $info["enterpriseId"]);
             $list = [];
             foreach ($projects as $project) {
                 $months = "";
@@ -703,6 +732,9 @@ class TalentAllowance extends EnterpriseController {
                             AllowanceProjectEnum::PROJECT_SB_PENSION,
                             AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT,
                             AllowanceProjectEnum::PROJECT_SB_MEDICA,
+                            AllowanceProjectEnum::PROJECT_TEACHING,
+                            AllowanceProjectEnum::PROJECT_LESSON,
+                            AllowanceProjectEnum::PROJECT_TRAINING_PROGRAM,
                                 //AllowanceProjectEnum::PROJECT_WORKDAY
                         ]) ? 1 : 2;
             } else if ($info["checkState"] == 10 || $info["checkState"] == 8) {

+ 1 - 1
app/enterprise/view/talent_allowance/indexIC.html

@@ -202,7 +202,7 @@
                 <a href="/wjjbtbiao.xlsx">下载津补贴申报表模板文件</a>
                 {/case}
                 {case value='6'}
-                <a href="/gjjbtbiao.xlsx">下载津补贴申报表模板文件</a>
+                <a href="/{$templateFile}">下载津补贴申报表模板文件</a>
                 {/case}
                 {default/}
                 <a href="/jbtbiao.xlsx">下载津补贴申报表模板文件</a>

+ 13 - 4
app/job/TalentAllowance.php

@@ -362,7 +362,7 @@ class TalentAllowance {
         $count = 0;
         foreach ($contractList as $detail) {
             $count++;
-            $projects = AllowanceProjectEnum::getProjectsByEnterpriseType($info["type"]);
+            $projects = AllowanceProjectEnum::getProjectsByEnterpriseType($info["type"], $info["enterpriseId"]);
             $list = [];
             foreach ($projects as $project) {
                 $months = "";
@@ -384,7 +384,8 @@ class TalentAllowance {
 
     private function createAllowanceProject_m2($info, $contractList, $rowdata) {
         $count = 0;
-        $projects = AllowanceProjectEnum::getProjectsByEnterpriseType($info["type"]);
+        $projects = AllowanceProjectEnum::getProjectsByEnterpriseType($info["type"], $info["enterpriseId"]);
+        $need_extra_project = getJsonConfig("../sys_config.json", "talent_allowance_need_extra_project");
         foreach ($contractList as $detail) {
             $count++;
             $list = [];
@@ -405,10 +406,18 @@ class TalentAllowance {
                         $project = AllowanceProjectEnum::PROJECT_SB_PENSION;
                         break;
                     case 7:
-                        $project = AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT;
+                        if ($info["type"] == \app\common\state\CommonConst::ENTERPRISE_GJ && $need_extra_project[$info["enterpriseId"]]) {
+                            $project = $need_extra_project[$info["enterpriseId"]][0];
+                        } else {
+                            $project = AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT;
+                        }
                         break;
                     case 8:
-                        $project = AllowanceProjectEnum::PROJECT_SB_MEDICA;
+                        if ($info["type"] == \app\common\state\CommonConst::ENTERPRISE_GJ && $need_extra_project[$info["enterpriseId"]]) {
+                            $project = $need_extra_project[$info["enterpriseId"]][1];
+                        } else {
+                            $project = AllowanceProjectEnum::PROJECT_SB_MEDICA;
+                        }
                         break;
                 }
                 if (!in_array($project, $projects))

二进制
public/gjjbtbiao_1.xlsx


二进制
public/gjjbtbiao_2.xlsx


+ 7 - 1
sys_config.json

@@ -153,5 +153,11 @@
 	},
 	"talent_allowance_need_choose_institution":[
 		"1215115207978827777","1216568840104734722"
-	]
+	],
+	"talent_allowance_need_extra_project":{
+		"1211474926804975617":[5,6],
+		"1211490446086291458":[5,6],
+		"1215115207978827777":[5,17],
+		"1216568840104734722":[5,17]
+	}
 }