作者 yangfu

承接人统计修改(参与人数只统计承接人)

个人查看合约详情修改(只能查看自己的分红明细)
@@ -1713,12 +1713,12 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationP @@ -1713,12 +1713,12 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationP
1713 for i := range underTakers { 1713 for i := range underTakers {
1714 item := underTakers[i] 1714 item := underTakers[i]
1715 funcRemoveDuplicate(item.Undertaker.UserBaseId) 1715 funcRemoveDuplicate(item.Undertaker.UserBaseId)
1716 - if item.Undertaker.Referrer != nil && item.Undertaker.Referrer.UserBaseId != 0 {  
1717 - funcRemoveDuplicate(item.Undertaker.Referrer.UserBaseId)  
1718 - }  
1719 - if item.Undertaker.Salesman != nil && item.Undertaker.Salesman.UserBaseId != 0 {  
1720 - funcRemoveDuplicate(item.Undertaker.Salesman.UserBaseId)  
1721 - } 1716 + //if item.Undertaker.Referrer != nil && item.Undertaker.Referrer.UserBaseId != 0 {
  1717 + // funcRemoveDuplicate(item.Undertaker.Referrer.UserBaseId)
  1718 + //}
  1719 + //if item.Undertaker.Salesman != nil && item.Undertaker.Salesman.UserBaseId != 0 {
  1720 + // funcRemoveDuplicate(item.Undertaker.Salesman.UserBaseId)
  1721 + //}
1722 } 1722 }
1723 project.ApplicantCount = int32(count) 1723 project.ApplicantCount = int32(count)
1724 if _, err := cooperationProjectRepository.Save(project); err != nil { 1724 if _, err := cooperationProjectRepository.Save(project); err != nil {
@@ -271,15 +271,15 @@ func (ptr *CooperationStatisticsService) PersonCooperationProjectSharedInfo(quer @@ -271,15 +271,15 @@ func (ptr *CooperationStatisticsService) PersonCooperationProjectSharedInfo(quer
271 key := keyfun(u.CooperationContractNumber, u.Undertaker.UserBaseId) 271 key := keyfun(u.CooperationContractNumber, u.Undertaker.UserBaseId)
272 userSorted = append(userSorted, key) 272 userSorted = append(userSorted, key)
273 mapUser[keyfun(u.CooperationContractNumber, u.Undertaker.UserBaseId)] = domain.NewContractParticipant(u.Undertaker.ToUser(), key, u.Undertaker.ContractAttachment) 273 mapUser[keyfun(u.CooperationContractNumber, u.Undertaker.UserBaseId)] = domain.NewContractParticipant(u.Undertaker.ToUser(), key, u.Undertaker.ContractAttachment)
274 - if u.Undertaker.Referrer != nil {  
275 - key = keyfun(u.CooperationContractNumber, u.Undertaker.Referrer.UserBaseId)  
276 - userSorted = append(userSorted, key)  
277 - mapUser[keyfun(u.CooperationContractNumber, u.Undertaker.Referrer.UserBaseId)] = domain.NewContractParticipant(u.Undertaker.Referrer.ToUser(), key, u.Undertaker.ContractAttachment)  
278 - }  
279 - if u.Undertaker.Salesman != nil {  
280 - userSorted = append(userSorted, keyfun(u.CooperationContractNumber, u.Undertaker.Salesman.UserBaseId))  
281 - mapUser[keyfun(u.CooperationContractNumber, u.Undertaker.Salesman.UserBaseId)] = domain.NewContractParticipant(u.Undertaker.Salesman.ToUser(), key, u.Undertaker.ContractAttachment)  
282 - } 274 + //if u.Undertaker.Referrer != nil {
  275 + // key = keyfun(u.CooperationContractNumber, u.Undertaker.Referrer.UserBaseId)
  276 + // userSorted = append(userSorted, key)
  277 + // mapUser[keyfun(u.CooperationContractNumber, u.Undertaker.Referrer.UserBaseId)] = domain.NewContractParticipant(u.Undertaker.Referrer.ToUser(), key, u.Undertaker.ContractAttachment)
  278 + //}
  279 + //if u.Undertaker.Salesman != nil {
  280 + // userSorted = append(userSorted, keyfun(u.CooperationContractNumber, u.Undertaker.Salesman.UserBaseId))
  281 + // mapUser[keyfun(u.CooperationContractNumber, u.Undertaker.Salesman.UserBaseId)] = domain.NewContractParticipant(u.Undertaker.Salesman.ToUser(), key, u.Undertaker.ContractAttachment)
  282 + //}
283 } 283 }
284 284
285 // 2.合约的订单金额 285 // 2.合约的订单金额
@@ -287,7 +287,7 @@ func (ptr *CooperationStatisticsService) GetContractDividends(queryOptions map[s @@ -287,7 +287,7 @@ func (ptr *CooperationStatisticsService) GetContractDividends(queryOptions map[s
287 //OrgId int64 `json:"orgId"` 287 //OrgId int64 `json:"orgId"`
288 //UserId int64 `json:"userId"` 288 //UserId int64 `json:"userId"`
289 //个人 289 //个人
290 - //UserBaseId int64 `json:"userBaseId"` 290 + UserBaseId int64 `json:"userBaseId"`
291 //Offset int `json:"offset"` 291 //Offset int `json:"offset"`
292 //Limit int `json:"limit"` 292 //Limit int `json:"limit"`
293 ContractId int `json:"contractId" valid:"Required"` 293 ContractId int `json:"contractId" valid:"Required"`
@@ -346,6 +346,10 @@ func (ptr *CooperationStatisticsService) GetContractDividends(queryOptions map[s @@ -346,6 +346,10 @@ func (ptr *CooperationStatisticsService) GetContractDividends(queryOptions map[s
346 var dividends = make([]interface{}, 0) 346 var dividends = make([]interface{}, 0)
347 for i := range creditAccounts { 347 for i := range creditAccounts {
348 a := creditAccounts[i] 348 a := creditAccounts[i]
  349 + // 个人查看的时候只查看自己的分红明细
  350 + //if request.UserBaseId!=0 && a.DividendsUser.UserBaseId!=request.UserBaseId{
  351 + // continue
  352 + //}
349 item := map[string]interface{}{ 353 item := map[string]interface{}{
350 "creditAccountId": a.DividendsEstimateId, 354 "creditAccountId": a.DividendsEstimateId,
351 "orderGoodName": "", 355 "orderGoodName": "",