|
|
@@ -35,8 +35,8 @@ public interface PurchaseOrderDao extends JpaSpecificationExecutor<PurchaseOrder
|
|
|
/**
|
|
|
* 作为客户,按企业UU和状态统计条数
|
|
|
*
|
|
|
- * @param uu
|
|
|
- * @param value
|
|
|
+ * @param enUU
|
|
|
+ * @param status
|
|
|
* @return
|
|
|
*/
|
|
|
@Query("select count(o) from PurchaseOrder o where o.enUU = :enUU and o.status = :status")
|
|
|
@@ -45,8 +45,7 @@ public interface PurchaseOrderDao extends JpaSpecificationExecutor<PurchaseOrder
|
|
|
/**
|
|
|
* 按采购单的供应商企业UU来统计条数
|
|
|
*
|
|
|
- * @param vendUU
|
|
|
- * @param status
|
|
|
+ * @param enUU
|
|
|
* @return
|
|
|
*/
|
|
|
@Query("select count(o) from PurchaseOrder o where o.enUU = :enUU")
|
|
|
@@ -55,21 +54,27 @@ public interface PurchaseOrderDao extends JpaSpecificationExecutor<PurchaseOrder
|
|
|
/**
|
|
|
* 获得每种单据状态的未读数量
|
|
|
*
|
|
|
- * @Param ids 未读单据id
|
|
|
- * @return
|
|
|
+ * @param ids 未读单据id
|
|
|
+ * @return 返回各个状态的数量,Object数据第一个值为数量,第二个值为砖头
|
|
|
*/
|
|
|
@Query("select count(p), p.status from PurchaseOrderAll p where p.id in :ids and (p.end = 0 or p.end is null) and (p.status = 201 or p.status = 200) group by p.status")
|
|
|
public List<Object[]> getUnreadCountEveryStatus(@Param("ids") List<Long> ids);
|
|
|
|
|
|
/**
|
|
|
- * 筛选出未报价单据的id号
|
|
|
+ * 筛选出已回复单据的id号
|
|
|
*
|
|
|
- * @param ids
|
|
|
- * @return
|
|
|
+ * @param ids 需要筛选的id号集合
|
|
|
+ * @return 已回复单据id号集合
|
|
|
*/
|
|
|
- @Query("select p.id from PurchaseOrderAll p where p.id in :ids and p.status=201 and p.end <> 1")
|
|
|
+ @Query("select p.id from PurchaseOrderAll p where p.id in :ids and p.status=201 and nvl(p.end,0)=0")
|
|
|
List<Long> findRepliedId(@Param("ids") List<Long> ids);
|
|
|
|
|
|
- @Query("select p.id from PurchaseOrderAll p where p.id in :ids and p.status=200 and p.end <> 1")
|
|
|
+ /**
|
|
|
+ * 筛选出未回复单据的id号
|
|
|
+ *
|
|
|
+ * @param ids 需要筛选的id号集合
|
|
|
+ * @return 未回复单据id号集合
|
|
|
+ */
|
|
|
+ @Query("select p.id from PurchaseOrderAll p where p.id in :ids and p.status=200 and nvl(p.end,0)=0")
|
|
|
List<Long> findNotReplyId(@Param("ids") List<Long> ids);
|
|
|
}
|