|
@@ -68,18 +68,18 @@ func quickHeavyMethodOne(v *Info, info *Info, reason string) (bool, string) {
|
|
|
//判重方法2
|
|
|
func quickHeavyMethodTwo(v *Info, info *Info, reason string) (bool, string) {
|
|
|
isMeet := false
|
|
|
- isAgency :=false
|
|
|
+ isAgency := false
|
|
|
//招标类-代理机构不同-广泛前后缀比较
|
|
|
if v.agency != info.agency && v.agency != "" && info.agency != "" {
|
|
|
//新增一层判断
|
|
|
if strings.Contains(v.agency, info.agency) || strings.Contains(info.agency, v.agency) {
|
|
|
isAgency = true
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
return false, reason
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (v.agency == info.agency && v.agency != "" && info.agency != "")|| isAgency {
|
|
|
+ if (v.agency == info.agency && v.agency != "" && info.agency != "") || isAgency {
|
|
|
if info.subtype == "招标" || info.subtype == "邀标" || info.subtype == "询价" ||
|
|
|
info.subtype == "竞谈" || info.subtype == "单一" || info.subtype == "竞价" ||
|
|
|
info.subtype == "变更" || info.subtype == "其他" {
|
|
@@ -179,18 +179,24 @@ func tenderRepeat_A(v *Info, info *Info, reason string) (bool, string) {
|
|
|
ss = ss + "p10-开标地点-"
|
|
|
p10 = true
|
|
|
}
|
|
|
- if len([]rune(v.title)) > 10 && len([]rune(info.title)) > 10 &&
|
|
|
- (strings.Contains(v.title, info.title) || strings.Contains(info.title, v.title)) {
|
|
|
- ss = ss + "p11-标题-"
|
|
|
- p11 = true
|
|
|
+ if len([]rune(v.title)) > 10 && len([]rune(info.title)) > 10 {
|
|
|
+ if strings.Contains(v.title, info.title) || strings.Contains(info.title, v.title) {
|
|
|
+ ss = ss + "p11-标题-"
|
|
|
+ p11 = true
|
|
|
+ } else {
|
|
|
+ if !judgeNameIsDifferent(v.title, info.title) {
|
|
|
+ ss = ss + "p11-标题-"
|
|
|
+ p11 = true
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if info.subtype !=""&&(p1 && p3 && p11) {
|
|
|
+ if info.subtype != "" && (p1 && p3 && p11) {
|
|
|
reason = reason + "满足招标A,3要素组合-" + ss + ","
|
|
|
return true, reason
|
|
|
}
|
|
|
|
|
|
- if (p1 && p2 && p3) || (p1 && p2 && p4) || (p1 && p2 && p9) ||
|
|
|
+ if (p1 && p2 && p3) || (p1 && p2 && p4) || (p1 && p2 && p9) ||
|
|
|
(p1 && p2 && p10) || (p1 && p2 && p11) || (p1 && p3 && p9) || (p1 && p3 && p10) || (p1 && p3 && p4) ||
|
|
|
(p1 && p4 && p9) || (p1 && p4 && p10) || (p2 && p3 && p4) ||
|
|
|
(p2 && p3 && p9) || (p2 && p3 && p10) || (p2 && p3 && p11) ||
|
|
@@ -249,7 +255,7 @@ func tenderRepeat_C(v *Info, info *Info) bool {
|
|
|
if v.budget != 0 && info.budget != 0 && v.budget != info.budget {
|
|
|
return true
|
|
|
}
|
|
|
- if v.bidopentime != 0 && info.bidopentime != 0 && isBidopentimeInterval(info.bidopentime,v.bidopentime) {
|
|
|
+ if v.bidopentime != 0 && info.bidopentime != 0 && isBidopentimeInterval(info.bidopentime, v.bidopentime) {
|
|
|
return true
|
|
|
}
|
|
|
return false
|
|
@@ -273,7 +279,7 @@ func winningRepeat_A(v *Info, info *Info, reason string) (bool, string) {
|
|
|
ss = ss + "p3-编号组--"
|
|
|
p3 = true
|
|
|
}
|
|
|
- if v.bidamount != 0 && !isBidWinningAmount(v.bidamount,info.bidamount) {
|
|
|
+ if v.bidamount != 0 && !isBidWinningAmount(v.bidamount, info.bidamount) {
|
|
|
ss = ss + "p5-中标金-"
|
|
|
p5 = true
|
|
|
}
|
|
@@ -282,15 +288,14 @@ func winningRepeat_A(v *Info, info *Info, reason string) (bool, string) {
|
|
|
p6 = true
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if len([]rune(v.title)) > 10 && len([]rune(info.title)) > 10 &&
|
|
|
(strings.Contains(v.title, info.title) || strings.Contains(info.title, v.title)) {
|
|
|
ss = ss + "p11-标题-"
|
|
|
p11 = true
|
|
|
}
|
|
|
|
|
|
- if (p1 && p2 && p3) || (p1 && p2 && p5) || (p1 && p2 && p6) ||
|
|
|
- (p1 && p2 && p11)|| (p1 && p3 && p11)||
|
|
|
+ if (p1 && p2 && p3) || (p1 && p2 && p5) || (p1 && p2 && p6) ||
|
|
|
+ (p1 && p2 && p11) || (p1 && p3 && p11) ||
|
|
|
(p1 && p3 && p5) || (p1 && p3 && p6) || (p1 && p5 && p6) ||
|
|
|
(p2 && p3 && p5) || (p2 && p3 && p6) || (p2 && p3 && p11) ||
|
|
|
(p2 && p5 && p6) || (p2 && p5 && p11) || (p2 && p6 && p11) ||
|
|
@@ -318,7 +323,7 @@ func winningRepeat_B(v *Info, info *Info, reason string) (bool, string) {
|
|
|
(v.contractnumber != "" && v.contractnumber == info.contractnumber && len(v.contractnumber) >= 5) {
|
|
|
m++
|
|
|
}
|
|
|
- if v.bidamount != 0 && !isBidWinningAmount(v.bidamount,info.bidamount) {
|
|
|
+ if v.bidamount != 0 && !isBidWinningAmount(v.bidamount, info.bidamount) {
|
|
|
m++
|
|
|
}
|
|
|
if v.winner != "" && deleteExtraSpace(v.winner) == deleteExtraSpace(info.winner) {
|
|
@@ -343,11 +348,11 @@ func winningRepeat_B(v *Info, info *Info, reason string) (bool, string) {
|
|
|
//中标_C
|
|
|
func winningRepeat_C(v *Info, info *Info) bool {
|
|
|
|
|
|
- if v.bidamount != 0 && info.bidamount != 0 && isBidWinningAmount(v.bidamount,info.bidamount) {
|
|
|
+ if v.bidamount != 0 && info.bidamount != 0 && isBidWinningAmount(v.bidamount, info.bidamount) {
|
|
|
//避免抽错金额-
|
|
|
- if ((v.projectcode!=""&&info.projectcode!=""&&v.projectcode==info.projectcode)||
|
|
|
- (v.contractnumber!=""&&info.contractnumber!=""&&v.contractnumber==info.contractnumber)) &&
|
|
|
- (v.winner!=""&&info.winner!=""&&v.winner==info.winner) {
|
|
|
+ if ((v.projectcode != "" && info.projectcode != "" && v.projectcode == info.projectcode) ||
|
|
|
+ (v.contractnumber != "" && info.contractnumber != "" && v.contractnumber == info.contractnumber)) &&
|
|
|
+ (v.winner != "" && info.winner != "" && v.winner == info.winner) {
|
|
|
return false
|
|
|
}
|
|
|
return true
|
|
@@ -408,20 +413,14 @@ func contractRepeat_C(v *Info, info *Info) bool {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
//是否相似
|
|
|
-func isTheSimilarName(name1 string,name2 string) bool {
|
|
|
- if strings.Contains(name1,name2) || strings.Contains(name2,name1) {
|
|
|
+func isTheSimilarName(name1 string, name2 string) bool {
|
|
|
+ if strings.Contains(name1, name2) || strings.Contains(name2, name1) {
|
|
|
return true
|
|
|
}
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//快速低质量数据判重
|
|
|
func fastLowQualityHeavy(v *Info, info *Info, reason string) (bool, string) {
|
|
|
//if !isTheSameDay(v.publishtime,info.publishtime) {
|
|
@@ -429,73 +428,70 @@ func fastLowQualityHeavy(v *Info, info *Info, reason string) (bool, string) {
|
|
|
//}
|
|
|
|
|
|
//区间间隔24小时
|
|
|
- if !isTimeIntervalPeriod(v.publishtime,info.publishtime) {
|
|
|
- return false,reason
|
|
|
+ if !isTimeIntervalPeriod(v.publishtime, info.publishtime) {
|
|
|
+ return false, reason
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//首先判定是否为低质量数据 info目标数据
|
|
|
- if info.title!=""&&(info.agency==""||v.agency=="")&&
|
|
|
- (info.title==v.title)&&
|
|
|
- (info.projectcode==""||info.projectcode==v.projectcode)&&
|
|
|
- info.contractnumber==""&&info.buyer=="" {
|
|
|
- isValue:=0//五要素判断
|
|
|
- if info.projectname != "" {//项目名称
|
|
|
+ if info.title != "" && (info.agency == "" || v.agency == "") &&
|
|
|
+ (info.title == v.title) &&
|
|
|
+ (info.projectcode == "" || info.projectcode == v.projectcode) &&
|
|
|
+ info.contractnumber == "" && info.buyer == "" {
|
|
|
+ isValue := 0 //五要素判断
|
|
|
+ if info.projectname != "" { //项目名称
|
|
|
isValue++
|
|
|
}
|
|
|
- if info.budget != 0 {//预算
|
|
|
+ if info.budget != 0 { //预算
|
|
|
isValue++
|
|
|
}
|
|
|
- if info.winner != ""{//中标单位
|
|
|
+ if info.winner != "" { //中标单位
|
|
|
isValue++
|
|
|
}
|
|
|
- if info.bidamount != 0 {//中标金额
|
|
|
+ if info.bidamount != 0 { //中标金额
|
|
|
isValue++
|
|
|
}
|
|
|
- if isValue==0 {
|
|
|
+ if isValue == 0 {
|
|
|
reason = reason + "---低质量-要素均为空-标题满足"
|
|
|
return true, reason
|
|
|
- }else if isValue==1 {
|
|
|
+ } else if isValue == 1 {
|
|
|
isMeet := false
|
|
|
if isMeet, reason = judgeLowQualityData(v, info, reason); isMeet {
|
|
|
reason = reason + "---低质量-有且一个要素组合"
|
|
|
return true, reason
|
|
|
}
|
|
|
- }else if isValue==2{
|
|
|
+ } else if isValue == 2 {
|
|
|
if info.subtype == "采购意向" { //特殊
|
|
|
- if info.projectname!="" && info.projectname == v.projectname &&
|
|
|
+ if info.projectname != "" && info.projectname == v.projectname &&
|
|
|
info.budget != 0 && info.budget == v.budget &&
|
|
|
- info.city != "" && info.city == v.city{
|
|
|
+ info.city != "" && info.city == v.city {
|
|
|
reason = reason + "---采购意向~同城~预算~名称均一致"
|
|
|
- return true,reason
|
|
|
+ return true, reason
|
|
|
}
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- return false,reason
|
|
|
+ return false, reason
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
//类别细节原因记录
|
|
|
func judgeLowQualityData(v *Info, info *Info, reason string) (bool, string) {
|
|
|
- if info.projectname!="" && isTheSimilarName(info.projectname,v.projectname) {
|
|
|
+ if info.projectname != "" && isTheSimilarName(info.projectname, v.projectname) {
|
|
|
reason = reason + "---项目名称"
|
|
|
- return true,reason
|
|
|
+ return true, reason
|
|
|
}
|
|
|
- if info.budget != 0 && info.budget == v.budget{//预算
|
|
|
+ if info.budget != 0 && info.budget == v.budget { //预算
|
|
|
reason = reason + "---预算"
|
|
|
- return true,reason
|
|
|
+ return true, reason
|
|
|
}
|
|
|
- if v.winner != "" && info.winner == v.winner{//中标单位
|
|
|
+ if v.winner != "" && info.winner == v.winner { //中标单位
|
|
|
reason = reason + "---中标单位"
|
|
|
- return true,reason
|
|
|
+ return true, reason
|
|
|
}
|
|
|
- if v.bidamount != 0 && info.bidamount == v.bidamount{//中标金额
|
|
|
+ if v.bidamount != 0 && info.bidamount == v.bidamount { //中标金额
|
|
|
reason = reason + "---中标金额"
|
|
|
- return true,reason
|
|
|
+ return true, reason
|
|
|
}
|
|
|
- return false,reason
|
|
|
-}
|
|
|
+ return false, reason
|
|
|
+}
|