ソースを参照

Merge branch 'master' of http://192.168.1.222:3000/zhoufan/RMYY_CallCenter_Api

1550076451 3 年 前
コミット
d031872512

+ 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" />

+ 24 - 9
RMYY_CallCenter_Api.Dal/T_IntegratedScheduling_Base.cs

@@ -64,9 +64,9 @@ namespace RMYY_CallCenter_Api.DAL
64 64
 		{
65 65
 			StringBuilder strSql=new StringBuilder();
66 66
 			strSql.Append("insert into T_IntegratedScheduling_Base(");
67
-			strSql.Append("F_WorkOrderCode,F_WorkOrderCategory,F_Content,F_Applicant,F_ApplicationDept,F_Phone,F_Location,F_ToPlace,F_WorkOrderState,F_DealMan,F_DealDept,F_ReplayCount,F_RemindCount,F_CallId,F_CallRecordId,F_AssignTime,F_AssignUser,F_Endtime,F_Deadline,F_UpdateTime,F_CreateTime,F_CreateUser,F_CreateUserDept,F_File,F_IsDelete,F_LeaveRecordId)");
67
+			strSql.Append("F_WorkOrderCode,F_WorkOrderCategory,F_Content,F_Applicant,F_ApplicationDept,F_Phone,F_Location,F_ToPlace,F_WorkOrderState,F_DealMan,F_DealDept,F_ReplayCount,F_RemindCount,F_CallId,F_CallRecordId,F_AssignTime,F_AssignUser,F_Endtime,F_Deadline,F_UpdateTime,F_CreateTime,F_CreateUser,F_CreateUserDept,F_File,F_IsDelete,F_LeaveRecordId,F_CFNum)");
68 68
 			strSql.Append(" values (");
69
-			strSql.Append("@F_WorkOrderCode,@F_WorkOrderCategory,@F_Content,@F_Applicant,@F_ApplicationDept,@F_Phone,@F_Location,@F_ToPlace,@F_WorkOrderState,@F_DealMan,@F_DealDept,@F_ReplayCount,@F_RemindCount,@F_CallId,@F_CallRecordId,@F_AssignTime,@F_AssignUser,@F_Endtime,@F_Deadline,@F_UpdateTime,@F_CreateTime,@F_CreateUser,@F_CreateUserDept,@F_File,@F_IsDelete,@F_LeaveRecordId)");
69
+			strSql.Append("@F_WorkOrderCode,@F_WorkOrderCategory,@F_Content,@F_Applicant,@F_ApplicationDept,@F_Phone,@F_Location,@F_ToPlace,@F_WorkOrderState,@F_DealMan,@F_DealDept,@F_ReplayCount,@F_RemindCount,@F_CallId,@F_CallRecordId,@F_AssignTime,@F_AssignUser,@F_Endtime,@F_Deadline,@F_UpdateTime,@F_CreateTime,@F_CreateUser,@F_CreateUserDept,@F_File,@F_IsDelete,@F_LeaveRecordId,@F_CFNum)");
70 70
 			strSql.Append(";select @@IDENTITY");
71 71
 			SqlParameter[] parameters = {
72 72
 					new SqlParameter("@F_WorkOrderCode", SqlDbType.NVarChar,100),
@@ -95,7 +95,8 @@ namespace RMYY_CallCenter_Api.DAL
95 95
 					new SqlParameter("@F_File", SqlDbType.NVarChar,500),
96 96
 					new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
97 97
                     
98
-                    new SqlParameter("@F_LeaveRecordId", SqlDbType.Int,4)
98
+                    new SqlParameter("@F_LeaveRecordId", SqlDbType.Int,4),
99
+                    new SqlParameter("@F_CFNum", SqlDbType.Int,4)
99 100
             };
100 101
 			parameters[0].Value = model.F_WorkOrderCode;
101 102
 			parameters[1].Value = model.F_WorkOrderCategory;
@@ -123,7 +124,7 @@ namespace RMYY_CallCenter_Api.DAL
123 124
 			parameters[23].Value = model.F_File;
124 125
 			parameters[24].Value = model.F_IsDelete;
125 126
             parameters[25].Value = model.F_LeaveRecordId;
126
-
127
+            parameters[26].Value = model.F_CFNum;
127 128
 
128 129
             object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
129 130
 			if (obj == null)
@@ -166,8 +167,14 @@ namespace RMYY_CallCenter_Api.DAL
166 167
 			strSql.Append("F_CreateUser=@F_CreateUser,");
167 168
 			strSql.Append("F_CreateUserDept=@F_CreateUserDept,");
168 169
 			strSql.Append("F_File=@F_File,");
169
-			strSql.Append("F_IsDelete=@F_IsDelete");
170
-			strSql.Append(" where F_WorkOrderId=@F_WorkOrderId");
170
+			strSql.Append("F_IsDelete=@F_IsDelete,");
171
+            strSql.Append("F_Score=@F_Score,");
172
+            strSql.Append("F_CFNum=@F_CFNum");
173
+            
174
+
175
+
176
+
177
+            strSql.Append(" where F_WorkOrderId=@F_WorkOrderId");
171 178
 			SqlParameter[] parameters = {
172 179
 					new SqlParameter("@F_WorkOrderCode", SqlDbType.NVarChar,100),
173 180
 					new SqlParameter("@F_WorkOrderCategory", SqlDbType.NVarChar,100),
@@ -194,7 +201,11 @@ namespace RMYY_CallCenter_Api.DAL
194 201
 					new SqlParameter("@F_CreateUserDept", SqlDbType.NVarChar,20),
195 202
 					new SqlParameter("@F_File", SqlDbType.NVarChar,500),
196 203
 					new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
197
-					new SqlParameter("@F_WorkOrderId", SqlDbType.Int,4)};
204
+                    new SqlParameter("@F_Score", SqlDbType.Int,4),
205
+                    new SqlParameter("@F_CFNum", SqlDbType.Int,4),
206
+                    
207
+
208
+                    new SqlParameter("@F_WorkOrderId", SqlDbType.Int,4)};
198 209
 			parameters[0].Value = model.F_WorkOrderCode;
199 210
 			parameters[1].Value = model.F_WorkOrderCategory;
200 211
 			parameters[2].Value = model.F_Content;
@@ -220,7 +231,10 @@ namespace RMYY_CallCenter_Api.DAL
220 231
 			parameters[22].Value = model.F_CreateUserDept;
221 232
 			parameters[23].Value = model.F_File;
222 233
 			parameters[24].Value = model.F_IsDelete;
223
-			parameters[25].Value = model.F_WorkOrderId;
234
+
235
+            parameters[25].Value = model.F_Score;
236
+            parameters[26].Value = model.F_CFNum;
237
+            parameters[27].Value = model.F_WorkOrderId;
224 238
 
225 239
 			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
226 240
 			if (rows > 0)
@@ -372,7 +386,8 @@ namespace RMYY_CallCenter_Api.DAL
372 386
 				{
373 387
 					model.F_CallId=row["F_CallId"].ToString();
374 388
 				}
375
-				if(row["F_CallRecordId"]!=null)
389
+               
390
+                    if (row["F_CallRecordId"]!=null && row["F_CallRecordId"].ToString() != "")
376 391
 				{
377 392
 					 
378 393
                     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" />

+ 14 - 2
RMYY_CallCenter_Api.Model/T_IntegratedScheduling_Base.cs

@@ -53,9 +53,21 @@ 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
+        private int? _f_cfnum;
57 58
 
58
-            public int? F_LeaveRecordId
59
+        public int? F_CFNum
60
+        {
61
+            set { _f_cfnum = value; }
62
+            get { return _f_cfnum; }
63
+        }
64
+
65
+        public int? F_Score
66
+        {
67
+            set { _f_score = value; }
68
+            get { return _f_score; }
69
+        }
70
+        public int? F_LeaveRecordId
59 71
         {
60 72
             set { _f_leaverecordid = value; }
61 73
             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
+

+ 3 - 3
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)
@@ -481,7 +481,7 @@ namespace RMYY_CallCenter_Api
481 481
                 case MENUENUM.报修列表:
482 482
                     strArr = new List<string> { "待提交", "-", "待接单", "待完成", "已完成", "已完成", "已完成", "已接单" }; break;
483 483
                 case MENUENUM.调度工单列表:
484
-                    strArr = new List<string> { "待提交", "待指派", "待接单", "待完成", "已完成", "已完成" }; break;
484
+                    strArr = new List<string> { "待提交", "待指派", "待接单", "待完成", "待评价", "已完成" }; break;
485 485
                 default: break;
486 486
             }
487 487
             int index = typeIdArray.IndexOf(state);

+ 12 - 3
RMYY_CallCenter_Api/Controllers/EquipmentController.cs

@@ -65,9 +65,18 @@ namespace RMYY_CallCenter_Api.Controllers
65 65
             equipModel.F_EquipPrice = equipprice;
66 66
             equipModel.F_CreateTime = DateTime.Now;
67 67
             equipModel.F_CreateUser =User.F_UserCode;
68
-            if (equipbll.Add(equipModel)>0)
69
-           
70
-            return Success("设备添加成功");
68
+            if (equipbll.Add(equipModel) > 0)
69
+            {
70
+                Model.T_Sys_DictionaryValue dvmodel = new Model.T_Sys_DictionaryValue();
71
+                dvmodel.F_DictionaryFlag = "SBXX";
72
+                dvmodel.F_Name = equipname;
73
+                dvmodel.F_State = true;
74
+                dvmodel.F_Sort = 0;
75
+                Bll.T_Sys_DictionaryValue dvbll = new Bll.T_Sys_DictionaryValue();
76
+                dvbll.Add(dvmodel);
77
+                return Success("设备添加成功");
78
+            }
79
+
71 80
             else
72 81
                 return Error("设备添加失败");
73 82
         }

+ 320 - 2
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>
@@ -69,7 +175,7 @@ namespace RMYY_CallCenter_Api.Controllers
69 175
         /// </summary>
70 176
         /// <param name="input"></param>
71 177
         /// <returns></returns>
72
-        public ActionResult AddSchedulingWorkOrder(T_SchedulingBaseInput input, List<Model.T_IntegratedScheduling_Detail> detailists)
178
+        public ActionResult AddSchedulingWorkOrder(T_SchedulingBaseInput input, List<Model.T_IntegratedScheduling_Detail> detailists,int? cfnum)
73 179
         {
74 180
             if (string.IsNullOrEmpty(input.ApplicationDept))
75 181
             {
@@ -82,7 +188,7 @@ namespace RMYY_CallCenter_Api.Controllers
82 188
 
83 189
             Model.T_IntegratedScheduling_Base model = new Model.T_IntegratedScheduling_Base();
84 190
             model.F_Applicant = input.Applicant;
85
-
191
+            model.F_CFNum = cfnum;
86 192
 
87 193
             model.F_ApplicationDept = input.ApplicationDept.Trim();
88 194
             model.F_Phone = input.Phone;
@@ -524,6 +630,218 @@ 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
+        //申请人列表  app
664
+        public ActionResult MySubmitList()
665
+        {
666
+                string sql = " and F_IsDelete=0 ";
667
+            // 待完成  0  已完成 1
668
+
669
+            string strpageindex = RequestString.GetQueryString("page");
670
+                int pageindex = 1;
671
+                string strpagesize = RequestString.GetQueryString("pagesize");
672
+                int pagesize = 10;
673
+                int listtype = RequestString.GetInt("listtype", 0);
674
+                int dept = RequestString.GetInt("dept", -1);
675
+
676
+                string strname = HttpUtility.UrlDecode(RequestString.GetQueryString("name"));
677
+                string strcategory = HttpUtility.UrlDecode(RequestString.GetQueryString("category"));
678
+                string strstarttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
679
+                string strendtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
680
+                string strworkcode = HttpUtility.UrlDecode(RequestString.GetQueryString("workordercode"));
681
+
682
+
683
+                //当前登录人只能看到自己提交的工单
684
+
685
+                sql += " and F_Applicant='" + User.F_UserCode + "'";
686
+
687
+                #region 搜索条件
688
+                if (strpageindex.Trim() != "")
689
+                {
690
+                    pageindex = Convert.ToInt32(strpageindex);
691
+                }
692
+
693
+                if (strpagesize.Trim() != "")
694
+                {
695
+                    pagesize = Convert.ToInt32(strpagesize);
696
+                }
697
+                //if (strcategory.Trim() != "" && strcategory != "undefined")
698
+                //{
699
+                //    sql += " and F_WorkOrderCategory = '" + strcategory + "' ";
700
+                //}
701
+                //if (strname.Trim() != "" && strname != "undefined")
702
+                //{
703
+                //    sql += " and F_Applicant = '" + strname + "' ";
704
+                //}
705
+                //if (dept > -1)
706
+                //{
707
+                //    sql += " and F_ApplicationDept = '" + dept + "' ";
708
+                //}
709
+
710
+                //if (strworkcode.Trim() != "" && strworkcode != "undefined")
711
+                //{
712
+                //    sql += " and F_WorkOrderCode like'%" + strworkcode + "%'";
713
+                //}
714
+
715
+                //if (strstarttime.Trim() != "" && strstarttime != "undefined")
716
+                //{
717
+                //    if (strendtime.Trim() != "" && strendtime != "undefined")
718
+                //    {
719
+                //        sql += " and F_CreateTime  between   '" + strstarttime +
720
+                //                 "' AND  '" + strendtime + "'";
721
+                //    }
722
+                //    else
723
+                //    {
724
+                //        sql += " and F_CreateTime>='" + strstarttime + "' ";
725
+                //    }
726
+                //}
727
+                //else
728
+                //{
729
+                //    if (strendtime.Trim() != "" && strendtime != "undefined")
730
+                //    {
731
+                //        sql += " and F_CreateTime<='" + strendtime + "' ";
732
+                //    }
733
+                //}
734
+                #endregion
735
+
736
+                switch (listtype)
737
+                {
738
+
739
+                    case 0:
740
+                        sql += " and F_WorkOrderState <4";
741
+                        break;
742
+                    case 1:
743
+                        sql += " and  F_WorkOrderState = 4  ";
744
+                        break;
745
+
746
+                }
747
+                int recordCount = 0;
748
+                DataTable datatable = Bll.PagerBll.GetListPager
749
+                                                ("T_IntegratedScheduling_Base ",
750
+                                                  "F_WorkOrderId",
751
+                                                  "*, [dbo].[GetUserName](F_Applicant) Applicant ",
752
+                                                  sql,
753
+                                                  "order by F_WorkOrderId desc",
754
+                                                  pagesize,
755
+                                                  pageindex,
756
+                                                  true,
757
+                                                  out recordCount
758
+                                                );
759
+
760
+
761
+                datatable = WorkOrderBase.SetOtherField(datatable, MENUENUM.调度工单列表, User.F_RoleId, 2000);
762
+
763
+                var obj = new
764
+                {
765
+                    state = "success",
766
+                    message = "成功",
767
+                    rows = datatable,
768
+                    total = recordCount
769
+                };
770
+                return Content(obj.ToJson());
771
+
772
+
773
+
774
+            }
775
+
776
+
777
+
778
+
779
+            //撤回(未指派的工单可撤回,工单状态“待提交”)
780
+            public ActionResult MyRetract(string workordercode)
781
+        {
782
+
783
+            Model.T_IntegratedScheduling_Base model = baseBll.GetModel(workordercode);
784
+            if (model == null)
785
+            {
786
+                return Error("没有获取到工单号");
787
+            }
788
+            if (model.F_WorkOrderState == 0)
789
+            {
790
+                model.F_WorkOrderState = (int)EnumFaultRepairWorkOrderState.waitsubmit;
791
+                baseBll.Update(model);
792
+                AddOperatorLog(User.F_UserName + "撤回了工单", (int)EnumOperatorType.myretract, model.F_WorkOrderCode);
793
+                return Success("撤回操作成功");
794
+
795
+            }
796
+            else
797
+            {
798
+                return Error("不能撤回");
799
+            }
800
+
801
+        }
802
+
803
+
804
+        //评价
805
+        public ActionResult EvaluateWorkOrder(string WorkOrderCode, int Attitude, int Quality, int Efficiency, string EvaluateContent)
806
+        {
807
+            Model.T_IntegratedScheduling_Base model = baseBll.GetModel(WorkOrderCode);
808
+            Model.T_IntegratedScheduling_Evaluate evamodel = new Model.T_IntegratedScheduling_Evaluate();
809
+            if (model != null)
810
+            {
811
+                if (model.F_Applicant.Trim() == User.F_UserCode)
812
+                {
813
+
814
+                    evamodel.F_EvaluateContent = EvaluateContent;
815
+                    evamodel.F_Quality = Quality;
816
+                    evamodel.F_Attitude = Attitude;
817
+
818
+                    evamodel.F_Efficiency = Efficiency;
819
+                    evamodel.F_Evaluator = User.F_UserCode;
820
+                    evamodel.F_EvaluationTime = DateTime.Now;
821
+                    evamodel.F_Isdelete = 0;
822
+                    evamodel.F_WorkOrderCode = WorkOrderCode;
823
+                    BLL.T_IntegratedScheduling_Evaluate evabll = new BLL.T_IntegratedScheduling_Evaluate();
824
+                    if (evabll.Add(evamodel) > 0)
825
+                    {
826
+                        model.F_WorkOrderState = (int)EnumFaultRepairWorkOrderState.finish;
827
+                        model.F_UpdateTime = DateTime.Now;
828
+                        //评价=自动确认耗材
829
+                       // model.F_ConfirmEquip = 2;
830
+                        model.F_Score = Attitude + Quality + Efficiency;
831
+                        baseBll.Update(model);
832
+                        AddOperatorLog("评价了工单", (int)EnumOperatorType.evaluate, model.F_WorkOrderCode);                        
833
+                        return Success("评价成功");
834
+                    }
835
+                    return Error("评价失败");
836
+                }
837
+                else
838
+                {
839
+                    return Error("申请人等于当前登录人才可以评价");
840
+                }
841
+            }
842
+            return Error("评价失败");
843
+
844
+        }
527 845
 
528 846
 
529 847
         #endregion