zhaozhiqiang лет назад: 5
Родитель
Сommit
4362c5ecdf

+ 26 - 8
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/SignController.cs

@@ -129,6 +129,7 @@ namespace CallCenterApi.Interface.Controllers
129 129
         { 
130 130
             //客户名称
131 131
             string cusname = "";
132
+            int count = 0;
132 133
             ///如果不传编号则全部信息更新
133 134
             if (ids == null||ids=="")
134 135
             {
@@ -209,6 +210,7 @@ namespace CallCenterApi.Interface.Controllers
209 210
                                     modellog.F_QPOtherTax = model.F_QPOtherTax;
210 211
                                     #endregion
211 212
                                     logbll.Add(modellog);
213
+                                    count++;
212 214
                                 }
213 215
                                 #endregion
214 216
                             }
@@ -218,7 +220,7 @@ namespace CallCenterApi.Interface.Controllers
218 220
 
219 221
                 }
220 222
 
221
-                return Success("成功", "count:"+ dt.Rows.Count);
223
+                return Success("成功", "count:"+ count);
222 224
             }
223 225
             else
224 226
             {
@@ -227,8 +229,18 @@ namespace CallCenterApi.Interface.Controllers
227 229
                 string[] arrStr = ids.Split(',');
228 230
                 foreach (var item in arrStr)
229 231
                 {
232
+                    int cuserid = Convert.ToInt32(item);
233
+
234
+                    var ifhavemodel = cusbll.Exists(cuserid);
235
+                    //if (ifhavemodel)
236
+                    //{
237
+
238
+                    //}
239
+                    //else {
240
+                    //    return Success("不存在客户");
241
+                    //}
230 242
                     //根据id获取客户信息实体
231
-                    Model.T_Cus_CustomerBaseNew customs = cusbll.GetModel(int.Parse(item)); //Convert.ToInt32()
243
+                    Model.T_Cus_CustomerBaseNew customs = cusbll.GetModel(cuserid); //Convert.ToInt32()
232 244
                     if (customs != null)
233 245
                     {
234 246
                         //获取客户名称
@@ -298,15 +310,15 @@ namespace CallCenterApi.Interface.Controllers
298 310
                                     logbll.Add(modellog);
299 311
                                 }
300 312
                             }
301
-                            return Success("更新成功");
313
+                            //return Success("更新成功");
302 314
                         }
303 315
                         else
304 316
                         {
305
-                            return Success("客户信息为空");
317
+                           // return Success("财税情况为空");
306 318
                         }
307 319
                     }
308 320
                     else {
309
-                        return Success("客户信息为空");
321
+                        //return Success("客户信息为空");
310 322
                     }
311 323
                 }
312 324
                 return Success("更新成功");
@@ -320,12 +332,14 @@ namespace CallCenterApi.Interface.Controllers
320 332
         /// <returns></returns>
321 333
         public Model.CsqkInfo GetCsqk(string cusname)
322 334
         {
335
+            ///去掉首尾空格
336
+            cusname = cusname.Trim();
323 337
             string strURL = "https://openapi.17win.com/gateway/openyqdz/manage/customer/queryCustomers";
324 338
             var m = new
325 339
             {
326 340
                 customerLikeCriteria = new { fullName = cusname },
327 341
                 pageNo = 1,
328
-                pageSize = 20
342
+                pageSize = 150
329 343
             };
330 344
 
331 345
             //实体序列化和反序列化
@@ -351,7 +365,11 @@ namespace CallCenterApi.Interface.Controllers
351 365
                 {
352 366
                     foreach (var item in jo1.body.customerlist)
353 367
                     {
354
-                        csqkobj = GetCSQKs(item.customerId, accountPeriods);
368
+                        if(cusname==item.fullName)
369
+                        {
370
+                            csqkobj = GetCSQKs(item.customerId, accountPeriods);
371
+                        }
372
+                       
355 373
                     }
356 374
                 }
357 375
                 return csqkobj;
@@ -539,7 +557,7 @@ namespace CallCenterApi.Interface.Controllers
539 557
                 //获取去年的第四季度的月份 10 11 12
540 558
 
541 559
                 //获取去年年份
542
-                string lastyear = yearnow;
560
+                string lastyear = (Convert.ToInt32(yearnow) - 1).ToString() ;
543 561
 
544 562
                 #region 当前年月份
545 563
                 ///去年份一月