Commit 0174e2ce authored by hujun's avatar hujun

log

parent adeb962a
...@@ -499,20 +499,34 @@ class OfficeRoomService ...@@ -499,20 +499,34 @@ class OfficeRoomService
$date = date('Y-m-d'); $date = date('Y-m-d');
foreach ($agent_id_arr as $v3) { foreach ($agent_id_arr as $v3) {
$agent_data = $this->agent->verifyUser('id,store_id,district_id,name', '', ['id' => $v3]); //新增人信息 $agent_data = $this->agent->getAgentInfo('id,store_id,district_id,name', $v3); //新增人信息
$sum->updateTotalByAgentId($agent_data['id'], $agent_data['store_id'], $agent_data['district_id'], $date, $site_id); $sum->updateTotalByAgentId($agent_data['id'], $agent_data['store_id'], $agent_data['district_id'], $date, $site_id);
} }
foreach ($del_agent_id as $v4) { foreach ($del_agent_id as $v4) {
$agent_data = $this->agent->verifyUser('id,store_id,district_id,name', '', ['id' => $v4]); //被删除人信息 $agent_data = $this->agent->getAgentInfo('id,store_id,district_id,name', $v4); //新增人信息
$sum->updateTotalByAgentId($agent_data['id'], $agent_data['store_id'], $agent_data['district_id'], $date, $site_id); $sum->updateTotalByAgentId($agent_data['id'], $agent_data['store_id'], $agent_data['district_id'], $date, $site_id);
} }
} }
if (!empty($remark)) { if (!empty($remark)) {
$records->record($operation_id, 1, $remark, $house_id); $records->record($operation_id, 1, $remark, $house_id);
} }
} }
if ($type == 3) {
$remark = '';
if ($del_agent_name) {
$remark .= '删除独家方:' . implode(',', $del_agent_name) . ',';
}
if ($agent_id_arr) {
$agent_name = $this->agent->getAgentsByWhereColumn(['id' => ['in', $agent_id_arr]], 'name');
$remark .= '新增独家方:' . implode(',', $agent_name);
}
if (!empty($remark)) {
$records->record($operation_id, 2, $remark, $house_id);
}
}
$result['status'] = 'successful'; $result['status'] = 'successful';
} catch (\Exception $e) { } catch (\Exception $e) {
$result['status'] = 'fail'; $result['status'] = 'fail';
...@@ -1660,11 +1674,15 @@ class OfficeRoomService ...@@ -1660,11 +1674,15 @@ class OfficeRoomService
} }
} }
if (strtotime($room_data['agent_start_time']) != strtotime($data['agent_start_time'])) { if (empty($room_data['agent_start_time'])) {
$remark[] = '新增独家开始时间('.$data['agent_start_time'].')';
} elseif (strtotime($room_data['agent_start_time']) != strtotime($data['agent_start_time'])) {
$remark[] = '独家开始时间由('.$room_data['agent_start_time'].')改为('.$data['agent_start_time'].')'; $remark[] = '独家开始时间由('.$room_data['agent_start_time'].')改为('.$data['agent_start_time'].')';
} }
if (strtotime($room_data['agent_end_time']) != strtotime($data['agent_end_time'])) { if (empty($room_data['agent_end_time'])) {
$remark[] = '新增独家结束时间('.$data['agent_end_time'].')';
} elseif (strtotime($room_data['agent_end_time']) != strtotime($data['agent_end_time'])) {
$remark[] = '独家结束时间由('.$room_data['agent_end_time'].')改为('.$data['agent_end_time'].')'; $remark[] = '独家结束时间由('.$room_data['agent_end_time'].')改为('.$data['agent_end_time'].')';
} }
......
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