|
|
@ -6,6 +6,7 @@ import au.com.royalpay.payment.tools.utils.PageListUtils;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@ -76,6 +77,10 @@ public class DataAnalysisServiceImpl implements DataAnalysisService {
|
|
|
|
BigDecimal totalClients = new BigDecimal(clientAnalysisMapper.countValidClientsAll(industry));
|
|
|
|
BigDecimal totalClients = new BigDecimal(clientAnalysisMapper.countValidClientsAll(industry));
|
|
|
|
for (JSONObject detail : data) {
|
|
|
|
for (JSONObject detail : data) {
|
|
|
|
BigDecimal industryClients = detail.getBigDecimal("industry_trans_clients");
|
|
|
|
BigDecimal industryClients = detail.getBigDecimal("industry_trans_clients");
|
|
|
|
|
|
|
|
if (!StringUtils.equalsIgnoreCase("0", industry)) {
|
|
|
|
|
|
|
|
industryClients = industryClients.subtract(new BigDecimal(1));
|
|
|
|
|
|
|
|
detail.put("industry_trans_clients", industryClients.setScale(0, RoundingMode.DOWN));
|
|
|
|
|
|
|
|
}
|
|
|
|
detail.put("total_client", totalClients.setScale(0, RoundingMode.DOWN));
|
|
|
|
detail.put("total_client", totalClients.setScale(0, RoundingMode.DOWN));
|
|
|
|
detail.put("in_total_pcent", industryClients.divide(totalClients, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)));
|
|
|
|
detail.put("in_total_pcent", industryClients.divide(totalClients, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|