liyuanyuan 3 年之前
父节点
当前提交
c8fc4af710

+ 1 - 0
RMYY_CallCenter_Api.Bll/RMYY_CallCenter_Api.Bll.csproj

@@ -71,6 +71,7 @@
71 71
     <Compile Include="T_Hos_WorkOrderItem.cs" />
72 72
     <Compile Include="T_IntegratedScheduling_Base.cs" />
73 73
     <Compile Include="T_IntegratedScheduling_Detail.cs" />
74
+    <Compile Include="T_IntegratedScheduling_Evaluate.cs" />
74 75
     <Compile Include="T_IntegratedScheduling_OperationLog.cs" />
75 76
     <Compile Include="T_IntegratedScheduling_Process.cs" />
76 77
     <Compile Include="T_InvolvedEquip_RepairProcess.cs" />

+ 195 - 0
RMYY_CallCenter_Api.Bll/T_IntegratedScheduling_Evaluate.cs

@@ -0,0 +1,195 @@
1
+/**  版本信息模板在安装目录下,可自行修改。
2
+* T_IntegratedScheduling_Evaluate.cs
3
+*
4
+* 功 能: N/A
5
+* 类 名: T_IntegratedScheduling_Evaluate
6
+*
7
+* Ver    变更日期             负责人  变更内容
8
+* ───────────────────────────────────
9
+* V0.01  2022/10/20 15:05:51   N/A    初版
10
+*
11
+* Copyright (c) 2012 Maticsoft Corporation. All rights reserved.
12
+*┌──────────────────────────────────┐
13
+*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │
14
+*│ 版权所有:动软卓越(北京)科技有限公司              │
15
+*└──────────────────────────────────┘
16
+*/
17
+using System;
18
+using System.Data;
19
+using System.Collections.Generic;
20
+
21
+using RMYY_CallCenter_Api.Model;
22
+namespace RMYY_CallCenter_Api.BLL
23
+{
24
+	/// <summary>
25
+	/// T_IntegratedScheduling_Evaluate
26
+	/// </summary>
27
+	public partial class T_IntegratedScheduling_Evaluate
28
+	{
29
+		private readonly RMYY_CallCenter_Api.DAL.T_IntegratedScheduling_Evaluate dal=new RMYY_CallCenter_Api.DAL.T_IntegratedScheduling_Evaluate();
30
+		public T_IntegratedScheduling_Evaluate()
31
+		{}
32
+		#region  BasicMethod
33
+
34
+		/// <summary>
35
+		/// 得到最大ID
36
+		/// </summary>
37
+		public int GetMaxId()
38
+		{
39
+			return dal.GetMaxId();
40
+		}
41
+
42
+		/// <summary>
43
+		/// 是否存在该记录
44
+		/// </summary>
45
+		public bool Exists(int F_EvaluateId)
46
+		{
47
+			return dal.Exists(F_EvaluateId);
48
+		}
49
+
50
+		/// <summary>
51
+		/// 增加一条数据
52
+		/// </summary>
53
+		public int  Add(RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate model)
54
+		{
55
+			return dal.Add(model);
56
+		}
57
+
58
+		/// <summary>
59
+		/// 更新一条数据
60
+		/// </summary>
61
+		public bool Update(RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate model)
62
+		{
63
+			return dal.Update(model);
64
+		}
65
+
66
+		/// <summary>
67
+		/// 删除一条数据
68
+		/// </summary>
69
+		public bool Delete(int F_EvaluateId)
70
+		{
71
+			
72
+			return dal.Delete(F_EvaluateId);
73
+		}
74
+		/// <summary>
75
+		/// 删除一条数据
76
+		/// </summary>
77
+		public bool DeleteList(string F_EvaluateIdlist )
78
+		{
79
+			return dal.DeleteList(F_EvaluateIdlist );
80
+		}
81
+
82
+		/// <summary>
83
+		/// 得到一个对象实体
84
+		/// </summary>
85
+		public RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate GetModel(int F_EvaluateId)
86
+		{
87
+			
88
+			return dal.GetModel(F_EvaluateId);
89
+		}
90
+
91
+		/// <summary>
92
+		/// 得到一个对象实体,从缓存中
93
+		/// </summary>
94
+		//public RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate GetModelByCache(int F_EvaluateId)
95
+		//{
96
+			
97
+		//	string CacheKey = "T_IntegratedScheduling_EvaluateModel-" + F_EvaluateId;
98
+		//	object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey);
99
+		//	if (objModel == null)
100
+		//	{
101
+		//		try
102
+		//		{
103
+		//			objModel = dal.GetModel(F_EvaluateId);
104
+		//			if (objModel != null)
105
+		//			{
106
+		//				int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache");
107
+		//				Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
108
+		//			}
109
+		//		}
110
+		//		catch{}
111
+		//	}
112
+		//	return (RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate)objModel;
113
+		//}
114
+
115
+		/// <summary>
116
+		/// 获得数据列表
117
+		/// </summary>
118
+		public DataSet GetList(string strWhere)
119
+		{
120
+			return dal.GetList(strWhere);
121
+		}
122
+		/// <summary>
123
+		/// 获得前几行数据
124
+		/// </summary>
125
+		public DataSet GetList(int Top,string strWhere,string filedOrder)
126
+		{
127
+			return dal.GetList(Top,strWhere,filedOrder);
128
+		}
129
+		/// <summary>
130
+		/// 获得数据列表
131
+		/// </summary>
132
+		public List<RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate> GetModelList(string strWhere)
133
+		{
134
+			DataSet ds = dal.GetList(strWhere);
135
+			return DataTableToList(ds.Tables[0]);
136
+		}
137
+		/// <summary>
138
+		/// 获得数据列表
139
+		/// </summary>
140
+		public List<RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate> DataTableToList(DataTable dt)
141
+		{
142
+			List<RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate> modelList = new List<RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate>();
143
+			int rowsCount = dt.Rows.Count;
144
+			if (rowsCount > 0)
145
+			{
146
+				RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate model;
147
+				for (int n = 0; n < rowsCount; n++)
148
+				{
149
+					model = dal.DataRowToModel(dt.Rows[n]);
150
+					if (model != null)
151
+					{
152
+						modelList.Add(model);
153
+					}
154
+				}
155
+			}
156
+			return modelList;
157
+		}
158
+
159
+		/// <summary>
160
+		/// 获得数据列表
161
+		/// </summary>
162
+		public DataSet GetAllList()
163
+		{
164
+			return GetList("");
165
+		}
166
+
167
+		/// <summary>
168
+		/// 分页获取数据列表
169
+		/// </summary>
170
+		public int GetRecordCount(string strWhere)
171
+		{
172
+			return dal.GetRecordCount(strWhere);
173
+		}
174
+		/// <summary>
175
+		/// 分页获取数据列表
176
+		/// </summary>
177
+		public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
178
+		{
179
+			return dal.GetListByPage( strWhere,  orderby,  startIndex,  endIndex);
180
+		}
181
+		/// <summary>
182
+		/// 分页获取数据列表
183
+		/// </summary>
184
+		//public DataSet GetList(int PageSize,int PageIndex,string strWhere)
185
+		//{
186
+			//return dal.GetList(PageSize,PageIndex,strWhere);
187
+		//}
188
+
189
+		#endregion  BasicMethod
190
+		#region  ExtensionMethod
191
+
192
+		#endregion  ExtensionMethod
193
+	}
194
+}
195
+

+ 1 - 0
RMYY_CallCenter_Api.Dal/RMYY_CallCenter_Api.Dal.csproj

@@ -69,6 +69,7 @@
69 69
     <Compile Include="T_Hos_WorkOrderItem.cs" />
70 70
     <Compile Include="T_IntegratedScheduling_Base.cs" />
71 71
     <Compile Include="T_IntegratedScheduling_Detail.cs" />
72
+    <Compile Include="T_IntegratedScheduling_Evaluate.cs" />
72 73
     <Compile Include="T_IntegratedScheduling_OperationLog.cs" />
73 74
     <Compile Include="T_IntegratedScheduling_Process.cs" />
74 75
     <Compile Include="T_InvolvedEquip_RepairProcess.cs" />

+ 14 - 5
RMYY_CallCenter_Api.Dal/T_IntegratedScheduling_Base.cs

@@ -166,8 +166,11 @@ namespace RMYY_CallCenter_Api.DAL
166 166
 			strSql.Append("F_CreateUser=@F_CreateUser,");
167 167
 			strSql.Append("F_CreateUserDept=@F_CreateUserDept,");
168 168
 			strSql.Append("F_File=@F_File,");
169
-			strSql.Append("F_IsDelete=@F_IsDelete");
170
-			strSql.Append(" where F_WorkOrderId=@F_WorkOrderId");
169
+			strSql.Append("F_IsDelete=@F_IsDelete,");
170
+            strSql.Append("F_Score=@F_Score");
171
+            
172
+
173
+            strSql.Append(" where F_WorkOrderId=@F_WorkOrderId");
171 174
 			SqlParameter[] parameters = {
172 175
 					new SqlParameter("@F_WorkOrderCode", SqlDbType.NVarChar,100),
173 176
 					new SqlParameter("@F_WorkOrderCategory", SqlDbType.NVarChar,100),
@@ -194,7 +197,10 @@ namespace RMYY_CallCenter_Api.DAL
194 197
 					new SqlParameter("@F_CreateUserDept", SqlDbType.NVarChar,20),
195 198
 					new SqlParameter("@F_File", SqlDbType.NVarChar,500),
196 199
 					new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
197
-					new SqlParameter("@F_WorkOrderId", SqlDbType.Int,4)};
200
+                    new SqlParameter("@F_Score", SqlDbType.Int,4),
201
+                    
202
+
203
+                    new SqlParameter("@F_WorkOrderId", SqlDbType.Int,4)};
198 204
 			parameters[0].Value = model.F_WorkOrderCode;
199 205
 			parameters[1].Value = model.F_WorkOrderCategory;
200 206
 			parameters[2].Value = model.F_Content;
@@ -220,7 +226,9 @@ namespace RMYY_CallCenter_Api.DAL
220 226
 			parameters[22].Value = model.F_CreateUserDept;
221 227
 			parameters[23].Value = model.F_File;
222 228
 			parameters[24].Value = model.F_IsDelete;
223
-			parameters[25].Value = model.F_WorkOrderId;
229
+
230
+            parameters[25].Value = model.F_Score;
231
+            parameters[26].Value = model.F_WorkOrderId;
224 232
 
225 233
 			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
226 234
 			if (rows > 0)
@@ -372,7 +380,8 @@ namespace RMYY_CallCenter_Api.DAL
372 380
 				{
373 381
 					model.F_CallId=row["F_CallId"].ToString();
374 382
 				}
375
-				if(row["F_CallRecordId"]!=null)
383
+               
384
+                    if (row["F_CallRecordId"]!=null && row["F_CallRecordId"].ToString() != "")
376 385
 				{
377 386
 					 
378 387
                     model.F_CallRecordId = int.Parse(row["F_CallRecordId"].ToString());

+ 388 - 0
RMYY_CallCenter_Api.Dal/T_IntegratedScheduling_Evaluate.cs

@@ -0,0 +1,388 @@
1
+/**  版本信息模板在安装目录下,可自行修改。
2
+* T_IntegratedScheduling_Evaluate.cs
3
+*
4
+* 功 能: N/A
5
+* 类 名: T_IntegratedScheduling_Evaluate
6
+*
7
+* Ver    变更日期             负责人  变更内容
8
+* ───────────────────────────────────
9
+* V0.01  2022/10/20 15:05:51   N/A    初版
10
+*
11
+* Copyright (c) 2012 Maticsoft Corporation. All rights reserved.
12
+*┌──────────────────────────────────┐
13
+*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │
14
+*│ 版权所有:动软卓越(北京)科技有限公司              │
15
+*└──────────────────────────────────┘
16
+*/
17
+using System;
18
+using System.Data;
19
+using System.Text;
20
+using System.Data.SqlClient;
21
+
22
+using RMYY_CallCenter_Api.DB;
23
+
24
+namespace RMYY_CallCenter_Api.DAL
25
+{
26
+	/// <summary>
27
+	/// 数据访问类:T_IntegratedScheduling_Evaluate
28
+	/// </summary>
29
+	public partial class T_IntegratedScheduling_Evaluate
30
+	{
31
+		public T_IntegratedScheduling_Evaluate()
32
+		{}
33
+		#region  BasicMethod
34
+
35
+		/// <summary>
36
+		/// 得到最大ID
37
+		/// </summary>
38
+		public int GetMaxId()
39
+		{
40
+		return DbHelperSQL.GetMaxID("F_EvaluateId", "T_IntegratedScheduling_Evaluate"); 
41
+		}
42
+
43
+		/// <summary>
44
+		/// 是否存在该记录
45
+		/// </summary>
46
+		public bool Exists(int F_EvaluateId)
47
+		{
48
+			StringBuilder strSql=new StringBuilder();
49
+			strSql.Append("select count(1) from T_IntegratedScheduling_Evaluate");
50
+			strSql.Append(" where F_EvaluateId=@F_EvaluateId");
51
+			SqlParameter[] parameters = {
52
+					new SqlParameter("@F_EvaluateId", SqlDbType.Int,4)
53
+			};
54
+			parameters[0].Value = F_EvaluateId;
55
+
56
+			return DbHelperSQL.Exists(strSql.ToString(),parameters);
57
+		}
58
+
59
+
60
+		/// <summary>
61
+		/// 增加一条数据
62
+		/// </summary>
63
+		public int Add(RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate model)
64
+		{
65
+			StringBuilder strSql=new StringBuilder();
66
+			strSql.Append("insert into T_IntegratedScheduling_Evaluate(");
67
+			strSql.Append("F_WorkOrderCode,F_Attitude,F_Quality,F_EvaluateContent,F_EvaluationTime,F_Evaluator,F_Isdelete,F_UpdateTime,F_Efficiency)");
68
+			strSql.Append(" values (");
69
+			strSql.Append("@F_WorkOrderCode,@F_Attitude,@F_Quality,@F_EvaluateContent,@F_EvaluationTime,@F_Evaluator,@F_Isdelete,@F_UpdateTime,@F_Efficiency)");
70
+			strSql.Append(";select @@IDENTITY");
71
+			SqlParameter[] parameters = {
72
+					new SqlParameter("@F_WorkOrderCode", SqlDbType.NVarChar,100),
73
+					new SqlParameter("@F_Attitude", SqlDbType.Int,4),
74
+					new SqlParameter("@F_Quality", SqlDbType.Int,4),
75
+					new SqlParameter("@F_EvaluateContent", SqlDbType.NVarChar,500),
76
+					new SqlParameter("@F_EvaluationTime", SqlDbType.DateTime),
77
+					new SqlParameter("@F_Evaluator", SqlDbType.NVarChar,50),
78
+					new SqlParameter("@F_Isdelete", SqlDbType.Int,4),
79
+					new SqlParameter("@F_UpdateTime", SqlDbType.DateTime),
80
+					new SqlParameter("@F_Efficiency", SqlDbType.Int,4)};
81
+			parameters[0].Value = model.F_WorkOrderCode;
82
+			parameters[1].Value = model.F_Attitude;
83
+			parameters[2].Value = model.F_Quality;
84
+			parameters[3].Value = model.F_EvaluateContent;
85
+			parameters[4].Value = model.F_EvaluationTime;
86
+			parameters[5].Value = model.F_Evaluator;
87
+			parameters[6].Value = model.F_Isdelete;
88
+			parameters[7].Value = model.F_UpdateTime;
89
+			parameters[8].Value = model.F_Efficiency;
90
+
91
+			object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
92
+			if (obj == null)
93
+			{
94
+				return 0;
95
+			}
96
+			else
97
+			{
98
+				return Convert.ToInt32(obj);
99
+			}
100
+		}
101
+		/// <summary>
102
+		/// 更新一条数据
103
+		/// </summary>
104
+		public bool Update(RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate model)
105
+		{
106
+			StringBuilder strSql=new StringBuilder();
107
+			strSql.Append("update T_IntegratedScheduling_Evaluate set ");
108
+			strSql.Append("F_WorkOrderCode=@F_WorkOrderCode,");
109
+			strSql.Append("F_Attitude=@F_Attitude,");
110
+			strSql.Append("F_Quality=@F_Quality,");
111
+			strSql.Append("F_EvaluateContent=@F_EvaluateContent,");
112
+			strSql.Append("F_EvaluationTime=@F_EvaluationTime,");
113
+			strSql.Append("F_Evaluator=@F_Evaluator,");
114
+			strSql.Append("F_Isdelete=@F_Isdelete,");
115
+			strSql.Append("F_UpdateTime=@F_UpdateTime,");
116
+			strSql.Append("F_Efficiency=@F_Efficiency");
117
+			strSql.Append(" where F_EvaluateId=@F_EvaluateId");
118
+			SqlParameter[] parameters = {
119
+					new SqlParameter("@F_WorkOrderCode", SqlDbType.NVarChar,100),
120
+					new SqlParameter("@F_Attitude", SqlDbType.Int,4),
121
+					new SqlParameter("@F_Quality", SqlDbType.Int,4),
122
+					new SqlParameter("@F_EvaluateContent", SqlDbType.NVarChar,500),
123
+					new SqlParameter("@F_EvaluationTime", SqlDbType.DateTime),
124
+					new SqlParameter("@F_Evaluator", SqlDbType.NVarChar,50),
125
+					new SqlParameter("@F_Isdelete", SqlDbType.Int,4),
126
+					new SqlParameter("@F_UpdateTime", SqlDbType.DateTime),
127
+					new SqlParameter("@F_Efficiency", SqlDbType.Int,4),
128
+					new SqlParameter("@F_EvaluateId", SqlDbType.Int,4)};
129
+			parameters[0].Value = model.F_WorkOrderCode;
130
+			parameters[1].Value = model.F_Attitude;
131
+			parameters[2].Value = model.F_Quality;
132
+			parameters[3].Value = model.F_EvaluateContent;
133
+			parameters[4].Value = model.F_EvaluationTime;
134
+			parameters[5].Value = model.F_Evaluator;
135
+			parameters[6].Value = model.F_Isdelete;
136
+			parameters[7].Value = model.F_UpdateTime;
137
+			parameters[8].Value = model.F_Efficiency;
138
+			parameters[9].Value = model.F_EvaluateId;
139
+
140
+			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
141
+			if (rows > 0)
142
+			{
143
+				return true;
144
+			}
145
+			else
146
+			{
147
+				return false;
148
+			}
149
+		}
150
+
151
+		/// <summary>
152
+		/// 删除一条数据
153
+		/// </summary>
154
+		public bool Delete(int F_EvaluateId)
155
+		{
156
+			
157
+			StringBuilder strSql=new StringBuilder();
158
+			strSql.Append("delete from T_IntegratedScheduling_Evaluate ");
159
+			strSql.Append(" where F_EvaluateId=@F_EvaluateId");
160
+			SqlParameter[] parameters = {
161
+					new SqlParameter("@F_EvaluateId", SqlDbType.Int,4)
162
+			};
163
+			parameters[0].Value = F_EvaluateId;
164
+
165
+			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
166
+			if (rows > 0)
167
+			{
168
+				return true;
169
+			}
170
+			else
171
+			{
172
+				return false;
173
+			}
174
+		}
175
+		/// <summary>
176
+		/// 批量删除数据
177
+		/// </summary>
178
+		public bool DeleteList(string F_EvaluateIdlist )
179
+		{
180
+			StringBuilder strSql=new StringBuilder();
181
+			strSql.Append("delete from T_IntegratedScheduling_Evaluate ");
182
+			strSql.Append(" where F_EvaluateId in ("+F_EvaluateIdlist + ")  ");
183
+			int rows=DbHelperSQL.ExecuteSql(strSql.ToString());
184
+			if (rows > 0)
185
+			{
186
+				return true;
187
+			}
188
+			else
189
+			{
190
+				return false;
191
+			}
192
+		}
193
+
194
+
195
+		/// <summary>
196
+		/// 得到一个对象实体
197
+		/// </summary>
198
+		public RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate GetModel(int F_EvaluateId)
199
+		{
200
+			
201
+			StringBuilder strSql=new StringBuilder();
202
+			strSql.Append("select  top 1 F_EvaluateId,F_WorkOrderCode,F_Attitude,F_Quality,F_EvaluateContent,F_EvaluationTime,F_Evaluator,F_Isdelete,F_UpdateTime,F_Efficiency from T_IntegratedScheduling_Evaluate ");
203
+			strSql.Append(" where F_EvaluateId=@F_EvaluateId");
204
+			SqlParameter[] parameters = {
205
+					new SqlParameter("@F_EvaluateId", SqlDbType.Int,4)
206
+			};
207
+			parameters[0].Value = F_EvaluateId;
208
+
209
+			RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate model=new RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate();
210
+			DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters);
211
+			if(ds.Tables[0].Rows.Count>0)
212
+			{
213
+				return DataRowToModel(ds.Tables[0].Rows[0]);
214
+			}
215
+			else
216
+			{
217
+				return null;
218
+			}
219
+		}
220
+
221
+
222
+		/// <summary>
223
+		/// 得到一个对象实体
224
+		/// </summary>
225
+		public RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate DataRowToModel(DataRow row)
226
+		{
227
+			RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate model=new RMYY_CallCenter_Api.Model.T_IntegratedScheduling_Evaluate();
228
+			if (row != null)
229
+			{
230
+				if(row["F_EvaluateId"]!=null && row["F_EvaluateId"].ToString()!="")
231
+				{
232
+					model.F_EvaluateId=int.Parse(row["F_EvaluateId"].ToString());
233
+				}
234
+				if(row["F_WorkOrderCode"]!=null)
235
+				{
236
+					model.F_WorkOrderCode=row["F_WorkOrderCode"].ToString();
237
+				}
238
+				if(row["F_Attitude"]!=null && row["F_Attitude"].ToString()!="")
239
+				{
240
+					model.F_Attitude=int.Parse(row["F_Attitude"].ToString());
241
+				}
242
+				if(row["F_Quality"]!=null && row["F_Quality"].ToString()!="")
243
+				{
244
+					model.F_Quality=int.Parse(row["F_Quality"].ToString());
245
+				}
246
+				if(row["F_EvaluateContent"]!=null)
247
+				{
248
+					model.F_EvaluateContent=row["F_EvaluateContent"].ToString();
249
+				}
250
+				if(row["F_EvaluationTime"]!=null && row["F_EvaluationTime"].ToString()!="")
251
+				{
252
+					model.F_EvaluationTime=DateTime.Parse(row["F_EvaluationTime"].ToString());
253
+				}
254
+				if(row["F_Evaluator"]!=null)
255
+				{
256
+					model.F_Evaluator=row["F_Evaluator"].ToString();
257
+				}
258
+				if(row["F_Isdelete"]!=null && row["F_Isdelete"].ToString()!="")
259
+				{
260
+					model.F_Isdelete=int.Parse(row["F_Isdelete"].ToString());
261
+				}
262
+				if(row["F_UpdateTime"]!=null && row["F_UpdateTime"].ToString()!="")
263
+				{
264
+					model.F_UpdateTime=DateTime.Parse(row["F_UpdateTime"].ToString());
265
+				}
266
+				if(row["F_Efficiency"]!=null && row["F_Efficiency"].ToString()!="")
267
+				{
268
+					model.F_Efficiency=int.Parse(row["F_Efficiency"].ToString());
269
+				}
270
+			}
271
+			return model;
272
+		}
273
+
274
+		/// <summary>
275
+		/// 获得数据列表
276
+		/// </summary>
277
+		public DataSet GetList(string strWhere)
278
+		{
279
+			StringBuilder strSql=new StringBuilder();
280
+			strSql.Append("select F_EvaluateId,F_WorkOrderCode,F_Attitude,F_Quality,F_EvaluateContent,F_EvaluationTime,F_Evaluator,F_Isdelete,F_UpdateTime,F_Efficiency ");
281
+			strSql.Append(" FROM T_IntegratedScheduling_Evaluate ");
282
+			if(strWhere.Trim()!="")
283
+			{
284
+				strSql.Append(" where "+strWhere);
285
+			}
286
+			return DbHelperSQL.Query(strSql.ToString());
287
+		}
288
+
289
+		/// <summary>
290
+		/// 获得前几行数据
291
+		/// </summary>
292
+		public DataSet GetList(int Top,string strWhere,string filedOrder)
293
+		{
294
+			StringBuilder strSql=new StringBuilder();
295
+			strSql.Append("select ");
296
+			if(Top>0)
297
+			{
298
+				strSql.Append(" top "+Top.ToString());
299
+			}
300
+			strSql.Append(" F_EvaluateId,F_WorkOrderCode,F_Attitude,F_Quality,F_EvaluateContent,F_EvaluationTime,F_Evaluator,F_Isdelete,F_UpdateTime,F_Efficiency ");
301
+			strSql.Append(" FROM T_IntegratedScheduling_Evaluate ");
302
+			if(strWhere.Trim()!="")
303
+			{
304
+				strSql.Append(" where "+strWhere);
305
+			}
306
+			strSql.Append(" order by " + filedOrder);
307
+			return DbHelperSQL.Query(strSql.ToString());
308
+		}
309
+
310
+		/// <summary>
311
+		/// 获取记录总数
312
+		/// </summary>
313
+		public int GetRecordCount(string strWhere)
314
+		{
315
+			StringBuilder strSql=new StringBuilder();
316
+			strSql.Append("select count(1) FROM T_IntegratedScheduling_Evaluate ");
317
+			if(strWhere.Trim()!="")
318
+			{
319
+				strSql.Append(" where "+strWhere);
320
+			}
321
+			object obj = DbHelperSQL.GetSingle(strSql.ToString());
322
+			if (obj == null)
323
+			{
324
+				return 0;
325
+			}
326
+			else
327
+			{
328
+				return Convert.ToInt32(obj);
329
+			}
330
+		}
331
+		/// <summary>
332
+		/// 分页获取数据列表
333
+		/// </summary>
334
+		public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
335
+		{
336
+			StringBuilder strSql=new StringBuilder();
337
+			strSql.Append("SELECT * FROM ( ");
338
+			strSql.Append(" SELECT ROW_NUMBER() OVER (");
339
+			if (!string.IsNullOrEmpty(orderby.Trim()))
340
+			{
341
+				strSql.Append("order by T." + orderby );
342
+			}
343
+			else
344
+			{
345
+				strSql.Append("order by T.F_EvaluateId desc");
346
+			}
347
+			strSql.Append(")AS Row, T.*  from T_IntegratedScheduling_Evaluate T ");
348
+			if (!string.IsNullOrEmpty(strWhere.Trim()))
349
+			{
350
+				strSql.Append(" WHERE " + strWhere);
351
+			}
352
+			strSql.Append(" ) TT");
353
+			strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
354
+			return DbHelperSQL.Query(strSql.ToString());
355
+		}
356
+
357
+		/*
358
+		/// <summary>
359
+		/// 分页获取数据列表
360
+		/// </summary>
361
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
362
+		{
363
+			SqlParameter[] parameters = {
364
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
365
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
366
+					new SqlParameter("@PageSize", SqlDbType.Int),
367
+					new SqlParameter("@PageIndex", SqlDbType.Int),
368
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
369
+					new SqlParameter("@OrderType", SqlDbType.Bit),
370
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
371
+					};
372
+			parameters[0].Value = "T_IntegratedScheduling_Evaluate";
373
+			parameters[1].Value = "F_EvaluateId";
374
+			parameters[2].Value = PageSize;
375
+			parameters[3].Value = PageIndex;
376
+			parameters[4].Value = 0;
377
+			parameters[5].Value = 0;
378
+			parameters[6].Value = strWhere;	
379
+			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
380
+		}*/
381
+
382
+		#endregion  BasicMethod
383
+		#region  ExtensionMethod
384
+
385
+		#endregion  ExtensionMethod
386
+	}
387
+}
388
+

+ 1 - 0
RMYY_CallCenter_Api.Model/RMYY_CallCenter_Api.Model.csproj

@@ -70,6 +70,7 @@
70 70
     <Compile Include="T_Hos_WorkOrderItem.cs" />
71 71
     <Compile Include="T_IntegratedScheduling_Base.cs" />
72 72
     <Compile Include="T_IntegratedScheduling_Detail.cs" />
73
+    <Compile Include="T_IntegratedScheduling_Evaluate.cs" />
73 74
     <Compile Include="T_IntegratedScheduling_OperationLog.cs" />
74 75
     <Compile Include="T_IntegratedScheduling_Process.cs" />
75 76
     <Compile Include="T_InvolvedEquip_RepairProcess.cs" />

+ 8 - 2
RMYY_CallCenter_Api.Model/T_IntegratedScheduling_Base.cs

@@ -53,9 +53,15 @@ namespace RMYY_CallCenter_Api.Model
53 53
 		private string _f_file;
54 54
 		private int? _f_isdelete;
55 55
         private int? _f_leaverecordid;
56
-        
56
+        private int? _f_score;
57
+       
57 58
 
58
-            public int? F_LeaveRecordId
59
+     public int? F_Score
60
+        {
61
+            set { _f_score = value; }
62
+            get { return _f_score; }
63
+        }
64
+        public int? F_LeaveRecordId
59 65
         {
60 66
             set { _f_leaverecordid = value; }
61 67
             get { return _f_leaverecordid; }

+ 123 - 0
RMYY_CallCenter_Api.Model/T_IntegratedScheduling_Evaluate.cs

@@ -0,0 +1,123 @@
1
+/**  版本信息模板在安装目录下,可自行修改。
2
+* T_IntegratedScheduling_Evaluate.cs
3
+*
4
+* 功 能: N/A
5
+* 类 名: T_IntegratedScheduling_Evaluate
6
+*
7
+* Ver    变更日期             负责人  变更内容
8
+* ───────────────────────────────────
9
+* V0.01  2022/10/20 15:05:51   N/A    初版
10
+*
11
+* Copyright (c) 2012 Maticsoft Corporation. All rights reserved.
12
+*┌──────────────────────────────────┐
13
+*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │
14
+*│ 版权所有:动软卓越(北京)科技有限公司              │
15
+*└──────────────────────────────────┘
16
+*/
17
+using System;
18
+namespace RMYY_CallCenter_Api.Model
19
+{
20
+	/// <summary>
21
+	/// T_IntegratedScheduling_Evaluate:实体类(属性说明自动提取数据库字段的描述信息)
22
+	/// </summary>
23
+	[Serializable]
24
+	public partial class T_IntegratedScheduling_Evaluate
25
+	{
26
+		public T_IntegratedScheduling_Evaluate()
27
+		{}
28
+		#region Model
29
+		private int _f_evaluateid;
30
+		private string _f_workordercode;
31
+		private int? _f_attitude;
32
+		private int? _f_quality;
33
+		private string _f_evaluatecontent;
34
+		private DateTime? _f_evaluationtime;
35
+		private string _f_evaluator;
36
+		private int? _f_isdelete;
37
+		private DateTime? _f_updatetime;
38
+		private int? _f_efficiency;
39
+		/// <summary>
40
+		/// 
41
+		/// </summary>
42
+		public int F_EvaluateId
43
+		{
44
+			set{ _f_evaluateid=value;}
45
+			get{return _f_evaluateid;}
46
+		}
47
+		/// <summary>
48
+		/// 
49
+		/// </summary>
50
+		public string F_WorkOrderCode
51
+		{
52
+			set{ _f_workordercode=value;}
53
+			get{return _f_workordercode;}
54
+		}
55
+		/// <summary>
56
+		/// 
57
+		/// </summary>
58
+		public int? F_Attitude
59
+		{
60
+			set{ _f_attitude=value;}
61
+			get{return _f_attitude;}
62
+		}
63
+		/// <summary>
64
+		/// 
65
+		/// </summary>
66
+		public int? F_Quality
67
+		{
68
+			set{ _f_quality=value;}
69
+			get{return _f_quality;}
70
+		}
71
+		/// <summary>
72
+		/// 
73
+		/// </summary>
74
+		public string F_EvaluateContent
75
+		{
76
+			set{ _f_evaluatecontent=value;}
77
+			get{return _f_evaluatecontent;}
78
+		}
79
+		/// <summary>
80
+		/// 
81
+		/// </summary>
82
+		public DateTime? F_EvaluationTime
83
+		{
84
+			set{ _f_evaluationtime=value;}
85
+			get{return _f_evaluationtime;}
86
+		}
87
+		/// <summary>
88
+		/// 
89
+		/// </summary>
90
+		public string F_Evaluator
91
+		{
92
+			set{ _f_evaluator=value;}
93
+			get{return _f_evaluator;}
94
+		}
95
+		/// <summary>
96
+		/// 
97
+		/// </summary>
98
+		public int? F_Isdelete
99
+		{
100
+			set{ _f_isdelete=value;}
101
+			get{return _f_isdelete;}
102
+		}
103
+		/// <summary>
104
+		/// 
105
+		/// </summary>
106
+		public DateTime? F_UpdateTime
107
+		{
108
+			set{ _f_updatetime=value;}
109
+			get{return _f_updatetime;}
110
+		}
111
+		/// <summary>
112
+		/// 
113
+		/// </summary>
114
+		public int? F_Efficiency
115
+		{
116
+			set{ _f_efficiency=value;}
117
+			get{return _f_efficiency;}
118
+		}
119
+		#endregion Model
120
+
121
+	}
122
+}
123
+

+ 2 - 2
RMYY_CallCenter_Api/Common/WorkOrderBase.cs

@@ -446,7 +446,7 @@ namespace RMYY_CallCenter_Api
446 446
         /// <param name="state"></param>
447 447
         /// <param name="type"></param>
448 448
         /// <returns></returns>
449
-        private static string GetWorkOrderStateStr(MENUENUM menuName, int state, int type)
449
+        public static string GetWorkOrderStateStr(MENUENUM menuName, int state, int type)
450 450
         {
451 451
             List<int> typeIdArray = null;
452 452
 
@@ -461,7 +461,7 @@ namespace RMYY_CallCenter_Api
461 461
             else if (type == 2000)
462 462
             {
463 463
                 typeIdArray = new List<int> { -1, 0, 1, 2, 3, 4 };
464
-                return "";
464
+                 
465 465
             }
466 466
 
467 467
             if (typeIdArray == null)

+ 202 - 0
RMYY_CallCenter_Api/Controllers/SchedulingController.cs

@@ -22,6 +22,112 @@ namespace RMYY_CallCenter_Api.Controllers
22 22
         private Bll.T_Sys_Department departmentBLL = new Bll.T_Sys_Department();
23 23
         private BLL.T_IntegratedScheduling_OperationLog logBll = new BLL.T_IntegratedScheduling_OperationLog();
24 24
         private BLL.T_IntegratedScheduling_Detail detailBll = new BLL.T_IntegratedScheduling_Detail();
25
+        private Bll.T_Sys_SystemConfig configBll = new Bll.T_Sys_SystemConfig();
26
+        private BLL.T_IntegratedScheduling_Process proBll = new BLL.T_IntegratedScheduling_Process();
27
+        public DataTable GetFileData(string ids, string prefix)
28
+        {
29
+            DataTable dt = DbHelperSQL.Query("select * from T_Sys_Accessories WITH(NOLOCK) where F_FileId in (" + ids + ")").Tables[0];
30
+
31
+            foreach (DataRow dr in dt.Rows)
32
+            {
33
+                dr["F_FileUrl"] = prefix + dr["F_FileUrl"].ToString();
34
+            }
35
+
36
+            return dt;
37
+        }
38
+
39
+        public ActionResult GetWorkOrder()
40
+        {
41
+
42
+            var configfj = configBll.GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
43
+
44
+            string strworkorderid = HttpUtility.UrlDecode(RequestString.GetQueryString("WorkOrderCode"));
45
+            Model.T_IntegratedScheduling_Base model = baseBll.GetModel(strworkorderid);
46
+            int type = RequestString.GetInt("type", 0);//0基本信息1 工单流程2评价
47
+            if (!string.IsNullOrEmpty(strworkorderid))
48
+            {
49
+                switch (type)
50
+                {
51
+                    case 0:
52
+                        //基本信息
53
+                        #region
54
+                        string sql = "select *,[dbo].[GetUserName](F_Applicant) applicantname ,[dbo].[GetUserName](F_CreateUser) createname from T_IntegratedScheduling_Base where F_WorkOrderCode='" + strworkorderid + "'";
55
+                        DataTable dtbase = DbHelperSQL.Query(sql).Tables[0];
56
+
57
+                        string pssql= "select * from T_IntegratedScheduling_Detail where F_WorkOrderCode='" + strworkorderid + "'";
58
+                        DataTable psdt = DbHelperSQL.Query(pssql).Tables[0];
59
+
60
+
61
+                        dtbase.Columns.Add("FileUrl", typeof(object));
62
+                        dtbase.Columns.Add("StateName");
63
+                        dtbase.Columns.Add("TypeName");
64
+                        dtbase.Columns.Add("PSInfo");
65
+                        dtbase.Columns.Add("GapTime"); //超时时限
66
+                         
67
+                        foreach (DataRow dr in dtbase.Rows)
68
+                        {
69
+                            dr["TypeName"] = "综合调度";
70
+                            if (configfj != null && !string.IsNullOrEmpty(dr["F_File"].ToString()))
71
+                            {
72
+                                dr["FileUrl"] = GetFileData(dr["F_File"].ToString(), configfj.F_ParamValue);
73
+                            }
74
+
75
+                            dr["StateName"] = WorkOrderBase. GetWorkOrderStateStr(MENUENUM.调度工单列表, int.Parse(dr["F_WorkOrderState"].ToString()), 2000);
76
+
77
+                            dr["PSInfo"] = psdt;
78
+
79
+                            if (!string.IsNullOrEmpty(dr["F_Deadline"].ToString()))
80
+                            {
81
+                                DateTime deadline = Convert.ToDateTime(dr["F_Deadline"]);
82
+                                TimeSpan ts = deadline.Subtract(DateTime.Now);
83
+                                double tss = double.Parse(Math.Round(ts.TotalSeconds, 0).ToString());
84
+                                if (tss < 0) { tss = -tss; }
85
+                                string gshsj = DateTimeConvert.parseTimeSeconds(tss, 1);
86
+                                if (deadline > DateTime.Now)
87
+                                {
88
+                                  
89
+                                }
90
+                                else
91
+                                {
92
+                                    dr["GapTime"] = "超时" + gshsj;
93
+                                }
94
+                            }
95
+
96
+
97
+
98
+
99
+
100
+                        }
101
+
102
+
103
+                        return Success("获取成功", dtbase);
104
+                    #endregion
105
+                   
106
+
107
+                    case 1://工单流程
108
+                        var sqllog = "select *,[dbo].[GetUserName](F_Operator) username from T_IntegratedScheduling_OperationLog where F_WorkOrderCode = '" + strworkorderid + "' " + " order by F_OperationId desc";
109
+
110
+                        DataTable dtlog = DbHelperSQL.Query(sqllog).Tables[0];
111
+
112
+                        return Success("获取工单流程成功", dtlog);               
113
+
114
+                    case 2://评价
115
+                        string sqle = "select top 1 * from T_IntegratedScheduling_Evaluate where F_WorkOrderCode='" + strworkorderid + "'" + " order by F_EvaluationTime desc";
116
+                        DataTable dte = DbHelperSQL.Query(sqle).Tables[0];
117
+
118
+                        return Success("获取处理结果成功", dte);
119
+
120
+
121
+
122
+                }
123
+
124
+            }
125
+
126
+            return Error("没传参数");
127
+
128
+        }
129
+
130
+
25 131
 
26 132
 
27 133
         /// <summary>
@@ -524,6 +630,102 @@ namespace RMYY_CallCenter_Api.Controllers
524 630
             return Error("工单不存在!");
525 631
         }
526 632
 
633
+        //送达操作
634
+        public ActionResult DealWorkOrder(string WorkOrderCode, string file
635
+            )
636
+        {
637
+            Model.T_IntegratedScheduling_Base model = baseBll.GetModel(WorkOrderCode);
638
+            model.F_WorkOrderState = (int)EnumSchedullingWorkOrderState.dealed;
639
+            model.F_Endtime = DateTime.Now;
640
+            
641
+
642
+            baseBll.Update(model);
643
+            Model.T_IntegratedScheduling_Process promodel = new Model.T_IntegratedScheduling_Process();
644
+            promodel.F_DealDept = User.F_DeptId.ToString();
645
+            promodel.F_DealMan = User.F_UserCode;
646
+            promodel.F_File = file;
647
+            promodel.F_Isdelete = 0;
648
+            promodel.F_ProcessingTime = DateTime.Now;
649
+            promodel.F_WorkOrderCode = WorkOrderCode;
650
+            proBll.Add(promodel);
651
+            AddOperatorLog("已送达", (int)EnumOperatorType.dealed, WorkOrderCode);
652
+
653
+
654
+
655
+
656
+            return Success("");
657
+
658
+        }
659
+
660
+        #endregion
661
+
662
+        #region 申请人用的是我的工单页面 评价 撤回; 编辑(与综合保障中心共用的编辑接口)
663
+        //撤回(未指派的工单可撤回,工单状态“待提交”)
664
+        public ActionResult MyRetract(string workordercode)
665
+        {
666
+
667
+            Model.T_IntegratedScheduling_Base model = baseBll.GetModel(workordercode);
668
+            if (model == null)
669
+            {
670
+                return Error("没有获取到工单号");
671
+            }
672
+            if (model.F_WorkOrderState == 0)
673
+            {
674
+                model.F_WorkOrderState = (int)EnumFaultRepairWorkOrderState.waitsubmit;
675
+                baseBll.Update(model);
676
+                AddOperatorLog(User.F_UserName + "撤回了工单", (int)EnumOperatorType.myretract, model.F_WorkOrderCode);
677
+                return Success("撤回操作成功");
678
+
679
+            }
680
+            else
681
+            {
682
+                return Error("不能撤回");
683
+            }
684
+
685
+        }
686
+
687
+
688
+        //评价
689
+        public ActionResult EvaluateWorkOrder(string WorkOrderCode, int Attitude, int Quality, int Efficiency, string EvaluateContent)
690
+        {
691
+            Model.T_IntegratedScheduling_Base model = baseBll.GetModel(WorkOrderCode);
692
+            Model.T_IntegratedScheduling_Evaluate evamodel = new Model.T_IntegratedScheduling_Evaluate();
693
+            if (model != null)
694
+            {
695
+                if (model.F_Applicant.Trim() == User.F_UserCode)
696
+                {
697
+
698
+                    evamodel.F_EvaluateContent = EvaluateContent;
699
+                    evamodel.F_Quality = Quality;
700
+                    evamodel.F_Attitude = Attitude;
701
+
702
+                    evamodel.F_Efficiency = Efficiency;
703
+                    evamodel.F_Evaluator = User.F_UserCode;
704
+                    evamodel.F_EvaluationTime = DateTime.Now;
705
+                    evamodel.F_Isdelete = 0;
706
+                    evamodel.F_WorkOrderCode = WorkOrderCode;
707
+                    BLL.T_IntegratedScheduling_Evaluate evabll = new BLL.T_IntegratedScheduling_Evaluate();
708
+                    if (evabll.Add(evamodel) > 0)
709
+                    {
710
+                        model.F_WorkOrderState = (int)EnumFaultRepairWorkOrderState.finish;
711
+                        model.F_UpdateTime = DateTime.Now;
712
+                        //评价=自动确认耗材
713
+                       // model.F_ConfirmEquip = 2;
714
+                        model.F_Score = Attitude + Quality + Efficiency;
715
+                        baseBll.Update(model);
716
+                        AddOperatorLog("评价了工单", (int)EnumOperatorType.evaluate, model.F_WorkOrderCode);                        
717
+                        return Success("评价成功");
718
+                    }
719
+                    return Error("评价失败");
720
+                }
721
+                else
722
+                {
723
+                    return Error("申请人等于当前登录人才可以评价");
724
+                }
725
+            }
726
+            return Error("评价失败");
727
+
728
+        }
527 729
 
528 730
 
529 731
         #endregion