|
@@ -50,7 +50,7 @@ class Proorder extends Base
|
|
|
$param = $this->request->filter('trim')->only(['token', 'apply_id' => '', 'action_uid' => '', 'order_code' => '', 'page' => 1, 'size' => 10], 'post');
|
|
|
|
|
|
$db = ProcessWait::alias("a")
|
|
|
- ->leftJoin("workflow b", "a.order_type=b.order_type and a.order_code=b.order_code")
|
|
|
+ ->leftJoin('workflow b', 'a.order_type=b.order_type and a.order_id=b.order_id')//这个地方不适宜用order_code,因为特殊单子没有编码,例如离职交接单
|
|
|
->where(['is_del' => 0, 'a.status' => ProcessWait::$status_finish]);
|
|
|
|
|
|
$db->where(function ($query) use ($param) {
|
|
@@ -137,7 +137,7 @@ class Proorder extends Base
|
|
|
$param = $this->request->filter('trim')->only(['token', 'apply_id' => '', 'action_uid' => '', 'order_code' => '', 'page' => 1, 'size' => 10], 'post');
|
|
|
|
|
|
$db = ProcessWait::alias("a")
|
|
|
- ->leftJoin('workflow b', 'a.order_type=b.order_type and a.order_code=b.order_code')
|
|
|
+ ->leftJoin('workflow b', 'a.order_type=b.order_type and a.order_id=b.order_id')//这个地方不适宜用order_code,因为特殊单子没有编码,例如离职交接单
|
|
|
// ->leftJoin('process p', 'p.process_type=a.order_type AND p.is_del=0 AND p.status=1')
|
|
|
->where(['a.status' => ProcessWait::$status_wait]);
|
|
|
|
|
@@ -162,7 +162,7 @@ class Proorder extends Base
|
|
|
$total = ceil($count / $param['size']);
|
|
|
$page = $param['page'] > $total ? $total : $param['page'];
|
|
|
$list = $db
|
|
|
- ->field("a.id,a.addtime,a.action_name,a.order_status,a.order_type,a.order_process,a.order_code,a.order_id,a.handle_user_list,a.action_uid apply_id,a.action_name apply_name")
|
|
|
+ ->field("a.id,a.addtime,a.action_name,a.order_status,a.order_type,a.order_process,a.order_code,a.order_id,a.handle_user_list,b. apply_id,b.apply_name")
|
|
|
->page($page, $param['size'])
|
|
|
->order("a.addtime desc")
|
|
|
// ->append(['handle_user_list'])
|