Commit ddc5f75f by chongli

退款中的订单不能开票

parent 20086e65
......@@ -297,8 +297,10 @@ public class OrderDao extends GenericHibernateDao<Order, Integer> {
}
public PagedEntityBean<OrderListBean> queryCanInvoiceOrder(OrderQuery orderQuery) throws Exception{
PagedEntityBean<OrderListBean> pagedEntityBean = new PagedEntityBean<OrderListBean>();
String sql = "SELECT SQL_CALC_FOUND_ROWS od.voucherAmount,od.prePayCardAmount,od.invoiceAmount,od.insuranceAmount,od.prePayAmount,od.refundAmount,od.orderId,od.orderId,od.OrderType,od.OrderNo,od.orderName,od.Uid,od.orderDate from ord_order od WHERE 1 = 1 AND od.uid=:uid AND od.orderDate >=:DecOfPreviousYear AND od.processStatus&16785488 = 16 AND od.OrderCategory not in (11,12) AND od.invoiceId is null AND od.canInvoiceDate<CURRENT_TIMESTAMP AND od.PrePayAmount+od.invoiceAmount-od.VoucherAmount-od.PrePayCardAmount-od.RefundAmount>0";
//16785744
int allMatchStatus = OrderStatusBitEnum.DEDUCTED.getValue() + OrderStatusBitEnum.CANCELED.getValue() + OrderStatusBitEnum.REFUNDING.getValue() + OrderStatusBitEnum.ALL_UNSUBSCRIBED.getValue() + OrderStatusBitEnum.CONFIRM_INVOICE.getValue();
PagedEntityBean<OrderListBean> pagedEntityBean = new PagedEntityBean<OrderListBean>();
String sql = "SELECT SQL_CALC_FOUND_ROWS od.voucherAmount,od.prePayCardAmount,od.invoiceAmount,od.insuranceAmount,od.prePayAmount,od.refundAmount,od.orderId,od.orderId,od.OrderType,od.OrderNo,od.orderName,od.Uid,od.orderDate from ord_order od WHERE 1 = 1 AND od.uid=:uid AND od.orderDate >=:DecOfPreviousYear AND od.processStatus&"+allMatchStatus+" = 16 AND od.OrderCategory not in (11,12) AND od.invoiceId is null AND od.canInvoiceDate<CURRENT_TIMESTAMP AND od.PrePayAmount+od.invoiceAmount-od.VoucherAmount-od.PrePayCardAmount-od.RefundAmount>0";
Session session = this.getSession();
Query query = session.createSQLQuery(sql);
query.setParameter("uid", orderQuery.getUid());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment