wugg il y a 7 mois
Parent
commit
104117c50c
3 fichiers modifiés avec 4 ajouts et 11 suppressions
  1. 2 7
      app/admin/controller/Good.php
  2. 1 3
      app/command/SplitSale.php
  3. 1 1
      app/command/caixiao.php

+ 2 - 7
app/admin/controller/Good.php

@@ -1365,13 +1365,8 @@ class Good extends Base
         $param= $this->request->param(['spuCode'=>'',"isZx"=>""],'post','trim');
 		$list = (new GoodCombind())->with([$param['isZx']==1?"goodZx":"goodBasic"])->where('spuCode',$param['spuCode'])->select();
 		foreach ($list as &$item){
-				$taxInfo=GoodTax::getInfobySpuCode($item['spuCode'],1);
-        		$item['tax_id'] = $taxInfo['tax_id']??'';
-                $item['tax_name'] = $taxInfo['cat_name']??'';
-                $item['tax_short_name'] =$taxInfo['short_name']??'';
-                $item['tax_code'] =$taxInfo['merge_code']??'';
-                $item['tax']=$taxInfo['tax']??'';
-                $item['inv_good_name']=$taxInfo['inv_good_name']??'';
+            $taxInfo=GoodTax::with(['Tax','OutTax','CgdTax'])->where(['spuCode'=>$item['spuCode']])->findOrEmpty();
+            $item['tax_info'] = $taxInfo;
 		}
 		$this->success('获取成功',$list);
     }

+ 1 - 3
app/command/SplitSale.php

@@ -28,9 +28,6 @@ class SplitSale extends Command
 
     protected function execute(Input $input, Output $output)
     {
-
-        try {
-
             $key = 'split_sale_';
 
             $rs = Cache::store('redis')->inc($key);
@@ -38,6 +35,7 @@ class SplitSale extends Command
             	Cache::store('redis')->dec($key);
 	            return true;
             }
+        try {
 			$this->comOrder=new ComonOrder();
             Db::startTrans();
 			

+ 1 - 1
app/command/caixiao.php

@@ -31,7 +31,7 @@ class caixiao extends Command
     		$unique = md5($item->cgdNo.$item->updatetime);
            $temp=['order_type'=>2,'uniqkey'=>$unique,'status'=>1,'addtime'=>date('Y-m:d H:i:s')];
            if($this->isInCfp($unique)){
-               $order_type= $item->order_source!=8?1:(is_null($item->mainCode)?2:3);
+               $order_type= is_null($item->mainCode)?($item->order_source!=8?1:2):3;
             $item['inv_cat_info'] =  OrderTax::spuCat($item->spuCode,$item->open_type,$order_type);
            	$item['cat_name'] = json_decode($item->cat_name);
             $temp['data']= json_encode($item,JSON_UNESCAPED_UNICODE);