作者 yangfu

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

个人查看合约详情修改(只能查看自己的分红明细)
... ... @@ -1713,12 +1713,12 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationP
for i := range underTakers {
item := underTakers[i]
funcRemoveDuplicate(item.Undertaker.UserBaseId)
if item.Undertaker.Referrer != nil && item.Undertaker.Referrer.UserBaseId != 0 {
funcRemoveDuplicate(item.Undertaker.Referrer.UserBaseId)
}
if item.Undertaker.Salesman != nil && item.Undertaker.Salesman.UserBaseId != 0 {
funcRemoveDuplicate(item.Undertaker.Salesman.UserBaseId)
}
//if item.Undertaker.Referrer != nil && item.Undertaker.Referrer.UserBaseId != 0 {
// funcRemoveDuplicate(item.Undertaker.Referrer.UserBaseId)
//}
//if item.Undertaker.Salesman != nil && item.Undertaker.Salesman.UserBaseId != 0 {
// funcRemoveDuplicate(item.Undertaker.Salesman.UserBaseId)
//}
}
project.ApplicantCount = int32(count)
if _, err := cooperationProjectRepository.Save(project); err != nil {
... ...
... ... @@ -271,15 +271,15 @@ func (ptr *CooperationStatisticsService) PersonCooperationProjectSharedInfo(quer
key := keyfun(u.CooperationContractNumber, u.Undertaker.UserBaseId)
userSorted = append(userSorted, key)
mapUser[keyfun(u.CooperationContractNumber, u.Undertaker.UserBaseId)] = domain.NewContractParticipant(u.Undertaker.ToUser(), key, u.Undertaker.ContractAttachment)
if u.Undertaker.Referrer != nil {
key = keyfun(u.CooperationContractNumber, u.Undertaker.Referrer.UserBaseId)
userSorted = append(userSorted, key)
mapUser[keyfun(u.CooperationContractNumber, u.Undertaker.Referrer.UserBaseId)] = domain.NewContractParticipant(u.Undertaker.Referrer.ToUser(), key, u.Undertaker.ContractAttachment)
}
if u.Undertaker.Salesman != nil {
userSorted = append(userSorted, keyfun(u.CooperationContractNumber, u.Undertaker.Salesman.UserBaseId))
mapUser[keyfun(u.CooperationContractNumber, u.Undertaker.Salesman.UserBaseId)] = domain.NewContractParticipant(u.Undertaker.Salesman.ToUser(), key, u.Undertaker.ContractAttachment)
}
//if u.Undertaker.Referrer != nil {
// key = keyfun(u.CooperationContractNumber, u.Undertaker.Referrer.UserBaseId)
// userSorted = append(userSorted, key)
// mapUser[keyfun(u.CooperationContractNumber, u.Undertaker.Referrer.UserBaseId)] = domain.NewContractParticipant(u.Undertaker.Referrer.ToUser(), key, u.Undertaker.ContractAttachment)
//}
//if u.Undertaker.Salesman != nil {
// userSorted = append(userSorted, keyfun(u.CooperationContractNumber, u.Undertaker.Salesman.UserBaseId))
// mapUser[keyfun(u.CooperationContractNumber, u.Undertaker.Salesman.UserBaseId)] = domain.NewContractParticipant(u.Undertaker.Salesman.ToUser(), key, u.Undertaker.ContractAttachment)
//}
}
// 2.合约的订单金额
... ...
... ... @@ -287,7 +287,7 @@ func (ptr *CooperationStatisticsService) GetContractDividends(queryOptions map[s
//OrgId int64 `json:"orgId"`
//UserId int64 `json:"userId"`
//个人
//UserBaseId int64 `json:"userBaseId"`
UserBaseId int64 `json:"userBaseId"`
//Offset int `json:"offset"`
//Limit int `json:"limit"`
ContractId int `json:"contractId" valid:"Required"`
... ... @@ -346,6 +346,10 @@ func (ptr *CooperationStatisticsService) GetContractDividends(queryOptions map[s
var dividends = make([]interface{}, 0)
for i := range creditAccounts {
a := creditAccounts[i]
// 个人查看的时候只查看自己的分红明细
//if request.UserBaseId!=0 && a.DividendsUser.UserBaseId!=request.UserBaseId{
// continue
//}
item := map[string]interface{}{
"creditAccountId": a.DividendsEstimateId,
"orderGoodName": "",
... ...