|
|
@@ -1256,24 +1256,28 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
1256
|
1256
|
for (int i = 0; i < model1.Count; i++)
|
|
1257
|
1257
|
{
|
|
1258
|
1258
|
Prescription model = new Prescription();
|
|
1259
|
|
- if (!valcode(model1[i].F_CustomerID.ToString(), 10))//验证客户编码为10位纯数字
|
|
|
1259
|
+ if (!string .IsNullOrEmpty (model1[i].F_CustomerID))
|
|
1260
|
1260
|
{
|
|
1261
|
|
- Model.T_Cus_CustomerBaseNew cuModel = cusbll.GetModel(model1[i].F_CustomerID.ToString());//通过客户编号获取客户资料
|
|
1262
|
|
- if (cuModel != null)
|
|
|
1261
|
+ if (!valcode(model1[i].F_CustomerID, 10))//验证客户编码为10位纯数字
|
|
1263
|
1262
|
{
|
|
1264
|
|
- Model.T_Sys_Department pdModel = departmentBLL.GetModel(cuModel.F_AreaID);//通过公司id获取部门
|
|
1265
|
|
- if (pdModel != null)
|
|
|
1263
|
+ Model.T_Cus_CustomerBaseNew cuModel = cusbll.GetModel(model1[i].F_CustomerID);//通过客户编号获取客户资料
|
|
|
1264
|
+ if (cuModel != null)
|
|
1266
|
1265
|
{
|
|
1267
|
|
- model.AreaName = pdModel.F_DeptName;//大区名称
|
|
|
1266
|
+ Model.T_Sys_Department pdModel = departmentBLL.GetModel(cuModel.F_AreaID);//通过公司id获取部门
|
|
|
1267
|
+ if (pdModel != null)
|
|
|
1268
|
+ {
|
|
|
1269
|
+ model.AreaName = pdModel.F_DeptName;//大区名称
|
|
|
1270
|
+ }
|
|
|
1271
|
+ Model.T_Sys_Department pdModel1 = departmentBLL.GetModel(cuModel.F_BranchID);
|
|
|
1272
|
+ if (pdModel1 != null)
|
|
|
1273
|
+ {
|
|
|
1274
|
+ model.BranchName = pdModel1.F_DeptName;//大区名称
|
|
|
1275
|
+ }
|
|
|
1276
|
+ model.Brands = cuModel.F_Brands;//品牌
|
|
1268
|
1277
|
}
|
|
1269
|
|
- Model.T_Sys_Department pdModel1 = departmentBLL.GetModel(cuModel.F_BranchID);
|
|
1270
|
|
- if (pdModel1 != null)
|
|
1271
|
|
- {
|
|
1272
|
|
- model.BranchName = pdModel1.F_DeptName;//大区名称
|
|
1273
|
|
- }
|
|
1274
|
|
- model.Brands = cuModel.F_Brands;//品牌
|
|
1275
|
1278
|
}
|
|
1276
|
1279
|
}
|
|
|
1280
|
+
|
|
1277
|
1281
|
if (!string.IsNullOrEmpty(model1[i].F_QuestionType))
|
|
1278
|
1282
|
{
|
|
1279
|
1283
|
Model.T_Wo_QuestionManage Manage = quesBLL.GetModel(model1[i].F_QuestionType);//获取问题类别
|
|
|
@@ -1332,25 +1336,28 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
1332
|
1336
|
for (int i = 0; i < model1.Count; i++)
|
|
1333
|
1337
|
{
|
|
1334
|
1338
|
Questions model = new Questions();
|
|
1335
|
|
- if (!valcode(model1[i].F_CustomerID.ToString(), 10))//验证客户编码为10位纯数字
|
|
|
1339
|
+ if (!string .IsNullOrEmpty (model1[i].F_CustomerID))
|
|
1336
|
1340
|
{
|
|
1337
|
|
- Model.T_Cus_CustomerBaseNew cuModel = cusbll.GetModel(model1[i].F_CustomerID.ToString());//通过客户编号获取客户资料
|
|
1338
|
|
- if (cuModel != null)
|
|
|
1341
|
+ if (!valcode(model1[i].F_CustomerID, 10))//验证客户编码为10位纯数字
|
|
1339
|
1342
|
{
|
|
1340
|
|
- Model.T_Sys_Department pdModel = departmentBLL.GetModel(cuModel.F_AreaID);//通过公司id获取部门
|
|
1341
|
|
- if (pdModel != null)
|
|
1342
|
|
- {
|
|
1343
|
|
- model.AreaName = pdModel.F_DeptName;
|
|
1344
|
|
- }
|
|
1345
|
|
- Model.T_Sys_Department pdModel1 = departmentBLL.GetModel(cuModel.F_BranchID);
|
|
1346
|
|
- if (pdModel1 != null)
|
|
|
1343
|
+ Model.T_Cus_CustomerBaseNew cuModel = cusbll.GetModel(model1[i].F_CustomerID);//通过客户编号获取客户资料
|
|
|
1344
|
+ if (cuModel != null)
|
|
1347
|
1345
|
{
|
|
1348
|
|
- model.BranchName = pdModel1.F_DeptName;
|
|
|
1346
|
+ Model.T_Sys_Department pdModel = departmentBLL.GetModel(cuModel.F_AreaID);//通过公司id获取部门
|
|
|
1347
|
+ if (pdModel != null)
|
|
|
1348
|
+ {
|
|
|
1349
|
+ model.AreaName = pdModel.F_DeptName;
|
|
|
1350
|
+ }
|
|
|
1351
|
+ Model.T_Sys_Department pdModel1 = departmentBLL.GetModel(cuModel.F_BranchID);
|
|
|
1352
|
+ if (pdModel1 != null)
|
|
|
1353
|
+ {
|
|
|
1354
|
+ model.BranchName = pdModel1.F_DeptName;
|
|
|
1355
|
+ }
|
|
|
1356
|
+ model.Salesman = cuModel.F_Salesman;
|
|
|
1357
|
+ model.Brands = cuModel.F_Brands;
|
|
|
1358
|
+ model.Channel = cuModel.F_Channel;
|
|
|
1359
|
+
|
|
1349
|
1360
|
}
|
|
1350
|
|
- model.Salesman = cuModel.F_Salesman;
|
|
1351
|
|
- model.Brands = cuModel.F_Brands;
|
|
1352
|
|
- model.Channel = cuModel.F_Channel;
|
|
1353
|
|
-
|
|
1354
|
1361
|
}
|
|
1355
|
1362
|
}
|
|
1356
|
1363
|
model .Category = model1[i].F_TS_Category ;
|
|
|
@@ -1404,41 +1411,47 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
1404
|
1411
|
for (int i = 0; i < model1.Count; i++)
|
|
1405
|
1412
|
{
|
|
1406
|
1413
|
WorkOrderComplaint model = new WorkOrderComplaint();
|
|
1407
|
|
- if (!valcode(model1[i].F_CustomerID.ToString(), 10))//验证客户编码为10位纯数字
|
|
|
1414
|
+ if (!string .IsNullOrEmpty (model1[i].F_CustomerID))
|
|
1408
|
1415
|
{
|
|
1409
|
|
- model.F_CustomerID = model1[i].F_CustomerID;//客户编码
|
|
1410
|
|
- Model.T_Cus_CustomerBaseNew cuModel = cusbll.GetModel(model1[i].F_CustomerID.ToString());//通过客户编号获取客户资料
|
|
1411
|
|
- if (cuModel != null)
|
|
|
1416
|
+ if (!valcode(model1[i].F_CustomerID, 10))//验证客户编码为10位纯数字
|
|
1412
|
1417
|
{
|
|
1413
|
|
- Model.T_Sys_Department pdModel = departmentBLL.GetModel(cuModel.F_AreaID);//通过公司id获取部门
|
|
1414
|
|
- if (pdModel != null)
|
|
1415
|
|
- {
|
|
1416
|
|
- model.F_AreaName = pdModel.F_DeptName;//大区名称
|
|
1417
|
|
- }
|
|
1418
|
|
- Model.T_Sys_Department pdModel1 = departmentBLL.GetModel(cuModel.F_BranchID);
|
|
1419
|
|
- if (pdModel1 != null)
|
|
|
1418
|
+ model.F_CustomerID = model1[i].F_CustomerID;//客户编码
|
|
|
1419
|
+ Model.T_Cus_CustomerBaseNew cuModel = cusbll.GetModel(model1[i].F_CustomerID);//通过客户编号获取客户资料
|
|
|
1420
|
+ if (cuModel != null)
|
|
1420
|
1421
|
{
|
|
1421
|
|
- model.F_BranchName = pdModel1.F_DeptName;//分公司名称
|
|
|
1422
|
+ Model.T_Sys_Department pdModel = departmentBLL.GetModel(cuModel.F_AreaID);//通过公司id获取部门
|
|
|
1423
|
+ if (pdModel != null)
|
|
|
1424
|
+ {
|
|
|
1425
|
+ model.F_AreaName = pdModel.F_DeptName;//大区名称
|
|
|
1426
|
+ }
|
|
|
1427
|
+ Model.T_Sys_Department pdModel1 = departmentBLL.GetModel(cuModel.F_BranchID);
|
|
|
1428
|
+ if (pdModel1 != null)
|
|
|
1429
|
+ {
|
|
|
1430
|
+ model.F_BranchName = pdModel1.F_DeptName;//分公司名称
|
|
|
1431
|
+ }
|
|
|
1432
|
+ model.F_Salesman = cuModel.F_Salesman;//业务员
|
|
1422
|
1433
|
}
|
|
1423
|
|
- model.F_Salesman = cuModel.F_Salesman;//业务员
|
|
1424
|
1434
|
}
|
|
1425
|
1435
|
}
|
|
1426
|
|
- if (!valcode(model1[i].F_MaterialID.ToString(), 11))
|
|
|
1436
|
+ if (!string .IsNullOrEmpty (model1[i].F_MaterialID))
|
|
1427
|
1437
|
{
|
|
1428
|
|
- model.F_MaterialID = int.Parse(model1[i].F_MaterialID);//验证物料编码为11位纯数字
|
|
1429
|
|
- Model.T_Wo_MaterialManage maModel = mmBLL.GetModel(model1[i].F_MaterialID.ToString());//通过物料编码获取物料信息
|
|
1430
|
|
- if (maModel != null)
|
|
|
1438
|
+ if (!valcode(model1[i].F_MaterialID, 11))
|
|
1431
|
1439
|
{
|
|
1432
|
|
- model.F_MaterialName = maModel.F_MaterialName;//物料名称
|
|
1433
|
|
- model.F_Model = maModel.F_Model;//型号
|
|
1434
|
|
- model.F_Specs = maModel.F_Specs;//规格
|
|
1435
|
|
- model.F_Level1 = maModel.F_Level1;//一级分类
|
|
1436
|
|
- model.F_Level2 = maModel.F_Level2;//二级分类
|
|
1437
|
|
- model.F_Level3 = maModel.F_Level3;//三级分类
|
|
1438
|
|
- model.F_Brand = maModel.F_Brand;//品牌
|
|
1439
|
|
- model.F_MaterialEffect = maModel.F_MaterialEffect;//F_MaterialEffect
|
|
1440
|
|
- model.F_Pipeline = maModel.F_Pipeline;//F_Pipeline
|
|
1441
|
|
- model.F_Craft = maModel.F_Craft;//F_Craft
|
|
|
1440
|
+ model.F_MaterialID = int.Parse(model1[i].F_MaterialID);//验证物料编码为11位纯数字
|
|
|
1441
|
+ Model.T_Wo_MaterialManage maModel = mmBLL.GetModel(model1[i].F_MaterialID);//通过物料编码获取物料信息
|
|
|
1442
|
+ if (maModel != null)
|
|
|
1443
|
+ {
|
|
|
1444
|
+ model.F_MaterialName = maModel.F_MaterialName;//物料名称
|
|
|
1445
|
+ model.F_Model = maModel.F_Model;//型号
|
|
|
1446
|
+ model.F_Specs = maModel.F_Specs;//规格
|
|
|
1447
|
+ model.F_Level1 = maModel.F_Level1;//一级分类
|
|
|
1448
|
+ model.F_Level2 = maModel.F_Level2;//二级分类
|
|
|
1449
|
+ model.F_Level3 = maModel.F_Level3;//三级分类
|
|
|
1450
|
+ model.F_Brand = maModel.F_Brand;//品牌
|
|
|
1451
|
+ model.F_MaterialEffect = maModel.F_MaterialEffect;//F_MaterialEffect
|
|
|
1452
|
+ model.F_Pipeline = maModel.F_Pipeline;//F_Pipeline
|
|
|
1453
|
+ model.F_Craft = maModel.F_Craft;//F_Craft
|
|
|
1454
|
+ }
|
|
1442
|
1455
|
}
|
|
1443
|
1456
|
}
|
|
1444
|
1457
|
if (!string .IsNullOrEmpty(model1[i].F_QuestionType))
|
|
|
@@ -1522,17 +1535,21 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
1522
|
1535
|
for (int i = 0; i < model1.Count; i++)
|
|
1523
|
1536
|
{
|
|
1524
|
1537
|
Product model = new Product();
|
|
1525
|
|
- if (!valcode(model1[i].F_CustomerID.ToString(), 10))//验证客户编码为10位纯数字
|
|
|
1538
|
+ if (!string .IsNullOrEmpty (model1[i].F_CustomerID))
|
|
1526
|
1539
|
{
|
|
1527
|
|
-
|
|
1528
|
|
- Model.T_Cus_CustomerBaseNew cuModel = cusbll.GetModel(model1[i].F_CustomerID.ToString());//通过客户编号获取客户资料
|
|
1529
|
|
- if (cuModel != null)
|
|
|
1540
|
+ if (!valcode(model1[i].F_CustomerID, 10))//验证客户编码为10位纯数字
|
|
1530
|
1541
|
{
|
|
1531
|
|
- Model.T_Sys_Department pdModel = departmentBLL.GetModel(cuModel.F_AreaID);//通过公司id获取部门
|
|
1532
|
|
-
|
|
1533
|
|
- model.F_Salesman = cuModel.F_Salesman;//业务员
|
|
|
1542
|
+
|
|
|
1543
|
+ Model.T_Cus_CustomerBaseNew cuModel = cusbll.GetModel(model1[i].F_CustomerID);//通过客户编号获取客户资料
|
|
|
1544
|
+ if (cuModel != null)
|
|
|
1545
|
+ {
|
|
|
1546
|
+ Model.T_Sys_Department pdModel = departmentBLL.GetModel(cuModel.F_AreaID);//通过公司id获取部门
|
|
|
1547
|
+
|
|
|
1548
|
+ model.F_Salesman = cuModel.F_Salesman;//业务员
|
|
|
1549
|
+ }
|
|
1534
|
1550
|
}
|
|
1535
|
1551
|
}
|
|
|
1552
|
+
|
|
1536
|
1553
|
model.Category = model1[i].F_TS_Category;//产品
|
|
1537
|
1554
|
model.Company = model1[i].F_CompanyName;//客户单位
|
|
1538
|
1555
|
if (!string.IsNullOrEmpty(model1[i].F_BatchNumber))
|