BillInvoiceMapper.java 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package com.huiju.estateagents.property.dao;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.baomidou.mybatisplus.core.metadata.IPage;
  4. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  5. import com.huiju.estateagents.center.taUser.entity.TaUser;
  6. import com.huiju.estateagents.property.model.BillInvoice;
  7. import com.huiju.estateagents.property.model.TpBillOrder;
  8. import org.apache.ibatis.annotations.*;
  9. import java.util.List;
  10. import java.util.Map;
  11. /**
  12. * <p>
  13. * 缴费单 Mapper 接口
  14. * </p>
  15. *
  16. * @author weiximei
  17. * @since 2019-02-13
  18. */
  19. @Mapper
  20. public interface BillInvoiceMapper extends BaseMapper<BillInvoice> {
  21. /**
  22. * 查询有效的缴费单
  23. * @param page
  24. * @param map
  25. * @return
  26. */
  27. IPage<BillInvoice> selectBillInvoice(Page page, @Param("map") Map<String, Object> map);
  28. /**
  29. * 查询作废的缴费单
  30. * 前台批量添加的缴费单, 默认是 作废
  31. * @param map
  32. * @return
  33. */
  34. List<BillInvoice> selectBillInvoiceTemp(@Param("map") Map<String, Object> map);
  35. /**
  36. * 查询有效的缴费单
  37. * @param page
  38. * @return
  39. */
  40. IPage<BillInvoice> selectBillInvoiceEffective(Page page, @Param("map") Map<String, Object> map);
  41. List<Map<String, Object>> getPriceCount();
  42. /**
  43. * 分页获取缴费和未缴费的数据
  44. * @param orgId
  45. * @param roomNoId 房间id
  46. * @param payType
  47. * @return
  48. */
  49. IPage<Map<String, Object>> getBillsList(IPage<Map<String, Object>> pg, @Param("orgId") Integer orgId, @Param("roomNoId") Integer roomNoId, @Param("payType") Integer payType);
  50. /**
  51. * 获取账单的详细信息
  52. * @param billInvoiceId
  53. * @return
  54. */
  55. Map<String, Object> getBillInvoiceDetail(@Param("orgId") Integer orgId,@Param("billInvoiceId") Integer billInvoiceId);
  56. /**
  57. * 获取需要支付的金额
  58. * @param billInvoiceId
  59. * @param buildingOwnerInfoId
  60. * @param communityId
  61. * @return
  62. */
  63. BillInvoice selectByIdAndroomNoId(@Param("id") Integer billInvoiceId,@Param("roomNoId") Integer buildingOwnerInfoId,@Param("communityId") Integer communityId);
  64. BillInvoice selectByOutTradeNo(@Param("outTradeNo") String outTradeNo);
  65. List<BillInvoice> selectByBuildingOwnerInfoId(@Param("buildingOwnerInfoId") Integer buildingOwnerInfoId);
  66. int updateBeach(Map<String, Object> map);
  67. /**
  68. * 根据 id 查询缴费单
  69. * @param billId
  70. * @return
  71. */
  72. @ResultType(BillInvoice.class)
  73. @Select("select " +
  74. "t.* ," +
  75. "b.bill_name as billName " +
  76. "from " +
  77. "tp_bill_invoice t " +
  78. "LEFT JOIN tp_bill b ON t.bill_id = b.id " +
  79. "where t.id = #{billId}")
  80. BillInvoice selectByIdBillInvoiceInfo(Integer billId);
  81. }