Bläddra i källkod

更新

master
huangjiajun 2 veckor sedan
förälder
incheckning
a230d19a98
5 ändrade filer med 40 tillägg och 100 borttagningar
  1. +21
    -29
      app/md/md_finance_center.go
  2. +19
    -27
      app/svc/svc_finance_center_agent.go
  3. +0
    -16
      docs/docs.go
  4. +0
    -16
      docs/swagger.json
  5. +0
    -12
      docs/swagger.yaml

+ 21
- 29
app/md/md_finance_center.go Visa fil

@@ -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"`


+ 19
- 27
app/svc/svc_finance_center_agent.go Visa fil

@@ -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"] != "" {


+ 0
- 16
docs/docs.go Visa fil

@@ -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": "上游结算"
}
}
},


+ 0
- 16
docs/swagger.json Visa fil

@@ -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": "上游结算"
}
}
},


+ 0
- 12
docs/swagger.yaml Visa fil

@@ -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:


Laddar…
Avbryt
Spara