Ver Código Fonte

录音文件优化(非必须)

zhangkun 5 anos atrás
pai
commit
39dcd0bda1

+ 14 - 0
web/YTSoft.BaseCallCenter.MVCWeb/Controllers/HW/CallRecordController.cs

4
 using System;
4
 using System;
5
 using System.Collections.Generic;
5
 using System.Collections.Generic;
6
 using System.Data;
6
 using System.Data;
7
+using System.IO;
7
 using System.Linq;
8
 using System.Linq;
8
 using System.Text;
9
 using System.Text;
9
 using System.Web;
10
 using System.Web;
1261
             dataModel.code = 0;
1262
             dataModel.code = 0;
1262
             dataModel.count = recordCount;
1263
             dataModel.count = recordCount;
1263
             dataModel.data = dt;
1264
             dataModel.data = dt;
1265
+            if (dt != null && recordCount > 0)
1266
+            {
1267
+                foreach (DataRow dr in dt.Rows)
1268
+                {
1269
+                    if (dr["F_RecFileUrl"].ToMyString().Contains(GetSysconfig("newFilePath").Substring(0,2)))
1270
+                    {
1271
+                        if (!System.IO.File.Exists(dr["F_RecFileUrl"].ToMyString()))
1272
+                        {
1273
+                            dr["TheLuyin"] = "";
1274
+                        }
1275
+                    }
1276
+                }
1277
+            }
1264
             string json = JsonConvert.SerializeObject(dataModel);
1278
             string json = JsonConvert.SerializeObject(dataModel);
1265
             return json;
1279
             return json;
1266
         }
1280
         }