Просмотр исходного кода

工单调整,以及编辑用户资料话务人员数量限制修改

zhengbingbing лет назад: 7
Родитель
Сommit
91d0beeb30

+ 1 - 2
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs

@@ -348,8 +348,7 @@ namespace CallCenterApi.DAL
348 348
                 return false;
349 349
             }
350 350
         }
351
-
352
-
351
+        
353 352
         /// <summary>
354 353
         /// 删除一条数据
355 354
         /// </summary>

+ 5 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/SysConfigController.cs

@@ -237,12 +237,15 @@ namespace CallCenterApi.Interface.Controllers
237 237
         /// </summary>
238 238
         /// <param name="currentSeat">当前坐席数</param>
239 239
         /// <returns></returns>
240
-        public bool IsValidSeatPermission()
240
+        public bool IsValidSeatPermission(string usercode)
241 241
         {
242 242
             Model.T_Sys_SeatPermissionConfig model = new Model.T_Sys_SeatPermissionConfig();
243 243
             BLL.T_Sys_SeatPermissionConfig bll = new BLL.T_Sys_SeatPermissionConfig();
244 244
             BLL.T_Sys_UserAccount bllU = new BLL.T_Sys_UserAccount();
245
-            int currentSeat = bllU.GetRecordCount(" F_SeatFlag = 1 ");  //坐席角色用户数量 1中心话务员 2标志(0:非话务;1话务标志)
245
+            string sql = " F_SeatFlag = 1 ";
246
+            if (!string.IsNullOrWhiteSpace(usercode))
247
+                sql += " and F_UserCode<>'" + usercode + "' ";
248
+            int currentSeat = bllU.GetRecordCount(sql);  //坐席角色用户数量 1中心话务员 2标志(0:非话务;1话务标志)
246 249
             model = bll.GetModel();
247 250
             int maxSeat = int.Parse(model.F_MaxSeat.ToString());
248 251
             string securityKey = model.F_SecurityKey;

+ 3 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -234,7 +234,7 @@ namespace CallCenterApi.Interface.Controllers
234 234
                 {
235 235
                     SysConfigController sys = new SysConfigController();
236 236
                     //话务人员限制权限判断
237
-                    if (sys.IsValidSeatPermission())
237
+                    if (sys.IsValidSeatPermission(""))
238 238
                     {
239 239
                         if (sysUserAccountBll.Add(userAccountModel) > 0)
240 240
                             res = Success("新增成功!");
@@ -333,7 +333,7 @@ namespace CallCenterApi.Interface.Controllers
333 333
                 {
334 334
                     SysConfigController sys = new SysConfigController();
335 335
                     //话务人员限制权限判断
336
-                    if (sys.IsValidSeatPermission())
336
+                    if (sys.IsValidSeatPermission(input.Usercode))
337 337
                     {
338 338
                         if (sysUserAccountBll.Update(userAccountModel))
339 339
                             res = Success("编辑成功!");
@@ -371,7 +371,7 @@ namespace CallCenterApi.Interface.Controllers
371 371
                 //话务人员限制权限判断
372 372
                 if (state == 0)
373 373
                 {
374
-                    if (sys.IsValidSeatPermission())
374
+                    if (sys.IsValidSeatPermission(""))
375 375
                     {
376 376
                         if (sysUserAccountBll.DeleteList(idStr, state))
377 377
                             res = Success("设置成功");

+ 5 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -277,13 +277,15 @@ namespace CallCenterApi.Interface.Controllers.weixin
277 277
             string cont = HttpUtility.UrlDecode(RequestString.GetFormString("cont"));
278 278
             string answer = HttpUtility.UrlDecode(RequestString.GetFormString("answer"));
279 279
             string remark = HttpUtility.UrlDecode(RequestString.GetFormString("remark"));
280
-            int infotypeid = RequestString.GetFormInt("infotypeid", 0);
281
-            int unitid = RequestString.GetFormInt("unitid", 0);
280
+            string infotype = HttpUtility.UrlDecode(RequestString.GetFormString("infotype"));
281
+            string unit = HttpUtility.UrlDecode(RequestString.GetFormString("unit"));
282
+            //int infotypeid = RequestString.GetFormInt("infotypeid", 0);
283
+            //int unitid = RequestString.GetFormInt("unitid", 0);
282 284
 
283 285
             string stropenid = HttpUtility.UrlDecode(RequestString.GetFormString("openid"));
284 286
 
285 287
             workorder.WorkOrderController wo = new workorder.WorkOrderController();
286
-            bool res = wo.DealWorkOrders(orderid, customer,inqtime,inquser,country,address,detail,detail,answer,remark, infotypeid, unitid, stropenid);
288
+            bool res = wo.DealWorkOrders(orderid, customer,inqtime,inquser,country,address,detail,detail,answer,remark, infotype, unit, stropenid);
287 289
 
288 290
             if (res)
289 291
             {

+ 249 - 226
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -729,8 +729,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
729 729
         public ActionResult AddWorkOrder(
730 730
             string callid,string source,string file, string custel
731 731
             , string customer,string country, string address, string inqtime, string inquser
732
-           , string detail, string cont, string answer, string remark, string wjid
733
-            ,int khid=0, int infotypeid=0, int unitid=0,int clbm = 0, int clid = 0)
732
+           , string detail, string cont, string answer, string remark, string wjid,
733
+            string infotype, string unit,string clbm,string clr, int khid=0)
734
+            //,int infotypeid=0, int unitid=0,int clbm = 0, int clid = 0
734 735
         {
735 736
             ActionResult res = NoToken("未知错误,请重新登录");
736 737
             if (Request.IsAuthenticated)
@@ -770,27 +771,30 @@ namespace CallCenterApi.Interface.Controllers.workorder
770 771
                         if (!string.IsNullOrWhiteSpace(wjid))
771 772
                             model.WjID = int.Parse(wjid);
772 773
                         #endregion
773
-                        #region 信息分类和交办单位
774
-                        model.InfoTypeID = infotypeid;
775
-                        if (infotypeid != 0)
776
-                        {
777
-                            Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(infotypeid);
778
-                            if (dicVModel != null)
779
-                            {
780
-                                model.InfoType = dicVModel.F_Name;
781
-                            }
782
-                        }
783
-                        model.UnitID = unitid;
784
-                        if (unitid != 0)
785
-                        {
786
-                            Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(unitid);
787
-                            if (dicVModel != null)
788
-                            {
789
-                                model.Unit = dicVModel.F_Name;
790
-                            }
791
-                        }
774
+                        #region 信息分类和交办单位 
775
+                        model.InfoType = infotype;
776
+                        model.Unit = unit;
777
+                        //20180514 zhengbingbing 不传ID调整为只有文字
778
+                        //model.InfoTypeID = infotypeid;
779
+                        //if (infotypeid != 0)
780
+                        //{
781
+                        //    Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(infotypeid);
782
+                        //    if (dicVModel != null)
783
+                        //    {
784
+                        //        model.InfoType = dicVModel.F_Name;
785
+                        //    }
786
+                        //}
787
+                        //model.UnitID = unitid;
788
+                        //if (unitid != 0)
789
+                        //{
790
+                        //    Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(unitid);
791
+                        //    if (dicVModel != null)
792
+                        //    {
793
+                        //        model.Unit = dicVModel.F_Name;
794
+                        //    }
795
+                        //}
792 796
                         #endregion
793
-                        
797
+
794 798
                         model.Files = file;
795 799
                         if (source.Trim() == "1")
796 800
                             model.Source = "手工制单";
@@ -810,64 +814,66 @@ namespace CallCenterApi.Interface.Controllers.workorder
810 814
                         model.CreateUser = ua.F_UserCode;
811 815
                         model.CreateTime = DateTime.Now;
812 816
                         #endregion
813
-                        
814
-                        #region 工单明细
815
-                        if (clbm != 0 || clid != 0)
816
-                        {
817
-                            Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
818
-                            item.WorkOrderID = model.WorkOrderID;
819
-                            item.ToDept = clbm;
820
-
821
-
822
-                            if (clid != 0)
823
-                            {
824
-                                Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
825
-                                if (clus != null)
826
-                                {
827
-                                    item.ToUser = clus.F_UserCode;
828
-                                }
829
-                            }
830
-                            else
831
-                            {
832
-                                string users = string.Empty;
833
-                                var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
834
-                                foreach (var l in list)
835
-                                {
836
-                                    if (string.IsNullOrEmpty(users))
837
-                                    {
838
-                                        users = l.F_UserCode;
839
-                                    }
840
-                                    else
841
-                                    {
842
-                                        users = users + "," + l.F_UserCode;
843
-                                    }
844
-                                }
845
-                                item.ToUser = users;
846
-                            }
847
-                            
848
-                            if (item.ToUser != "")
849
-                            {
850
-                                item.SureUser = ua.F_UserCode;
851
-                                item.State = 1;
852
-                                item.SureTime = DateTime.Now;
853
-                                item.IsStart = 1;
854
-                            }
855
-                            else
856
-                            {
857
-                                item.State = 0;
858
-                                item.IsStart = 0;
859
-                            }
860
-                            item.Detail = model.Detail;
861
-                            item.IsLast = 0;
862
-                            item.IsTimeOut = 0;
863
-                            item.CreateUser = ua.F_UserCode;
864
-                            item.CreateTime = DateTime.Now;
865 817
 
866
-                            if (new BLL.T_Wo_WorkOrderItem().Add(item) > 0)
867
-                            {
868
-                                model.State = 1;//已指派
869
-                            }
870
-                        }
818
+                        //20180514 郑兵兵 无需走流程,所有注释
819
+                        #region 工单明细 
820
+
821
+                        //if (clbm != 0 || clid != 0)
822
+                        //{
823
+                        //    Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
824
+                        //    item.WorkOrderID = model.WorkOrderID;
825
+                        //    item.ToDept = clbm;
826
+
827
+
828
+                        //    if (clid != 0)
829
+                        //    {
830
+                        //        Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
831
+                        //        if (clus != null)
832
+                        //        {
833
+                        //            item.ToUser = clus.F_UserCode;
834
+                        //        }
835
+                        //    }
836
+                        //    else
837
+                        //    {
838
+                        //        string users = string.Empty;
839
+                        //        var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
840
+                        //        foreach (var l in list)
841
+                        //        {
842
+                        //            if (string.IsNullOrEmpty(users))
843
+                        //            {
844
+                        //                users = l.F_UserCode;
845
+                        //            }
846
+                        //            else
847
+                        //            {
848
+                        //                users = users + "," + l.F_UserCode;
849
+                        //            }
850
+                        //        }
851
+                        //        item.ToUser = users;
852
+                        //    }
853
+
854
+                        //    if (item.ToUser != "")
855
+                        //    {
856
+                        //        item.SureUser = ua.F_UserCode;
857
+                        //        item.State = 1;
858
+                        //        item.SureTime = DateTime.Now;
859
+                        //        item.IsStart = 1;
860
+                        //    }
861
+                        //    else
862
+                        //    {
863
+                        //        item.State = 0;
864
+                        //        item.IsStart = 0;
865
+                        //    }
866
+                        //    item.Detail = model.Detail;
867
+                        //    item.IsLast = 0;
868
+                        //    item.IsTimeOut = 0;
869
+                        //    item.CreateUser = ua.F_UserCode;
870
+                        //    item.CreateTime = DateTime.Now;
871
+
872
+                        //    if (new BLL.T_Wo_WorkOrderItem().Add(item) > 0)
873
+                        //    {
874
+                        //        model.State = 1;//已指派
875
+                        //    }
876
+                        //}
871 877
                         #endregion
872 878
 
873 879
                         #region 插入操作记录
@@ -913,72 +919,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
913 919
             return res;
914 920
         }
915 921
 
916
-        //微信添加工单
917
-        public string AddWorkOrders( string customer, string custel, string country, string address, string detail, string file)
918
-        {
919
-            string workorderid = string.Empty;
920
-            Model.T_Wo_WorkOrder model = new Model.T_Wo_WorkOrder();
921
-            model.WorkOrderID = DateTime.Now.ToString("yyyyMMddHHmmss");//工单编号
922
-            model.Customer = customer;
923
-            model.CustomerTel = custel;
924
-            model.County = country;
925
-            model.Address = address;
926
-            model.Detail = detail;
927
-            model.Files = file;
928
-            
929
-            #region 无需参数字段
930
-            model.Type = 3;//默认为投诉工单
931
-            model.Source = "微信";
932
-            model.State = 0;
933
-            model.CallID = "";
934
-            model.WjID = 0;
935
-            model.IsDel = 0;
936
-            model.IsReturn = 0;
937
-            model.IsReturnBak = 0;
938
-            model.IsTimeOut = 0;
939
-            model.IsUserSend = 0;
940
-            model.IsAdminSend = 0;
941
-            model.IsAudit = 0;//是否审核有效:0未审核,1无效,2有效
942
-                              //model.CreateUser = ua.F_UserCode;
943
-            model.CreateTime = DateTime.Now;
944
-            #endregion
945
-            
946
-            #region 工单明细
947
-            Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
948
-            item.WorkOrderID = model.WorkOrderID;
949
-            
950
-            item.Detail = model.Detail;
951
-            item.IsLast = 0;
952
-            item.State = 0;
953
-            item.IsStart = 0;
954
-            item.IsTimeOut = 0;
955
-            item.CreateTime = DateTime.Now;
956
-
957
-            new BLL.T_Wo_WorkOrderItem().Add(item);
958
-            #endregion
959
-
960
-            #region 插入操作记录
961
-            Model.T_Wo_Operation oper = new Model.T_Wo_Operation();
962
-            oper.F_WorkOrderId = model.WorkOrderID;
963
-            oper.F_State = model.State;
964
-            oper.F_CallRecordId = model.CallID != "" ? int.Parse(model.CallID) : 0;
965
-            oper.F_File = model.Files;
966
-
967
-            string userinfo = "由 " + model.Source;
968
-            if (model.State == 0)
969
-            {
970
-                oper.F_Message = userinfo + " 登记了工单,工单编号:" + model.WorkOrderID;
971
-            }
972
-
973
-            oper.F_CreateTime = DateTime.Now;
974
-            oper.F_IsDelete = 0;
975
-
976
-            new BLL.T_Wo_Operation().Add(oper);
977
-            #endregion
978
-            workorderid = new BLL.T_Wo_WorkOrder().Add(model).ToString();
979
-
980
-            return workorderid;
981
-        }
922
+        //客户需求,所有项目为非必填项
923
+        //信息分类、交办单位、处理部门、处理人为文本输入
924
+        //调查人员自动填充当前登录人工号
925
+        //可以修改工单
982 926
 
983 927
         /// <summary>
984 928
         /// 处理工单信息
@@ -986,7 +930,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
986 930
         /// <returns></returns>
987 931
         public ActionResult DealWorkOrder(string orderid, int isend
988 932
            , string customer, string inqtime, string inquser, string country, string address
989
-           , string detail, string cont, string answer, string remark, int infotypeid, int unitid,int clbm,int clid)
933
+           , string detail, string cont, string answer, string remark,
934
+            string infotype, string unit, string clbm, string clgh)
935
+            //int infotypeid, int unitid,int clbm,int clid)
990 936
         {
991 937
             ActionResult res = NoToken("未知错误,请重新登录");
992 938
             if (Request.IsAuthenticated)
@@ -1000,62 +946,64 @@ namespace CallCenterApi.Interface.Controllers.workorder
1000 946
                     {
1001 947
                         res = Error("处理失败!");
1002 948
 
1003
-
1004 949
                         Model.T_Wo_WorkOrder model = new BLL.T_Wo_WorkOrder().GetModelList(" WorkOrderID='" + orderid + "'").FirstOrDefault();
1005 950
                         if (model != null)
1006 951
                         {
1007 952
 
1008
-                            #region 获取处理人工号
1009
-                            string clgh = string.Empty;
1010
-                            if (clbm != 0)
1011
-                            {
1012
-                                if (clid != 0)
1013
-                                {
1014
-                                    Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
1015
-                                    if (clus != null)
1016
-                                    {
1017
-                                        clgh = clus.F_UserCode;
1018
-                                    }
1019
-                                }
1020
-                                else
1021
-                                {
1022
-                                    string users = string.Empty;
1023
-                                    var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
1024
-                                    foreach (var l in list)
1025
-                                    {
1026
-                                        if (string.IsNullOrEmpty(users))
1027
-                                        {
1028
-                                            users = l.F_UserCode;
1029
-                                        }
1030
-                                        else
1031
-                                        {
1032
-                                            users = users + "," + l.F_UserCode;
1033
-                                        }
1034
-                                    }
1035
-                                    clgh = users;
1036
-                                }
1037
-                            }
953
+                            #region 获取处理人工号 20180514 郑兵兵 无需走流程,所以注释
954
+                            //string clgh = string.Empty;
955
+                            //if (clbm != 0)
956
+                            //{
957
+                            //    if (clid != 0)
958
+                            //    {
959
+                            //        Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
960
+                            //        if (clus != null)
961
+                            //        {
962
+                            //            clgh = clus.F_UserCode;
963
+                            //        }
964
+                            //    }
965
+                            //    else
966
+                            //    {
967
+                            //        string users = string.Empty;
968
+                            //        var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
969
+                            //        foreach (var l in list)
970
+                            //        {
971
+                            //            if (string.IsNullOrEmpty(users))
972
+                            //            {
973
+                            //                users = l.F_UserCode;
974
+                            //            }
975
+                            //            else
976
+                            //            {
977
+                            //                users = users + "," + l.F_UserCode;
978
+                            //            }
979
+                            //        }
980
+                            //        clgh = users;
981
+                            //    }
982
+                            //}
1038 983
                             #endregion
1039 984
 
1040 985
                             #region 信息分类和交办单位
1041
-                            model.InfoTypeID = infotypeid;
1042
-                            if (infotypeid != 0)
1043
-                            {
1044
-                                Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(infotypeid);
1045
-                                if (dicVModel != null)
1046
-                                {
1047
-                                    model.InfoType = dicVModel.F_Name;
1048
-                                }
1049
-                            }
1050
-                            model.UnitID = unitid;
1051
-                            if (unitid != 0)
1052
-                            {
1053
-                                Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(unitid);
1054
-                                if (dicVModel != null)
1055
-                                {
1056
-                                    model.Unit = dicVModel.F_Name;
1057
-                                }
1058
-                            }
986
+                            model.InfoType = infotype;
987
+                            model.Unit = unit;
988
+                            //20180514 zhengbingbing 不传ID调整为只有文字
989
+                            //model.InfoTypeID = infotypeid;
990
+                            //if (infotypeid != 0)
991
+                            //{
992
+                            //    Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(infotypeid);
993
+                            //    if (dicVModel != null)
994
+                            //    {
995
+                            //        model.InfoType = dicVModel.F_Name;
996
+                            //    }
997
+                            //}
998
+                            //model.UnitID = unitid;
999
+                            //if (unitid != 0)
1000
+                            //{
1001
+                            //    Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(unitid);
1002
+                            //    if (dicVModel != null)
1003
+                            //    {
1004
+                            //        model.Unit = dicVModel.F_Name;
1005
+                            //    }
1006
+                            //}
1059 1007
                             #endregion
1060 1008
                             string inqtimes = "";
1061 1009
                             #region 息县工单
@@ -1083,11 +1031,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
1083 1031
 
1084 1032
                             #endregion
1085 1033
 
1086
-                            int n = new BLL.T_Wo_WorkOrder().DealWorkOrder1(orderid, isend
1087
-                                , model.Customer, model.CustomerTel, inqtimes, model.Inquser
1088
-                                , model.County, model.Address, model.Detail, model.Clcontent, model.Answer, model.Remark
1089
-                                , clbm, clgh, ua.F_UserCode, model.InfoType, model.InfoTypeID.Value, model.UnitID.Value, model.Unit);
1090
-                            if (n > 0)
1034
+                            var rerere = new BLL.T_Wo_WorkOrder().Update(model);
1035
+                            #region 无需走流程
1036
+                            //int n = new BLL.T_Wo_WorkOrder().DealWorkOrder1(orderid, isend
1037
+                            //    , model.Customer, model.CustomerTel, inqtimes, model.Inquser
1038
+                            //    , model.County, model.Address, model.Detail, model.Clcontent, model.Answer, model.Remark
1039
+                            //    , clbm, clgh, ua.F_UserCode, model.InfoType, model.InfoTypeID.Value, model.UnitID.Value, model.Unit);
1040
+                            //if (n > 0)
1041
+                            #endregion
1042
+
1043
+                            if (rerere)
1091 1044
                             {
1092 1045
                                 #region 消息通知
1093 1046
                                 Model.T_Wo_WorkOrderItem item = new BLL.T_Wo_WorkOrderItem().GetModelList(" WorkOrderID='" + orderid + "' and Type=1 ").OrderByDescending(p => p.CreateTime).FirstOrDefault();
@@ -1125,8 +1078,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1125 1078
 
1126 1079
                                 new BLL.T_Wo_Operation().Add(oper);
1127 1080
                                 #endregion
1128
-
1129
-
1081
+                                
1130 1082
                                 res = Success("处理成功");
1131 1083
                             }
1132 1084
 
@@ -1138,10 +1090,79 @@ namespace CallCenterApi.Interface.Controllers.workorder
1138 1090
             return res;
1139 1091
         }
1140 1092
 
1093
+        #region 微信工单
1094
+        //微信添加工单
1095
+        public string AddWorkOrders(string customer, string custel, string country, string address, string detail, string file)
1096
+        {
1097
+            string workorderid = string.Empty;
1098
+            Model.T_Wo_WorkOrder model = new Model.T_Wo_WorkOrder();
1099
+            model.WorkOrderID = DateTime.Now.ToString("yyyyMMddHHmmss");//工单编号
1100
+            model.Customer = customer;
1101
+            model.CustomerTel = custel;
1102
+            model.County = country;
1103
+            model.Address = address;
1104
+            model.Detail = detail;
1105
+            model.Files = file;
1106
+
1107
+            #region 无需参数字段
1108
+            model.Type = 3;//默认为投诉工单
1109
+            model.Source = "微信";
1110
+            model.State = 0;
1111
+            model.CallID = "";
1112
+            model.WjID = 0;
1113
+            model.IsDel = 0;
1114
+            model.IsReturn = 0;
1115
+            model.IsReturnBak = 0;
1116
+            model.IsTimeOut = 0;
1117
+            model.IsUserSend = 0;
1118
+            model.IsAdminSend = 0;
1119
+            model.IsAudit = 0;//是否审核有效:0未审核,1无效,2有效
1120
+                              //model.CreateUser = ua.F_UserCode;
1121
+            model.CreateTime = DateTime.Now;
1122
+            #endregion
1123
+
1124
+            #region 工单明细
1125
+            Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
1126
+            item.WorkOrderID = model.WorkOrderID;
1127
+
1128
+            item.Detail = model.Detail;
1129
+            item.IsLast = 0;
1130
+            item.State = 0;
1131
+            item.IsStart = 0;
1132
+            item.IsTimeOut = 0;
1133
+            item.CreateTime = DateTime.Now;
1134
+
1135
+            new BLL.T_Wo_WorkOrderItem().Add(item);
1136
+            #endregion
1137
+
1138
+            #region 插入操作记录
1139
+            Model.T_Wo_Operation oper = new Model.T_Wo_Operation();
1140
+            oper.F_WorkOrderId = model.WorkOrderID;
1141
+            oper.F_State = model.State;
1142
+            oper.F_CallRecordId = model.CallID != "" ? int.Parse(model.CallID) : 0;
1143
+            oper.F_File = model.Files;
1144
+
1145
+            string userinfo = "由 " + model.Source;
1146
+            if (model.State == 0)
1147
+            {
1148
+                oper.F_Message = userinfo + " 登记了工单,工单编号:" + model.WorkOrderID;
1149
+            }
1150
+
1151
+            oper.F_CreateTime = DateTime.Now;
1152
+            oper.F_IsDelete = 0;
1153
+
1154
+            new BLL.T_Wo_Operation().Add(oper);
1155
+            #endregion
1156
+            workorderid = new BLL.T_Wo_WorkOrder().Add(model).ToString();
1157
+
1158
+            return workorderid;
1159
+        }
1160
+
1141 1161
         //微信处理工单
1142
-        public bool DealWorkOrders
1143
-            (string orderid, string customer, string inqtime, string inquser, string country, string address
1144
-           , string detail, string cont, string answer, string remark, int infotypeid, int unitid, string openid)
1162
+        public bool DealWorkOrders(string orderid, string customer, string inqtime, 
1163
+            string inquser, string country, string address, string detail, string cont, 
1164
+            string answer, string remark,string infotype, string unit, string openid)
1165
+            //int infotypeid, int unitid, string openid)
1145 1166
         {
1146 1167
             bool res = false;
1147 1168
             Model.T_Wo_WorkOrder model = new BLL.T_Wo_WorkOrder().GetModelList(" id=" + orderid + "").FirstOrDefault();
@@ -1154,26 +1175,28 @@ namespace CallCenterApi.Interface.Controllers.workorder
1154 1175
                     {
1155 1176
                         string inqtimes = "";
1156 1177
                         #region 信息分类/交办单位
1157
-
1158
-                        model.InfoTypeID = infotypeid;//信息分类
1159
-                        if (infotypeid != 0)
1160
-                        {
1161
-                            Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(infotypeid);
1162
-                            if (dicVModel != null)
1163
-                            {
1164
-                                model.InfoType = dicVModel.F_Name;
1165
-                            }
1166
-                        }
1167
-                        model.ISReward = 0;
1168
-                        model.UnitID = unitid;//交办单位
1169
-                        if (unitid != 0)
1170
-                        {
1171
-                            Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(unitid);
1172
-                            if (dicVModel != null)
1173
-                            {
1174
-                                model.Unit = dicVModel.F_Name;
1175
-                            }
1176
-                        }
1178
+                        model.InfoType = infotype;
1179
+                        model.Unit = unit;
1180
+                        //20180514 zhengbingbing 不传ID调整为只有文字
1181
+                        //model.InfoTypeID = infotypeid;//信息分类
1182
+                        //if (infotypeid != 0)
1183
+                        //{
1184
+                        //    Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(infotypeid);
1185
+                        //    if (dicVModel != null)
1186
+                        //    {
1187
+                        //        model.InfoType = dicVModel.F_Name;
1188
+                        //    }
1189
+                        //}
1190
+                        //model.ISReward = 0;
1191
+                        //model.UnitID = unitid;//交办单位
1192
+                        //if (unitid != 0)
1193
+                        //{
1194
+                        //    Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(unitid);
1195
+                        //    if (dicVModel != null)
1196
+                        //    {
1197
+                        //        model.Unit = dicVModel.F_Name;
1198
+                        //    }
1199
+                        //}
1177 1200
                         #endregion
1178 1201
                         #region 息县工单
1179 1202
                         if (!string.IsNullOrWhiteSpace(customer))
@@ -1238,7 +1261,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1238 1261
             }
1239 1262
             return res;
1240 1263
         }
1241
-
1264
+        #endregion
1242 1265
         #endregion
1243 1266
 
1244 1267
         #region 处理工单 调整前

BIN
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/certificate/cert/apiclient_cert.p12


+ 0 - 26
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/certificate/cert/apiclient_cert.pem

@@ -1,26 +0,0 @@
1
------BEGIN CERTIFICATE-----
2
-MIIEaTCCA9KgAwIBAgIEAYRheTANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMC
3
-Q04xEjAQBgNVBAgTCUd1YW5nZG9uZzERMA8GA1UEBxMIU2hlbnpoZW4xEDAOBgNV
4
-BAoTB1RlbmNlbnQxDDAKBgNVBAsTA1dYRzETMBEGA1UEAxMKTW1wYXltY2hDQTEf
5
-MB0GCSqGSIb3DQEJARYQbW1wYXltY2hAdGVuY2VudDAeFw0xNzEyMDYwOTA1NTJa
6
-Fw0yNzEyMDQwOTA1NTJaMIGYMQswCQYDVQQGEwJDTjESMBAGA1UECBMJR3Vhbmdk
7
-b25nMREwDwYDVQQHEwhTaGVuemhlbjEQMA4GA1UEChMHVGVuY2VudDEOMAwGA1UE
8
-CxMFTU1QYXkxLTArBgNVBAMUJOays+WNl+WNjuiwiue9kee7nOenkeaKgOaciemZ
9
-kOWFrOWPuDERMA8GA1UEBBMINzYwNzE1NzEwggEiMA0GCSqGSIb3DQEBAQUAA4IB
10
-DwAwggEKAoIBAQDjKfkmmq0ldJ41mRS4BNdrXHwbWW7y6a9gMevo5dXjHsIvNAlg
11
-92Db0uhYs0Pg1rDdIxr/Ik1pFRywqMIKzZtneSjA1zutwf2vM5ucKaoQktbXGucG
12
-yQxFminJkzGABoRPUrnMnGDB+Krj+TTwpGEH59Th6IhPwOhB50ajizuO5HKmbjp0
13
-mavj+ziSPdBYzQIj0EXNTNHlQcGXNOAjqJC6z8+EvUl5dI4b/6VxDBkXVIkh9lsu
14
-PYFP9FLHSGDDNXjFBS3HukeyulrSWwVAw0/Ye7JKsZR+8S2bJLb7NdmZYGgw25TV
15
-Vvq8dCImNqsy4/XtsT5KZxMh1942Q8GAQEZ1AgMBAAGjggFGMIIBQjAJBgNVHRME
16
-AjAAMCwGCWCGSAGG+EIBDQQfFh0iQ0VTLUNBIEdlbmVyYXRlIENlcnRpZmljYXRl
17
-IjAdBgNVHQ4EFgQUB7JjKPmrs7nyZ7hTHc3MPVvC/rowgb8GA1UdIwSBtzCBtIAU
18
-PgUm9iJitBVbiM1kfrDUYqflhnShgZCkgY0wgYoxCzAJBgNVBAYTAkNOMRIwEAYD
19
-VQQIEwlHdWFuZ2RvbmcxETAPBgNVBAcTCFNoZW56aGVuMRAwDgYDVQQKEwdUZW5j
20
-ZW50MQwwCgYDVQQLEwNXWEcxEzARBgNVBAMTCk1tcGF5bWNoQ0ExHzAdBgkqhkiG
21
-9w0BCQEWEG1tcGF5bWNoQHRlbmNlbnSCCQC7VJcrvADoVzAOBgNVHQ8BAf8EBAMC
22
-BsAwFgYDVR0lAQH/BAwwCgYIKwYBBQUHAwIwDQYJKoZIhvcNAQEFBQADgYEAwc2z
23
-edrC7aq1nGj7Ll6b0vCkDEwexlcbwfc5VtG+P/UsXF5QsGcI9QAxESAJMcmdrDC5
24
-iOP7N7qlHoIMIJ0/1MhKt1+bNHhyoJ7QDj9WW4SJzPMXj+Axwi53OCMZbOLCFmTm
25
-Xwroa7zd6enhgGjK0FCj5xRvCwn7tFM59TUJXkQ=
26
------END CERTIFICATE-----

+ 0 - 28
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/certificate/cert/apiclient_key.pem

@@ -1,28 +0,0 @@
1
------BEGIN PRIVATE KEY-----
2
-MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDjKfkmmq0ldJ41
3
-mRS4BNdrXHwbWW7y6a9gMevo5dXjHsIvNAlg92Db0uhYs0Pg1rDdIxr/Ik1pFRyw
4
-qMIKzZtneSjA1zutwf2vM5ucKaoQktbXGucGyQxFminJkzGABoRPUrnMnGDB+Krj
5
-+TTwpGEH59Th6IhPwOhB50ajizuO5HKmbjp0mavj+ziSPdBYzQIj0EXNTNHlQcGX
6
-NOAjqJC6z8+EvUl5dI4b/6VxDBkXVIkh9lsuPYFP9FLHSGDDNXjFBS3HukeyulrS
7
-WwVAw0/Ye7JKsZR+8S2bJLb7NdmZYGgw25TVVvq8dCImNqsy4/XtsT5KZxMh1942
8
-Q8GAQEZ1AgMBAAECggEAZ/1B6hMqqhfNiPmvy2Gj/6jRw29YY+jn+KBBv1bfZ94f
9
-xJ4MoQ/9jgPpixldPGLrif/VDvB0AWPBw3ktguaGeoKzTjv5PNyuNfLpDD7idD3U
10
-DZpqIegNLxuYf4dbRKE3FlznYyw++uzLxhrByltlc8oD4Pqi0+eaKvkllB5bwFgk
11
-sLYieRAVWlc7dDZ9KRVul3vBqMWIvPKEJDsQrHxf5mTZODwX39A0YtITZnqwAesG
12
-oNHFVj4uzfcjizFKUftfQozQepPwJevyuTQO6RF1IgzsziNixY4mtcGl2uDQXrjJ
13
-eklkzdfccGP19g60upWqI1DNaivtYClaIALYQMuxgQKBgQD+G6n2MnY0zf6Zmv4P
14
-EdxsKuLhcmj3C2sDsGkU/ZexnNhKPvH7UbQkDgl5nOp0XITovywbcRn90FC6MdXV
15
-KjwGdoGKV0Va0wTNcGkEI71P8G2Jq5TFj8hwXDREcJQQOV4VFfQhnVF3PcHC57ML
16
-lE3dKJatssvJuT98QSIqkP4O4QKBgQDk2vQGR/hrwkf4M11ndj3w0OD1SMxgSWF0
17
-TDFJVKoa0PVQV2dZJYp3dbGmIMqlF2uA6tZqcCYs8lUNsnG0ZnhL9+czqVn/UKJ+
18
-ErE2QZE9fmGsQHZa3BJE+1q9B9K65f5hctI6RGoU7heheBKJblqqm8L74OKvx1/H
19
-zg8CyXDOFQKBgEoZeRORHYVCeLcESofMdpGYY/bILTG1Q6ycudfkJ2Mk0LG970SR
20
-S82jxkGPb5MlE6Dndo4+Cg1IvPG+7JMvsLdVwWq9Dj1xAZqC6CzL2z2/Z8HYphaC
21
-WjnhuWAn0BV3FSdi8oEG5iW2fZU/iaebxKT0XBQk6mZVvdyXBcaR53QhAoGAdgI5
22
-huuhu99IwUGrTmh4dC8hcRoC2Tu9lvybBZc0x/MsLCuFzUBAcG0uF94c4Jh9BNMT
23
-kXsXFGI5XYDAhSe5rGK+w7L2B2OLBruYycNxo2YB85Kh9SQ5/3wlRAg+r8VdMN7G
24
-bOlOUlCbutVxqZBQDF2ZY8yI199VEnC86ND67CkCgYEAlwbD/R7QO45BLuy3vJNG
25
-RZgpluDa4f86UcTJ3m57NNUVKj0e4Xrx7cOmFnBMDrPOpSTpuAMCIp4wpZptKSAH
26
-2n7qj7y5ewnFCzs19DUc6mxlHgNx0BMCsdiyXXk8xQSq1lh+TtgiLJtCGq/iylFu
27
-rHcAkauv8B0BrjjNwe/6C5o=
28
------END PRIVATE KEY-----

+ 0 - 19
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/certificate/cert/rootca.pem

@@ -1,19 +0,0 @@
1
------BEGIN CERTIFICATE-----
2
-MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
3
-UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
4
-dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
5
-MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
6
-dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
7
-AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
8
-BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
9
-cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
10
-AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
11
-MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
12
-aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
13
-ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
14
-IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
15
-MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
16
-A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
17
-7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
18
-1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
19
------END CERTIFICATE-----

+ 0 - 20
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/certificate/cert/证书使用说明.txt

@@ -1,20 +0,0 @@
1
-欢迎使用微信支付!
2
-微信支付API共四份(证书pkcs12格式、证书pem格式、证书密钥pem格式、CA证书),为接口中强制要求时需携带的证书文件。
3
-证书属于敏感信息,请妥善保管不要泄露和被他人复制。
4
-不同开发语言下的证书格式不同,以下为说明指引:
5
-	证书pkcs12格式(apiclient_cert.p12)
6
-		包含了私钥信息的证书文件,为p12(pfx)格式,由微信支付签发给您用来标识和界定您的身份
7
-		部分安全性要求较高的API需要使用该证书来确认您的调用身份
8
-		windows上可以直接双击导入系统,导入过程中会提示输入证书密码,证书密码默认为您的商户ID(如:10010000)
9
-	证书pem格式(apiclient_cert.pem)
10
-		从apiclient_cert.p12中导出证书部分的文件,为pem格式,请妥善保管不要泄漏和被他人复制
11
-		部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供
12
-		您也可以使用openssl命令来自己导出:openssl pkcs12 -clcerts -nokeys -in apiclient_cert.p12 -out apiclient_cert.pem
13
-	证书密钥pem格式(apiclient_key.pem)
14
-		从apiclient_cert.p12中导出密钥部分的文件,为pem格式
15
-		部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供
16
-		您也可以使用openssl命令来自己导出:openssl pkcs12 -nocerts -in apiclient_cert.p12 -out apiclient_key.pem
17
-	CA证书(rootca.pem)
18
-		微信支付api服务器上也部署了证明微信支付身份的服务器证书,您在使用api进行调用时也需要验证所调用服务器及域名的真实性
19
-		该文件为签署微信支付证书的权威机构的根证书,可以用来验证微信支付服务器证书的真实性
20
-		某些环境和工具已经内置了若干权威机构的根证书,无需引用该证书也可以正常进行验证,这里提供给您在未内置所必须根证书的环境中载入使用