Эх сурвалжийг харах

津补贴隐藏没有绑定附件类型的通用附件

sugangqiang 9 сар өмнө
parent
commit
b5b7bf2f1a

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

@@ -565,7 +565,7 @@ class Api extends BaseController {
         $info = \app\common\api\TalentAllowanceApi::getInfoById($id);
         $info = \app\common\api\TalentAllowanceApi::getInfoById($id);
         $list = [];
         $list = [];
         if ($info) {
         if ($info) {
-            $where = [["batch", "=", $info["year"]], ["enterpriseId", "=", $info["enterpriseId"]]];
+            $where = [["batch", "=", $info["year"]], ["enterpriseId", "=", $info["enterpriseId"]], ["fileTypeId", "<>", 0]];
             $list = Db::table("un_talent_allowance_common_file")->alias("f")->leftJoin("new_common_filetype ft", "ft.id=f.fileTypeId")->where($where)->field("f.*,ft.name as fileTypeName")->select()->toArray();
             $list = Db::table("un_talent_allowance_common_file")->alias("f")->leftJoin("new_common_filetype ft", "ft.id=f.fileTypeId")->where($where)->field("f.*,ft.name as fileTypeName")->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"];

+ 8 - 0
app/enterprise/controller/LivingAllowance.php

@@ -245,6 +245,14 @@ class LivingAllowance extends EnterpriseController {
                     throw new ValidateException("没有对应的人才认定申报信息");
                     throw new ValidateException("没有对应的人才认定申报信息");
                 }
                 }
                 $data["checkState"] = $info["checkState"];
                 $data["checkState"] = $info["checkState"];
+                $old = CommonLaApi::getInfoById($id);
+                if ($old["idCard"] != $data["idCard"]) {
+                    $count = count(CommonLaApi::getPassYearsByIdCard($data["idCard"]));
+                    $data["applyCount"] = $count + 1;
+                    if ($data["applyCount"] > 1 && !$data["personalTax"]) {
+                        throw new ValidateException("非首年申报必须填写个税缴交情况!");
+                    }
+                }
             } else {
             } else {
                 $data["id"] = getStringId();
                 $data["id"] = getStringId();
                 $data["active"] = 1;
                 $data["active"] = 1;