|
@@ -315,7 +315,7 @@ func processUdpMsg(act byte, data []byte, ra *net.UDPAddr) {
|
|
|
go config.Udpclient.WriteUdp([]byte(`{"id":"`+newId.(bson.ObjectId).Hex()+`","permission":"ocr_task"}`), mu.OP_TYPE_DATA, ra) //分发任务
|
|
|
//if config.IsRun {
|
|
|
// tmpdatas := mongodb.Find("ocr_task", bson.M{"isrun":"stop"}, `{"_id":1}`, nil, false, -1, -1)
|
|
|
- totmp := make(map[string]string)
|
|
|
+ totmp := make(map[string]interface{})
|
|
|
totmp["stype"] = "fujian"
|
|
|
totmp["lteid"] = qu.ObjToString(tmp[qu.ObjToString(config.EidField)])
|
|
|
//if tmpdatas == nil || len(*tmpdatas) == 0{
|
|
@@ -327,6 +327,11 @@ func processUdpMsg(act byte, data []byte, ra *net.UDPAddr) {
|
|
|
// mongodb.Save("ocr_flie_over",totmp)
|
|
|
// }
|
|
|
//}
|
|
|
+ tmpSumNum := mongodb.Count("bidding", bson.M{"_id": bson.M{
|
|
|
+ "$gte": bson.ObjectIdHex(qu.ObjToString(tmp[qu.ObjToString("start")])),
|
|
|
+ "$lte": bson.ObjectIdHex(eid),
|
|
|
+ }})
|
|
|
+ totmp["count"] = tmpSumNum
|
|
|
tobyte, _ := json.Marshal(totmp)
|
|
|
mongodb.Save("ocr_flie_over",string(tobyte))
|
|
|
//go config.Udpclient.WriteUdp(tobyte, mu.OP_TYPE_DATA, &net.UDPAddr{
|