ProcessOrder.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. namespace app\admin\model;
  3. use think\facade\Config;
  4. class ProcessOrder extends \think\Model
  5. {
  6. //记录流程
  7. //(于2023年03月08日暂时关闭)
  8. public static function AddProcess($token,$order){}
  9. // public static function AddProcess($token,$order){
  10. //
  11. // if (is_string($token)) {
  12. // $user = GetUserInfo($token);
  13. // $uid = isset($user['data']['id']) ? $user['data']['id'] : 0;
  14. // $name = isset($user['data']['nickname']) ? $user['data']['nickname'] : '';
  15. // } else {
  16. // //主要是某些脚本调用时没有token
  17. // $uid = isset($token['id']) ? $token['id'] : 0;
  18. // $name = isset($token['nickname']) ? $token['nickname'] : '';
  19. // }
  20. // $conf =Config::get("process");
  21. // $action = isset($conf[$order['order_type']]) ? $conf[$order['order_type']]:[];
  22. // $header =reset($action);
  23. // if((is_array($header)&&in_array($order['order_status'],$header))||$header==$order['order_status']){
  24. // $order_status=1; //流程新建
  25. // }else{
  26. // $order_status=2;
  27. // }
  28. // $data=[
  29. // "order_type"=>$order['order_type'],
  30. // "order_code"=>$order['order_code'],
  31. // "order_id"=>isset($order['order_id']) ?$order['order_id']:0 ,
  32. // "order_status"=>$order_status,
  33. // "action_process"=>$order['order_status'],
  34. // "action_status"=>$order['before_status'],
  35. // "action_uid"=>$uid,
  36. // "action_name"=>$name,
  37. // "addtime"=>date("Y-m-d H:i:s"),
  38. //// 'holder_id'=>$order['holder_id'],//数据所有人
  39. // ];
  40. // OrderMsg::addmsg($data);
  41. //
  42. // //手动排除竞价单ZXD
  43. // if($order['order_type']!='ZXD') {
  44. // ProcessWait::add(array_merge($data, ['holder_id' => $order['holder_id'] ?? 0,'person_id' => $order['person_id'] ?? 0]), isset($order['wait_id']) ? $order['wait_id'] : 0, isset($order['wait_name']) ? $order['wait_name'] : '',$order['handle_user_list']??'');
  45. // }
  46. //
  47. // $insert = $data;
  48. // //如果是【供应商】应用,即abutment,增加字段source==2(操作来源为供应商)
  49. // if (strtolower(app('http')->getName()) == 'abutment') $insert['source'] = 2;
  50. //
  51. // if (self::insert($insert)) {
  52. // Workflow::SaveFlow($data);
  53. // };
  54. // }
  55. public static function workdel($order){
  56. Workflow::where(["order_type"=>$order['order_type'],"order_code"=>$order['order_code']])->save(["is_del"=>1,"updatetime"=>date("y-m-d H:i:s")]);
  57. }
  58. }