TASK:mixi;
This commit is contained in:
@@ -80,9 +80,9 @@ public class MiTuExportScheduledTask {
|
|||||||
// WeeklyHeavyStockReport();
|
// WeeklyHeavyStockReport();
|
||||||
// QuarterlyProductGroupingReport();
|
// QuarterlyProductGroupingReport();
|
||||||
// customerTypeAnalysis();
|
// customerTypeAnalysis();
|
||||||
getBestSell30Days();
|
// getBestSell30Days();
|
||||||
// getData();
|
// getData();
|
||||||
runDailySalesIncentiveStatisticsForPast30Days();
|
// runDailySalesIncentiveStatisticsForPast30Days();
|
||||||
// updateProductStock();
|
// updateProductStock();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,4 +10,6 @@ public class TaskRuleQuery extends PageQueryBaseVo {
|
|||||||
private String startTime;
|
private String startTime;
|
||||||
|
|
||||||
private String endTime;
|
private String endTime;
|
||||||
|
|
||||||
|
private String salesmanName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import org.springframework.util.StringUtils;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -110,6 +111,15 @@ public class SalesIncentivesServiceImpl extends ServiceImpl<TaskRuleMapper, Task
|
|||||||
queryWrapper.le("create_time", taskRuleQuery.getEndTime());
|
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")
|
queryWrapper.select("salesman_name, SUM(incentive_num) as incentiveNum")
|
||||||
.groupBy("salesman_name")
|
.groupBy("salesman_name")
|
||||||
.orderByDesc("SUM(incentive_num)");
|
.orderByDesc("SUM(incentive_num)");
|
||||||
|
|||||||
Reference in New Issue
Block a user