|
@@ -63,9 +63,39 @@ class Workflow extends \think\Model
|
|
|
*
|
|
|
*/
|
|
|
public function Addwait($data){
|
|
|
- $data=[
|
|
|
+ $conf =self::$conf;
|
|
|
+ $action = isset($conf[$data['order_type']]) ? $conf[$data['order_type']]:[];
|
|
|
+ if(!empty($action)){
|
|
|
+ $last =end($action);
|
|
|
+ $wait="";
|
|
|
+ foreach ($action as $key=>$value){
|
|
|
+ if((is_array($value)&&in_array($data['action_process'],$value))||$value==$data['action_process']){
|
|
|
+ if($value!=$last){
|
|
|
+ $index=$key+1;
|
|
|
+ $wait= is_array($action[$index])? $action[$index][0]:$action[$index];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $orderp =Db::name("action_prcess")->field("uid,uname")->where(["order_type"=>$data['order_type'],
|
|
|
+ "order_process"=>$wait])->find();
|
|
|
+ $data=[
|
|
|
+ "order_type"=>$data['order_type'],
|
|
|
+ "order_code"=>$data['order_code'],
|
|
|
+ "order_id"=>$data['order_id'],
|
|
|
+ "order_process"=>$wait,
|
|
|
+ "order_status"=>$data['action_process'],
|
|
|
+ "apply_id"=>$data['action_uid'],
|
|
|
+ "apply_name"=>$data['action_name'],
|
|
|
+ "action_uid"=>$orderp['uid'],
|
|
|
+ "action_name"=>$orderp['uname'],
|
|
|
+ "addtime"=>date("Y-m-d H:i:s"),
|
|
|
+ "updatetime"=>date("Y-m-d H:i:s")
|
|
|
+ ];
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- ];
|
|
|
}
|
|
|
|
|
|
public function checkStatus(){
|