zhoufan лет назад: 8
Родитель
Сommit
31e9a2c834

+ 43 - 18
API/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/BusinessController.cs

@@ -262,15 +262,17 @@ namespace CallCenterApi.Interface.Controllers.report
262 262
                 starttime = starttime + " 00:00:00";
263 263
                 endtime = endtime + " 23:59:59";
264 264
 
265
-                string sql = "select a.F_DeptId,dbo.GetDeptName(a.F_DeptId) as DeptName,w.F_WorkOrderId,w.F_ComContent,a.F_SubmitDate,"
266
-                    + "dbo.GetFeedBackTime(a.F_SubmitDate,10) as YFKDate, F_EndDate,"
267
-                    + "dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))-10 as OverDays "
268
-                    + " from T_Bus_WorkOrder w inner join T_Bus_AssignedInfo a on w.F_WorkOrderId=a.F_WorkOrderId "
269
-                    + "where w.F_IsDelete=0 and  w.F_RegDate>'" + starttime + "'  and  w.F_RegDate<='" + endtime
270
-                    + "' and  isnull(a.F_DeptId,0)<>0 and dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))>10 "
271
-                    + " order by a.F_DeptId";
272
-
265
+                //string sql = "select a.F_DeptId,dbo.GetDeptName(a.F_DeptId) as DeptName,w.F_WorkOrderId,w.F_ComContent,a.F_SubmitDate,"
266
+                //    + "dbo.GetFeedBackTime(a.F_SubmitDate,10) as YFKDate, F_EndDate,"
267
+                //    + "dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))-10 as OverDays "
268
+                //    + " from T_Bus_WorkOrder w inner join T_Bus_AssignedInfo a on w.F_WorkOrderId=a.F_WorkOrderId "
269
+                //    + "where w.F_IsDelete=0 and  w.F_RegDate>'" + starttime + "'  and  w.F_RegDate<='" + endtime
270
+                //    + "' and  isnull(a.F_DeptId,0)<>0 and dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))>10 "
271
+                //    + " order by a.F_DeptId";
272
+                string sql = "SELECT * FROM dbo.View_OverList where F_RegDate>='" + starttime + "'  and  F_RegDate<='" + endtime + "' order by F_DeptId";
273 273
                 var dt = DbHelperSQL.Query(sql).Tables[0];
274
+                dt.Columns.Remove("F_DeptId");
275
+                dt.Columns.Remove("F_RegDate");
274 276
 
275 277
                 string[] cols = { "单位", "编号", "内容", "转办日期", "应反馈日期", "反馈日期", "逾期天数" };
276 278
 
@@ -312,19 +314,23 @@ namespace CallCenterApi.Interface.Controllers.report
312 314
                 //    + "where w.F_IsDelete=0 and  w.F_RegDate>'" + starttime + "'  and  w.F_RegDate<='" + endtime
313 315
                 //    + "' and  isnull(a.F_DeptId,0)<>0 and dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))>a.F_OverDay "
314 316
                 //    + " order by a.F_DeptId";
315
-                string sql = "select dbo.GetDeptName(a.F_DeptId) as '单位',w.F_WorkOrderId as '编号',w.F_ComContent as '内容',a.F_SubmitDate as '转办日期',"
316
-                    + "dbo.GetFeedBackTime(a.F_SubmitDate,10) as '应反馈日期', F_EndDate as '反馈日期',"
317
-                    + "dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))-10 as '逾期天数' "
318
-                    + " from T_Bus_WorkOrder w inner join T_Bus_AssignedInfo a on w.F_WorkOrderId=a.F_WorkOrderId "
319
-                    + "where w.F_IsDelete=0 and  w.F_RegDate>'" + starttime + "'  and  w.F_RegDate<='" + endtime
320
-                    + "' and  isnull(a.F_DeptId,0)<>0 and dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))>10 "
321
-                    + " order by a.F_DeptId";
322
-
317
+                //string sql = "select dbo.GetDeptName(a.F_DeptId) as '单位',w.F_WorkOrderId as '编号',w.F_ComContent as '内容',a.F_SubmitDate as '转办日期',"
318
+                //    + "dbo.GetFeedBackTime(a.F_SubmitDate,10) as '应反馈日期', F_EndDate as '反馈日期',"
319
+                //    + "dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))-10 as '逾期天数' "
320
+                //    + " from T_Bus_WorkOrder w inner join T_Bus_AssignedInfo a on w.F_WorkOrderId=a.F_WorkOrderId "
321
+                //    + "where w.F_IsDelete=0 and  w.F_RegDate>'" + starttime + "'  and  w.F_RegDate<='" + endtime
322
+                //    + "' and  isnull(a.F_DeptId,0)<>0 and dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))>10 "
323
+                //    + " order by a.F_DeptId";
324
+                string sql = "SELECT * FROM dbo.View_OverList where F_RegDate>='" + starttime + "'  and  F_RegDate<='" + endtime + "' order by F_DeptId";
323 325
                 var dt = DbHelperSQL.Query(sql).Tables[0];
326
+                dt.Columns.Remove("F_DeptId");
327
+                dt.Columns.Remove("F_RegDate");
328
+
329
+                string[] cols = { "单位", "编号", "内容", "转办日期", "应反馈日期", "反馈日期", "逾期天数" };
324 330
 
325 331
                 NPOIHelper npoi = new NPOIHelper();
326 332
 
327
-                if (npoi.ExportToExcel("逾期统计", dt) == "")
333
+                if (npoi.ExportToExcel("逾期统计", dt, cols) == "")
328 334
                 {
329 335
                     return Success("导出成功");
330 336
                 }
@@ -405,6 +411,9 @@ namespace CallCenterApi.Interface.Controllers.report
405 411
             ActionResult res = NoToken("未知错误,请重新登录");
406 412
             if (Request.IsAuthenticated)
407 413
             {
414
+                int type = RequestString.GetInt("type", 0);
415
+                int bigtype = RequestString.GetInt("bigtype", 0);
416
+                int smalltype = RequestString.GetInt("smalltype", 0);
408 417
                 string year = RequestString.GetQueryString("year");
409 418
                 string month = RequestString.GetQueryString("month");
410 419
                 if (string.IsNullOrEmpty(year))
@@ -417,7 +426,23 @@ namespace CallCenterApi.Interface.Controllers.report
417 426
                 }
418 427
                 string sql = "SELECT * FROM dbo.View_DealList where SUBSTRING(F_RegDate,1,7)='" + (year + "-" + month) + "'";
419 428
 
429
+                if (type != 0)
430
+                {
431
+                    sql += " and F_InfoType = '" + type + "' ";
432
+                }
433
+                if (bigtype != 0)
434
+                {
435
+                    sql += " and F_InfoConBigType = '" + bigtype + "' ";
436
+                }
437
+                if (smalltype != 0)
438
+                {
439
+                    sql += " and F_InfoConSmallType = '" + smalltype + "' ";
440
+                }
441
+
420 442
                 var dt = DbHelperSQL.Query(sql).Tables[0];
443
+                dt.Columns.Remove("F_InfoType");
444
+                dt.Columns.Remove("F_InfoConBigType");
445
+                dt.Columns.Remove("F_InfoConSmallType");
421 446
 
422 447
                 string[] cols = { "受理编号", "投诉人及电话", "投诉时间", "办理部门", "办结时间", "内容摘要", "办理结果", "备注" };
423 448
 
@@ -441,7 +466,7 @@ namespace CallCenterApi.Interface.Controllers.report
441 466
                         cols = cols,
442 467
                         data = dt
443 468
                     };
444
-                    return Success("成功");
469
+                    return Success("成功",obj);
445 470
                 }
446 471
             }
447 472
             return res;

+ 76 - 62
API/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -2280,7 +2280,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2280 2280
                         Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = new BLL.T_Bus_WorkOrder().GetModel(workorderid);
2281 2281
                         if (modelT_Bus_WorkOrder != null)
2282 2282
                         {
2283
-                            if (modelT_Bus_WorkOrder.F_WorkState == 18 || modelT_Bus_WorkOrder.F_WorkState == 26)
2283
+                            if (modelT_Bus_WorkOrder.F_WorkState == 18|| modelT_Bus_WorkOrder.F_WorkState == 25 || modelT_Bus_WorkOrder.F_WorkState == 26)
2284 2284
                             {
2285 2285
                                 using (TransactionScope trans = new TransactionScope())
2286 2286
                                 {
@@ -2599,7 +2599,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2599 2599
                             }
2600 2600
                             else
2601 2601
                             {
2602
-                                res = Error("已经交办过了");
2602
+                                res = Error("已经处理过了");
2603 2603
                             }
2604 2604
                         }
2605 2605
                     }
@@ -2631,55 +2631,62 @@ namespace CallCenterApi.Interface.Controllers.workorder
2631 2631
                         Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = new BLL.T_Bus_WorkOrder().GetModel(workorderid);
2632 2632
                         if (modelT_Bus_WorkOrder != null)
2633 2633
                         {
2634
-                            using (TransactionScope trans = new TransactionScope())
2634
+                            if (modelT_Bus_WorkOrder.F_WorkState == 23)
2635 2635
                             {
2636
-                                #region 保存工单信息
2637
-                                modelT_Bus_WorkOrder.F_WorkState = 25;//办理中
2638
-                                new BLL.T_Bus_WorkOrder().Update(modelT_Bus_WorkOrder);
2639
-                                #endregion
2640
-
2641
-                                #region 修改呈批记录
2642
-                                //呈批记录
2643
-                                Model.T_Bus_SubmitSuper model_T_Bus_SubmitSuper = new BLL.T_Bus_SubmitSuper().GetNewModelByWorkOrderID(modelT_Bus_WorkOrder.F_WorkOrderId);
2644
-                                if (model_T_Bus_SubmitSuper != null)
2636
+                                using (TransactionScope trans = new TransactionScope())
2645 2637
                                 {
2646
-                                    string clr = new BLL.T_Sys_SystemConfig().GetParamValueByParamCode("FLCLR");
2647
-                                    model_T_Bus_SubmitSuper.F_SuperOpinion = superopinion;//领导批示
2648
-                                    model_T_Bus_SubmitSuper.F_ApprovalUserCode = userModel.F_UserCode;//审批人工号
2649
-                                    model_T_Bus_SubmitSuper.F_ApprovalName = clr;//分流处理人
2650
-                                    model_T_Bus_SubmitSuper.F_ApprovalDate = DateTime.Now;//审批时间
2651
-                                    model_T_Bus_SubmitSuper.F_State = 2;////审批状态(0:未处理,1:通过,2:退回)
2652
-                                    model_T_Bus_SubmitSuper.F_IsRead = true;//是否已读 
2653
-                                    model_T_Bus_SubmitSuper.F_BackReason = backreason;
2654
-                                    model_T_Bus_SubmitSuper.F_BackType = backtype;
2655
-                                    new BLL.T_Bus_SubmitSuper().Update(model_T_Bus_SubmitSuper);
2656
-                                }
2657
-                                #endregion
2638
+                                    #region 保存工单信息
2639
+                                    modelT_Bus_WorkOrder.F_WorkState = 25;//办理中
2640
+                                    new BLL.T_Bus_WorkOrder().Update(modelT_Bus_WorkOrder);
2641
+                                    #endregion
2658 2642
 
2659
-                                #region 修改流转记录
2660
-                                Model.T_Bus_WorkFlow model_T_Bus_WorkFlow = new BLL.T_Bus_WorkFlow().GetNewModelByWorkOrderID(modelT_Bus_WorkOrder.F_WorkOrderId);
2661
-                                if (model_T_Bus_WorkFlow != null)
2662
-                                {
2663
-                                    model_T_Bus_WorkFlow.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;//工单流水号
2664
-                                    model_T_Bus_WorkFlow.F_EndDate = DateTime.Now;//流转结束时间
2665
-                                    model_T_Bus_WorkFlow.FEUserCode = userModel.F_UserCode;//办理人            
2666
-                                    new BLL.T_Bus_WorkFlow().Update(model_T_Bus_WorkFlow);
2667
-                                }
2668
-                                #endregion
2643
+                                    #region 修改呈批记录
2644
+                                    //呈批记录
2645
+                                    Model.T_Bus_SubmitSuper model_T_Bus_SubmitSuper = new BLL.T_Bus_SubmitSuper().GetNewModelByWorkOrderID(modelT_Bus_WorkOrder.F_WorkOrderId);
2646
+                                    if (model_T_Bus_SubmitSuper != null)
2647
+                                    {
2648
+                                        string clr = new BLL.T_Sys_SystemConfig().GetParamValueByParamCode("FLCLR");
2649
+                                        model_T_Bus_SubmitSuper.F_SuperOpinion = superopinion;//领导批示
2650
+                                        model_T_Bus_SubmitSuper.F_ApprovalUserCode = userModel.F_UserCode;//审批人工号
2651
+                                        model_T_Bus_SubmitSuper.F_ApprovalName = clr;//分流处理人
2652
+                                        model_T_Bus_SubmitSuper.F_ApprovalDate = DateTime.Now;//审批时间
2653
+                                        model_T_Bus_SubmitSuper.F_State = 2;////审批状态(0:未处理,1:通过,2:退回)
2654
+                                        model_T_Bus_SubmitSuper.F_IsRead = true;//是否已读 
2655
+                                        model_T_Bus_SubmitSuper.F_BackReason = backreason;
2656
+                                        model_T_Bus_SubmitSuper.F_BackType = backtype;
2657
+                                        new BLL.T_Bus_SubmitSuper().Update(model_T_Bus_SubmitSuper);
2658
+                                    }
2659
+                                    #endregion
2669 2660
 
2670
-                                #region 插入流转记录
2671
-                                int p_WorkFlowID = 0;//声明流转编号    
2672
-                                Model.T_Bus_WorkFlow _T_Bus_WorkFlow = new Model.T_Bus_WorkFlow();
2673
-                                _T_Bus_WorkFlow.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;//工单流水号
2674
-                                _T_Bus_WorkFlow.F_WorkSatae = modelT_Bus_WorkOrder.F_WorkState;//工单状态
2675
-                                _T_Bus_WorkFlow.F_StartDate = DateTime.Now;//流转开始时间
2676
-                                _T_Bus_WorkFlow.F_SUserCode = userModel.F_UserCode;//登记人
2677
-                                p_WorkFlowID = new BLL.T_Bus_WorkFlow().Add(_T_Bus_WorkFlow);
2678
-                                #endregion
2661
+                                    #region 修改流转记录
2662
+                                    Model.T_Bus_WorkFlow model_T_Bus_WorkFlow = new BLL.T_Bus_WorkFlow().GetNewModelByWorkOrderID(modelT_Bus_WorkOrder.F_WorkOrderId);
2663
+                                    if (model_T_Bus_WorkFlow != null)
2664
+                                    {
2665
+                                        model_T_Bus_WorkFlow.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;//工单流水号
2666
+                                        model_T_Bus_WorkFlow.F_EndDate = DateTime.Now;//流转结束时间
2667
+                                        model_T_Bus_WorkFlow.FEUserCode = userModel.F_UserCode;//办理人            
2668
+                                        new BLL.T_Bus_WorkFlow().Update(model_T_Bus_WorkFlow);
2669
+                                    }
2670
+                                    #endregion
2679 2671
 
2680
-                                trans.Complete();
2672
+                                    #region 插入流转记录
2673
+                                    int p_WorkFlowID = 0;//声明流转编号    
2674
+                                    Model.T_Bus_WorkFlow _T_Bus_WorkFlow = new Model.T_Bus_WorkFlow();
2675
+                                    _T_Bus_WorkFlow.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;//工单流水号
2676
+                                    _T_Bus_WorkFlow.F_WorkSatae = modelT_Bus_WorkOrder.F_WorkState;//工单状态
2677
+                                    _T_Bus_WorkFlow.F_StartDate = DateTime.Now;//流转开始时间
2678
+                                    _T_Bus_WorkFlow.F_SUserCode = userModel.F_UserCode;//登记人
2679
+                                    p_WorkFlowID = new BLL.T_Bus_WorkFlow().Add(_T_Bus_WorkFlow);
2680
+                                    #endregion
2681
+
2682
+                                    trans.Complete();
2683
+                                }
2684
+                                res = Success("成功");
2685
+                            }
2686
+                            else
2687
+                            {
2688
+                                res = Error("已经处理过了");
2681 2689
                             }
2682
-                            res = Success("成功");
2683 2690
                         }
2684 2691
                     }
2685 2692
                 }
@@ -2929,27 +2936,34 @@ namespace CallCenterApi.Interface.Controllers.workorder
2929 2936
                         Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = new BLL.T_Bus_WorkOrder().GetModel(workorderid);
2930 2937
                         if (modelT_Bus_WorkOrder != null)
2931 2938
                         {
2932
-                            using (TransactionScope trans = new TransactionScope())
2939
+                            if (modelT_Bus_WorkOrder.F_WorkState == 26)
2933 2940
                             {
2934
-                                #region 保存工单信息
2935
-                                modelT_Bus_WorkOrder.F_WorkState = 22;//已办结
2936
-                                modelT_Bus_WorkOrder.F_IsClosed = true;//是否关闭工单
2937
-                                new BLL.T_Bus_WorkOrder().Update(modelT_Bus_WorkOrder);
2938
-                                #endregion
2939
-
2940
-                                #region 修改流转记录
2941
-                                Model.T_Bus_WorkFlow model_T_Bus_WorkFlow = new BLL.T_Bus_WorkFlow().GetNewModelByWorkOrderID(modelT_Bus_WorkOrder.F_WorkOrderId);
2942
-                                if (model_T_Bus_WorkFlow != null)
2941
+                                using (TransactionScope trans = new TransactionScope())
2943 2942
                                 {
2944
-                                    model_T_Bus_WorkFlow.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;//工单流水号
2945
-                                    model_T_Bus_WorkFlow.F_EndDate = DateTime.Now;//流转结束时间
2946
-                                    model_T_Bus_WorkFlow.FEUserCode = userModel.F_UserCode;//办理人            
2947
-                                    new BLL.T_Bus_WorkFlow().Update(model_T_Bus_WorkFlow);
2943
+                                    #region 保存工单信息
2944
+                                    modelT_Bus_WorkOrder.F_WorkState = 22;//已办结
2945
+                                    modelT_Bus_WorkOrder.F_IsClosed = true;//是否关闭工单
2946
+                                    new BLL.T_Bus_WorkOrder().Update(modelT_Bus_WorkOrder);
2947
+                                    #endregion
2948
+
2949
+                                    #region 修改流转记录
2950
+                                    Model.T_Bus_WorkFlow model_T_Bus_WorkFlow = new BLL.T_Bus_WorkFlow().GetNewModelByWorkOrderID(modelT_Bus_WorkOrder.F_WorkOrderId);
2951
+                                    if (model_T_Bus_WorkFlow != null)
2952
+                                    {
2953
+                                        model_T_Bus_WorkFlow.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;//工单流水号
2954
+                                        model_T_Bus_WorkFlow.F_EndDate = DateTime.Now;//流转结束时间
2955
+                                        model_T_Bus_WorkFlow.FEUserCode = userModel.F_UserCode;//办理人            
2956
+                                        new BLL.T_Bus_WorkFlow().Update(model_T_Bus_WorkFlow);
2957
+                                    }
2958
+                                    #endregion
2959
+                                    trans.Complete();
2948 2960
                                 }
2949
-                                #endregion
2950
-                                trans.Complete();
2961
+                                res = Success("成功");
2962
+                            }
2963
+                            else
2964
+                            {
2965
+                                res = Error("已经处理过了");
2951 2966
                             }
2952
-                            res = Success("成功");
2953 2967
                         }
2954 2968
                         else
2955 2969
                         {