|
|
@@ -1790,7 +1790,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1790
|
1790
|
{
|
|
1791
|
1791
|
StreamReader reader = new StreamReader(System.Web.HttpContext.Current.Request.InputStream);
|
|
1792
|
1792
|
var postString = reader.ReadToEnd();
|
|
1793
|
|
-
|
|
|
1793
|
+ LogFactory.GetLogger("zmhd10003").Warn(postString);
|
|
1794
|
1794
|
// if (!string.IsNullOrWhiteSpace(postString))
|
|
1795
|
1795
|
// {
|
|
1796
|
1796
|
JObject result = null;
|
|
|
@@ -3125,59 +3125,129 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3125
|
3125
|
return Content(obj.ToJson().Replace("state", "C-Response-Desc").Replace("message", "C-API-Status").Replace("returnList", "C-Response-Body").Replace("code", "C-Response-Code"));
|
|
3126
|
3126
|
|
|
3127
|
3127
|
}
|
|
3128
|
|
-
|
|
|
3128
|
+
|
|
3129
|
3129
|
public ActionResult Reminder()
|
|
3130
|
3130
|
{
|
|
3131
|
|
- string strSql = "select count(1) from T_Call_CallRecords where DATEDIFF (DAY ,BeginTime ,GETDATE ())=0 ";
|
|
3132
|
|
-
|
|
|
3131
|
+ string strSql = "select count(1) from T_Call_CallRecords where DATEDIFF (DAY ,BeginTime ,GETDATE ())=0 and CallType = 0 ";
|
|
|
3132
|
+ string strSql1 = "select count(1) from T_Call_CallRecords where DATEDIFF (DAY ,BeginTime ,GETDATE ())=0 and CallState=1 and CallType=0";
|
|
3133
|
3133
|
object objres = DbHelperSQL.GetSingle(strSql);
|
|
3134
|
|
- var model = new BLL.T_SMS_RecvSMS().GetModelList("DATEDIFF (DAY ,RecvTime ,GETDATE ())=0 and RecvModemIMEI='701484974439813120' order by RecvTime desc ");
|
|
|
3134
|
+ object objres1 = DbHelperSQL.GetSingle(strSql1);
|
|
|
3135
|
+ var model = new BLL.T_SMS_RecvSMS().GetModelList("DATEDIFF (DAY ,RecvTime ,GETDATE ())=0 and RecvModemIMEI='704047588659716096' order by RecvTime desc ");
|
|
3135
|
3136
|
if (model!=null && model.Count >0)
|
|
3136
|
3137
|
{
|
|
3137
|
|
-
|
|
|
3138
|
+ int count = int.Parse(model.First().F_Name )/1000*1000+ 1000;
|
|
3138
|
3139
|
int t = int.Parse(objres.ToString());
|
|
3139
|
|
- if (t >3000)
|
|
|
3140
|
+ if (t >count )
|
|
3140
|
3141
|
{
|
|
3141
|
|
- int count = int.Parse(model.First().RecvModemIMEI) + 1000;
|
|
3142
|
|
- if (t > count)
|
|
|
3142
|
+ if (t >= 3000 && t < 4000)
|
|
3143
|
3143
|
{
|
|
3144
|
|
- string mag = "[\"" + count + "\"]";
|
|
3145
|
|
- var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (1, 4, 11)");
|
|
|
3144
|
+ string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
|
|
|
3145
|
+ var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (6)");
|
|
3146
|
3146
|
if (userlist != null && userlist.Count > 0)
|
|
3147
|
3147
|
{
|
|
3148
|
3148
|
foreach (var it in userlist)
|
|
3149
|
3149
|
{
|
|
3150
|
3150
|
if (!string.IsNullOrEmpty(it.F_Mobile))
|
|
3151
|
3151
|
{
|
|
3152
|
|
- string v = SmsNewController.AddSmS(0, "当前话务已超过" + count + "。请关注", it.F_Mobile, "701484974439813120", mag, "1000");
|
|
|
3152
|
+ string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", it.F_Mobile, "704047588659716096", mag, objres.ToString());
|
|
|
3153
|
+ }
|
|
|
3154
|
+ }
|
|
|
3155
|
+
|
|
|
3156
|
+ }
|
|
|
3157
|
+ }
|
|
|
3158
|
+ else if (t >= 4000 && t < 5000)
|
|
|
3159
|
+ {
|
|
|
3160
|
+ string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
|
|
|
3161
|
+ string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569031100", "704047588659716096", mag, objres.ToString());
|
|
|
3162
|
+ }
|
|
|
3163
|
+ else if (t >= 5000)
|
|
|
3164
|
+ {
|
|
|
3165
|
+
|
|
|
3166
|
+ string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
|
|
|
3167
|
+ var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (1,6)");
|
|
|
3168
|
+
|
|
|
3169
|
+ string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569031100", "704047588659716096", mag, objres.ToString());
|
|
|
3170
|
+ if (v == "")
|
|
|
3171
|
+ {
|
|
|
3172
|
+ string ct =
|
|
|
3173
|
+ SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569098866", "704047588659716096", mag, objres.ToString());
|
|
|
3174
|
+ if (ct == "")
|
|
|
3175
|
+ {
|
|
|
3176
|
+ if (userlist != null && userlist.Count > 0)
|
|
|
3177
|
+ {
|
|
|
3178
|
+ foreach (var it in userlist)
|
|
|
3179
|
+ {
|
|
|
3180
|
+ if (!string.IsNullOrEmpty(it.F_Mobile))
|
|
|
3181
|
+ {
|
|
|
3182
|
+ string vd = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", it.F_Mobile, "704047588659716096", mag, objres.ToString());
|
|
|
3183
|
+ }
|
|
|
3184
|
+ }
|
|
|
3185
|
+
|
|
3153
|
3186
|
}
|
|
3154
|
3187
|
}
|
|
3155
|
3188
|
|
|
3156
|
3189
|
}
|
|
|
3190
|
+
|
|
|
3191
|
+
|
|
|
3192
|
+
|
|
3157
|
3193
|
}
|
|
3158
|
3194
|
}
|
|
3159
|
|
-
|
|
|
3195
|
+
|
|
3160
|
3196
|
|
|
3161
|
3197
|
}
|
|
3162
|
3198
|
else
|
|
3163
|
3199
|
{
|
|
3164
|
|
- if (int.Parse(objres.ToString()) > 3000)
|
|
|
3200
|
+
|
|
|
3201
|
+ int t = int.Parse(objres.ToString());
|
|
|
3202
|
+ if (t >= 3000 && t < 4000)
|
|
3165
|
3203
|
{
|
|
3166
|
|
-
|
|
3167
|
|
- string mag = "[\"3000" + "\"]";
|
|
3168
|
|
- var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (1, 4, 11)");
|
|
3169
|
|
- if (userlist!=null && userlist.Count >0)
|
|
|
3204
|
+ string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
|
|
|
3205
|
+ var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (6)");
|
|
|
3206
|
+ if (userlist != null && userlist.Count > 0)
|
|
3170
|
3207
|
{
|
|
3171
|
3208
|
foreach (var it in userlist)
|
|
3172
|
3209
|
{
|
|
3173
|
|
- if (!string.IsNullOrEmpty(it.F_Mobile ))
|
|
|
3210
|
+ if (!string.IsNullOrEmpty(it.F_Mobile))
|
|
3174
|
3211
|
{
|
|
3175
|
|
- string v = SmsNewController.AddSmS(0, "当前话务已超过3000。请关注", it.F_Mobile, "701484974439813120", mag, "3000");
|
|
|
3212
|
+ string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", it.F_Mobile, "704047588659716096", mag, objres.ToString());
|
|
3176
|
3213
|
}
|
|
3177
|
3214
|
}
|
|
3178
|
|
-
|
|
|
3215
|
+
|
|
3179
|
3216
|
}
|
|
3180
|
|
-
|
|
|
3217
|
+ }
|
|
|
3218
|
+ else if (t >= 4000 && t < 5000)
|
|
|
3219
|
+ {
|
|
|
3220
|
+ string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
|
|
|
3221
|
+ string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569031100", "704047588659716096", mag, objres.ToString());
|
|
|
3222
|
+ }
|
|
|
3223
|
+ else if (t >= 5000)
|
|
|
3224
|
+ {
|
|
|
3225
|
+
|
|
|
3226
|
+ string mag = "[\"" + objres + "\",\"" + objres1 + "\"]";
|
|
|
3227
|
+ var userlist = new BLL.T_Sys_UserAccount().GetModelList(" F_DeleteFlag =0 and F_RoleId in (1, 6)");
|
|
|
3228
|
+
|
|
|
3229
|
+ string v = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569031100", "704047588659716096", mag, objres.ToString());
|
|
|
3230
|
+ if (v == "")
|
|
|
3231
|
+ {
|
|
|
3232
|
+ string ct =
|
|
|
3233
|
+ SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", "13569098866", "704047588659716096", mag, objres.ToString());
|
|
|
3234
|
+ if (ct == "")
|
|
|
3235
|
+ {
|
|
|
3236
|
+ if (userlist != null && userlist.Count > 0)
|
|
|
3237
|
+ {
|
|
|
3238
|
+ foreach (var it in userlist)
|
|
|
3239
|
+ {
|
|
|
3240
|
+ if (!string.IsNullOrEmpty(it.F_Mobile))
|
|
|
3241
|
+ {
|
|
|
3242
|
+ string vd = SmsNewController.AddSmS(0, "今日累计来电量" + objres + "个,已接通" + objres1 + "个。请关注!", it.F_Mobile, "704047588659716096", mag, objres.ToString());
|
|
|
3243
|
+ }
|
|
|
3244
|
+ }
|
|
|
3245
|
+
|
|
|
3246
|
+ }
|
|
|
3247
|
+ }
|
|
|
3248
|
+
|
|
|
3249
|
+ }
|
|
|
3250
|
+
|
|
3181
|
3251
|
}
|
|
3182
|
3252
|
}
|
|
3183
|
3253
|
return Success("");
|