qryReport.go 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /**
  2. * @Author: zou.yingbin
  3. * @Create : 2021/2/4 11:27
  4. * @Modify : 2021/2/4 11:27
  5. */
  6. package ermcp
  7. import (
  8. "github.com/gin-gonic/gin"
  9. "mtp2_if/global/app"
  10. "mtp2_if/models"
  11. )
  12. // 财务日报表请求
  13. type QryReportDayReq struct {
  14. UserId int64 `form:"userid" binding:"required"` //用户ID
  15. TradeDate string `form:"tradedate" binding:"required"` // 交易日
  16. }
  17. type QryReportFinanceDayRsp models.ErmcpReportDayFR
  18. // @Summary 查询财务日报表(菜单:报表查询/财务报表/日报表)
  19. // @Produce json
  20. // @Security ApiKeyAuth
  21. // @Param userid query int true "用户ID"
  22. // @Param tradedate query string true "交易日(格式:yyyyMMdd)"
  23. // @Success 200 {array} QryReportFinanceDayRsp
  24. // @Failure 500 {object} app.Response
  25. // @Router /Ermcp/QryReportDayFinance [get]
  26. // @Tags 企业风险管理(app)
  27. func QryReportDayFinance(c *gin.Context) {
  28. a := app.GinUtils{Gin: app.Gin{C: c}}
  29. req := QryReportDayReq{}
  30. a.DoBindReq(&req)
  31. m := models.ErmcpReportDayFR{AREAUSERID: req.UserId, RECKONDATE: req.TradeDate}
  32. a.DoGetDataEx(&m)
  33. }
  34. // 财务日报表款项明细
  35. type QryReportFinanceKxRsp models.ErmcpReportOPLog
  36. // @Summary 查询财务日报表款项(菜单:报表查询/财务报表/日报表/款项)
  37. // @Produce json
  38. // @Security ApiKeyAuth
  39. // @Param userid query int true "用户ID"
  40. // @Param tradedate query string true "交易日(格式:yyyyMMdd)"
  41. // @Success 200 {array} QryReportFinanceKxRsp
  42. // @Failure 500 {object} app.Response
  43. // @Router /Ermcp/QryReportDayFinanceKx [get]
  44. // @Tags 企业风险管理(app)
  45. func QryReportDayFinanceKx(c *gin.Context) {
  46. a := app.GinUtils{Gin: app.Gin{C: c}}
  47. req := QryReportDayReq{}
  48. a.DoBindReq(&req)
  49. m := models.ErmcpReportDayFRKx{USERID: req.UserId, TRADEDATE: req.TradeDate}
  50. a.DoGetDataEx(&m)
  51. }
  52. // 财务日报表发票明细
  53. type QryReportFinanceFpRsp models.ErmcpReportOPLog
  54. // @Summary 查询财务日报表发票(菜单:报表查询/财务报表/日报表/发票)
  55. // @Produce json
  56. // @Security ApiKeyAuth
  57. // @Param userid query int true "用户ID"
  58. // @Param tradedate query string true "交易日(格式:yyyyMMdd)"
  59. // @Success 200 {array} QryReportFinanceKxRsp
  60. // @Failure 500 {object} app.Response
  61. // @Router /Ermcp/QryReportDayFinanceFp [get]
  62. // @Tags 企业风险管理(app)
  63. func QryReportDayFinanceFp(c *gin.Context) {
  64. a := app.GinUtils{Gin: app.Gin{C: c}}
  65. req := QryReportDayReq{}
  66. a.DoBindReq(&req)
  67. m := models.ErmcpReportOPLog{USERID: req.UserId, TRADEDATE: req.TradeDate, LogTypeFilter: "11, 12"}
  68. a.DoGetDataEx(&m)
  69. }
  70. // 财务月报表请求
  71. type QryReportMonthReq struct {
  72. UserId int64 `form:"userid" binding:"required"` //用户ID
  73. CycleTime string `form:"cycletime" binding:"required"` // 周期时间:月(格式:yyyyMM)
  74. }
  75. type QryReportFinanceMonRsp models.ErmcpReportMonthFR
  76. // @Summary 查询财务月报表(菜单:报表查询/财务报表/月报表)
  77. // @Produce json
  78. // @Security ApiKeyAuth
  79. // @Param userid query int true "用户ID"
  80. // @Param cycletime query string true "交易日(格式:yyyyMMdd)"
  81. // @Success 200 {array} QryReportFinanceMonRsp
  82. // @Failure 500 {object} app.Response
  83. // @Router /Ermcp/QryReportMonthFinance [get]
  84. // @Tags 企业风险管理(app)
  85. func QryReportMonthFinance(c *gin.Context) {
  86. a := app.GinUtils{Gin: app.Gin{C: c}}
  87. req := QryReportMonthReq{}
  88. a.DoBindReq(&req)
  89. m := models.ErmcpReportMonthFR{AREAUSERID: req.UserId, CYCLETIME: req.CycleTime}
  90. a.DoGetDataEx(&m)
  91. }
  92. // 敞口日报表
  93. type QryReportExposureDayRsp models.ErmcpReportDayExposure
  94. // @Summary 查询敞口日报表(菜单:报表查询/敞口报表/敞口日报表)
  95. // @Produce json
  96. // @Security ApiKeyAuth
  97. // @Param userid query int true "用户ID"
  98. // @Param tradedate query string true "交易日(格式:yyyyMMdd)"
  99. // @Success 200 {array} QryReportExposureDayRsp
  100. // @Failure 500 {object} app.Response
  101. // @Router /Ermcp/QryReportDayExposure [get]
  102. // @Tags 企业风险管理(app)
  103. func QryReportDayExposure(c *gin.Context) {
  104. a := app.GinUtils{Gin: app.Gin{C: c}}
  105. req := QryReportDayReq{}
  106. a.DoBindReq(&req)
  107. m := models.ErmcpReportDayExposure{AREAUSERID: req.UserId, RECKONDATE: req.TradeDate}
  108. a.DoGetDataEx(&m)
  109. }