|
|
@@ -929,7 +929,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
929
|
929
|
|
|
930
|
930
|
int n = new BLL.T_Wo_WorkOrder().DealWorkOrder(orderid, isend, cont, clbm, struser, ua.F_UserCode
|
|
931
|
931
|
, model.IsAudit.Value, model.InfoType, model.InfoTypeID.Value
|
|
932
|
|
- , model.ISReward.Value, model.RewardAmount, model.RewardTime
|
|
933
|
932
|
, model.UnitID.Value, model.Unit);
|
|
934
|
933
|
if (n > 0)
|
|
935
|
934
|
{
|
|
|
@@ -946,27 +945,27 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
946
|
945
|
strmsg = ua.F_UserName + "完结了工单,单号:" + model.WorkOrderID;
|
|
947
|
946
|
}
|
|
948
|
947
|
#region 消息表
|
|
949
|
|
- foreach (string ur in item.ToUser.Split(','))
|
|
950
|
|
- {
|
|
951
|
|
- Model.T_Msg_List msg = new Model.T_Msg_List();
|
|
952
|
|
- msg.Type = 1;
|
|
953
|
|
- msg.ToUser = ur;
|
|
954
|
|
- msg.ToID = Int32.Parse(item.ID.ToString());
|
|
955
|
|
- msg.Detail = strmsg;
|
|
956
|
|
- msg.State = 0;
|
|
957
|
|
- msg.IsDel = 0;
|
|
958
|
|
- msg.CreateUser = ua.F_UserCode;
|
|
959
|
|
- msg.CreateDate = DateTime.Now;
|
|
960
|
|
-
|
|
961
|
|
- new BLL.T_Msg_List().Add(msg);
|
|
962
|
|
- }
|
|
|
948
|
+ //foreach (string ur in item.ToUser.Split(','))
|
|
|
949
|
+ //{
|
|
|
950
|
+ // Model.T_Msg_List msg = new Model.T_Msg_List();
|
|
|
951
|
+ // msg.Type = 1;
|
|
|
952
|
+ // msg.ToUser = ur;
|
|
|
953
|
+ // msg.ToID = Int32.Parse(item.ID.ToString());
|
|
|
954
|
+ // msg.Detail = strmsg;
|
|
|
955
|
+ // msg.State = 0;
|
|
|
956
|
+ // msg.IsDel = 0;
|
|
|
957
|
+ // msg.CreateUser = ua.F_UserCode;
|
|
|
958
|
+ // msg.CreateDate = DateTime.Now;
|
|
|
959
|
+
|
|
|
960
|
+ // new BLL.T_Msg_List().Add(msg);
|
|
|
961
|
+ //}
|
|
963
|
962
|
#endregion
|
|
964
|
963
|
#endregion
|
|
965
|
964
|
#region 插入操作记录
|
|
966
|
965
|
Model.T_Wo_Operation oper = new Model.T_Wo_Operation();
|
|
967
|
966
|
oper.F_WorkOrderId = model.WorkOrderID;
|
|
968
|
967
|
oper.F_State = model.State;
|
|
969
|
|
- oper.F_CallRecordId = model.CallID != null ? int.Parse(model.CallID) : 0;
|
|
|
968
|
+ oper.F_CallRecordId = model.CallID != "" ? int.Parse(model.CallID) : 0;
|
|
970
|
969
|
oper.F_File = model.Files;
|
|
971
|
970
|
|
|
972
|
971
|
string userinfo = ua.depname + "-" + ua.F_UserName + "(" + ua.F_UserCode + ")";
|
|
|
@@ -1002,7 +1001,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1002
|
1001
|
public bool DealWorkOrders(string orderid,string cont,string openid,int isaudit,int infotypeid,int unitid)
|
|
1003
|
1002
|
{
|
|
1004
|
1003
|
bool res = false;
|
|
1005
|
|
- Model.T_Wo_WorkOrder model = new BLL.T_Wo_WorkOrder().GetModelList(" WorkOrderID='" + orderid + "'").FirstOrDefault();
|
|
|
1004
|
+ Model.T_Wo_WorkOrder model = new BLL.T_Wo_WorkOrder().GetModelList(" id=" + orderid + "").FirstOrDefault();
|
|
1006
|
1005
|
if (model != null)
|
|
1007
|
1006
|
{
|
|
1008
|
1007
|
if (openid != "")
|
|
|
@@ -1034,9 +1033,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1034
|
1033
|
}
|
|
1035
|
1034
|
#endregion
|
|
1036
|
1035
|
|
|
1037
|
|
- int n = new BLL.T_Wo_WorkOrder().DealWorkOrder(orderid, 1, cont, ua.F_DeptId, ua.F_UserCode, ua.F_UserCode
|
|
|
1036
|
+ int n = new BLL.T_Wo_WorkOrder().DealWorkOrder(model.WorkOrderID, 1, cont, ua.F_DeptId, ua.F_UserCode, ua.F_UserCode
|
|
1038
|
1037
|
, model.IsAudit.Value, model.InfoType, model.InfoTypeID.Value
|
|
1039
|
|
- , model.ISReward.Value, model.RewardAmount, model.RewardTime
|
|
1040
|
1038
|
, model.UnitID.Value, model.Unit);
|
|
1041
|
1039
|
if (n > 0)
|
|
1042
|
1040
|
{
|
|
|
@@ -1046,20 +1044,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1046
|
1044
|
string strmsg = string.Empty;
|
|
1047
|
1045
|
strmsg = ua.F_UserName + "通过微信完结了工单,单号:" + model.WorkOrderID;
|
|
1048
|
1046
|
#region 消息表
|
|
1049
|
|
- foreach (string ur in item.ToUser.Split(','))
|
|
1050
|
|
- {
|
|
1051
|
|
- Model.T_Msg_List msg = new Model.T_Msg_List();
|
|
1052
|
|
- msg.Type = 1;
|
|
1053
|
|
- msg.ToUser = ur;
|
|
1054
|
|
- msg.ToID = Int32.Parse(item.ID.ToString());
|
|
1055
|
|
- msg.Detail = strmsg;
|
|
1056
|
|
- msg.State = 0;
|
|
1057
|
|
- msg.IsDel = 0;
|
|
1058
|
|
- msg.CreateUser = ua.F_UserCode;
|
|
1059
|
|
- msg.CreateDate = DateTime.Now;
|
|
1060
|
|
-
|
|
1061
|
|
- new BLL.T_Msg_List().Add(msg);
|
|
1062
|
|
- }
|
|
|
1047
|
+ //foreach (string ur in item.ToUser.Split(','))
|
|
|
1048
|
+ //{
|
|
|
1049
|
+ // Model.T_Msg_List msg = new Model.T_Msg_List();
|
|
|
1050
|
+ // msg.Type = 1;
|
|
|
1051
|
+ // msg.ToUser = ur;
|
|
|
1052
|
+ // msg.ToID = Int32.Parse(item.ID.ToString());
|
|
|
1053
|
+ // msg.Detail = strmsg;
|
|
|
1054
|
+ // msg.State = 0;
|
|
|
1055
|
+ // msg.IsDel = 0;
|
|
|
1056
|
+ // msg.CreateUser = ua.F_UserCode;
|
|
|
1057
|
+ // msg.CreateDate = DateTime.Now;
|
|
|
1058
|
+
|
|
|
1059
|
+ // new BLL.T_Msg_List().Add(msg);
|
|
|
1060
|
+ //}
|
|
1063
|
1061
|
#endregion
|
|
1064
|
1062
|
#endregion
|
|
1065
|
1063
|
|
|
|
@@ -1067,7 +1065,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1067
|
1065
|
Model.T_Wo_Operation oper = new Model.T_Wo_Operation();
|
|
1068
|
1066
|
oper.F_WorkOrderId = model.WorkOrderID;
|
|
1069
|
1067
|
oper.F_State = model.State;
|
|
1070
|
|
- oper.F_CallRecordId = model.CallID != null ? int.Parse(model.CallID) : 0;
|
|
|
1068
|
+ oper.F_CallRecordId = model.CallID != "" ? int.Parse(model.CallID) : 0;
|
|
1071
|
1069
|
oper.F_File = model.Files;
|
|
1072
|
1070
|
|
|
1073
|
1071
|
string userinfo = ua.depname + "-" + ua.F_UserName + "(" + ua.F_UserCode + ")";
|
|
|
@@ -1223,20 +1221,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1223
|
1221
|
long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
|
|
1224
|
1222
|
if (itemid > 0)
|
|
1225
|
1223
|
{
|
|
1226
|
|
- foreach (string ur in item.ToUser.Split(','))
|
|
1227
|
|
- {
|
|
1228
|
|
- Model.T_Msg_List msg = new Model.T_Msg_List();
|
|
1229
|
|
- msg.Type = 1;
|
|
1230
|
|
- msg.ToUser = ur;
|
|
1231
|
|
- msg.ToID = Int32.Parse(itemid.ToString());
|
|
1232
|
|
- msg.Detail = ua.F_UserName + "向你催办了工单,单号:" + model.WorkOrderID;
|
|
1233
|
|
- msg.State = 0;
|
|
1234
|
|
- msg.IsDel = 0;
|
|
1235
|
|
- msg.CreateUser = ua.F_UserCode;
|
|
1236
|
|
- msg.CreateDate = DateTime.Now;
|
|
1237
|
|
-
|
|
1238
|
|
- new BLL.T_Msg_List().Add(msg);
|
|
1239
|
|
- }
|
|
|
1224
|
+ //foreach (string ur in item.ToUser.Split(','))
|
|
|
1225
|
+ //{
|
|
|
1226
|
+ // Model.T_Msg_List msg = new Model.T_Msg_List();
|
|
|
1227
|
+ // msg.Type = 1;
|
|
|
1228
|
+ // msg.ToUser = ur;
|
|
|
1229
|
+ // msg.ToID = Int32.Parse(itemid.ToString());
|
|
|
1230
|
+ // msg.Detail = ua.F_UserName + "向你催办了工单,单号:" + model.WorkOrderID;
|
|
|
1231
|
+ // msg.State = 0;
|
|
|
1232
|
+ // msg.IsDel = 0;
|
|
|
1233
|
+ // msg.CreateUser = ua.F_UserCode;
|
|
|
1234
|
+ // msg.CreateDate = DateTime.Now;
|
|
|
1235
|
+
|
|
|
1236
|
+ // new BLL.T_Msg_List().Add(msg);
|
|
|
1237
|
+ //}
|
|
1240
|
1238
|
|
|
1241
|
1239
|
res = Success("催办成功!");
|
|
1242
|
1240
|
}
|
|
|
@@ -1462,20 +1460,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1462
|
1460
|
long itemid = new BLL.T_Wo_WorkOrderItem().Add(itemnew);
|
|
1463
|
1461
|
if (itemid > 0)
|
|
1464
|
1462
|
{
|
|
1465
|
|
- foreach (string ur in itemnew.ToUser.Split(','))
|
|
1466
|
|
- {
|
|
1467
|
|
- Model.T_Msg_List msg = new Model.T_Msg_List();
|
|
1468
|
|
- msg.Type = 1;
|
|
1469
|
|
- msg.ToUser = ur;
|
|
1470
|
|
- msg.ToID = Int32.Parse(itemid.ToString());
|
|
1471
|
|
- msg.Detail = ua.F_UserName + "重新开启工单,单号:" + model.WorkOrderID;
|
|
1472
|
|
- msg.State = 0;
|
|
1473
|
|
- msg.IsDel = 0;
|
|
1474
|
|
- msg.CreateUser = ua.F_UserCode;
|
|
1475
|
|
- msg.CreateDate = DateTime.Now;
|
|
1476
|
|
-
|
|
1477
|
|
- new BLL.T_Msg_List().Add(msg);
|
|
1478
|
|
- }
|
|
|
1463
|
+ //foreach (string ur in itemnew.ToUser.Split(','))
|
|
|
1464
|
+ //{
|
|
|
1465
|
+ // Model.T_Msg_List msg = new Model.T_Msg_List();
|
|
|
1466
|
+ // msg.Type = 1;
|
|
|
1467
|
+ // msg.ToUser = ur;
|
|
|
1468
|
+ // msg.ToID = Int32.Parse(itemid.ToString());
|
|
|
1469
|
+ // msg.Detail = ua.F_UserName + "重新开启工单,单号:" + model.WorkOrderID;
|
|
|
1470
|
+ // msg.State = 0;
|
|
|
1471
|
+ // msg.IsDel = 0;
|
|
|
1472
|
+ // msg.CreateUser = ua.F_UserCode;
|
|
|
1473
|
+ // msg.CreateDate = DateTime.Now;
|
|
|
1474
|
+
|
|
|
1475
|
+ // new BLL.T_Msg_List().Add(msg);
|
|
|
1476
|
+ //}
|
|
1479
|
1477
|
}
|
|
1480
|
1478
|
}
|
|
1481
|
1479
|
|
|
|
@@ -2187,7 +2185,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2187
|
2185
|
}
|
|
2188
|
2186
|
|
|
2189
|
2187
|
//获取奖励记录
|
|
2190
|
|
- public ActionResult GetAMList(string woid)
|
|
|
2188
|
+ public ActionResult GetAMSList(string woid)
|
|
2191
|
2189
|
{
|
|
2192
|
2190
|
ActionResult res = NoToken("未知错误,请重新登录");
|
|
2193
|
2191
|
if (Request.IsAuthenticated)
|
|
|
@@ -2272,13 +2270,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2272
|
2270
|
womodel.ISReward = 1;
|
|
2273
|
2271
|
womodel.RewardAmount = amount;
|
|
2274
|
2272
|
new BLL.T_Wo_WorkOrder().UpdateReward(womodel.ID, womodel.ISReward.Value, womodel.RewardAmount, womodel.RewardTime);
|
|
2275
|
|
-
|
|
2276
|
|
-
|
|
2277
|
|
-
|
|
|
2273
|
+
|
|
2278
|
2274
|
if (b > 0)
|
|
2279
|
2275
|
{
|
|
2280
|
|
- string centpath= Server.MapPath("~/") + Configs.GetValue("WechatPath");
|
|
2281
|
|
- bool tr=WxHelper.TenPay(decimal.Parse(amount),"", centpath, dModel.F_openid);
|
|
|
2276
|
+ bool tr=WxHelper.TenPay(decimal.Parse(amount),"", dModel.F_openid);
|
|
2282
|
2277
|
int state = tr ? 1 : 0;
|
|
2283
|
2278
|
new BLL.T_Wo_AwardRecord().UpdateState(b, state);
|
|
2284
|
2279
|
|