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

Merge branch 'master' of http://192.168.1.222:3000/zhengbingbing/XinXiangXLX_API

# Conflicts:
#	codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Enum/EnumWorkOrderState.cs
zhupei лет назад: 3
Родитель
Сommit
b6b5bb681b

+ 1 - 0
codegit/CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj

@@ -117,6 +117,7 @@
117 117
     <Compile Include="T_Wo_BusinessManage.cs" />
118 118
     <Compile Include="T_Wo_MaterialManage.cs" />
119 119
     <Compile Include="T_Wo_QuestionManage.cs" />
120
+    <Compile Include="T_Wo_WorkCopy.cs" />
120 121
     <Compile Include="T_Wo_WorkOrder.cs" />
121 122
     <Compile Include="T_Wo_WorkOrderItem_New.cs" />
122 123
     <Compile Include="T_Wo_WorkOrderTimeOut.cs" />

+ 157 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Wo_WorkCopy.cs

@@ -0,0 +1,157 @@
1
+
2
+using System;
3
+using System.Data;
4
+using System.Collections.Generic;
5
+
6
+using CallCenterApi.Model;
7
+namespace CallCenterApi.BLL
8
+{
9
+    /// <summary>
10
+    /// T_Wo_WorkCopy
11
+    /// </summary>
12
+    public partial class T_Wo_WorkCopy
13
+    {
14
+        private readonly CallCenterApi.DAL.T_Wo_WorkCopy dal = new CallCenterApi.DAL.T_Wo_WorkCopy();
15
+        public T_Wo_WorkCopy()
16
+        { }
17
+        #region  BasicMethod
18
+
19
+        /// <summary>
20
+        /// 得到最大ID
21
+        /// </summary>
22
+        public int GetMaxId()
23
+        {
24
+            return dal.GetMaxId();
25
+        }
26
+
27
+        /// <summary>
28
+        /// 是否存在该记录
29
+        /// </summary>
30
+        public bool Exists(int F_ID)
31
+        {
32
+            return dal.Exists(F_ID);
33
+        }
34
+
35
+        /// <summary>
36
+        /// 增加一条数据
37
+        /// </summary>
38
+        public int Add(CallCenterApi.Model.T_Wo_WorkCopy model)
39
+        {
40
+            return dal.Add(model);
41
+        }
42
+
43
+        /// <summary>
44
+        /// 更新一条数据
45
+        /// </summary>
46
+        public bool Update(CallCenterApi.Model.T_Wo_WorkCopy model)
47
+        {
48
+            return dal.Update(model);
49
+        }
50
+
51
+        /// <summary>
52
+        /// 删除一条数据
53
+        /// </summary>
54
+        public bool Delete(int F_ID)
55
+        {
56
+
57
+            return dal.Delete(F_ID);
58
+        }
59
+        /// <summary>
60
+        /// 删除一条数据
61
+        /// </summary>
62
+        public bool DeleteList(string F_IDlist)
63
+        {
64
+            return dal.DeleteList(F_IDlist);
65
+        }
66
+
67
+        /// <summary>
68
+        /// 得到一个对象实体
69
+        /// </summary>
70
+        public CallCenterApi.Model.T_Wo_WorkCopy GetModel(int F_ID)
71
+        {
72
+
73
+            return dal.GetModel(F_ID);
74
+        }
75
+
76
+       
77
+        /// <summary>
78
+        /// 获得数据列表
79
+        /// </summary>
80
+        public DataSet GetList(string strWhere)
81
+        {
82
+            return dal.GetList(strWhere);
83
+        }
84
+        /// <summary>
85
+        /// 获得前几行数据
86
+        /// </summary>
87
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
88
+        {
89
+            return dal.GetList(Top, strWhere, filedOrder);
90
+        }
91
+        /// <summary>
92
+        /// 获得数据列表
93
+        /// </summary>
94
+        public List<CallCenterApi.Model.T_Wo_WorkCopy> GetModelList(string strWhere)
95
+        {
96
+            DataSet ds = dal.GetList(strWhere);
97
+            return DataTableToList(ds.Tables[0]);
98
+        }
99
+        /// <summary>
100
+        /// 获得数据列表
101
+        /// </summary>
102
+        public List<CallCenterApi.Model.T_Wo_WorkCopy> DataTableToList(DataTable dt)
103
+        {
104
+            List<CallCenterApi.Model.T_Wo_WorkCopy> modelList = new List<CallCenterApi.Model.T_Wo_WorkCopy>();
105
+            int rowsCount = dt.Rows.Count;
106
+            if (rowsCount > 0)
107
+            {
108
+                CallCenterApi.Model.T_Wo_WorkCopy model;
109
+                for (int n = 0; n < rowsCount; n++)
110
+                {
111
+                    model = dal.DataRowToModel(dt.Rows[n]);
112
+                    if (model != null)
113
+                    {
114
+                        modelList.Add(model);
115
+                    }
116
+                }
117
+            }
118
+            return modelList;
119
+        }
120
+
121
+        /// <summary>
122
+        /// 获得数据列表
123
+        /// </summary>
124
+        public DataSet GetAllList()
125
+        {
126
+            return GetList("");
127
+        }
128
+
129
+        /// <summary>
130
+        /// 分页获取数据列表
131
+        /// </summary>
132
+        public int GetRecordCount(string strWhere)
133
+        {
134
+            return dal.GetRecordCount(strWhere);
135
+        }
136
+        /// <summary>
137
+        /// 分页获取数据列表
138
+        /// </summary>
139
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
140
+        {
141
+            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
142
+        }
143
+        /// <summary>
144
+        /// 分页获取数据列表
145
+        /// </summary>
146
+        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
147
+        //{
148
+        //return dal.GetList(PageSize,PageIndex,strWhere);
149
+        //}
150
+
151
+        #endregion  BasicMethod
152
+        #region  ExtensionMethod
153
+
154
+        #endregion  ExtensionMethod
155
+    }
156
+}
157
+

+ 1 - 0
codegit/CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj

@@ -117,6 +117,7 @@
117 117
     <Compile Include="T_Wo_BusinessManage.cs" />
118 118
     <Compile Include="T_Wo_MaterialManage.cs" />
119 119
     <Compile Include="T_Wo_QuestionManage.cs" />
120
+    <Compile Include="T_Wo_WorkCopy.cs" />
120 121
     <Compile Include="T_Wo_WorkOrder.cs" />
121 122
     <Compile Include="T_Wo_WorkOrderItem_New.cs" />
122 123
     <Compile Include="T_Wo_WorkOrderTimeOut.cs" />

+ 354 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkCopy.cs

@@ -0,0 +1,354 @@
1
+
2
+using System;
3
+using System.Data;
4
+using System.Text;
5
+using System.Data.SqlClient;
6
+using CallCenterApi.DB;
7
+
8
+namespace CallCenterApi.DAL
9
+{
10
+    /// <summary>
11
+    /// 数据访问类:T_Wo_WorkCopy
12
+    /// </summary>
13
+    public partial class T_Wo_WorkCopy
14
+    {
15
+        public T_Wo_WorkCopy()
16
+        { }
17
+        #region  BasicMethod
18
+
19
+        /// <summary>
20
+        /// 得到最大ID
21
+        /// </summary>
22
+        public int GetMaxId()
23
+        {
24
+            return DbHelperSQL.GetMaxID("F_ID", "T_Wo_WorkCopy");
25
+        }
26
+
27
+        /// <summary>
28
+        /// 是否存在该记录
29
+        /// </summary>
30
+        public bool Exists(int F_ID)
31
+        {
32
+            StringBuilder strSql = new StringBuilder();
33
+            strSql.Append("select count(1) from T_Wo_WorkCopy");
34
+            strSql.Append(" where F_ID=@F_ID");
35
+            SqlParameter[] parameters = {
36
+                    new SqlParameter("@F_ID", SqlDbType.Int,4)
37
+            };
38
+            parameters[0].Value = F_ID;
39
+
40
+            return DbHelperSQL.Exists(strSql.ToString(), parameters);
41
+        }
42
+
43
+
44
+        /// <summary>
45
+        /// 增加一条数据
46
+        /// </summary>
47
+        public int Add(CallCenterApi.Model.T_Wo_WorkCopy model)
48
+        {
49
+            StringBuilder strSql = new StringBuilder();
50
+            strSql.Append("insert into T_Wo_WorkCopy(");
51
+            strSql.Append("F_WorkOrderID,F_State,F_CreateBy,F_CreateOn,F_SendCopyUser,F_SendCopyOn,F_Content)");
52
+            strSql.Append(" values (");
53
+            strSql.Append("@F_WorkOrderID,@F_State,@F_CreateBy,@F_CreateOn,@F_SendCopyUser,@F_SendCopyOn,@F_Content)");
54
+            strSql.Append(";select @@IDENTITY");
55
+            SqlParameter[] parameters = {
56
+                    new SqlParameter("@F_WorkOrderID", SqlDbType.Int,4),
57
+                    new SqlParameter("@F_State", SqlDbType.Int,4),
58
+                    new SqlParameter("@F_CreateBy", SqlDbType.NVarChar,50),
59
+                    new SqlParameter("@F_CreateOn", SqlDbType.DateTime),
60
+                    new SqlParameter("@F_SendCopyUser", SqlDbType.NVarChar,50),
61
+                    new SqlParameter("@F_SendCopyOn", SqlDbType.DateTime),
62
+                    new SqlParameter("@F_Content", SqlDbType.NVarChar,-1)};
63
+            parameters[0].Value = model.F_WorkOrderID;
64
+            parameters[1].Value = model.F_State;
65
+            parameters[2].Value = model.F_CreateBy;
66
+            parameters[3].Value = model.F_CreateOn;
67
+            parameters[4].Value = model.F_SendCopyUser;
68
+            parameters[5].Value = model.F_SendCopyOn;
69
+            parameters[6].Value = model.F_Content;
70
+
71
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
72
+            if (obj == null)
73
+            {
74
+                return 0;
75
+            }
76
+            else
77
+            {
78
+                return Convert.ToInt32(obj);
79
+            }
80
+        }
81
+        /// <summary>
82
+        /// 更新一条数据
83
+        /// </summary>
84
+        public bool Update(CallCenterApi.Model.T_Wo_WorkCopy model)
85
+        {
86
+            StringBuilder strSql = new StringBuilder();
87
+            strSql.Append("update T_Wo_WorkCopy set ");
88
+            strSql.Append("F_WorkOrderID=@F_WorkOrderID,");
89
+            strSql.Append("F_State=@F_State,");
90
+            strSql.Append("F_CreateBy=@F_CreateBy,");
91
+            strSql.Append("F_CreateOn=@F_CreateOn,");
92
+            strSql.Append("F_SendCopyUser=@F_SendCopyUser,");
93
+            strSql.Append("F_SendCopyOn=@F_SendCopyOn,");
94
+            strSql.Append("F_Content=@F_Content");
95
+            strSql.Append(" where F_ID=@F_ID");
96
+            SqlParameter[] parameters = {
97
+                    new SqlParameter("@F_WorkOrderID", SqlDbType.Int,4),
98
+                    new SqlParameter("@F_State", SqlDbType.Int,4),
99
+                    new SqlParameter("@F_CreateBy", SqlDbType.NVarChar,50),
100
+                    new SqlParameter("@F_CreateOn", SqlDbType.DateTime),
101
+                    new SqlParameter("@F_SendCopyUser", SqlDbType.NVarChar,50),
102
+                    new SqlParameter("@F_SendCopyOn", SqlDbType.DateTime),
103
+                    new SqlParameter("@F_Content", SqlDbType.NVarChar,-1),
104
+                    new SqlParameter("@F_ID", SqlDbType.Int,4)};
105
+            parameters[0].Value = model.F_WorkOrderID;
106
+            parameters[1].Value = model.F_State;
107
+            parameters[2].Value = model.F_CreateBy;
108
+            parameters[3].Value = model.F_CreateOn;
109
+            parameters[4].Value = model.F_SendCopyUser;
110
+            parameters[5].Value = model.F_SendCopyOn;
111
+            parameters[6].Value = model.F_Content;
112
+            parameters[7].Value = model.F_ID;
113
+
114
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
115
+            if (rows > 0)
116
+            {
117
+                return true;
118
+            }
119
+            else
120
+            {
121
+                return false;
122
+            }
123
+        }
124
+
125
+        /// <summary>
126
+        /// 删除一条数据
127
+        /// </summary>
128
+        public bool Delete(int F_ID)
129
+        {
130
+
131
+            StringBuilder strSql = new StringBuilder();
132
+            strSql.Append("delete from T_Wo_WorkCopy ");
133
+            strSql.Append(" where F_ID=@F_ID");
134
+            SqlParameter[] parameters = {
135
+                    new SqlParameter("@F_ID", SqlDbType.Int,4)
136
+            };
137
+            parameters[0].Value = F_ID;
138
+
139
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
140
+            if (rows > 0)
141
+            {
142
+                return true;
143
+            }
144
+            else
145
+            {
146
+                return false;
147
+            }
148
+        }
149
+        /// <summary>
150
+        /// 批量删除数据
151
+        /// </summary>
152
+        public bool DeleteList(string F_IDlist)
153
+        {
154
+            StringBuilder strSql = new StringBuilder();
155
+            strSql.Append("delete from T_Wo_WorkCopy ");
156
+            strSql.Append(" where F_ID in (" + F_IDlist + ")  ");
157
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
158
+            if (rows > 0)
159
+            {
160
+                return true;
161
+            }
162
+            else
163
+            {
164
+                return false;
165
+            }
166
+        }
167
+
168
+
169
+        /// <summary>
170
+        /// 得到一个对象实体
171
+        /// </summary>
172
+        public CallCenterApi.Model.T_Wo_WorkCopy GetModel(int F_ID)
173
+        {
174
+
175
+            StringBuilder strSql = new StringBuilder();
176
+            strSql.Append("select  top 1 F_ID,F_WorkOrderID,F_State,F_CreateBy,F_CreateOn,F_SendCopyUser,F_SendCopyOn,F_Content from T_Wo_WorkCopy ");
177
+            strSql.Append(" where F_ID=@F_ID");
178
+            SqlParameter[] parameters = {
179
+                    new SqlParameter("@F_ID", SqlDbType.Int,4)
180
+            };
181
+            parameters[0].Value = F_ID;
182
+
183
+            CallCenterApi.Model.T_Wo_WorkCopy model = new CallCenterApi.Model.T_Wo_WorkCopy();
184
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
185
+            if (ds.Tables[0].Rows.Count > 0)
186
+            {
187
+                return DataRowToModel(ds.Tables[0].Rows[0]);
188
+            }
189
+            else
190
+            {
191
+                return null;
192
+            }
193
+        }
194
+
195
+
196
+        /// <summary>
197
+        /// 得到一个对象实体
198
+        /// </summary>
199
+        public CallCenterApi.Model.T_Wo_WorkCopy DataRowToModel(DataRow row)
200
+        {
201
+            CallCenterApi.Model.T_Wo_WorkCopy model = new CallCenterApi.Model.T_Wo_WorkCopy();
202
+            if (row != null)
203
+            {
204
+                if (row["F_ID"] != null && row["F_ID"].ToString() != "")
205
+                {
206
+                    model.F_ID = int.Parse(row["F_ID"].ToString());
207
+                }
208
+                if (row["F_WorkOrderID"] != null && row["F_WorkOrderID"].ToString() != "")
209
+                {
210
+                    model.F_WorkOrderID = int.Parse(row["F_WorkOrderID"].ToString());
211
+                }
212
+                if (row["F_State"] != null && row["F_State"].ToString() != "")
213
+                {
214
+                    model.F_State = int.Parse(row["F_State"].ToString());
215
+                }
216
+                if (row["F_CreateBy"] != null)
217
+                {
218
+                    model.F_CreateBy = row["F_CreateBy"].ToString();
219
+                }
220
+                if (row["F_CreateOn"] != null && row["F_CreateOn"].ToString() != "")
221
+                {
222
+                    model.F_CreateOn = DateTime.Parse(row["F_CreateOn"].ToString());
223
+                }
224
+                if (row["F_SendCopyUser"] != null)
225
+                {
226
+                    model.F_SendCopyUser = row["F_SendCopyUser"].ToString();
227
+                }
228
+                if (row["F_SendCopyOn"] != null && row["F_SendCopyOn"].ToString() != "")
229
+                {
230
+                    model.F_SendCopyOn = DateTime.Parse(row["F_SendCopyOn"].ToString());
231
+                }
232
+                if (row["F_Content"] != null)
233
+                {
234
+                    model.F_Content = row["F_Content"].ToString();
235
+                }
236
+            }
237
+            return model;
238
+        }
239
+
240
+        /// <summary>
241
+        /// 获得数据列表
242
+        /// </summary>
243
+        public DataSet GetList(string strWhere)
244
+        {
245
+            StringBuilder strSql = new StringBuilder();
246
+            strSql.Append("select F_ID,F_WorkOrderID,F_State,F_CreateBy,F_CreateOn,F_SendCopyUser,F_SendCopyOn,F_Content ");
247
+            strSql.Append(" FROM T_Wo_WorkCopy ");
248
+            if (strWhere.Trim() != "")
249
+            {
250
+                strSql.Append(" where " + strWhere);
251
+            }
252
+            return DbHelperSQL.Query(strSql.ToString());
253
+        }
254
+
255
+        /// <summary>
256
+        /// 获得前几行数据
257
+        /// </summary>
258
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
259
+        {
260
+            StringBuilder strSql = new StringBuilder();
261
+            strSql.Append("select ");
262
+            if (Top > 0)
263
+            {
264
+                strSql.Append(" top " + Top.ToString());
265
+            }
266
+            strSql.Append(" F_ID,F_WorkOrderID,F_State,F_CreateBy,F_CreateOn,F_SendCopyUser,F_SendCopyOn,F_Content ");
267
+            strSql.Append(" FROM T_Wo_WorkCopy ");
268
+            if (strWhere.Trim() != "")
269
+            {
270
+                strSql.Append(" where " + strWhere);
271
+            }
272
+            strSql.Append(" order by " + filedOrder);
273
+            return DbHelperSQL.Query(strSql.ToString());
274
+        }
275
+
276
+        /// <summary>
277
+        /// 获取记录总数
278
+        /// </summary>
279
+        public int GetRecordCount(string strWhere)
280
+        {
281
+            StringBuilder strSql = new StringBuilder();
282
+            strSql.Append("select count(1) FROM T_Wo_WorkCopy ");
283
+            if (strWhere.Trim() != "")
284
+            {
285
+                strSql.Append(" where " + strWhere);
286
+            }
287
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
288
+            if (obj == null)
289
+            {
290
+                return 0;
291
+            }
292
+            else
293
+            {
294
+                return Convert.ToInt32(obj);
295
+            }
296
+        }
297
+        /// <summary>
298
+        /// 分页获取数据列表
299
+        /// </summary>
300
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
301
+        {
302
+            StringBuilder strSql = new StringBuilder();
303
+            strSql.Append("SELECT * FROM ( ");
304
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
305
+            if (!string.IsNullOrEmpty(orderby.Trim()))
306
+            {
307
+                strSql.Append("order by T." + orderby);
308
+            }
309
+            else
310
+            {
311
+                strSql.Append("order by T.F_ID desc");
312
+            }
313
+            strSql.Append(")AS Row, T.*  from T_Wo_WorkCopy T ");
314
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
315
+            {
316
+                strSql.Append(" WHERE " + strWhere);
317
+            }
318
+            strSql.Append(" ) TT");
319
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
320
+            return DbHelperSQL.Query(strSql.ToString());
321
+        }
322
+
323
+        /*
324
+		/// <summary>
325
+		/// 分页获取数据列表
326
+		/// </summary>
327
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
328
+		{
329
+			SqlParameter[] parameters = {
330
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
331
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
332
+					new SqlParameter("@PageSize", SqlDbType.Int),
333
+					new SqlParameter("@PageIndex", SqlDbType.Int),
334
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
335
+					new SqlParameter("@OrderType", SqlDbType.Bit),
336
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
337
+					};
338
+			parameters[0].Value = "T_Wo_WorkCopy";
339
+			parameters[1].Value = "F_ID";
340
+			parameters[2].Value = PageSize;
341
+			parameters[3].Value = PageIndex;
342
+			parameters[4].Value = 0;
343
+			parameters[5].Value = 0;
344
+			parameters[6].Value = strWhere;	
345
+			return CallCenterApi.RunProcedure("UP_GetRecordByPage",parameters,"ds");
346
+		}*/
347
+
348
+        #endregion  BasicMethod
349
+        #region  ExtensionMethod
350
+
351
+        #endregion  ExtensionMethod
352
+    }
353
+}
354
+

+ 17 - 6
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrderItem_New.cs

@@ -41,9 +41,9 @@ namespace CallCenterApi.DAL
41 41
         {
42 42
             StringBuilder strSql = new StringBuilder();
43 43
             strSql.Append("insert into T_Wo_WorkOrderItem_New(");
44
-            strSql.Append("F_WoID,F_WoState,F_ItemType,F_OptType,F_OptContent,F_NextUser,F_NextDept,F_IsUsed,F_LimitTime,F_IsSMS,F_SMSToUser,F_SMSToPhone,F_SMSContent,F_CreateUser,F_CreateTime)");
44
+            strSql.Append("F_WoID,F_WoState,F_ItemType,F_OptType,F_OptContent,F_NextUser,F_NextDept,F_IsUsed,F_LimitTime,F_IsSMS,F_SMSToUser,F_SMSToPhone,F_SMSContent,F_CreateUser,F_CreateTime,F_LastTime)");
45 45
             strSql.Append(" values (");
46
-            strSql.Append("@F_WoID,@F_WoState,@F_ItemType,@F_OptType,@F_OptContent,@F_NextUser,@F_NextDept,@F_IsUsed,@F_LimitTime,@F_IsSMS,@F_SMSToUser,@F_SMSToPhone,@F_SMSContent,@F_CreateUser,@F_CreateTime)");
46
+            strSql.Append("@F_WoID,@F_WoState,@F_ItemType,@F_OptType,@F_OptContent,@F_NextUser,@F_NextDept,@F_IsUsed,@F_LimitTime,@F_IsSMS,@F_SMSToUser,@F_SMSToPhone,@F_SMSContent,@F_CreateUser,@F_CreateTime,@F_LastTime)");
47 47
             strSql.Append(";select @@IDENTITY");
48 48
             SqlParameter[] parameters = {
49 49
                     new SqlParameter("@F_WoID", SqlDbType.BigInt,8),
@@ -60,7 +60,9 @@ namespace CallCenterApi.DAL
60 60
                     new SqlParameter("@F_SMSToPhone", SqlDbType.VarChar,50),
61 61
                     new SqlParameter("@F_SMSContent", SqlDbType.NText),
62 62
                     new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
63
-                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime)};
63
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
64
+                     new SqlParameter("@F_LastTime", SqlDbType.DateTime)
65
+            };
64 66
             parameters[0].Value = model.F_WoID;
65 67
             parameters[1].Value = model.F_WoState;
66 68
             parameters[2].Value = model.F_ItemType;
@@ -76,7 +78,8 @@ namespace CallCenterApi.DAL
76 78
             parameters[12].Value = model.F_SMSContent;
77 79
             parameters[13].Value = model.F_CreateUser;
78 80
             parameters[14].Value = model.F_CreateTime;
79
-
81
+            parameters[15].Value = model.F_LastTime;
82
+            
80 83
             object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
81 84
             if (obj == null)
82 85
             {
@@ -108,7 +111,8 @@ namespace CallCenterApi.DAL
108 111
             strSql.Append("F_SMSToPhone=@F_SMSToPhone,");
109 112
             strSql.Append("F_SMSContent=@F_SMSContent,");
110 113
             strSql.Append("F_CreateUser=@F_CreateUser,");
111
-            strSql.Append("F_CreateTime=@F_CreateTime");
114
+            strSql.Append("F_CreateTime=@F_CreateTime,");
115
+            strSql.Append("F_LastTime=@F_LastTime");
112 116
             strSql.Append(" where F_ID=@F_ID");
113 117
             SqlParameter[] parameters = {
114 118
                     new SqlParameter("@F_WoID", SqlDbType.BigInt,8),
@@ -126,6 +130,7 @@ namespace CallCenterApi.DAL
126 130
                     new SqlParameter("@F_SMSContent", SqlDbType.NText),
127 131
                     new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
128 132
                     new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
133
+                    new SqlParameter("@F_LastTime", SqlDbType.DateTime),
129 134
                     new SqlParameter("@F_ID", SqlDbType.BigInt,8)};
130 135
             parameters[0].Value = model.F_WoID;
131 136
             parameters[1].Value = model.F_WoState;
@@ -142,7 +147,8 @@ namespace CallCenterApi.DAL
142 147
             parameters[12].Value = model.F_SMSContent;
143 148
             parameters[13].Value = model.F_CreateUser;
144 149
             parameters[14].Value = model.F_CreateTime;
145
-            parameters[15].Value = model.F_ID;
150
+            parameters[15].Value = model.F_LastTime;
151
+            parameters[16].Value = model.F_ID;
146 152
 
147 153
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
148 154
             if (rows > 0)
@@ -298,6 +304,11 @@ namespace CallCenterApi.DAL
298 304
                 {
299 305
                     model.F_CreateTime = DateTime.Parse(row["F_CreateTime"].ToString());
300 306
                 }
307
+                if (row["F_LastTime"] != null && row["F_LastTime"].ToString() != "")
308
+                {
309
+                    model.F_LastTime = DateTime.Parse(row["F_LastTime"].ToString());
310
+                }
311
+                
301 312
             }
302 313
             return model;
303 314
         }

+ 30 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/CallCenterApi.Interface.csproj

@@ -158,6 +158,28 @@
158 158
     </Reference>
159 159
   </ItemGroup>
160 160
   <ItemGroup>
161
+    <Content Include="bin\ICSharpCode.SharpZipLib.dll" />
162
+    <Content Include="bin\Microsoft.AI.Agent.Intercept.dll" />
163
+    <Content Include="bin\Microsoft.AI.DependencyCollector.dll" />
164
+    <Content Include="bin\Microsoft.AI.PerfCounterCollector.dll" />
165
+    <Content Include="bin\Microsoft.AI.ServerTelemetryChannel.dll" />
166
+    <Content Include="bin\Microsoft.AI.Web.dll" />
167
+    <Content Include="bin\Microsoft.AI.WindowsServer.dll" />
168
+    <Content Include="bin\Microsoft.ApplicationInsights.dll" />
169
+    <Content Include="bin\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll" />
170
+    <Content Include="bin\Microsoft.Web.Infrastructure.dll" />
171
+    <Content Include="bin\NPOI.dll" />
172
+    <Content Include="bin\NPOI.OOXML.dll" />
173
+    <Content Include="bin\NPOI.OpenXml4Net.dll" />
174
+    <Content Include="bin\NPOI.OpenXmlFormats.dll" />
175
+    <Content Include="bin\Senparc.Weixin.dll" />
176
+    <Content Include="bin\Senparc.Weixin.MP.dll" />
177
+    <Content Include="bin\System.Web.Helpers.dll" />
178
+    <Content Include="bin\System.Web.Mvc.dll" />
179
+    <Content Include="bin\System.Web.Razor.dll" />
180
+    <Content Include="bin\System.Web.Webpages.Deployment.dll" />
181
+    <Content Include="bin\System.Web.Webpages.dll" />
182
+    <Content Include="bin\System.Web.Webpages.Razor.dll" />
161 183
     <Content Include="Global.asax" />
162 184
     <Content Include="Lib\Senparc.Weixin.dll" />
163 185
     <Content Include="Lib\Senparc.Weixin.MP.dll" />
@@ -297,6 +319,9 @@
297 319
     <Compile Include="Models\Input\WoBillInput.cs" />
298 320
     <Compile Include="Models\Input\WoMaterialManageInput.cs" />
299 321
     <Compile Include="Models\Input\WorkOrderNewInput.cs" />
322
+    <Compile Include="obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs" />
323
+    <Compile Include="obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs" />
324
+    <Compile Include="obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs" />
300 325
     <Compile Include="Properties\AssemblyInfo.cs" />
301 326
   </ItemGroup>
302 327
   <ItemGroup>
@@ -316,6 +341,9 @@
316 341
     <Content Include="ExcelData\CustomerList_Mod.xls" />
317 342
     <Content Include="ExcelMod\KnowledgeInformation.xls" />
318 343
     <Content Include="ExcelMod\CustomerList_Excel.xls" />
344
+    <Content Include="obj\Debug\CallCenterApi.Interface.csproj.CoreCompileInputs.cache" />
345
+    <Content Include="obj\Debug\CallCenterApi.Interface.csprojAssemblyReference.cache" />
346
+    <Content Include="obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache" />
319 347
     <None Include="Properties\PublishProfiles\1q.pubxml" />
320 348
     <None Include="Properties\PublishProfiles\Autobio_API.pubxml" />
321 349
     <None Include="Properties\PublishProfiles\ddr.pubxml" />
@@ -324,6 +352,7 @@
324 352
     <None Include="Properties\PublishProfiles\sycw.pubxml" />
325 353
     <None Include="Properties\PublishProfiles\tt.pubxml" />
326 354
     <None Include="Properties\PublishProfiles\XiXianSZCG_API.pubxml" />
355
+    <Content Include="qcloudsms_csharp.nuspec" />
327 356
     <None Include="Web.Debug.config">
328 357
       <DependentUpon>Web.config</DependentUpon>
329 358
       <SubType>Designer</SubType>
@@ -335,6 +364,7 @@
335 364
   </ItemGroup>
336 365
   <ItemGroup>
337 366
     <Folder Include="App_Data\" />
367
+    <Folder Include="obj\Debug\TempPE\" />
338 368
   </ItemGroup>
339 369
   <ItemGroup>
340 370
     <ProjectReference Include="..\..\..\CallCenterCommon\CallCenter.Utility\CallCenter.Utility.csproj">

+ 46 - 20
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WOReportController.cs

@@ -114,7 +114,7 @@ namespace CallCenterApi.Interface.Controllers.report
114 114
             dt.Columns.Add("合计");
115 115
             dt.Columns.Add("即时办结率");
116 116
            
117
-            for (int i = 0; i < 8; i++)
117
+            for (int i = 0; i < 9; i++)
118 118
             {
119 119
                 DataRow drNew = dt.NewRow();
120 120
                 switch (i)
@@ -135,31 +135,34 @@ namespace CallCenterApi.Interface.Controllers.report
135 135
                         drNew["反馈类型"] = "建议";
136 136
                         break;
137 137
                     case 5:
138
-                        drNew["反馈类型"] = "超期数量";
138
+                        drNew["反馈类型"] = "业务协办";
139 139
                         break;
140 140
                     case 6:
141
-                        drNew["反馈类型"] = "满意数量";
141
+                        drNew["反馈类型"] = "超期数量";
142 142
                         break;
143 143
                     case 7:
144
+                        drNew["反馈类型"] = "满意数量";
145
+                        break;
146
+                    case 8:
144 147
                         drNew["反馈类型"] = "不满意数量";
145 148
                         break;
146 149
                 }
147 150
                 string nsg = "";
148
-                if (i > 0&& i<5)
151
+                if (i > 0&& i<6)
149 152
                 {
150 153
                     nsg = "and F_Type=" + i;
151 154
                 }
152
-              else   if (i > 4)
155
+              else   if (i > 5)
153 156
                 {
154
-                    if (i ==5)
157
+                    if (i ==6)
155 158
                     {
156 159
                         nsg = " and F_IsOver=" + 1 ;
157 160
                     }
158
-                   else  if (i == 6)
161
+                   else  if (i == 7)
159 162
                     {
160 163
                         nsg = "and F_VisitResult in('非常满意','满意')";
161 164
                     }
162
-                    else if (i == 7)
165
+                    else if (i == 8)
163 166
                     {
164 167
                         nsg = "and F_VisitResult='不满意'";
165 168
                     }
@@ -215,7 +218,7 @@ namespace CallCenterApi.Interface.Controllers.report
215 218
             List<marketList> markets = new List<marketList>();
216 219
 
217 220
 
218
-            for (int i = 0; i < 8; i++)
221
+            for (int i = 0; i < 9; i++)
219 222
             {
220 223
                 marketList brand = new marketList();
221 224
                 switch (i)
@@ -236,31 +239,34 @@ namespace CallCenterApi.Interface.Controllers.report
236 239
                         brand.typename = "建议";
237 240
                         break;
238 241
                     case 5:
239
-                        brand.typename = "超期数量";
242
+                        brand.typename = "业务协办";
240 243
                         break;
241 244
                     case 6:
242
-                        brand.typename = "满意数量";
245
+                        brand.typename = "超期数量";
243 246
                         break;
244 247
                     case 7:
248
+                        brand.typename = "满意数量";
249
+                        break;
250
+                    case 8:
245 251
                         brand.typename = "不满意数量";
246 252
                         break;
247 253
                 }
248 254
                 string nsg = "";
249
-                if (i > 0 && i < 5)
255
+                if (i > 0 && i < 6)
250 256
                 {
251 257
                     nsg = "and F_Type=" + i;
252 258
                 }
253
-                else if (i > 4)
259
+                else if (i > 5)
254 260
                 {
255
-                    if (i == 5)
261
+                    if (i == 6)
256 262
                     {
257 263
                         nsg = " and F_IsOver=" + 1;
258 264
                     }
259
-                    else if (i == 6)
265
+                    else if (i == 7)
260 266
                     {
261 267
                         nsg = "and F_VisitResult in('非常满意','满意')";
262 268
                     }
263
-                    else if (i == 7)
269
+                    else if (i == 8)
264 270
                     {
265 271
                         nsg = "and F_VisitResult='不满意'";
266 272
                     }
@@ -1383,10 +1389,14 @@ namespace CallCenterApi.Interface.Controllers.report
1383 1389
                 {
1384 1390
                     drNew["反馈类型"] = "抽检";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
1385 1391
                 }
1386
-                else
1392
+                else if (it.F_Type == "4")
1387 1393
                 {
1388 1394
                     drNew["反馈类型"] = "建议及其他";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
1389 1395
                 }
1396
+                else if (it.F_Type == "5")
1397
+                {
1398
+                    drNew["反馈类型"] = "业务协办";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
1399
+                }
1390 1400
                 drNew["销售基地"] = it.F_SalesBase;//销售基地:新乡、新疆、九江、东北、其他(其它手动输入别的点选)
1391 1401
                 drNew["创建时间"] = it.F_CreateOn.ToString();
1392 1402
                 if (it .F_Type !="3")
@@ -2888,7 +2898,7 @@ namespace CallCenterApi.Interface.Controllers.report
2888 2898
             }
2889 2899
             string sdaytime = DateTime.Now.Date.ToString("yyyy-MM-dd 00:00:00");
2890 2900
             
2891
-            for (int i = 1; i <= 5; i++)
2901
+            for (int i = 1; i <= 6; i++)
2892 2902
             {
2893 2903
                 Feedback model = new Feedback();
2894 2904
                     switch (i)
@@ -2906,11 +2916,15 @@ namespace CallCenterApi.Interface.Controllers.report
2906 2916
                             model.name = "建议";
2907 2917
                             break;
2908 2918
                         case 5:
2919
+                        model.name = "业务协办";
2920
+                        break;
2921
+                       case 6:
2909 2922
                             model.name = "合计";
2910 2923
                             break;
2924
+
2911 2925
                     }
2912 2926
                float a= workOrder.GetModelList(sql ).Count;
2913
-                if (i <5)
2927
+                if (i <6)
2914 2928
                 {
2915 2929
                    
2916 2930
                   model .daynumber = workOrder.GetModelList(sql + $" and datediff(day,F_CreateOn,'{sdaytime}')<=0 and datediff(day,F_CreateOn,'{endtime}')>=0 "  + "and F_Type=" + i ).Count;
@@ -3257,6 +3271,10 @@ namespace CallCenterApi.Interface.Controllers.report
3257 3271
                                 {
3258 3272
                                     worker.F_Type = "抽检";
3259 3273
                                 }
3274
+                                else if (it.F_Type == "5")
3275
+                                {
3276
+                                    worker.F_Type = "业务协办";
3277
+                                }
3260 3278
                                 else
3261 3279
                                 {
3262 3280
                                     worker.F_Type = "建议及其他";
@@ -3502,6 +3520,10 @@ namespace CallCenterApi.Interface.Controllers.report
3502 3520
                                         {
3503 3521
                                             worker.F_Type = "抽检";
3504 3522
                                         }
3523
+                                        else if (it.F_Type == "5")
3524
+                                        {
3525
+                                            worker.F_Type = "业务协办";
3526
+                                        }
3505 3527
                                         else
3506 3528
                                         {
3507 3529
                                             worker.F_Type = "建议及其他";
@@ -4112,10 +4134,14 @@ namespace CallCenterApi.Interface.Controllers.report
4112 4134
                     {
4113 4135
                         model.Type = "抽检";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
4114 4136
                     }
4115
-                    else
4137
+                    else if (model1[i].F_Type == "4")
4116 4138
                     {
4117 4139
                         model.Type = "建议及其他";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
4118 4140
                     }
4141
+                    else if (model1[i].F_Type == "5")
4142
+                    {
4143
+                        model.Type = "业务协办";//
4144
+                    }
4119 4145
                     model.SalesBase = model1[i].F_SalesBase;//销售基地:新乡、新疆、九江、东北、其他(其它手动输入别的点选)
4120 4146
                     model.CreatOn = model1[i].F_CreateOn .ToString ();
4121 4147
                     if (model1[i].F_Type !="3")

+ 18 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -2237,6 +2237,10 @@ namespace CallCenterApi.Interface.Controllers.weixin
2237 2237
             {
2238 2238
                 smscont = "抽检";
2239 2239
             }
2240
+            else if (type == "5")
2241
+            {
2242
+              smscont  = "业务协办";
2243
+            }
2240 2244
             else
2241 2245
             {
2242 2246
                 smscont = "建议";
@@ -2839,6 +2843,10 @@ namespace CallCenterApi.Interface.Controllers.weixin
2839 2843
                     {
2840 2844
                         model.F_TypeName = "抽检";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
2841 2845
                     }
2846
+                    else if (model1[i].F_Type == "5")
2847
+                    {
2848
+                        model.F_TypeName = "业务协办";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
2849
+                    }
2842 2850
                     else
2843 2851
                     {
2844 2852
                         model.F_TypeName = "建议及其他";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
@@ -4486,6 +4494,10 @@ namespace CallCenterApi.Interface.Controllers.weixin
4486 4494
             {
4487 4495
                 smscont = "抽检";
4488 4496
             }
4497
+            else if (model.F_Type == "5")
4498
+            {
4499
+                smscont = "业务协办";
4500
+            }
4489 4501
             else
4490 4502
             {
4491 4503
                 smscont = "建议";
@@ -5443,6 +5455,10 @@ namespace CallCenterApi.Interface.Controllers.weixin
5443 5455
                 {
5444 5456
                     smscont = "抽检";
5445 5457
                 }
5458
+                else if (model.F_Type == "5")
5459
+                {
5460
+                    smscont = "业务协办";
5461
+                }
5446 5462
                 else
5447 5463
                 {
5448 5464
                     smscont = "建议";
@@ -5996,7 +6012,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
5996 6012
             var itemlast = itembll.GetModelList(" isnull(F_IsUsed,'0')='0' and F_ItemType=" + itemtype + " and  F_WoID=" + woid + " ");
5997 6013
             if (F_IsUsed == 0)
5998 6014
             {
5999
-                if (itemlast.Count > 0)
6015
+                if (itemlast !=null&&itemlast.Count > 0)
6000 6016
                 {
6001 6017
                     foreach (var it in itemlast)
6002 6018
                     {
@@ -6004,6 +6020,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
6004 6020
                         it.F_LimitTime = overtime.ToString();
6005 6021
                         itembll.Update(it);
6006 6022
                     }
6023
+                    itemModel.F_LastTime = itemlast.LastOrDefault().F_CreateTime;
6007 6024
                 }
6008 6025
             }
6009 6026
 

+ 147 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -525,6 +525,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
525 525
                         }
526 526
                         sql += $" and F_State in(10," + (int)EnumWorkOrderState.evaluate + ")"; ;
527 527
                         break;
528
+                    case 20:
529
+                        sql += $"  and T_Wo_WorkOrder.F_ID in (select F_WorkOrderID from T_Wo_WorkCopy where F_SendCopyUser='"+userId +"') "; ;
530
+                        break;
531
+                      
528 532
                 }
529 533
                 #endregion
530 534
                 int recordCount = 0;
@@ -2184,6 +2188,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2184 2188
                 log.F_SMSToPhone = it.F_SMSToPhone;
2185 2189
                 log.F_SMSContent = it.F_SMSContent;
2186 2190
                 log.F_CreateTime = it.F_CreateTime;
2191
+                log.F_LastTime = it.F_LastTime;
2187 2192
                 string username = "";
2188 2193
                 if (!string.IsNullOrEmpty (it .F_CreateUser ))
2189 2194
                 {
@@ -2208,6 +2213,38 @@ namespace CallCenterApi.Interface.Controllers.workorder
2208 2213
                     }
2209 2214
                   
2210 2215
                 }
2216
+
2217
+                var configlist = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='NodeLimit' ");
2218
+                if (configlist != null&& configlist.Count ()>0)
2219
+                {
2220
+                  var  config = configlist.FirstOrDefault();
2221
+                    try
2222
+                    {
2223
+                        if (log.F_LastTime !=null )
2224
+                        {
2225
+                            DateTime t = log.F_LastTime.Value.AddHours(int.Parse(config.F_ParamValue));
2226
+                            TimeSpan ts = log.F_CreateTime.Value  .Subtract(t);
2227
+                            double tss = double.Parse(Math.Round(ts.TotalSeconds, 0).ToString());
2228
+                            if (tss < 0) { tss = -tss; }
2229
+                            string gshsj = DateTimeConvert.parseTimeSeconds(tss, 1);
2230
+                            if (t > log.F_CreateTime )
2231
+                            {
2232
+                                log.Timeout = "剩余"+ gshsj;
2233
+                            }
2234
+                            else
2235
+                            {
2236
+                                log.Timeout = "超时" + gshsj;
2237
+                            }
2238
+                        }
2239
+                    }
2240
+                    catch
2241
+                    {
2242
+
2243
+                    }
2244
+
2245
+                }
2246
+
2247
+
2211 2248
                 Modellist.Add(log);
2212 2249
             }
2213 2250
             return Modellist;
@@ -2672,6 +2709,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
2672 2709
                             {
2673 2710
                                 drNew["工单类型"] = "抽检";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
2674 2711
                             }
2712
+                            else if (it.F_Type == "5")
2713
+                            {
2714
+                                drNew["工单类型"] = "业务协办";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
2715
+                            }
2675 2716
                             else
2676 2717
                             {
2677 2718
                                 drNew["工单类型"] = "建议及其他";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
@@ -3291,6 +3332,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
3291 3332
                             {
3292 3333
                                 drNew["工单类型"] = "抽检";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
3293 3334
                             }
3335
+                            else if (it.F_Type == "5")
3336
+                            {
3337
+                                drNew["工单类型"] = "业务协办";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
3338
+                            }
3294 3339
                             else
3295 3340
                             {
3296 3341
                                 drNew["工单类型"] = "建议及其他";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
@@ -4146,6 +4191,80 @@ namespace CallCenterApi.Interface.Controllers.workorder
4146 4191
             return true;
4147 4192
         }
4148 4193
         /// <summary>
4194
+        /// 抄送工单
4195
+        /// </summary>
4196
+        /// <param name="id"></param>
4197
+        /// <param name="content"></param>
4198
+        /// <param name="user"></param>
4199
+        /// <returns></returns>
4200
+        [Authority]
4201
+        public ActionResult SendCopy(int id=0,string content="" ,int user=0)
4202
+        {
4203
+
4204
+            int userId = CurrentUser.UserData.F_UserId;
4205
+            if (userId != 0)
4206
+            {
4207
+                Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
4208
+                if (id <= 0)
4209
+                    return Error("请选择工单");
4210
+                if (user <= 0)
4211
+                    return Error("请选择抄送人");
4212
+                var model = workOrder.GetModel(id);
4213
+                if (model != null)
4214
+                {
4215
+                    Model.T_Sys_UserAccount clus = sysUserAccountBll.GetModel(user);
4216
+                    if (clus != null)
4217
+                    {
4218
+                        Model.T_Wo_WorkCopy t_Wo_WorkCopy = new Model.T_Wo_WorkCopy();
4219
+                        t_Wo_WorkCopy.F_WorkOrderID = model.F_ID;
4220
+                        t_Wo_WorkCopy.F_CreateOn = DateTime.Now;
4221
+                        t_Wo_WorkCopy.F_Content = content;
4222
+                        t_Wo_WorkCopy.F_CreateBy = ua.F_UserId.ToString();
4223
+                        t_Wo_WorkCopy.F_SendCopyOn = DateTime.Now;
4224
+                        t_Wo_WorkCopy.F_SendCopyUser = clus.F_UserId.ToString();
4225
+                        t_Wo_WorkCopy.F_State = model.F_State;
4226
+                        string deptname = "", deptname1 = "";
4227
+                        var dept = new BLL.T_Sys_Department().GetModel(clus.F_DeptId);
4228
+                        if (dept != null)
4229
+                            deptname = dept.F_DeptName;
4230
+
4231
+                        var dept1 = new BLL.T_Sys_Department().GetModel(ua .F_DeptId);
4232
+                        if (dept1 != null)
4233
+                            deptname1 = dept1.F_DeptName;
4234
+                        if (new BLL.T_Wo_WorkCopy().Add(t_Wo_WorkCopy) > 0)
4235
+                        {
4236
+                            int sms = 0;
4237
+                            if (!string.IsNullOrEmpty(clus.F_Mobile))
4238
+                            {
4239
+                                sms = 1;
4240
+                                //发送短信
4241
+                            }
4242
+                            string message = "抄送工单给"+ deptname + clus.F_UserName + "(" + clus.F_WorkNumber + ")";
4243
+                            if (!string.IsNullOrEmpty(content))
4244
+                                message = ",抄送内容:" + content;
4245
+                            AddLog(model.F_ID, model.F_State.Value, deptname1 + ua .F_UserName + "(" + ua.F_WorkNumber + ")" + message, (int)EnumItemType.Copy, (int)EnumItemOpt.Copy, "", 0, ua, 0, 0, "", 1);
4246
+                            return Success("抄送成功");
4247
+                        }
4248
+                        else
4249
+                            return Error("抄送失败");
4250
+                    }
4251
+                    else
4252
+                        return Error("抄送人不存在");
4253
+                }
4254
+                else
4255
+                    return Error("工单不存在");
4256
+
4257
+            }
4258
+
4259
+            else
4260
+            {
4261
+                return Error("无操作权限!");
4262
+            }
4263
+        }
4264
+
4265
+
4266
+
4267
+        /// <summary>
4149 4268
         /// 获取催办工单列表
4150 4269
         /// </summary>
4151 4270
         /// <returns></returns>
@@ -5159,6 +5278,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
5159 5278
                     {
5160 5279
                         model.F_TypeName = "抽检";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
5161 5280
                     }
5281
+                    else if (model1[i].F_Type == "5")
5282
+                    {
5283
+                        model.F_TypeName = "业务协办";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
5284
+                    }
5162 5285
                     else
5163 5286
                     {
5164 5287
                         model.F_TypeName = "建议及其他";//工单类型:咨询及需求、投诉、抽检、其他(其它手动输入别的点选)
@@ -5993,14 +6116,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
5993 6116
             var itemlast = itembll.GetModelList(" isnull(F_IsUsed,'0')='0' and F_ItemType=" + itemtype + " and  F_WoID=" + woid + " ");
5994 6117
             if (F_IsUsed==0)
5995 6118
             {
5996
-                if (itemlast.Count > 0)
6119
+                if (itemlast != null&& itemlast.Count > 0)
5997 6120
                 {
5998 6121
                     foreach (var it in itemlast)
5999 6122
                     {
6000 6123
                         it.F_IsUsed = 1;
6001 6124
                         it.F_LimitTime = overtime.ToString();
6125
+                        
6002 6126
                         itembll.Update(it);
6003 6127
                     }
6128
+                    itemModel.F_LastTime = itemlast.LastOrDefault().F_CreateTime; 
6004 6129
                 }
6005 6130
             }
6006 6131
           
@@ -6414,6 +6539,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
6414 6539
                 {
6415 6540
                     smscont = "抽检";
6416 6541
                 }
6542
+                else if (model.F_Type == "5")
6543
+                {
6544
+                    smscont = "业务协办";
6545
+                }
6417 6546
                 else
6418 6547
                 {
6419 6548
                     smscont = "建议";
@@ -7391,6 +7520,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
7391 7520
                 {
7392 7521
                     smscont = "抽检";
7393 7522
                 }
7523
+                else if (model.F_Type == "5")
7524
+                {
7525
+                    smscont = "业务协办";
7526
+                }
7394 7527
                 else
7395 7528
                 {
7396 7529
                     smscont = "建议";
@@ -7971,6 +8104,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
7971 8104
             {
7972 8105
                 smscont = "抽检";
7973 8106
             }
8107
+            else if (type == "5")
8108
+            {
8109
+                smscont = "业务协办";
8110
+            }
7974 8111
             else
7975 8112
             {
7976 8113
                 smscont = "建议";
@@ -8004,6 +8141,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
8004 8141
             {
8005 8142
                 smscont = "抽检";
8006 8143
             }
8144
+            else if (model.F_Type == "5")
8145
+            {
8146
+                smscont = "业务协办";
8147
+            }
8007 8148
             else
8008 8149
             {
8009 8150
                 smscont = "建议";
@@ -8504,4 +8645,9 @@ public class ItemListLog
8504 8645
         set;
8505 8646
         get;
8506 8647
     }
8648
+    public DateTime ? F_LastTime
8649
+    {
8650
+        set;get;
8651
+    }
8652
+    public string Timeout { set; get; }
8507 8653
 }

+ 4 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Enum/EnumWorkOrderState.cs

@@ -65,6 +65,8 @@ namespace CallCenterApi.Interface.Models.Enum
65 65
         audit = 7,
66 66
         [Description("延期")]
67 67
          Delay = 8,
68
+        [Description("抄送")]
69
+        Copy = 9,
68 70
     }
69 71
     /// <summary>
70 72
     /// 工单记录操作
@@ -103,6 +105,8 @@ namespace CallCenterApi.Interface.Models.Enum
103 105
         Delay,
104 106
        [Description("撤回")]
105 107
         revoke,
108
+       [Description("抄送")]
109
+        Copy
106 110
 
107 111
     }
108 112
 }

+ 1 - 0
codegit/CallCenterApi/CallCenterApi.Model/CallCenterApi.Model.csproj

@@ -123,6 +123,7 @@
123 123
     <Compile Include="T_Wo_BusinessManage.cs" />
124 124
     <Compile Include="T_Wo_MaterialManage.cs" />
125 125
     <Compile Include="T_Wo_QuestionManage.cs" />
126
+    <Compile Include="T_Wo_WorkCopy.cs" />
126 127
     <Compile Include="T_Wo_WorkOrder.cs" />
127 128
     <Compile Include="T_Wo_WorkOrderItem_New.cs" />
128 129
     <Compile Include="T_Wo_WorkOrderTimeOut.cs" />

+ 90 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkCopy.cs

@@ -0,0 +1,90 @@
1
+
2
+using System;
3
+namespace CallCenterApi.Model
4
+{
5
+    /// <summary>
6
+    /// T_Wo_WorkCopy:实体类(属性说明自动提取数据库字段的描述信息)
7
+    /// </summary>
8
+    [Serializable]
9
+    public partial class T_Wo_WorkCopy
10
+    {
11
+        public T_Wo_WorkCopy()
12
+        { }
13
+        #region Model
14
+        private int _f_id;
15
+        private int? _f_workorderid;
16
+        private int? _f_state;
17
+        private string _f_createby;
18
+        private DateTime? _f_createon;
19
+        private string _f_sendcopyuser;
20
+        private DateTime? _f_sendcopyon;
21
+        private string _f_content;
22
+        /// <summary>
23
+        /// 
24
+        /// </summary>
25
+        public int F_ID
26
+        {
27
+            set { _f_id = value; }
28
+            get { return _f_id; }
29
+        }
30
+        /// <summary>
31
+        /// 工单id
32
+        /// </summary>
33
+        public int? F_WorkOrderID
34
+        {
35
+            set { _f_workorderid = value; }
36
+            get { return _f_workorderid; }
37
+        }
38
+        /// <summary>
39
+        /// 工单状态
40
+        /// </summary>
41
+        public int? F_State
42
+        {
43
+            set { _f_state = value; }
44
+            get { return _f_state; }
45
+        }
46
+        /// <summary>
47
+        /// 添加人
48
+        /// </summary>
49
+        public string F_CreateBy
50
+        {
51
+            set { _f_createby = value; }
52
+            get { return _f_createby; }
53
+        }
54
+        /// <summary>
55
+        /// 添加时间
56
+        /// </summary>
57
+        public DateTime? F_CreateOn
58
+        {
59
+            set { _f_createon = value; }
60
+            get { return _f_createon; }
61
+        }
62
+        /// <summary>
63
+        /// 抄送人id
64
+        /// </summary>
65
+        public string F_SendCopyUser
66
+        {
67
+            set { _f_sendcopyuser = value; }
68
+            get { return _f_sendcopyuser; }
69
+        }
70
+        /// <summary>
71
+        /// 抄送时间
72
+        /// </summary>
73
+        public DateTime? F_SendCopyOn
74
+        {
75
+            set { _f_sendcopyon = value; }
76
+            get { return _f_sendcopyon; }
77
+        }
78
+        /// <summary>
79
+        /// 抄送内容
80
+        /// </summary>
81
+        public string F_Content
82
+        {
83
+            set { _f_content = value; }
84
+            get { return _f_content; }
85
+        }
86
+        #endregion Model
87
+
88
+    }
89
+}
90
+

+ 4 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrderItem_New.cs

@@ -159,6 +159,10 @@ namespace CallCenterApi.Model
159 159
             set { _f_createtime = value; }
160 160
             get { return _f_createtime; }
161 161
         }
162
+        /// <summary>
163
+        /// 上个节点时间
164
+        /// </summary>
165
+        public DateTime ? F_LastTime { set; get; }
162 166
         #endregion Model
163 167
     }
164 168
 }

+ 12 - 12
codegit/CallCenterCommon/CallCenter.Utility/Time/DateTimeConvert.cs

@@ -172,16 +172,16 @@ namespace CallCenter.Utility
172 172
         ///<param name="t">秒数</param>
173 173
         ///<param name="type">0:转换后带秒,1:转换后不带秒</param>
174 174
         ///<returns>几天几小时几分几秒</returns>
175
-        public static string parseTimeSeconds(int t, int type)
175
+        public static string parseTimeSeconds(double t, double type)
176 176
         {
177 177
             string r = "";
178
-            int day, hour, minute, second;
178
+            double day, hour, minute, second;
179 179
             if (t >= 86400) //天,
180 180
             {
181
-                day = Convert.ToInt32(t / 86400);
182
-                hour = Convert.ToInt32((t % 86400) / 3600);
183
-                minute = Convert.ToInt32((t % 86400 % 3600) / 60);
184
-                second = Convert.ToInt32(t % 86400 % 3600 % 60);
181
+                day = Convert.ToInt32(Math.Floor(t / 86400));
182
+                hour = Convert.ToInt32(Math.Floor((t % 86400) / 3600));
183
+                minute = Convert.ToInt32(Math.Floor((t % 86400 % 3600) / 60));
184
+                second = Convert.ToInt32(Math.Floor(t % 86400 % 3600 % 60));
185 185
                 if (type == 0)
186 186
                     r = day + ("天") + hour + ("小时") + minute + ("分") + second + ("秒");
187 187
                 else
@@ -190,9 +190,9 @@ namespace CallCenter.Utility
190 190
             }
191 191
             else if (t >= 3600)//时,
192 192
             {
193
-                hour = Convert.ToInt32(t / 3600);
194
-                minute = Convert.ToInt32((t % 3600) / 60);
195
-                second = Convert.ToInt32(t % 3600 % 60);
193
+                hour = Convert.ToInt32(Math.Floor(t / 3600));
194
+                minute = Convert.ToInt32(Math.Floor((t % 3600) / 60));
195
+                second = Convert.ToInt32(Math.Floor(t % 3600 % 60));
196 196
                 if (type == 0)
197 197
                     r = hour + ("小时") + minute + ("分") + second + ("秒");
198 198
                 else
@@ -200,8 +200,8 @@ namespace CallCenter.Utility
200 200
             }
201 201
             else if (t >= 60)//分
202 202
             {
203
-                minute = Convert.ToInt32(t / 60);
204
-                second = Convert.ToInt32(t % 60);
203
+                minute = Convert.ToInt32(Math.Floor(t / 60));
204
+                second = Convert.ToInt32(Math.Floor(t % 60));
205 205
                 r = minute + ("分") + second + ("秒");
206 206
             }
207 207
             else
@@ -212,7 +212,7 @@ namespace CallCenter.Utility
212 212
             return r;
213 213
         }
214 214
 
215
-       
215
+
216 216
         /// <summary>
217 217
         /// 当前日期时间,转换为秒
218 218
         /// </summary>