|
@@ -16,6 +16,7 @@ use app\common\api\UploadApi;
|
|
|
use app\enterprise\model\Talent;
|
|
|
use app\common\api\TalentState;
|
|
|
use think\facade\Db;
|
|
|
+use app\common\state\CommonConst;
|
|
|
|
|
|
class Auth extends BaseController {
|
|
|
|
|
@@ -93,6 +94,9 @@ class Auth extends BaseController {
|
|
|
'verificationCode' => \StrUtil::getRequestDecodeParam($this->request, 'verificationCode'),
|
|
|
'legal' => \StrUtil::getRequestDecodeParam($this->request, 'legal'),
|
|
|
'street' => \StrUtil::getRequestDecodeParam($this->request, 'street'),
|
|
|
+ 'province' => \StrUtil::getRequestDecodeParam($this->request, 'province'),
|
|
|
+ 'city' => \StrUtil::getRequestDecodeParam($this->request, 'city'),
|
|
|
+ 'county' => \StrUtil::getRequestDecodeParam($this->request, 'county'),
|
|
|
'address' => \StrUtil::getRequestDecodeParam($this->request, 'address'),
|
|
|
'type' => intval($this->request['type']),
|
|
|
'agencyType' => intval($this->request['agencyType']),
|
|
@@ -102,6 +106,8 @@ class Auth extends BaseController {
|
|
|
'enterpriseType' => \StrUtil::getRequestDecodeParam($this->request, 'enterpriseType'),
|
|
|
'agentEmail' => \StrUtil::getRequestDecodeParam($this->request, 'agentEmail'),
|
|
|
'ephone' => \StrUtil::getRequestDecodeParam($this->request, 'ephone'),
|
|
|
+ 'medicalCommunityId' => \StrUtil::getRequestDecodeParam($this->request, 'medicalCommunityId'),
|
|
|
+ 'isGeneral' => \StrUtil::getRequestDecodeParam($this->request, 'isGeneral'),
|
|
|
'industryFieldNew' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldNew'),
|
|
|
'industryFieldOld' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldOld'),
|
|
|
'bankCard' => \StrUtil::getRequestDecodeParam($this->request, 'bankCard'),
|
|
@@ -166,7 +172,7 @@ class Auth extends BaseController {
|
|
|
$data['special'] = 0;
|
|
|
break;
|
|
|
case 'minfei':
|
|
|
- $data['type'] = 1;
|
|
|
+ $data['type'] = CommonConst::ENTERPRISE_NORMAL;
|
|
|
$registerTimeLimitReturnObj = $this->checkRegisterTime(3, $data['organizationTag']);
|
|
|
if ($registerTimeLimitReturnObj !== true)
|
|
|
return \StrUtil::back($registerTimeLimitReturnObj, "Register.epCallBack");
|
|
@@ -188,7 +194,7 @@ class Auth extends BaseController {
|
|
|
$data['special'] = 3;
|
|
|
break;
|
|
|
case 'shiye':
|
|
|
- $data['type'] = 1;
|
|
|
+ $data['type'] = CommonConst::ENTERPRISE_NORMAL;
|
|
|
validate(Enterprise::class)->batch(true)->scene('sy_add')->check($data); //事业单位
|
|
|
$registerTimeLimitReturnObj = $this->checkRegisterTime(1, $data['institutionTag']);
|
|
|
if ($registerTimeLimitReturnObj !== true)
|
|
@@ -200,6 +206,34 @@ class Auth extends BaseController {
|
|
|
}
|
|
|
$data['special'] = 1;
|
|
|
break;
|
|
|
+ case "weijian":
|
|
|
+ $data["type"] = CommonConst::ENTERPRISE_WJ; //卫健
|
|
|
+ validate(\app\common\validate\Hospital::class)->batch(true)->scene('add')->check($data);
|
|
|
+ if (!array_key_exists('imgurl', $files) || $files['imgurl'] == '') {
|
|
|
+ $response_object->code = 500;
|
|
|
+ $response_object->msg = '请上传医疗机构执业许可证';
|
|
|
+ return \StrUtil::back($response_object, "Register.epCallBack");
|
|
|
+ }
|
|
|
+ if (!array_key_exists('beian', $files) || $files['beian'] == '') {
|
|
|
+ $response_object->code = 500;
|
|
|
+ $response_object->msg = '请上传人才联络员备案表';
|
|
|
+ return \StrUtil::back($response_object, "Register.epCallBack");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "gaojiao":
|
|
|
+ $data["type"] = CommonConst::ENTERPRISE_GJ; //高教
|
|
|
+ validate(\app\common\validate\School::class)->batch(true)->scene('add')->check($data);
|
|
|
+ if (!array_key_exists('imgurl', $files) || $files['imgurl'] == '') {
|
|
|
+ $response_object->code = 500;
|
|
|
+ $response_object->msg = '请上传办学许可证、法人证书或登记证书';
|
|
|
+ return \StrUtil::back($response_object, "Register.epCallBack");
|
|
|
+ }
|
|
|
+ if (!array_key_exists('beian', $files) || $files['beian'] == '') {
|
|
|
+ $response_object->code = 500;
|
|
|
+ $response_object->msg = '请上传人才联络员备案表不能为空';
|
|
|
+ return \StrUtil::back($response_object, "Register.epCallBack");
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
|
|
|
//检验验证码
|
|
@@ -332,6 +366,9 @@ class Auth extends BaseController {
|
|
|
'agentName' => \StrUtil::getRequestDecodeParam($this->request, 'agentName'), //人才联络员
|
|
|
'legal' => \StrUtil::getRequestDecodeParam($this->request, 'legal'), //法人
|
|
|
'street' => \StrUtil::getRequestDecodeParam($this->request, 'street'), //镇街
|
|
|
+ 'province' => \StrUtil::getRequestDecodeParam($this->request, 'province'), //省
|
|
|
+ 'city' => \StrUtil::getRequestDecodeParam($this->request, 'city'), //市
|
|
|
+ 'county' => \StrUtil::getRequestDecodeParam($this->request, 'county'), //县
|
|
|
'address' => \StrUtil::getRequestDecodeParam($this->request, 'address'), //地址
|
|
|
'type' => intval($this->request['type']),
|
|
|
'agencyType' => intval($this->request['agencyType']),
|
|
@@ -342,6 +379,8 @@ class Auth extends BaseController {
|
|
|
'agentPhone' => \StrUtil::getRequestDecodeParam($this->request, 'agentPhone'), //手机
|
|
|
'agentEmail' => \StrUtil::getRequestDecodeParam($this->request, 'agentEmail'), //邮箱
|
|
|
'ephone' => \StrUtil::getRequestDecodeParam($this->request, 'ephone'), //单位电话
|
|
|
+ 'medicalCommunityId' => \StrUtil::getRequestDecodeParam($this->request, 'medicalCommunityId'), //卫健专属:医共体
|
|
|
+ 'isGeneral' => \StrUtil::getRequestDecodeParam($this->request, 'isGeneral'), //卫健专属:是否总院
|
|
|
'industryFieldNew' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldNew'), //产业领域
|
|
|
'industryFieldOld' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldOld'), //行业领域
|
|
|
'bankCard' => \StrUtil::getRequestDecodeParam($this->request, 'bankCard'), //银行
|
|
@@ -412,6 +451,7 @@ class Auth extends BaseController {
|
|
|
}
|
|
|
$data['id'] = $ep->id;
|
|
|
if ($ep->special == 0) {
|
|
|
+ $idCardName = "营业执照";
|
|
|
if ($data["type"] == 1) {
|
|
|
if ($data["agencyType"] == 1) {
|
|
|
validate(\app\common\validate\Enterprise::class)->batch(true)->scene('change')->check($data);
|
|
@@ -434,12 +474,21 @@ class Auth extends BaseController {
|
|
|
$response_object->msg = '开户许可证/基本存款账户信息不能为空';
|
|
|
return \StrUtil::back($response_object, "Register.epCallBack");
|
|
|
}
|
|
|
- } else {
|
|
|
+ } else if ($data["type"] == 2) {
|
|
|
+ //集成电路
|
|
|
validate(\app\common\validate\Enterprise::class)->batch(true)->scene('jc_change')->check($data);
|
|
|
+ } else if ($data["type"] == 3) {
|
|
|
+ //卫健医院
|
|
|
+ validate(\app\common\validate\Hospital::class)->batch(true)->scene('change')->check($data);
|
|
|
+ $idCardName = "医疗机构执业许可证";
|
|
|
+ } else {
|
|
|
+ //高教学校
|
|
|
+ validate(\app\common\validate\School::class)->batch(true)->scene('change')->check($data);
|
|
|
+ $idCardName = "办学许可证、法人证书或登记证书";
|
|
|
}
|
|
|
if (!$data["imgurl"] && !$ep->imgurl) {
|
|
|
$response_object->code = 500;
|
|
|
- $response_object->msg = '营业执照不能为空';
|
|
|
+ $response_object->msg = $idCardName . '不能为空';
|
|
|
return \StrUtil::back($response_object, "Register.epCallBack");
|
|
|
}
|
|
|
if (!$data["beian"] && !$ep->beian) {
|