| | |
| | | if (timeReq.ProductionDate1.Length == 8) productTime = productTime.Substring(0, 4) + "-" + productTime.Substring(4, 2) + "-" + productTime.Substring(6, 2); |
| | | |
| | | CMMLog.Info("time 05"); |
| | | var timeCuo = MongoDBSingleton.Instance.FindOne<TimeCuoInfoCom>(Query.EQ("packingMachineNumber", timeReq.packingMachineNumber_1), "TimeCuoInfoCom"); |
| | | var timeCuo = MongoDBSingleton.Instance.FindOne<TimeCuoInfoCom>(Query.EQ("timeReq", timeReq.timeStamp), "TimeCuoInfoCom"); |
| | | if (timeCuo == null) |
| | | { |
| | | MongoDBSingleton.Instance.Insert<TimeCuoInfoCom>(new TimeCuoInfoCom |
| | |
| | | //bagNumber = timeReq.bagNumber_1+","+timeReq.bagNumber_2, |
| | | needWeight = timeReq.needWeight_1 / 100, |
| | | realWeight = timeReq.realWeight_1 / 100, |
| | | totalWeight = timeReq.totalWeight, |
| | | totalWeight = timeReq.totalWeight / 100, |
| | | batchNumber = timeReq.batchNumber, |
| | | productModel = timeReq.productModel, |
| | | bagNumber_1 = timeReq.bagNumber_1, |
| | |
| | | } |
| | | else |
| | | { |
| | | var query = Query.EQ("packingMachineNumber", timeReq.packingMachineNumber_1); |
| | | var query = Query.EQ("timeReq", timeReq.timeStamp); |
| | | //UpdateBuilder update = Update.Set("isFold", timeReq.isFold).Set("realWeight", timeReq.realWeight_1 / 100).Set("totalWeight", timeReq.totalWeight) |
| | | // .Set("batchNumber", timeReq.batchNumber).Set("productModel", timeReq.productModel).Set("needWeight", timeReq.needWeight_1).Set("bagNumber", timeReq.bagNumber_1).Set("isNeedTray", timeReq.isNeedTray) |
| | | // .Set("totalCount", timeReq.totalCount).Set("timeStamp", timeReq.timeStamp).Set("photoURL", timeReq.photoURL).Set("ProductionDate", productTime) |
| | |
| | | UpdateBuilder update = Update.Set("isFold", timeReq.isFold).Set("realWeight", timeReq.realWeight_1 / 100).Set("totalWeight", timeReq.totalWeight) |
| | | .Set("batchNumber", timeReq.batchNumber).Set("productModel", timeReq.productModel).Set("needWeight", timeReq.needWeight_1 / 100) |
| | | .Set("bagNumber_1", timeReq.bagNumber_1).Set("bagNumber_2", timeReq.bagNumber_2).Set("bagNumber_3", timeReq.bagNumber_3).Set("bagNumber_4", timeReq.bagNumber_4) |
| | | .Set("isNeedTray", timeReq.isNeedTray) |
| | | .Set("isNeedTray", timeReq.isNeedTray).Set("packingMachineNumber", timeReq.packingMachineNumber_1) |
| | | .Set("totalCount", timeReq.totalCount).Set("timeStamp", timeReq.timeStamp).Set("photoURL", timeReq.photoURL).Set("ProductionDate", productTime) |
| | | .Set("materialCode", timeReq.materialCode).Set("materialName", timeReq.materialName).Set("measurementUnit", timeReq.measurementUnit) |
| | | .Set("createOrganization", timeReq.createOrganization).Set("count", timeReq.count).Set("WarehouseCode", timeReq.WarehouseCode) |
| | |
| | | /// <summary> |
| | | /// 时间戳 |
| | | /// </summary> |
| | | public int timeStamp { get; set; } |
| | | public int timeStamp { get; set; } |
| | | /// <summary> |
| | | /// 时间戳 |
| | | /// </summary> |
| | | public string timeStampMES { get; set; } |
| | | /// <summary> |
| | | /// 照片url |
| | | /// </summary> |