|
@@ -106,8 +106,6 @@ func hasBuyer(p PCBV, thisinfo *Info, tmp map[string]interface{}) {
|
|
|
scores, pncb := score3Select2(p, thisinfo, tmp)
|
|
|
//项目合并
|
|
|
sflag = mergeProject(tmp, thisinfo, scores, pncb)
|
|
|
- //pncbMap解锁
|
|
|
- unlockPNCBMap(thisinfo)
|
|
|
} else {
|
|
|
//生成项目,不参与后续对比
|
|
|
sflag = "alone"
|
|
@@ -131,16 +129,12 @@ func noBuyer(p PCBV, thisinfo *Info, tmp map[string]interface{}) {
|
|
|
scores, pncb := score3Select2(p, thisinfo, tmp)
|
|
|
//项目合并
|
|
|
sflag = mergeProject(tmp, thisinfo, scores, pncb)
|
|
|
- //pncbMap解锁
|
|
|
- unlockPNCBMap(thisinfo)
|
|
|
} else { //无项目编号
|
|
|
if p.PnameLen > MegerFieldsLen.ProjectNamelen {
|
|
|
//三选一打分
|
|
|
scores, pncb := score3Select1(p, thisinfo, tmp)
|
|
|
//项目合并
|
|
|
sflag = mergeProject(tmp, thisinfo, scores, pncb)
|
|
|
- //pncbMap解锁
|
|
|
- unlockPNCBMap(thisinfo)
|
|
|
} else {
|
|
|
//生成项目,不参与后续对比
|
|
|
sflag = "alone"
|
|
@@ -159,8 +153,6 @@ func noBuyer(p PCBV, thisinfo *Info, tmp map[string]interface{}) {
|
|
|
scores, pncb := score3Select1(p, thisinfo, tmp)
|
|
|
//项目合并
|
|
|
sflag = mergeProject(tmp, thisinfo, scores, pncb)
|
|
|
- //pncbMap解锁
|
|
|
- unlockPNCBMap(thisinfo)
|
|
|
} else {
|
|
|
//生成项目,不参与后续对比
|
|
|
sflag = "alone"
|
|
@@ -579,20 +571,19 @@ func lockPNCBMap(thisinfo *Info) {
|
|
|
if ok {
|
|
|
break
|
|
|
}
|
|
|
- time.Sleep(10 * time.Millisecond)
|
|
|
}
|
|
|
PncbMayLock.Unlock()
|
|
|
}
|
|
|
|
|
|
//pncbMap解锁
|
|
|
func unlockPNCBMap(thisinfo *Info) {
|
|
|
- if len(thisinfo.PNKey) > 2 {
|
|
|
+ if len(thisinfo.PNKey) > 3 {
|
|
|
PNKeyMap.Delete(thisinfo.PNKey)
|
|
|
}
|
|
|
- if len(thisinfo.PCKey) > 2 {
|
|
|
+ if len(thisinfo.PCKey) > 3 {
|
|
|
PCKeyMap.Delete(thisinfo.PCKey)
|
|
|
}
|
|
|
- if len(thisinfo.PBKey) > 2 {
|
|
|
+ if len(thisinfo.PBKey) > 3 {
|
|
|
PBKeyMap.Delete(thisinfo.PBKey)
|
|
|
}
|
|
|
}
|