|
@@ -76,7 +76,11 @@ class TalentWorkUnitChange extends EnterpriseController {
|
|
|
if ($check->code == 500) {
|
|
|
return $check;
|
|
|
}
|
|
|
- $talentInfo = \app\common\api\VerifyApi::getTalentInfoById($request["talentId"]);
|
|
|
+ if (strlen($info["talentId"]) == 19) {
|
|
|
+ $newTalentInfo = $this->getTalentInfoByIdCard($info["idCard"]);
|
|
|
+ $info["talentId"] = $newTalentInfo["id"];
|
|
|
+ }
|
|
|
+ $talentInfo = \app\common\api\VerifyApi::getTalentInfoById($info["talentId"]);
|
|
|
if (!$talentInfo) {
|
|
|
$response->msg = "未匹配到人才数据";
|
|
|
return $response;
|
|
@@ -203,6 +207,18 @@ class TalentWorkUnitChange extends EnterpriseController {
|
|
|
return $response;
|
|
|
}
|
|
|
|
|
|
+ private function getTalentInfoByIdCard($idCard, $active = null) {
|
|
|
+ //$where[] = ["enterprise_id", "=", $this->user["uid"]];
|
|
|
+ $where[] = ["card_number", "=", $idCard];
|
|
|
+ $where[] = ["checkState", "=", \app\common\api\TalentState::CERTIFICATED];
|
|
|
+ $where[] = ["delete", "=", 0];
|
|
|
+ if ($active) {
|
|
|
+ $where[] = ["active", "=", $active];
|
|
|
+ }
|
|
|
+ $ti = \app\enterprise\model\Talent::where($where)->order("createTime desc")->find();
|
|
|
+ return $ti;
|
|
|
+ }
|
|
|
+
|
|
|
private function dataCheck($data) {
|
|
|
$response = new \stdClass();
|
|
|
$response->code = 500;
|