|
@@ -437,7 +437,16 @@ class Activity extends Base
|
|
|
|
|
|
$stn = ["order_code" => $activity_code, "status" => $old_activity_status, "action_remark" => '', "action_type" => "status"];
|
|
|
ActionLog::logAdd($this->post['token'], $stn, "HD", $activity['status'], $activity);
|
|
|
- $process = ["order_code" => $activity_code, "order_id" => $activity['id'], "order_status" => $activity['status'], "order_type" => 'HD', "before_status" => $old_activity_status];
|
|
|
+
|
|
|
+ //查找财务主管
|
|
|
+ $user = Db::name('role')
|
|
|
+ ->field('r.id,u.uid,u.nickname')
|
|
|
+ ->alias('r')
|
|
|
+ ->leftJoin('user_role ur', 'ur.roleid=r.id AND ur.is_del=0')
|
|
|
+ ->leftJoin('depart_user u', 'u.uid=ur.uid AND u.is_del=0 AND u.status=1')
|
|
|
+ ->where('r.id', 20)//财务负责人
|
|
|
+ ->findOrEmpty();
|
|
|
+ $process = ["order_code" => $activity_code, "order_id" => $activity['id'], "order_status" => $activity['status'], "order_type" => 'HD', "before_status" => $old_activity_status, 'wait_id' => isset($user['uid']) ? $user['uid'] : 0, 'wait_name' => isset($user['nickname']) ? $user['nickname'] : ''];
|
|
|
ProcessOrder::AddProcess($this->post['token'], $process);
|
|
|
|
|
|
Db::commit();
|