|
@@ -461,12 +461,12 @@ func CustomerDistribute(thisRow AreaCTop) (data []map[string]interface{}, otherD
|
|
|
// total += v.AreaTotal
|
|
|
// amount += v.BuyclassAmount.Value
|
|
|
//}
|
|
|
- pCount := util.Int64All(thisRow.ProjectCount) - total
|
|
|
- pAmount := util.Float64All(thisRow.Amount) - amount
|
|
|
- if pCount != 0 || pAmount != 0 {
|
|
|
- otherData = make(map[string]interface{})
|
|
|
- otherData["buyclass"] = "其它"
|
|
|
+ otherData = make(map[string]interface{})
|
|
|
+ otherData["buyclass"] = "其它"
|
|
|
+ if pCount := util.Int64All(thisRow.ProjectCount.DocCount) - total; pCount > 0 {
|
|
|
otherData["total"] = pCount
|
|
|
+ }
|
|
|
+ if pAmount := thisRow.Amount.Value - amount; pAmount > 0 {
|
|
|
otherData["amount"] = pAmount
|
|
|
}
|
|
|
return
|