Sfoglia il codice sorgente

优化工艺名称匹配

unknown 1 settimana fa
parent
commit
32f4edcf3e
1 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. 6 4
      application/api/controller/MachineProductionReport.php

+ 6 - 4
application/api/controller/MachineProductionReport.php

@@ -886,11 +886,12 @@ class MachineProductionReport extends Api
                 'Gy0_yjno' => $req['sczl_yjno'],
                 'Gy0_gxh' => $req['sczl_gxh'],
             ])
-            ->value('Gy0_gxmc');           
+            ->value('Gy0_gxmc');  
+            
         if(empty($process)){
             $this->error('工单没有该工序,请调整之后再提交');
         }
-        if($process !== $data['sczl_type']){
+        if(rtrim($process) !== rtrim($data['sczl_type'])){
             $this->error('工序名称和工单工艺不匹配,请调整之后再提交');
         }
         $data['sys_rq'] = date('Y-m-d H:i:s');
@@ -955,11 +956,12 @@ class MachineProductionReport extends Api
                 'Gy0_yjno' => $req['sczl_yjno'],
                 'Gy0_gxh' => $req['sczl_gxh'],
             ])
-            ->value('Gy0_gxmc');           
+            ->value('Gy0_gxmc'); 
+                 
         if(empty($process)){
             $this->error('工单没有该工序,请调整之后再提交');
         }
-        if($process !== $data['sczl_type']){
+        if(rtrim($process) !== rtrim($data['sczl_type'])){
             $this->error('工序名称和工单工艺不匹配,请调整之后再提交');
         }
         $data['mod_rq'] = date('Y-m-d H:i:s');