Prechádzať zdrojové kódy

Merge branch 'master' of http://101.133.135.193:20080/huhao/baoshi-was

loustwo 3 rokov pred
rodič
commit
4e8139495d
1 zmenil súbory, kde vykonal 2 pridanie a 4 odobranie
  1. 2 4
      app/Services/AllInventoryService.php

+ 2 - 4
app/Services/AllInventoryService.php

@@ -27,6 +27,7 @@ class AllInventoryService
         $SKU=$params['SKU'] ?? null;
         $ALTERNATE_SKU1=$params['ALTERNATE_SKU1'] ?? null;
         $LotAtt02_end=$params['LotAtt02_end'] ?? null;
+        $commodityName=$params['commodity_name'] ?? null;
         $sql='select * from (select result.*,rownum rn from (';
         $sql.=' select customer.descr_c as 货主,storeStatus.CUSTOMERID 客户,storeStatus.LocationID 库位, sku.SKU 产品编码, sku.ALTERNATE_SKU1 产品条码, ';
         $sql.=' sku.Descr_C 商品名称, lot.LotAtt05 属性仓, lot.LotAtt08 质量状态, lot.LotAtt02 失效日期, storeStatus.ADDTIME 创建时间, ';
@@ -57,17 +58,14 @@ class AllInventoryService
         $sql.=' ,sku.Descr_C,lot.LotAtt05,lot.LotAtt08,lot.LotAtt02,lot.LotAtt04 ';
         $sql.=' , storeStatus.QTY, storeStatus.QtyAllocated,storeStatus.CUSTOMERID,storeStatus.ADDTIME  ';
         $sql.=' )result where 1=1 ';
-//        if ($TOLocation)$sql .= " and 库位 like '".$TOLocation."' ";
-//        if ($SKU)$sql.=" and 产品编码 like '".$SKU."' ";
-//        if ($LotAtt05)$sql .=" and 属性仓 like '".$LotAtt05."' ";
         if ($TOLocation)$sql=$this->sqlSearchWay($sql,$TOLocation,"库位");
+        if ($commodityName)$sql=$this->sqlSearchWay($sql,$commodityName,"商品名称");
         if ($SKU)$sql=$this->sqlSearchWay($sql,$SKU,"产品编码");
         if ($LotAtt05)$sql=$this->sqlSearchWay($sql,$LotAtt05,"属性仓");
         if ($date_start)$sql.=" and 创建时间 > to_date('".$date_start." 00:00:00','yyyy-mm-dd hh24:mi:ss') ";
         if ($date_end)$sql.=" and 创建时间 < to_date('".$date_end." 23:59:59','yyyy-mm-dd hh24:mi:ss') ";
         if ($LotAtt02_start)$sql.=" and 失效日期 >='".$LotAtt02_start." 00:00:00' ";
         if ($LotAtt02_end)$sql.=" and 失效日期 <='".$LotAtt02_end." 23:59:59' ";
-//        if ($ALTERNATE_SKU1)$sql.=" and 产品条码 like '".$ALTERNATE_SKU1."' ";
         if ($ALTERNATE_SKU1)$sql=$this->sqlSearchWay($sql,$ALTERNATE_SKU1,"产品条码");
         if ($page&&$paginate)$sql.="  and ROWNUM<='".$page*$paginate."'";
         $sql.=' )  ';