House.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. <?php
  2. namespace app\enterprise\controller;
  3. use app\enterprise\common\EnterpriseController;
  4. use think\facade\Db;
  5. use think\facade\Log;
  6. use app\common\api\EnterpriseApi;
  7. use app\common\api\TalentLogApi;
  8. use think\exception\ValidateException;
  9. use app\common\state\ProjectState;
  10. use app\common\api\BatchApi;
  11. use app\common\api\HouseApi;
  12. use app\common\model\TalentLog;
  13. use app\common\api\DictApi;
  14. use app\common\state\CommonConst;
  15. use app\common\state\MainState;
  16. use app\common\api\Response;
  17. use app\common\model\HousePurchase as houseModel;
  18. /**
  19. * Description of House
  20. * 购房补贴
  21. * @author sgq
  22. */
  23. class House extends EnterpriseController {
  24. public function index() {
  25. return view("", ['type' => session("user")['type']]);
  26. }
  27. public function list() {
  28. $params = $this->request;
  29. $order = trim($params["order"]) ?: "desc";
  30. $offset = trim($params["offset"]) ?: 0;
  31. $limit = trim($params["limit"]) ?: 10;
  32. $where = [];
  33. $where[] = ["type", "=", $this->user["type"]];
  34. $where[] = ["enterpriseId", "=", $this->user["uid"]];
  35. if ($params["year"]) {
  36. $where[] = ["year", "=", $params["year"]];
  37. }
  38. if (\StrUtil::isNotEmpAndNull($params["name"])) {
  39. $where[] = ["name", "like", "%" . $params["name"] . "%"];
  40. }
  41. if (\StrUtil::isNotEmpAndNull($params["idCard"])) {
  42. $where[] = ["idCard", "like", "%" . $params["idCard"] . "%"];
  43. }
  44. if ($params["talentArrange"]) {
  45. $where[] = ["talentArrange", "=", $params["talentArrange"]];
  46. }
  47. if (\StrUtil::isNotEmpAndNull($params["spouseName"])) {
  48. $where[] = ["spouseName", "like", "%" . $params["spouseName"] . "%"];
  49. }
  50. if (\StrUtil::isNotEmpAndNull($params["spouseIdcard"])) {
  51. $where[] = ["spouseIdcard", "like", "%" . $params["spouseIdcard"] . "%"];
  52. }
  53. if (\StrUtil::isNotEmpAndNull($params["childName"])) {
  54. $where[] = ["childName", "like", "%" . $params["childName"] . "%"];
  55. }
  56. if (\StrUtil::isNotEmpAndNull($params["childIdCard"])) {
  57. $where[] = ["childIdCard", "like", "%" . $params["childIdCard"] . "%"];
  58. }
  59. if ($params["marryStatus"]) {
  60. $where[] = ["marryStatus", "=", $params["marryStatus"]];
  61. }
  62. $count = houseModel::where($where)->count();
  63. $list = houseModel::where($where)->limit($offset, $limit)->order("createTime $order")->select()->toArray();
  64. //获取字典表婚姻状态
  65. $marryMap = DictApi::selectByParentCode("marry_status");
  66. $cardTypeMap = DictApi::selectByParentCode("card_type");
  67. $streetMap = DictApi::selectByParentCode("street");
  68. $levelMap = DictApi::selectByParentCode("talent_arrange");
  69. $whrCondition = [];
  70. $whrCondition[] = ["type", "=", $this->user["type"]];
  71. $conditionMap = \app\common\model\TalentCondition::where($whrCondition)->column("name", "id");
  72. foreach ($list as &$item) {
  73. $item["marryStatusName"] = $marryMap[$item["marryStatus"]];
  74. $item["cardTypeName"] = $cardTypeMap[$item["cardType"]];
  75. $item["spouseCardTypeName"] = $cardTypeMap[$item["spouseCardType"]];
  76. $item["childCardTypeName"] = $cardTypeMap[$item["childCardType"]];
  77. $item["streetName"] = $streetMap[$item["street"]];
  78. $item["talentArrangeName"] = $levelMap[$item["talentArrange"]];
  79. $item["identifyConditionCH"] = $conditionMap[$item["identifyCondition"]];
  80. }unset($item);
  81. return json(["rows" => $list, "total" => $count]);
  82. }
  83. /**
  84. * 申请
  85. */
  86. public function apply(\think\Request $request) {
  87. $param = $request->param();
  88. $id = isset($param["id"]) ? $param["id"] : 0;
  89. $vars = [];
  90. if ($id) {
  91. $info = HouseApi::getInfoById($id);
  92. $childrenList = HouseApi::getChildren($id);
  93. $houseInfo = HouseApi::getHouseInfo($info["idCard"]);
  94. $dicts = DictApi::selectByParentCode("card_type");
  95. $vars["dicts"] = $dicts;
  96. $vars["row"] = $info;
  97. $vars["hand"] = $houseInfo ? 2 : 1;
  98. $vars["childrenList"] = $childrenList;
  99. }
  100. if ($request->isPost()) {
  101. return $this->save($info, $request);
  102. }
  103. $batch = $info["year"] ?: BatchApi::getValidBatch(ProjectState::HOUSE, $this->user["type"])["batch"];
  104. $vars["year"] = $batch;
  105. $vars["type"] = $this->user["type"];
  106. return view("", $vars);
  107. }
  108. public function detail(\think\Request $request) {
  109. $info = HouseApi::getInfoById($id);
  110. $childrenList = HouseApi::getChildren($id);
  111. $dicts = DictApi::selectByParentCode("card_type");
  112. $vars["dicts"] = $dicts;
  113. $vars["row"] = $info;
  114. $vars["childrenList"] = $childrenList;
  115. $vars["type"] = $this->user["type"];
  116. return view("", $vars);
  117. }
  118. private function other_validate(&$info, $type) {
  119. //校验配偶是否在库
  120. if ($info["spouseIsLibrary"] && $info["spouseIsLibrary"] == 1) {
  121. if (\StrUtil::isEmpOrNull($info["spouseIdcard"])) {
  122. return new Response(Response::ERROR, "请填写配偶证件号码");
  123. }
  124. if (\StrUtil::isEmpOrNull($info["spouseName"])) {
  125. return new Response(Response::ERROR, "请填写配偶姓名");
  126. }
  127. $where = [];
  128. $where[] = ["card_number", "=", $info["spouseIdcard"]];
  129. $where[] = ["name", "=", $info["spouseName"]];
  130. $where[] = ["checkState", "=", \app\common\api\TalentState::CERTIFICATED];
  131. $where[] = ["isEffect", "<>", 4];
  132. $where[] = ["delete", "=", 0];
  133. $count = Db::table("new_talent_info")->where($where)->count();
  134. if ($count == 0) {
  135. return new Response(Response::ERROR, "人才库中未查询到配偶相关信息");
  136. }
  137. }
  138. $ti = \app\common\api\VerifyApi::getTalentInfoById($info["talentId"]);
  139. $info["provinceCode"] = $ti["province"];
  140. $info["provinceName"] = $ti["provinceName"];
  141. $info["cityCode"] = $ti["city"];
  142. $info["cityName"] = $ti["cityName"];
  143. $info["countyCode"] = $ti["county"];
  144. $info["countyName"] = $ti["countyName"];
  145. $info["street"] = $ti["street"];
  146. $info["bank"] = $ti["bank"];
  147. $info["bankAccount"] = $ti["bank_account"];
  148. $info["bankNetwork"] = $ti["bank_branch_name"];
  149. $info["bankNumber"] = $ti["bank_number"];
  150. /* * 校验上一年度人才层次 */
  151. if ($type == 1) {
  152. $responseObj = $this->getTalentArrange($ti, $info["year"]);
  153. if ($responseObj->code == 500) {
  154. return $responseObj;
  155. }
  156. $resInfo = $responseObj->obj;
  157. $info["talentArrange"] = $resInfo["talentArrange"];
  158. $info["identifyCondition"] = $resInfo["identifyCondition"];
  159. $info["idenfityConditionName"] = $resInfo["identifyConditionName"];
  160. $info["identifyGetTime"] = $resInfo["identifyGetTime"];
  161. //设置上一年度人才层次有效月份
  162. $info["monthCount"] = count($resInfo["monthList"]);
  163. if ($info["monthCount"] < 9) {
  164. return new Response(Response::ERROR, "申报年度人才证书有效期未满足九个月,无法申报购房补贴");
  165. }
  166. $info["talentArrangeMonths"] = implode(",", $resInfo["monthList"]);
  167. }
  168. return new Response(Response::SUCCESS, "");
  169. }
  170. private function validateIsEdit($checkState) {
  171. if ($checkState != MainState::SAVE && $checkState != MainState::FIRST_REJECT) {
  172. return new Response(Response::ERROR, "正在审核中,无法修改");
  173. }
  174. return new Response(Response::SUCCESS, "");
  175. }
  176. /**
  177. * 提交表单
  178. */
  179. public function submitToCheck() {
  180. try {
  181. $id = $this->request["id"];
  182. $info = HouseApi::getInfoById($id);
  183. if (!$info) {
  184. throw new ValidateException("提交审核失败,请先填写基础信息");
  185. }
  186. if ($info["enterpriseId"] != $this->user["uid"]) {
  187. throw new ValidateException("没有对应的人才认定申报信息");
  188. }
  189. $batch = BatchApi::checkBatchValid(["type" => ProjectState::HOUSE, "year" => $info["year"], "first_submit_time" => $info["firstSubmitTime"]], $this->user["type"]);
  190. if ($batch["code"] != 200) {
  191. throw new ValidateException($batch["msg"]);
  192. }
  193. $response = $this->validateIsEdit($info["checkState"]);
  194. if ($response->code != 200) {
  195. throw new ValidateException($response->msg);
  196. }
  197. validate(\app\enterprise\validate\HouseValidator::class)->check($info);
  198. $response = $this->other_validate($info, 2);
  199. if ($response->code != 200) {
  200. throw new ValidateException($response->msg);
  201. }
  202. $where = [];
  203. $where[] = ["mainId", "=", $id];
  204. $where[] = ["type", "=", ProjectState::HOUSE];
  205. $uploadedFileTypes = Db::table("new_talent_file")->where($where)->column("distinct typeId");
  206. $where = [];
  207. $where[] = ["project", "=", ProjectState::HOUSE];
  208. $where[] = ["type", "=", $this->user["type"]];
  209. $where[] = ["must", "=", 1];
  210. $where[] = ["active", "=", 1];
  211. $where[] = ["delete", "=", 0];
  212. $where[] = ["id", "not in", $uploadedFileTypes];
  213. $unUploadfiletypes = Db::table("new_common_filetype")->where($where)->select()->toArray();
  214. if ($unUploadfiletypes) {
  215. $msg = "以下附件为必传:<br>";
  216. foreach ($unUploadfiletypes as $ft) {
  217. $msg .= "<span style='color:red;'>*</span>" . $ft["name"] . "<br>";
  218. }
  219. throw new ValidateException($msg);
  220. }
  221. $data["id"] = $id;
  222. $data["checkState"] = LaState::LA_NEED_FIRST_CHECK;
  223. if (!$info["firstSubmitTime"]) {
  224. $data["firstSubmitTime"] = date("Y-m-d H:i:s");
  225. }
  226. $data["newSubmitTime"] = date("Y-m-d H:i:s");
  227. $data["checkMsg"] = "";
  228. $data["files"] = "";
  229. $data["fields"] = "";
  230. $res = LaModel::update($data);
  231. if ($res) {
  232. $user = session("user");
  233. $log["id"] = getStringId();
  234. $log["active"] = 1;
  235. $log["state"] = 1;
  236. $log["step"] = 0;
  237. $log["stateChange"] = LaState::getStateDesc($info["checkState"]) . "->" . LaState::getStateDesc($data["checkState"]);
  238. $log["type"] = ProjectState::LIVINGALLOWANCE;
  239. $log["mainId"] = $id;
  240. $log["description"] = "确认提交审核";
  241. $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
  242. $log["createTime"] = date("Y-m-d H:i:s");
  243. TalentLog::create($log);
  244. return json(["code" => 200, "msg" => "提交审核成功"]);
  245. }
  246. throw new ValidateException("提交审核失败");
  247. } catch (ValidateException $e) {
  248. $responseObj = new \stdClass();
  249. $responseObj->code = 500;
  250. $responseObj->msg = $e->getMessage();
  251. return json($responseObj);
  252. } catch (\think\Exception $e) {
  253. $res = ["code" => 500, "msg" => "发生预料外错误,请联系管理员处理,错误代码:" . $e->getCode()];
  254. $logInfo = [
  255. "enterprise_id" => $this->user["uid"],
  256. "data" => $data,
  257. "controller" => $this->request->controller(),
  258. "action" => $this->request->action(),
  259. "errCode" => $e->getCode(),
  260. "errMsg" => $e->getMessage()
  261. ];
  262. Log::write($logInfo, "error");
  263. return json($res);
  264. }
  265. }
  266. public function save($info, \think\Request $request) {
  267. try {
  268. $batch = BatchApi::checkBatchValid(["type" => ProjectState::HOUSE, "year" => $info["year"], "first_submit_time" => $info["firstSubmitTime"]], $this->user["type"]);
  269. if ($batch["code"] != 200) {
  270. throw new ValidateException($batch["msg"]);
  271. }
  272. if ($info) {
  273. $response = $this->validateIsEdit($info["checkState"]);
  274. if ($response->code != 200) {
  275. throw new ValidateException($response->msg);
  276. }
  277. }
  278. $data = $request->param();
  279. $data["year"] = $batch["batch"];
  280. $data["type"] = $this->user["type"];
  281. validate(\app\enterprise\validate\HouseValidator::class)->check($data);
  282. $response = $this->other_validate($data, $info ? 2 : 1);
  283. if ($response->code != 200) {
  284. throw new ValidateException($response->msg);
  285. }
  286. $id = $data["id"];
  287. if ($id) {
  288. if (!$info || $info["id"] != $id || $info["enterpriseId"] != $this->user["uid"]) {
  289. throw new ValidateException("没有对应的人才认定申报信息");
  290. }
  291. $data["checkState"] = $info["checkState"];
  292. } else {
  293. $data["id"] = getStringId();
  294. $data["checkState"] = MainState::SAVE;
  295. $data["createUser"] = $this->user["uid"];
  296. $data["createTime"] = date("Y-m-d H:i:s");
  297. $data["enterpriseId"] = $this->user["uid"];
  298. $data["isConflict"] = 2;
  299. $data["isRecover"] = 2;
  300. $houseInfo = HouseApi::getHouseInfo($data["idCard"]);
  301. $data["number"] = !$houseInfo ? 1 : $houseInfo["count"] + 1;
  302. }
  303. $childList = $data["childList"];
  304. unset($data["jstime"]);
  305. unset($data["childList"]);
  306. if ($id) {
  307. $res = houseModel::update($data);
  308. } else {
  309. $res = houseModel::insertGetId($data);
  310. }
  311. foreach ($childList as &$children) {
  312. $children["pId"] = $data["id"];
  313. if (\StrUtil::isEmpOrNull($children["id"])) {
  314. $children["id"] = getStringId();
  315. $children["createTime"] = date("Y-m-d H:i:s");
  316. } else {
  317. $children["updateTime"] = date("Y-m-d H:i:s");
  318. }
  319. }
  320. if ($childList) {
  321. \app\common\model\HousePurchaseChildren::insertAll($childList);
  322. }
  323. //添加日志
  324. \app\common\model\TalentChecklog::create([
  325. 'id' => getStringId(),
  326. 'mainId' => $data['id'],
  327. 'type' => intval(ProjectState::HOUSE),
  328. 'typeFileId' => null,
  329. 'active' => 1,
  330. 'state' => 1,
  331. 'step' => 0,
  332. 'stateChange' => "保存未提交",
  333. 'description' => "添加购房补贴申报",
  334. 'createTime' => date("Y-m-d H:i:s", time()),
  335. 'createUser' => "申报用户"
  336. ]);
  337. return json(new Response(Response::SUCCESS, "添加成功", $data));
  338. } catch (ValidateException $e) {
  339. return json(new Response(Response::ERROR, $e->getMessage()));
  340. } catch (\think\Exception $e) {
  341. $logInfo = [
  342. "enterprise_id" => $this->user["uid"],
  343. "data" => $data,
  344. "controller" => $this->request->controller(),
  345. "action" => $this->request->action(),
  346. "errCode" => $e->getCode(),
  347. "errMsg" => $e->getMessage()
  348. ];
  349. Log::write($logInfo, "error");
  350. return json(new Response(Response::ERROR, "发生预料外错误,请联系管理员处理,错误代码:" . $e->getCode()));
  351. }
  352. }
  353. public function delete() {
  354. $id = $this->request->param("id");
  355. $info = CommonLaApi::getInfoById($id);
  356. if (!$info || $info["enterpriseId"] != $this->user["uid"]) {
  357. return json(["msg" => "操作失败"]);
  358. }
  359. $checkState = $info["checkState"];
  360. if ($checkState != LaState::LA_SAVE) {
  361. return json(["msg" => "该申报已提交审核,无法删除"]);
  362. }
  363. TalentModel::delete($id);
  364. $where = [["mainId", "=", $id], ["type", "=", ProjectState::LIVINGALLOWANCE]];
  365. $list = Db::table("new_talent_file")->where($where)->select()->toArray();
  366. foreach ($list as $key => $file) {
  367. if (!empty($file["url"])) {
  368. $filepath = "storage/" . $file["url"];
  369. if (file_exists($filepath)) {
  370. @unlink($filepath);
  371. }
  372. }
  373. Db::table("new_talent_file")->delete($file["id"]);
  374. }
  375. return json(["msg" => "删除成功"]);
  376. }
  377. public function getTalentInfo($id, $year, $declareType) {
  378. $ti = \app\common\api\VerifyApi::getTalentInfoById($id);
  379. $response = $this->getTalentArrange($ti, $year);
  380. if ($response->code == 500) {
  381. return $response;
  382. }
  383. $resTalentInfo = $response->obj;
  384. $ti["talentArrange"] = $resTalentInfo["talentArrange"];
  385. $ti["identifyCondition"] = $resTalentInfo["identifyCondition"];
  386. $ti["identifyConditionName"] = $resTalentInfo["identifyConditionName"];
  387. $ti["identifyMonth"] = $resTalentInfo["identifyMonth"];
  388. $ti["identifyGetTime"] = $resTalentInfo["identifyGetTime"];
  389. $ti["certificateStartTime"] = $resTalentInfo["certificateStartTime"];
  390. $ti["certificateOutTime"] = $resTalentInfo["certificateOutTime"];
  391. //查询房产库中是否存在房产信息
  392. $houseInfo = HouseApi::getHouseInfo($ti["card_number"]);
  393. return new Response(Response::SUCCESS, "", ["talentInfo" => $ti, "houseInfo" => $houseInfo]);
  394. }
  395. /**
  396. * @param talentInfo
  397. * @param year
  398. * @description 获取上一年度的人才层次,规则如下:上一年度存在多个人才层次则取占比大的人才层次,占比相同则取人才层次高者
  399. * @returns com.stylefeng.guns.core.common.model.ResponseObj
  400. * @author Liu
  401. * @date 2020/5/6
  402. * */
  403. private function getTalentArrange($talentInfo, $year) {
  404. /**
  405. * 判定在申报年度内或之前是否认定,申报年度之后认定无效,根据公布入选月份判断(此处还要考虑人才层次变更)
  406. */
  407. $year = substr($year, 0, 4);
  408. $identifyTimeField = "identifyMonth";
  409. $oldStartTimeField = "oldIdentifyMonth";
  410. $newStartTimeField = "newIdentifyMonth";
  411. if ($talentInfo["enterpriseType"] == CommonConst::ENTERPRISE_JC) {
  412. $identifyTimeField = "identifyGetTime";
  413. $oldStartTimeField = "oldIdentifyGetTime";
  414. $newStartTimeField = "newIdentifyGetTime";
  415. }
  416. $where = [];
  417. $where[] = ["idCard", "=", $talentInfo["card_number"]];
  418. $where[] = ["checkState", "=", MainState::PASS];
  419. $where[] = ["isPublic", "=", 6];
  420. $where[] = [$oldStartTimeField, "<=", $year . "-12-31"];
  421. $typeChanges = \app\enterprise\model\TalentTypeChange::where($where)->field("oldTalentArrange,oldIdentifyCondition,oldIdentifyGetTime,oldIdentifyOutTime,oldIdentifyConditionName,oldIdentifyMonth,oldCertificateStartTime,oldCertificateOutTime,newIdentifyMonth,newIdentifyGetTime")->order("createTime desc")->select()->toArray();
  422. if (!$typeChanges && strtotime($year . "-12-31") > strtotime($talentInfo[$identifyTimeField])) {
  423. return new Response(Response::ERROR, "在上一年度未认定优秀人才,无法申报");
  424. } else {
  425. $typeChanges[] = [
  426. "oldTalentArrange" => $talentInfo["talent_arrange"],
  427. "oldIdentifyCondition" => $talentInfo["talent_condition"],
  428. "oldIdentifyGetTime" => $talentInfo["identifyGetTime"],
  429. "oldIdentifyOutTime" => $talentInfo["identifyExpireTime"],
  430. "oldIdentifyConditionName" => $talentInfo["identifyConditionName"],
  431. "oldIdentifyMonth" => $talentInfo["identifyMonth"],
  432. "oldCertificateStartTime" => $talentInfo["certificateGetTime"],
  433. "oldCertificateOutTime" => $talentInfo["certificateExpireTime"] ?: date("Y-m-d", strtotime(sprintf("%s +6 years -1 days", $talentInfo["certificateGetTime"]))),
  434. "newIdentifyMonth" => ($year + 1) . "-01-01",
  435. "newIdentifyGetTime" => ($year + 1) . "-01-01"
  436. ];
  437. $totalMonth = \DateUtil::getMonthBetweenDates($year . "-01-01", $year . "-12-31");
  438. usort($typeChanges, function($a, $b) {
  439. return (int) $b["oldTalentArrange"] - (int) $a["oldTalentArrange"];
  440. });
  441. $months = []; //当年度可用月份
  442. $talentArrange = 8; //当年度最高层次
  443. $resTalentInfo = [];
  444. foreach ($typeChanges as $typeChange) {
  445. $startTime = $typeChange[$oldStartTimeField];
  446. $endTime = $typeChange[$newStartTimeField];
  447. $monthList = \DateUtil::getMonthBetweenDatesNotEnd($startTime, $endTime);
  448. $res = \DateUtil::getEveryMonthDayBetween($endTime, $endTime, $monthList);
  449. $intersectMonthList = array_intersect($totalMonth, $monthList);
  450. if (count($intersectMonthList) > 0) {
  451. if ($typeChange["oldTalentArrange"] < $talentArrange) {
  452. //按当年度最高
  453. $talentArrange = $typeChange["oldTalentArrange"];
  454. $resTalentInfo = [
  455. "talentArrange" => $typeChange["oldTalentArrange"],
  456. "identifyCondition" => $typeChange["oldIdentifyCondition"],
  457. "identifyGetTime" => $typeChange["oldIdentifyGetTime"],
  458. "identifyConditionName" => $typeChange["oldIdentifyConditionName"],
  459. "certificateStartTime" => $typeChange["oldCertificateStartTime"],
  460. "certificateOutTime" => $typeChange["oldCertificateOutTime"],
  461. "identifyMonth" => $typeChange["oldIdentifyMonth"],
  462. "dayMap" => $res
  463. ];
  464. }
  465. $months = array_unique(array_merge($months, $intersectMonthList));
  466. }
  467. }
  468. $resTalentInfo["monthList"] = $months;
  469. if (count($months) < 9) {
  470. return new Response(Response::ERROR, "申报年度人才证书有效期未满足九个月,无法申报购房补贴");
  471. }
  472. return new Response(Response::SUCCESS, "", $resTalentInfo);
  473. }
  474. }
  475. }