Browse Source

需求单No.139271

master
wugang 7 years ago
parent
commit
bddea7e7b9
2 changed files with 12 additions and 3 deletions
  1. +9
    -0
      BWP.B3_YunKen/B3YunKenOnlineConfiguration.cs
  2. +3
    -3
      BWP.B3_YunKen/TimerTask/NullifyCustomerTask.cs

+ 9
- 0
BWP.B3_YunKen/B3YunKenOnlineConfiguration.cs View File

@ -81,5 +81,14 @@ namespace BWP.B3_YunKen
set { mSaleKind_ID = value; }
}
private IntConfigRef _AutoStoppedCustomerDays = new IntConfigRef(60);
[LogicName("设置自动停用未发货客户的天数")]
[ConfigurationItemGroup("耘垦模块")]
[ConfigurationItemDescription("设置自动停用未发货客户的天数(默认:60)")]
public IntConfigRef AutoStoppedCustomerDays
{
get { return _AutoStoppedCustomerDays; }
set { _AutoStoppedCustomerDays = value; }
}
}
}

+ 3
- 3
BWP.B3_YunKen/TimerTask/NullifyCustomerTask.cs View File

@ -19,7 +19,7 @@ namespace BWP.B3_YunKen.TimerTask {
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();
@ -57,11 +57,11 @@ namespace BWP.B3_YunKen.TimerTask {
var cusBL = BIFactory.Create<ICustomerBL>();
foreach (var tuple in list) {
var span = DateTime.Today - tuple.Item2;
if (span.Days >= (Days ?? 60))
if (span.Days >= Days)
{
var cus = cusBL.Load(tuple.Item1);
cus.StopedByCustomerTask = true;
cus.StopReason = (Days ?? 60)+"天内未发货";
cus.StopReason = Days + "天内未发货";
cusBL.Update(cus);
cusBL.Stop(cus);
if (cus.Employee_ID.HasValue) {


Loading…
Cancel
Save