|
|
@@ -2,7 +2,6 @@
|
|
|
|
|
|
namespace app\workerapi\lists;
|
|
|
|
|
|
-use app\common\model\works\ServiceWork;
|
|
|
use app\common\model\works\ServiceWorkAllocateWorkerLog;
|
|
|
|
|
|
class ServiceWorkGrabOrderLogLists extends BaseWorkerDataLists
|
|
|
@@ -15,17 +14,22 @@ class ServiceWorkGrabOrderLogLists extends BaseWorkerDataLists
|
|
|
*/
|
|
|
public function lists(): array
|
|
|
{
|
|
|
- return ServiceWorkAllocateWorkerLog::alias("a")
|
|
|
+ $list = ServiceWorkAllocateWorkerLog::alias("a")
|
|
|
->join("service_work b","a.work_id = b.id AND a.master_worker_id = b.master_worker_id")
|
|
|
->where('a.type',3)
|
|
|
->where('a.create_time','>',(time()-15*86400))
|
|
|
->where('a.master_worker_id',$this->userId)
|
|
|
->field(['a.opera_log','b.id', 'b.work_sn', 'b.address', 'b.title', 'b.work_status', 'b.service_status','b.work_pay_status', 'b.appointment_time','b.receive_time','b.base_service_fee','b.service_fee'])
|
|
|
- ->append(['b.work_status_text','b.service_status_text'])
|
|
|
->limit($this->limitOffset, $this->limitLength)
|
|
|
->order(['b.appointment_time' => 'asc'])
|
|
|
->select()
|
|
|
->toArray();
|
|
|
+ foreach ($list as &$item) {
|
|
|
+ $item['work_status_text'] = (new \app\common\model\works\ServiceWork)->getWorkStatusTextAttr('',$item);
|
|
|
+ $item['service_status_text'] = (new \app\common\model\works\ServiceWork)->getServiceStatusTextAttr('',$item);
|
|
|
+ $item['appointment_time'] = (new \app\common\model\works\ServiceWork)->getAppointmentTimeAttr('',$item);
|
|
|
+ }
|
|
|
+ return $list;
|
|
|
}
|
|
|
|
|
|
|