/**
 * Created by zhang on 2018/11/26.
 */

let mongoose = require('mongoose');
let rationTemplateModel = mongoose.model('ration_template');
let consts = require('../models/project_consts');

module.exports={
    getData:getData,
};

function getData(projectID, callback) {
    rationTemplateModel.find({'projectID': projectID}, (err, datas) => {
        if (err) {
            callback(1, '', null);
        } else {
            callback(0, consts.projectConst.RATION_TEMPLATE, datas);
        }
    })
}