zhengbingbing %!s(int64=8) %!d(string=hace) años
padre
commit
6f13a3ec70

+ 4 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Configs/system.config

@@ -27,11 +27,11 @@
27 27
   <add key="WechatAppsecret" value="6c2d1f9fd32f906c315f03398800d474" />
28 28
   <!-- ================== 4:IVR文件上传FTP配置参数 ================== -->
29 29
   <!-- 设置FTP -->
30
-  <add key="ftp" value="192.168.1.30" />
30
+  <add key="ftp" value="192.168.4.18" />
31 31
   <!-- 设置账户名 -->
32
-  <add key="account" value="chenyang" />
32
+  <add key="account" value="bingbing" />
33 33
   <!-- 设置密码 -->
34
-  <add key="password" value="123123" />
34
+  <add key="password" value="Hy123456" />
35 35
   <!-- 文件保存位置 -->
36
-  <add key="saveloc" value="d:\upload_aud" />
36
+  <add key="saveloc" value="d:\upload_wav\" />
37 37
 </appSettings>

+ 18 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/IVRWordsController.cs

@@ -105,6 +105,16 @@ namespace CallCenterApi.Interface.Controllers
105 105
            true,
106 106
            out recordCount);
107 107
 
108
+            var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='IVRWavPath' ").FirstOrDefault();
109
+            foreach (DataRow dr in dt.Rows)
110
+            {
111
+                string path = dr["F_WavNewName"] != null ? dr["F_WavNewName"].ToString() : "";
112
+                if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
113
+                {
114
+                    dr["F_WavPath"] = config.F_ParamValue + dr["F_WavNewName"].ToString();
115
+                }
116
+            }
117
+
108 118
             var obj = new
109 119
             {
110 120
                 state = "success",
@@ -124,6 +134,13 @@ namespace CallCenterApi.Interface.Controllers
124 134
             {
125 135
 
126 136
                 Model.T_Sys_IVRWords dModel = dBLL.GetModel(int.Parse(id.Trim()));
137
+                var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='IVRWavPath' ").FirstOrDefault();
138
+                
139
+                if (dModel.F_WavNewName != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
140
+                {
141
+                    dModel.F_WavPath = config.F_ParamValue + dModel.F_WavNewName;
142
+                }
143
+
127 144
                 if (dModel != null)
128 145
                 {
129 146
                     return Success("获取IVR欢迎词成功", dModel);
@@ -343,7 +360,7 @@ namespace CallCenterApi.Interface.Controllers
343 360
         }
344 361
 
345 362
         //上传音频文件,并修改为系统需要的格式
346
-        private ActionResult UploadWav()
363
+        public ActionResult UploadWav()
347 364
         {
348 365
             HttpPostedFile _upFile = RequestString.GetFile("upFile");
349 366
             if (_upFile != null)

+ 4 - 4
codegit/CallCenterCommon/CallCenter.Utility/NPOI/NPOIHelper.cs

@@ -200,10 +200,10 @@ namespace CallCenter.Utility
200 200
                     }
201 201
 
202 202
                     //自适应列宽度
203
-                    for (int i = 0; i < icolIndex; i++)
204
-                    {
205
-                        sheet.AutoSizeColumn(i);
206
-                    }
203
+                    //for (int i = 0; i < icolIndex; i++)
204
+                    //{
205
+                    //    sheet.AutoSizeColumn(i);
206
+                    //}
207 207
 
208 208
                     using (MemoryStream ms = new MemoryStream())
209 209
                     {