From a230d19a9825d3e41b4a5fdaa2e346f54c079359 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 2 Sep 2024 15:14:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/md/md_finance_center.go | 50 ++++++++++++----------------- app/svc/svc_finance_center_agent.go | 46 +++++++++++--------------- docs/docs.go | 16 --------- docs/swagger.json | 16 --------- docs/swagger.yaml | 12 ------- 5 files changed, 40 insertions(+), 100 deletions(-) diff --git a/app/md/md_finance_center.go b/app/md/md_finance_center.go index 4fc8482..3e738b3 100644 --- a/app/md/md_finance_center.go +++ b/app/md/md_finance_center.go @@ -44,20 +44,16 @@ type FinanceCenterDataAgentRes struct { } type FinanceCenterDataAgentData struct { - Id string `json:"id"` - TimeStr string `json:"time_str" example:"业务时间"` - Name string `json:"name" example:"媒体名称"` - SettleType string `json:"settle_type" example:"结算单类型(1:日结 2:周结 3:月结 4:预付)"` - AllIncome string `json:"all_income" example:"合计收益"` - TopIncome string `json:"top_income" example:"上游结算"` - CommissionIncome string `json:"commission_income" example:"佣金留存"` - PlatformIncome string `json:"platform_income" example:"平台留存"` - ChangeIncome string `json:"change_income" example:"调价留存"` - Income string `json:"income" example:"渠道结算"` - OtherIncome string `json:"other_income" example:"其他调整"` - PayState string `json:"pay_state" example:"结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)"` - State string `json:"state" example:"结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)"` - Label string `json:"label"` + Id string `json:"id"` + TimeStr string `json:"time_str" example:"业务时间"` + Name string `json:"name" example:"媒体名称"` + SettleType string `json:"settle_type" example:"结算单类型(1:日结 2:周结 3:月结 4:预付)"` + AllIncome string `json:"all_income" example:"合计收益"` + Income string `json:"income" example:"渠道结算"` + OtherIncome string `json:"other_income" example:"其他调整"` + PayState string `json:"pay_state" example:"结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)"` + State string `json:"state" example:"结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)"` + Label string `json:"label"` } type FinanceCenterDataDetailRes struct { Data FinanceCenterDataDetail `json:"data" ` @@ -95,21 +91,17 @@ type FinanceCenterDataDetail struct { State string `json:"state" example:"结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)"` } type FinanceCenterDataAgentDetail struct { - TimeStr string `json:"time_str" example:"业务时间"` - Name string `json:"name" example:"媒体名称"` - Account string `json:"account" example:"媒体账号"` - Source string `json:"source" example:"结算标示"` - SettleFile string `json:"settle_file" example:"结算单"` - Invoice Invoice `json:"invoice"` - AllIncome string `json:"all_income" example:"合计收益"` - TopIncome string `json:"top_income" example:"上游结算"` - CommissionIncome string `json:"commission_income" example:"佣金留存"` - PlatformIncome string `json:"platform_income" example:"平台留存"` - ChangeIncome string `json:"change_income" example:"调价留存"` - Income string `json:"income" example:"渠道结算"` - OtherIncome string `json:"other_income" example:"其他调整"` - PayState string `json:"pay_state" example:"结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)"` - State string `json:"state" example:"结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)"` + TimeStr string `json:"time_str" example:"业务时间"` + Name string `json:"name" example:"媒体名称"` + Account string `json:"account" example:"媒体账号"` + Source string `json:"source" example:"结算标示"` + SettleFile string `json:"settle_file" example:"结算单"` + Invoice Invoice `json:"invoice"` + AllIncome string `json:"all_income" example:"合计收益"` + Income string `json:"income" example:"渠道结算"` + OtherIncome string `json:"other_income" example:"其他调整"` + PayState string `json:"pay_state" example:"结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)"` + State string `json:"state" example:"结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)"` } type Invoice struct { Type string `json:"type"` diff --git a/app/svc/svc_finance_center_agent.go b/app/svc/svc_finance_center_agent.go index 1ad87c5..389ff9b 100644 --- a/app/svc/svc_finance_center_agent.go +++ b/app/svc/svc_finance_center_agent.go @@ -108,19 +108,15 @@ func FinanceCenterAgentDetail(c *gin.Context, req md.CommDetailReq) md.FinanceCe json.Unmarshal([]byte(invoiceData.File), &file) } tmp := md.FinanceCenterDataAgentDetail{ - Source: "手动导入", - SettleFile: data.SettleFile, - Invoice: invoice, - AllIncome: utils.Float64ToStr(float64(data.OtherIncome+data.BasicIncome) / 100), - TopIncome: "", - CommissionIncome: "", - PlatformIncome: "", - ChangeIncome: "", - Income: utils.Float64ToStr(float64(data.BasicIncome) / 100), - OtherIncome: utils.Float64ToStr(float64(data.OtherIncome) / 100), - TimeStr: data.StartDate, - PayState: utils.IntToStr(data.PayState), - State: utils.IntToStr(data.State), + Source: "手动导入", + SettleFile: data.SettleFile, + Invoice: invoice, + AllIncome: utils.Float64ToStr(float64(data.OtherIncome+data.BasicIncome) / 100), + Income: utils.Float64ToStr(float64(data.BasicIncome) / 100), + OtherIncome: utils.Float64ToStr(float64(data.OtherIncome) / 100), + TimeStr: data.StartDate, + PayState: utils.IntToStr(data.PayState), + State: utils.IntToStr(data.State), } if data.EndDate != "" && data.EndDate != "0000-00-00" { if data.EndDate != data.StartDate { @@ -154,20 +150,16 @@ func FinanceCenterAgentList(c *gin.Context, req md.FinanceCenterDataReq) md.Fina if len(AgentList) > 0 { for _, v := range AgentList { var tmp = md.FinanceCenterDataAgentData{ - Id: utils.IntToStr(v.Id), - Name: "", - AllIncome: utils.Float64ToStr(float64(v.OtherIncome+v.BasicIncome) / 100), - TopIncome: "", - CommissionIncome: "", - PlatformIncome: "", - ChangeIncome: "", - Income: utils.Float64ToStr(float64(v.BasicIncome) / 100), - OtherIncome: utils.Float64ToStr(float64(v.OtherIncome) / 100), - TimeStr: v.StartDate, - SettleType: utils.IntToStr(v.Kind), - PayState: utils.IntToStr(v.PayState), - State: utils.IntToStr(v.State), - Label: "预估", + Id: utils.IntToStr(v.Id), + Name: "", + AllIncome: utils.Float64ToStr(float64(v.OtherIncome+v.BasicIncome) / 100), + Income: utils.Float64ToStr(float64(v.BasicIncome) / 100), + OtherIncome: utils.Float64ToStr(float64(v.OtherIncome) / 100), + TimeStr: v.StartDate, + SettleType: utils.IntToStr(v.Kind), + PayState: utils.IntToStr(v.PayState), + State: utils.IntToStr(v.State), + Label: "预估", } tmpAgent := GetAgentInfo(c, v.AgentId) if tmpAgent["name"] != "" { diff --git a/docs/docs.go b/docs/docs.go index da4fe28..6e4ab8a 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -6176,14 +6176,6 @@ const docTemplate = `{ "type": "string", "example": "合计收益" }, - "change_income": { - "type": "string", - "example": "调价留存" - }, - "commission_income": { - "type": "string", - "example": "佣金留存" - }, "income": { "type": "string", "example": "渠道结算" @@ -6203,10 +6195,6 @@ const docTemplate = `{ "type": "string", "example": "结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)" }, - "platform_income": { - "type": "string", - "example": "平台留存" - }, "settle_file": { "type": "string", "example": "结算单" @@ -6222,10 +6210,6 @@ const docTemplate = `{ "time_str": { "type": "string", "example": "业务时间" - }, - "top_income": { - "type": "string", - "example": "上游结算" } } }, diff --git a/docs/swagger.json b/docs/swagger.json index c9a85fc..793a8de 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -6168,14 +6168,6 @@ "type": "string", "example": "合计收益" }, - "change_income": { - "type": "string", - "example": "调价留存" - }, - "commission_income": { - "type": "string", - "example": "佣金留存" - }, "income": { "type": "string", "example": "渠道结算" @@ -6195,10 +6187,6 @@ "type": "string", "example": "结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)" }, - "platform_income": { - "type": "string", - "example": "平台留存" - }, "settle_file": { "type": "string", "example": "结算单" @@ -6214,10 +6202,6 @@ "time_str": { "type": "string", "example": "业务时间" - }, - "top_income": { - "type": "string", - "example": "上游结算" } } }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index e506f17..8f4afa8 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1229,12 +1229,6 @@ definitions: all_income: example: 合计收益 type: string - change_income: - example: 调价留存 - type: string - commission_income: - example: 佣金留存 - type: string income: example: 渠道结算 type: string @@ -1249,9 +1243,6 @@ definitions: pay_state: example: 结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款) type: string - platform_income: - example: 平台留存 - type: string settle_file: example: 结算单 type: string @@ -1264,9 +1255,6 @@ definitions: time_str: example: 业务时间 type: string - top_income: - example: 上游结算 - type: string type: object md.FinanceCenterDataAgentDetailRes: properties: