|
@@ -66,7 +66,7 @@ var StartId string
|
|
|
func main_inc() {
|
|
|
flag.StringVar(&StartId, "StartId", "", "开始_id")
|
|
|
flag.Parse()
|
|
|
- StartId = "5d12fc62a5cb26b9b750337c"
|
|
|
+ //StartId = "56388138af53745d9a000001"
|
|
|
log.Println("StartId", StartId)
|
|
|
if StartId == "" {
|
|
|
return
|
|
@@ -104,6 +104,9 @@ func getOmitData(startId string) (list []*MegerInfo) {
|
|
|
minfo := &MegerInfo{Lock: &sync.Mutex{}, Minfo: []*Info{}}
|
|
|
var lastId string
|
|
|
for tmp := make(map[string]interface{}); it.Next(tmp); {
|
|
|
+ if qu.IntAll(tmp["repeat"]) == 1 {
|
|
|
+ continue
|
|
|
+ }
|
|
|
if tmp["meger_sflag"] != nil {
|
|
|
continue
|
|
|
}
|
|
@@ -132,6 +135,7 @@ func getOmitData(startId string) (list []*MegerInfo) {
|
|
|
} else {
|
|
|
minfo.EndPublishtime = this.Publishtime
|
|
|
}
|
|
|
+ log.Println(this.Id)
|
|
|
lastId = this.Id
|
|
|
//分段
|
|
|
if (minfo.EndPublishtime-minfo.StartPublishtime)/int64(86400) > DeviationDay*int64(2) || OmitNumMax <= int64(minfo.Num) {
|
|
@@ -210,6 +214,8 @@ func compareMeger(minfo *MegerInfo) {
|
|
|
})
|
|
|
if len(infors) > 0 { //合并项目
|
|
|
info := infors[0]
|
|
|
+ info.Info.Data["cresult"] = info.Cresult
|
|
|
+ info.Info.Data["score"] = info.Score
|
|
|
id := updateinfoInc(info.Info, info.Info.Data, info.Pinfo)
|
|
|
log.Println("合并项目", info.Info.ProjectName, info.Info.ProjectCode, info.Info.Buyer)
|
|
|
switch info.Pkey {
|
|
@@ -271,7 +277,7 @@ func compareScoreMeger(ktype string, pids []string, info *Info) {
|
|
|
if projectInfo == nil {
|
|
|
continue
|
|
|
}
|
|
|
- //拼装projectInfod对象
|
|
|
+ //拼装projectInfo对象
|
|
|
projectInfo.Id = projectInfo.IdInc
|
|
|
projects = append(projects, projectInfo)
|
|
|
}
|