zhupei 4 yıl önce
ebeveyn
işleme
c37ccb14b4

+ 1 - 1
RMYY_CallCenter_Api.Bll/RMYY_CallCenter_Api.Bll.csproj

@@ -46,7 +46,7 @@
46 46
     <Compile Include="T_Call_CallRecords.cs" />
47 47
     <Compile Include="T_Call_LeaveRecord.cs" />
48 48
     <Compile Include="T_Con_WorkOrder.cs" />
49
-    <Compile Include="T_Con_WorkOrderItem_New.cs" />
49
+    <Compile Include="T_Con_WorkOrderItem.cs" />
50 50
     <Compile Include="T_Cus_Customer.cs" />
51 51
     <Compile Include="T_Sys_Department.cs" />
52 52
     <Compile Include="T_Sys_DictionaryBase.cs" />

+ 1 - 1
RMYY_CallCenter_Api.Dal/RMYY_CallCenter_Api.Dal.csproj

@@ -46,7 +46,7 @@
46 46
     <Compile Include="T_Call_CallRecords.cs" />
47 47
     <Compile Include="T_Call_LeaveRecord.cs" />
48 48
     <Compile Include="T_Con_WorkOrder.cs" />
49
-    <Compile Include="T_Con_WorkOrderItem_New.cs" />
49
+    <Compile Include="T_Con_WorkOrderItem.cs" />
50 50
     <Compile Include="T_Cus_Customer.cs" />
51 51
     <Compile Include="T_Sys_Department.cs" />
52 52
     <Compile Include="T_Sys_DictionaryBase.cs" />

+ 1 - 1
RMYY_CallCenter_Api.Model/RMYY_CallCenter_Api.Model.csproj

@@ -45,7 +45,7 @@
45 45
     <Compile Include="T_Call_CallRecords.cs" />
46 46
     <Compile Include="T_Call_LeaveRecord.cs" />
47 47
     <Compile Include="T_Con_WorkOrder.cs" />
48
-    <Compile Include="T_Con_WorkOrderItem_New.cs" />
48
+    <Compile Include="T_Con_WorkOrderItem.cs" />
49 49
     <Compile Include="T_Cus_Customer.cs" />
50 50
     <Compile Include="T_Sys_Department.cs" />
51 51
     <Compile Include="T_Sys_DictionaryBase.cs" />

+ 117 - 25
RMYY_CallCenter_Api/Controllers/Con_WorkOrderController.cs

@@ -27,19 +27,33 @@ namespace RMYY_CallCenter_Api.Controllers
27 27
         /// <param name="pageindex"></param>
28 28
         /// <param name="pagesize"></param>
29 29
         /// <returns></returns>
30
-        public ActionResult GetList(string starttime="",string endtime="", int type = 0, int pageindex = 1, int pagesize = 10)
30
+        public ActionResult GetList(string keywords, string starttime="",string endtime="", int type = 0, int pageindex = 1, int pagesize = 10,int state=-1)
31 31
         {
32 32
             int userId = 1;
33 33
             if (userId != 0)
34 34
             {
35
+                #region 查询条件
35 36
                 string sql = $" and F_IsDel=0";
36 37
                 DataTable date = new DataTable();
37 38
                 if (type > 0 && type < 5)
38
-                    sql += $" and F_Type1=" + type;
39
+                    sql += $" and F_type1=" + type;
39 40
                 if (starttime.Trim() != "" && starttime != "undefined")
40 41
                     sql += $" and datediff(day,F_CreateTime,'" + starttime + "') <=0 ";
41 42
                 if (endtime.Trim() != "" && endtime != "undefined")
42 43
                     sql += $" and datediff(day,F_CreateTime,'" + endtime + "')>=0";
44
+                if (!string.IsNullOrEmpty(keywords))
45
+                {
46
+                    sql += $" and (F_Customer like '%" + keywords.Trim() + "%' or F_WorkOrderCode like '%" + keywords.Trim() + "%' or F_Phon like '%" + keywords.Trim() + "%')";
47
+                }
48
+                if (state >= 0)
49
+                {
50
+                    int[] arr ={0,1,2,3,4,5,6,10 };
51
+                    if (arr.Contains(state))
52
+                    {
53
+                        sql += $"and F_State=" + state;
54
+                    }
55
+                }
56
+                #endregion
43 57
                 int recordCount = 0;
44 58
                 if(!string.IsNullOrEmpty(sql))
45 59
                 {
@@ -58,12 +72,12 @@ namespace RMYY_CallCenter_Api.Controllers
58 72
                 List<Model.T_Con_WorkOrder> modellist = orderbll.DataTableToList(date);
59 73
                 if (modellist.Count > 0)
60 74
                 {
61
-                    List<Con_WorkOrderInput> Input = modeltoopi(modellist);
75
+                    //List<Con_WorkOrderInput> Input = modeltoopi(modellist);
62 76
                     var obj = new
63 77
                     {
64 78
                         state = "success",
65 79
                         message = "成功",
66
-                        rows = Input,
80
+                        rows = modellist,
67 81
                         total = recordCount
68 82
                     };
69 83
                     return Content(obj.ToJson());
@@ -97,14 +111,14 @@ namespace RMYY_CallCenter_Api.Controllers
97 111
                 var itemlist = itembll.GetModelList(" F_WoID="+ id +"");
98 112
                 if (list.Count > 0)
99 113
                 {
100
-                    List<Con_WorkOrderInput> Input = modeltoopi(list);
101
-                    if (Input != null)
114
+                    //List<Con_WorkOrderInput> Input = modeltoopi(list);
115
+                    if (list != null)
102 116
                     {
103 117
                         var obj = new
104 118
                         {
105 119
                             state = "success",
106 120
                             message = "成功",
107
-                            rows = Input,
121
+                            rows = list,
108 122
                             total = ItemList(itemlist)
109 123
                         };
110 124
                         return Content(obj.ToJson());
@@ -219,7 +233,7 @@ namespace RMYY_CallCenter_Api.Controllers
219 233
         /// 添加工单
220 234
         /// </summary>
221 235
         /// <returns></returns>
222
-        public ActionResult AddWorkOrder(Con_WorkOrderInput input, int overtime=0, int opt = 0, string cont = "")
236
+        public ActionResult AddWorkOrder(Con_WorkOrderInput input, int overtime=0, int opt = 0,string cont="")
223 237
         {
224 238
             int userId = 1;
225 239
             if (userId != 0)
@@ -227,8 +241,10 @@ namespace RMYY_CallCenter_Api.Controllers
227 241
                 string usercode = "8000";
228 242
                 Model.T_Sys_UserAccount user = userbll.GetModel(userId);
229 243
                 #region 添加判断
230
-                if (!(input.F_Type1 > 0 && input.F_Type1 < 5))
244
+                if (!(input.F_Type1 > 0 && input.F_Type1 < 6))
231 245
                     return Error("工单类型错误!");
246
+                if (opt == 0)
247
+                    return Error("请选择处理方式!");
232 248
                 if (string.IsNullOrEmpty(input.F_Customer))
233 249
                     return Error("请输入客户姓名!");
234 250
                 if (string.IsNullOrEmpty(input.F_Phon))
@@ -282,7 +298,10 @@ namespace RMYY_CallCenter_Api.Controllers
282 298
                             if (userleader != null)
283 299
                             {
284 300
                                 AddLog(work.F_ID, 0, deptname + userleader.F_UserName + "(" + user.F_UserCode + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, userleader.F_UserCode, userleader.F_DeptId, user);
285
-                            } 
301
+                                return Success("已提交审核!");
302
+                            }
303
+                            else
304
+                                return Error("提交审核失败!");
286 305
                         }
287 306
 
288 307
                     }
@@ -514,23 +533,39 @@ namespace RMYY_CallCenter_Api.Controllers
514 533
             model.F_type1 = input.F_Type1;//工单类型:健康咨询,投诉建议,外聘专家咨询,家庭预约上门,静脉置管维护
515 534
             model.F_type2 = input.F_Type2;
516 535
 
517
-            if (!string.IsNullOrEmpty(input.F_Urgency.ToString()))
518
-                model.F_Urgency = input.F_Urgency;// 紧急程度:0,常规1,紧急
519
-            else
520
-                model.F_Urgency = model.F_Urgency;
521 536
             model.F_Customer = input.F_Customer;//来电人姓名
522 537
             model.F_Sex = input.F_Sex;
523 538
             model.F_Phon = input.F_Phon;//来电人电话
524 539
             model.F_CusAddress = input.F_CusAddress;//地址
525 540
             model.F_IdCard = input.F_IdCard;//身份证号
526
-            model.F_ServiceItems = input.F_ServiceItems;//服务项目
527
-            model.F_Address = input.F_Address;//地区
528
-            model.F_FirstCheckHospital = input.F_FirstCheckHospital;//首次检查医院
529
-            model.F_NoduleSize = input.F_NoduleSize;//肺结节大小
530
-            model.F_FirstFindTime = input.F_FirstFindTime;//首次发现肺结节时间
541
+            if (input.F_Type1 == 4)
542
+            {
543
+                model.F_ServiceItems = input.F_ServiceItems;//服务项目
544
+            }
545
+            if (input.F_Type1 == 3)
546
+            {
547
+                model.F_Address = input.F_Address;//地区
548
+                model.F_FirstCheckHospital = input.F_FirstCheckHospital;//首次检查医院
549
+                model.F_NoduleSize = input.F_NoduleSize;//肺结节大小
550
+                model.F_FirstFindTime = input.F_FirstFindTime;//首次发现肺结节时间
551
+                if (!string.IsNullOrEmpty(input.F_Urgency.ToString()))
552
+                    model.F_Urgency = input.F_Urgency;// 紧急程度:0,常规1,紧急
553
+                else
554
+                    model.F_Urgency = model.F_Urgency;
555
+            }
556
+            if (input.F_Type1 == 5)
557
+            {
558
+                model.F_Cathetertype = input.F_Cathetertype;//  
559
+                model.F_Catheterdept = input.F_Catheterdept;//置管科室
560
+                model.F_Cathetertime = input.F_Cathetertime;//置管时间
561
+                model.F_BedNum = input.F_BedNum;//床号
562
+                model.F_InpatientNum = input.F_InpatientNum;//住院号
563
+            }
564
+
565
+            model.F_DealType = input.F_DealType;//处理方式:立即办理,提交审核,转派部门
531 566
             model.F_WorkOrderContents = input.F_WorkOrderContents;//工单内容
532
-            model.F_DealOpinions = input.F_DealOpinions;//处理意见 
533
-            model.F_DealType = model.F_DealType; //处理方式: 立即办理,提交审核,转派(健康事业部)
567
+            model.F_DealOpinions = input.F_DealOpinions;//处理意见  
568
+            //model.F_DealContents = input.F_DealContents;//处理内容
534 569
             if (!string.IsNullOrEmpty(input.F_CallID))
535 570
             {
536 571
                 model.F_CallID = input.F_CallID;//通话记录id
@@ -686,6 +721,7 @@ namespace RMYY_CallCenter_Api.Controllers
686 721
                         Inputmodel.F_StateName = "已完结";
687 722
                     }
688 723
                     #endregion
724
+                    Inputmodel.F_Customer = item.F_Customer;//来电人姓名
689 725
                     Inputmodel.F_Sex = item.F_Sex;//性别
690 726
                     Inputmodel.F_CusAddress = item.F_CusAddress;//地址
691 727
                     Inputmodel.F_Phon = item.F_Phon;//电话
@@ -704,7 +740,11 @@ namespace RMYY_CallCenter_Api.Controllers
704 740
                     }
705 741
                     if (item.F_type1 == 5)
706 742
                     {
707
-
743
+                        Inputmodel.F_Cathetertype = item.F_Cathetertype;//置管类型
744
+                        Inputmodel.F_Catheterdept = item.F_Catheterdept;//置管科室
745
+                        Inputmodel.F_Cathetertime = item.F_Cathetertime;//置管时间
746
+                        Inputmodel.F_BedNum = item.F_BedNum;//床号
747
+                        Inputmodel.F_InpatientNum = item.F_InpatientNum;//住院号
708 748
                     }
709 749
                     Inputmodel.F_DealOpinions = item.F_DealOpinions;//处理意见
710 750
                     Inputmodel.F_DealType = item.F_DealType;//处理方式:立即办理,提交审核,转派部门
@@ -835,6 +875,58 @@ namespace RMYY_CallCenter_Api.Controllers
835 875
 
836 876
         }
837 877
 
878
+
879
+        /// <summary>
880
+        /// 审核工单
881
+        /// </summary>
882
+        /// <param name="orderid"></param>
883
+        /// <param name="AuditCont"></param>
884
+        /// <param name="IsAudit"></param>
885
+        /// <returns></returns>
886
+        public ActionResult GetApproval(int orderid,string AuditCont,int IsAudit=0 )
887
+        {
888
+            int userId = 1;
889
+            if (userId != 0)
890
+            {
891
+                Model.T_Sys_UserAccount ua = userbll.GetModel(userId);
892
+                if (ua != null)
893
+                {
894
+                    Model.T_Con_WorkOrder wmodel = orderbll.GetModel(orderid);
895
+                    if (wmodel != null)
896
+                    {
897
+                        if (IsAudit == 1)
898
+                        {
899
+                        string deptname = "";
900
+                        var deptmodel = deptbll.GetModel(ua.F_DeptId);
901
+                        if (deptmodel != null)
902
+                        {
903
+                            deptname = deptmodel.F_DeptName + "-";
904
+                        }               
905
+                            var res = AddLog(wmodel.F_ID, wmodel.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + "工单审批:已同意审批" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reaudit, ua.F_UserCode, ua.F_DeptId, ua);
906
+                            if (res > 0)
907
+                            {
908
+                                wmodel.F_State = 0; //待转派
909
+                                //处理内容
910
+                                if (!string.IsNullOrEmpty(AuditCont))
911
+                                wmodel.F_AuditCont += AuditCont + ";";
912
+                                wmodel.F_IsAudit = IsAudit;
913
+                                wmodel.F_AuditState = 1;
914
+                                wmodel.F_AuditUser = ua.F_UserCode;
915
+                                wmodel.F_AuditTime = DateTime.Now;
916
+                                orderbll.Update(wmodel);
917
+                                return Success("审批成功!");
918
+                            }
919
+                            else
920
+                                return Error("审批失败!");
921
+
922
+                        }
923
+                    }
924
+                }
925
+
926
+            }
927
+            return Error("无操作权限");
928
+        }
929
+
838 930
         /// <summary>
839 931
         /// 处理工单
840 932
         /// </summary>
@@ -903,7 +995,7 @@ namespace RMYY_CallCenter_Api.Controllers
903 995
             }
904 996
             else
905 997
             {
906
-                model.F_DealResult = "处理";//处理结果
998
+                model.F_DealResult = "处理";//处理结果
907 999
             }
908 1000
             #region 读取当前登录人部门
909 1001
             string deptname = "";
@@ -948,8 +1040,8 @@ namespace RMYY_CallCenter_Api.Controllers
948 1040
         /// <returns></returns>
949 1041
         public ActionResult AssignWorkOrder(int orderid,string cont,int clbm=0,int clid=0)
950 1042
         {
951
-            var userId = User.F_UserId;
952
-            string usercode = User.F_UserCode;
1043
+            var userId =1 ;
1044
+            string usercode = "8000";
953 1045
             if (userId != 0)
954 1046
             {
955 1047
                 Model.T_Sys_UserAccount ua = userbll.GetModel(userId);

+ 0 - 1
RMYY_CallCenter_Api/Controllers/GongDanTypeController.cs

@@ -62,7 +62,6 @@ namespace RMYY_CallCenter_Api.Controllers
62 62
             {
63 63
                 return Error("添加失败,请重试");
64 64
             }
65
-
66 65
         }
67 66
 
68 67
         /// <summary>

+ 1 - 1
RMYY_CallCenter_Api/Controllers/HomeController.cs

@@ -30,7 +30,7 @@ namespace RMYY_CallCenter_Api.Controllers
30 30
             Dictionary<string, string> paras = new Dictionary<string, string>();
31 31
             string sql = " select * from T_Sys_UserAccount where F_UserCode=@F_UserCode and F_PassWord=@F_PassWord";
32 32
             paras.Add("@F_UserCode", usercode);
33
-            paras.Add("@F_PassWord", password.ToMD5String());
33
+            paras.Add("@F_PassWord", password);
34 34
             var dt = DbHelperSQL.Query(sql, paras).Tables[0];
35 35
             if (dt != null && dt.Rows.Count > 0)
36 36
             {