Browse Source

优化接口

huangsanjia 1 year ago
parent
commit
18e7177a65
1 changed files with 2 additions and 2 deletions
  1. 2 2
      application/api/controller/ReportingWork.php

+ 2 - 2
application/api/controller/ReportingWork.php

@@ -92,7 +92,7 @@ class ReportingWork extends Api
 //        $sql = \db('设备_产量采集')->fetchSql(true)->insert($data);
         $sql = \db('设备_产量采集')->fetchSql(true)->insert($data);
         $res = Db::query($sql);
-        if ($res === false){
+        if ($res !== false){
             $this->success('设置成功');
         }else{
             $this->error('设置失败');
@@ -124,7 +124,7 @@ class ReportingWork extends Api
         $where['Gy0_gxh'] = $params['gxh'];
         $date = date('Y-m-d H:i:s');
         $res = \db('工单_工艺资料')->where($where)->setField('PD_WG',$date);
-        if ($res === false){
+        if ($res !== false){
             $this->success('设置成功');
         }else{
             $this->error('设置失败');