0
{
    "_id" : "WR10005",
    "_class" : "com.bioraid.mes.model.WorkOrders",
    "rountingNumber" : "R006",
    "orderId" : "MR-1017",
    "consumables" : "Chip",
    "workOrderStatus" : "pending",
    "deliveryStatus" : "on time",
    "lastCompletedStage" : "testProces",
    "dateAssigned" : ISODate("2017-02-17T05:38:57.631Z"),
    "dateCompleted" : ISODate("2017-02-17T07:53:32.680Z"),
    "opretorProcessStatus" : [ 
        {
            "opretorid" : "USER114",
            "process" : "testProces",
            "status" : "Done",
            "workCenterId" : "WC1",
            "startDate" : ISODate("2017-02-17T06:30:16.813Z"),
            "endDate" : ISODate("2017-02-17T06:42:23.237Z"),
            "qualityManagerReview" : {
                "qaId" : "",
                "status" : "Done",
                "note" : ""
            }
        }, 
        {
            "opretorid" : "USER116",
            "process" : "testProces",
            "status" : "Done",
            "workCenterId" : "WC1",
            "startDate" : ISODate("2017-02-17T06:30:16.813Z"),
            "endDate" : ISODate("2017-02-17T06:42:23.237Z")
        }
    ],
    "workOrdersRouting" : {
        "testProces" : [ 
            {
                "routingStep" : "R006*010",
                "operationName" : "Operation1",
                "operationStatus" : "Completed",
                "operationResult" : "Pass",
                "operationNote" : "test"
            }, 
            {
                "routingStep" : "R006*020",
                "operationName" : "adalks",
                "operationStatus" : "Completed",
                "operationResult" : "Pass",
                "operationNote" : "sddsdfsf"
            }
        ],
        "Embossing" : [ 
            {
                "routingStep" : "R006*030",
                "operationName" : "Water Cleaning",
                "operationStatus" : "",
                "operationResult" : "",
                "operationNote" : ""
            }
        ],
        "Turbidity" : [ 
            {
                "routingStep" : "R006*040",
                "operationName" : "Embossing Assembly",
                "operationStatus" : "",
                "operationResult" : "",
                "operationNote" : ""
            }
        ]
    }
}

私は取得したいのです{'opretorProcessStatus.qualityManagerReview.status' : {$ne : null}}が、これは適切な結果を与えていません。誰かがこれを書くのを手伝ってくれます。

そしてもう一つはdb.getCollection('workOrders').find({'opretorProcessStatus.qualityManagerReview.status' : "Done"})

4

1 に答える 1