1
This commit is contained in:
@@ -152,6 +152,7 @@ module.exports = {
|
||||
const models = Framework.getModels();
|
||||
const { apply_records, op } = models;
|
||||
const { sn_code, startTime, endTime } = ctx.query;
|
||||
console.log(startTime, endTime);
|
||||
const final_sn_code = sn_code;
|
||||
|
||||
if (!final_sn_code) {
|
||||
@@ -192,15 +193,7 @@ module.exports = {
|
||||
const monthStart = new Date(now.getFullYear(), now.getMonth(), 1);
|
||||
monthStart.setHours(0, 0, 0, 0);
|
||||
|
||||
// 构建统计查询条件
|
||||
const buildWhereWithTime = (additionalWhere = {}) => {
|
||||
const where = { ...baseWhere, ...additionalWhere };
|
||||
// 如果提供了时间范围,则不再使用默认的今日、本周、本月时间
|
||||
if (startTime || endTime) {
|
||||
return where;
|
||||
}
|
||||
return where;
|
||||
};
|
||||
|
||||
|
||||
const [
|
||||
totalCount,
|
||||
|
||||
Reference in New Issue
Block a user