mengjie %!s(int64=6) %!d(string=hace) años
padre
commit
55ea87da4c

+ 1 - 0
codegit/CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj

78
     <Compile Include="T_Cus_CustomerFinanceLog.cs" />
78
     <Compile Include="T_Cus_CustomerFinanceLog.cs" />
79
     <Compile Include="T_Cus_RegionCategory.cs" />
79
     <Compile Include="T_Cus_RegionCategory.cs" />
80
     <Compile Include="T_Cus_Region_UserAccount_Map.cs" />
80
     <Compile Include="T_Cus_Region_UserAccount_Map.cs" />
81
+    <Compile Include="T_Med_FollowUp.cs" />
81
     <Compile Include="T_Msg_List.cs" />
82
     <Compile Include="T_Msg_List.cs" />
82
     <Compile Include="T_Msg_NoticeInfo.cs" />
83
     <Compile Include="T_Msg_NoticeInfo.cs" />
83
     <Compile Include="T_QC_IndexBase.cs" />
84
     <Compile Include="T_QC_IndexBase.cs" />

+ 1 - 0
codegit/CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj

78
     <Compile Include="T_Cus_CustomerFinanceLog.cs" />
78
     <Compile Include="T_Cus_CustomerFinanceLog.cs" />
79
     <Compile Include="T_Cus_RegionCategory.cs" />
79
     <Compile Include="T_Cus_RegionCategory.cs" />
80
     <Compile Include="T_Cus_Region_UserAccount_Map.cs" />
80
     <Compile Include="T_Cus_Region_UserAccount_Map.cs" />
81
+    <Compile Include="T_Med_FollowUp.cs" />
81
     <Compile Include="T_Msg_List.cs" />
82
     <Compile Include="T_Msg_List.cs" />
82
     <Compile Include="T_Msg_NoticeInfo.cs" />
83
     <Compile Include="T_Msg_NoticeInfo.cs" />
83
     <Compile Include="T_QC_IndexBase.cs" />
84
     <Compile Include="T_QC_IndexBase.cs" />

+ 75 - 2
codegit/CallCenterApi/CallCenterApi.DAL/T_Med_FollowUp.cs

43
             strSql.Append("F_SecondLevel=@F_SecondLevel,");
43
             strSql.Append("F_SecondLevel=@F_SecondLevel,");
44
             strSql.Append("F_BedNum=@F_BedNum,");
44
             strSql.Append("F_BedNum=@F_BedNum,");
45
             strSql.Append("F_CostsNature=@F_CostsNature,");
45
             strSql.Append("F_CostsNature=@F_CostsNature,");
46
-            strSql.Append("F_FollowUpNum=@F_FollowUpNum");
46
+            strSql.Append("F_FollowUpNum=@F_FollowUpNum,");
47
+            strSql.Append("F_IsDel=@F_IsDel,");
48
+            strSql.Append("F_ZDMC=@F_ZDMC,");
49
+            strSql.Append("F_TotalCosts=@F_TotalCosts,");
50
+            strSql.Append("F_SFDate=@F_SFDate,");
51
+            strSql.Append("F_SFPerson=@F_SFPerson,");
52
+            strSql.Append("F_SFResult=@F_SFResult,");
53
+            strSql.Append("F_Satisfied=@F_Satisfied,");
54
+            strSql.Append("F_Advise=@F_Advise,");
55
+            strSql.Append("F_Praise=@F_Praise,");
56
+            strSql.Append("F_Criticism=@F_Criticism,");
57
+            strSql.Append("F_PagerID=@F_PagerID");
47
             strSql.Append(" where F_Id=@F_Id");
58
             strSql.Append(" where F_Id=@F_Id");
48
             SqlParameter[] parameters = {
59
             SqlParameter[] parameters = {
49
                     new SqlParameter("@F_Id", SqlDbType.Int,4),
60
                     new SqlParameter("@F_Id", SqlDbType.Int,4),
66
                     new SqlParameter("@F_SecondLevel", SqlDbType.Int,4),
77
                     new SqlParameter("@F_SecondLevel", SqlDbType.Int,4),
67
                     new SqlParameter("@F_BedNum", SqlDbType.Int,4),
78
                     new SqlParameter("@F_BedNum", SqlDbType.Int,4),
68
                     new SqlParameter("@F_CostsNature", SqlDbType.VarChar,50),
79
                     new SqlParameter("@F_CostsNature", SqlDbType.VarChar,50),
69
-                    new SqlParameter("@F_FollowUpNum", SqlDbType.Int,4)
80
+                    new SqlParameter("@F_FollowUpNum", SqlDbType.Int,4),
81
+                    new SqlParameter("@F_IsDel", SqlDbType.Int,4),
82
+                    new SqlParameter("@F_TotalCosts", SqlDbType.Decimal ),
83
+                    new SqlParameter("@F_SFDate", SqlDbType.DateTime),
84
+                    new SqlParameter("@F_ZDMC", SqlDbType.VarChar,50),
85
+                    new SqlParameter("@F_SFPerson", SqlDbType.VarChar,50),
86
+                    new SqlParameter("@F_SFResult", SqlDbType.VarChar,50),
87
+                    new SqlParameter("@F_Satisfied", SqlDbType.VarChar,50),
88
+                    new SqlParameter("@F_Advise", SqlDbType.VarChar,500),
89
+                    new SqlParameter("@F_Praise", SqlDbType.VarChar,500),
90
+                    new SqlParameter("@F_Criticism", SqlDbType.VarChar,500),
91
+                    new SqlParameter("@F_PagerID", SqlDbType.Int,8)
70
             };
92
             };
71
             parameters[0].Value = model.F_Id;
93
             parameters[0].Value = model.F_Id;
72
             parameters[1].Value = model.F_Name;
94
             parameters[1].Value = model.F_Name;
89
             parameters[18].Value = model.F_BedNum;
111
             parameters[18].Value = model.F_BedNum;
90
             parameters[19].Value = model.F_CostsNature;
112
             parameters[19].Value = model.F_CostsNature;
91
             parameters[20].Value = model.F_FollowUpNum;
113
             parameters[20].Value = model.F_FollowUpNum;
114
+            parameters[21].Value = model.F_IsDel;
115
+            parameters[22].Value = model.F_TotalCosts;
116
+            parameters[23].Value = model.F_SFDate;
117
+            parameters[24].Value = model.F_ZDMC;
118
+            parameters[25].Value = model.F_SFPerson;
119
+            parameters[26].Value = model.F_SFResult;
120
+            parameters[27].Value = model.F_Satisfied;
121
+            parameters[28].Value = model.F_Advise;
122
+            parameters[29].Value = model.F_Praise;
123
+            parameters[30].Value = model.F_Criticism;
124
+            parameters[31].Value = model.F_PagerID;
92
 
125
 
93
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
126
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
94
             if (rows > 0)
127
             if (rows > 0)
262
                 {
295
                 {
263
                     model.F_FollowUpNum = int.Parse(row["F_FollowUpNum"].ToString());
296
                     model.F_FollowUpNum = int.Parse(row["F_FollowUpNum"].ToString());
264
                 }
297
                 }
298
+                if (row["F_IsDel"] != null && row["F_IsDel"].ToString() != "")
299
+                {
300
+                    model.F_IsDel = int.Parse(row["F_IsDel"].ToString());
301
+                }
302
+                if (row["F_ZDMC"] != null)
303
+                {
304
+                    model.F_ZDMC = row["F_ZDMC"].ToString();
305
+                }
306
+                if (row["F_TotalCosts"] != null && row["F_TotalCosts"].ToString() != "")
307
+                {
308
+                    model.F_TotalCosts = decimal.Parse(row["F_TotalCosts"].ToString());
309
+                }
310
+                if (row["F_SFDate"] != null && row["F_SFDate"].ToString() != "")
311
+                {
312
+                    model.F_SFDate = DateTime.Parse(row["F_SFDate"].ToString());
313
+                }
314
+                if (row["F_SFPerson"] != null)
315
+                {
316
+                    model.F_SFPerson = row["F_SFPerson"].ToString();
317
+                }
318
+                if (row["F_SFResult"] != null)
319
+                {
320
+                    model.F_SFResult = row["F_SFResult"].ToString();
321
+                }
322
+                if (row["F_Satisfied"] != null)
323
+                {
324
+                    model.F_Satisfied = row["F_Satisfied"].ToString();
325
+                }
326
+                if (row["F_Advise"] != null)
327
+                {
328
+                    model.F_Advise = row["F_Advise"].ToString();
329
+                }
330
+                if (row["F_Praise"] != null)
331
+                {
332
+                    model.F_Praise = row["F_Praise"].ToString();
333
+                }
334
+                if (row["F_Criticism"] != null)
335
+                {
336
+                    model.F_Criticism = row["F_Criticism"].ToString();
337
+                }
265
             }
338
             }
266
             return model;
339
             return model;
267
         }
340
         }

+ 128 - 19
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/MedicalFollowup/FollowUpController.cs

15
         //private readonly BLL.T_Call_OutTaskTelNum otnBLL = new BLL.T_Call_OutTaskTelNum();
15
         //private readonly BLL.T_Call_OutTaskTelNum otnBLL = new BLL.T_Call_OutTaskTelNum();
16
         private readonly BLL.T_Call_OutAnswers ansBLL = new BLL.T_Call_OutAnswers();
16
         private readonly BLL.T_Call_OutAnswers ansBLL = new BLL.T_Call_OutAnswers();
17
         private readonly BLL.T_Med_FollowUp mfBLL = new BLL.T_Med_FollowUp();
17
         private readonly BLL.T_Med_FollowUp mfBLL = new BLL.T_Med_FollowUp();
18
+        private readonly BLL.T_Ask_Question questionBLL = new BLL.T_Ask_Question();
19
+        private readonly BLL.T_Ask_QuestionItems questionItemBLL = new BLL.T_Ask_QuestionItems();
20
+        private readonly BLL.T_Ask_PagerInfo pagerInfoBLL = new BLL.T_Ask_PagerInfo();
18
 
21
 
19
         // GET: FollowUp
22
         // GET: FollowUp
20
         public ActionResult Index()
23
         public ActionResult Index()
54
             string strsfend = HttpUtility.UrlDecode(RequestString.GetQueryString("sfend"));
57
             string strsfend = HttpUtility.UrlDecode(RequestString.GetQueryString("sfend"));
55
             //仅二级随访未完成
58
             //仅二级随访未完成
56
             string strejwwc = HttpUtility.UrlDecode(RequestString.GetQueryString("secondlevel"));
59
             string strejwwc = HttpUtility.UrlDecode(RequestString.GetQueryString("secondlevel"));
60
+            //满意度
61
+            string strsatisfy = HttpUtility.UrlDecode(RequestString.GetQueryString("satisfied"));
57
 
62
 
58
             string strpageindex = RequestString.GetQueryString("page");
63
             string strpageindex = RequestString.GetQueryString("page");
59
             int pageindex = 1;
64
             int pageindex = 1;
124
             {
129
             {
125
                 sql += " and F_State = 2 ";//随访完成状态
130
                 sql += " and F_State = 2 ";//随访完成状态
126
             }
131
             }
132
+            if (strsatisfy.Trim() != "" && strsatisfy != "undefined")
133
+            {
134
+                sql += " and F_Satisfied = '"+strsatisfy +"' ";//随访完成状态
135
+            }
127
 
136
 
128
             if (strpageindex.Trim() != "")
137
             if (strpageindex.Trim() != "")
129
             {
138
             {
173
         /// <param name="address">地址</param>
182
         /// <param name="address">地址</param>
174
         /// <returns></returns>
183
         /// <returns></returns>
175
         public ActionResult Answers(int taskid, int custelid, string[] ans, int hjjgid,
184
         public ActionResult Answers(int taskid, int custelid, string[] ans, int hjjgid,
176
-            string name, string phone, string address, int countryid = 0)
185
+            string name, string phone, string address,string advise, string satisfied,string praise,string criticism,int pagerid, int countryid = 0)
177
         {
186
         {
187
+            taskid = 0;
178
             int cc = 0;
188
             int cc = 0;
179
             if (custelid > 0)
189
             if (custelid > 0)
180
             {
190
             {
242
                     var hjconfig = new BLL.T_Sys_DictionaryValue().GetModel(hjjgid);
252
                     var hjconfig = new BLL.T_Sys_DictionaryValue().GetModel(hjjgid);
243
                     if (hjconfig != null)
253
                     if (hjconfig != null)
244
                         otnModel.F_SFResult  = hjconfig.F_Name;
254
                         otnModel.F_SFResult  = hjconfig.F_Name;
245
-                    //otnModel.F_YHFKId = yhfkid;
246
-                    //var fkconfig = new BLL.T_Sys_DictionaryValue().GetModel(yhfkid);
247
-                    //if (fkconfig != null)
248
-                    //    otnModel.F_YHFKName = fkconfig.F_Name;
249
-                    otnModel.ExpandVchField2 = phone;
250
-                    otnModel.ExpandVchField3 = address;
251
-                    var fkconfig = new BLL.T_Sys_DictionaryValue().GetModel(countryid);
252
-                    if (fkconfig != null)
253
-                        otnModel.ExpandVchField4 = fkconfig.F_Name;
254
-                    otnModel.ExpandIntField1 = countryid;//乡镇
255
-                    otnModel.ExpandDatField1 = DateTime.Now;//调查时间
256
-                    otnModel.F_AskRes = askqids;
257
-                    otnModel.F_AskInfo = ansids;
258
-                    otnModel.F_CusID = cusid;
259
-                    otnModel.F_CusName = name;
260
-                    otnBLL.Update(otnModel);
255
+                    otnModel.F_SFPerson = CurrentUser.UserData.F_UserCode;
256
+                    otnModel.F_SFDate = DateTime.Now;
257
+                    otnModel.F_Advise = advise;
258
+                    otnModel.F_Satisfied = satisfied;
259
+                    otnModel.F_PagerID = pagerid;             
260
+                    mfBLL.Update(otnModel);
261
                     //planrecord(otnModel);
261
                     //planrecord(otnModel);
262
                     #endregion
262
                     #endregion
263
                 }
263
                 }
266
             {
266
             {
267
                 if (cc == ans.Length)
267
                 if (cc == ans.Length)
268
                 {
268
                 {
269
-                    return Success("问卷答案提交成功!taskid=" + taskid + ",custelid=" + custelid + ",操作人:" + CurrentUser.UserData.F_UserCode);
269
+                    //return Success("问卷答案提交成功!taskid=" + taskid + ",custelid=" + custelid + ",操作人:" + CurrentUser.UserData.F_UserCode);
270
+                    return Success("问卷答案提交成功!custelid=" + custelid + ",操作人:" + CurrentUser.UserData.F_UserCode);
270
                 }
271
                 }
271
                 else
272
                 else
272
                 {
273
                 {
273
                     ansBLL.DeleteByTelid(custelid, taskid);
274
                     ansBLL.DeleteByTelid(custelid, taskid);
274
-                    return Error("问卷答案提交失败!taskid=" + taskid + ",custelid=" + custelid + ",操作人:" + CurrentUser.UserData.F_UserCode);
275
+                    return Error("问卷答案提交失败!custelid=" + custelid + ",操作人:" + CurrentUser.UserData.F_UserCode);
275
                 }
276
                 }
276
             }
277
             }
277
             else
278
             else
281
 
282
 
282
         }
283
         }
283
         #endregion
284
         #endregion
285
+
286
+        #region 导出
287
+
288
+        #endregion
289
+
290
+        #region 获取随访结果详情
291
+        //获取任务结果详情
292
+        public ActionResult GetTaskTelInfo(int id = 0)
293
+        {
294
+            if (id <= 0)
295
+                return Error("参数不正确");
296
+            var model = mfBLL.GetModel(id);
297
+
298
+            var paperid = 0;
299
+            if (model != null)
300
+            {
301
+                var taskmodel = new Model.T_Med_FollowUp();
302
+                #region 绑定任务和客户信息
303
+               
304
+                taskmodel.F_Id = model.F_Id;//号码id
305
+                //taskmodel.F_TaskId = model.F_TaskId.Value;//任务id
306
+                //taskmodel.F_HJJGId = model.F_HJJGId != null ? model.F_HJJGId.Value : 0;//呼叫结果id
307
+                taskmodel.F_Satisfied = model.F_Satisfied;
308
+                taskmodel.F_SFResult = model.F_SFResult;
309
+                if (!string.IsNullOrWhiteSpace(model.F_Name))
310
+                    taskmodel.F_Name = model.F_Name;//客户姓名
311
+                if (!string.IsNullOrWhiteSpace(model.F_Phone))
312
+                    taskmodel.F_Phone = model.F_Phone;//号码
313
+                
314
+                if (!string.IsNullOrWhiteSpace(model.F_Addr))
315
+                    taskmodel.F_Addr = model.F_Addr;//住址
316
+                #endregion
317
+
318
+                var anslist = ansBLL.GetModelList("  F_CusTelID=" + id + " ");//ansBLL.GetModelList(" F_TaskID=" + model.F_TaskId.Value + " and F_CusTelID=" + id + " ");
319
+                //var tmodel = otBLL.GetModel(model.F_TaskId.Value);
320
+                //if (tmodel != null)
321
+                //{
322
+                    paperid = model .F_PagerID;
323
+                    #region 获取问卷试题信息以及答案
324
+                    var pmodel = pagerInfoBLL.GetModel(paperid);
325
+                    var qlist = questionBLL.GetModelList(" F_DeleteFlag=0 and F_QuestionId in (select F_QuestionId from T_Ask_PagerItems where F_PagerId=" + paperid + ")  order by F_QuestionId ");
326
+                    var qilist = questionItemBLL.GetModelList(" F_QuestionId in (select F_QuestionId from T_Ask_PagerItems where F_PagerId=" + paperid + ")  order by F_ItemId ");
327
+                    var newmodel = new
328
+                    {
329
+                        F_Title = pmodel.F_Title,
330
+                        F_Remark = pmodel.F_Remark,
331
+                        F_StartText = pmodel.F_StartText,
332
+                        F_EndText = pmodel.F_EndText,
333
+                        F_Questions = qlist.Select(q =>
334
+                        {
335
+                            var answers = "";
336
+                            var qalist = anslist.Where(al => al.F_QID.Value == q.F_QuestionId).ToList<Model.T_Call_OutAnswers>();
337
+                            if (qalist.Count > 0)
338
+                            {
339
+                                if (q.F_Type > 1)
340
+                                {
341
+                                    foreach (var item in qalist)
342
+                                    {
343
+                                        answers += item.F_QIID + "|";
344
+                                    }
345
+                                }
346
+                                else
347
+                                {
348
+                                    answers = qalist[0].F_Answer;
349
+                                }
350
+                            }
351
+                            return new
352
+                            {
353
+                                quesid = q.F_QuestionId,
354
+                                questitle = q.F_Title,
355
+                                questype = q.F_Type,
356
+                                quescontent = q.F_Content,
357
+                                quesremark = q.F_Remark,
358
+                                quesanswers = answers.Trim('|'),
359
+                                quesitems = qilist.Where(qq => qq.F_QuestionId == q.F_QuestionId).Select(qi =>
360
+                                {
361
+                                    return new
362
+                                    {
363
+                                        itemid = qi.F_ItemId,
364
+                                        itemname = qi.F_ItemName,
365
+                                        itemremark = qi.F_Remark,
366
+                                    };
367
+                                })
368
+                            };
369
+                        })
370
+                    };
371
+                    #endregion
372
+
373
+
374
+                    //taskmodel.F_TaskName = tmodel.F_TaskName;//任务名称                
375
+                    //taskmodel.F_TaskRemark = tmodel.F_TaskRemark;//任务备注                
376
+
377
+                    var objy = new
378
+                    {
379
+                        taskModel = taskmodel,
380
+                        paperModel = newmodel
381
+                    };
382
+                    return Success("获取详情成功", objy);
383
+                //}
384
+            }
385
+            return Error("获取详情失败");
386
+        }
387
+        #endregion
388
+
389
+
390
+        #region 科室随访率统计
391
+
392
+        #endregion
284
     }
393
     }
285
 }
394
 }

+ 5 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

336
                 opt = "处理";
336
                 opt = "处理";
337
                 model.DealBy = nowUser.F_UserCode;
337
                 model.DealBy = nowUser.F_UserCode;
338
                 model.DealTime = DateTime.Now;
338
                 model.DealTime = DateTime.Now;
339
-                model.F_State = 0;
339
+                model.F_State = 10;
340
             }
340
             }
341
+            model.IsOver = isover;
341
             #region 读取当前登录人部门
342
             #region 读取当前登录人部门
342
             string deptname = "";
343
             string deptname = "";
343
             var deptmodel = departmentBLL.GetModel(nowUser.F_DeptId);
344
             var deptmodel = departmentBLL.GetModel(nowUser.F_DeptId);
482
                     model.DealTime = it.DealTime.ToString();
483
                     model.DealTime = it.DealTime.ToString();
483
                     model.CreateTime = it.CreateTime.ToString();
484
                     model.CreateTime = it.CreateTime.ToString();
484
                     model.Createby = it.Createby;
485
                     model.Createby = it.Createby;
486
+                    model.IsOver = it.IsOver;
485
                     if (it.F_State == 0)
487
                     if (it.F_State == 0)
486
                     {
488
                     {
487
                         model.F_State = "未处理";
489
                         model.F_State = "未处理";
540
             model.Remarks = input.Remarks;//备注
542
             model.Remarks = input.Remarks;//备注
541
             model.Problem = input.Problem;//问题描述
543
             model.Problem = input.Problem;//问题描述
542
             model.IsDelete = 0;//问题描述
544
             model.IsDelete = 0;//问题描述
545
+            model.IsOver = input.IsOver;
543
             return model;
546
             return model;
544
         }
547
         }
545
         public long AddLog(long woid, int wostate, string content, int itemtype, int opttype, string nextuser, int nextdept, Model.T_Sys_UserAccount nowUser)
548
         public long AddLog(long woid, int wostate, string content, int itemtype, int opttype, string nextuser, int nextdept, Model.T_Sys_UserAccount nowUser)
640
             public string IsRelevant { get; set; }//是否转至相关部门
643
             public string IsRelevant { get; set; }//是否转至相关部门
641
             public string Remarks { get; set; }//备注
644
             public string Remarks { get; set; }//备注
642
             public string Problem { get; set; }//问题描述
645
             public string Problem { get; set; }//问题描述
643
-            public int IsOver { get; set; }//是否处理
646
+            public int? IsOver { get; set; }//是否处理
644
             public string DealContents { get; set; }//处理结果
647
             public string DealContents { get; set; }//处理结果
645
             public string DealBy { get; set; }//处理人
648
             public string DealBy { get; set; }//处理人
646
             public string DealTime { get; set; }//处理时间
649
             public string DealTime { get; set; }//处理时间

+ 24 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Med_FollowUp.cs

45
         private string _f_sfresult;
45
         private string _f_sfresult;
46
         private string _f_satisfied;
46
         private string _f_satisfied;
47
         private string _f_advise;
47
         private string _f_advise;
48
+        private string _f_praise;
49
+        private string _f_criticism;
50
+        private int _f_pagerid;
48
         /// <summary>
51
         /// <summary>
49
         /// id
52
         /// id
50
         /// </summary>
53
         /// </summary>
278
             set { _f_advise = value; }
281
             set { _f_advise = value; }
279
             get { return _f_advise; }
282
             get { return _f_advise; }
280
         }
283
         }
284
+        //表扬
285
+        public string F_Praise
286
+        {
287
+            set { _f_praise = value; }
288
+            get { return _f_praise; }
289
+        }       
290
+        //批评
291
+        public string F_Criticism
292
+        {
293
+            set { _f_criticism = value; }
294
+            get { return _f_criticism; }
295
+        }
296
+        /// <summary>
297
+        /// 是否删除
298
+        /// </summary>
299
+        public int F_PagerID
300
+        {
301
+            set { _f_pagerid = value; }
302
+            get { return _f_pagerid; }
303
+        }
304
+        
281
     }
305
     }
282
 }
306
 }