charge.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. package impl
  2. import (
  3. "context"
  4. "property-garden/impl/v1/charge"
  5. "property-garden/impl/v1/charge_power_record"
  6. "property-garden/impl/v1/property_package"
  7. pb_v1 "property-garden/pb/v1"
  8. "git.getensh.com/common/gopkgs/tasker/rpctasker"
  9. "property-garden/impl/v1/charge_conf"
  10. )
  11. // 新增费用配置
  12. func (c *Rcvr) ChargeConfAdd(ctx context.Context, req *pb_v1.ChargeConfAddRequest) (reply *pb_v1.ChargeConfAddReply, err error) {
  13. t1 := func() error {
  14. reply, err = charge_conf.ChargeConfAdd(ctx, req)
  15. return err
  16. }
  17. return reply, rpctasker.Exec(ctx, t1)
  18. }
  19. // 费用配置列表
  20. func (c *Rcvr) ChargeConfList(ctx context.Context, req *pb_v1.ChargeConfListRequest) (reply *pb_v1.ChargeConfListReply, err error) {
  21. t1 := func() error {
  22. reply, err = charge_conf.ChargeConfList(ctx, req)
  23. return err
  24. }
  25. return reply, rpctasker.Exec(ctx, t1)
  26. }
  27. // 修改费用配置
  28. func (c *Rcvr) ChargeConfUpdate(ctx context.Context, req *pb_v1.ChargeConfUpdateRequest) (reply *pb_v1.ChargeConfUpdateReply, err error) {
  29. t1 := func() error {
  30. reply, err = charge_conf.ChargeConfUpdate(ctx, req)
  31. return err
  32. }
  33. return reply, rpctasker.Exec(ctx, t1)
  34. }
  35. // 删除费用配置
  36. func (c *Rcvr) ChargeConfDel(ctx context.Context, req *pb_v1.ChargeConfDelRequest) (reply *pb_v1.ChargeConfDelReply, err error) {
  37. t1 := func() error {
  38. reply, err = charge_conf.ChargeConfDel(ctx, req)
  39. return err
  40. }
  41. return reply, rpctasker.Exec(ctx, t1)
  42. }
  43. // 费用绑定对象
  44. func (c *Rcvr) ChargeBind(ctx context.Context, req *pb_v1.ChargeBindRequest) (reply *pb_v1.ChargeBindReply, err error) {
  45. t1 := func() error {
  46. reply, err = charge.ChargeBind(ctx, req)
  47. return err
  48. }
  49. return reply, rpctasker.Exec(ctx, t1)
  50. }
  51. // 费用解绑对象
  52. func (c *Rcvr) ChargeUnbind(ctx context.Context, req *pb_v1.ChargeUnbindRequest) (reply *pb_v1.ChargeUnbindReply, err error) {
  53. t1 := func() error {
  54. reply, err = charge.ChargeUnbind(ctx, req)
  55. return err
  56. }
  57. return reply, rpctasker.Exec(ctx, t1)
  58. }
  59. // 绑定了项目的房屋列表
  60. func (c *Rcvr) ChargeHouseBindedList(ctx context.Context, req *pb_v1.ChargeHouseBindedListRequest) (reply *pb_v1.ChargeHouseBindedListReply, err error) {
  61. t1 := func() error {
  62. reply, err = charge.ChargeHouseBindedList(ctx, req)
  63. return err
  64. }
  65. return reply, rpctasker.Exec(ctx, t1)
  66. }
  67. // 可以绑定某项目的房屋列表
  68. func (c *Rcvr) ChargeHouseNotBindList(ctx context.Context, req *pb_v1.ChargeHouseNotBindListRequest) (reply *pb_v1.ChargeHouseNotBindListReply, err error) {
  69. t1 := func() error {
  70. reply, err = charge.ChargeHouseNotBindList(ctx, req)
  71. return err
  72. }
  73. return reply, rpctasker.Exec(ctx, t1)
  74. }
  75. // 绑定了某项目的车位列表
  76. func (c *Rcvr) ChargeSpaceBindedList(ctx context.Context, req *pb_v1.ChargeSpaceBindedListRequest) (reply *pb_v1.ChargeSpaceBindedListReply, err error) {
  77. t1 := func() error {
  78. reply, err = charge.ChargeSpaceBindedList(ctx, req)
  79. return err
  80. }
  81. return reply, rpctasker.Exec(ctx, t1)
  82. }
  83. // 可以绑定某项目的车位列表
  84. func (c *Rcvr) ChargeSpaceNotBindList(ctx context.Context, req *pb_v1.ChargeSpaceNotBindListRequest) (reply *pb_v1.ChargeSpaceNotBindListReply, err error) {
  85. t1 := func() error {
  86. reply, err = charge.ChargeSpaceNotBindList(ctx, req)
  87. return err
  88. }
  89. return reply, rpctasker.Exec(ctx, t1)
  90. }
  91. // 绑定了某项目的车辆列表
  92. func (c *Rcvr) ChargeVehicleBindedList(ctx context.Context, req *pb_v1.ChargeVehicleBindedListRequest) (reply *pb_v1.ChargeVehicleBindedListReply, err error) {
  93. t1 := func() error {
  94. reply, err = charge.ChargeVehicleBindedList(ctx, req)
  95. return err
  96. }
  97. return reply, rpctasker.Exec(ctx, t1)
  98. }
  99. // 可以绑定某项目的车辆列表
  100. func (c *Rcvr) ChargeVehicleNotBindList(ctx context.Context, req *pb_v1.ChargeVehicleNotBindListRequest) (reply *pb_v1.ChargeVehicleNotBindListReply, err error) {
  101. t1 := func() error {
  102. reply, err = charge.ChargeVehicleNotBindList(ctx, req)
  103. return err
  104. }
  105. return reply, rpctasker.Exec(ctx, t1)
  106. }
  107. // 房屋收费 房屋列表
  108. func (c *Rcvr) ChargeHouseGroup(ctx context.Context, req *pb_v1.ChargeHouseGroupRequest) (reply *pb_v1.ChargeHouseGroupReply, err error) {
  109. t1 := func() error {
  110. reply, err = charge.ChargeHouseGroup(ctx, req)
  111. return err
  112. }
  113. return reply, rpctasker.Exec(ctx, t1)
  114. }
  115. // 车位收费 车位列表
  116. func (c *Rcvr) ChargeSpaceGroup(ctx context.Context, req *pb_v1.ChargeSpaceGroupRequest) (reply *pb_v1.ChargeSpaceGroupReply, err error) {
  117. t1 := func() error {
  118. reply, err = charge.ChargeSpaceGroup(ctx, req)
  119. return err
  120. }
  121. return reply, rpctasker.Exec(ctx, t1)
  122. }
  123. // 车辆收费 车辆列表
  124. func (c *Rcvr) ChargeVehicleGroup(ctx context.Context, req *pb_v1.ChargeVehicleGroupRequest) (reply *pb_v1.ChargeVehicleGroupReply, err error) {
  125. t1 := func() error {
  126. reply, err = charge.ChargeVehicleGroup(ctx, req)
  127. return err
  128. }
  129. return reply, rpctasker.Exec(ctx, t1)
  130. }
  131. // 手动生成账单 一次型费用和车辆收费不能手动生成
  132. func (c *Rcvr) ChargeGenerateBill(ctx context.Context, req *pb_v1.ChargeGenerateBillRequest) (reply *pb_v1.ChargeGenerateBillReply, err error) {
  133. t1 := func() error {
  134. reply, err = charge.ChargeGenerateBill(ctx, req)
  135. return err
  136. }
  137. return reply, rpctasker.Exec(ctx, t1)
  138. }
  139. // 欠费线下缴费
  140. func (c *Rcvr) ChargeBillPay(ctx context.Context, req *pb_v1.ChargeBillPayRequest) (reply *pb_v1.ChargeBillPayReply, err error) {
  141. t1 := func() error {
  142. reply, err = charge.ChargeBillPay(ctx, req)
  143. return err
  144. }
  145. return reply, rpctasker.Exec(ctx, t1)
  146. }
  147. // 欠费线上缴费
  148. func (c *Rcvr) ChargeBillPayByHousehold(ctx context.Context, req *pb_v1.ChargeBillPayByHouseholdRequest) (reply *pb_v1.ChargeBillPayByHouseholdReply, err error) {
  149. t1 := func() error {
  150. reply, err = charge.ChargeBillPayByHousehold(ctx, req)
  151. return err
  152. }
  153. return reply, rpctasker.Exec(ctx, t1)
  154. }
  155. // 欠费缴费欠费列表
  156. func (c *Rcvr) ChargeUnpayList(ctx context.Context, req *pb_v1.ChargeUnpayListRequest) (reply *pb_v1.ChargeUnpayListReply, err error) {
  157. t1 := func() error {
  158. reply, err = charge.ChargeUnpayList(ctx, req)
  159. return err
  160. }
  161. return reply, rpctasker.Exec(ctx, t1)
  162. }
  163. // 查看费用,费项列表
  164. func (c *Rcvr) ChargeList(ctx context.Context, req *pb_v1.ChargeListRequest) (reply *pb_v1.ChargeListReply, err error) {
  165. t1 := func() error {
  166. reply, err = charge.ChargeList(ctx, req)
  167. return err
  168. }
  169. return reply, rpctasker.Exec(ctx, t1)
  170. }
  171. // 对象的某费项下的待缴账单列表
  172. func (c *Rcvr) ChargeBillList(ctx context.Context, req *pb_v1.ChargeBillListRequest) (reply *pb_v1.ChargeBillListReply, err error) {
  173. t1 := func() error {
  174. reply, err = charge.ChargeBillList(ctx, req)
  175. return err
  176. }
  177. return reply, rpctasker.Exec(ctx, t1)
  178. }
  179. // 应收账单中的对象列表
  180. func (c *Rcvr) ChargeBillObjList(ctx context.Context, req *pb_v1.ChargeBillObjListRequest) (reply *pb_v1.ChargeBillObjListReply, err error) {
  181. t1 := func() error {
  182. reply, err = charge.ChargeBillObjList(ctx, req)
  183. return err
  184. }
  185. return reply, rpctasker.Exec(ctx, t1)
  186. }
  187. // 应收账单中某对象的账单明细
  188. func (c *Rcvr) ChargeObjBillList(ctx context.Context, req *pb_v1.ChargeObjBillListRequest) (reply *pb_v1.ChargeObjBillListReply, err error) {
  189. t1 := func() error {
  190. reply, err = charge.ChargeObjBillList(ctx, req)
  191. return err
  192. }
  193. return reply, rpctasker.Exec(ctx, t1)
  194. }
  195. // 变更时间
  196. func (c *Rcvr) ChargeTimeSet(ctx context.Context, req *pb_v1.ChargeTimeSetRequest) (reply *pb_v1.ChargeTimeSetReply, err error) {
  197. t1 := func() error {
  198. reply, err = charge.ChargeTimeSet(ctx, req)
  199. return err
  200. }
  201. return reply, rpctasker.Exec(ctx, t1)
  202. }
  203. // 小票和收据信息
  204. func (c *Rcvr) ChargeOrderTicket(ctx context.Context, req *pb_v1.ChargeOrderTicketRequest) (reply *pb_v1.ChargeOrderTicketReply, err error) {
  205. t1 := func() error {
  206. reply, err = charge.ChargeOrderTicket(ctx, req)
  207. return err
  208. }
  209. return reply, rpctasker.Exec(ctx, t1)
  210. }
  211. // 预缴物业费或车位费前获取对应的金额信息
  212. func (c *Rcvr) ChargePrePayInfo(ctx context.Context, req *pb_v1.ChargePrePayInfoRequest) (reply *pb_v1.ChargePrePayInfoReply, err error) {
  213. t1 := func() error {
  214. reply, err = charge.ChargePrePayInfo(ctx, req)
  215. return err
  216. }
  217. return reply, rpctasker.Exec(ctx, t1)
  218. }
  219. // 线下预缴物业费或车位费
  220. func (c *Rcvr) ChargePrePay(ctx context.Context, req *pb_v1.ChargePrePayRequest) (reply *pb_v1.ChargePrePayReply, err error) {
  221. t1 := func() error {
  222. reply, err = charge.ChargePrePay(ctx, req)
  223. return err
  224. }
  225. return reply, rpctasker.Exec(ctx, t1)
  226. }
  227. // 线上预缴
  228. func (c *Rcvr) ChargePrePayByHousehold(ctx context.Context, req *pb_v1.ChargePrePayByHouseholdRequest) (reply *pb_v1.ChargePrePayByHouseholdReply, err error) {
  229. t1 := func() error {
  230. reply, err = charge.ChargePrePayByHousehold(ctx, req)
  231. return err
  232. }
  233. return reply, rpctasker.Exec(ctx, t1)
  234. }
  235. // 已交账单
  236. func (c *Rcvr) ChargePayedBillList(ctx context.Context, req *pb_v1.ChargePayedBillListRequest) (reply *pb_v1.ChargePayedBillListReply, err error) {
  237. t1 := func() error {
  238. reply, err = charge.ChargePayedBillList(ctx, req)
  239. return err
  240. }
  241. return reply, rpctasker.Exec(ctx, t1)
  242. }
  243. // 作废账单
  244. func (c *Rcvr) ChargeDelBill(ctx context.Context, req *pb_v1.ChargeDelBillRequest) (reply *pb_v1.ChargeDelBillReply, err error) {
  245. t1 := func() error {
  246. reply, err = charge.ChargeDelBill(ctx, req)
  247. return err
  248. }
  249. return reply, rpctasker.Exec(ctx, t1)
  250. }
  251. // 恢复账单
  252. func (c *Rcvr) ChargeRecoverBill(ctx context.Context, req *pb_v1.ChargeRecoverBillRequest) (reply *pb_v1.ChargeRecoverBillReply, err error) {
  253. t1 := func() error {
  254. reply, err = charge.ChargeRecoverBill(ctx, req)
  255. return err
  256. }
  257. return reply, rpctasker.Exec(ctx, t1)
  258. }
  259. // 作废账单列表
  260. func (c *Rcvr) ChargeDelBillList(ctx context.Context, req *pb_v1.ChargeDelBillListRequest) (reply *pb_v1.ChargeDelBillListReply, err error) {
  261. t1 := func() error {
  262. reply, err = charge.ChargeDelBillList(ctx, req)
  263. return err
  264. }
  265. return reply, rpctasker.Exec(ctx, t1)
  266. }
  267. // 缴费订单列表
  268. func (c *Rcvr) ChargeOrderList(ctx context.Context, req *pb_v1.ChargeOrderListRequest) (reply *pb_v1.ChargeOrderListReply, err error) {
  269. t1 := func() error {
  270. reply, err = charge.ChargeOrderList(ctx, req)
  271. return err
  272. }
  273. return reply, rpctasker.Exec(ctx, t1)
  274. }
  275. // 缴费订单详情
  276. func (c *Rcvr) ChargeOrderInfo(ctx context.Context, req *pb_v1.ChargeOrderInfoRequest) (reply *pb_v1.ChargeOrderInfoReply, err error) {
  277. t1 := func() error {
  278. reply, err = charge.ChargeOrderInfo(ctx, req)
  279. return err
  280. }
  281. return reply, rpctasker.Exec(ctx, t1)
  282. }
  283. func (c *Rcvr) ChargeOrderPay(ctx context.Context, req *pb_v1.ChargeOrderPayRequest) (reply *pb_v1.ChargeOrderPayReply, err error) {
  284. t1 := func() error {
  285. reply, err = charge.ChargeOrderPay(ctx, req)
  286. return err
  287. }
  288. return reply, rpctasker.Exec(ctx, t1)
  289. }
  290. func (c *Rcvr) ChargeOrderCancel(ctx context.Context, req *pb_v1.ChargeOrderCancelRequest) (reply *pb_v1.ChargeOrderCancelReply, err error) {
  291. t1 := func() error {
  292. reply, err = charge.ChargeOrderCancel(ctx, req)
  293. return err
  294. }
  295. return reply, rpctasker.Exec(ctx, t1)
  296. }
  297. // 添加抄表记录
  298. func (c *Rcvr) PowerRecordAdd(ctx context.Context, req *pb_v1.PowerRecordAddRequest) (reply *pb_v1.PowerRecordAddReply, err error) {
  299. t1 := func() error {
  300. reply, err = charge_power_record.PowerRecordAdd(ctx, req)
  301. return err
  302. }
  303. return reply, rpctasker.Exec(ctx, t1)
  304. }
  305. // 批量添加
  306. func (c *Rcvr) PowerRecordBatchAdd(ctx context.Context, req *pb_v1.PowerRecordBatchAddRequest) (reply *pb_v1.PowerRecordBatchAddReply, err error) {
  307. t1 := func() error {
  308. reply, err = charge_power_record.PowerRecordBatchAdd(ctx, req)
  309. return err
  310. }
  311. return reply, rpctasker.Exec(ctx, t1)
  312. }
  313. // 删除抄表记录
  314. func (c *Rcvr) PowerRecordDel(ctx context.Context, req *pb_v1.PowerRecordDelRequest) (reply *pb_v1.PowerRecordDelReply, err error) {
  315. t1 := func() error {
  316. reply, err = charge_power_record.PowerRecordDel(ctx, req)
  317. return err
  318. }
  319. return reply, rpctasker.Exec(ctx, t1)
  320. }
  321. // 抄表记录列表
  322. func (c *Rcvr) PowerRecordList(ctx context.Context, req *pb_v1.PowerRecordListRequest) (reply *pb_v1.PowerRecordListReply, err error) {
  323. t1 := func() error {
  324. reply, err = charge_power_record.PowerRecordList(ctx, req)
  325. return err
  326. }
  327. return reply, rpctasker.Exec(ctx, t1)
  328. }
  329. // 新增物业费套餐
  330. func (c *Rcvr) PropertyPackageAdd(ctx context.Context, req *pb_v1.PropertyPackageAddRequest) (reply *pb_v1.PropertyPackageAddReply, err error) {
  331. t1 := func() error {
  332. reply, err = property_package.PropertyPackageAdd(ctx, req)
  333. return err
  334. }
  335. return reply, rpctasker.Exec(ctx, t1)
  336. }
  337. // 物业费套餐列表
  338. func (c *Rcvr) PropertyPackageList(ctx context.Context, req *pb_v1.PropertyPackageListRequest) (reply *pb_v1.PropertyPackageListReply, err error) {
  339. t1 := func() error {
  340. reply, err = property_package.PropertyPackageList(ctx, req)
  341. return err
  342. }
  343. return reply, rpctasker.Exec(ctx, t1)
  344. }
  345. // 修改物业费套餐
  346. func (c *Rcvr) PropertyPackageUpdate(ctx context.Context, req *pb_v1.PropertyPackageUpdateRequest) (reply *pb_v1.PropertyPackageUpdateReply, err error) {
  347. t1 := func() error {
  348. reply, err = property_package.PropertyPackageUpdate(ctx, req)
  349. return err
  350. }
  351. return reply, rpctasker.Exec(ctx, t1)
  352. }
  353. // 删除物业费套餐
  354. func (c *Rcvr) PropertyPackageDel(ctx context.Context, req *pb_v1.PropertyPackageDelRequest) (reply *pb_v1.PropertyPackageDelReply, err error) {
  355. t1 := func() error {
  356. reply, err = property_package.PropertyPackageDel(ctx, req)
  357. return err
  358. }
  359. return reply, rpctasker.Exec(ctx, t1)
  360. }
  361. // 变更催缴设置
  362. func (c *Rcvr) ChargeUrgeSet(ctx context.Context, req *pb_v1.ChargeUrgeSetRequest) (reply *pb_v1.ChargeUrgeSetReply, err error) {
  363. t1 := func() error {
  364. reply, err = charge.ChargeUrgeSet(ctx, req)
  365. return err
  366. }
  367. return reply, rpctasker.Exec(ctx, t1)
  368. }
  369. func (c *Rcvr) ChargeUrgeInfo(ctx context.Context, req *pb_v1.ChargeUrgeInfoRequest) (reply *pb_v1.ChargeUrgeInfoReply, err error) {
  370. t1 := func() error {
  371. reply, err = charge.ChargeUrgeInfo(ctx, req)
  372. return err
  373. }
  374. return reply, rpctasker.Exec(ctx, t1)
  375. }
  376. func (c *Rcvr) ChargeUrge(ctx context.Context, req *pb_v1.ChargeUrgeRequest) (reply *pb_v1.ChargeUrgeReply, err error) {
  377. t1 := func() error {
  378. reply, err = charge.ChargeUrge(ctx, req)
  379. return err
  380. }
  381. return reply, rpctasker.Exec(ctx, t1)
  382. }
  383. // 小程序预存物业费,车位费或停车费前获取月数和赠送信息
  384. func (c *Rcvr) ChargeMonthInfo(ctx context.Context, req *pb_v1.ChargeMonthInfoRequest) (reply *pb_v1.ChargeMonthInfoReply, err error) {
  385. t1 := func() error {
  386. reply, err = charge.ChargeMonthInfo(ctx, req)
  387. return err
  388. }
  389. return reply, rpctasker.Exec(ctx, t1)
  390. }