|
@@ -73,20 +73,22 @@ class Process extends Base
|
|
// if ($orderCode == "") {
|
|
// if ($orderCode == "") {
|
|
// return error_show(1004, "参数orderCode不能为空");
|
|
// return error_show(1004, "参数orderCode不能为空");
|
|
// }
|
|
// }
|
|
- $list = Db::name("action_process")
|
|
|
|
- ->where(['order_type' => $param['type'], "is_del" => 0, "status" => 1])
|
|
|
|
- ->order("weight desc,id desc")
|
|
|
|
- ->column('*', 'order_process');
|
|
|
|
|
|
+// $list = Db::name("action_process")
|
|
|
|
+// ->where(['order_type' => $param['type'], "is_del" => 0, "status" => 1])
|
|
|
|
+// ->order("weight desc,id desc")
|
|
|
|
+// ->column('*', 'order_process');
|
|
|
|
|
|
//根据所有的状态,查询对应的操作
|
|
//根据所有的状态,查询对应的操作
|
|
- $order_process_s = array_column($list, 'order_process');
|
|
|
|
|
|
+// $order_process_s = array_column($list, 'order_process');
|
|
|
|
|
|
$rs = Db::name("process_order")
|
|
$rs = Db::name("process_order")
|
|
- ->where(["order_type" => $param['type']])
|
|
|
|
- ->whereIn('action_process', $order_process_s)
|
|
|
|
- ->field('id,action_uid,action_name,addtime,action_process,order_type,source');
|
|
|
|
- if (is_numeric($param['orderCode'])) $rs->where('order_id', $param['orderCode']);
|
|
|
|
- else $rs->where('order_code', $param['orderCode']);
|
|
|
|
|
|
+ ->alias('a')
|
|
|
|
+ ->leftJoin('action_process b', 'b.order_type=a.order_type AND b.order_process=a.order_status')
|
|
|
|
+ ->where(["a.order_type" => $param['type']])
|
|
|
|
+ ->order('a.id', 'asc')
|
|
|
|
+ ->field('a.id,a.action_uid,a.action_name,a.addtime,a.action_process,a.order_type,a.source,a.order_status,b.status_name');
|
|
|
|
+ if (is_numeric($param['orderCode'])) $rs->where('a.order_id', $param['orderCode']);
|
|
|
|
+ else $rs->where('a.order_code', $param['orderCode']);
|
|
|
|
|
|
$node = $rs
|
|
$node = $rs
|
|
->select()
|
|
->select()
|
|
@@ -104,13 +106,13 @@ class Process extends Base
|
|
]);
|
|
]);
|
|
|
|
|
|
$data[$i + 1] = [
|
|
$data[$i + 1] = [
|
|
- 'status_name' => $list[$value['action_process']]['status_name'] ?? '',
|
|
|
|
- 'order_process' => $list[$value['action_process']]['order_process'] ?? 0,
|
|
|
|
|
|
+ 'status_name' => $value['status_name'],
|
|
|
|
+ 'order_process' => $value['order_status']
|
|
];
|
|
];
|
|
// $value['order_process'] = isset($list[$value['action_process']]['order_process']) ? $list[$value['action_process']]['order_process'] : 0;
|
|
// $value['order_process'] = isset($list[$value['action_process']]['order_process']) ? $list[$value['action_process']]['order_process'] : 0;
|
|
// $value['order_name'] = isset($list[$value['action_process']]['order_name']) ? $list[$value['action_process']]['order_name'] : '';
|
|
// $value['order_name'] = isset($list[$value['action_process']]['order_name']) ? $list[$value['action_process']]['order_name'] : '';
|
|
// $value['pid'] = isset($list[$value['action_process']]['pid']) ? $list[$value['action_process']]['pid'] : '';
|
|
// $value['pid'] = isset($list[$value['action_process']]['pid']) ? $list[$value['action_process']]['pid'] : '';
|
|
- $value['status_name'] = isset($list[$value['action_process']]['status_name']) ? $list[$value['action_process']]['status_name'] : '';
|
|
|
|
|
|
+// $value['status_name'] = isset($list[$value['action_process']]['status_name']) ? $list[$value['action_process']]['status_name'] : '';
|
|
// $value['roleid'] = isset($list[$value['action_process']]['roleid']) ? $list[$value['action_process']]['roleid'] : '';
|
|
// $value['roleid'] = isset($list[$value['action_process']]['roleid']) ? $list[$value['action_process']]['roleid'] : '';
|
|
// $value['status'] = isset($list[$value['action_process']]['status']) ? $list[$value['action_process']]['status'] : '';
|
|
// $value['status'] = isset($list[$value['action_process']]['status']) ? $list[$value['action_process']]['status'] : '';
|
|
// $value['weight'] = isset($list[$value['action_process']]['weight']) ? $list[$value['action_process']]['weight'] : '';
|
|
// $value['weight'] = isset($list[$value['action_process']]['weight']) ? $list[$value['action_process']]['weight'] : '';
|