Quellcode durchsuchen

报修模块代码

zhaozhiqiang vor 4 Jahren
Ursprung
Commit
46d7adbbb2

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

51
     <Compile Include="T_Sys_Role.cs" />
51
     <Compile Include="T_Sys_Role.cs" />
52
     <Compile Include="T_Sys_UserAccount.cs" />
52
     <Compile Include="T_Sys_UserAccount.cs" />
53
     <Compile Include="Properties\AssemblyInfo.cs" />
53
     <Compile Include="Properties\AssemblyInfo.cs" />
54
+    <Compile Include="wo_repair_basebll.cs" />
54
   </ItemGroup>
55
   </ItemGroup>
55
   <ItemGroup>
56
   <ItemGroup>
56
     <ProjectReference Include="..\RMYY_CallCenter_Api.Dal\RMYY_CallCenter_Api.Dal.csproj">
57
     <ProjectReference Include="..\RMYY_CallCenter_Api.Dal\RMYY_CallCenter_Api.Dal.csproj">

+ 100 - 0
RMYY_CallCenter_Api.Bll/wo_repair_basebll.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Data;
4
+using System.Linq;
5
+using System.Text;
6
+using System.Threading.Tasks;
7
+
8
+namespace RMYY_CallCenter_Api.Bll
9
+{
10
+  public   class wo_repair_basebll
11
+    {
12
+        private readonly Dal.wo_repair_basedal dal = new Dal.wo_repair_basedal();
13
+        /// <summary>
14
+        /// 是否存在该记录
15
+        /// </summary>
16
+        public bool Exists(string wocodeid)
17
+        {
18
+            return dal.Exists(wocodeid);
19
+        }
20
+        #region 添加
21
+
22
+        /// <summary>
23
+        /// 增加一条报修工单数据
24
+        /// </summary>
25
+        public int Addrepair(RMYY_CallCenter_Api.Model.wo_repair_base model)
26
+        {
27
+            return dal.Addrepair(model);
28
+        }
29
+
30
+        /// <summary>
31
+        /// 增加一条派单数据
32
+        /// </summary>
33
+        public int Addrepairsend(RMYY_CallCenter_Api.Model.wo_repair_send model)
34
+        {
35
+            return dal.Addrepairsend(model);
36
+        }
37
+
38
+        /// <summary>
39
+        /// 增加一条工单流程数据
40
+        /// </summary>
41
+        public int Addrepairitems(RMYY_CallCenter_Api.Model.wo_repair_items model)
42
+        {
43
+            return dal.Addrepairitems(model);
44
+        }
45
+        /// <summary>
46
+        /// 上传一张工单图片
47
+        /// </summary>
48
+        public int Addrepairimg(RMYY_CallCenter_Api.Model.wo_repair_img model)
49
+        {
50
+            return dal.Addrepairimg(model);
51
+        }
52
+        /// <summary>
53
+        /// 评价
54
+        /// </summary>
55
+        /// <param name="model"></param>
56
+        /// <returns></returns>
57
+        public int Addrepairevaluate(RMYY_CallCenter_Api.Model.wo_repair_evaluate model)
58
+        {
59
+            return dal.Addrepairevaluate(model);
60
+        }
61
+        #endregion
62
+        #region 修改
63
+        /// <summary>
64
+        /// 更新一条报修工单数据
65
+        /// </summary>
66
+        public bool Updaterepair(RMYY_CallCenter_Api.Model.wo_repair_base model)
67
+        {
68
+            return dal.Updaterepair(model);
69
+        }
70
+
71
+        #endregion
72
+        #region 删除
73
+        /// <summary>
74
+        /// 删除一条数据
75
+        /// </summary>
76
+        public bool Deleterepair(int wocodeid)
77
+        {
78
+
79
+            return dal.Deleterepair(wocodeid);
80
+        }
81
+
82
+        #endregion
83
+        #region 查询
84
+        /// <summary>
85
+        /// 得到一个对象实体
86
+        /// </summary>
87
+        public RMYY_CallCenter_Api.Model.wo_repair_base GetModel(int wocodeid)
88
+        {
89
+            return dal.GetModel(wocodeid);
90
+        }
91
+        /// <summary>
92
+        /// 分页获取数据列表
93
+        /// </summary>
94
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
95
+        {
96
+            return dal.GetListByPage( strWhere,  orderby,  startIndex,  endIndex);
97
+        }
98
+        #endregion
99
+    }
100
+}

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

51
     <Compile Include="T_Sys_Role.cs" />
51
     <Compile Include="T_Sys_Role.cs" />
52
     <Compile Include="T_Sys_UserAccount.cs" />
52
     <Compile Include="T_Sys_UserAccount.cs" />
53
     <Compile Include="Properties\AssemblyInfo.cs" />
53
     <Compile Include="Properties\AssemblyInfo.cs" />
54
+    <Compile Include="wo_repair_basedal.cs" />
54
   </ItemGroup>
55
   </ItemGroup>
55
   <ItemGroup>
56
   <ItemGroup>
56
     <ProjectReference Include="..\RMYY_CallCenter_Api.DB\RMYY_CallCenter_Api.DB.csproj">
57
     <ProjectReference Include="..\RMYY_CallCenter_Api.DB\RMYY_CallCenter_Api.DB.csproj">

+ 389 - 0
RMYY_CallCenter_Api.Dal/wo_repair_basedal.cs

1
+using System;
2
+using System.Data;
3
+using System.Data.SqlClient;
4
+using System.Reflection;
5
+using System.Text;
6
+using RMYY_CallCenter_Api.DB;
7
+
8
+namespace RMYY_CallCenter_Api.Dal
9
+{
10
+    public   class wo_repair_basedal
11
+    {
12
+        /// <summary>
13
+        /// 是否存在该记录
14
+        /// </summary>
15
+        public bool Exists(string wocodeid)
16
+        {
17
+            StringBuilder strSql = new StringBuilder();
18
+            strSql.Append("select count(1) from wo_repair_base ");
19
+            strSql.Append(" where wocodeid=@wocodeid");
20
+            SqlParameter[] parameters = {
21
+                    new SqlParameter("@wocodeid", SqlDbType.Int,4)
22
+            };
23
+            parameters[0].Value = wocodeid;
24
+
25
+            return DbHelperSQL.Exists(strSql.ToString(), parameters);
26
+        }
27
+
28
+        #region 添加
29
+        /// <summary>
30
+        /// 增加一条报修工单数据
31
+        /// </summary>
32
+        public int Addrepair(RMYY_CallCenter_Api.Model.wo_repair_base model)
33
+        {
34
+            StringBuilder strSql = new StringBuilder();
35
+            strSql.Append("insert into wo_repair_base(");
36
+            strSql.Append("wocodetype,frindpid,wocodestate,wocodecenter,createrepairman,repairman,repairmanphone,repairdate,repairyqid,repairdeptid,repairaddress,imageid,tousercode,tousertime,dealrepairman,dealtime)");
37
+            strSql.Append(" values (");
38
+            strSql.Append("@wocodetype,@frindpid,@wocodestate,@wocodecenter,@createrepairman,@repairman,@repairmanphone,@repairdate,@repairyqid,@repairdeptid,@repairaddress,@imageid,@tousercode,@tousertime,@dealrepairman,@dealtime)");
39
+            strSql.Append(";select @@IDENTITY");
40
+            SqlParameter[] parameters = {
41
+                    new SqlParameter("@wocodetype", SqlDbType.Int,4),
42
+                    new SqlParameter("@frindpid", SqlDbType.Int,4),
43
+                    new SqlParameter("@wocodestate", SqlDbType.Int,4),
44
+                    new SqlParameter("@wocodecenter", SqlDbType.NVarChar,100),
45
+                    new SqlParameter("@createrepairman", SqlDbType.NVarChar,100),
46
+                    new SqlParameter("@repairman", SqlDbType.NVarChar,100),
47
+                    new SqlParameter("@repairmanphone", SqlDbType.NVarChar,100),
48
+                    new SqlParameter("@repairdate", SqlDbType.DateTime),
49
+                    new SqlParameter("@repairyqid", SqlDbType.Int,4),
50
+                    new SqlParameter("@repairdeptid", SqlDbType.Int,4),
51
+                    new SqlParameter("@repairaddress", SqlDbType.NVarChar,100),
52
+                    new SqlParameter("@imageid", SqlDbType.Int, 4),
53
+                    new SqlParameter("@tousercode", SqlDbType.Int,4),
54
+                    new SqlParameter("@tousertime", SqlDbType.DateTime),
55
+                    new SqlParameter("@dealrepairman", SqlDbType.Int,4),
56
+                    new SqlParameter("@dealtime", SqlDbType.DateTime)};
57
+            parameters[0].Value = model.wocodetype;
58
+            parameters[1].Value = model.frindpid;
59
+            parameters[2].Value = model.wocodestate;
60
+            parameters[3].Value = model.wocodecenter;
61
+            parameters[4].Value = model.createrepairman;
62
+            parameters[5].Value = model.repairman;
63
+            parameters[6].Value = model.repairmanphone;
64
+            parameters[7].Value = model.repairdate;
65
+            parameters[8].Value = model.repairyqid;
66
+            parameters[9].Value = model.repairdeptid;
67
+            parameters[10].Value = model.repairaddress;
68
+            parameters[11].Value = model.imageid;
69
+            parameters[12].Value = model.tousercode;
70
+            parameters[13].Value = model.tousertime;
71
+            parameters[14].Value = model.dealrepairman;
72
+            parameters[15].Value = model.dealtime;
73
+
74
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
75
+            if (obj == null)
76
+            {
77
+                return 0;
78
+            }
79
+            else
80
+            {
81
+                return Convert.ToInt32(obj);
82
+            }
83
+        }
84
+
85
+        /// <summary>
86
+        /// 增加一条派单数据
87
+        /// </summary>
88
+        public int Addrepairsend(RMYY_CallCenter_Api.Model.wo_repair_send model)
89
+        {
90
+            StringBuilder strSql = new StringBuilder();
91
+            strSql.Append("insert into wo_repair_send(");
92
+            strSql.Append("wocodeid,username,userphone,repairmanphone,createtime)");
93
+            strSql.Append(" values (");
94
+            strSql.Append("@wocodeid,@username,@userphone,@repairmanphone,@createtime)");
95
+            strSql.Append(";select @@IDENTITY");
96
+            SqlParameter[] parameters = {
97
+                    new SqlParameter("@wocodeid", SqlDbType.Int,4),
98
+                    new SqlParameter("@username", SqlDbType.NVarChar,100),
99
+                    new SqlParameter("@userphone", SqlDbType.NVarChar,100),
100
+                    new SqlParameter("@reparicenter", SqlDbType.NVarChar,100),
101
+                    new SqlParameter("@createtime", SqlDbType.DateTime)};
102
+            parameters[0].Value = model.wocodeid;
103
+            parameters[1].Value = model.username;
104
+            parameters[2].Value = model.userphone;
105
+            parameters[3].Value = model.reparicenter;
106
+            parameters[4].Value = model.createtime;
107
+
108
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
109
+            if (obj == null)
110
+            {
111
+                return 0;
112
+            }
113
+            else
114
+            {
115
+                return Convert.ToInt32(obj);
116
+            }
117
+        }
118
+
119
+        /// <summary>
120
+        /// 增加一条工单流程数据
121
+        /// </summary>
122
+        public int Addrepairitems(RMYY_CallCenter_Api.Model.wo_repair_items model)
123
+        {
124
+            StringBuilder strSql = new StringBuilder();
125
+            strSql.Append("insert into wo_repair_items(");
126
+            strSql.Append("wocodeid,playcenter,createtime)");
127
+            strSql.Append(" values (");
128
+            strSql.Append("@wocodeid,@playcenter,@createtime)");
129
+            strSql.Append(";select @@IDENTITY");
130
+            SqlParameter[] parameters = {
131
+                    new SqlParameter("@wocodeid", SqlDbType.Int,4),
132
+                    new SqlParameter("@playcenter", SqlDbType.NVarChar,100),
133
+                    new SqlParameter("@createtime", SqlDbType.DateTime)};
134
+            parameters[0].Value = model.wocodeid;
135
+            parameters[1].Value = model.playcenter;
136
+            parameters[2].Value = model.createtime;
137
+
138
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
139
+            if (obj == null)
140
+            {
141
+                return 0;
142
+            }
143
+            else
144
+            {
145
+                return Convert.ToInt32(obj);
146
+            }
147
+        }
148
+        /// <summary>
149
+        /// 上传一张工单图片
150
+        /// </summary>
151
+        public int Addrepairimg(RMYY_CallCenter_Api.Model.wo_repair_img model)
152
+        {
153
+            StringBuilder strSql = new StringBuilder();
154
+            strSql.Append("insert into wo_repair_img(");
155
+            strSql.Append("filename,fileurl)");
156
+            strSql.Append(" values (");
157
+            strSql.Append("@filename,@fileurl)");
158
+            strSql.Append(";select @@IDENTITY");
159
+            SqlParameter[] parameters = {
160
+                    //new SqlParameter("@wocodeid", SqlDbType.Int,4),
161
+                    new SqlParameter("@filename",SqlDbType.NVarChar,100),
162
+                    new SqlParameter("@fileurl", SqlDbType.NVarChar,100),};
163
+            //parameters[0].Value = model.wocodeid;
164
+            parameters[0].Value = model.filename;
165
+            parameters[1].Value = model.fileurl;
166
+
167
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
168
+            if (obj == null)
169
+            {
170
+                return 0;
171
+            }
172
+            else
173
+            {
174
+                return Convert.ToInt32(obj);
175
+            }
176
+        }
177
+        /// <summary>
178
+        /// 评价
179
+        /// </summary>
180
+        /// <param name="model"></param>
181
+        /// <returns></returns>
182
+        public int Addrepairevaluate(RMYY_CallCenter_Api.Model.wo_repair_evaluate model)
183
+        {
184
+            StringBuilder strSql = new StringBuilder();
185
+            strSql.Append("insert into wo_repair_evaluate(");
186
+            strSql.Append("wocodeid,score,evaluate,label,createuser,createtime)");
187
+            strSql.Append(" values (");
188
+            strSql.Append("@wocodeid,@score@evaluate@label,@createuser,@createtime)");
189
+            strSql.Append(";select @@IDENTITY");
190
+            SqlParameter[] parameters = {
191
+                    new SqlParameter("@wocodeid", SqlDbType.Int,4),
192
+                    new SqlParameter("@score", SqlDbType.Int,4),
193
+                    new SqlParameter("@evaluate",SqlDbType.NVarChar,100),
194
+                    new SqlParameter("@label", SqlDbType.NVarChar,100),
195
+                    new SqlParameter("@createuser", SqlDbType.NVarChar,100),
196
+                    new SqlParameter("@createtime", SqlDbType.DateTime) };
197
+            parameters[0].Value = model.wocodeid;
198
+            parameters[1].Value = model.score;
199
+            parameters[2].Value = model.evaluate;
200
+            parameters[3].Value = model.label;
201
+            parameters[4].Value = model.createuser;
202
+            parameters[5].Value = model.createtime;
203
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
204
+            if (obj == null)
205
+            {
206
+                return 0;
207
+            }
208
+            else
209
+            {
210
+                return Convert.ToInt32(obj);
211
+            }
212
+        }
213
+        #endregion
214
+        #region 修改
215
+        /// <summary>
216
+        /// 更新一条报修工单数据
217
+        /// </summary>
218
+        public bool Updaterepair(RMYY_CallCenter_Api.Model.wo_repair_base model)
219
+        {
220
+            StringBuilder strSql = new StringBuilder();
221
+            strSql.Append("update wo_repair_base set ");
222
+            strSql.Append("wocodetype=@wocodetype,");
223
+            strSql.Append("frindpid=@frindpid,");
224
+            strSql.Append("wocodestate=@wocodestate,");
225
+            strSql.Append("wocodecenter=@wocodecenter,");
226
+            strSql.Append("repairman=@repairman,");
227
+            strSql.Append("repairmanphone=@repairmanphone,");
228
+            strSql.Append("repairdate=@repairdate,");
229
+            strSql.Append("repairyqid=@repairyqid");
230
+            strSql.Append("repairdeptid=@repairdeptid");
231
+            strSql.Append("repairaddress=@repairaddress");
232
+            strSql.Append("imageid=@imageid");
233
+            strSql.Append("tousercode=@tousercode");
234
+            strSql.Append("tousertime=@tousertime");
235
+            strSql.Append("dealrepairman=@dealrepairman");
236
+            strSql.Append("dealtime=@dealtime");
237
+            strSql.Append(" where wocodeid=@wocodeid");
238
+            SqlParameter[] parameters = {
239
+                    new SqlParameter("@wocodetype", SqlDbType.Int,4),
240
+                    new SqlParameter("@frindpid", SqlDbType.Int,4),
241
+                    new SqlParameter("@wocodestate", SqlDbType.Int,4),
242
+                    new SqlParameter("@wocodecenter", SqlDbType.NVarChar,100),
243
+                    new SqlParameter("@repairman", SqlDbType.NVarChar,100),
244
+                    new SqlParameter("@repairmanphone", SqlDbType.NVarChar,100),
245
+                    new SqlParameter("@repairdate", SqlDbType.DateTime),
246
+                    new SqlParameter("@repairyqid", SqlDbType.Int,4),
247
+                    new SqlParameter("@repairdeptid", SqlDbType.Int,4),
248
+                    new SqlParameter("@repairaddress", SqlDbType.NVarChar,100),
249
+                    new SqlParameter("@imageid", SqlDbType.Int, 4),
250
+                    new SqlParameter("@tousercode", SqlDbType.Int,4),
251
+                    new SqlParameter("@tousertime", SqlDbType.DateTime),
252
+                    new SqlParameter("@dealrepairman", SqlDbType.Int,4),
253
+                    new SqlParameter("@dealtime", SqlDbType.DateTime),
254
+                    new SqlParameter("@repairyqid", SqlDbType.Int,4)};
255
+            parameters[0].Value = model.wocodetype;
256
+            parameters[1].Value = model.frindpid;
257
+            parameters[2].Value = model.wocodestate;
258
+            parameters[3].Value = model.wocodecenter;
259
+            parameters[4].Value = model.repairman;
260
+            parameters[5].Value = model.repairmanphone;
261
+            parameters[6].Value = model.repairdate;
262
+            parameters[7].Value = model.repairyqid;
263
+            parameters[8].Value = model.repairdeptid;
264
+            parameters[9].Value = model.repairaddress;
265
+            parameters[10].Value = model.imageid;
266
+            parameters[11].Value = model.tousercode;
267
+            parameters[12].Value = model.tousertime;
268
+            parameters[13].Value = model.dealrepairman;
269
+            parameters[14].Value = model.dealtime;
270
+            parameters[15].Value = model.wocodeid;
271
+
272
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
273
+            if (rows > 0)
274
+            {
275
+                return true;
276
+            }
277
+            else
278
+            {
279
+                return false;
280
+            }
281
+        }
282
+
283
+        #endregion
284
+        #region 删除
285
+        /// <summary>
286
+        /// 删除一条数据
287
+        /// </summary>
288
+        public bool Deleterepair(int wocodeid)
289
+        {
290
+
291
+            StringBuilder strSql = new StringBuilder();
292
+            strSql.Append("delete from wo_repair_base ");
293
+            strSql.Append(" where wocodeid=@wocodeid");
294
+            SqlParameter[] parameters = {
295
+                    new SqlParameter("@wocodeid", SqlDbType.Int,4)
296
+            };
297
+            parameters[0].Value = wocodeid;
298
+
299
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
300
+            if (rows > 0)
301
+            {
302
+                return true;
303
+            }
304
+            else
305
+            {
306
+                return false;
307
+            }
308
+        }
309
+
310
+        #endregion
311
+        #region 查询
312
+        /// <summary>
313
+        /// 得到一个对象实体
314
+        /// </summary>
315
+        public RMYY_CallCenter_Api.Model.wo_repair_base GetModel(int wocodeid)
316
+        {
317
+
318
+            StringBuilder strSql = new StringBuilder();
319
+            strSql.Append("select  top 1 wocodetype,wocodestate,wocodecenter,repairman,repairmanphone,repairdate,repairyqid,repairdeptid,repairaddress,imageid,tousercode,tousertime,dealrepairman,dealtime from wo_repair_base ");
320
+            strSql.Append(" where wocodeid=@wocodeid");
321
+            SqlParameter[] parameters = {
322
+                    new SqlParameter("@wocodeid", SqlDbType.Int,4)
323
+            };
324
+            parameters[0].Value = wocodeid;
325
+
326
+            RMYY_CallCenter_Api.Model.wo_repair_base model = new RMYY_CallCenter_Api.Model.wo_repair_base();
327
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
328
+            if (ds.Tables[0].Rows.Count > 0)
329
+            {
330
+                return DataRowToModel(ds.Tables[0].Rows[0]);
331
+            }
332
+            else
333
+            {
334
+                return null;
335
+            }
336
+        }
337
+        /// <summary>
338
+        /// 得到一个对象实体
339
+        /// </summary>
340
+        public RMYY_CallCenter_Api.Model.wo_repair_base DataRowToModel(DataRow row)
341
+        {
342
+            RMYY_CallCenter_Api.Model.wo_repair_base model = new RMYY_CallCenter_Api.Model.wo_repair_base();
343
+            if (row != null)
344
+            {
345
+                #region 主表信息======================
346
+                //利用反射获得属性的所有公共属性
347
+                Type modelType = model.GetType();
348
+                for (int i = 0; i < row.Table.Columns.Count; i++)
349
+                {
350
+                    PropertyInfo proInfo = modelType.GetProperty(row.Table.Columns[i].ColumnName);
351
+                    if (proInfo != null && row[i] != DBNull.Value)
352
+                    {
353
+                        //用索引值设置属性值
354
+                        proInfo.SetValue(model, row[i], null);
355
+                    }
356
+                }
357
+                #endregion
358
+            }
359
+            return model;
360
+        }
361
+
362
+        /// <summary>
363
+        /// 分页获取数据列表
364
+        /// </summary>
365
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
366
+        {
367
+            StringBuilder strSql = new StringBuilder();
368
+            strSql.Append("SELECT * FROM ( ");
369
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
370
+            if (!string.IsNullOrEmpty(orderby.Trim()))
371
+            {
372
+                strSql.Append("order by T." + orderby);
373
+            }
374
+            else
375
+            {
376
+                strSql.Append("order by T.wocodeid desc");
377
+            }
378
+            strSql.Append(")AS Row, T.*  from wo_repair_base T ");
379
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
380
+            {
381
+                strSql.Append(" WHERE " + strWhere);
382
+            }
383
+            strSql.Append(" ) TT");
384
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
385
+            return DbHelperSQL.Query(strSql.ToString());
386
+        }
387
+        #endregion
388
+    }
389
+}

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

50
     <Compile Include="T_Sys_Role.cs" />
50
     <Compile Include="T_Sys_Role.cs" />
51
     <Compile Include="T_Sys_UserAccount.cs" />
51
     <Compile Include="T_Sys_UserAccount.cs" />
52
     <Compile Include="Properties\AssemblyInfo.cs" />
52
     <Compile Include="Properties\AssemblyInfo.cs" />
53
+    <Compile Include="wo_repair_base.cs" />
54
+    <Compile Include="wo_repair_evaluate.cs" />
55
+    <Compile Include="wo_repair_img.cs" />
56
+    <Compile Include="wo_repair_items.cs" />
57
+    <Compile Include="wo_repair_send.cs" />
53
   </ItemGroup>
58
   </ItemGroup>
54
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
59
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
55
 </Project>
60
 </Project>

+ 86 - 0
RMYY_CallCenter_Api.Model/wo_repair_base.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace RMYY_CallCenter_Api.Model
8
+{
9
+    /// <summary>
10
+    /// 报修工单
11
+    /// </summary>
12
+    public  class wo_repair_base
13
+    {
14
+        #region Model
15
+        /// <summary>
16
+        /// 编号主键自增id
17
+        /// </summary>
18
+        public int wocodeid { get; set; }
19
+        /// <summary>
20
+        /// 工单类型
21
+        /// </summary>
22
+        public int wocodetype  { get; set; }
23
+        /// <summary>
24
+        /// 判断是否是协助工单 0是新工单 第一次派的单改为1  
25
+        /// </summary>
26
+        public int frindpid { get; set; }
27
+        /// <summary>
28
+        /// 工单状态 0新工单 1 已接单 2待评价 3已完结 4异常结束 
29
+        /// </summary>
30
+        public int wocodestate { get; set; }
31
+        /// <summary>
32
+        /// 报修内容
33
+        /// </summary>
34
+        public string  wocodecenter { get; set; }
35
+        /// <summary>
36
+        /// 创建工单人信息
37
+        /// </summary>
38
+        public string createrepairman { get; set; }
39
+        /// <summary>
40
+        /// 报修人信息
41
+        /// </summary>
42
+        public string  repairman { get; set; }
43
+        /// <summary>
44
+        /// 报修人电话
45
+        /// </summary>
46
+        public string  repairmanphone { get; set; }
47
+        /// <summary>
48
+        /// 报修时间
49
+        /// </summary>
50
+        public DateTime? repairdate { get; set; }
51
+        /// <summary>
52
+        ///报修院区编号
53
+        /// </summary>
54
+        public int repairyqid { get; set; }
55
+        /// <summary>
56
+        /// 报修科室编号
57
+        /// </summary>
58
+        public int repairdeptid { get; set; }
59
+        /// <summary>
60
+        /// 报修地点
61
+        /// </summary>
62
+        public string  repairaddress { get; set; }
63
+        /// <summary>
64
+        /// 图片表id
65
+        /// </summary>
66
+        public int  imageid { get; set; }
67
+        /// <summary>
68
+        /// 接单人
69
+        /// </summary>
70
+        public string  tousercode { get; set; }
71
+        /// <summary>
72
+        /// 接单(派单)时间
73
+        /// </summary>
74
+        public DateTime? tousertime { get; set; }
75
+        /// <summary>
76
+        /// 处理人
77
+        /// </summary>
78
+        public string  dealrepairman { get; set; }
79
+        /// <summary>
80
+        /// 处理时间
81
+        /// </summary>
82
+        public DateTime? dealtime { get; set; }
83
+
84
+        #endregion
85
+    }
86
+}

+ 40 - 0
RMYY_CallCenter_Api.Model/wo_repair_evaluate.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace RMYY_CallCenter_Api.Model
8
+{
9
+   public  class wo_repair_evaluate
10
+    {
11
+        /// <summary>
12
+        /// 主键id
13
+        /// </summary>
14
+        public int evaid { get; set; }
15
+        /// <summary>
16
+        /// 报修工单号
17
+        /// </summary>
18
+        public int wocodeid { get; set; }
19
+        /// <summary>
20
+        /// 评分数
21
+        /// </summary>
22
+        public int score { get; set; }
23
+        /// <summary>
24
+        /// 评价内容
25
+        /// </summary>
26
+        public string evaluate { get; set; }
27
+        /// <summary>
28
+        /// 评价标签
29
+        /// </summary>
30
+        public string label { get; set; }
31
+        /// <summary>
32
+        /// 评价人
33
+        /// </summary>
34
+        public string createuser { get; set; }
35
+        /// <summary>
36
+        /// 评价时间
37
+        /// </summary>
38
+        public DateTime? createtime { get; set; }
39
+    }
40
+}

+ 28 - 0
RMYY_CallCenter_Api.Model/wo_repair_img.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace RMYY_CallCenter_Api.Model
8
+{
9
+   public  class wo_repair_img
10
+    {
11
+        /// <summary>
12
+        /// 主键id
13
+        /// </summary>
14
+        public int imgid { get; set; }
15
+        ///// <summary>
16
+        ///// 关联工单
17
+        ///// </summary>
18
+        //public int wocodeid { get; set; }
19
+        /// <summary>
20
+        /// 文件名
21
+        /// </summary>
22
+        public string  filename { get; set; }
23
+        /// <summary>
24
+        /// 文件路径
25
+        /// </summary>
26
+        public string  fileurl { get; set; }
27
+    }
28
+}

+ 31 - 0
RMYY_CallCenter_Api.Model/wo_repair_items.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace RMYY_CallCenter_Api.Model
8
+{
9
+    /// <summary>
10
+    /// 工单流程
11
+    /// </summary>
12
+   public  class wo_repair_items
13
+    {
14
+        /// <summary>
15
+        /// 主键id
16
+        /// </summary>
17
+        public int wrid { get; set; }
18
+        /// <summary>
19
+        /// 工单id
20
+        /// </summary>
21
+        public int wocodeid { get; set; }
22
+        /// <summary>
23
+        /// 操作内容
24
+        /// </summary>
25
+        public string  playcenter { get; set; }
26
+        /// <summary>
27
+        /// 创建时间
28
+        /// </summary>
29
+        public DateTime createtime { get; set; }
30
+    }
31
+}

+ 43 - 0
RMYY_CallCenter_Api.Model/wo_repair_send.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace RMYY_CallCenter_Api.Model
8
+{
9
+    /// <summary>
10
+    /// 派单记录表
11
+    /// </summary>
12
+   public  class wo_repair_send
13
+    {
14
+        /// <summary>
15
+        /// 主键id
16
+        /// </summary>
17
+        public int wrsendid { get; set; }
18
+        /// <summary>
19
+        /// 工单编号
20
+        /// </summary>
21
+        public int wocodeid { get; set; }
22
+        /// <summary>
23
+        /// 创建工单人信息
24
+        /// </summary>
25
+        public string createrepairman { get; set; }
26
+        /// <summary>
27
+        /// 维修人
28
+        /// </summary>
29
+        public string  username { get; set; }
30
+        /// <summary>
31
+        /// 联系方式
32
+        /// </summary>
33
+        public string userphone { get; set; }
34
+        /// <summary>
35
+        /// 维修内容
36
+        /// </summary>
37
+        public string  reparicenter { get; set; }
38
+        /// <summary>
39
+        /// 创建时间
40
+        /// </summary>
41
+        public DateTime? createtime { get; set; }
42
+    }
43
+}

+ 82 - 0
RMYY_CallCenter_Api/Models/Input/wo_repair_baseinput.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Web;
5
+
6
+namespace RMYY_CallCenter_Api.Models.Input
7
+{
8
+    public class wo_repair_baseinput
9
+    {
10
+        #region Model
11
+        /// <summary>
12
+        /// 编号主键自增id
13
+        /// </summary>
14
+        public int wocodeid { get; set; }
15
+        /// <summary>
16
+        /// 工单类型
17
+        /// </summary>
18
+        public int wocodetype { get; set; }
19
+        /// <summary>
20
+        /// 判断是否是协助工单
21
+        /// </summary>
22
+        public int frindpid { get; set; }
23
+        /// <summary>
24
+        /// 工单状态
25
+        /// </summary>
26
+        public int wocodestate { get; set; }
27
+        /// <summary>
28
+        /// 报修内容
29
+        /// </summary>
30
+        public string wocodecenter { get; set; }
31
+        /// <summary>
32
+        /// 创建工单人信息
33
+        /// </summary>
34
+        public string createrepairman { get; set; }
35
+        /// <summary>
36
+        /// 报修人信息
37
+        /// </summary>
38
+        public string repairman { get; set; }
39
+        /// <summary>
40
+        /// 报修人电话
41
+        /// </summary>
42
+        public string repairmanphone { get; set; }
43
+        /// <summary>
44
+        /// 报修时间
45
+        /// </summary>
46
+        public string  repairdate { get; set; }
47
+        /// <summary>
48
+        ///报修院区编号
49
+        /// </summary>
50
+        public int repairyqid { get; set; }
51
+        /// <summary>
52
+        /// 报修科室编号
53
+        /// </summary>
54
+        public int repairdeptid { get; set; }
55
+        /// <summary>
56
+        /// 报修地点
57
+        /// </summary>
58
+        public string repairaddress { get; set; }
59
+        /// <summary>
60
+        /// 图片表id
61
+        /// </summary>
62
+        public int imageid { get; set; }
63
+        /// <summary>
64
+        /// 接单人
65
+        /// </summary>
66
+        public string tousercode { get; set; }
67
+        /// <summary>
68
+        /// 接单(派单)时间
69
+        /// </summary>
70
+        public string  tousertime { get; set; }
71
+        /// <summary>
72
+        /// 处理人
73
+        /// </summary>
74
+        public string dealrepairman { get; set; }
75
+        /// <summary>
76
+        /// 处理时间
77
+        /// </summary>
78
+        public string dealtime { get; set; }
79
+
80
+        #endregion
81
+    }
82
+}

+ 2 - 0
RMYY_CallCenter_Api/RMYY_CallCenter_Api.csproj

130
     <Compile Include="Controllers\System\MenuController.cs" />
130
     <Compile Include="Controllers\System\MenuController.cs" />
131
     <Compile Include="Controllers\System\RoleController.cs" />
131
     <Compile Include="Controllers\System\RoleController.cs" />
132
     <Compile Include="Controllers\System\UserAccountController.cs" />
132
     <Compile Include="Controllers\System\UserAccountController.cs" />
133
+    <Compile Include="Controllers\WorepairController.cs" />
133
     <Compile Include="Filter\AuthorizeFilter.cs" />
134
     <Compile Include="Filter\AuthorizeFilter.cs" />
134
     <Compile Include="Filter\ExceptionFilter.cs" />
135
     <Compile Include="Filter\ExceptionFilter.cs" />
135
     <Compile Include="Global.asax.cs">
136
     <Compile Include="Global.asax.cs">
150
     <Compile Include="Models\Filter\FilterUserAccount.cs" />
151
     <Compile Include="Models\Filter\FilterUserAccount.cs" />
151
     <Compile Include="Models\FormsPrincipal.cs" />
152
     <Compile Include="Models\FormsPrincipal.cs" />
152
     <Compile Include="Models\Input\DictionaryInput.cs" />
153
     <Compile Include="Models\Input\DictionaryInput.cs" />
154
+    <Compile Include="Models\Input\wo_repair_baseinput.cs" />
153
     <Compile Include="Properties\AssemblyInfo.cs" />
155
     <Compile Include="Properties\AssemblyInfo.cs" />
154
   </ItemGroup>
156
   </ItemGroup>
155
   <ItemGroup>
157
   <ItemGroup>

+ 40 - 0
RMYY_CallCenter_Api/RMYY_CallCenter_Api.csproj.user

1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+  <PropertyGroup>
4
+    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
5
+    <Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
6
+    <Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
7
+    <UseIISExpress>true</UseIISExpress>
8
+    <Use64BitIISExpress />
9
+    <IISExpressSSLPort />
10
+    <IISExpressAnonymousAuthentication />
11
+    <IISExpressWindowsAuthentication />
12
+    <IISExpressUseClassicPipelineMode />
13
+    <UseGlobalApplicationHostFile />
14
+  </PropertyGroup>
15
+  <ProjectExtensions>
16
+    <VisualStudio>
17
+      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
18
+        <WebProjectProperties>
19
+          <StartPageUrl>
20
+          </StartPageUrl>
21
+          <StartAction>CurrentPage</StartAction>
22
+          <AspNetDebugging>True</AspNetDebugging>
23
+          <SilverlightDebugging>False</SilverlightDebugging>
24
+          <NativeDebugging>False</NativeDebugging>
25
+          <SQLDebugging>False</SQLDebugging>
26
+          <ExternalProgram>
27
+          </ExternalProgram>
28
+          <StartExternalURL>
29
+          </StartExternalURL>
30
+          <StartCmdLineArguments>
31
+          </StartCmdLineArguments>
32
+          <StartWorkingDirectory>
33
+          </StartWorkingDirectory>
34
+          <EnableENC>True</EnableENC>
35
+          <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
36
+        </WebProjectProperties>
37
+      </FlavorProperties>
38
+    </VisualStudio>
39
+  </ProjectExtensions>
40
+</Project>