正在显示
1 个修改的文件
包含
68 行增加
和
48 行删除
@@ -63,38 +63,48 @@ func (domainService *CancelDividendsEstimateService) CancelEstimate(dividendsEst | @@ -63,38 +63,48 @@ func (domainService *CancelDividendsEstimateService) CancelEstimate(dividendsEst | ||
63 | // 自定义查询 | 63 | // 自定义查询 |
64 | queryOptions := make(map[string]interface{}) | 64 | queryOptions := make(map[string]interface{}) |
65 | 65 | ||
66 | - //参与分红类型,1承接人,2推荐人,3关联业务员 | ||
67 | - if dividendsEstimate.DividendsParticipateType == 1 { // 当前取消的是承接人的分红预算单 | ||
68 | - queryOptions = map[string]interface{}{ | ||
69 | - "companyId": dividendsEstimate.Company.CompanyId, | ||
70 | - "orgId": dividendsEstimate.Org.OrgId, | ||
71 | - "orderOrReturnedOrderNum": dividendsEstimate.OrderOrReturnedOrderNum, | ||
72 | - "dividendsParticipateTypes": []int32{2, 3}, | ||
73 | - "offsetLimit": false, | ||
74 | - "dividendsStage": dividendsEstimate.DividendsStage, | ||
75 | - "dividendsTypes": []int32{1, 2}, | ||
76 | - } | ||
77 | - } else if dividendsEstimate.DividendsParticipateType == 2 { // 当前取消的是推荐人的分红预算单 | ||
78 | - queryOptions = map[string]interface{}{ | ||
79 | - "companyId": dividendsEstimate.Company.CompanyId, | ||
80 | - "orgId": dividendsEstimate.Org.OrgId, | ||
81 | - "orderOrReturnedOrderNum": dividendsEstimate.OrderOrReturnedOrderNum, | ||
82 | - "dividendsParticipateTypes": []int32{1, 3}, | ||
83 | - "offsetLimit": false, | ||
84 | - "dividendsStage": dividendsEstimate.DividendsStage, | ||
85 | - "dividendsTypes": []int32{1, 2}, | ||
86 | - } | ||
87 | - } else if dividendsEstimate.DividendsParticipateType == 3 { // 当前取消的是关联业务员的分红预算单 | ||
88 | queryOptions = map[string]interface{}{ | 66 | queryOptions = map[string]interface{}{ |
89 | "companyId": dividendsEstimate.Company.CompanyId, | 67 | "companyId": dividendsEstimate.Company.CompanyId, |
90 | "orgId": dividendsEstimate.Org.OrgId, | 68 | "orgId": dividendsEstimate.Org.OrgId, |
91 | "orderOrReturnedOrderNum": dividendsEstimate.OrderOrReturnedOrderNum, | 69 | "orderOrReturnedOrderNum": dividendsEstimate.OrderOrReturnedOrderNum, |
92 | - "dividendsParticipateTypes": []int32{1, 2}, | 70 | + "dividendsParticipateTypes": []int32{1, 2, 3}, |
93 | "offsetLimit": false, | 71 | "offsetLimit": false, |
94 | "dividendsStage": dividendsEstimate.DividendsStage, | 72 | "dividendsStage": dividendsEstimate.DividendsStage, |
95 | "dividendsTypes": []int32{1, 2}, | 73 | "dividendsTypes": []int32{1, 2}, |
96 | } | 74 | } |
97 | - } | 75 | + |
76 | + //参与分红类型,1承接人,2推荐人,3关联业务员 | ||
77 | + //if dividendsEstimate.DividendsParticipateType == 1 { // 当前取消的是承接人的分红预算单 | ||
78 | + // queryOptions = map[string]interface{}{ | ||
79 | + // "companyId": dividendsEstimate.Company.CompanyId, | ||
80 | + // "orgId": dividendsEstimate.Org.OrgId, | ||
81 | + // "orderOrReturnedOrderNum": dividendsEstimate.OrderOrReturnedOrderNum, | ||
82 | + // "dividendsParticipateTypes": []int32{1, 2, 3}, | ||
83 | + // "offsetLimit": false, | ||
84 | + // "dividendsStage": dividendsEstimate.DividendsStage, | ||
85 | + // "dividendsTypes": []int32{1, 2}, | ||
86 | + // } | ||
87 | + //} else if dividendsEstimate.DividendsParticipateType == 2 { // 当前取消的是推荐人的分红预算单 | ||
88 | + // queryOptions = map[string]interface{}{ | ||
89 | + // "companyId": dividendsEstimate.Company.CompanyId, | ||
90 | + // "orgId": dividendsEstimate.Org.OrgId, | ||
91 | + // "orderOrReturnedOrderNum": dividendsEstimate.OrderOrReturnedOrderNum, | ||
92 | + // "dividendsParticipateTypes": []int32{1, 3}, | ||
93 | + // "offsetLimit": false, | ||
94 | + // "dividendsStage": dividendsEstimate.DividendsStage, | ||
95 | + // "dividendsTypes": []int32{1, 2}, | ||
96 | + // } | ||
97 | + //} else if dividendsEstimate.DividendsParticipateType == 3 { // 当前取消的是关联业务员的分红预算单 | ||
98 | + // queryOptions = map[string]interface{}{ | ||
99 | + // "companyId": dividendsEstimate.Company.CompanyId, | ||
100 | + // "orgId": dividendsEstimate.Org.OrgId, | ||
101 | + // "orderOrReturnedOrderNum": dividendsEstimate.OrderOrReturnedOrderNum, | ||
102 | + // "dividendsParticipateTypes": []int32{1, 2}, | ||
103 | + // "offsetLimit": false, | ||
104 | + // "dividendsStage": dividendsEstimate.DividendsStage, | ||
105 | + // "dividendsTypes": []int32{1, 2}, | ||
106 | + // } | ||
107 | + //} | ||
98 | 108 | ||
99 | // 根据当前分红预算单的分红订单号或退货单号获取相关的分红预算单 | 109 | // 根据当前分红预算单的分红订单号或退货单号获取相关的分红预算单 |
100 | if countRelative, dividendsEstimatesRelative, err2 := dividendsEstimateRepository.Find(queryOptions); err2 != nil { | 110 | if countRelative, dividendsEstimatesRelative, err2 := dividendsEstimateRepository.Find(queryOptions); err2 != nil { |
@@ -118,38 +128,48 @@ func (domainService *CancelDividendsEstimateService) CancelEstimate(dividendsEst | @@ -118,38 +128,48 @@ func (domainService *CancelDividendsEstimateService) CancelEstimate(dividendsEst | ||
118 | // 自定义查询 | 128 | // 自定义查询 |
119 | queryOptions := make(map[string]interface{}) | 129 | queryOptions := make(map[string]interface{}) |
120 | 130 | ||
121 | - //参与分红类型,1承接人,2推荐人,3关联业务员 | ||
122 | - if dividendsEstimate.DividendsParticipateType == 1 { // 当前取消的是承接人的分红预算单 | ||
123 | - queryOptions = map[string]interface{}{ | ||
124 | - "companyId": dividendsEstimate.Company.CompanyId, | ||
125 | - "orgId": dividendsEstimate.Org.OrgId, | ||
126 | - "cooperationContractNumber": dividendsEstimate.CooperationContractNumber, | ||
127 | - "dividendsParticipateTypes": []int32{2, 3}, | ||
128 | - "offsetLimit": false, | ||
129 | - "dividendsStage": dividendsEstimate.DividendsStage, | ||
130 | - "dividendsType": int32(3), | ||
131 | - } | ||
132 | - } else if dividendsEstimate.DividendsParticipateType == 2 { // 当前取消的是推荐人的分红预算单 | ||
133 | - queryOptions = map[string]interface{}{ | ||
134 | - "companyId": dividendsEstimate.Company.CompanyId, | ||
135 | - "orgId": dividendsEstimate.Org.OrgId, | ||
136 | - "cooperationContractNumber": dividendsEstimate.CooperationContractNumber, | ||
137 | - "dividendsParticipateTypes": []int32{1, 3}, | ||
138 | - "offsetLimit": false, | ||
139 | - "dividendsStage": dividendsEstimate.DividendsStage, | ||
140 | - "dividendsType": int32(3), | ||
141 | - } | ||
142 | - } else if dividendsEstimate.DividendsParticipateType == 3 { // 当前取消的是关联业务员的分红预算单 | ||
143 | queryOptions = map[string]interface{}{ | 131 | queryOptions = map[string]interface{}{ |
144 | "companyId": dividendsEstimate.Company.CompanyId, | 132 | "companyId": dividendsEstimate.Company.CompanyId, |
145 | "orgId": dividendsEstimate.Org.OrgId, | 133 | "orgId": dividendsEstimate.Org.OrgId, |
146 | "cooperationContractNumber": dividendsEstimate.CooperationContractNumber, | 134 | "cooperationContractNumber": dividendsEstimate.CooperationContractNumber, |
147 | - "dividendsParticipateTypes": []int32{1, 2}, | 135 | + "dividendsParticipateTypes": []int32{1, 2, 3}, |
148 | "offsetLimit": false, | 136 | "offsetLimit": false, |
149 | "dividendsStage": dividendsEstimate.DividendsStage, | 137 | "dividendsStage": dividendsEstimate.DividendsStage, |
150 | "dividendsType": int32(3), | 138 | "dividendsType": int32(3), |
151 | } | 139 | } |
152 | - } | 140 | + |
141 | + //参与分红类型,1承接人,2推荐人,3关联业务员 | ||
142 | + //if dividendsEstimate.DividendsParticipateType == 1 { // 当前取消的是承接人的分红预算单 | ||
143 | + // queryOptions = map[string]interface{}{ | ||
144 | + // "companyId": dividendsEstimate.Company.CompanyId, | ||
145 | + // "orgId": dividendsEstimate.Org.OrgId, | ||
146 | + // "cooperationContractNumber": dividendsEstimate.CooperationContractNumber, | ||
147 | + // "dividendsParticipateTypes": []int32{2, 3}, | ||
148 | + // "offsetLimit": false, | ||
149 | + // "dividendsStage": dividendsEstimate.DividendsStage, | ||
150 | + // "dividendsType": int32(3), | ||
151 | + // } | ||
152 | + //} else if dividendsEstimate.DividendsParticipateType == 2 { // 当前取消的是推荐人的分红预算单 | ||
153 | + // queryOptions = map[string]interface{}{ | ||
154 | + // "companyId": dividendsEstimate.Company.CompanyId, | ||
155 | + // "orgId": dividendsEstimate.Org.OrgId, | ||
156 | + // "cooperationContractNumber": dividendsEstimate.CooperationContractNumber, | ||
157 | + // "dividendsParticipateTypes": []int32{1, 3}, | ||
158 | + // "offsetLimit": false, | ||
159 | + // "dividendsStage": dividendsEstimate.DividendsStage, | ||
160 | + // "dividendsType": int32(3), | ||
161 | + // } | ||
162 | + //} else if dividendsEstimate.DividendsParticipateType == 3 { // 当前取消的是关联业务员的分红预算单 | ||
163 | + // queryOptions = map[string]interface{}{ | ||
164 | + // "companyId": dividendsEstimate.Company.CompanyId, | ||
165 | + // "orgId": dividendsEstimate.Org.OrgId, | ||
166 | + // "cooperationContractNumber": dividendsEstimate.CooperationContractNumber, | ||
167 | + // "dividendsParticipateTypes": []int32{1, 2}, | ||
168 | + // "offsetLimit": false, | ||
169 | + // "dividendsStage": dividendsEstimate.DividendsStage, | ||
170 | + // "dividendsType": int32(3), | ||
171 | + // } | ||
172 | + //} | ||
153 | 173 | ||
154 | // 根据当前分红预算单的分红订单号或退货单号获取相关的分红预算单 | 174 | // 根据当前分红预算单的分红订单号或退货单号获取相关的分红预算单 |
155 | if countRelative, dividendsEstimatesRelative, err2 := dividendsEstimateRepository.Find(queryOptions); err2 != nil { | 175 | if countRelative, dividendsEstimatesRelative, err2 := dividendsEstimateRepository.Find(queryOptions); err2 != nil { |
-
请 注册 或 登录 后发表评论