|
|
@ -19,7 +19,7 @@ namespace BWP.B3_YunKen.TimerTask { |
|
|
|
|
|
|
|
|
public string Name { get { return "耘垦停用客户定时任务"; } } |
|
|
public string Name { get { return "耘垦停用客户定时任务"; } } |
|
|
|
|
|
|
|
|
public long? Days { get; set; }//天数
|
|
|
|
|
|
|
|
|
public int Days { get { return new B3YunKenOnlineConfiguration().AutoStoppedCustomerDays.Value; } }//天数
|
|
|
|
|
|
|
|
|
volatile static object _lockObj = new object(); |
|
|
volatile static object _lockObj = new object(); |
|
|
|
|
|
|
|
|
@ -57,11 +57,11 @@ namespace BWP.B3_YunKen.TimerTask { |
|
|
var cusBL = BIFactory.Create<ICustomerBL>(); |
|
|
var cusBL = BIFactory.Create<ICustomerBL>(); |
|
|
foreach (var tuple in list) { |
|
|
foreach (var tuple in list) { |
|
|
var span = DateTime.Today - tuple.Item2; |
|
|
var span = DateTime.Today - tuple.Item2; |
|
|
if (span.Days >= (Days ?? 60)) |
|
|
|
|
|
|
|
|
if (span.Days >= Days) |
|
|
{ |
|
|
{ |
|
|
var cus = cusBL.Load(tuple.Item1); |
|
|
var cus = cusBL.Load(tuple.Item1); |
|
|
cus.StopedByCustomerTask = true; |
|
|
cus.StopedByCustomerTask = true; |
|
|
cus.StopReason = (Days ?? 60)+"天内未发货"; |
|
|
|
|
|
|
|
|
cus.StopReason = Days + "天内未发货"; |
|
|
cusBL.Update(cus); |
|
|
cusBL.Update(cus); |
|
|
cusBL.Stop(cus); |
|
|
cusBL.Stop(cus); |
|
|
if (cus.Employee_ID.HasValue) { |
|
|
if (cus.Employee_ID.HasValue) { |
|
|
|