浏览代码

add - log

liugc 1 年之前
父节点
当前提交
dabae074c8
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      app/adminapi/logic/works/ServiceWorkLogic.php

+ 5 - 2
app/adminapi/logic/works/ServiceWorkLogic.php

@@ -923,7 +923,7 @@ class ServiceWorkLogic extends BaseLogic
         Db::startTrans();
         try {
             if(empty($params['id']) || empty($params['tenant_id'])){
-                throw new \Exception('参数错误');
+                throw new \Exception('参数错误'.json_encode($params));
             }
             if (is_array($params['id'])) {
                 $ids = $params['id'];
@@ -933,7 +933,10 @@ class ServiceWorkLogic extends BaseLogic
 
             // 取消工程师分配
             foreach ($ids as $id) {
-                self::cancelAllocation(['id'=>$id,'master_worker_id'=>''],$userInfo);
+                $res = self::cancelAllocation(['id'=>$id,'master_worker_id'=>''],$userInfo);
+                if($res === false){
+                    Log::info('分配log'.self::getError());
+                }
             }
             ServiceWork::whereIn('id',$ids)->update(['tenant_id'=>$params['tenant_id']]);
             Db::commit();