/**
 * Created by chen on 2017/6/29.
 */
let mongoose = require("mongoose")
let ration_glj_facade = require('../facade/ration_glj_facade')

module.exports={
    createRationGLJ:createRationGLJ,
    testGetQuantify:testGetQuantify
}
function createRationGLJ() {
    let gls = mongoose.model('ration_glj');
    gls.create({'GLJID':1,'basePrice':23.23,'name':"testgls"},function(err, gls){
        console.log(gls)
    })
}

//测试获取消耗量：
async function testGetQuantify() {
    var condition = {
        projectID:99,
        projectGLJIDList:[60,61,62]
    }

    try{
        let result = await ration_glj_facade.getQuantityByProjectGLJ(condition);
        console.log(result)
    }catch (err){
        console.log(err);
    }


}
