Commit 818b8c2b authored by zhuwei's avatar zhuwei

1

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