Selaa lähdekoodia

调整问卷获取

zhengbingbing 7 vuotta sitten
vanhempi
commit
7c484235ac

+ 5 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/callout/CallOutPlanController.cs

@@ -1057,6 +1057,11 @@ namespace CallCenterApi.Interface.Controllers.callout
1057 1057
                     //var fkconfig = new BLL.T_Sys_DictionaryValue().GetModel(yhfkid);
1058 1058
                     //if (fkconfig != null)
1059 1059
                     //    otnModel.F_YHFKName = fkconfig.F_Name;
1060
+                    otnModel.ExpandVchField2 = phone;
1061
+                    otnModel.ExpandVchField3 = address;
1062
+                    var fkconfig = new BLL.T_Sys_DictionaryValue().GetModel(countryid);
1063
+                    if (fkconfig != null)
1064
+                        otnModel.ExpandVchField4 = fkconfig.F_Name;
1060 1065
                     otnModel.ExpandIntField1 = countryid;//乡镇
1061 1066
                     otnModel.ExpandDatField1 = DateTime.Now;//调查时间
1062 1067
                     otnModel.F_AskRes = askqids;

+ 35 - 18
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/callout/PagerAnswerWXController.cs

@@ -278,23 +278,31 @@ namespace CallCenterApi.Interface.Controllers.callout
278 278
                     #region 获取多选题目以及答案
279 279
                     var qlist = questionBLL.GetModelList(" F_DeleteFlag=0 and F_QuestionId in (select F_QuestionId from T_Ask_PagerItems where F_PagerId=" + paperid + ") and F_Type=3 order by F_QuestionId ");
280 280
 
281
-                    var newmodel = qlist.Select(q =>
281
+                    var newmodel = new
282 282
                     {
283
-                        var answers = "";
284
-                        var qalist = anslist.Where(al => al.F_QID.Value == q.F_QuestionId).ToList<Model.T_Call_OutAnswers>();
285
-                        if (qalist.Count > 0)
286
-                        {
287
-                            foreach (var item in qalist)
288
-                            {
289
-                                answers += item.F_Answer + ";";
290
-                            }
291
-                        }
292
-                        return new
293
-                        {
294
-                            questitle = q.F_Title,
295
-                            quesanswers = answers.Trim(';') + "。",
296
-                        };
297
-                    });
283
+                        cusname = model.F_CusName,
284
+                        telphone = model.F_Phone,
285
+                        cusphone = model.ExpandVchField2,
286
+                        countryid = model.ExpandIntField1,
287
+                        country = model.ExpandVchField4,
288
+                        address = model.ExpandVchField3,
289
+                        queslist = qlist.Select(q =>{
290
+                         var answers = "";
291
+                         var qalist = anslist.Where(al => al.F_QID.Value == q.F_QuestionId).ToList<Model.T_Call_OutAnswers>();
292
+                         if (qalist.Count > 0)
293
+                         {
294
+                             foreach (var item in qalist)
295
+                             {
296
+                                 answers += item.F_Answer + ";";
297
+                             }
298
+                         }
299
+                         return new
300
+                         {
301
+                             questitle = q.F_Title,
302
+                             quesanswers = answers.Trim(';') + "。",
303
+                         };
304
+                     })
305
+                    };
298 306
                     #endregion
299 307
 
300 308
                     return Success("获取多选题及答案成功", newmodel);
@@ -315,7 +323,15 @@ namespace CallCenterApi.Interface.Controllers.callout
315 323
 
316 324
                 var qlist = questionBLL.GetModelList(" F_DeleteFlag=0 and F_QuestionId in (select F_QuestionId from T_Ask_PagerItems where F_PagerId="+model.F_PagerId+") and F_Type=3 order by F_QuestionId ");
317 325
 
318
-                var newmodel = qlist.Select(q =>
326
+                var newmodel = new
327
+                {
328
+                    cusname = model.F_UserName,
329
+                    telphone = model.F_TelPhone,
330
+                    cusphone = model.F_Phone,
331
+                    countryid = model.F_CountryId,
332
+                    country = model.F_Country,
333
+                    address = model.F_Address,
334
+                    queslist = qlist.Select(q =>
319 335
                 {
320 336
                     var answers = "";
321 337
                     var qalist = anslist.Where(al => al.F_QID.Value == q.F_QuestionId).ToList<Model.T_Call_OutAnswersWX>();
@@ -331,7 +347,8 @@ namespace CallCenterApi.Interface.Controllers.callout
331 347
                         questitle = q.F_Title,
332 348
                         quesanswers = answers.Trim(';') + "。",
333 349
                     };
334
-                });
350
+                })
351
+                };
335 352
 
336 353
                 return Success("获取多选题及答案成功", newmodel);
337 354
             }