check_bidamount.go 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package main
  2. import (
  3. qu "qfw/util"
  4. "regexp"
  5. )
  6. var classScopeReg *regexp.Regexp = regexp.MustCompile("(建筑工程|交通工程|市政设施)")
  7. //中标金额
  8. func getCheckDataBidamount(tmp map[string]interface{},update_check *map[string]interface{}) {
  9. modifycheck := make(map[string]interface{},0)
  10. if (*update_check)["modifycheck"] != nil {
  11. modifycheck = *qu.ObjToMap((*update_check)["modifycheck"])
  12. }
  13. bidamount := qu.Float64All(tmp["bidamount"])
  14. spidercode := qu.ObjToString("spidercode")
  15. //指定网站-数据
  16. /*
  17. cq_cqsggzyjyzx_zfcg_zbgs 符合标准 9条
  18. ln_lnzfcgw_gggs_jggg 符合标准 555条
  19. a_zgzfcgw_dfgg_zongb_new 中国政府采购网 不太符合
  20. a_zgzfcgw_bid_tender_new 中国政府采购网 不太符合
  21. */
  22. if spidercode=="cq_cqsggzyjyzx_zfcg_zbgs" || spidercode == "ln_lnzfcgw_gggs_jggg" {
  23. if bidamount>1000000000.0 {
  24. new_bidamount := bidamount/float64(10000)
  25. (*update_check)["bidamount"] = new_bidamount
  26. modifycheck["bidamount"] = "爬虫倍率"
  27. (*update_check)["modifycheck"] = modifycheck
  28. return
  29. }
  30. }
  31. //按照行业-划分-太粗糙易出错-省略
  32. //if topscopeclass, ok := tmp["topscopeclass"].(primitive.A);(bidamount>0.0&&ok&&len(topscopeclass)>0){
  33. // isTrue := false
  34. // for _,v := range topscopeclass{
  35. // if classScopeReg.MatchString(qu.ObjToString(v)) {
  36. // isTrue = true
  37. // break
  38. // }
  39. // }
  40. // if !isTrue && bidamount>1000000000.0 {
  41. // new_bidamount := bidamount/float64(10000)
  42. // (*update_check)["bidamount"] = new_bidamount
  43. // modifycheck["bidamount"] = "行业倍率"
  44. // (*update_check)["modifycheck"] = modifycheck
  45. // return
  46. // }
  47. //}
  48. }