|
@@ -152,11 +152,17 @@ class Comjobs extends BaseController
|
|
|
$catelist = ComjobsCateModel::order(['priority' => 'desc', 'id' => 'desc'])->select();
|
|
|
$communitylist = RensheCode::getList('community');
|
|
|
$agelist = RensheCode::getList('age');
|
|
|
+ $educationlist = RensheCode::getList('education');
|
|
|
+ $emptimelist = RensheCode::getList('emp_time');
|
|
|
+ $welfarelist = RensheCode::getList('welfare');
|
|
|
return view('comjobs/comjobsform', [
|
|
|
'catelist' => $catelist,
|
|
|
'workerlist' => $workerlist,
|
|
|
'communitylist' => $communitylist,
|
|
|
- 'agelist' => $agelist,
|
|
|
+ 'agelist' => $agelist,
|
|
|
+ 'educationlist' => $educationlist,
|
|
|
+ 'emptimelist' => $emptimelist,
|
|
|
+ 'welfarelist' => $welfarelist,
|
|
|
'comjobs' => $comjobs,
|
|
|
]);
|
|
|
}
|
|
@@ -174,7 +180,7 @@ class Comjobs extends BaseController
|
|
|
'city' => input('city/s', ""),
|
|
|
'district' => input('district/s', ""),
|
|
|
'agegroup' => input('agegroup/s', ""),
|
|
|
- 'tags' => input('tags/a', []),
|
|
|
+ 'tags' => array_values(input('tags/a', [])),
|
|
|
'enddate' => input('enddate/s', ""),
|
|
|
'requirement' => input('requirement/s', ""),
|
|
|
'comdetails' => input('comdetails/s', ""),
|
|
@@ -194,10 +200,13 @@ class Comjobs extends BaseController
|
|
|
'createtime' => input('createtime/s', ""),
|
|
|
'volume' => input('volume/d', 0),
|
|
|
'recruitment_cate' => input('recruitment_cate/d', 1),
|
|
|
- 'latitude' => input('latitude/f'),
|
|
|
- 'longitude' => input('longitude/f'),
|
|
|
- 'address' => input('address/s'),
|
|
|
- 'community' => input('community/s'),
|
|
|
+ 'latitude' => input('latitude/f', 0),
|
|
|
+ 'longitude' => input('longitude/f', 0),
|
|
|
+ 'address' => input('address/s', ''),
|
|
|
+ 'community' => input('community/s', ''),
|
|
|
+ 'is_worry' => input('is_worry/d', 0),
|
|
|
+ 'education' => input('education/s', ''),
|
|
|
+ 'emp_time' => array_values(input('emp_time/a', [])),
|
|
|
];
|
|
|
try {
|
|
|
validate(ComjobsValidate::class)->check($data);
|
|
@@ -495,40 +504,49 @@ class Comjobs extends BaseController
|
|
|
{
|
|
|
//获取数据
|
|
|
$id = input('id/d', 0);
|
|
|
- $info = ComjobsModel::with(['comjobsCate', 'worker','ageCode'=>function($query){
|
|
|
- $query->where('type','age');
|
|
|
- }])->find($id);
|
|
|
- halt($info['ageCode']['code']);
|
|
|
+ $info = ComjobsModel::with([
|
|
|
+ 'worker',
|
|
|
+ 'comjobsCate',
|
|
|
+ 'worker',
|
|
|
+ 'ageCode' => function ($query) {
|
|
|
+ $query->where('type', 'age');
|
|
|
+ }, 'educationCode' => function ($query) {
|
|
|
+ $query->where('type', 'education');
|
|
|
+ }])->find($id);
|
|
|
|
|
|
//数据重组
|
|
|
- $list = $item = [];
|
|
|
- $item['baz367'] = $info['id'];
|
|
|
- $item['aca111'] = $info['comjobsCate']['code'];
|
|
|
- $item['aca112'] = $info['title'];
|
|
|
- $item['bcz002'] = $info['wtype'];
|
|
|
- $item['bcz017'] = $info['zwagall'];
|
|
|
- $item['cae006'] = $info['community'];
|
|
|
- $item['cae007'] = $info['province'] . $info['city'] . $info['district'] . $info['address'];
|
|
|
- $item['bcz006'] = $info['ageCode']['code'];
|
|
|
- $item['bcz007'] = $info['comdetails'];
|
|
|
- $item['bcz008'] = $info['requirement'];
|
|
|
- $item['aab069'] = $info['worker']['title'];
|
|
|
- $item['aae005'] = $info['telephone'];
|
|
|
- $item['aae004'] = $info['worker']['realname'];
|
|
|
- $item['aae006'] = $info['worker']['province'] . $info['worker']['city'] . $info['worker']['district'] . $info['worker']['address'];
|
|
|
- $item['aae100'] = $info['status'] == 3 ? 1 : 0;
|
|
|
- $item['bcz015'] = $info['longitude'];
|
|
|
- $item['bcz016'] = $info['latitude'];
|
|
|
- $item['bye002'] = $info['updatetime'];
|
|
|
- $list[] = $item;
|
|
|
- $send['list'] = $list;
|
|
|
+ $list = $item = [];
|
|
|
+ $item['baz367'] = $info['id'];
|
|
|
+ $item['aca111'] = $info['comjobsCate']['code'];
|
|
|
+ $item['aca112'] = $info['title'];
|
|
|
+ $item['bcz002'] = $info['wtype'];
|
|
|
+ $item['bcz017'] = $info['zwagall'];
|
|
|
+ $item['cae006'] = $info['community'];
|
|
|
+ $item['cae007'] = $info['province'] . $info['city'] . $info['district'] . $info['address'];
|
|
|
+ $item['aac011'] = $info['educationCode']['code'];
|
|
|
+ $item['bcz006'] = $info['ageCode']['code'];
|
|
|
+ $item['caa004s'] = $info['tags_code'];
|
|
|
+ $item['bcz007'] = $info['comdetails'];
|
|
|
+ $item['bcz008'] = $info['requirement'];
|
|
|
+ $item['bcz009'] = $info['worker']['wtype'];
|
|
|
+ $item['aab069'] = $info['worker']['title'];
|
|
|
+ $item['aae005'] = $info['telephone'];
|
|
|
+ $item['aae004'] = $info['worker']['realname'];
|
|
|
+ $item['aae006'] = $info['worker']['province'] . $info['worker']['city'] . $info['worker']['district'] . $info['worker']['address'];
|
|
|
+ $item['bcz018'] = $info['emp_code'];
|
|
|
+ $item['bcz011'] = $info['is_worry'];
|
|
|
+ $item['aae100'] = $info['status'] == 3 ? 1 : 0;
|
|
|
+ $item['bcz015'] = $info['longitude'];
|
|
|
+ $item['bcz016'] = $info['latitude'];
|
|
|
+ $item['bye002'] = $info['updatetime'];
|
|
|
+ $list[] = array_filter($item);
|
|
|
+ $send['list'] = $list;
|
|
|
|
|
|
//发送数据
|
|
|
$service = new RensheService($send);
|
|
|
$res = $service->JobInfo();
|
|
|
|
|
|
if ($res['code'] == 200) {
|
|
|
- Log::error('同步人社成功');
|
|
|
return json(['code' => 0]);
|
|
|
} else {
|
|
|
Log::error('同步人社失败:', json_encode($res));
|