House.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  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. /**
  18. * Description of House
  19. * 购房补贴
  20. * @author sgq
  21. */
  22. class House extends EnterpriseController {
  23. public function index() {
  24. return view("", ['type' => session("user")['type']]);
  25. }
  26. public function list() {
  27. $params = $this->request;
  28. $order = trim($params["order"]) ?: "desc";
  29. $offset = trim($params["offset"]) ?: 0;
  30. $limit = trim($params["limit"]) ?: 10;
  31. $where = [];
  32. $where[] = ["type", "=", $this->user["type"]];
  33. $where[] = ["enterpriseId", "=", $this->user["uid"]];
  34. if ($params["year"]) {
  35. $where[] = ["year", "=", $params["year"]];
  36. }
  37. if (\StrUtil::isNotEmpAndNull($params["name"])) {
  38. $where[] = ["name", "like", "%" . $params["name"] . "%"];
  39. }
  40. if (\StrUtil::isNotEmpAndNull($params["idCard"])) {
  41. $where[] = ["idCard", "like", "%" . $params["idCard"] . "%"];
  42. }
  43. if ($params["talentArrange"]) {
  44. $where[] = ["talentArrange", "=", $params["talentArrange"]];
  45. }
  46. if (\StrUtil::isNotEmpAndNull($params["spouseName"])) {
  47. $where[] = ["spouseName", "like", "%" . $params["spouseName"] . "%"];
  48. }
  49. if (\StrUtil::isNotEmpAndNull($params["spouseIdcard"])) {
  50. $where[] = ["spouseIdcard", "like", "%" . $params["spouseIdcard"] . "%"];
  51. }
  52. if (\StrUtil::isNotEmpAndNull($params["childName"])) {
  53. $where[] = ["childName", "like", "%" . $params["childName"] . "%"];
  54. }
  55. if (\StrUtil::isNotEmpAndNull($params["childIdCard"])) {
  56. $where[] = ["childIdCard", "like", "%" . $params["childIdCard"] . "%"];
  57. }
  58. if ($params["marryStatus"]) {
  59. $where[] = ["marryStatus", "=", $params["marryStatus"]];
  60. }
  61. $count = Db::table("un_housepurchase")->where($where)->count();
  62. $list = Db::table("un_housepurchase")->where($where)->limit($offset, $limit)->order("createTime $order")->select()->toArray();
  63. //获取字典表婚姻状态
  64. $marryMap = DictApi::selectByParentCode("marry_status");
  65. $cardTypeMap = DictApi::selectByParentCode("card_type");
  66. $streetMap = DictApi::selectByParentCode("street");
  67. $levelMap = DictApi::selectByParentCode("talent_arrange");
  68. $whrCondition = [];
  69. $whrCondition[] = ["type", "=", $this->user["type"]];
  70. $conditionMap = \app\common\model\TalentCondition::where($whrCondition)->column("name", "id");
  71. foreach ($list as &$item) {
  72. $item["marryStatusName"] = $marryMap[$item["marryStatus"]];
  73. $item["cardTypeName"] = $cardTypeMap[$item["cardType"]];
  74. $item["spouseCardTypeName"] = $cardTypeMap[$item["spouseCardType"]];
  75. $item["childCardTypeName"] = $cardTypeMap[$item["childCardType"]];
  76. $item["streetName"] = $streetMap[$item["street"]];
  77. $item["talentArrangeName"] = $levelMap[$item["talentArrange"]];
  78. $item["identifyConditionCH"] = $conditionMap[$item["identifyCondition"]];
  79. }unset($item);
  80. return json(["rows" => $list, "total" => $count]);
  81. }
  82. /**
  83. * 申请
  84. */
  85. public function apply(\think\Request $request) {
  86. $param = $request->param();
  87. $id = isset($param["id"]) ? $param["id"] : 0;
  88. $vars = [];
  89. if ($id) {
  90. $info = HouseApi::getInfoById($id);
  91. $childrenList = HouseApi::getChildren($id);
  92. $houseInfo = HouseApi::getHouseInfo($info["idCard"]);
  93. $dicts = DictApi::selectByParentCode("card_type");
  94. $vars["dicts"] = $dicts;
  95. $vars["row"] = $info;
  96. $vars["hand"] = $houseInfo ? 2 : 1;
  97. $vars["childrenList"] = $childrenList;
  98. }
  99. if ($request->isPost()) {
  100. return $this->save($info, $request);
  101. }
  102. $batch = $info["year"] ?: BatchApi::getValidBatch(ProjectState::HOUSE, $this->user["type"])["batch"];
  103. $vars["year"] = $batch;
  104. $vars["type"] = $this->user["type"];
  105. return view("", $vars);
  106. }
  107. public function detail(\think\Request $request) {
  108. $info = HouseApi::getInfoById($id);
  109. $childrenList = HouseApi::getChildren($id);
  110. $dicts = DictApi::selectByParentCode("card_type");
  111. $vars["dicts"] = $dicts;
  112. $vars["row"] = $info;
  113. $vars["childrenList"] = $childrenList;
  114. $vars["type"] = $this->user["type"];
  115. return view("", $vars);
  116. }
  117. private function other_validate($info) {
  118. $responseObj = new \stdClass();
  119. /* 校验姓名是否与人才库一致 */
  120. $where = [];
  121. $where[] = ["checkState", ">=", \app\common\api\TalentState::REVERIFY_PASS];
  122. $where[] = ["checkState", "not in", [\app\common\api\TalentState::REVERIFY_REJECT, \app\common\api\TalentState::REVERIFY_FAIL]];
  123. $where[] = ["card_number", "=", $info["idCard"]];
  124. $talentInfo = Db::table("new_talent_info")->where($where)->order("createTime desc")->find();
  125. if ($talentInfo && $talentInfo["name"] != $info["name"]) {
  126. $responseObj->msg = "该证件号码的姓名与人才库姓名不匹配!";
  127. return $responseObj;
  128. }
  129. $year = substr($info["year"], 0, 4);
  130. /* 查询当前批次审核通过的数量以及当前批次未审核完成的数量 */
  131. $where = [];
  132. $where[] = ["year", "like", "{$year}%"];
  133. $where[] = ["idCard", "=", $info["idCard"]];
  134. $where[] = ["checkState", "<>", LaState::LA_NOTPASS];
  135. if ($info["id"]) {
  136. $where[] = ["id", "<>", $info["id"]];
  137. }
  138. $nowYearApplyCount = LaModel::where($where)->count();
  139. if ($nowYearApplyCount > 0) {
  140. $responseObj->msg = "不能重复申报";
  141. return $responseObj;
  142. }
  143. if (!$info["id"]) {
  144. $passYears = CommonLaApi::getPassYearsByIdCard($info["idCard"]);
  145. if (in_array($year, $passYears)) {
  146. return $responseObj->msg = "您今年度已经申报过了,每年度仅能享受一次生活补贴!";
  147. }
  148. if (count($passYears) >= 3) {
  149. return $responseObj->msg = "一个人最多享受三次!";
  150. }
  151. }
  152. $responseObj->code = 200;
  153. return $responseObj;
  154. }
  155. private function validateIsEdit($checkState) {
  156. $responseObj = new \stdClass();
  157. if ($checkState != LaState::LA_SAVE && $checkState != LaState::LA_BEFORE_REJECT && $checkState != LaState::LA_FIRST_REJECT) {
  158. if ($checkState == LaState::LA_NOTPASS) {
  159. $responseObj->msg = "您的申报审核不通过,无法操作";
  160. } else if ($checkState >= LaState::LA_PASS) {
  161. $responseObj->msg = "您的申报已审核通过,无法操作";
  162. } else {
  163. $responseObj->msg = "您的申报正在审核中,请耐心等待";
  164. }
  165. $responseObj->code = 500;
  166. return $responseObj;
  167. }
  168. $responseObj->code = 200;
  169. return $responseObj;
  170. }
  171. /**
  172. * 提交表单
  173. */
  174. public function submitToCheck() {
  175. try {
  176. $id = $this->request["id"];
  177. $info = CommonLaApi::getInfoById($id);
  178. if (!$info) {
  179. throw new ValidateException("提交审核失败,请先填写基础信息");
  180. }
  181. if ($info["enterpriseId"] != $this->user["uid"]) {
  182. throw new ValidateException("没有对应的人才认定申报信息");
  183. }
  184. $batch = BatchApi::checkBatchValid(["type" => ProjectState::LIVINGALLOWANCE, "year" => $info["year"], "first_submit_time" => $info["firstSubmitTime"]], $this->user["type"]);
  185. if ($batch["code"] != 200) {
  186. throw new ValidateException($batch["msg"]);
  187. }
  188. $response = $this->validateIsEdit($info["checkState"]);
  189. if ($response->code != 200) {
  190. throw new ValidateException($response->msg);
  191. }
  192. validate(LivingAllowanceValidator::class)->check($info);
  193. $response = $this->other_validate($info);
  194. if ($response->code != 200) {
  195. throw new ValidateException($response->msg);
  196. }
  197. $where = [];
  198. $where[] = ["mainId", "=", $id];
  199. $where[] = ["type", "=", ProjectState::LIVINGALLOWANCE];
  200. $uploadedFileTypes = Db::table("new_talent_file")->where($where)->column("distinct typeId");
  201. $where = [];
  202. $where[] = ["project", "=", ProjectState::LIVINGALLOWANCE];
  203. $where[] = ["type", "=", $this->user["type"]];
  204. $where[] = ["must", "=", 1];
  205. $where[] = ["active", "=", 1];
  206. $where[] = ["delete", "=", 0];
  207. $where[] = ["id", "not in", $uploadedFileTypes];
  208. $unUploadfiletypes = Db::table("new_common_filetype")->where($where)->select()->toArray();
  209. if ($unUploadfiletypes) {
  210. $msg = "以下附件为必传:<br>";
  211. foreach ($unUploadfiletypes as $ft) {
  212. $msg .= "<span style='color:red;'>*</span>" . $ft["name"] . "<br>";
  213. }
  214. throw new ValidateException($msg);
  215. }
  216. $data["id"] = $id;
  217. $data["checkState"] = LaState::LA_NEED_FIRST_CHECK;
  218. if (!$info["firstSubmitTime"]) {
  219. $data["firstSubmitTime"] = date("Y-m-d H:i:s");
  220. }
  221. $data["newSubmitTime"] = date("Y-m-d H:i:s");
  222. $data["checkMsg"] = "";
  223. $data["files"] = "";
  224. $data["fields"] = "";
  225. $res = LaModel::update($data);
  226. if ($res) {
  227. $user = session("user");
  228. $log["id"] = getStringId();
  229. $log["active"] = 1;
  230. $log["state"] = 1;
  231. $log["step"] = 0;
  232. $log["stateChange"] = LaState::getStateDesc($info["checkState"]) . "->" . LaState::getStateDesc($data["checkState"]);
  233. $log["type"] = ProjectState::LIVINGALLOWANCE;
  234. $log["mainId"] = $id;
  235. $log["description"] = "确认提交审核";
  236. $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
  237. $log["createTime"] = date("Y-m-d H:i:s");
  238. TalentLog::create($log);
  239. return json(["code" => 200, "msg" => "提交审核成功"]);
  240. }
  241. throw new ValidateException("提交审核失败");
  242. } catch (ValidateException $e) {
  243. $responseObj = new \stdClass();
  244. $responseObj->code = 500;
  245. $responseObj->msg = $e->getMessage();
  246. return json($responseObj);
  247. } catch (\think\Exception $e) {
  248. $res = ["code" => 500, "msg" => "发生预料外错误,请联系管理员处理,错误代码:" . $e->getCode()];
  249. $logInfo = [
  250. "enterprise_id" => $this->user["uid"],
  251. "data" => $data,
  252. "controller" => $this->request->controller(),
  253. "action" => $this->request->action(),
  254. "errCode" => $e->getCode(),
  255. "errMsg" => $e->getMessage()
  256. ];
  257. Log::write($logInfo, "error");
  258. return json($res);
  259. }
  260. }
  261. public function save($info, \think\Request $request) {
  262. try {
  263. $batch = BatchApi::checkBatchValid(["type" => ProjectState::LIVINGALLOWANCE, "year" => $info["year"], "first_submit_time" => $info["firstSubmitTime"]], $this->user["type"]);
  264. if ($batch["code"] != 200) {
  265. throw new ValidateException($batch["msg"]);
  266. }
  267. if ($info) {
  268. $response = $this->validateIsEdit($info["checkState"]);
  269. if ($response->code != 200) {
  270. throw new ValidateException($response->msg);
  271. }
  272. }
  273. $data = $request->param();
  274. $data["year"] = $batch["batch"];
  275. validate(LivingAllowanceValidator::class)->check($data);
  276. $response = $this->other_validate($data);
  277. if ($response->code != 200) {
  278. throw new ValidateException($response->msg);
  279. }
  280. $id = $data["id"];
  281. if ($id) {
  282. if (!$info || $info["id"] != $id || $info["enterpriseId"] != $this->user["uid"]) {
  283. throw new ValidateException("没有对应的人才认定申报信息");
  284. }
  285. $data["checkState"] = $info["checkState"];
  286. } else {
  287. $data["id"] = getStringId();
  288. $data["active"] = 1;
  289. $data["checkState"] = LaState::LA_SAVE;
  290. $data["isPublic"] = 1;
  291. $data["recommendIsPay"] = 0;
  292. $data["isPay"] = 0;
  293. $data["createTime"] = date("Y-m-d H:i:s");
  294. $data["createUser"] = $this->user["uid"];
  295. $data["creditStatus"] = 1;
  296. $count = count(CommonLaApi::getPassYearsByIdCard($data["idCard"]));
  297. $data["applyCount"] = $count + 1;
  298. if ($data["applyCount"] > 1 && !$data["personalTax"]) {
  299. throw new ValidateException("非首年申报必须填写个税缴交情况!");
  300. }
  301. }
  302. $checkState = $data["checkState"];
  303. $data["photo"] = $info["photo"];
  304. if ($request->file()) {
  305. $headimg = $request->file("file");
  306. $upload = new \app\common\api\UploadApi();
  307. $result = $upload->uploadOne($headimg, "image", "talent/photo");
  308. if ($result->code != 200) {
  309. throw new ValidateException($result->msg);
  310. }
  311. $file = imagecreatefromstring(file_get_contents("storage/" . $result->filepath));
  312. $width = imagesx($file);
  313. $height = imagesy($file);
  314. //免冠二寸照长宽413:579
  315. if ($width * 579 != $height * 413) {
  316. @unlink("storage/" . $result->filepath); //像素不符合,删除上传文件
  317. throw new ValidateException("近期免冠半身彩照(二寸)不符合二寸像素标准。*<span style='color:#ff0000;'>二寸像素标准[413*579]</span>");
  318. }
  319. if ($info && $info["photo"]) {
  320. //如果新照片符合像素要求,则删除旧照片
  321. $old_head_url = "storage/" . $info["photo"];
  322. if (file_exists($old_head_url))
  323. @unlink($old_head_url);
  324. }
  325. $data["photo"] = $result->filepath;
  326. }
  327. if (!$data["photo"])
  328. throw new ValidateException("请上传头像。*<span style='color:#ff0000;'>二寸像素标准[413*579]</span>");
  329. if ($info["checkState"] == LaState::LA_FIRST_REJECT) {
  330. //驳回,需要判断什么字段可以提交
  331. $modify_fields = array_filter(explode(",", $info["fields"]));
  332. $tmp_data = $data;
  333. $data = [];
  334. foreach ($modify_fields as $field) {
  335. $data[$field] = $tmp_data[$field];
  336. }
  337. $data["id"] = $id;
  338. }
  339. if ($id) {
  340. $res = LaModel::update($data);
  341. } else {
  342. $res = LaModel::insertGetId($data);
  343. }
  344. if ($res) {
  345. return json(["code" => 200, "msg" => "保存成功", "obj" => ["id" => $data["id"], "checkState" => $checkState]]);
  346. }
  347. throw new ValidateException("保存失败");
  348. } catch (ValidateException $e) {
  349. $responseObj = new \stdClass();
  350. $responseObj->code = 500;
  351. $responseObj->msg = $e->getMessage();
  352. return json($responseObj);
  353. } catch (\think\Exception $e) {
  354. $res = ["code" => 500, "msg" => "发生预料外错误,请联系管理员处理,错误代码:" . $e->getCode()];
  355. $logInfo = [
  356. "enterprise_id" => $this->user["uid"],
  357. "data" => $data,
  358. "controller" => $this->request->controller(),
  359. "action" => $this->request->action(),
  360. "errCode" => $e->getCode(),
  361. "errMsg" => $e->getMessage()
  362. ];
  363. Log::write($logInfo, "error");
  364. return json($res);
  365. }
  366. }
  367. public function delete() {
  368. $id = $this->request->param("id");
  369. $info = CommonLaApi::getInfoById($id);
  370. if (!$info || $info["enterpriseId"] != $this->user["uid"]) {
  371. return json(["msg" => "操作失败"]);
  372. }
  373. $checkState = $info["checkState"];
  374. if ($checkState != LaState::LA_SAVE) {
  375. return json(["msg" => "该申报已提交审核,无法删除"]);
  376. }
  377. TalentModel::delete($id);
  378. $where = [["mainId", "=", $id], ["type", "=", ProjectState::LIVINGALLOWANCE]];
  379. $list = Db::table("new_talent_file")->where($where)->select()->toArray();
  380. foreach ($list as $key => $file) {
  381. if (!empty($file["url"])) {
  382. $filepath = "storage/" . $file["url"];
  383. if (file_exists($filepath)) {
  384. @unlink($filepath);
  385. }
  386. }
  387. Db::table("new_talent_file")->delete($file["id"]);
  388. }
  389. return json(["msg" => "删除成功"]);
  390. }
  391. public function getTalentInfo($id, $year, $declareType) {
  392. $ti = \app\common\api\VerifyApi::getTalentInfoById($id);
  393. if ($ti["enterpriseType"] == CommonConst::ENTERPRISE_NORMAL) {
  394. $response = $this->getTalentArrange($ti, $year);
  395. if ($response->code == 500) {
  396. return $response;
  397. }
  398. }
  399. if (en . getType() == 1) {
  400. /* List<String> totalMonth = DateUtil.getMonthBetweenDates(year + "-01-01", year + "-12-31");
  401. TalentInfo resInfo = (TalentInfo) responseObj.getObj();
  402. ti.setTalentArrange(resInfo.getTalentArrange());
  403. ti.setIdentifyCondition(resInfo.getIdentifyCondition());
  404. ti.setIdentifyConditionName(resInfo.getIdentifyConditionName());
  405. ti.setIdentifyGetTime(resInfo.getIdentifyGetTime());
  406. ti.setCertificateStartTime(resInfo.getCertificateStartTime());
  407. ti.setQzgccrcActiveTime(resInfo.getQzgccrcActiveTime());
  408. /**校验上一年度人才标签 */
  409. /* responseObj = getTalentType(ti, declareType);
  410. if (responseObj.getCode() == 500) {
  411. return responseObj;
  412. }
  413. TalentQuit resQuit = (TalentQuit) responseObj.getObj();
  414. ti.setTalentType(resQuit.getTalentType()); */
  415. }
  416. //查询房产库中是否存在房产信息
  417. /* Housepurchase housepurchase = new Housepurchase();
  418. housepurchase.setIdCard(ti.getIdCard());
  419. HousepurchaseHouseInfo houseInfo = HousepurchaseUtil.getHouseInfo(housepurchase.getIdCard());
  420. Map<String, Object> res = new HashMap<>();
  421. res.put("talentInfo", ti);
  422. res.put("houseInfo", houseInfo);
  423. return new ResponseObj(ResponseObj.SUCCESS, "", res); */
  424. }
  425. /**
  426. * @param talentInfo
  427. * @param year
  428. * @description 获取上一年度的人才层次,规则如下:上一年度存在多个人才层次则取占比大的人才层次,占比相同则取人才层次高者
  429. * @returns com.stylefeng.guns.core.common.model.ResponseObj
  430. * @author Liu
  431. * @date 2020/5/6
  432. * */
  433. private function getTalentArrange($talentInfo, $year) {
  434. /**
  435. * 判定在申报年度内或之前是否认定,申报年度之后认定无效,根据公布入选月份判断(此处还要考虑人才层次变更)
  436. */
  437. $year = substr($year, 0, 4);
  438. $identifyTimeField = "identifyMonth";
  439. $oldStartTimeField = "oldIdentifyMonth";
  440. $newStartTimeField = "newIdentifyMonth";
  441. if ($talentInfo["enterpriseType"] == CommonConst::ENTERPRISE_JC) {
  442. $identifyTimeField = "identifyGetTime";
  443. $oldStartTimeField = "oldIdentifyGetTime";
  444. $newStartTimeField = "newIdentifyGetTime";
  445. }
  446. $where = [];
  447. $where[] = ["idCard", "=", $talentInfo["card_number"]];
  448. $where[] = ["checkState", "=", MainState::PASS];
  449. $where[] = ["isPublic", "=", 6];
  450. $where[] = [$oldStartTimeField, "<=", $year . "-12-31"];
  451. $typeChanges = TalentTypeChange::where($where)->field("oldTalentArrange,oldIdentifyCondition,oldIdentifyGetTime,oldIdentifyOutTime,oldIdentifyConditionName,oldIdentifyMonth,oldCertificateStartTime,oldCertificateOutTime,newIdentifyMonth,newIdentifyGetTime")->order("createTime desc")->select()->toArray();
  452. $jjList = [];
  453. $unionList = [];
  454. $totalMonth = \DateUtil::getMonthBetweenDates($year . "-01-01", $year . "-12-31");
  455. if (!$typeChanges && strtotime($year . "-12-31") > strtotime($talentInfo[$identifyTimeField])) {
  456. return new Response(Response::ERROR, "在上一年度未认定优秀人才,无法申报");
  457. } else {
  458. $typeChanges[] = [
  459. "oldTalentArrange" => $talentInfo["talent_arrange"],
  460. "oldIdentifyCondition" => $talentInfo["talent_condition"],
  461. "oldIdentifyGetTime" => $talentInfo["identifyGetTime"],
  462. "oldIdentifyOutTime" => $talentInfo["identifyExpireTime"],
  463. "oldIdentifyConditionName" => $talentInfo["identifyConditionName"],
  464. "oldIdentifyMonth" => $talentInfo["identifyMonth"],
  465. "oldCertificateStartTime" => $talentInfo["certificateGetTime"],
  466. "oldCertificateOutTime" => $talentInfo["certificateExpireTime"] ?: date("Y-m-d", strtotime(sprintf("%s +6 years -1 days", $talentInfo["certificateGetTime"]))),
  467. "newIdentifyMonth" => ($year + 1) . "-01-01",
  468. "newIdentifyGetTime" => ($year + 1) . "-01-01"
  469. ];
  470. foreach ($typeChanges as $typeChange) {
  471. $monthList = \DateUtil::getMonthBetweenDatesNotEnd($typeChange["oldCertificateStartTime"], $typeChange["oldCertificateOutTime"]);
  472. $res = \DateUtil::getEveryMonthDayBetween($typeChange["oldCertificateStartTime"], $typeChange["oldCertificateOutTime"], $monthList);
  473. }
  474. for (TalentTypeChange typeChange : typeChanges) {
  475. List<String> monthList = DateUtil . getMonthBetweenDatesNotEnd(typeChange . getOldCertificateStartTime(), typeChange . getOldCertificateOutTime());
  476. Map<String, Integer> res = DateUtil . getEveryMonthDayBetween(typeChange . getOldCertificateStartTime(), typeChange . getOldCertificateOutTime(), monthList);
  477. if (res . size() > 0) {
  478. unionList . removeAll(monthList);
  479. unionList . addAll(monthList);
  480. TalentInfo info = new TalentInfo(typeChange . getOldTalentArrange(), typeChange . getOldIdentifyCondition(), typeChange . getOldIdentifyGetTime(), typeChange . getOldIdentifyConditionName(), typeChange . getOldCertificateStartTime(), typeChange . getOldCertificateOutTime(), typeChange . getOldIdentifyMonth());
  481. info . setDayMap(res);
  482. jjList . add(info);
  483. }
  484. }
  485. }
  486. }
  487. }