作者 yangfu

共创详情支付凭证列表

@@ -49,6 +49,8 @@ type ContractParticipant struct { @@ -49,6 +49,8 @@ type ContractParticipant struct {
49 ContractContent string `json:"contractContent"` 49 ContractContent string `json:"contractContent"`
50 // 支付凭证 50 // 支付凭证
51 PaymentDocument string `json:"paymentDocument"` 51 PaymentDocument string `json:"paymentDocument"`
  52 + // 支付凭证
  53 + PaymentDocuments []*Attachment `json:"paymentDocuments"`
52 // 敏感标识 54 // 敏感标识
53 SensitiveFlag bool `json:"sensitiveFlag"` 55 SensitiveFlag bool `json:"sensitiveFlag"`
54 // 共创合约编号 56 // 共创合约编号
@@ -79,6 +81,7 @@ func NewContractParticipant(u *User, primaryKey string, attachments []*Attachmen @@ -79,6 +81,7 @@ func NewContractParticipant(u *User, primaryKey string, attachments []*Attachmen
79 User: u, 81 User: u,
80 Participant: u.SimpleCopy(), 82 Participant: u.SimpleCopy(),
81 primaryKey: primaryKey, 83 primaryKey: primaryKey,
  84 + PaymentDocuments: make([]*Attachment, 0),
82 } 85 }
83 if len(attachments) > 0 { 86 if len(attachments) > 0 {
84 p.ContractContent = attachments[0].Name 87 p.ContractContent = attachments[0].Name
@@ -271,15 +271,6 @@ func (ptr *CooperationStatisticsService) PersonCooperationProjectSharedInfo(quer @@ -271,15 +271,6 @@ 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 - //}  
283 } 274 }
284 275
285 // 2.合约的订单金额 276 // 2.合约的订单金额
@@ -325,10 +316,11 @@ func (ptr *CooperationStatisticsService) PersonCooperationProjectSharedInfo(quer @@ -325,10 +316,11 @@ func (ptr *CooperationStatisticsService) PersonCooperationProjectSharedInfo(quer
325 detail := creditAccounts[i].AccountDetail[j] 316 detail := creditAccounts[i].AccountDetail[j]
326 key := keyfun(detail.CooperationContractNumber, creditAccounts[i].Participator.UserBaseId) 317 key := keyfun(detail.CooperationContractNumber, creditAccounts[i].Participator.UserBaseId)
327 mapCreditAccount[key] = creditAccounts[i] 318 mapCreditAccount[key] = creditAccounts[i]
328 - if v, ok := mapUser[key]; ok && len(v.PaymentDocument) == 0 {  
329 - if len(mapCreditAccount[key].PaymentDocumentAttachments) > 0 { 319 + if v, ok := mapUser[key]; ok {
  320 + if len(v.PaymentDocument) == 0 && len(mapCreditAccount[key].PaymentDocumentAttachments) > 0 {
330 v.PaymentDocument = "查看" 321 v.PaymentDocument = "查看"
331 } 322 }
  323 + v.PaymentDocuments = append(v.PaymentDocuments, creditAccounts[i].PaymentDocumentAttachments...)
332 } 324 }
333 } 325 }
334 } 326 }