|
|
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
|
+} |