|
@@ -6,6 +6,7 @@ import (
|
|
|
"server/global"
|
|
|
"server/model/common/request"
|
|
|
"server/model/common/response"
|
|
|
+ "strconv"
|
|
|
)
|
|
|
|
|
|
type ExpensesApi struct{}
|
|
@@ -89,7 +90,8 @@ func (ea *ExpensesApi) QuerySurplus(c *gin.Context) {
|
|
|
func (ea *ExpensesApi) QueryProjectMonthFee(c *gin.Context) {
|
|
|
monthTime := c.Query("monthTime")
|
|
|
yearTime := c.Query("yearTime")
|
|
|
- fee, err := expensesService.QueryProjectMonthFee(monthTime, yearTime)
|
|
|
+ code := c.Query("code")
|
|
|
+ fee, err := expensesService.QueryProjectMonthFee(monthTime, yearTime, code)
|
|
|
if err != nil {
|
|
|
response.FailWithMessage("失败", c)
|
|
|
global.GVA_LOG.Error("QueryProjectMonthFee ====== " + err.Error())
|
|
@@ -101,7 +103,9 @@ func (ea *ExpensesApi) QueryProjectMonthFee(c *gin.Context) {
|
|
|
func (ea *ExpensesApi) QueryMonthExpenses(c *gin.Context) {
|
|
|
monthTime := c.Query("monthTime")
|
|
|
yearTime := c.Query("yearTime")
|
|
|
- fee, err := expensesService.QueryMonthExpenses(monthTime, yearTime)
|
|
|
+ genre := c.Query("genre")
|
|
|
+ genreId, _ := strconv.Atoi(genre)
|
|
|
+ fee, err := expensesService.QueryMonthExpenses(monthTime, yearTime, genreId)
|
|
|
if err != nil {
|
|
|
response.FailWithMessage("失败", c)
|
|
|
global.GVA_LOG.Error("QueryMonthExpenses ====== " + err.Error())
|