Commit c4b21b24 authored by hujun's avatar hujun

转勤文案修改

parent d6f73e2d
......@@ -79,7 +79,7 @@ class BrokerService
//根据是否带看过判断是否换id
$m_march_in = new OMarchInModel();
$march_data = $m_march_in->selectMarchInOne('a.id', ['reception_id' => $agent_old[0]['id'], 'site_id' => $data['site_id']]);
if (empty($march_data['id'])) {
if (!empty($march_data['id'])) {
$is_new_id = 0;
}
}
......@@ -125,19 +125,26 @@ class BrokerService
if (empty($data['confirm_old'])) {
$id = $this->m_agent->saveAgent($data); //正常新增或编辑
if ($id > 0) {
$result['msg'] = $msg;
$result['status'] = 'successful';
} else {
$result['msg'] = '新增或编辑失败';
$result['status'] = 'fail';
}
} else {
$data['site_id'] = $new_site_id;
$id = $this->transferAgent($data, $agent_old, $is_new_id, $operation_id); //转勤
}
if ($id > 0) {
$result['msg'] = $msg;
$result['status'] = 'successful';
} else {
$result['msg'] = $msg;
$result['status'] = 'fail';
if ($id > 0) {
$result['msg'] = '转勤成功';
$result['status'] = 'successful';
} else {
$result['msg'] = '转勤失败';
$result['status'] = 'fail';
}
}
} catch (\Exception $e) {
$result['msg'] = '内部错误:'.$e->getMessage();
$result['status'] = 'fail';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment