TASK:mixi;

This commit is contained in:
shahaibo
2024-09-14 21:03:31 +08:00
parent a39c60b5e5
commit b080b47644
3 changed files with 14 additions and 2 deletions

View File

@@ -80,9 +80,9 @@ public class MiTuExportScheduledTask {
// WeeklyHeavyStockReport();
// QuarterlyProductGroupingReport();
// customerTypeAnalysis();
getBestSell30Days();
// getBestSell30Days();
// getData();
runDailySalesIncentiveStatisticsForPast30Days();
// runDailySalesIncentiveStatisticsForPast30Days();
// updateProductStock();
}

View File

@@ -10,4 +10,6 @@ public class TaskRuleQuery extends PageQueryBaseVo {
private String startTime;
private String endTime;
private String salesmanName;
}

View File

@@ -30,6 +30,7 @@ import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.sql.*;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Date;
@@ -110,6 +111,15 @@ public class SalesIncentivesServiceImpl extends ServiceImpl<TaskRuleMapper, Task
queryWrapper.le("create_time", taskRuleQuery.getEndTime());
}
if (taskRuleQuery.getStartTime() == null && taskRuleQuery.getEndTime() == null) {
LocalDateTime oneMonthAgo = LocalDateTime.now().minusMonths(1);
queryWrapper.ge("create_time", oneMonthAgo);
}
if (taskRuleQuery.getSalesmanName() != null) {
queryWrapper.eq("salesman_name", taskRuleQuery.getSalesmanName());
}
queryWrapper.select("salesman_name, SUM(incentive_num) as incentiveNum")
.groupBy("salesman_name")
.orderByDesc("SUM(incentive_num)");