diff --git a/app/api/controller/FinanceExpense.php b/app/api/controller/FinanceExpense.php index 2a810b5..f05386b 100644 --- a/app/api/controller/FinanceExpense.php +++ b/app/api/controller/FinanceExpense.php @@ -145,7 +145,7 @@ class FinanceExpense extends ApiController $flow_list = Db::name('Flow')->where('id',$param['flow_id'])->value('flow_list'); $flow = unserialize($flow_list); - if (!isset($param['check_admin_ids'])) { + if (!empty($param['check_admin_ids'])) { foreach($flow as $item) { // 当前部门负责人 if ($item['flow_type'] == 1) { @@ -190,7 +190,7 @@ class FinanceExpense extends ApiController //删除原来的审核流程和审核记录 Db::name('FlowStep')->where(['action_id'=>$param['id'],'type'=>2,'delete_time'=>0])->update(['delete_time'=>time()]); Db::name('FlowRecord')->where(['action_id'=>$param['id'],'type'=>2,'delete_time'=>0])->update(['delete_time'=>time()]); - if (!isset($param['check_admin_ids'])) { + if (!empty($param['check_admin_ids'])) { if($flow[0]['flow_type'] == 1){ // 部门负责人 $manager = get_department_manager($this->uid); @@ -300,7 +300,7 @@ class FinanceExpense extends ApiController $param['did'] = $this->did; Db::startTrans(); try { - if (!isset($param['check_admin_ids'])) { + if (!empty($param['check_admin_ids'])) { if($flow[0]['flow_type'] == 1){ // 部门负责人 $manager = get_department_manager($this->uid); diff --git a/app/api/controller/FinanceInvoice.php b/app/api/controller/FinanceInvoice.php index 611488a..225829c 100644 --- a/app/api/controller/FinanceInvoice.php +++ b/app/api/controller/FinanceInvoice.php @@ -173,7 +173,7 @@ class FinanceInvoice extends ApiController $this->apiError("银行地址不能为空"); } } - if (!isset($param['check_admin_ids'])) { + if (!empty($param['check_admin_ids'])) { foreach($flow as $item) { // 当前部门负责人 if ($item['flow_type'] == 1) { @@ -216,7 +216,7 @@ class FinanceInvoice extends ApiController //删除原来的审核流程和审核记录 Db::name('FlowStep')->where(['action_id'=>$param['id'],'type'=>3,'delete_time'=>0])->update(['delete_time'=>time()]); Db::name('FlowRecord')->where(['action_id'=>$param['id'],'type'=>3,'delete_time'=>0])->update(['delete_time'=>time()]); - if (!isset($param['check_admin_ids'])) { + if (!empty($param['check_admin_ids'])) { if($flow[0]['flow_type'] == 1){ // 部门负责人 $manager = get_department_manager($this->uid); @@ -295,7 +295,7 @@ class FinanceInvoice extends ApiController $param['did'] = $this->did; $param['create_time'] = time(); - if (!isset($param['check_admin_ids'])) { + if (!empty($param['check_admin_ids'])) { if($flow[0]['flow_type'] == 1){ // 部门负责人 $manager = get_department_manager($this->uid); diff --git a/app/api/controller/OaApprove.php b/app/api/controller/OaApprove.php index 0b2c997..8ed469b 100644 --- a/app/api/controller/OaApprove.php +++ b/app/api/controller/OaApprove.php @@ -147,7 +147,7 @@ class OaApprove extends ApiController } $flow_list = Db::name('Flow')->where('id',$param['flow_id'])->value('flow_list'); $flow = unserialize($flow_list); - if (!isset($param['check_admin_ids'])) { + if (!empty($param['check_admin_ids'])) { foreach($flow as $item) { // 当前部门负责人 if ($item['flow_type'] == 1) { @@ -188,7 +188,7 @@ class OaApprove extends ApiController Db::name('FlowStep')->where(['action_id'=>$param['id'],'type'=>1,'delete_time'=>0])->update(['delete_time'=>time()]); Db::name('FlowRecord')->where(['action_id'=>$param['id'],'type'=>1,'delete_time'=>0])->update(['delete_time'=>time()]); - if (!isset($param['check_admin_ids'])) { + if (!empty($param['check_admin_ids'])) { if($flow[0]['flow_type'] == 1){ // 部门负责人 $manager = get_department_manager($this->uid); @@ -211,7 +211,7 @@ class OaApprove extends ApiController } else{ $param['check_admin_ids'] = $flow[0]['flow_uids']; - } + } Db::name('Approve')->strict(false)->field(true)->update($param); foreach ($flow as $key => &$value){ $value['action_id'] = $param['id']; @@ -255,7 +255,7 @@ class OaApprove extends ApiController $param['department_id'] = $this->did; $param['create_time'] = time(); try { - if (!isset($param['check_admin_ids'])) { + if (!empty($param['check_admin_ids'])) { if($flow[0]['flow_type'] == 1){ // 部门负责人 $manager = get_department_manager($this->uid);