瀏覽代碼

ad-hoc check in

TonyKang 8 年之前
父節點
當前提交
3148bdbf17
共有 1 個文件被更改,包括 4 次插入10 次删除
  1. 4 10
      modules/rationRepository/models/rationChapterTree.js

+ 4 - 10
modules/rationRepository/models/rationChapterTree.js

@@ -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);
     })
 }