|
@@ -32,7 +32,7 @@ class Human extends AdminBaseController
|
|
|
{
|
|
|
$map = $this->dealEqualInput(['status', 'is_arrive'], $this->dealLikeInput(['name']));
|
|
|
$list = HumanInstitutionApplyModel::where($map)
|
|
|
- ->order(['status' => 'asc','id'=>'desc'])
|
|
|
+ ->order(['status' => 'asc', 'id' => 'desc'])
|
|
|
->limit(input('limit'))
|
|
|
->page(input('page'))
|
|
|
->append(['status_text', 'is_arrive_text'])
|
|
@@ -143,7 +143,7 @@ class Human extends AdminBaseController
|
|
|
{
|
|
|
$map = $this->dealEqualInput(['status', 'is_arrive'], $this->dealLikeInput(['name']));
|
|
|
$list = HumanEnterpriseApplyModel::where($map)
|
|
|
- ->order(['status' => 'asc','id'=>'desc'])
|
|
|
+ ->order(['status' => 'asc', 'id' => 'desc'])
|
|
|
->limit(input('limit'))
|
|
|
->page(input('page'))
|
|
|
->append(['status_text', 'is_arrive_text'])
|
|
@@ -164,6 +164,33 @@ class Human extends AdminBaseController
|
|
|
ajax_return();
|
|
|
}
|
|
|
|
|
|
+ public function syncEnterPrise()
|
|
|
+ {
|
|
|
+ $id = input('id/d', 0);
|
|
|
+ $apply = HumanEnterpriseApplyModel::find($id);
|
|
|
+ empty($apply) && ajax_return(1, '该企业不存在');
|
|
|
+
|
|
|
+ $enterprise = HumanEnterpriseModel::where('join_mobile', $apply['join_mobile'])->find();
|
|
|
+ if (!empty($enterprise)) {
|
|
|
+ ajax_return(1, '该企业已存在,无须转换');
|
|
|
+ }
|
|
|
+
|
|
|
+ HumanEnterpriseModel::create([
|
|
|
+ 'name' => $apply['name'],
|
|
|
+ 'capital' => $apply['capital'],
|
|
|
+ 'tel' => $apply['tel'],
|
|
|
+ 'address' => $apply['address'],
|
|
|
+ 'introduction' => $apply['describe'],
|
|
|
+ 'join' => $apply['join'],
|
|
|
+ 'join_mobile' => $apply['join_mobile'],
|
|
|
+ 'priority' => 255,
|
|
|
+ 'cooperate' => $apply['cooperate'],
|
|
|
+ 'industry' => $apply['industry'],
|
|
|
+ ]);
|
|
|
+
|
|
|
+ ajax_return();
|
|
|
+ }
|
|
|
+
|
|
|
public function delEnterpriseApply()
|
|
|
{
|
|
|
$id_arr = input('id_arr/a');
|
|
@@ -221,7 +248,7 @@ class Human extends AdminBaseController
|
|
|
|
|
|
public function listInstitution()
|
|
|
{
|
|
|
- $map = $this->dealEqualInput(['status'], $this->dealLikeInput(['name']));
|
|
|
+ $map = $this->dealEqualInput(['status'], $this->dealLikeInput(['name']));
|
|
|
$booth_status = input('booth_status');
|
|
|
if (!empty($booth_status)) {
|
|
|
if ($booth_status == 1) {
|
|
@@ -250,6 +277,31 @@ class Human extends AdminBaseController
|
|
|
ajax_return();
|
|
|
}
|
|
|
|
|
|
+ public function syncInstitution()
|
|
|
+ {
|
|
|
+ $id = input('id/d', 0);
|
|
|
+ $apply = HumanInstitutionApplyModel::find($id);
|
|
|
+ empty($apply) && ajax_return(1, '该机构不存在');
|
|
|
+
|
|
|
+ $institution = HumanInstitutionModel::where('join_mobile', $apply['join_mobile'])->find();
|
|
|
+ if (!empty($institution)) {
|
|
|
+ ajax_return(1, '该机构已存在,无须转换');
|
|
|
+ }
|
|
|
+
|
|
|
+ HumanInstitutionModel::create([
|
|
|
+ 'name' => $apply['name'],
|
|
|
+ 'tel' => $apply['tel'],
|
|
|
+ 'address' => $apply['address'],
|
|
|
+ 'introduction' => $apply['describe'],
|
|
|
+ 'join' => $apply['join'],
|
|
|
+ 'join_mobile' => $apply['join_mobile'],
|
|
|
+ 'priority' => 255,
|
|
|
+ 'cooperate' => $apply['cooperate'],
|
|
|
+ ]);
|
|
|
+
|
|
|
+ ajax_return();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 编辑
|
|
|
*/
|
|
@@ -384,7 +436,7 @@ class Human extends AdminBaseController
|
|
|
|
|
|
public function listEnterprise()
|
|
|
{
|
|
|
- $map = $this->dealEqualInput(['status'], $this->dealLikeInput(['name']));
|
|
|
+ $map = $this->dealEqualInput(['status'], $this->dealLikeInput(['name']));
|
|
|
$booth_status = input('booth_status');
|
|
|
if (!empty($booth_status)) {
|
|
|
if ($booth_status == 1) {
|
|
@@ -425,7 +477,7 @@ class Human extends AdminBaseController
|
|
|
'info' => $info,
|
|
|
'status_list' => HumanEnterpriseModel::STATUS,
|
|
|
'cooperate_list' => HumanInstitutionModel::COOPERATE,
|
|
|
- 'industry_list' => HumanEnterpriseModel::INDUSTRY,
|
|
|
+ 'industry_list' => HumanEnterpriseModel::INDUSTRY,
|
|
|
]);
|
|
|
}
|
|
|
|