duhongyu 3 年之前
父節點
當前提交
8154fde3d5

+ 1 - 1
CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs

@@ -963,7 +963,7 @@ namespace CallCenterApi.DAL
963 963
                 {
964 964
                     model.F_Note = row["F_Note"].ToString();
965 965
                 }
966
-                if (row["F_SpotCheck"] != null)
966
+                if (row["F_SpotCheck"] != null && row["F_SpotCheck"].ToString() != "")
967 967
                 {
968 968
                     model.F_SpotCheck = int.Parse(row["F_SpotCheck"].ToString());
969 969
                 }

+ 13 - 288
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -22,7 +22,7 @@ using System.Web.Mvc;
22 22
 
23 23
 namespace CallCenterApi.Interface.Controllers.workorder
24 24
 {
25
-    [Authority]
25
+   [Authority]
26 26
     public class WorkOrderController : BaseController
27 27
     {
28 28
 
@@ -992,7 +992,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
992 992
             return Content(obj.ToJson());
993 993
         }
994 994
 
995
-
995
+      
996 996
 
997 997
         /// <summary>
998 998
         /// 获取回收站工单列表
@@ -9216,7 +9216,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
9216 9216
 
9217 9217
         #endregion
9218 9218
 
9219
-        #region 新增工单
9219
+       
9220 9220
         /// <summary>
9221 9221
         /// 上传附件
9222 9222
         /// </summary>
@@ -9766,7 +9766,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
9766 9766
             }
9767 9767
         }
9768 9768
 
9769
-
9769
+       
9770 9770
 
9771 9771
 
9772 9772
         /// <summary>
@@ -9855,7 +9855,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
9855 9855
 
9856 9856
             return workorderid;
9857 9857
         }
9858
-
9858
+       
9859 9859
         /// <summary>
9860 9860
         /// 添加工单信息留言
9861 9861
         /// </summary>
@@ -10112,10 +10112,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
10112 10112
 
10113 10113
 
10114 10114
         }
10115
-        #endregion
10116
-
10117
-        #region 操作工单
10115
+      
10118 10116
 
10117
+     
10119 10118
         /// <summary>
10120 10119
         /// 修改工单信息
10121 10120
         /// </summary>
@@ -10561,7 +10560,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
10561 10560
                 return Success("权限不足");
10562 10561
             }
10563 10562
         }
10564
-
10563
+      
10565 10564
         /// <summary>
10566 10565
         /// 修改工单信息
10567 10566
         /// </summary>
@@ -14848,7 +14847,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
14848 14847
                     oper.F_CreateTime = DateTime.Now;
14849 14848
                     oper.F_IsDelete = 0;
14850 14849
                     operBLL.Add(oper);
14851
-                    #endregion
14850
+                 
14852 14851
                     if (workorderBLL.UpdateWorkOrder(modelT_Bus_WorkOrder.F_Id, keyValuePairs))
14853 14852
                         return Success("抽查成功");
14854 14853
                     else
@@ -15474,6 +15473,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
15474 15473
             }
15475 15474
             return returns;
15476 15475
         }
15476
+       
15477 15477
         /// <summary>
15478 15478
         /// 对接网格化,记录办理过程
15479 15479
         /// </summary>
@@ -17937,6 +17937,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
17937 17937
                 oper.F_IsDelete = 0;
17938 17938
 
17939 17939
                 operBLL.Add(oper);
17940
+                #endregion  插入操作记录
17940 17941
             }
17941 17942
 
17942 17943
 
@@ -17946,283 +17947,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
17946 17947
 
17947 17948
 
17948 17949
 
17949
-        #region 20200311 zhengbingbing 增加履职界定操作
17950
-        ///// <summary>
17951
-        ///// 履职
17952
-        ///// </summary>
17953
-        ///// <returns></returns>
17954
-        ////[Authority]
17955
-        //public ActionResult PerformWorkOrder()
17956
-        //{
17957
-
17958
-        //    if (User.F_RoleCode == "WLDW" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG")
17959
-        //    {//承办单位和管理员
17960
-        //        string workorderid = RequestString.GetFormString("workorderid");
17961
-        //        int state = RequestString.GetInt("state", 0);//0保存 1保存并下一步
17962
-        //        int perid = RequestString.GetInt("perid", 0);
17963
-        //        string file = RequestString.GetFormString("file");
17964
-        //        string result = RequestString.GetFormString("result");
17965
-        //        string guid = RequestString.GetFormString("guid");
17966
-
17967
-        //        string visitids = RequestString.GetFormString("visitids");
17968
-        //        if (string.IsNullOrWhiteSpace(visitids))
17969
-        //            return Error("请选择你要履职的回访记录");
17970
-
17971
-        //        Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
17972
-        //        List<Model.T_Bus_VisitResult> listT_Bus_VisitResult = new BLL.T_Bus_VisitResult().GetModelList("F_Id in (" + visitids + ")");
17973
-        //        Model.T_Bus_PerformDuties modelT_Bus_PerformDuties = new Model.T_Bus_PerformDuties();
17974
-
17975
-        //        if (modelT_Bus_WorkOrder != null)
17976
-        //        {
17977
-        //            if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.visit || modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.resubmit || modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.reload || modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.rejload || modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.finish)
17978
-        //            {//已回访,重办待交办,重办中,重办驳回,已结案
17979
-        //                using (TransactionScope trans = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 10, 0)))
17980
-        //                {
17981
-        //                    var assids = ""; //读取对应的交办记录
17982
-        //                    #region 读取对应的交办id
17983
-        //                    foreach (var item in listT_Bus_VisitResult)
17984
-        //                    {
17985
-        //                        if (item.F_AssignedId != null && item.F_AssignedId != 0)
17986
-        //                            assids = item.F_AssignedId + ",";
17987
-        //                    }
17988
-        //                    assids = assids.Trim(',');
17989
-        //                    #endregion
17990
-        //                    #region 履职
17991
-        //                    if (perid == 0)
17992
-        //                    {
17993
-        //                        #region 新增履职记录
17994
-        //                        modelT_Bus_PerformDuties.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
17995
-        //                        modelT_Bus_PerformDuties.F_AssignedId = assids;
17996
-        //                        modelT_Bus_PerformDuties.F_VisitId = visitids;
17997
-        //                        modelT_Bus_PerformDuties.F_File = file;
17998
-        //                        modelT_Bus_PerformDuties.F_State = state;
17999
-        //                        modelT_Bus_PerformDuties.F_Result = result;
18000
-        //                        modelT_Bus_PerformDuties.F_IsAudit = 0;
18001
-        //                        modelT_Bus_PerformDuties.F_IsDelete = 0;
18002
-        //                        modelT_Bus_PerformDuties.F_CreateDeptId = User.F_DeptId;
18003
-        //                        modelT_Bus_PerformDuties.F_CreateTime = DateTime.Now;
18004
-        //                        modelT_Bus_PerformDuties.F_CreateUser = User.F_UserCode;
18005
-
18006
-        //                        int id = new BLL.T_Bus_PerformDuties().Add(modelT_Bus_PerformDuties);
18007
-        //                        modelT_Bus_PerformDuties.F_Id = id;
18008
-        //                        //保存回访记录
18009
-        //                        new BLL.T_Bus_PerformDutiesRecords().AddInfo(modelT_Bus_PerformDuties, User.F_UserCode, guid);
18010
-        //                        #endregion
18011
-        //                    }
18012
-        //                    else
18013
-        //                    {
18014
-        //                        #region 修改履职记录
18015
-        //                        modelT_Bus_PerformDuties = new BLL.T_Bus_PerformDuties().GetModel(perid);
18016
-        //                        if (modelT_Bus_PerformDuties != null)
18017
-        //                        {
18018
-        //                            modelT_Bus_PerformDuties.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
18019
-        //                            modelT_Bus_PerformDuties.F_AssignedId = assids;
18020
-        //                            modelT_Bus_PerformDuties.F_VisitId = visitids;
18021
-        //                            modelT_Bus_PerformDuties.F_File = file;
18022
-        //                            modelT_Bus_PerformDuties.F_State = state;
18023
-        //                            modelT_Bus_PerformDuties.F_Result = result;
18024
-        //                            modelT_Bus_PerformDuties.F_IsAudit = 0;
18025
-        //                            modelT_Bus_PerformDuties.F_IsDelete = 0;
18026
-        //                            modelT_Bus_PerformDuties.F_CreateDeptId = User.F_DeptId;
18027
-        //                            modelT_Bus_PerformDuties.F_CreateTime = DateTime.Now;
18028
-        //                            modelT_Bus_PerformDuties.F_CreateUser = User.F_UserCode;
18029
-        //                            int id = new BLL.T_Bus_PerformDuties().Add(modelT_Bus_PerformDuties);
18030
-        //                            modelT_Bus_PerformDuties.F_Id = id;
18031
-        //                            //保存回访记录
18032
-        //                            new BLL.T_Bus_PerformDutiesRecords().AddInfo(modelT_Bus_PerformDuties, User.F_UserCode, guid);
18033
-        //                        }
18034
-        //                        #endregion
18035
-        //                    }
18036
-
18037
-        //                    if (modelT_Bus_PerformDuties != null && modelT_Bus_PerformDuties.F_State == 1)
18038
-        //                    {
18039
-        //                        #region 保存交办信息
18040
-        //                        foreach (var item in assids.Split(','))
18041
-        //                        {
18042
-        //                            var model = assignBLL.GetModel(int.Parse(item));
18043
-        //                            if (model != null)
18044
-        //                            {
18045
-        //                                model.F_IsPerform = 1;
18046
-        //                                assignBLL.Update(model);
18047
-        //                            }
18048
-        //                        }
18049
-        //                        #endregion
18050
-        //                        #region
18051
-        //                        foreach (var item in listT_Bus_VisitResult)
18052
-        //                        {
18053
-        //                            item.F_IsPerform = 1;
18054
-        //                            new BLL.T_Bus_VisitResult().Update(item);
18055
-        //                        }
18056
-        //                        #endregion
18057
-
18058
-        //                        #region 删除草稿信息
18059
-        //                        var cglist = new BLL.T_Bus_PerformDuties().GetModelList(" F_IsDelete=0 and F_State=0 and F_WorkOrderId='" + modelT_Bus_WorkOrder.F_WorkOrderId + "' and F_CreateUser='" + User.F_UserCode + "' ");
18060
-
18061
-        //                        foreach (var cg in cglist)
18062
-        //                        {
18063
-        //                            cg.F_IsDelete = 1;
18064
-        //                            cg.F_DeleteUser = User.F_UserCode;
18065
-        //                            cg.F_DeleteTime = DateTime.Now;
18066
-
18067
-        //                            new BLL.T_Bus_PerformDuties().Update(cg);
18068
-        //                            new BLL.T_Bus_PerformDutiesRecords().AddInfo(cg, User.F_UserCode, guid);
18069
-        //                        }
18070
-        //                        #endregion
18071
-        //                        var opt = "履职界定";
18072
-        //                        #region 插入操作记录
18073
-        //                        Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
18074
-        //                        oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
18075
-        //                        oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
18076
-
18077
-        //                        string userinfo = User.depname + "(" + User.F_UserCode + ")";
18078
-        //                        oper.F_Message = userinfo + " 对工单提交 " + opt + " 操作";
18079
-        //                        oper.F_File = modelT_Bus_PerformDuties.F_File;
18080
-        //                        oper.F_CreateUser = User.F_UserCode;
18081
-        //                        oper.F_CreateTime = DateTime.Now;
18082
-        //                        oper.F_IsDelete = 0;
18083
-        //                        foreach (var item in assids.Split(','))
18084
-        //                        {
18085
-        //                            oper.F_AssignedId = int.Parse(item);
18086
-        //                            operBLL.Add(oper);
18087
-
18088
-        //                            //推送消息表 履职界定消息目前推送给工号8666 
18089
-        //                            msg.AddInternalMessagesInfo("工单消息", oper.F_Message + ",工单编号:" + oper.F_WorkOrderId, "8666", User.F_UserCode, (int)EnumSmsType.workorder);
18090
-        //                        }
18091
-        //                        #endregion
18092
-        //                    }
18093
-        //                    #endregion
18094
-        //                    trans.Complete();
18095
-        //                }
18096
-        //                return Success("操作成功", modelT_Bus_PerformDuties.F_Id);
18097
-        //            }
18098
-        //            else
18099
-        //            {
18100
-        //                return Error("此状态下不能进行履职操作");
18101
-        //            }
18102
-        //        }
18103
-        //        else
18104
-        //        {
18105
-        //            return Error("操作失败");
18106
-        //        }
18107
-
18108
-        //    }
18109
-        //    else
18110
-        //    {
18111
-        //        return Error("权限不足");
18112
-        //    }
18113
-        //}
18114
-        ///// <summary>
18115
-        ///// 履职界定审核
18116
-        ///// </summary>
18117
-        ///// <returns></returns>
18118
-        ////[Authority]
18119
-        //public ActionResult DefinitionWorkOrder()
18120
-        //{
18121
-        //    if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "YSZY" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD")
18122
-        //    {
18123
-        //        string workorderid = RequestString.GetFormString("workorderid");
18124
-        //        int state = RequestString.GetInt("state", 0);
18125
-        //        string reason = RequestString.GetFormString("reason");
18126
-        //        int perid = RequestString.GetInt("perid", 0);
18127
-        //        Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
18128
-        //        Model.T_Bus_PerformDuties modelT_Bus_PerformDuties = new BLL.T_Bus_PerformDuties().GetModel(perid);
18129
-        //        if (modelT_Bus_WorkOrder != null && modelT_Bus_PerformDuties != null)
18130
-        //        {
18131
-        //            if (modelT_Bus_PerformDuties.F_IsAudit.Value == 0)
18132
-        //            {
18133
-        //                using (TransactionScope trans = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 10, 0)))
18134
-        //                {
18135
-        //                    #region 保存履职界定信息
18136
-        //                    modelT_Bus_PerformDuties.F_IsAudit = state;
18137
-        //                    modelT_Bus_PerformDuties.F_AuditUser = User.F_UserCode;
18138
-        //                    modelT_Bus_PerformDuties.F_AuditTime = DateTime.Now;
18139
-        //                    modelT_Bus_PerformDuties.F_AuditReason = reason;
18140
-        //                    new BLL.T_Bus_PerformDuties().Update(modelT_Bus_PerformDuties);
18141
-        //                    #endregion
18142
-        //                    string strmsg = ""; var isperform = 1; int IsSatisfie = 0;
18143
-
18144
-        //                    #region
18145
-        //                    if (state == 1)
18146
-        //                    {
18147
-        //                        strmsg = "同意";
18148
-        //                        isperform = 2;
18149
-        //                        IsSatisfie = 1;
18150
-        //                    }
18151
-        //                    else if (state == 2)
18152
-        //                    {
18153
-        //                        strmsg = "拒绝";
18154
-
18155
-        //                        isperform = 3;
18156
-        //                    }
18157
-        //                    #endregion
18158
-
18159
-        //                    #region 交办记录处理
18160
-        //                    foreach (var item in modelT_Bus_PerformDuties.F_AssignedId.Split(','))
18161
-        //                    {
18162
-        //                        var model = assignBLL.GetModel(int.Parse(item));
18163
-        //                        if (model != null)
18164
-        //                        {
18165
-        //                            model.F_IsPerform = isperform;
18166
-        //                            if (state == 1)//同意此履职界定则修改回访结果为满意
18167
-        //                                model.F_IsSatisfie = IsSatisfie;
18168
-        //                            assignBLL.Update(model);
18169
-
18170
-        //                        }
18171
-        //                    }
18172
-        //                    #endregion
18173
-        //                    #region 回访记录处理
18174
-        //                    foreach (var item in modelT_Bus_PerformDuties.F_VisitId.Split(','))
18175
-        //                    {
18176
-        //                        var model = new BLL.T_Bus_VisitResult().GetModel(int.Parse(item));
18177
-        //                        if (model != null)
18178
-        //                        {
18179
-        //                            model.F_IsPerform = isperform;
18180
-        //                            if (state == 1)//同意此履职界定则修改回访结果为满意
18181
-        //                                model.F_IsSatisfie = IsSatisfie;
18182
-        //                            new BLL.T_Bus_VisitResult().Update(model);
18183
-
18184
-        //                        }
18185
-        //                    }
18186
-        //                    #endregion
18187
-
18188
-        //                    #region 插入操作记录
18189
-        //                    Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
18190
-        //                    oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
18191
-        //                    oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
18192
-
18193
-        //                    string userinfo = User.depname + "(" + User.F_UserCode + ")";
18194
-        //                    oper.F_Message = userinfo + " " + strmsg + "了此处理";
18195
-        //                    if (!string.IsNullOrWhiteSpace(reason))
18196
-        //                        oper.F_Message = oper.F_Message + ",理由为:" + reason;
18197
-        //                    oper.F_CreateUser = User.F_UserCode;
18198
-        //                    oper.F_CreateTime = DateTime.Now;
18199
-        //                    oper.F_IsDelete = 0;
18200
-
18201
-        //                    foreach (var item in modelT_Bus_PerformDuties.F_AssignedId.Split(','))
18202
-        //                    {
18203
-        //                        oper.F_AssignedId = int.Parse(item);
18204
-        //                        operBLL.Add(oper);
18205
-
18206
-        //                        //推送消息表
18207
-        //                        msg.AddInternalMessagesInfo("工单消息", oper.F_Message + ",工单编号:" + oper.F_WorkOrderId, modelT_Bus_PerformDuties.F_CreateUser, User.F_UserCode, (int)EnumSmsType.workorder);
18208
-        //                    }
18209
-        //                    #endregion
18210
-
18211
-        //                    trans.Complete();
18212
-        //                }
18213
-        //                return Success("操作成功");
18214
-        //            }
18215
-        //            else
18216
-        //                return Error("已经审核过了");
18217
-        //        }
18218
-        //        else
18219
-        //            return Error("操作失败");
18220
-        //    }
18221
-        //    else
18222
-        //        return Error("权限不足");
18223
-        //}
18224
-
18225
-        #endregion
17950
+     
18226 17951
 
18227 17952
         /// <summary>
18228 17953
         /// 督办工单
@@ -20825,7 +20550,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
20825 20550
                 return Error("操作失败");
20826 20551
             }
20827 20552
         }
20828
-        #endregion
20553
+        
20829 20554
 
20830 20555
         #region 语音附件其他
20831 20556
         /// <summary>