|
|
@@ -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 处理工单 调整前
|