|
|
@@ -11,6 +11,7 @@ using System.Web.Mvc;
|
|
11
|
11
|
using YTSoft.BaseCallCenter.Model;
|
|
12
|
12
|
using YTSoft.BaseCallCenter.MVCWeb.Commons;
|
|
13
|
13
|
using YTSoft.BaseCallCenter.MVCWeb.Models;
|
|
|
14
|
+using YTSoft.Common;
|
|
14
|
15
|
|
|
15
|
16
|
namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
16
|
17
|
{
|
|
|
@@ -77,11 +78,16 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
77
|
78
|
|
|
78
|
79
|
if (deptModel.F_DeptId > 0)
|
|
79
|
80
|
{
|
|
|
81
|
+ AddAction("t_sys_department", deptModel.F_DeptId.ToMyString(), "更新部门", deptModel.F_DeptName);
|
|
|
82
|
+
|
|
80
|
83
|
return deptBLL.Update(deptModel);
|
|
81
|
84
|
}
|
|
82
|
85
|
else
|
|
83
|
86
|
{
|
|
84
|
|
- return deptBLL.Add(deptModel) > 0;
|
|
|
87
|
+ int id = deptBLL.Add(deptModel);
|
|
|
88
|
+ AddAction("t_sys_department", id.ToMyString(), "添加部门", deptModel.F_DeptName);
|
|
|
89
|
+
|
|
|
90
|
+ return id> 0;
|
|
85
|
91
|
}
|
|
86
|
92
|
}
|
|
87
|
93
|
/// <summary>
|
|
|
@@ -92,6 +98,7 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
92
|
98
|
[AcceptVerbs(HttpVerbs.Get)]
|
|
93
|
99
|
public bool DeleteDeptData(int deptId)
|
|
94
|
100
|
{
|
|
|
101
|
+ AddAction("t_sys_department", deptId.ToMyString(), "删除部门");
|
|
95
|
102
|
return deptBLL.Delete(deptId);
|
|
96
|
103
|
|
|
97
|
104
|
}
|
|
|
@@ -216,11 +223,15 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
216
|
223
|
|
|
217
|
224
|
if (roleInfoModel.F_RoleId > 0)
|
|
218
|
225
|
{
|
|
|
226
|
+ AddAction("t_sys_roleinfo", roleInfoModel.F_RoleId.ToMyString(), "更新角色", roleInfoModel.F_RoleName);
|
|
|
227
|
+
|
|
219
|
228
|
return roleBLL.Update(roleInfoModel);
|
|
220
|
229
|
}
|
|
221
|
230
|
else
|
|
222
|
231
|
{
|
|
223
|
|
- return roleBLL.Add(roleInfoModel) > 0;
|
|
|
232
|
+ int id = roleBLL.Add(roleInfoModel);
|
|
|
233
|
+ AddAction("t_sys_roleinfo", id.ToMyString(), "添加角色", roleInfoModel.F_RoleName);
|
|
|
234
|
+ return id > 0;
|
|
224
|
235
|
}
|
|
225
|
236
|
}
|
|
226
|
237
|
|
|
|
@@ -235,6 +246,7 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
235
|
246
|
[AcceptVerbs(HttpVerbs.Get)]
|
|
236
|
247
|
public bool DeleteRoleData(string roleId)
|
|
237
|
248
|
{
|
|
|
249
|
+ AddAction("t_sys_roleinfo", roleId.ToMyString(), "删除角色");
|
|
238
|
250
|
return roleBLL.DeleteList(roleId);
|
|
239
|
251
|
|
|
240
|
252
|
}
|
|
|
@@ -405,11 +417,14 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
405
|
417
|
|
|
406
|
418
|
if (WorkOrderTypeModel.F_WorkOrderTypeId > 0)
|
|
407
|
419
|
{
|
|
|
420
|
+ AddAction("t_wo_workordertype", WorkOrderTypeModel.F_WorkOrderTypeId.ToMyString(), "更新工单分类",WorkOrderTypeModel.F_Name);
|
|
408
|
421
|
return dicTittleBLL.Update(WorkOrderTypeModel) > 0;
|
|
409
|
422
|
}
|
|
410
|
423
|
else
|
|
411
|
424
|
{
|
|
412
|
|
- return dicTittleBLL.Add(WorkOrderTypeModel) > 0;
|
|
|
425
|
+ int id = dicTittleBLL.Add(WorkOrderTypeModel);
|
|
|
426
|
+ AddAction("t_wo_workordertype", id.ToMyString(), "添加工单分类", WorkOrderTypeModel.F_Name);
|
|
|
427
|
+ return id > 0;
|
|
413
|
428
|
}
|
|
414
|
429
|
}
|
|
415
|
430
|
|
|
|
@@ -422,8 +437,8 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
422
|
437
|
[AcceptVerbs(HttpVerbs.Get)]
|
|
423
|
438
|
public bool DeleteBussiTypeData(int WorkOrderTypeId)
|
|
424
|
439
|
{
|
|
|
440
|
+ AddAction("t_wo_workordertype", WorkOrderTypeId.ToMyString(), "删除工单分类");
|
|
425
|
441
|
return dicTittleBLL.Delete(WorkOrderTypeId);
|
|
426
|
|
-
|
|
427
|
442
|
}
|
|
428
|
443
|
#endregion
|
|
429
|
444
|
|
|
|
@@ -541,10 +556,12 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
541
|
556
|
{
|
|
542
|
557
|
if (!string.IsNullOrEmpty(dicBaseModel.F_DictionaryFlagType))
|
|
543
|
558
|
{
|
|
|
559
|
+ AddAction("t_sys_dictionarybase", dicBaseModel.F_DictionaryFlagType, "更新字典项");
|
|
544
|
560
|
return dicBaseBLL.Update(dicBaseModel);
|
|
545
|
561
|
}
|
|
546
|
562
|
else
|
|
547
|
563
|
{
|
|
|
564
|
+ AddAction("t_sys_dictionarybase", dicBaseModel.F_DictionaryFlagType, "添加字典项");
|
|
548
|
565
|
return dicBaseBLL.Add(dicBaseModel);
|
|
549
|
566
|
}
|
|
550
|
567
|
}
|
|
|
@@ -557,8 +574,8 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
557
|
574
|
[AcceptVerbs(HttpVerbs.Get)]
|
|
558
|
575
|
public bool DeleteBaseData(string baseCode)
|
|
559
|
576
|
{
|
|
|
577
|
+ AddAction("t_sys_dictionarybase", baseCode,"删除字典项");
|
|
560
|
578
|
return dicBaseBLL.Delete(baseCode);
|
|
561
|
|
-
|
|
562
|
579
|
}
|
|
563
|
580
|
|
|
564
|
581
|
/// <summary>
|
|
|
@@ -593,11 +610,15 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
593
|
610
|
{
|
|
594
|
611
|
if (dicBaseModel.F_DictionaryValueId > 0)
|
|
595
|
612
|
{
|
|
|
613
|
+ AddAction("t_sys_dictionaryvalue", dicBaseModel.F_DictionaryValueId.ToMyString(), "更新字典值");
|
|
596
|
614
|
return dicValueBLL.Update(dicBaseModel);
|
|
597
|
615
|
}
|
|
598
|
616
|
else
|
|
599
|
617
|
{
|
|
600
|
|
- return dicValueBLL.Add(dicBaseModel) > 0;
|
|
|
618
|
+
|
|
|
619
|
+ int id = dicValueBLL.Add(dicBaseModel);
|
|
|
620
|
+ AddAction("t_sys_dictionaryvalue", id.ToMyString(), "添加字典值");
|
|
|
621
|
+ return id > 0;
|
|
601
|
622
|
}
|
|
602
|
623
|
}
|
|
603
|
624
|
|
|
|
@@ -609,6 +630,7 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
609
|
630
|
[AcceptVerbs(HttpVerbs.Get)]
|
|
610
|
631
|
public bool DeleteValueData(int id)
|
|
611
|
632
|
{
|
|
|
633
|
+ AddAction("t_sys_dictionaryvalue", id.ToMyString(), "删除字典值");
|
|
612
|
634
|
return dicValueBLL.Delete(id);
|
|
613
|
635
|
|
|
614
|
636
|
}
|
|
|
@@ -711,14 +733,17 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
711
|
733
|
public bool SaveMenuData(T_Sys_ModuleFunctions menuModel)
|
|
712
|
734
|
{
|
|
713
|
735
|
|
|
714
|
|
-
|
|
715
|
736
|
if (menuModel.F_FunctionId > 0)
|
|
716
|
737
|
{
|
|
|
738
|
+ AddAction("t_sys_modulefunctions", menuModel.F_FunctionId.ToMyString(), "更新菜单", menuModel.F_Name);
|
|
|
739
|
+
|
|
717
|
740
|
return menuBLL.Update(menuModel);
|
|
718
|
741
|
}
|
|
719
|
742
|
else
|
|
720
|
743
|
{
|
|
721
|
|
- return menuBLL.Add(menuModel) > 0;
|
|
|
744
|
+ int id = menuBLL.Add(menuModel);
|
|
|
745
|
+ AddAction("t_sys_modulefunctions", id.ToMyString(), "添加菜单", menuModel.F_Name);
|
|
|
746
|
+ return id > 0;
|
|
722
|
747
|
}
|
|
723
|
748
|
}
|
|
724
|
749
|
|
|
|
@@ -731,6 +756,7 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
731
|
756
|
[AcceptVerbs(HttpVerbs.Get)]
|
|
732
|
757
|
public bool DeleteMenuData(int menuId)
|
|
733
|
758
|
{
|
|
|
759
|
+ AddAction("t_sys_modulefunctions", menuId.ToMyString(), "删除菜单");
|
|
734
|
760
|
return menuBLL.Delete(menuId);
|
|
735
|
761
|
|
|
736
|
762
|
}
|
|
|
@@ -804,6 +830,7 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
804
|
830
|
oldUserModel.F_SeatRight = userModel.F_SeatRight;
|
|
805
|
831
|
oldUserModel.F_Password = userModel.F_Password;
|
|
806
|
832
|
oldUserModel.F_Remark = userModel.F_Remark;
|
|
|
833
|
+ AddAction("t_sys_useraccount", userModel.F_UserId.ToMyString(), "更新用户", userModel.F_UserName);
|
|
807
|
834
|
return userBLL.Update(oldUserModel);
|
|
808
|
835
|
}
|
|
809
|
836
|
else
|
|
|
@@ -811,13 +838,13 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
811
|
838
|
userModel.F_HJType = 0;
|
|
812
|
839
|
userModel.F_GroupId = 1;
|
|
813
|
840
|
|
|
814
|
|
- if (userModel.F_SeatFlag)
|
|
|
841
|
+ if (userModel.F_SeatFlag&&false)
|
|
815
|
842
|
{
|
|
816
|
843
|
#region 调用接口插入用户信息
|
|
817
|
844
|
try
|
|
818
|
845
|
{
|
|
819
|
846
|
StringBuilder returnStr = new StringBuilder();
|
|
820
|
|
- string wxAddUrl = "http://zzmetro-kf.sujie-china.com/api/customer/insert";
|
|
|
847
|
+ string wxAddUrl = "http://rexian.zzmetro.com/api/customer/insert";
|
|
821
|
848
|
UserInfo model = new UserInfo();
|
|
822
|
849
|
model.name = userModel.F_UserCode;
|
|
823
|
850
|
|
|
|
@@ -834,10 +861,10 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
834
|
861
|
}
|
|
835
|
862
|
|
|
836
|
863
|
|
|
837
|
|
-
|
|
838
|
|
-
|
|
839
|
|
-
|
|
840
|
|
- return userBLL.Add(userModel) > 0;
|
|
|
864
|
+
|
|
|
865
|
+ int userid = userBLL.Add(userModel);
|
|
|
866
|
+ AddAction("t_sys_useraccount", userid.ToMyString(), "新增用户", userModel.F_UserName);
|
|
|
867
|
+ return userid > 0;
|
|
841
|
868
|
}
|
|
842
|
869
|
}
|
|
843
|
870
|
/// <summary>
|
|
|
@@ -848,8 +875,8 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
848
|
875
|
[AcceptVerbs(HttpVerbs.Get)]
|
|
849
|
876
|
public bool DeleteUserData(int userId)
|
|
850
|
877
|
{
|
|
|
878
|
+ AddAction("t_sys_useraccount", userId.ToMyString(), "删除用户");
|
|
851
|
879
|
return userBLL.Delete(userId);
|
|
852
|
|
-
|
|
853
|
880
|
}
|
|
854
|
881
|
/// <summary>
|
|
855
|
882
|
/// 获取用户数据
|
|
|
@@ -919,13 +946,30 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
919
|
946
|
return View(model);
|
|
920
|
947
|
}
|
|
921
|
948
|
|
|
|
949
|
+ /// </summary>
|
|
|
950
|
+ [AcceptVerbs(HttpVerbs.Post)]
|
|
|
951
|
+ public ActionResult CheckPwd(string pwd)
|
|
|
952
|
+ {
|
|
|
953
|
+ checkpwd.Chkrslt chkrslt = checkpwd.PasswordStrength(pwd);
|
|
|
954
|
+
|
|
|
955
|
+ return Json(new
|
|
|
956
|
+ {
|
|
|
957
|
+ code = chkrslt.RSL ? 0 : 1,
|
|
|
958
|
+ msg = chkrslt.MSG
|
|
|
959
|
+ });
|
|
|
960
|
+ }
|
|
|
961
|
+
|
|
922
|
962
|
/// <summary>
|
|
923
|
963
|
///保存修改密码
|
|
924
|
964
|
/// </summary>
|
|
925
|
965
|
[AcceptVerbs(HttpVerbs.Post)]
|
|
926
|
966
|
public string UpdateUserPwd(Model.T_Sys_UserAccount model)
|
|
927
|
967
|
{
|
|
928
|
|
-
|
|
|
968
|
+ checkpwd.Chkrslt chkrslt = checkpwd.PasswordStrength(model.password);
|
|
|
969
|
+ if(!chkrslt.RSL)
|
|
|
970
|
+ {
|
|
|
971
|
+ return chkrslt.MSG;
|
|
|
972
|
+ }
|
|
929
|
973
|
string AddRersult = "false";
|
|
930
|
974
|
if (model.F_UserId > 0)
|
|
931
|
975
|
{
|
|
|
@@ -936,6 +980,7 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
936
|
980
|
newModel.F_Password = model.password;
|
|
937
|
981
|
if (userBLL.Update(newModel))
|
|
938
|
982
|
{
|
|
|
983
|
+ AddAction("t_sys_useraccount", model.F_UserId.ToMyString(), "修改密码");
|
|
939
|
984
|
AddRersult = "True";
|
|
940
|
985
|
}
|
|
941
|
986
|
}
|
|
|
@@ -1209,8 +1254,9 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
1209
|
1254
|
oldnoticeinfoModel.F_Content = noticeinfoModel.F_Content;
|
|
1210
|
1255
|
oldnoticeinfoModel.F_ReceiveInfo = noticeinfoModel.F_ReceiveInfo;
|
|
1211
|
1256
|
oldnoticeinfoModel.F_DeviceId = noticeinfoModel.F_DeviceId;
|
|
1212
|
|
- oldnoticeinfoModel.F_State = 1;
|
|
|
1257
|
+ oldnoticeinfoModel.F_State = 1;
|
|
1213
|
1258
|
result = noticeBLL.Update(oldnoticeinfoModel);
|
|
|
1259
|
+ AddAction("t_msg_noticeinfo", oldnoticeinfoModel.F_NoticeId.ToMyString(), "修改公告");
|
|
1214
|
1260
|
}
|
|
1215
|
1261
|
else
|
|
1216
|
1262
|
{
|
|
|
@@ -1219,7 +1265,9 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
1219
|
1265
|
noticeinfoModel.F_State = 1;
|
|
1220
|
1266
|
noticeinfoModel.F_CreateOn = DateTime.Now;
|
|
1221
|
1267
|
readdate = noticeinfoModel.F_CreateOn;
|
|
1222
|
|
- noticeid = noticeBLL.Add(noticeinfoModel);
|
|
|
1268
|
+
|
|
|
1269
|
+ noticeid = noticeBLL.Add(noticeinfoModel);
|
|
|
1270
|
+ AddAction("t_msg_noticeinfo", noticeid.ToMyString(), "添加公告");
|
|
1223
|
1271
|
}
|
|
1224
|
1272
|
//指定方式发送公告
|
|
1225
|
1273
|
if (noticeinfoModel.F_DeviceId > 0)
|
|
|
@@ -1287,6 +1335,7 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
|
|
1287
|
1335
|
if (dt.Rows.Count > 0)
|
|
1288
|
1336
|
{
|
|
1289
|
1337
|
res = noticeBLL.Delete(noticeId);
|
|
|
1338
|
+ AddAction("t_msg_noticeinfo", noticeId.ToMyString(), "删除公告");
|
|
1290
|
1339
|
//指定部门发公告
|
|
1291
|
1340
|
dtuser = new YTSoft.BaseCallCenter.BLL.T_Sys_UserAccount().GetList("1=1 and F_DeptId= " + Convert.ToInt32( dt.Rows[0]["F_ReceiveInfo"].ToString()) ).Tables[0];
|
|
1292
|
1341
|
foreach (DataRow dr in dtuser.Rows)
|