|
@@ -37,16 +37,10 @@ rationChapterTreeDAO.prototype.getRationChapterTree = function(repositoryName,ca
|
|
|
}
|
|
|
|
|
|
rationChapterTreeDAO.prototype.getRationChapterTreeByRepId = function(repId,callback){
|
|
|
- repositoryMap.getRepositoryById(repId, function(err, rst){
|
|
|
- if (err || rst.length == 0) {
|
|
|
- callback("获取定额库错误!",false)
|
|
|
- } else {
|
|
|
- rationChapterTreeModel.find({"rationRepId": rst[0].ID, "$or": [{"isDeleted": null}, {"isDeleted": false} ]},function(err,data){
|
|
|
- if(data.length) callback(false,data);
|
|
|
- else if(err) callback("获取定额树错误!",false)
|
|
|
- else callback(false,false);
|
|
|
- })
|
|
|
- }
|
|
|
+ rationChapterTreeModel.find({"rationRepId": repId, "$or": [{"isDeleted": null}, {"isDeleted": false} ]},function(err,data){
|
|
|
+ if(data.length) callback(false,data);
|
|
|
+ else if(err) callback("获取定额树错误!",false)
|
|
|
+ else callback(false,false);
|
|
|
})
|
|
|
}
|
|
|
|