0
This commit is contained in:
parent
28a978ae7c
commit
1b8bd160bf
@ -21,6 +21,10 @@ namespace GZ_LTHPilot_ORDER.ScheduleService
|
||||
[Description("定时刷新销售订单累计核销金额#"), HotUpdate]
|
||||
public class SaleOrderReceiveAmount : IScheduleService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询周期单位:月
|
||||
/// </summary>
|
||||
int Cycle = 6;
|
||||
public void Run(Context ctx, Schedule schedule)
|
||||
{
|
||||
TempTableService tempTableService = new TempTableService(ctx);
|
||||
@ -41,7 +45,7 @@ namespace GZ_LTHPilot_ORDER.ScheduleService
|
||||
}
|
||||
// 循环查询销售订单执行明细表,每次查询一个月的数据, 将数据插入自定义临时表中
|
||||
var startDate = planStartDate.AddDays(-advanceAays);
|
||||
var endDate = startDate.AddMonths(1);
|
||||
var endDate = startDate.AddMonths(Cycle);
|
||||
// 如果开始时间大于计划开始时间,说明结束了
|
||||
while (startDate <= planStartDate)
|
||||
{
|
||||
@ -51,8 +55,8 @@ namespace GZ_LTHPilot_ORDER.ScheduleService
|
||||
InsertDataToTempTable(ctx, tableName, orgId, receiveAmountList);
|
||||
|
||||
}
|
||||
startDate = startDate.AddMonths(1);
|
||||
endDate = startDate.AddMonths(1);
|
||||
startDate = startDate.AddMonths(Cycle);
|
||||
endDate = startDate.AddMonths(Cycle);
|
||||
}
|
||||
}
|
||||
UpdateSaleOrderReceiveAmount(ctx, tableName);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user