Browse Source

禅道需求

duhongyu 5 years ago
parent
commit
726e9ce5bc

File diff suppressed because it is too large
+ 3 - 3
codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs


+ 4 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -276,10 +276,12 @@ namespace CallCenterApi.Interface.Controllers
276 276
                 if (filter.type == 1)
277 277
                 {
278 278
                     sql += "and F_RoleId=52";
279
+                    sql += "and F_DeleteFlag=0";
279 280
                 }
280 281
                 if (filter.type == 2)
281 282
                 {
282 283
                     sql += "and F_See=3";
284
+                    sql += "and F_DeleteFlag=0";
283 285
                 }
284 286
                 sql += "and (F_See!='5' or  F_See is null)";
285 287
                 int recordCount = 0;
@@ -394,10 +396,12 @@ namespace CallCenterApi.Interface.Controllers
394 396
                 if (filter .type ==1)
395 397
                 {
396 398
                     sql += "and F_RoleId=52";
399
+                    sql += "and F_DeleteFlag=0";
397 400
                 }
398 401
                 if (filter.type == 2)
399 402
                 {
400 403
                     sql += "and F_See=3";
404
+                    sql += "and F_DeleteFlag=0";
401 405
                 }
402 406
                 sql += "and (F_See!='5' or  F_See is null)";
403 407
                

+ 96 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeClassController.cs

@@ -52,7 +52,102 @@ namespace CallCenterApi.Interface.Controllers.knowledge
52 52
                 else
53 53
                     return Error("加载失败");
54 54
 
55
-            return NoToken("未知错误,请重新登录");
55
+            
56
+        }
57
+        public ActionResult GetAPPList()
58
+        {
59
+
60
+
61
+            DataTable dt = new DataTable();
62
+            string pid = HttpUtility.UrlDecode(RequestString.GetQueryString("pid"));
63
+            string sql = " and F_DeleteFlag=0 and F_CategoryType is null";
64
+            if (pid.Trim() != "")
65
+            {
66
+                sql += " and F_ParentId=" + pid.Trim();
67
+            }
68
+            else
69
+                sql += " and F_ParentId=0";
70
+
71
+            dt = new BLL.T_RepositoryCategory().GetList(" 1=1 " + sql).Tables[0];
72
+            List<TreeAPPModel> modelList = BindAPPTree(dt, "0");
73
+
74
+            if (modelList.Count > 0)
75
+            {
76
+                return Success("加载成功", modelList);
77
+            }
78
+            else
79
+                return Error("加载失败");
80
+
81
+
82
+        }
83
+        public class TreeAPPModel
84
+        {
85
+            private string _value;
86
+            /// <summary>
87
+            /// Id
88
+            /// </summary>
89
+            public string value
90
+            {
91
+                set { _value = value; }
92
+                get { return _value; }
93
+            }
94
+
95
+            private string iconCls;
96
+            /// <summary>
97
+            /// 图标
98
+            /// </summary>
99
+            public string IconCls
100
+            {
101
+                set { iconCls = value; }
102
+                get { return iconCls; }
103
+            }
104
+            private string _text;
105
+            /// <summary>
106
+            /// 树节点显示文本
107
+            /// </summary>
108
+            public string text
109
+            {
110
+                set { _text = value; }
111
+                get { return _text; }
112
+            }
113
+            private List<TreeAPPModel> _children;
114
+            public List<TreeAPPModel> children
115
+            {
116
+                set { _children = value; }
117
+                get { return _children; }
118
+            }
119
+        }
120
+        //tree  树形知识库分类
121
+        private List<TreeAPPModel> BindAPPTree(DataTable tab, string parentid)
122
+        {
123
+            DataTable tab2 = new DataTable();
124
+
125
+            if (tab != null && tab.Rows.Count > 0)
126
+            {
127
+                List<Model.T_RepositoryCategory> categorylist = new BLL.T_RepositoryCategory().DataTableToList(tab);
128
+                List<TreeAPPModel> modelList = new List<TreeAPPModel>(categorylist.Count);
129
+                for (int i = 0; i < categorylist.Count; i++)
130
+                {
131
+                    TreeAPPModel model = new TreeAPPModel();
132
+                    string currentID = categorylist[i].F_CategoryId.ToString();//当前功能ID
133
+                    model.value = currentID;
134
+                    model.IconCls = "";//图标
135
+                    model.text = categorylist[i].F_CategoryName;
136
+                    tab2 = new BLL.T_RepositoryCategory().GetList("F_ParentId=" + currentID + " and F_DeleteFlag=0 and F_CategoryType is null order by F_Sort").Tables[0];
137
+                    if (tab2 != null && tab2.Rows.Count > 0)
138
+                    {
139
+                        model.children = BindAPPTree(tab2, currentID);
140
+                    }
141
+                    modelList.Add(model);
142
+                }
143
+                return modelList;
144
+
145
+            }
146
+            else
147
+            {
148
+                return null;
149
+            }
150
+
56 151
         }
57 152
         //tree  树形知识库分类
58 153
         private List<Model.TreeModel> BindTree(DataTable tab, string parentid)

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/BusinessController.cs

@@ -586,7 +586,7 @@ namespace CallCenterApi.Interface.Controllers.report
586 586
                                 int t = 12 - timeslot.stime;
587 587
                                 if (pronos >= timeslot.stime && pronos <= 12)
588 588
                                     date.MonthCount1++;
589
-                                else if (pronos >= timeslot.etime)
589
+                                else if (pronos <= timeslot.etime)
590 590
                                     date.MonthCount1++;
591 591
 
592 592
                             }
@@ -756,7 +756,7 @@ namespace CallCenterApi.Interface.Controllers.report
756 756
                             int t = 12 - timeslot.stime;
757 757
                             if (pronos >= timeslot.stime && pronos <= 12)
758 758
                                 date.MonthCount1++;
759
-                            else if (pronos >= timeslot.etime)
759
+                            else if (pronos <= timeslot.etime)
760 760
                                 date.MonthCount1++;
761 761
 
762 762
                         }

File diff suppressed because it is too large
+ 260 - 30
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs


+ 38 - 10
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs

@@ -663,7 +663,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
663 663
                     {
664 664
                         var depts = new BLL.T_Bus_WorkOrder().GetModelList(sql + "order by F_Id desc");
665 665
                         dt.Columns.Add("序号");
666
-                        dt.Columns.Add("抽检时间");
666
+                        dt.Columns.Add("录入时间");
667 667
                         dt.Columns.Add("抽检单位");
668 668
                         dt.Columns.Add("办事处");
669 669
                         dt.Columns.Add("抽检类型");
@@ -685,7 +685,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
685 685
                             {
686 686
                                 //  drNew["工单编号"] = it.F_WorkOrderId;//
687 687
                                 drNew["序号"] = it.F_SerialNumber;//
688
-                                drNew["抽检时间"] = DateTime.Parse(it.F_CreateTime.ToString()).ToString("yyyy年MM月dd日HH时mm分");//
688
+                                drNew["录入时间"] = DateTime.Parse(it.F_CreateTime.ToString()).ToString("yyyy年MM月dd日HH时mm分");//
689 689
                                 drNew["抽检单位"] = it.F_Company;
690 690
                                 if (!string.IsNullOrEmpty(it.F_Office))
691 691
                                 {
@@ -1200,7 +1200,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
1200 1200
                     var user = new BLL.T_Sys_UserAccount().GetModel(it.F_DealUser);
1201 1201
                     if (user != null)
1202 1202
                     {
1203
-                        model.F_DealUser = user.F_UserName; ;//处理人
1203
+                        if (!string.IsNullOrEmpty(user.F_Mobile))
1204
+                        {
1205
+                            model.F_DealUser = user.F_UserName + "(" + user.F_Mobile + ")"; ;//处理人
1206
+                        }
1207
+                        else 
1208
+                         model.F_DealUser = user.F_UserName;
1204 1209
                     }
1205 1210
                 }
1206 1211
                 model.F_DealTime = it.F_DealTime;//处理时间
@@ -1514,16 +1519,19 @@ namespace CallCenterApi.Interface.Controllers.workorder
1514 1519
                                 return Error("请填写催单内容");
1515 1520
                             if (model.F_State == 0)
1516 1521
                                 return Error("工单未提交");
1517
-                            else  if (model.F_State == 10)
1518
-                                return Error("工单已处理");
1519 1522
                             else  
1520 1523
                             {
1524
+
1521 1525
                                 var modellist = new BLL.T_Wo_WorkOrderItem_New().GetModelList("F_WoID='" + model.F_Id + "'and F_IsUsed =0 order by F_Id desc").FirstOrDefault();
1522 1526
                                 if(modellist !=null )
1523 1527
                                 {
1524
-                                    if (!string.IsNullOrEmpty(modellist.F_NextUser ))
1528
+                                    if (!string.IsNullOrEmpty(modellist.F_NextUser) || model.F_State == 10)
1525 1529
                                     {
1526
-                                        var user = new BLL.T_Sys_UserAccount().GetModel(modellist.F_NextUser);
1530
+                                        Model.T_Sys_UserAccount user = new Model.T_Sys_UserAccount();
1531
+                                        if (model.F_State == 10)
1532
+                                            user = new BLL.T_Sys_UserAccount().GetModel(modellist.F_CreateUser);
1533
+                                        else
1534
+                                            user = new BLL.T_Sys_UserAccount().GetModel(modellist.F_NextUser);
1527 1535
                                         string deptname = "";
1528 1536
                                         var dement = new BLL.T_Sys_Department().GetModel(ua.F_DeptId);
1529 1537
                                         if (dement != null)
@@ -1534,13 +1542,33 @@ namespace CallCenterApi.Interface.Controllers.workorder
1534 1542
                                         {
1535 1543
                                             if (!string.IsNullOrEmpty(user.F_Mobile))
1536 1544
                                             {
1537
-                                                bool n = new WorkTypeController().SendReminderSMS("工单催单提醒:", user.F_Mobile, cont);
1545
+                                                bool n = true;
1546
+                                                if (model.F_State == 10)
1547
+                                                {
1548
+                                                    n = new WorkTypeController().SendReminderSMS("完善工单提醒:", user.F_Mobile, cont);
1549
+                                                }
1550
+                                                else
1551
+                                                {
1552
+                                                    n = new WorkTypeController().SendReminderSMS("工单催单提醒:", user.F_Mobile, cont);
1553
+                                                }
1554
+                                            //    bool n = new WorkTypeController().SendReminderSMS("工单催单提醒:", user.F_Mobile, cont);
1538 1555
                                                 //  string msg = new PushMessageController().Push(Title, count, user.F_UserCode);
1539 1556
                                                 if (n)
1540 1557
                                                 {
1541
-                                                    model.F_DealType = 1;
1558
+                                                   
1559
+                                                  
1560
+                                                    if (model.F_State == 10)
1561
+                                                    {
1562
+                                                        model.F_DealState = 1;
1563
+                                                        AddLog(model.F_Id, (int)model.F_State, deptname + ua.F_UserName + "完善工单:" + cont, 13, 13, "", 0, ua, 1);
1564
+                                                    }
1565
+                                                    else
1566
+                                                    {
1567
+                                                        model.F_DealType = 1;
1568
+                                                        AddLog(model.F_Id, (int)model.F_State, deptname + ua.F_UserName + "催单:" + cont, 12, 12, "", 0, ua, 1);
1569
+                                                    }
1542 1570
                                                     workorderBLL.Update(model);
1543
-                                                    AddLog(model.F_Id, (int)model.F_State, deptname + ua.F_UserName + "催单:" + cont, 12, 12, "", 0, ua, 1);
1571
+                                               //     AddLog(model.F_Id, (int)model.F_State, deptname + ua.F_UserName + "催单:" + cont, 12, 12, "", 0, ua, 1);
1544 1572
                                                     return Success("催单成功");
1545 1573
                                                 }
1546 1574
                                                 else

+ 7 - 4
codegit/CallCenterCommon/CallCenter.Utility/NPOI/NPOIHelper.cs

@@ -116,7 +116,7 @@ namespace CallCenter.Utility
116 116
         /// <param name="Name"></param>
117 117
         /// <param name="dt"></param>
118 118
         /// <returns></returns>
119
-        public string ExportToExcel(string Name, DataTable dt, string[] cols = null)
119
+        public string ExportToExcel(string Name, DataTable dt, string[] cols = null,int iswork=0)
120 120
         {
121 121
             try
122 122
             {
@@ -134,14 +134,17 @@ namespace CallCenter.Utility
134 134
                 HeadercellStyle.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.SkyBlue.Index;
135 135
                 HeadercellStyle.FillPattern = FillPattern.SolidForeground;
136 136
                 HeadercellStyle.FillBackgroundColor = NPOI.HSSF.Util.HSSFColor.SkyBlue.Index;
137
-
138 137
                 //字体
138
+               
139
+                if (iswork>0)
140
+                {
141
+                   IDataFormat format = workbook.CreateDataFormat();
142
+                   HeadercellStyle.DataFormat = format.GetFormat("[DbNum2][$-804]0");
143
+                }
139 144
                 NPOI.SS.UserModel.IFont headerfont = workbook.CreateFont();
140 145
                 headerfont.Boldweight = (short)FontBoldWeight.Bold;
141 146
                 headerfont.FontHeightInPoints = 12;
142 147
                 HeadercellStyle.SetFont(headerfont);
143
-
144
-
145 148
                 //用column name 作为列名
146 149
                 int icolIndex = 0;
147 150
                 IRow headerRow = sheet.CreateRow(0);