|
@@ -3,6 +3,7 @@ package main
|
|
|
import (
|
|
|
"fmt"
|
|
|
"log"
|
|
|
+ "math"
|
|
|
qutil "qfw/util"
|
|
|
"regexp"
|
|
|
"strings"
|
|
@@ -72,7 +73,7 @@ func TimedTaskDatamap(days int,lasttime int64) *datamap {
|
|
|
n, continuSum := 0, 0
|
|
|
for tmp := make(map[string]interface{}); it.Next(&tmp); n++ {
|
|
|
//qutil.IntAll(tmp["dataging"]) == 1
|
|
|
- if qutil.IntAll(tmp["repeat"]) == 1 || qutil.IntAll(tmp["repeat"]) == -1||qutil.IntAll(tmp["dataging"]) == 1 {
|
|
|
+ if qutil.IntAll(tmp["repeat"]) == 1 || qutil.IntAll(tmp["repeat"]) == -1 {
|
|
|
|
|
|
} else {
|
|
|
pt := tmp["publishtime"]
|
|
@@ -106,7 +107,7 @@ func TimedTaskDatamap(days int,lasttime int64) *datamap {
|
|
|
}
|
|
|
}
|
|
|
if n%50000 == 0 {
|
|
|
- log.Println("current 数据池:", n, continuSum)
|
|
|
+ log.Println("当前数据池:", n, continuSum)
|
|
|
}
|
|
|
tmp = make(map[string]interface{})
|
|
|
}
|
|
@@ -132,12 +133,16 @@ func NewDatamap(days int, lastid string) *datamap {
|
|
|
"$lte": StringTOBsonId(lastid),
|
|
|
}}
|
|
|
log.Println("query", query)
|
|
|
- it := sess.DB(mgo.DbName).C(extract).Find(query).Sort("-_id").Iter()
|
|
|
+ sortName := "-_id"
|
|
|
+ if Is_Sort {
|
|
|
+ sortName = "-publishtime"
|
|
|
+ }
|
|
|
+ it := sess.DB(mgo.DbName).C(extract).Find(query).Sort(sortName).Iter()
|
|
|
now1 := int64(0)
|
|
|
n, continuSum := 0, 0
|
|
|
for tmp := make(map[string]interface{}); it.Next(&tmp); n++ {
|
|
|
- if qutil.IntAll(tmp["repeat"]) == 1 || qutil.IntAll(tmp["repeat"]) == -1 {
|
|
|
- continuSum++
|
|
|
+ if qutil.IntAll(tmp["repeat"]) == 1 || qutil.IntAll(tmp["repeat"]) == -1{
|
|
|
+
|
|
|
} else {
|
|
|
pt := tmp["comeintime"]
|
|
|
if Is_Sort {
|
|
@@ -151,6 +156,7 @@ func NewDatamap(days int, lastid string) *datamap {
|
|
|
now1 = pt_time
|
|
|
}
|
|
|
if qutil.Float64All(now1-pt_time) < datelimit {
|
|
|
+ continuSum++
|
|
|
info := NewInfo(tmp)
|
|
|
dkey := qutil.FormatDateWithObj(&pt, qutil.Date_yyyyMMdd)
|
|
|
k := fmt.Sprintf("%s_%s_%s", dkey, info.subtype, info.area)
|
|
@@ -178,11 +184,11 @@ func NewDatamap(days int, lastid string) *datamap {
|
|
|
}
|
|
|
}
|
|
|
if n%5000 == 0 {
|
|
|
- log.Println("current n:", n, continuSum)
|
|
|
+ log.Println("当前 n:", n,"数量:" ,continuSum)
|
|
|
}
|
|
|
tmp = make(map[string]interface{})
|
|
|
}
|
|
|
- log.Println("load data:", n)
|
|
|
+ log.Println("load data:", n,"总数:",continuSum)
|
|
|
return dm
|
|
|
}
|
|
|
|
|
@@ -257,59 +263,57 @@ L:
|
|
|
data := d.data[k]
|
|
|
d.lock.Unlock()
|
|
|
if len(data) > 0 { //对比v 找到同类型,同省或全国的数据作对比
|
|
|
- //log.Println(info.area,info.subtype,k)
|
|
|
for _, v := range data {
|
|
|
reason = ""
|
|
|
if v.id == info.id { //正常重复
|
|
|
return false, v, ""
|
|
|
}
|
|
|
- //if v.id == "5c761a4fa5cb26b9b73d9512" &&info.id=="5c767bd1a5cb26b9b7a61597" {
|
|
|
- // log.Println("测试数据")
|
|
|
- //}
|
|
|
-
|
|
|
- if info.subtype == v.subtype {
|
|
|
- if info.site != "" {
|
|
|
- sitelock.Lock()
|
|
|
- dict := SiteMap[info.site]
|
|
|
- sitelock.Unlock()
|
|
|
- if dict != nil {
|
|
|
- if info.area == "全国" && dict["area"] != "" {
|
|
|
- info.is_site = true
|
|
|
- info.area = qutil.ObjToString(dict["area"])
|
|
|
- info.city = qutil.ObjToString(dict["city"])
|
|
|
- } else {
|
|
|
- if info.city == "" && dict["city"] != "" {
|
|
|
- info.is_site = true
|
|
|
- info.area = qutil.ObjToString(dict["area"])
|
|
|
- info.city = qutil.ObjToString(dict["city"])
|
|
|
- }
|
|
|
- }
|
|
|
+ if info.site != "" {//站点临时赋值
|
|
|
+ sitelock.Lock()
|
|
|
+ dict := SiteMap[info.site]
|
|
|
+ sitelock.Unlock()
|
|
|
+ if dict != nil {
|
|
|
+ if (info.area == "全国" && dict["area"] != "")||
|
|
|
+ (info.city == "" && dict["city"] != ""){
|
|
|
+ info.is_site = true
|
|
|
+ info.area = qutil.ObjToString(dict["area"])
|
|
|
+ info.city = qutil.ObjToString(dict["city"])
|
|
|
}
|
|
|
}
|
|
|
- //前置条件1 - 站点相关
|
|
|
- if info.site != "" && info.site == v.site {
|
|
|
- if info.href != "" && info.href == v.href {
|
|
|
- reason = "href相同"
|
|
|
+ }
|
|
|
+ //前置条件1 - 站点相关
|
|
|
+ if info.site != "" && info.site == v.site {
|
|
|
+ if info.href != "" && info.href == v.href {
|
|
|
+ reason = "同站点-href相同"
|
|
|
+ b = true
|
|
|
+ source = v
|
|
|
+ reasons = reason
|
|
|
+ break L
|
|
|
+ }
|
|
|
+ if info.href != "" && info.href != v.href {
|
|
|
+ if v.title==info.title && isTheSameDay(info.publishtime,v.publishtime){
|
|
|
+ reason = "同站点-href不同-标题相同"
|
|
|
b = true
|
|
|
source = v
|
|
|
reasons = reason
|
|
|
break L
|
|
|
- }
|
|
|
- if info.href != "" && info.href != v.href {
|
|
|
- reason = "href不同-"
|
|
|
+ }else {
|
|
|
+ continue
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- //前置条件2 - 标题相关,有且一个关键词
|
|
|
- if ((info.titleSpecialWord && !v.titleSpecialWord) || (info.specialWord && !v.specialWord)) &&
|
|
|
- info.title != v.title && v.title != "" && info.title != "" {
|
|
|
+ specialNum:= dealWithSpecialWordNumber(info,v)
|
|
|
+ //前置条件2 - 标题相关,有且一个关键词
|
|
|
+ if specialNum==1 {
|
|
|
+ if info.title != v.title && v.title != "" && info.title != "" {
|
|
|
continue
|
|
|
}
|
|
|
-
|
|
|
- //前置条件3 - 标题相关,均含有关键词
|
|
|
- if ((info.titleSpecialWord && v.titleSpecialWord) || (info.specialWord && v.specialWord)) &&
|
|
|
- len([]rune(v.title)) > 10 && len([]rune(info.title)) > 10 && v.title != "" && info.title != "" {
|
|
|
-
|
|
|
+ }
|
|
|
+ //前置条件3 - 标题相关,均含有关键词
|
|
|
+ if specialNum==2 {
|
|
|
+ if len([]rune(v.title)) > 10 && len([]rune(info.title)) > 10 &&
|
|
|
+ v.title != "" && info.title != "" {
|
|
|
letter1,letter2:=v.title,info.title
|
|
|
res, _ := regexp.Compile("[0-9a-zA-Z]+");
|
|
|
if res.MatchString(letter1)||res.MatchString(letter2) {
|
|
@@ -319,62 +323,66 @@ L:
|
|
|
if strings.Contains(letter1,"重新招标")|| strings.Contains(letter2,"重新招标"){
|
|
|
letter1,letter2=dealWithSpecialPhrases(letter1,letter2)
|
|
|
}
|
|
|
- if !(strings.Contains(letter1, letter2) || strings.Contains(letter2, letter1)) {
|
|
|
- continue
|
|
|
- }else {
|
|
|
- reason = reason + "标题关键词且包含关系"
|
|
|
+ if letter1==letter2 {
|
|
|
+ reason = reason + "标题关键词相等关系"
|
|
|
if !againRepeat(v, info) {//继续二级金额判断
|
|
|
b = true
|
|
|
source = v
|
|
|
reasons = reason
|
|
|
break L
|
|
|
+ }else {
|
|
|
+ if !(strings.Contains(letter1, letter2) || strings.Contains(letter2, letter1)) {
|
|
|
+ //无包含关系-即不相等
|
|
|
+ continue
|
|
|
+ }else {
|
|
|
+ //有包含关系走要素判重逻辑
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ //新增快速数据过少判重
|
|
|
+ if LowHeavy {
|
|
|
+ repeat := false
|
|
|
+ if repeat, reason = fastLowQualityHeavy(v, info, reason); repeat {
|
|
|
+ b = true
|
|
|
+ source = v
|
|
|
+ reasons = reason
|
|
|
+ break L
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- //新增快速数据过少判重
|
|
|
- if LowHeavy {
|
|
|
+ //代理机构相同-非空相等
|
|
|
+ if v.agency != "" && info.agency != "" && v.agency == info.agency {
|
|
|
+ reason = reason + "同机构-"
|
|
|
+ repeat := false
|
|
|
+ if repeat, reason = quickHeavyMethodTwo(v, info, reason); repeat {
|
|
|
+ b = true
|
|
|
+ source = v
|
|
|
+ reasons = reason
|
|
|
+ break L
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ reason = reason + "非同机构-"
|
|
|
+ if info.city != "" && info.city == v.city {
|
|
|
+ reason = reason + "同城-"
|
|
|
repeat := false
|
|
|
- if repeat, reason = fastLowQualityHeavy(v, info, reason); repeat {
|
|
|
+ if repeat, reason = quickHeavyMethodTwo(v, info, reason); repeat {
|
|
|
b = true
|
|
|
source = v
|
|
|
reasons = reason
|
|
|
break L
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- //代理机构相同-非空相等
|
|
|
- if v.agency != "" && info.agency != "" && v.agency == info.agency {
|
|
|
- reason = reason + "同机构-"
|
|
|
+ } else {
|
|
|
+ reason = reason + "不同城-"
|
|
|
repeat := false
|
|
|
- if repeat, reason = quickHeavyMethodTwo(v, info, reason); repeat {
|
|
|
+ if repeat, reason = quickHeavyMethodOne(v, info, reason); repeat {
|
|
|
b = true
|
|
|
source = v
|
|
|
reasons = reason
|
|
|
break L
|
|
|
}
|
|
|
- } else {
|
|
|
- reason = reason + "非同机构-"
|
|
|
- if info.city != "" && info.city == v.city {
|
|
|
- reason = reason + "同城-"
|
|
|
- repeat := false
|
|
|
- if repeat, reason = quickHeavyMethodTwo(v, info, reason); repeat {
|
|
|
- b = true
|
|
|
- source = v
|
|
|
- reasons = reason
|
|
|
- break L
|
|
|
- }
|
|
|
- } else {
|
|
|
- reason = reason + "不同城-"
|
|
|
- repeat := false
|
|
|
- if repeat, reason = quickHeavyMethodOne(v, info, reason); repeat {
|
|
|
- b = true
|
|
|
- source = v
|
|
|
- reasons = reason
|
|
|
- break L
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -424,8 +432,25 @@ L:
|
|
|
}
|
|
|
//替换原始数据池
|
|
|
func (d *datamap) replaceSourceData(newData *Info, oldData *Info) {
|
|
|
- ct := newData.comeintime
|
|
|
+ //删除数据池的老数据
|
|
|
+ ct_old := oldData.comeintime
|
|
|
if Is_Sort||TimingTask {
|
|
|
+ ct_old = oldData.publishtime
|
|
|
+ }
|
|
|
+ dkey_old := qutil.FormatDateByInt64(&ct_old, qutil.Date_yyyyMMdd)
|
|
|
+ k_old := fmt.Sprintf("%s_%s_%s", dkey_old, oldData.subtype, oldData.area)
|
|
|
+ data_old := d.data[k_old]
|
|
|
+ for k, v := range data_old {
|
|
|
+ if v.id == oldData.id {//删除对应当前的老数据
|
|
|
+ data_old = append(data_old[:k], data_old[k+1:]...)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ d.data[k_old] = data_old
|
|
|
+
|
|
|
+ //添加新的
|
|
|
+ ct := newData.comeintime
|
|
|
+ if Is_Sort ||TimingTask{
|
|
|
ct = newData.publishtime
|
|
|
}
|
|
|
dkey := qutil.FormatDateByInt64(&ct, qutil.Date_yyyyMMdd)
|
|
@@ -437,43 +462,26 @@ func (d *datamap) replaceSourceData(newData *Info, oldData *Info) {
|
|
|
d.data[k] = data
|
|
|
if !d.keys[dkey] {
|
|
|
d.keys[dkey] = true
|
|
|
+ d.update(ct)
|
|
|
}
|
|
|
} else {
|
|
|
- //遍历替换
|
|
|
- isReplace := false
|
|
|
- for k, v := range data {
|
|
|
- if v.id == oldData.id {
|
|
|
- data[k] = newData //同天_type_area 替换
|
|
|
- isReplace = true
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- if !isReplace {
|
|
|
- //添加新数据 删除老数据
|
|
|
- data = append(data,newData)
|
|
|
- ct_old := oldData.comeintime
|
|
|
- if Is_Sort||TimingTask {
|
|
|
- ct_old = oldData.publishtime
|
|
|
- }
|
|
|
- dkey_old := qutil.FormatDateByInt64(&ct_old, qutil.Date_yyyyMMdd)
|
|
|
- k_old := fmt.Sprintf("%s_%s_%s", dkey_old, oldData.subtype, oldData.area)
|
|
|
- data_old := d.data[k_old]
|
|
|
- if len(data_old)==1 {
|
|
|
- delete(d.data ,k_old)
|
|
|
- } else {
|
|
|
- for k, v := range data_old {
|
|
|
- if v.id == oldData.id {
|
|
|
- //删除对应当前的
|
|
|
- data_old = append(data_old[:k], data_old[k+1:]...)
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- d.data[k_old] = data_old
|
|
|
- }
|
|
|
- }else {
|
|
|
- d.data[k] = data
|
|
|
+ data = append(data, newData)
|
|
|
+ d.data[k] = data
|
|
|
+ }
|
|
|
+ //添加省
|
|
|
+ isAreaExist :=false
|
|
|
+ for _,v:= range d.areakeys {
|
|
|
+ if v==newData.area {
|
|
|
+ isAreaExist = true
|
|
|
}
|
|
|
}
|
|
|
+ if !isAreaExist {
|
|
|
+ areaArr := d.areakeys
|
|
|
+ areaArr = append(areaArr,newData.area)
|
|
|
+ d.areakeys = areaArr
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
d.lock.Unlock()
|
|
|
}
|
|
|
|
|
@@ -550,7 +558,17 @@ func dealWithSpecialPhrases(str1 string,str2 string) (string,string) {
|
|
|
}
|
|
|
return newStr1,newStr2
|
|
|
}
|
|
|
-
|
|
|
+//关键词数量v
|
|
|
+func dealWithSpecialWordNumber(info*Info,v*Info) int {
|
|
|
+ okNum:=0
|
|
|
+ if info.titleSpecialWord || info.specialWord {
|
|
|
+ okNum++
|
|
|
+ }
|
|
|
+ if v.titleSpecialWord || v.specialWord {
|
|
|
+ okNum++
|
|
|
+ }
|
|
|
+ return okNum
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
|
@@ -602,7 +620,7 @@ func judgeLowQualityData(v *Info, info *Info, reason string) (bool, string) {
|
|
|
reason = reason + "---招标类:预算"
|
|
|
return true,reason
|
|
|
}
|
|
|
- if info.bidopentime != 0 && info.bidopentime == v.bidopentime{//开标时间
|
|
|
+ if info.bidopentime != 0 && info.bidopentime==v.bidopentime{//开标时间
|
|
|
reason = reason + "---招标类:开标时间"
|
|
|
return true,reason
|
|
|
}
|
|
@@ -626,7 +644,7 @@ func judgeLowQualityData(v *Info, info *Info, reason string) (bool, string) {
|
|
|
reason = reason + "---合同类:预算"
|
|
|
return true,reason
|
|
|
}
|
|
|
- if info.bidopentime != 0 && info.bidopentime == v.bidopentime{//开标时间
|
|
|
+ if info.bidopentime != 0 && info.bidopentime==v.bidopentime{//开标时间
|
|
|
reason = reason + "---合同类:开标时间"
|
|
|
return true,reason
|
|
|
}
|
|
@@ -648,7 +666,7 @@ func judgeLowQualityData(v *Info, info *Info, reason string) (bool, string) {
|
|
|
reason = reason + "---类别空-招标类:预算"
|
|
|
return true,reason
|
|
|
}
|
|
|
- if info.bidopentime != 0 && info.bidopentime == v.bidopentime{//开标时间
|
|
|
+ if info.bidopentime != 0 && info.bidopentime==v.bidopentime{//开标时间
|
|
|
reason = reason + "---类别空-招标类:开标时间"
|
|
|
return true,reason
|
|
|
}
|
|
@@ -804,38 +822,38 @@ func tenderRepeat_A(v *Info, info *Info, reason string) (bool, string) {
|
|
|
var ss string
|
|
|
p1, p2, p3, p4, p9, p10, p11 := false, false, false, false, false, false, false
|
|
|
if v.projectname != "" && v.projectname == info.projectname {
|
|
|
- ss = ss + "p1(名称)-"
|
|
|
+ ss = ss + "p1-名称-"
|
|
|
p1 = true
|
|
|
}
|
|
|
if v.buyer != "" && v.buyer == info.buyer {
|
|
|
- ss = ss + "p2(单位)-"
|
|
|
+ ss = ss + "p2-单位-"
|
|
|
p2 = true
|
|
|
}
|
|
|
if (v.projectcode != "" && v.projectcode == info.projectcode && len(v.projectcode) >= 5) ||
|
|
|
(v.contractnumber != "" && v.contractnumber == info.contractnumber && len(v.contractnumber) >= 5) {
|
|
|
- ss = ss + "p3(编号组)-"
|
|
|
+ ss = ss + "p3-编号组-"
|
|
|
p3 = true
|
|
|
}
|
|
|
if v.budget != 0 && v.budget == info.budget {
|
|
|
- ss = ss + "p4(预算)-"
|
|
|
+ ss = ss + "p4-预算-"
|
|
|
p4 = true
|
|
|
}
|
|
|
if v.bidopentime != 0 && v.bidopentime == info.bidopentime {
|
|
|
- ss = ss + "p9(开标时间)-"
|
|
|
+ ss = ss + "p9-开标时间相同-"
|
|
|
p9 = true
|
|
|
}
|
|
|
if v.bidopenaddress != "" && v.bidopenaddress == info.bidopenaddress {
|
|
|
- ss = ss + "p10(开标地点)-"
|
|
|
+ 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(标题)-"
|
|
|
+ ss = ss + "p11-标题-"
|
|
|
p11 = true
|
|
|
}
|
|
|
|
|
|
- if (p1 && p2 && p4) || (p1 && p2 && p9) ||
|
|
|
- (p1 && p2 && p10) || (p1 && p2 && p11) || (p1 && p3 && p9) || (p1 && p3 && p10) ||
|
|
|
+ if (p1 && p2 && p3) || (p1 && p2 && p4) || (p1 && p2 && p9) || (p1 && p2 && p10) ||
|
|
|
+ (p1 && p2 && p11) || (p1 && p3 && p9) || (p1 && p3 && p10) ||
|
|
|
(p1 && p4 && p9) || (p1 && p4 && p10) || (p2 && p3 && p4) ||
|
|
|
(p2 && p3 && p9) || (p2 && p3 && p10) || (p2 && p3 && p11) ||
|
|
|
(p2 && p4 && p9) || (p2 && p4 && p10) || (p2 && p4 && p11) ||
|
|
@@ -891,16 +909,16 @@ func tenderRepeat_B(v *Info, info *Info, reason string) (bool, string) {
|
|
|
func tenderRepeat_C(v *Info, info *Info) bool {
|
|
|
|
|
|
if v.budget != 0 && info.budget != 0 && v.budget != info.budget {
|
|
|
-
|
|
|
return true
|
|
|
}
|
|
|
//原始地址...
|
|
|
if v.buyer != "" && info.buyer != "" && v.buyer != info.buyer {
|
|
|
return true
|
|
|
}
|
|
|
- //if v.bidopentime != 0 && info.bidopentime != 0 && v.bidopentime != info.bidopentime {
|
|
|
- // return true
|
|
|
- //}
|
|
|
+
|
|
|
+ if v.bidopentime != 0 && info.bidopentime != 0 && isBidopentimeInterval(info.bidopentime,v.bidopentime) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
//if v.bidopenaddress != "" && info.bidopenaddress != "" && v.bidopenaddress != info.bidopenaddress {
|
|
|
// return true
|
|
|
//}
|
|
@@ -914,31 +932,31 @@ func winningRepeat_A(v *Info, info *Info, reason string) (bool, string) {
|
|
|
var ss string
|
|
|
p1, p2, p3, p5, p6, p11 := false, false, false, false, false, false
|
|
|
if v.projectname != "" && v.projectname == info.projectname {
|
|
|
- ss = ss + "p1(项目名称)-"
|
|
|
+ ss = ss + "p1-项目名称-"
|
|
|
p1 = true
|
|
|
}
|
|
|
if v.buyer != "" && v.buyer == info.buyer {
|
|
|
- ss = ss + "p2(单位)-"
|
|
|
+ ss = ss + "p2-单位-"
|
|
|
p2 = true
|
|
|
}
|
|
|
if (v.projectcode != "" && v.projectcode == info.projectcode && len(v.projectcode) >= 5) ||
|
|
|
(v.contractnumber != "" && v.contractnumber == info.contractnumber && len(v.contractnumber) >= 5) {
|
|
|
- ss = ss + "p3(编号组)-"
|
|
|
+ ss = ss + "p3-编号组--"
|
|
|
p3 = true
|
|
|
}
|
|
|
if v.bidamount != 0 && !isBidWinningAmount(v.bidamount,info.bidamount) {
|
|
|
- ss = ss + "p5(中标金)-"
|
|
|
+ ss = ss + "p5-中标金-"
|
|
|
p5 = true
|
|
|
}
|
|
|
if v.winner != "" && deleteExtraSpace(v.winner) == deleteExtraSpace(info.winner) {
|
|
|
- ss = ss + "p6(中标人)-"
|
|
|
+ ss = ss + "p6-中标人-"
|
|
|
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(标题)-"
|
|
|
+ ss = ss + "p11-标题-"
|
|
|
p11 = true
|
|
|
}
|
|
|
|
|
@@ -1080,7 +1098,10 @@ func againRepeat(v *Info, info *Info) bool {
|
|
|
return true
|
|
|
}
|
|
|
} else {
|
|
|
-
|
|
|
+ //预算金额满足条件
|
|
|
+ if v.budget != info.budget && v.budget != 0 && info.budget != 0 {
|
|
|
+ return true
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1113,8 +1134,40 @@ func isBidWinningAmount(f1 float64 ,f2 float64) bool {
|
|
|
}
|
|
|
|
|
|
|
|
|
+//开标时间区间为一天
|
|
|
+func isBidopentimeInterval(i1 int64 ,i2 int64) bool {
|
|
|
+ if i1==0||i2==0 {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ //不在同一天-或者同一天间隔超过六小时,属于不相等返回true
|
|
|
+ timeOne,timeTwo:=i1,i2
|
|
|
+ day1 := qutil.FormatDateByInt64(&timeOne, qutil.Date_yyyyMMdd)
|
|
|
+ day2 := qutil.FormatDateByInt64(&timeTwo, qutil.Date_yyyyMMdd)
|
|
|
+ if day1==day2 {
|
|
|
+ //是否间隔超过六小时
|
|
|
+ if math.Abs(float64(i1-i2)) >21600.0 {
|
|
|
+ return true
|
|
|
+ }else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
-
|
|
|
+//开标时间区间为一天
|
|
|
+func isTheSameDay(i1 int64 ,i2 int64) bool {
|
|
|
+ if i1==0||i2==0 {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ timeOne,timeTwo:=i1,i2
|
|
|
+ day1 := qutil.FormatDateByInt64(&timeOne, qutil.Date_yyyyMMdd)
|
|
|
+ day2 := qutil.FormatDateByInt64(&timeTwo, qutil.Date_yyyyMMdd)
|
|
|
+ if day1==day2 {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
|
|
|
|
|
|
|