|
|
@@ -105,4 +105,80 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
|
|
|
"group by h.id</script>")
|
|
|
public List<HashMap<String,Object>> roomPageList(Page<HashMap<String,Object>> page, @Param("busRoomPayTypes") List<BusRoomPayType> busRoomPayTypes, @Param("hotelId") String hotelId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 收退款明细列表
|
|
|
+ * @param page
|
|
|
+ * @param hotelId
|
|
|
+ * @param startTime
|
|
|
+ * @param endTime
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Select("<script>select 'POS' as department,pty.name as payment_method_name,'收款' as fee_type,ogp.order_id,'--' as contact_name,'--' as room_name,ogp.pay_money\n" +
|
|
|
+ ",ogp.create_time\n" +
|
|
|
+ "from pos_order_goods_payment ogp \n" +
|
|
|
+ "left join bus_room_pay_type_info pty on pty.id=ogp.payment_method\n" +
|
|
|
+ "where 1=1" +
|
|
|
+ "<if test='hotelId != null and hotelId !=\"\"'> and ogp.hotel_id = #{hotelId} </if>"+
|
|
|
+ "<if test='startTime != null'> and ogp.create_time >= #{startTime} </if>"+
|
|
|
+ "<if test='endTime != null'> and ogp.create_time <= #{endTime} </if>"+
|
|
|
+ "UNION ALL\n" +
|
|
|
+ "select '住客' as department,pty.name as payment_method_name,\n" +
|
|
|
+ "case when of.money>=0 then '收款' else '退款' end as fee_type,\n" +
|
|
|
+ "of.living_order_id as order_id,c.name as contact_name,r.name as room_name,of.money as pay_money,of.create_time\n" +
|
|
|
+ "from bus_order_fee of \n" +
|
|
|
+ "left join bus_room_pay_type_info pty on pty.id=of.pay_type\n" +
|
|
|
+ "left join bus_rooms_living_order rlo on rlo.id= of.living_order_id\n" +
|
|
|
+ "left join ces_rooms r on r.id=of.room_id\n" +
|
|
|
+ "left join bus_customer c on c.id=rlo.contact_id\n" +
|
|
|
+ "where of.fee_type=2 and of.preferential_status=2" +
|
|
|
+ "<if test='hotelId != null and hotelId !=\"\"'> and pty.hotel_id = #{hotelId} </if>"+
|
|
|
+ "<if test='startTime != null'> and of.create_time >= #{startTime} </if>"+
|
|
|
+ "<if test='endTime != null'> and of.create_time <= #{endTime} </if>"+
|
|
|
+ "</script>")
|
|
|
+ public List<HashMap<String,Object>> financePage(Page<HashMap<String,Object>> page, @Param("hotelId") String hotelId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * POS收退款明细列表
|
|
|
+ * @param page
|
|
|
+ * @param hotelId
|
|
|
+ * @param startTime
|
|
|
+ * @param endTime
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Select("<script>select 'POS' as department,pty.name as payment_method_name,'收款' as fee_type,ogp.order_id,'--' as contact_name,'--' as room_name,ogp.pay_money\n" +
|
|
|
+ ",ogp.create_time\n" +
|
|
|
+ "from pos_order_goods_payment ogp \n" +
|
|
|
+ "left join bus_room_pay_type_info pty on pty.id=ogp.payment_method\n" +
|
|
|
+ "where 1=1" +
|
|
|
+ "<if test='hotelId != null and hotelId !=\"\"'> and ogp.hotel_id = #{hotelId} </if>"+
|
|
|
+ "<if test='startTime != null'> and ogp.create_time >= #{startTime} </if>"+
|
|
|
+ "<if test='endTime != null'> and ogp.create_time <= #{endTime} </if>"+
|
|
|
+ "</script>")
|
|
|
+ public List<HashMap<String,Object>> postFinancePage(Page<HashMap<String,Object>> page, @Param("hotelId") String hotelId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 住客收退款明细列表
|
|
|
+ * @param page
|
|
|
+ * @param hotelId
|
|
|
+ * @param startTime
|
|
|
+ * @param endTime
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Select("<script>select '住客' as department,pty.name as payment_method_name,\n" +
|
|
|
+ "case when of.money>=0 then '收款' else '退款' end as fee_type,\n" +
|
|
|
+ "of.living_order_id as order_id,c.name as contact_name,r.name as room_name,of.money as pay_money,of.create_time\n" +
|
|
|
+ "from bus_order_fee of \n" +
|
|
|
+ "left join bus_room_pay_type_info pty on pty.id=of.pay_type\n" +
|
|
|
+ "left join bus_rooms_living_order rlo on rlo.id= of.living_order_id\n" +
|
|
|
+ "left join ces_rooms r on r.id=of.room_id\n" +
|
|
|
+ "left join bus_customer c on c.id=rlo.contact_id\n" +
|
|
|
+ "where of.fee_type=2 and of.preferential_status=2" +
|
|
|
+ "<if test='hotelId != null and hotelId !=\"\"'> and pty.hotel_id = #{hotelId} </if>"+
|
|
|
+ "<if test='startTime != null'> and of.create_time >= #{startTime} </if>"+
|
|
|
+ "<if test='endTime != null'> and of.create_time <= #{endTime} </if>"+
|
|
|
+ "</script>")
|
|
|
+ public List<HashMap<String,Object>> roomFinancePage(Page<HashMap<String,Object>> page, @Param("hotelId") String hotelId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
|
|
|
+
|
|
|
}
|