wugg 1 năm trước cách đây
mục cha
commit
6565260559
2 tập tin đã thay đổi với 3 bổ sung7 xóa
  1. 1 2
      app/admin/controller/Payment.php
  2. 2 5
      app/command/handleCxData.php

+ 1 - 2
app/admin/controller/Payment.php

@@ -272,7 +272,6 @@ class Payment extends Base
         if(count(array_unique($companyNo))>1){
             return error_show(1003,"采购单数据业务公司不一致");
         }
-
         if ($this->level == 2) {
             //判断是否开通供应商账号
             $temp = check_has_account_by_supplierNos([$supplierNo[0]]);
@@ -302,7 +301,7 @@ class Payment extends Base
                 "updatetime"=>date("Y-m-d H:i:s"),
             ];
            foreach ($cgdall as $key=>$value){
-           	$good_info = \app\admin\model\Good::where(['spuCode'=>$qrd['goodNo']])->findOrEmpty();
+           	$good_info = \app\admin\model\Good::where(['spuCode'=>$value['goodNo']])->findOrEmpty();
              if($good_info->isEmpty()|| $good_info->status==0){
                 Db::rollback();
                return error_show(1004,"采购单商品{$value['goodNo']}商品未确认开票类目");

+ 2 - 5
app/command/handleCxData.php

@@ -39,7 +39,7 @@ class handleCxData extends command
 	    if ($results) {
 		    try {
 			    foreach ($results as $result) {
-				    $dataStr=$result['data'] ?$this->checkData($result['data']): '';
+				    $dataStr=$result['data'];
 				    if($dataStr==''){
 					    $output->writeln("[$date]:{$result['id']}数据解析失败");
 					    continue;
@@ -552,8 +552,5 @@ class handleCxData extends command
 	    Cache::store('redis')->set('JsHandle',0,180);
 		Db::rollback();
     }
-
-    public function checkData($data){
-    return str_replace(array("\r\n" , "\r" , "\n" , "\\" , '/' , '//', '	') , '' , $data);
-    }
+    
 }