|
@@ -51,7 +51,8 @@ func Query(num int, sid string) {
|
|
|
log.Println("读取文件", err)
|
|
|
return
|
|
|
}
|
|
|
- var projectcodenum, bidamountnum, winnernum, buyernum, budgetnum, projectnamenum int //不相等计数器
|
|
|
+ var projectcodenum, bidamountnum, winnernum, buyernum, budgetnum, projectnamenum int //不相等计数器
|
|
|
+ var projectcodenumXT, bidamountnumXT, winnernumXT, buyernumXT, budgetnumXT, projectnamenumXT int //相等计数器
|
|
|
var pcodeNotNilNumP, bidamountNotNilNumP, winnerNotNilNumP, buyerNotNilNumP, budgetNotNilNumP, pnameNotNilNumP int //不相等计数器
|
|
|
var pcodeNotNilNumN, bidamountNotNilNumN, winnerNotNilNumN, buyerNotNilNumN, budgetNotNilNumN, pnameNotNilNumN int //不相等计数器
|
|
|
|
|
@@ -165,10 +166,18 @@ func Query(num int, sid string) {
|
|
|
case "projectname":
|
|
|
projectname := new(Projectname)
|
|
|
projectname.versionComparison = *versioncomparison
|
|
|
- projectname.ProjectnameOld = fmt.Sprint(pd)
|
|
|
- projectname.ProjectnameNew = fmt.Sprint(nd)
|
|
|
- projectnames = append(projectnames, projectname)
|
|
|
- projectnamenum++
|
|
|
+ pd = strings.Trim(fmt.Sprint(pd), "项目")
|
|
|
+ pd = strings.Trim(strings.TrimSpace(fmt.Sprint(pd)), "采购")
|
|
|
+ nd = strings.Trim(fmt.Sprint(nd), "项目")
|
|
|
+ nd = strings.Trim(strings.TrimSpace(fmt.Sprint(nd)), "采购")
|
|
|
+ if pd != nd{
|
|
|
+ projectname.ProjectnameOld = fmt.Sprint(pd)
|
|
|
+ projectname.ProjectnameNew = fmt.Sprint(nd)
|
|
|
+ projectnames = append(projectnames, projectname)
|
|
|
+ projectnamenum++
|
|
|
+ }else {
|
|
|
+ projectnamenumXT++
|
|
|
+ }
|
|
|
case "buyer":
|
|
|
buyer := new(Buyer)
|
|
|
buyer.versionComparison = *versioncomparison
|
|
@@ -205,6 +214,29 @@ func Query(num int, sid string) {
|
|
|
bidamounts = append(bidamounts, bidamount)
|
|
|
bidamountnum++
|
|
|
}
|
|
|
+ }else {
|
|
|
+ //相同统计
|
|
|
+ pd = strings.TrimSpace(fmt.Sprint(pd))
|
|
|
+ nd = strings.TrimSpace(fmt.Sprint(nd))
|
|
|
+ if pd == ""||pd == "0" || nd == ""|| nd == "0"{
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ if pd == nd {
|
|
|
+ switch k {
|
|
|
+ case "projectname":
|
|
|
+ projectnamenumXT++
|
|
|
+ case "buyer":
|
|
|
+ buyernumXT++
|
|
|
+ case "projectcode":
|
|
|
+ projectcodenumXT++
|
|
|
+ case "winner":
|
|
|
+ winnernumXT++
|
|
|
+ case "budget":
|
|
|
+ budgetnumXT++
|
|
|
+ case "bidamount":
|
|
|
+ bidamountnumXT++
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
fmt.Println()
|
|
@@ -226,7 +258,7 @@ func Query(num int, sid string) {
|
|
|
ivr.Cells[1].SetValue(pnameNotNilNumP)
|
|
|
ivr.Cells[2].SetValue(pnameNotNilNumN)
|
|
|
//结果相同数量
|
|
|
- ivr.Cells[3].SetValue(sum - projectnamenum)
|
|
|
+ ivr.Cells[3].SetValue(projectnamenumXT)
|
|
|
ivr.Cells[3].SetStyle(style)
|
|
|
//结果不同数量
|
|
|
ivr.Cells[4].SetValue(projectnamenum)
|
|
@@ -237,7 +269,7 @@ func Query(num int, sid string) {
|
|
|
ivr.Cells[1].SetValue(buyerNotNilNumP)
|
|
|
ivr.Cells[2].SetValue(buyerNotNilNumN)
|
|
|
//结果相同数量
|
|
|
- ivr.Cells[3].SetValue(sum - buyernum)
|
|
|
+ ivr.Cells[3].SetValue(buyernumXT)
|
|
|
ivr.Cells[3].SetStyle(style)
|
|
|
//结果不同数量
|
|
|
ivr.Cells[4].SetValue(buyernum)
|
|
@@ -248,7 +280,7 @@ func Query(num int, sid string) {
|
|
|
ivr.Cells[1].SetValue(pcodeNotNilNumP)
|
|
|
ivr.Cells[2].SetValue(pcodeNotNilNumN)
|
|
|
//结果相同数量
|
|
|
- ivr.Cells[3].SetValue(sum - projectcodenum)
|
|
|
+ ivr.Cells[3].SetValue(projectcodenumXT)
|
|
|
ivr.Cells[3].SetStyle(style)
|
|
|
//结果不同数量
|
|
|
ivr.Cells[4].SetValue(projectcodenum)
|
|
@@ -259,7 +291,7 @@ func Query(num int, sid string) {
|
|
|
ivr.Cells[1].SetValue(winnerNotNilNumP)
|
|
|
ivr.Cells[2].SetValue(winnerNotNilNumN)
|
|
|
//结果相同数量
|
|
|
- ivr.Cells[3].SetValue(sum - winnernum)
|
|
|
+ ivr.Cells[3].SetValue(winnernumXT)
|
|
|
ivr.Cells[3].SetStyle(style)
|
|
|
//结果不同数量
|
|
|
ivr.Cells[4].SetValue(winnernum)
|
|
@@ -270,7 +302,7 @@ func Query(num int, sid string) {
|
|
|
ivr.Cells[1].SetValue(budgetNotNilNumP)
|
|
|
ivr.Cells[2].SetValue(budgetNotNilNumN)
|
|
|
//结果相同数量
|
|
|
- ivr.Cells[3].SetValue(sum - budgetnum)
|
|
|
+ ivr.Cells[3].SetValue(budgetnumXT)
|
|
|
ivr.Cells[3].SetStyle(style)
|
|
|
//结果不同数量
|
|
|
ivr.Cells[4].SetValue(budgetnum)
|
|
@@ -281,7 +313,7 @@ func Query(num int, sid string) {
|
|
|
ivr.Cells[1].SetValue(bidamountNotNilNumP)
|
|
|
ivr.Cells[2].SetValue(bidamountNotNilNumN)
|
|
|
//结果相同数量
|
|
|
- ivr.Cells[3].SetValue(sum - bidamountnum)
|
|
|
+ ivr.Cells[3].SetValue(bidamountnumXT)
|
|
|
ivr.Cells[3].SetStyle(style)
|
|
|
//结果不同数量
|
|
|
ivr.Cells[4].SetValue(bidamountnum)
|