作者 tangxuhui

添加结算

1 -{"D:\\workspaceGo\\src\\allied-creation-gateway\\pkg\\port\\beego\\routers":1628818869330120900}  
  1 +{"D:\\workspaceGo\\src\\allied-creation-gateway\\pkg\\port\\beego\\routers":1628844413608624400}
  1 +package query
  2 +
  3 +type ListCreditAccountQuery struct {
  4 +}
  1 +package service
  2 +
  3 +import (
  4 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/creditAccount/query"
  5 +)
  6 +
  7 +type CreditAccountService struct{}
  8 +
  9 +//ListCreditAccount返回账期结算列表
  10 +func (srv *CreditAccountService) ListCreditAccount(listQuery *query.ListCreditAccountQuery) (int64, interface{}, error) {
  11 +
  12 + return 0, nil, nil
  13 +}
  14 +
  15 +//GetCreditAccount 返回账期结算详情
  16 +func (srv *CreditAccountService) GetCreditAccount(listQuery *query.ListCreditAccountQuery) (int64, interface{}, error) {
  17 +
  18 + return 0, nil, nil
  19 +}
  20 +
  21 +//PayCreditAccount 支付账期结算
  22 +func (srv *CreditAccountService) PayCreditAccount(listQuery *query.ListCreditAccountQuery) (int64, interface{}, error) {
  23 +
  24 + return 0, nil, nil
  25 +}
  26 +
  27 +//RemoveCreditAccount 删除账期结算
  28 +func (srv *CreditAccountService) RemoveCreditAccount(listQuery *query.ListCreditAccountQuery) (int64, interface{}, error) {
  29 +
  30 + return 0, nil, nil
  31 +}
  1 +package web_client
  2 +
  3 +import (
  4 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/command"
  5 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/query"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsEstimate/service"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
  8 +)
  9 +
  10 +type DividendsEstimateController struct {
  11 + baseController
  12 +}
  13 +
  14 +//CancelDividendsEstimate 取消分红预算
  15 +func (controller *DividendsEstimateController) CancelDividendsEstimate() {
  16 + dividendsEstimateService := service.NewDividendsEstimateService(nil)
  17 + cancelDividendsEstimateCommand := &command.CancelDividendsEstimateCommand{}
  18 + err := controller.Unmarshal(cancelDividendsEstimateCommand)
  19 + if err != nil {
  20 + log.Logger.Debug("json err:" + err.Error())
  21 + }
  22 + cancelDividendsEstimateCommand.Operator = controller.GetOperator()
  23 + data, err := dividendsEstimateService.CancelDividendsEstimate(cancelDividendsEstimateCommand)
  24 + controller.Response(data, err)
  25 +}
  26 +
  27 +//SearchDividendsEstimate 查询分红预算单列表
  28 +func (controller *DividendsEstimateController) SearchDividendsEstimate() {
  29 + dividendsEstimateService := service.NewDividendsEstimateService(nil)
  30 + searchDividendsEstimateQuery := &query.SearchDividendsEstimateQuery{}
  31 + err := controller.Unmarshal(searchDividendsEstimateQuery)
  32 + if err != nil {
  33 + log.Logger.Debug("json err:" + err.Error())
  34 + }
  35 + searchDividendsEstimateQuery.Operator = controller.GetOperator()
  36 + data, err := dividendsEstimateService.SearchDividendsEstimate(searchDividendsEstimateQuery)
  37 + controller.Response(data, err)
  38 +}
  39 +
  40 +//SearchDividendsIncentives 查询业绩分红
  41 +func (controller *DividendsEstimateController) SearchDividendsIncentives() {
  42 + dividendsEstimateService := service.NewDividendsEstimateService(nil)
  43 + searchDividendsIncentivesQuery := &query.SearchDividendsIncentivesQuery{}
  44 + err := controller.Unmarshal(searchDividendsIncentivesQuery)
  45 + if err != nil {
  46 + log.Logger.Debug("json err:" + err.Error())
  47 + }
  48 + searchDividendsIncentivesQuery.Operator = controller.GetOperator()
  49 + data, err := dividendsEstimateService.SearchDividendsIncentives(searchDividendsIncentivesQuery)
  50 + controller.Response(data, err)
  51 +}
  52 +
  53 +//SearchMoneyIncentives 查询金额激励分红
  54 +func (controller *DividendsEstimateController) SearchMoneyIncentives() {
  55 + dividendsEstimateService := service.NewDividendsEstimateService(nil)
  56 + searchMoneyIncentivesQuery := &query.SearchMoneyIncentivesQuery{}
  57 + err := controller.Unmarshal(searchMoneyIncentivesQuery)
  58 + if err != nil {
  59 + log.Logger.Debug("json err:" + err.Error())
  60 + }
  61 + searchMoneyIncentivesQuery.Operator = controller.GetOperator()
  62 + data, err := dividendsEstimateService.SearchMoneyIncentives(searchMoneyIncentivesQuery)
  63 + controller.Response(data, err)
  64 +}
  65 +
  66 +//EstimateMoneyIncentives 确定预算金额激励分红
  67 +func (controller *DividendsEstimateController) EstimateMoneyIncentives() {
  68 + dividendsEstimateService := service.NewDividendsEstimateService(nil)
  69 + estimateMoneyIncentivesCommand := &command.EstimateMoneyIncentivesCommand{}
  70 + err := controller.Unmarshal(estimateMoneyIncentivesCommand)
  71 + if err != nil {
  72 + log.Logger.Debug("json err:" + err.Error())
  73 + }
  74 + estimateMoneyIncentivesCommand.Operator = controller.GetOperator()
  75 + data, err := dividendsEstimateService.EstimateMoneyIncentives(estimateMoneyIncentivesCommand)
  76 + controller.Response(data, err)
  77 +}
  78 +
  79 +//EstimateDividendsIncentives 确定业绩分红激励
  80 +func (controller *DividendsEstimateController) EstimateDividendsIncentives() {
  81 + dividendsEstimateService := service.NewDividendsEstimateService(nil)
  82 + estimateDividendsIncentivesCommand := &command.EstimateDividendsIncentivesCommand{}
  83 + err := controller.Unmarshal(estimateDividendsIncentivesCommand)
  84 + if err != nil {
  85 + log.Logger.Debug("json err:" + err.Error())
  86 + }
  87 + estimateDividendsIncentivesCommand.Operator = controller.GetOperator()
  88 + data, err := dividendsEstimateService.EstimateDividendsIncentives(estimateDividendsIncentivesCommand)
  89 + controller.Response(data, err)
  90 +}
  1 +package routers
  2 +
  3 +import (
  4 + "github.com/beego/beego/v2/server/web"
  5 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers/web_client"
  6 +)
  7 +
  8 +func init() {
  9 + web.Router("/v1/web/dividends-estimate/cancel", &web_client.DividendsEstimateController{}, "Post:CancelDividendsEstimate")
  10 + web.Router("/v1/web/dividends-estimate/search", &web_client.DividendsEstimateController{}, "Post:SearchDividendsEstimate")
  11 + web.Router("/v1/web/dividends-estimate/dividends-incentives/search", &web_client.DividendsEstimateController{}, "Post:SearchDividendsIncentives")
  12 + web.Router("/v1/web/dividends-estimate/money-incentives/search", &web_client.DividendsEstimateController{}, "Post:SearchMoneyIncentives")
  13 + web.Router("/v1/web/dividends-estimate/money-incentives/estimate", &web_client.DividendsEstimateController{}, "Post:EstimateMoneyIncentives")
  14 + web.Router("/v1/web/dividends-estimate/dividends-incentives/estimate", &web_client.DividendsEstimateController{}, "Post:EstimateDividendsIncentives")
  15 +}