|
|
@@ -80,7 +80,7 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
|
|
|
* @param status the status 状态
|
|
|
* @return double
|
|
|
*/
|
|
|
- @Query("select sum(nvl(g.reserve, 0)) from Goods g where g.uuid=:uuid and g.status =:status")
|
|
|
+ @Query("select sum(ifnull(g.reserve, 0)) from Goods g where g.uuid=:uuid and g.status =:status")
|
|
|
Double findTotalReserveByUuid(@Param("uuid") String uuid, @Param("status") Integer status);
|
|
|
|
|
|
/**
|
|
|
@@ -199,7 +199,7 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
|
|
|
* @param status the status 状态
|
|
|
* @return double
|
|
|
*/
|
|
|
- @Query("select sum(nvl(g.sampleQty, 0) - nvl(g.sampleAppliedQty, 0)) from Goods g where g.uuid=:uuid and g.status =:status")
|
|
|
+ @Query("select sum(ifnull(g.sampleQty, 0) - ifnull(g.sampleAppliedQty, 0)) from Goods g where g.uuid=:uuid and g.status =:status")
|
|
|
Double findAvailableSampleQtyByUuid(@Param("uuid") String uuid, @Param("status") Integer status);
|
|
|
|
|
|
/**
|
|
|
@@ -209,7 +209,7 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
|
|
|
* @param status the status 状态
|
|
|
* @return double
|
|
|
*/
|
|
|
- @Query("select sum(nvl(g.reserve, 0)) from Goods g where g.uuid=:uuid and g.original=1311 and g.status =:status")
|
|
|
+ @Query("select sum(ifnull(g.reserve, 0)) from Goods g where g.uuid=:uuid and g.original=1311 and g.status =:status")
|
|
|
Double findOriginalQtyByUuid(@Param("uuid") String uuid, @Param("status") Integer status);
|
|
|
|
|
|
/**
|
|
|
@@ -219,7 +219,7 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
|
|
|
* @param status the status 状态
|
|
|
* @return double
|
|
|
*/
|
|
|
- @Query("select sum(nvl(g.reserve, 0)) from Goods g where g.uuid=:uuid and g.original=1312 and g.status =:status")
|
|
|
+ @Query("select sum(ifnull(g.reserve, 0)) from Goods g where g.uuid=:uuid and g.original=1312 and g.status =:status")
|
|
|
Double findInactionStockQtyByUuid(@Param("uuid") String uuid, @Param("status") Integer status);
|
|
|
|
|
|
/**
|
|
|
@@ -229,7 +229,7 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
|
|
|
* @param status the status 状态
|
|
|
* @return double
|
|
|
*/
|
|
|
- @Query(value = "select sum(nvl(g.sampleAppliedQty, 0)) from Goods g where g.uuid=:uuid and g.status =:status")
|
|
|
+ @Query(value = "select sum(ifnull(g.sampleAppliedQty, 0)) from Goods g where g.uuid=:uuid and g.status =:status")
|
|
|
Double findApplyedSampleQty(@Param("uuid") String uuid, @Param("status") Integer status);
|
|
|
|
|
|
/**
|
|
|
@@ -248,7 +248,7 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
|
|
|
* @param qty the qty 数量
|
|
|
* @return list
|
|
|
*/
|
|
|
- @Query(value = "select * from (select * from trade$goods g where nvl(g.go_sampleqty, 0) - nvl(g.go_sampleappliedqty, 0) >0 order by go_id desc) where rownum<=:qty", nativeQuery = true)
|
|
|
+ @Query(value = "select * from (select * from trade$goods g where ifnull(g.go_sampleqty, 0) - ifnull(g.go_sampleappliedqty, 0) >0 order by go_id desc) where rownum<=:qty", nativeQuery = true)
|
|
|
List<Goods> findAvailableSampleQty(@Param("qty") Integer qty);
|
|
|
|
|
|
/**
|
|
|
@@ -361,7 +361,7 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
|
|
|
* @param storeid the storeid 店铺uuid
|
|
|
* @return double
|
|
|
*/
|
|
|
- @Query(value = "select sum(nvl(g.reserve, 0)) from Goods g where g.enUU =:enUU and g.storeid =:storeid")
|
|
|
+ @Query(value = "select sum(ifnull(g.reserve, 0)) from Goods g where g.enUU =:enUU and g.storeid =:storeid")
|
|
|
Double findSumReserveByEnuuAndStoreid(@Param("enUU") Long enuu, @Param("storeid") String storeid);
|
|
|
|
|
|
/**
|
|
|
@@ -379,7 +379,7 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
|
|
|
* @param enuu the enuu 企业的enuu
|
|
|
* @return double
|
|
|
*/
|
|
|
- @Query(value = "select sum(g.reserve * nvl(g.maxPriceRMB, 0)) from Goods g where g.enUU =:enUU")
|
|
|
+ @Query(value = "select sum(g.reserve * ifnull(g.maxPriceRMB, 0)) from Goods g where g.enUU =:enUU")
|
|
|
public Double findSumRMBByEnuu(@Param("enUU") Long enuu);
|
|
|
|
|
|
/**
|