fixbug weekReport

master
wangning 7 years ago
parent 6d727a4b7a
commit 95e2330926

@ -0,0 +1,31 @@
package au.com.royalpay.payment.manage.task;
import au.com.royalpay.payment.manage.analysis.core.WeekReporter;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.Date;
import javax.annotation.Resource;
/**
* Created by wangning on 24/01/2018.
*/
@Component
@ConditionalOnProperty(value = "app.run-tasks", havingValue = "true")
public class WeekReportGenerationTask {
@Resource
private WeekReporter weekReporter;
@Scheduled(cron = "0 0 2 * * 1")
public void autoGenerateReport() {
Date lastweek = new Date();
lastweek = DateUtils.addDays(lastweek, -7);
weekReporter.generateReport(DateFormatUtils.format(lastweek, "yyyy-MM-dd"), true);
}
}

@ -186,10 +186,10 @@
<div class="weui-cell__bd weui-cell_primary"
th:text="${bd.bd_name}">
<span style="color: green"
th:if="${bd.compare and bd.compare.direction>0}"
th:if="${bd.compare and $bd.compare.direction>0}"
th:text="'↑('+${bd.compare.value}+')'"></span>
<span style="color: red"
th:if="${bd.compare and bd.compare.direction>0}"
th:if="${bd.compare and $bd.compare.direction>0}"
th:text="'↓('+${bd.compare.value}+')'"></span>
</div>
<div class="weui-cell__ft" th:text="${bd.total}"></div>

Loading…
Cancel
Save