浏览代码

心连心修改,bug调整

duhongyu 6 年之前
父节点
当前提交
8c1d6b07ca
共有 14 个文件被更改,包括 1998 次插入341 次删除
  1. 1 1
      codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_QuestionManage.cs
  2. 3 3
      codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs
  3. 15 4
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs
  4. 1 1
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/RoleInfoController.cs
  5. 23 0
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs
  6. 35 14
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerNewController.cs
  7. 78 61
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WOReportController.cs
  8. 625 130
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs
  9. 2 2
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/MaterialManageController.cs
  10. 64 4
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs
  11. 1115 116
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs
  12. 2 0
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Enum/EnumWorkOrderState.cs
  13. 31 3
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WorkOrderNewInput.cs
  14. 3 2
      codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrder.cs

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_QuestionManage.cs

333
         {
333
         {
334
             StringBuilder strSql = new StringBuilder();
334
             StringBuilder strSql = new StringBuilder();
335
             strSql.Append("select * ");
335
             strSql.Append("select * ");
336
-            strSql.Append(" FROM T_Wo_QuestionManage ");
336
+                strSql.Append(" FROM T_Wo_QuestionManage ");
337
             if (strWhere.Trim() != "")
337
             if (strWhere.Trim() != "")
338
             {
338
             {
339
                 strSql.Append(" where " + strWhere);
339
                 strSql.Append(" where " + strWhere);

+ 3 - 3
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs

71
                     new SqlParameter("@F_Description", SqlDbType.NText),
71
                     new SqlParameter("@F_Description", SqlDbType.NText),
72
                     new SqlParameter("@F_Files", SqlDbType.NVarChar,-1),
72
                     new SqlParameter("@F_Files", SqlDbType.NVarChar,-1),
73
                     new SqlParameter("@F_DealType", SqlDbType.NVarChar,200),
73
                     new SqlParameter("@F_DealType", SqlDbType.NVarChar,200),
74
-                    new SqlParameter("@F_CustomerID", SqlDbType.Int,4),
74
+                    new SqlParameter("@F_CustomerID", SqlDbType.NVarChar,100),
75
                     new SqlParameter("@F_MaterialID", SqlDbType.NVarChar,200),
75
                     new SqlParameter("@F_MaterialID", SqlDbType.NVarChar,200),
76
                     new SqlParameter("@F_QuestionType", SqlDbType.NVarChar,200),
76
                     new SqlParameter("@F_QuestionType", SqlDbType.NVarChar,200),
77
                     new SqlParameter("@F_BatchNumber", SqlDbType.NVarChar,200),
77
                     new SqlParameter("@F_BatchNumber", SqlDbType.NVarChar,200),
347
                     new SqlParameter("@F_Description", SqlDbType.NText),
347
                     new SqlParameter("@F_Description", SqlDbType.NText),
348
                     new SqlParameter("@F_Files", SqlDbType.NVarChar,-1),
348
                     new SqlParameter("@F_Files", SqlDbType.NVarChar,-1),
349
                     new SqlParameter("@F_DealType", SqlDbType.NVarChar,200),
349
                     new SqlParameter("@F_DealType", SqlDbType.NVarChar,200),
350
-                    new SqlParameter("@F_CustomerID", SqlDbType.Int,4),
350
+                    new SqlParameter("@F_CustomerID", SqlDbType.NVarChar,100),
351
             new SqlParameter("@F_MaterialID", SqlDbType.NVarChar,200),
351
             new SqlParameter("@F_MaterialID", SqlDbType.NVarChar,200),
352
                     new SqlParameter("@F_QuestionType", SqlDbType.NVarChar,200),
352
                     new SqlParameter("@F_QuestionType", SqlDbType.NVarChar,200),
353
                     new SqlParameter("@F_BatchNumber", SqlDbType.NVarChar,200),
353
                     new SqlParameter("@F_BatchNumber", SqlDbType.NVarChar,200),
696
                 }
696
                 }
697
                 if (row["F_CustomerID"] != null && row["F_CustomerID"].ToString() != "")
697
                 if (row["F_CustomerID"] != null && row["F_CustomerID"].ToString() != "")
698
                 {
698
                 {
699
-                    model.F_CustomerID = int.Parse(row["F_CustomerID"].ToString());
699
+                    model.F_CustomerID = row["F_CustomerID"].ToString();
700
                 }
700
                 }
701
                 if (row["F_MaterialID"] != null)
701
                 if (row["F_MaterialID"] != null)
702
                 {
702
                 {

+ 15 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

217
         /// 获取部门列表
217
         /// 获取部门列表
218
         /// </summary>
218
         /// </summary>
219
         /// <returns></returns>
219
         /// <returns></returns>
220
-        public ActionResult GetDeptList(int pId = 0)
220
+        public ActionResult GetDeptList(int pId = 0,string keywords = "")
221
         {
221
         {
222
             //if (Request.IsAuthenticated)
222
             //if (Request.IsAuthenticated)
223
             //{
223
             //{
224
             DataTable dt = new DataTable();
224
             DataTable dt = new DataTable();
225
-            dt = new BLL.T_Sys_Department().GetList(" F_State=1 and F_ParentId=" + pId).Tables[0];
225
+            if (keywords != "")
226
+            {
227
+                if (keywords.Contains("'"))
228
+                {
229
+                    keywords= keywords.Replace("'", "");
230
+                }
231
+                dt = new BLL.T_Sys_Department().GetList(" F_State=1" + $" and F_DeptName like '%" + keywords.Trim()+"%'").Tables[0];
232
+            }
233
+            else
234
+            {
235
+                dt = new BLL.T_Sys_Department().GetList(" F_State=1 and F_ParentId=" + pId).Tables[0];
236
+            }
226
             List<Model.TreeModel> modelList = BindTree(dt, "0");
237
             List<Model.TreeModel> modelList = BindTree(dt, "0");
227
-
228
             if (modelList != null)
238
             if (modelList != null)
229
             {
239
             {
230
                 if (modelList.Count > 0)
240
                 if (modelList.Count > 0)
231
                     return Success("加载成功", modelList);
241
                     return Success("加载成功", modelList);
232
             }
242
             }
233
-            return Error("加载失败");
243
+
244
+            return Success(null );
234
             //}
245
             //}
235
             //return NoToken("未知错误,请重新登录");
246
             //return NoToken("未知错误,请重新登录");
236
         }
247
         }

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/RoleInfoController.cs

17
     {
17
     {
18
         private BLL.T_Sys_RoleInfo roleInfoBLL = new BLL.T_Sys_RoleInfo();
18
         private BLL.T_Sys_RoleInfo roleInfoBLL = new BLL.T_Sys_RoleInfo();
19
         // 获取角色列表
19
         // 获取角色列表
20
-        public ActionResult GetRoleList(int pageIndex = 1, int pageSize = 10, string code = "", string name = "")
20
+        public ActionResult GetRoleList(int pageIndex = 1, int pageSize = 100, string code = "", string name = "")
21
         {
21
         {
22
             ActionResult res = NoToken("未知错误,请重新登录");
22
             ActionResult res = NoToken("未知错误,请重新登录");
23
 
23
 

+ 23 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

62
                                         out recordCount);
62
                                         out recordCount);
63
 
63
 
64
                 List<Model.UserAccount> modelList = new BLL.UserAccount().DataTableToList(dt);
64
                 List<Model.UserAccount> modelList = new BLL.UserAccount().DataTableToList(dt);
65
+              
65
                 var obj = new
66
                 var obj = new
66
                 {
67
                 {
67
                     rows = modelList.Select(x => new
68
                     rows = modelList.Select(x => new
97
                         F_DeptName = x.F_DeptName,
98
                         F_DeptName = x.F_DeptName,
98
                         F_WorkNumber = x.F_WorkNumber,
99
                         F_WorkNumber = x.F_WorkNumber,
99
                         //F_WXNo=x.F_WXNo,
100
                         //F_WXNo=x.F_WXNo,
101
+                        F_AreaName = GetModelDeptName(x.F_DeptId),
100
                         F_SeatGroup = x.F_SeartGroup
102
                         F_SeatGroup = x.F_SeartGroup
101
                     }),
103
                     }),
102
                     total = recordCount
104
                     total = recordCount
111
             }
113
             }
112
             return res;
114
             return res;
113
         }
115
         }
116
+        private string GetModelDeptName(int deptid)
117
+        {
118
+            string str = "";
119
+            Model.T_Sys_Department dept = departmentBLL.GetModel(deptid);
120
+            if (dept !=null )
121
+            {
122
+                if (dept.F_Layer == 1)
123
+                {
124
+                    str = dept.F_DeptName;
125
+                }
126
+                else if (dept.F_Layer == 2)
127
+                {
128
+                    Model.T_Sys_Department dept1 = departmentBLL.GetModel(dept.F_ParentId);
129
+                    if (dept1 != null)
130
+                    {
131
+                        str = dept1.F_DeptName;
132
+                    }
133
+                }
134
+            }
135
+            return str;
136
+        }
114
         /// <summary>
137
         /// <summary>
115
         /// 获取下一个工号
138
         /// 获取下一个工号
116
         /// </summary>
139
         /// </summary>

+ 35 - 14
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerNewController.cs

139
             if (!string.IsNullOrWhiteSpace(code))//客户编号
139
             if (!string.IsNullOrWhiteSpace(code))//客户编号
140
             {
140
             {
141
                 if (valcode(code))
141
                 if (valcode(code))
142
-                    sql += " and F_CustomerCode=" + code.Trim() + " ";
142
+                    sql += " and F_CustomerCode='" + code.Trim() + "'";
143
                 list = cusbll.GetModelList(sql);
143
                 list = cusbll.GetModelList(sql);
144
                 if (list.Count > 0)
144
                 if (list.Count > 0)
145
                 {
145
                 {
147
                     if (Input != null)
147
                     if (Input != null)
148
                         return Success("获取成功", Input.FirstOrDefault());
148
                         return Success("获取成功", Input.FirstOrDefault());
149
                     else
149
                     else
150
-                        return Error("没有获取到客户信息,请检查客户编号");
150
+                        return Success("没有获取到客户信息,请检查客户编号", null );
151
                 }
151
                 }
152
                 else
152
                 else
153
                 {
153
                 {
154
-                    return Error("没有获取到客户信息,请检查客户编号");
154
+                    return Success("没有获取到客户信息,请检查客户编号", null);
155
                 }
155
                 }
156
             }
156
             }
157
             else
157
             else
158
             {
158
             {
159
-                return Error("参数传输失败");
159
+                return Success("请输入客户编号", null);
160
+             
160
             }
161
             }
161
         }
162
         }
162
         /// <summary>
163
         /// <summary>
213
                 return Error("参数传输失败");
214
                 return Error("参数传输失败");
214
             }
215
             }
215
         }
216
         }
216
-        private string  GetIntCode()
217
+        private string  GetIntCode(int i )
217
         {
218
         {
218
-            string time = DateTime.Now.ToString("hhmmss");
219
-            Random ran = new Random();
220
-            int RandKey = ran.Next(100, 999);
221
-            string timecode = 3 + "" + RandKey + "" + time;
222
-            return timecode;
219
+            DateTime times = DateTime.Now.AddMinutes(i);
220
+            string time = times.ToString("yyMMddhhmm");
221
+            return time;
223
         }
222
         }
224
         /// <summary>
223
         /// <summary>
225
         /// 添加客户信息
224
         /// 添加客户信息
236
                 if (getunique(0, input.F_CustomerCode))
235
                 if (getunique(0, input.F_CustomerCode))
237
                     return Error("编号已被占用,请重新输入!");
236
                     return Error("编号已被占用,请重新输入!");
238
             }
237
             }
238
+            if (string.IsNullOrEmpty(input.F_LegalPhone))
239
+                return Error("请输入客户电话");
240
+            if (getunphone(0, input.F_LegalPhone))
241
+                return Error("已存在该客户请勿重复添加");
242
+            int i = 0;
239
             if (string.IsNullOrEmpty(input.F_CustomerCode))
243
             if (string.IsNullOrEmpty(input.F_CustomerCode))
240
             {
244
             {
241
                 while (true)
245
                 while (true)
242
                 {
246
                 {
243
-                    if (!getunique(0, GetIntCode()))
247
+                    if (!getunique(0, GetIntCode(i)))
244
                     {
248
                     {
245
-                        input.F_CustomerCode= GetIntCode();
249
+                        input.F_CustomerCode= GetIntCode(i);
246
                         break ;
250
                         break ;
247
                     }
251
                     }
252
+                    else
253
+                    {
254
+                        i++;
255
+                    }
248
                 }
256
                 }
249
             }
257
             }
250
             #endregion
258
             #endregion
442
             return count > 0;
450
             return count > 0;
443
         }
451
         }
444
         /// <summary>
452
         /// <summary>
453
+        /// 验证客户电话是否唯一
454
+        /// </summary>
455
+        private bool getunphone(int id, string phone)
456
+        {
457
+            var sql = " F_IsDelete=0 ";
458
+            sql += "and (F_LegalPhone='" + phone + "')";
459
+            if (id > 0)
460
+                sql += " and F_CustomerId<>" + id;
461
+            var count = cusbll.GetModelList(sql).Count();
462
+
463
+            return count > 0;
464
+        }
465
+        /// <summary>
445
         /// 删除客户
466
         /// 删除客户
446
         /// </summary>
467
         /// </summary>
447
         /// <param name="ids"></param>
468
         /// <param name="ids"></param>
596
                                 dModel.F_CustomerNature = dr["客户性质"].ToString();
617
                                 dModel.F_CustomerNature = dr["客户性质"].ToString();
597
                                 dModel.F_Channel = dr["渠道类型"].ToString();
618
                                 dModel.F_Channel = dr["渠道类型"].ToString();
598
                                 dModel.F_Credit = dr["信用等级"].ToString();
619
                                 dModel.F_Credit = dr["信用等级"].ToString();
599
-                                dModel.F_Legal = dr["法人"].ToString();
620
+                                dModel.F_Legal = dr["客户"].ToString();
600
                                     if (!string.IsNullOrEmpty(dr["性别"].ToString()))
621
                                     if (!string.IsNullOrEmpty(dr["性别"].ToString()))
601
                                     {
622
                                     {
602
                                         if (dr["性别"].ToString() == "女")
623
                                         if (dr["性别"].ToString() == "女")
609
                                         }
630
                                         }
610
                                     }
631
                                     }
611
                                    
632
                                    
612
-                                    dModel.F_LegalPhone = dr["法人电话"].ToString();
633
+                                    dModel.F_LegalPhone = dr["客户电话"].ToString();
613
                                 dModel.F_AddressProvince = dr["省"].ToString();
634
                                 dModel.F_AddressProvince = dr["省"].ToString();
614
                                 dModel.F_AddressCity = dr["市"].ToString();
635
                                 dModel.F_AddressCity = dr["市"].ToString();
615
                                 dModel.F_AddressCountry = dr["县"].ToString();
636
                                 dModel.F_AddressCountry = dr["县"].ToString();

+ 78 - 61
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WOReportController.cs

1256
                 for (int i = 0; i < model1.Count; i++)
1256
                 for (int i = 0; i < model1.Count; i++)
1257
                 {
1257
                 {
1258
                     Prescription model = new Prescription();
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
                     if (!string.IsNullOrEmpty(model1[i].F_QuestionType))
1281
                     if (!string.IsNullOrEmpty(model1[i].F_QuestionType))
1278
                     {
1282
                     {
1279
                         Model.T_Wo_QuestionManage Manage = quesBLL.GetModel(model1[i].F_QuestionType);//获取问题类别
1283
                         Model.T_Wo_QuestionManage Manage = quesBLL.GetModel(model1[i].F_QuestionType);//获取问题类别
1332
                 for (int i = 0; i < model1.Count; i++)
1336
                 for (int i = 0; i < model1.Count; i++)
1333
                 {
1337
                 {
1334
                     Questions model = new Questions();
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
                     model .Category = model1[i].F_TS_Category ;
1363
                     model .Category = model1[i].F_TS_Category ;
1404
                 for (int i = 0; i < model1.Count; i++)
1411
                 for (int i = 0; i < model1.Count; i++)
1405
                 {
1412
                 {
1406
                     WorkOrderComplaint model = new WorkOrderComplaint();
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
                     if (!string .IsNullOrEmpty(model1[i].F_QuestionType))
1457
                     if (!string .IsNullOrEmpty(model1[i].F_QuestionType))
1522
                 for (int i = 0; i < model1.Count; i++)
1535
                 for (int i = 0; i < model1.Count; i++)
1523
                 {
1536
                 {
1524
                     Product model = new Product();
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
                     model.Category = model1[i].F_TS_Category;//产品
1553
                     model.Category = model1[i].F_TS_Category;//产品
1537
                     model.Company = model1[i].F_CompanyName;//客户单位
1554
                     model.Company = model1[i].F_CompanyName;//客户单位
1538
                     if (!string.IsNullOrEmpty(model1[i].F_BatchNumber))
1555
                     if (!string.IsNullOrEmpty(model1[i].F_BatchNumber))

文件差异内容过多而无法显示
+ 625 - 130
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs


+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/MaterialManageController.cs

76
                 }
76
                 }
77
                 else
77
                 else
78
                 {
78
                 {
79
-                    return Error("获取物料信息失败");
79
+                    return Success(null );
80
                 }
80
                 }
81
             }
81
             }
82
             else
82
             else
83
             {
83
             {
84
-                return Error("获取参数失败");
84
+                return Success("请输入物料编码", null);
85
             }
85
             }
86
         }
86
         }
87
 
87
 

+ 64 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

146
         #region 读取问题类别
146
         #region 读取问题类别
147
         public ActionResult GetQuestionNameType(int type = 0, string QuestionName = "")
147
         public ActionResult GetQuestionNameType(int type = 0, string QuestionName = "")
148
         {
148
         {
149
-            var sql = " F_IsDelete=0";
149
+            DataTable dt = new DataTable();
150
+            var sql = "and F_IsDelete=0";
150
             if (QuestionName != "")
151
             if (QuestionName != "")
151
             {
152
             {
152
                 var Question = quesBLL.GetModel(QuestionName);
153
                 var Question = quesBLL.GetModel(QuestionName);
162
                 sql += " and F_Type='" + EnumWOType.ConsultingNeeds.ToString() + "'";
163
                 sql += " and F_Type='" + EnumWOType.ConsultingNeeds.ToString() + "'";
163
             if (type == (int)EnumWOType.SpotCheck)//抽检
164
             if (type == (int)EnumWOType.SpotCheck)//抽检
164
                 sql += " and F_Type='" + EnumWOType.SpotCheck.ToString() + "'";
165
                 sql += " and F_Type='" + EnumWOType.SpotCheck.ToString() + "'";
165
-            DataTable dt = quesBLL.GetList(sql).Tables[0];
166
+            int recordCount = 0;
167
+            if (QuestionName==""&& type == (int)EnumWOType.Complaint)
168
+                {
169
+                dt = BLL.PagerBLL.GetListPager(
170
+                       "T_Wo_QuestionManage",
171
+                       "F_ID",
172
+                       "*",
173
+                       sql,
174
+                       "ORDER BY T_Wo_QuestionManage.F_ID desc",
175
+                       10000,
176
+                       1,
177
+                       true,
178
+                       out recordCount);
179
+            }
180
+            else
181
+            {
182
+                dt = BLL.PagerBLL.GetListPager(
183
+                      "T_Wo_QuestionManage",
184
+                      "F_ID",
185
+                      "*",
186
+                      sql,
187
+                      "ORDER BY T_Wo_QuestionManage.F_ID ",
188
+                      10000,
189
+                      1,
190
+                      true,
191
+                      out recordCount);
192
+            }
193
+        
166
             List<Model.TreeModel> modelList = BindTree(dt, "0");
194
             List<Model.TreeModel> modelList = BindTree(dt, "0");
167
             if (modelList != null)
195
             if (modelList != null)
168
             {
196
             {
173
         }
201
         }
174
         public ActionResult GetQuestionType(int type = 0,int pid=0)
202
         public ActionResult GetQuestionType(int type = 0,int pid=0)
175
         {
203
         {
176
-            var sql = " F_IsDelete=0";
204
+            DataTable dt = new DataTable();
205
+            var sql = "and F_IsDelete=0";
177
                 sql += "  and F_ParentId=" + pid;
206
                 sql += "  and F_ParentId=" + pid;
178
             if (type == (int)EnumWOType.Complaint)//投诉
207
             if (type == (int)EnumWOType.Complaint)//投诉
179
                 sql += " and F_Type='" + EnumWOType.Complaint.ToString() + "'";
208
                 sql += " and F_Type='" + EnumWOType.Complaint.ToString() + "'";
181
                 sql += " and F_Type='" + EnumWOType.ConsultingNeeds.ToString() + "'";
210
                 sql += " and F_Type='" + EnumWOType.ConsultingNeeds.ToString() + "'";
182
             if (type == (int)EnumWOType.SpotCheck)//抽检
211
             if (type == (int)EnumWOType.SpotCheck)//抽检
183
                 sql += " and F_Type='" + EnumWOType.SpotCheck.ToString() + "'";
212
                 sql += " and F_Type='" + EnumWOType.SpotCheck.ToString() + "'";
184
-            DataTable dt = quesBLL.GetList(sql).Tables[0];
213
+            int recordCount = 0;
214
+            if (pid == 0 && type == (int)EnumWOType.Complaint)
215
+            {
216
+                if (!string.IsNullOrWhiteSpace(sql))
217
+                {
218
+
219
+                    dt = BLL.PagerBLL.GetListPager(
220
+                        "T_Wo_QuestionManage",
221
+                        "F_ID",
222
+                        "*",
223
+                        sql,
224
+                        "ORDER BY T_Wo_QuestionManage.F_ID desc",
225
+                        10000,
226
+                        1,
227
+                        true,
228
+                        out recordCount);
229
+                }
230
+            }
231
+            else
232
+            {
233
+                dt = BLL.PagerBLL.GetListPager(
234
+                      "T_Wo_QuestionManage",
235
+                      "F_ID",
236
+                      "*",
237
+                      sql,
238
+                      "ORDER BY T_Wo_QuestionManage.F_ID ",
239
+                      10000,
240
+                      1,
241
+                      true,
242
+                      out recordCount);
243
+            }
244
+
185
             List<Model.TreeModel> modelList = BindTree(dt, "0");
245
             List<Model.TreeModel> modelList = BindTree(dt, "0");
186
             if (modelList != null)
246
             if (modelList != null)
187
             {
247
             {

文件差异内容过多而无法显示
+ 1115 - 116
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs


+ 2 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Enum/EnumWorkOrderState.cs

39
         customers,
39
         customers,
40
         [Description("微信未通过")]
40
         [Description("微信未通过")]
41
         recustomers,
41
         recustomers,
42
+        [Description("待审批")]
43
+        audit,
42
     }
44
     }
43
     /// <summary>
45
     /// <summary>
44
     /// 工单记录类型枚举
46
     /// 工单记录类型枚举

+ 31 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WorkOrderNewInput.cs

162
         /// <summary>
162
         /// <summary>
163
         /// 客户id
163
         /// 客户id
164
         /// </summary>
164
         /// </summary>
165
-        public int?   F_CustomerID
165
+        public string    F_CustomerID
166
         {
166
         {
167
             get; set;
167
             get; set;
168
         }
168
         }
239
         /// <summary>
239
         /// <summary>
240
         /// 物料id
240
         /// 物料id
241
         /// </summary>
241
         /// </summary>
242
-        public int  F_MaterialID
242
+        public string   F_MaterialID
243
         {
243
         {
244
             get; set;
244
             get; set;
245
         }
245
         }
676
             get; set;
676
             get; set;
677
         }
677
         }
678
         /// <summary>
678
         /// <summary>
679
+        /// 添加人工号
680
+        /// </summary>
681
+        public string F_CreateName
682
+        {
683
+            get; set;
684
+        }
685
+        /// <summary>
679
         /// 添加时间
686
         /// 添加时间
680
         /// </summary>
687
         /// </summary>
681
         public DateTime? F_CreateOn
688
         public DateTime? F_CreateOn
746
         {
753
         {
747
             get; set;
754
             get; set;
748
         }
755
         }
756
+        ///// <summary>
757
+        ///// 上级人员
758
+        ///// </summary>
759
+        public string F_UserName
760
+        {
761
+            get; set;
762
+        }
763
+        ///// <summary>
764
+        ///// 上级人员
765
+        ///// </summary>
766
+        public string F_UserCode
767
+        {
768
+            get; set;
769
+        }
770
+        ///// <summary>
771
+        ///// 上级部门
772
+        ///// </summary>
773
+        public string F_NextDeptName
774
+        {
775
+            get; set;
776
+        }
749
     }
777
     }
750
 }
778
 }
751
 public class Questions
779
 public class Questions
914
     /// <summary>
942
     /// <summary>
915
     /// 客户编号
943
     /// 客户编号
916
     /// </summary>
944
     /// </summary>
917
-    public int? F_CustomerID
945
+    public string  F_CustomerID
918
     {
946
     {
919
         get; set;
947
         get; set;
920
     }
948
     }

+ 3 - 2
codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrder.cs

26
         private string _f_description;
26
         private string _f_description;
27
         private string _f_files;
27
         private string _f_files;
28
         private string _f_dealtype;
28
         private string _f_dealtype;
29
-        private int? _f_customerid;
29
+        private string  _f_customerid;
30
         private string _f_materialid;
30
         private string _f_materialid;
31
         private string _f_questiontype;
31
         private string _f_questiontype;
32
         private string _f_batchnumber;
32
         private string _f_batchnumber;
277
         /// <summary>
277
         /// <summary>
278
         /// 客户id
278
         /// 客户id
279
         /// </summary>
279
         /// </summary>
280
-        public int? F_CustomerID
280
+        public string  F_CustomerID
281
         {
281
         {
282
             set { _f_customerid = value; }
282
             set { _f_customerid = value; }
283
             get { return _f_customerid; }
283
             get { return _f_customerid; }
722
             set { _f_createby = value; }
722
             set { _f_createby = value; }
723
             get { return _f_createby; }
723
             get { return _f_createby; }
724
         }
724
         }
725
+    
725
         /// <summary>
726
         /// <summary>
726
         /// 添加时间
727
         /// 添加时间
727
         /// </summary>
728
         /// </summary>