|
@@ -115,9 +115,49 @@ func Query(num int, sid string) {
|
|
|
if k == "budget" || k == "bidamount" {
|
|
|
pd = util.Float64All((*pdata)[k])
|
|
|
nd = util.Float64All((*ndata)[k])
|
|
|
+ if pd.(float64) > 0 {
|
|
|
+ switch k {
|
|
|
+ case "budget":
|
|
|
+ budgetNotNilNumP++
|
|
|
+ case "bidamount":
|
|
|
+ bidamountNotNilNumP++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if nd.(float64) > 0 {
|
|
|
+ switch k {
|
|
|
+ case "budget":
|
|
|
+ budgetNotNilNumN++
|
|
|
+ case "bidamount":
|
|
|
+ bidamountNotNilNumN++
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
pd = strings.TrimSpace(util.ObjToString((*pdata)[k]))
|
|
|
nd = strings.TrimSpace(util.ObjToString((*ndata)[k]))
|
|
|
+ if strings.TrimSpace(pd.(string)) != "" {
|
|
|
+ switch k {
|
|
|
+ case "projectname":
|
|
|
+ pnameNotNilNumP++
|
|
|
+ case "buyer":
|
|
|
+ buyerNotNilNumP++
|
|
|
+ case "projectcode":
|
|
|
+ pcodeNotNilNumP++
|
|
|
+ case "winner":
|
|
|
+ winnerNotNilNumP++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if strings.TrimSpace(nd.(string)) != "" {
|
|
|
+ switch k {
|
|
|
+ case "projectname":
|
|
|
+ pnameNotNilNumN++
|
|
|
+ case "buyer":
|
|
|
+ buyerNotNilNumN++
|
|
|
+ case "projectcode":
|
|
|
+ pcodeNotNilNumN++
|
|
|
+ case "winner":
|
|
|
+ winnerNotNilNumN++
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
if pd != nd {
|
|
|
//log.Println(k)
|
|
@@ -129,12 +169,6 @@ func Query(num int, sid string) {
|
|
|
projectname.ProjectnameNew = fmt.Sprint(nd)
|
|
|
projectnames = append(projectnames, projectname)
|
|
|
projectnamenum++
|
|
|
- if strings.TrimSpace(pd.(string)) != "" {
|
|
|
- pnameNotNilNumP++
|
|
|
- }
|
|
|
- if strings.TrimSpace(nd.(string)) != "" {
|
|
|
- pnameNotNilNumN++
|
|
|
- }
|
|
|
case "buyer":
|
|
|
buyer := new(Buyer)
|
|
|
buyer.versionComparison = *versioncomparison
|
|
@@ -142,12 +176,6 @@ func Query(num int, sid string) {
|
|
|
buyer.BuyerNew = fmt.Sprint(nd)
|
|
|
buyers = append(buyers, buyer)
|
|
|
buyernum++
|
|
|
- if strings.TrimSpace(pd.(string)) != "" {
|
|
|
- buyerNotNilNumP++
|
|
|
- }
|
|
|
- if strings.TrimSpace(nd.(string)) != "" {
|
|
|
- buyerNotNilNumN++
|
|
|
- }
|
|
|
case "projectcode":
|
|
|
projectcode := new(Projectcode)
|
|
|
projectcode.ProjectcodeOld = fmt.Sprint(pd)
|
|
@@ -155,12 +183,6 @@ func Query(num int, sid string) {
|
|
|
projectcode.versionComparison = *versioncomparison
|
|
|
projectcodes = append(projectcodes, projectcode)
|
|
|
projectcodenum++
|
|
|
- if strings.TrimSpace(pd.(string)) != "" {
|
|
|
- pcodeNotNilNumP++
|
|
|
- }
|
|
|
- if strings.TrimSpace(nd.(string)) != "" {
|
|
|
- pcodeNotNilNumN++
|
|
|
- }
|
|
|
case "winner":
|
|
|
winner := new(Winner)
|
|
|
winner.WinnerOld = fmt.Sprint(pd)
|
|
@@ -168,12 +190,6 @@ func Query(num int, sid string) {
|
|
|
winner.versionComparison = *versioncomparison
|
|
|
winners = append(winners, winner)
|
|
|
winnernum++
|
|
|
- if strings.TrimSpace(pd.(string)) != "" {
|
|
|
- winnerNotNilNumP++
|
|
|
- }
|
|
|
- if strings.TrimSpace(nd.(string)) != "" {
|
|
|
- winnerNotNilNumN++
|
|
|
- }
|
|
|
case "budget":
|
|
|
budget := new(Budget)
|
|
|
budget.BudgetOld = fmt.Sprint(pd)
|
|
@@ -181,12 +197,6 @@ func Query(num int, sid string) {
|
|
|
budget.versionComparison = *versioncomparison
|
|
|
budgets = append(budgets, budget)
|
|
|
budgetnum++
|
|
|
- if pd.(float64) > 0 {
|
|
|
- budgetNotNilNumP++
|
|
|
- }
|
|
|
- if nd.(float64) > 0 {
|
|
|
- budgetNotNilNumN++
|
|
|
- }
|
|
|
case "bidamount":
|
|
|
bidamount := new(Bidamount)
|
|
|
bidamount.BidamountOld = fmt.Sprint(pd)
|
|
@@ -194,12 +204,6 @@ func Query(num int, sid string) {
|
|
|
bidamount.versionComparison = *versioncomparison
|
|
|
bidamounts = append(bidamounts, bidamount)
|
|
|
bidamountnum++
|
|
|
- if pd.(float64) > 0 {
|
|
|
- bidamountNotNilNumP++
|
|
|
- }
|
|
|
- if nd.(float64) > 0 {
|
|
|
- bidamountNotNilNumN++
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|