|
|
|
@ -2223,15 +2223,13 @@ namespace djy.Paas.Service
|
|
|
|
|
var cfgAutoCompId = DjyTools.GetConfigKey("baoguanAutoBindCompanyFeeCompId");
|
|
|
|
|
var cfgDingtalk = DjyTools.GetConfigKey("baoguanDingtalkNotify");
|
|
|
|
|
|
|
|
|
|
_LogsAdd($"报关自动扣费,公司参数:{cfgAutoCompId}", "胜云航通客服消息", null);
|
|
|
|
|
_LogsAdd($"报关自动扣费,钉钉:{cfgDingtalk}", "胜云航通客服消息", null);
|
|
|
|
|
_LogsAdd($"报关自动扣费,公司参数:{cfgAutoCompId}", "胜云航通自动扣费", null);
|
|
|
|
|
_LogsAdd($"报关自动扣费,钉钉:{cfgDingtalk}", "胜云航通自动扣费", null);
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(cfgAutoCompId))
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var arr = cfgAutoCompId.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
|
_LogsAdd($"报关自动扣费,待处理公司:{arr.Length}", "胜云航通客服消息", null);
|
|
|
|
|
_LogsAdd($"报关自动扣费,待处理公司:{arr.Length}", "胜云航通自动扣费", null);
|
|
|
|
|
foreach (var compid in arr)
|
|
|
|
|
{
|
|
|
|
|
var guidComp = Guid.Parse(compid);
|
|
|
|
@ -2243,7 +2241,9 @@ namespace djy.Paas.Service
|
|
|
|
|
&& (x.stateCode == "14" || x.stateCode == "15" || x.stateCode == "18"))//14海关放行,15已结关,18准予入港
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
_LogsAdd($"处理{compid}的报关自动扣费,共发现{orderList.Count}票", "胜云航通客服消息", null);
|
|
|
|
|
|
|
|
|
|
_LogsAdd($"处理{guidComp}的报关自动扣费,共发现{orderList.Count}票", "胜云航通自动扣费", null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var ord in orderList)
|
|
|
|
|
{
|
|
|
|
@ -2256,8 +2256,16 @@ namespace djy.Paas.Service
|
|
|
|
|
{
|
|
|
|
|
//推送钉钉消息给客服
|
|
|
|
|
var content = $"公司{ord.ClientName}未找到";
|
|
|
|
|
_LogsAdd(content, "胜云航通客服消息", null);
|
|
|
|
|
var gethtml = DjyTools.PostOnLogs(new { text = new { content = $"【未扣费提醒】\r\n{content}\r\n----报关消息通知" }, msgtype = "text" }, cfgDingtalk, "胜云航通客服消息", YsPsotType.Json).Result;
|
|
|
|
|
_LogsAdd(content, "胜云航通自动扣费", null);
|
|
|
|
|
var gethtml = DjyTools.PostOnLogs(new { text = new { content = $"【未扣费提醒】\r\n{content}\r\n----报关消息通知" }, msgtype = "text" }, cfgDingtalk, "胜云航通自动扣费", YsPsotType.Json).Result;
|
|
|
|
|
|
|
|
|
|
//设置状态
|
|
|
|
|
DbBus.Get(DbList.djypublicedb).Update<tb_BaoGuanOrderList>()
|
|
|
|
|
.Where(x => x.Gid == ord.Gid)
|
|
|
|
|
.Set(x => x.StaCustFee, "FAIL")
|
|
|
|
|
.Set(x => x.TimeCustFee, DateTime.Now)
|
|
|
|
|
.ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2271,8 +2279,16 @@ namespace djy.Paas.Service
|
|
|
|
|
{
|
|
|
|
|
//推送钉钉消息给客服
|
|
|
|
|
var content = $"公司{ord.ClientName}没有钱包";
|
|
|
|
|
_LogsAdd(content, "胜云航通客服消息", null);
|
|
|
|
|
var gethtml = DjyTools.PostOnLogs(new { text = new { content = $"【未扣费提醒】\r\n{content}\r\n----报关消息通知" }, msgtype = "text" }, cfgDingtalk, "胜云航通客服消息", YsPsotType.Json).Result;
|
|
|
|
|
_LogsAdd(content, "胜云航通自动扣费", null);
|
|
|
|
|
var gethtml = DjyTools.PostOnLogs(new { text = new { content = $"【未扣费提醒】\r\n{content}\r\n----报关消息通知" }, msgtype = "text" }, cfgDingtalk, "胜云航通自动扣费", YsPsotType.Json).Result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置状态
|
|
|
|
|
DbBus.Get(DbList.djypublicedb).Update<tb_BaoGuanOrderList>()
|
|
|
|
|
.Where(x => x.Gid == ord.Gid)
|
|
|
|
|
.Set(x => x.StaCustFee, "FAIL")
|
|
|
|
|
.Set(x => x.TimeCustFee, DateTime.Now)
|
|
|
|
|
.ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@ -2287,7 +2303,15 @@ namespace djy.Paas.Service
|
|
|
|
|
{
|
|
|
|
|
//推送钉钉消息给客服
|
|
|
|
|
var content = $"公司{ord.ClientName}的报关单价未设置";
|
|
|
|
|
var gethtml = DjyTools.PostOnLogs(new { text = new { content = $"【未扣费提醒】\r\n{content}\r\n----报关消息通知" }, msgtype = "text" }, cfgDingtalk, "胜云航通客服消息", YsPsotType.Json).Result;
|
|
|
|
|
var gethtml = DjyTools.PostOnLogs(new { text = new { content = $"【未扣费提醒】\r\n{content}\r\n----报关消息通知" }, msgtype = "text" }, cfgDingtalk, "胜云航通自动扣费", YsPsotType.Json).Result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置状态
|
|
|
|
|
DbBus.Get(DbList.djypublicedb).Update<tb_BaoGuanOrderList>()
|
|
|
|
|
.Where(x => x.Gid == ord.Gid)
|
|
|
|
|
.Set(x => x.StaCustFee, "FAIL")
|
|
|
|
|
.Set(x => x.TimeCustFee, DateTime.Now)
|
|
|
|
|
.ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@ -2297,7 +2321,15 @@ namespace djy.Paas.Service
|
|
|
|
|
{
|
|
|
|
|
//推送钉钉消息给客服
|
|
|
|
|
var content = $"公司{ord.ClientName}的余额不足";
|
|
|
|
|
var gethtml = DjyTools.PostOnLogs(new { text = new { content = $"【未扣费提醒】\r\n{content}\r\n----报关消息通知" }, msgtype = "text" }, cfgDingtalk, "胜云航通客服消息", YsPsotType.Json).Result;
|
|
|
|
|
var gethtml = DjyTools.PostOnLogs(new { text = new { content = $"【未扣费提醒】\r\n{content}\r\n----报关消息通知" }, msgtype = "text" }, cfgDingtalk, "胜云航通自动扣费", YsPsotType.Json).Result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置状态
|
|
|
|
|
DbBus.Get(DbList.djypublicedb).Update<tb_BaoGuanOrderList>()
|
|
|
|
|
.Where(x => x.Gid == ord.Gid)
|
|
|
|
|
.Set(x => x.StaCustFee, "FAIL")
|
|
|
|
|
.Set(x => x.TimeCustFee, DateTime.Now)
|
|
|
|
|
.ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
@ -2327,20 +2359,22 @@ namespace djy.Paas.Service
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//设置状态
|
|
|
|
|
DbBus.Get(DbList.djypublicedb).Update<tb_BaoGuanOrderList>()
|
|
|
|
|
.Where(x => x.Gid == ord.Gid)
|
|
|
|
|
.Set(x => x.StaCustFee, "FAIL")
|
|
|
|
|
.Set(x => x.TimeCustFee, DateTime.Now)
|
|
|
|
|
.ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
//推送钉钉消息给客服
|
|
|
|
|
var content = $"公司{ord.ClientName}报关扣费失败:{getfinrs.Message}";
|
|
|
|
|
var gethtml = DjyTools.PostOnLogs(new { text = new { content = $"【未扣费提醒】\r\n{content}\r\n----报关消息通知" }, msgtype = "text" }, cfgDingtalk, "胜云航通客服消息", YsPsotType.Json).Result;
|
|
|
|
|
var gethtml = DjyTools.PostOnLogs(new { text = new { content = $"【未扣费提醒】\r\n{content}\r\n----报关消息通知" }, msgtype = "text" }, cfgDingtalk, "胜云航通自动扣费", YsPsotType.Json).Result;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
_LogsAdd(ex.Message, "胜云航通自动扣费", new { ex.StackTrace });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|