Commit 818b8c2b authored by zhuwei's avatar zhuwei

1

parent 6622ae98
......@@ -13,6 +13,7 @@ namespace app\index\service;
use app\api_broker\service\PushMessageService;
use app\api_broker\service\RedisCacheService;
use app\index\untils\ExportExcelUntil;
use app\model\AAgents;
use app\model\OAmercementImgModel;
use app\model\OAmercementModel;
use app\model\UserAgentModel;
......@@ -400,9 +401,7 @@ class AmercementService
*/
public function getAmercementListPc($params,$page_no, $page_size)
{
big_log($params);
$conditions = $this->buildConditions($params);
big_log($conditions);
$field = "id,status,type,money,submit_agent_id,agent_id,remarks,create_time,forfeit_penalty";
$result = $this->m_amercement->getAmercementList($conditions, $field, $page_no, $page_size);
$redis_cache = new RedisCacheService();
......@@ -513,13 +512,13 @@ class AmercementService
//提交人姓名
if (!empty($params['submit_name'])) {
$user_id_str = $this->getUserIDList($params['submit_name']);
$user_id_str = $this->getAgentIDList($params['submit_name']);
$conditions['submit_agent_id'] = ['in', $user_id_str];
}
//被罚款人姓名
if (!empty($params['name'])) {
$user_id_str = $this->getUserIDList($params['name']);
$user_id_str = $this->getAgentIDList($params['name']);
$conditions['agent_id'] = ['in', $user_id_str];
}
return $conditions;
......@@ -553,20 +552,20 @@ class AmercementService
* @param $name
* @return string
*/
public function getUserIDList($name)
public function getAgentIDList($name)
{
//查询总监下面门店的所有经纪人
$params = [];
$params['name'] = [ 'LIKE', '%' . $name . '%' ];
$params["is_del"] = 0;
$m_user_agent = new UserAgentModel();
$field = 'user_id';
$res = $m_user_agent->selectUser($field, $params);
$params["status"] = 0;
$m_agent = new AAgents();
$field = 'id';
$res = $m_agent->getStoreIdByAgentId($field, $params);
$user_id_str = "";
if (count($res) > 0) {
foreach ($res as $k => $v) {
$user_id_str .= $v["user_id"] . ",";
$user_id_str .= $v["id"] . ",";
}
$user_id_str = rtrim($user_id_str, ",");
}
......
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