diff --git a/app/adminapi/logic/oa/FlowApproveLogic.php b/app/adminapi/logic/oa/FlowApproveLogic.php index db3dc6d83..61c5a605b 100644 --- a/app/adminapi/logic/oa/FlowApproveLogic.php +++ b/app/adminapi/logic/oa/FlowApproveLogic.php @@ -185,9 +185,9 @@ class FlowApproveLogic extends BaseLogic //1-2、如果其他用户有一位审批通过,则不管当前用户是否审批通过,则判断当前审核步骤是否是最后一步,如果是最后一步,该记录设置为审核通过,如果不是最后一步,该记录设置为审核中,流程设置为下一步 //2、如果没审批完,则不管当前用户是否审批通过也不管当前审核步骤是否是最后一步,该记录都设置为审批中,不设置下一步操作 //获取当前记录的审核记录数 - $check_record_count = FlowRecord::where('approve_id',$params['id'])->where('step_id',$current_step['id'])->count(); + $check_record_count = FlowRecord::where('approve_id',$params['id'])->where('step_id',$current_step['id'])->where('is_invalid',0)->where('status','<>',0)->count(); //获取但前记录的已经通过的记录 - $check_record_pass = FlowRecord::where('approve_id',$params['id'])->where('step_id',$current_step['id'])->where('status',1)->findOrEmpty(); + $check_record_pass = FlowRecord::where('approve_id',$params['id'])->where('step_id',$current_step['id'])->where('status',1)->where('is_invalid',0)->findOrEmpty(); //判断当前记录除当前用户外,是否都审批了, if(count($current_check_user)-1 == $check_record_count){ //判断有没有审核通过的 @@ -233,9 +233,9 @@ class FlowApproveLogic extends BaseLogic //1-2、如果其他用户有一位审批不通过,则不管当前用户是否审批通过,该记录设置为审核不通过,流程结束 //2、如果没审批完,则判断当前用户是否审批通过,如果当前用户审批通过,则将记录设置为审批中,如果当前用户审批不通过,则将记录设置为审批不通过 //获取当前记录的审核记录数 - $check_record_count = FlowRecord::where('approve_id',$params['id'])->where('step_id',$current_step['id'])->count(); + $check_record_count = FlowRecord::where('approve_id',$params['id'])->where('step_id',$current_step['id'])->where('is_invalid',0)->where('status','<>',0)->count(); //获取但前记录的未通过的记录 - $check_record_not_pass = FlowRecord::where('approve_id',$params['id'])->where('step_id',$current_step['id'])->where('status',2)->findOrEmpty(); + $check_record_not_pass = FlowRecord::where('approve_id',$params['id'])->where('step_id',$current_step['id'])->where('status',2)->where('is_invalid',0)->findOrEmpty(); //判断当前记录除当前用户外,是否都审批了, if(count($current_check_user)-1 == $check_record_count){ //判断有没有审核不通过的