Commit b9de9ede authored by clone's avatar clone

1

parent 30f45cc9
......@@ -126,7 +126,7 @@ class OfficeReportService
// $agentArr = $vModel->getAgentsByAgentId($params["report_agent_id"]);
$params["agent_id_s"] = array("in", $params["report_agent_id"]);
$caseHouseId = $this->vModel->getCaseRoomByAgentId($params["agent_id_s"],"1,2,3");
$caseHouseId = $this->vModel->getCaseRoomByAgentId($params["agent_id_s"], "1,2,3");
$ids = "";
if (count($caseHouseId) > 0) {
foreach ($caseHouseId as $item) {
......@@ -212,7 +212,7 @@ class OfficeReportService
$agentArr = $this->vModel->getAgentsByAgentIdAndType($params["report_agent_id"], $check_type);
$params["agent_id_s"] = array("in", $agentArr);
$params["report_agent_id"] = $agentArr;
$caseHouseId = $this->vModel->getCaseRoomByAgentId($params["agent_id_s"],"2,3");
$caseHouseId = $this->vModel->getCaseRoomByAgentId($params["agent_id_s"], "2,3");
$ids = "";
if (count($caseHouseId) > 0) {
foreach ($caseHouseId as $item) {
......@@ -251,7 +251,7 @@ class OfficeReportService
$params["report_agent_id"] = $agentArr;
}
$caseHouseId = $this->vModel->getCaseRoomByAgentId($params["agent_id_s"],"1");
$caseHouseId = $this->vModel->getCaseRoomByAgentId($params["agent_id_s"], "1");
$ids = "";
if (count($caseHouseId) > 0) {
foreach ($caseHouseId as $item) {
......@@ -426,34 +426,35 @@ class OfficeReportService
$result["collectingBill"] = true;
$result["refund"] = true;
$result["bargain"] = true;
return $result;
}
} else {
$auth_arr = [
'office/marchIn',
'office/collectingBill',
'office/refund',
'office/bargain',
];
$param["name"] = array("in", $auth_arr);
$is_auth = $this->agentModel->agentsAuthIds($agent_id, $param);
if (count($is_auth) > 0) {
foreach ($is_auth as $item) {
if ($item['name'] == "office/marchIn") {
$result["marchIn"] = true;
}
if ($item['name'] == "office/collectingBill") {
$result["collectingBill"] = true;
}
if ($item['name'] == "office/refund") {
$result["refund"] = true;
}
if ($item['name'] == "office/bargain") {
$result["bargain"] = true;
}
}
$auth_arr = [
'office/marchIn',
'office/collectingBill',
'office/refund',
'office/bargain',
];
$param["name"] = array("in", $auth_arr);
$is_auth = $this->agentModel->agentsAuthIds($agent_id, $param);
if (count($is_auth) > 0) {
foreach ($is_auth as $item) {
if ($item['name'] == "office/marchIn") {
$result["marchIn"] = true;
}
if ($item['name'] == "office/collectingBill") {
$result["collectingBill"] = true;
}
if ($item['name'] == "office/refund") {
$result["refund"] = true;
}
if ($item['name'] == "office/bargain") {
$result["bargain"] = true;
}
}
}
return $result;
......
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