Merge remote-tracking branch 'origin/develop' into develop

master
eason.qian 7 years ago
commit 4a465db41f

@ -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);
}
}

@ -185,11 +185,11 @@
<div class="weui-cell__hd" th:text="${bd.sort}"></div>
<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:text="'↑('+${bd.compare.value}+')'"></span>
<span style="color: green"
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>

@ -36,8 +36,8 @@
<div class="weui-cell">
<div class="weui-cell__bd weui-cell_primary">较上周比较</div>
<div class="weui-cell__ft">
<span th:if="${partner.compare.direction>0}" th:text="'↑'+${$partner.compare.value}" style="color: green"></span>
<span th:if="${partner.compare.direction<0}" th:text="'↓'+${$partner.compare.value}" style="color: red" ></span>
<span th:if="${partner.compare.direction>0}" th:text="'↑'+${partner.compare.value}" style="color: green"></span>
<span th:if="${partner.compare.direction<0}" th:text="'↓'+${partner.compare.value}" style="color: red" ></span>
<span th:if="${partner.compare.direction==0}" th:text="${partner.compare.value}"></span>
</div>
</div>

Loading…
Cancel
Save