|
|
@@ -177,7 +177,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.TaskManagement
|
|
177
|
177
|
/// <returns></returns>
|
|
178
|
178
|
[HttpGet("getlist")]
|
|
179
|
179
|
public async Task<IActionResult> GetListMark(string keyword, string name,string parentname, string starttime, string endtime, string tasker,
|
|
180
|
|
- int deptid = 0, int type = -1, int pageindex = 1, int pagesize = 20)
|
|
|
180
|
+ string deptid , int type = -1, int pageindex = 1, int pagesize = 20)
|
|
181
|
181
|
{
|
|
182
|
182
|
List<IConditionalModel> conModels = new List<IConditionalModel>();
|
|
183
|
183
|
#region 条件筛选
|
|
|
@@ -188,7 +188,14 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.TaskManagement
|
|
188
|
188
|
}
|
|
189
|
189
|
if (!string.IsNullOrEmpty(tasker))
|
|
190
|
190
|
{
|
|
191
|
|
- conModels.Add(new ConditionalModel() { FieldName = "F_Tasker", ConditionalType = ConditionalType.Like, FieldValue = tasker });
|
|
|
191
|
+ if (_sys_useraccountRepository .GetSingle(x => x.F_UserName == tasker).Result != null)
|
|
|
192
|
+ {
|
|
|
193
|
+ conModels.Add(new ConditionalModel() { FieldName = "F_Tasker", ConditionalType = ConditionalType.Like, FieldValue = _sys_useraccountRepository.GetSingle(x => x.F_UserName == tasker).Result.F_UserId .ToString () });
|
|
|
194
|
+ }
|
|
|
195
|
+ else
|
|
|
196
|
+ {
|
|
|
197
|
+ return Error("请输入正确的任务人");
|
|
|
198
|
+ }
|
|
192
|
199
|
}
|
|
193
|
200
|
if (!string.IsNullOrEmpty(parentname))
|
|
194
|
201
|
{
|
|
|
@@ -196,6 +203,10 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.TaskManagement
|
|
196
|
203
|
{
|
|
197
|
204
|
conModels.Add(new ConditionalModel() { FieldName = "F_Parentid", ConditionalType = ConditionalType.Like, FieldValue = _sys_taskmanagement_Repository.GetSingle(x => x.F_Name == parentname).Result.F_ID .ToString () });
|
|
198
|
205
|
}
|
|
|
206
|
+ else
|
|
|
207
|
+ {
|
|
|
208
|
+ return Error("请输入正确的父级任务名称");
|
|
|
209
|
+ }
|
|
199
|
210
|
}
|
|
200
|
211
|
if (type > -1)
|
|
201
|
212
|
{
|
|
|
@@ -204,8 +215,14 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.TaskManagement
|
|
204
|
215
|
|
|
205
|
216
|
if (!string.IsNullOrEmpty(keyword))
|
|
206
|
217
|
{
|
|
207
|
|
- conModels.Add(new ConditionalModel() { FieldName = "F_Name", ConditionalType = ConditionalType.Like, FieldValue = keyword });
|
|
208
|
|
- new KeyValuePair<WhereType, ConditionalModel>(WhereType.Or, new ConditionalModel() { FieldName = "F_Content", ConditionalType = ConditionalType.Like, FieldValue = keyword });
|
|
|
218
|
+ conModels.Add(new ConditionalCollections()
|
|
|
219
|
+ {
|
|
|
220
|
+ ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
|
|
|
221
|
+ {
|
|
|
222
|
+ new KeyValuePair<WhereType, ConditionalModel>(WhereType.And, new ConditionalModel() { FieldName = "F_Name", ConditionalType = ConditionalType.Like, FieldValue = keyword }),
|
|
|
223
|
+ new KeyValuePair<WhereType, ConditionalModel>( WhereType.Or , new ConditionalModel() { FieldName = "F_Content", ConditionalType = ConditionalType.Like, FieldValue = keyword })
|
|
|
224
|
+ }
|
|
|
225
|
+ });
|
|
209
|
226
|
}
|
|
210
|
227
|
|
|
211
|
228
|
if (!string.IsNullOrEmpty(starttime))
|
|
|
@@ -218,9 +235,9 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.TaskManagement
|
|
218
|
235
|
}
|
|
219
|
236
|
string user = User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Sid).Value;
|
|
220
|
237
|
var dept = _sys_useraccountRepository.GetSingle(x => x.F_UserCode == user).Result != null ? _sys_useraccountRepository.GetSingle(x => x.F_UserCode == user).Result.F_DeptId : 0;
|
|
221
|
|
- if (deptid > 0)
|
|
|
238
|
+ if (!string .IsNullOrEmpty (deptid))
|
|
222
|
239
|
{
|
|
223
|
|
- conModels.Add(new ConditionalModel() { FieldName = "F_Deptid", ConditionalType = ConditionalType.Equal, FieldValue = deptid.ToString() });
|
|
|
240
|
+ conModels.Add(new ConditionalModel() { FieldName = "F_Deptid", ConditionalType = ConditionalType.Equal, FieldValue = deptid });
|
|
224
|
241
|
}
|
|
225
|
242
|
else
|
|
226
|
243
|
{
|
|
|
@@ -228,8 +245,6 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.TaskManagement
|
|
228
|
245
|
new KeyValuePair<WhereType, ConditionalModel>(WhereType.Or, new ConditionalModel() { FieldName = "F_Deptid", ConditionalType = ConditionalType.Like, FieldValue = dept.ToString() });
|
|
229
|
246
|
|
|
230
|
247
|
}
|
|
231
|
|
-
|
|
232
|
|
-
|
|
233
|
248
|
#endregion
|
|
234
|
249
|
int recordCount = 0;
|
|
235
|
250
|
var list = await _sys_taskmanagement_Repository.GetListByPage(conModels, new MyPageModel() { PageIndex = pageindex, PageSize = pagesize, PageCount = recordCount });
|