Ver Fonte

Merge remote-tracking branch 'origin/master'

chen há 5 anos atrás
pai
commit
2e812bbf49

+ 12 - 2
app/controller/.financefollow.js

@@ -8,7 +8,12 @@ module.exports = {
         'credit_money',
         'credit_money',
         'credit_time',
         'credit_time',
         '!orcredit',
         '!orcredit',
-        'uuid'
+        'uuid',
+        'senhemessage',
+        'jindiaomessage',
+        'sxcpname',
+        'sxhowlong',
+        'sxcplilue'
       ]
       ]
     },
     },
     destroy: {
     destroy: {
@@ -25,7 +30,12 @@ module.exports = {
         'credit_money',
         'credit_money',
         'credit_time',
         'credit_time',
         '!orcredit',
         '!orcredit',
-        'uuid'
+        'uuid',
+        'senhemessage',
+        'jindiaomessage',
+        'sxcpname',
+        'sxhowlong',
+        'sxcplilue'
       ]
       ]
     },
     },
     show: {
     show: {

+ 4 - 1
app/model/financefollow.js

@@ -17,7 +17,10 @@ const FinanceFollowSchema = {
     credit_time: { type: Number}, //授信时间(时间戳)
     credit_time: { type: Number}, //授信时间(时间戳)
     orcredit: { type: String, required: true},//是否授信(0:未授信已关注;1:已授信;  2:审核;   3:尽调)
     orcredit: { type: String, required: true},//是否授信(0:未授信已关注;1:已授信;  2:审核;   3:尽调)
     senhemessage: { type: String,maxLength: 200 }, //审核信息
     senhemessage: { type: String,maxLength: 200 }, //审核信息
-    jindiaomessage: { type: String,maxLength: 200 }, //尽调信息
+    jindiaomessage: { type: String,maxLength: 200 }, //拒绝信息
+    sxcpname: { type: String,maxLength: 200 }, //授信产品名称
+    sxhowlong: { type: String,maxLength: 200 }, //授信期限
+    sxcplilue: { type: String,maxLength: 200 }, //授信产品利率
 };
 };
 
 
 
 

+ 29 - 0
app/service/claimneed.js

@@ -130,6 +130,35 @@ class ClaimNeedService extends CrudService {
 
 
                 }
                 }
             },
             },
+            { $lookup: {
+              from: 'company_identify',
+              localField: 'userid',
+              foreignField: 'uid',
+              as: 'comnew' } },
+           { $unwind: '$comnew' },
+           {
+            $project: {
+                meta: 1,
+                jg_id: 1,
+                jg_pro_id: 1,
+                status: 1,
+                money: 1,
+                use: 1,
+                mongey_min_rate: 1,
+                mongey_max_rate: 1,
+                claims_min_term: 1,
+                claims_max_term: 1,
+                ensure_id: 1,
+                project_status: 1,
+                remarks: 1,
+                cdata: 1,
+                userid: 1,
+                id: 1,
+                is_exist: 1,
+                comnewname:'$comnew.company_name'
+
+            }
+        },
        {
        {
            $match: match,
            $match: match,
 
 

+ 17 - 1
app/service/financefollow.js

@@ -15,7 +15,7 @@ class FinanceFollowService extends CrudService {
 
 
    //授信接口
    //授信接口
    async getCredit(data){
    async getCredit(data){
-    const { id,money,orcredit,senhemessage,jindiaomessage} = data;//id:关注ID money:授信额度
+    const { id,money,orcredit,senhemessage,jindiaomessage,sxcpname,sxhowlong,sxcplilue} = data;//id:关注ID money:授信额度
     var now = new Date();
     var now = new Date();
     var nowtime =now.getTime();//当前时间戳(授信时间)
     var nowtime =now.getTime();//当前时间戳(授信时间)
     const financefollow = await this.model.findById(id);
     const financefollow = await this.model.findById(id);
@@ -25,6 +25,15 @@ class FinanceFollowService extends CrudService {
     if(jindiaomessage){
     if(jindiaomessage){
       financefollow.jindiaomessage = jindiaomessage;
       financefollow.jindiaomessage = jindiaomessage;
     }
     }
+    if(sxcpname){
+      financefollow.sxcpname = sxcpname;
+    }
+    if(sxhowlong){
+      financefollow.sxhowlong = sxhowlong;
+    }
+    if(sxcplilue){
+      financefollow.sxcplilue = sxcplilue;
+    }
     financefollow.orcredit = orcredit;
     financefollow.orcredit = orcredit;
     if(money){
     if(money){
       financefollow.credit_money = parseInt(money);
       financefollow.credit_money = parseInt(money);
@@ -63,6 +72,13 @@ class FinanceFollowService extends CrudService {
          foreignField: '_id',
          foreignField: '_id',
          as: 'clamnew' } },
          as: 'clamnew' } },
       { $unwind: '$clamnew' },
       { $unwind: '$clamnew' },
+      { $lookup: {
+        from: 'company_identify',
+        localField: 'clamnew.userid',
+        foreignField: 'uid',
+        as: 'comnew' } },
+     { $unwind: '$comnew' },
+      { $project: {clamnew:1,finceId:1,savetime:1,orcredit:1,_id:1,comnewname:'$comnew.company_name'}},
       { $skip: (skip - 1) * limit },
       { $skip: (skip - 1) * limit },
       { $limit: limit },
       { $limit: limit },
       { $sort : { savetime:-1 } }
       { $sort : { savetime:-1 } }