添加一河两岸统计
parent
8f416af91e
commit
8a6eee5165
|
|
@ -2153,7 +2153,7 @@ public class OrderStatService {
|
|||
|
||||
List<Record> sups = Db.find("select t.*, s.yield from supermarket t \n" +
|
||||
" left join supermarket_yield s on s.supermarket_id = t.id and s.year = ? \n" +
|
||||
" where id <= 6", year);
|
||||
" where id <= 6 or id = 11 ", year);
|
||||
|
||||
String paramsSql = "";
|
||||
if (invoice_type != null) {
|
||||
|
|
@ -2170,12 +2170,14 @@ public class OrderStatService {
|
|||
" ifnull(sum(case when g.supermarket_id = 4 then g.weight end), 0) xsl_4,\n" +
|
||||
" ifnull(sum(case when g.supermarket_id = 5 or g.supermarket_id = 9 then g.weight end), 0) xsl_5,\n" +
|
||||
" ifnull(sum(case when g.supermarket_id = 6 or g.supermarket_id = 8 or g.supermarket_id = 10 then g.weight end), 0) xsl_6,\n" +
|
||||
" ifnull(sum(case when g.supermarket_id = 11 then g.weight end), 0) xsl_11,\n" +
|
||||
" ifnull(sum(case when g.supermarket_id = 1 or g.supermarket_id = 7 then g.total_price end), 0) xse_1,\n" +
|
||||
" ifnull(sum(case when g.supermarket_id = 2 then g.total_price end), 0) xse_2,\n" +
|
||||
" ifnull(sum(case when g.supermarket_id = 3 then g.total_price end), 0) xse_3,\n" +
|
||||
" ifnull(sum(case when g.supermarket_id = 4 then g.total_price end), 0) xse_4,\n" +
|
||||
" ifnull(sum(case when g.supermarket_id = 5 or g.supermarket_id = 9 then g.total_price end), 0) xse_5,\n" +
|
||||
" ifnull(sum(case when g.supermarket_id = 6 or g.supermarket_id = 8 or g.supermarket_id = 10 then g.total_price end), 0) xse_6\n" +
|
||||
" ifnull(sum(case when g.supermarket_id = 6 or g.supermarket_id = 8 or g.supermarket_id = 10 then g.total_price end), 0) xse_6,\n" +
|
||||
" ifnull(sum(case when g.supermarket_id = 11 then g.total_price end), 0) xse_11\n" +
|
||||
" from (\n" +
|
||||
" select\n" +
|
||||
" ifnull(t.customer_id, 0) customer_id,\n" +
|
||||
|
|
@ -2293,12 +2295,14 @@ public class OrderStatService {
|
|||
double all_xsl_4 = 0.0;
|
||||
double all_xsl_5 = 0.0;
|
||||
double all_xsl_6 = 0.0;
|
||||
double all_xsl_11 = 0.0;
|
||||
double all_xse_1 = 0.0;
|
||||
double all_xse_2 = 0.0;
|
||||
double all_xse_3 = 0.0;
|
||||
double all_xse_4 = 0.0;
|
||||
double all_xse_5 = 0.0;
|
||||
double all_xse_6 = 0.0;
|
||||
double all_xse_11 = 0.0;
|
||||
|
||||
for (Record record : typelist) {
|
||||
Integer customer_type_id = record.getInt("customer_type_id");
|
||||
|
|
@ -2318,12 +2322,14 @@ public class OrderStatService {
|
|||
double xsl_4 = 0.0;
|
||||
double xsl_5 = 0.0;
|
||||
double xsl_6 = 0.0;
|
||||
double xsl_11 = 0.0;
|
||||
double xse_1 = 0.0;
|
||||
double xse_2 = 0.0;
|
||||
double xse_3 = 0.0;
|
||||
double xse_4 = 0.0;
|
||||
double xse_5 = 0.0;
|
||||
double xse_6 = 0.0;
|
||||
double xse_11 = 0.0;
|
||||
|
||||
for (Record r : list) {
|
||||
prepay_total_amount += DataUtil.getDefaultByRecord(r, "prepay_total_amount");
|
||||
|
|
@ -2337,12 +2343,14 @@ public class OrderStatService {
|
|||
xsl_4 += DataUtil.getDefaultByRecord(r, "xsl_4");
|
||||
xsl_5 += DataUtil.getDefaultByRecord(r, "xsl_5");
|
||||
xsl_6 += DataUtil.getDefaultByRecord(r, "xsl_6");
|
||||
xsl_11 += DataUtil.getDefaultByRecord(r, "xsl_11");
|
||||
xse_1 += DataUtil.getDefaultByRecord(r, "xse_1");
|
||||
xse_2 += DataUtil.getDefaultByRecord(r, "xse_2");
|
||||
xse_3 += DataUtil.getDefaultByRecord(r, "xse_3");
|
||||
xse_4 += DataUtil.getDefaultByRecord(r, "xse_4");
|
||||
xse_5 += DataUtil.getDefaultByRecord(r, "xse_5");
|
||||
xse_6 += DataUtil.getDefaultByRecord(r, "xse_6");
|
||||
xse_11 += DataUtil.getDefaultByRecord(r, "xse_11");
|
||||
|
||||
all_prepay_total_amount += DataUtil.getDefaultByRecord(r, "prepay_total_amount");
|
||||
all_refund_total_amount += DataUtil.getDefaultByRecord(r, "refund_total_amount");
|
||||
|
|
@ -2355,12 +2363,14 @@ public class OrderStatService {
|
|||
all_xsl_4 += DataUtil.getDefaultByRecord(r, "xsl_4");
|
||||
all_xsl_5 += DataUtil.getDefaultByRecord(r, "xsl_5");
|
||||
all_xsl_6 += DataUtil.getDefaultByRecord(r, "xsl_6");
|
||||
all_xsl_11 += DataUtil.getDefaultByRecord(r, "xsl_11");
|
||||
all_xse_1 += DataUtil.getDefaultByRecord(r, "xse_1");
|
||||
all_xse_2 += DataUtil.getDefaultByRecord(r, "xse_2");
|
||||
all_xse_3 += DataUtil.getDefaultByRecord(r, "xse_3");
|
||||
all_xse_4 += DataUtil.getDefaultByRecord(r, "xse_4");
|
||||
all_xse_5 += DataUtil.getDefaultByRecord(r, "xse_5");
|
||||
all_xse_6 += DataUtil.getDefaultByRecord(r, "xse_6");
|
||||
all_xse_11 += DataUtil.getDefaultByRecord(r, "xse_11");
|
||||
}
|
||||
|
||||
record.set("prepay_total_amount", prepay_total_amount);
|
||||
|
|
@ -2374,12 +2384,14 @@ public class OrderStatService {
|
|||
record.set("xsl_4", xsl_4);
|
||||
record.set("xsl_5", xsl_5);
|
||||
record.set("xsl_6", xsl_6);
|
||||
record.set("xsl_11", xsl_11);
|
||||
record.set("xse_1", xse_1);
|
||||
record.set("xse_2", xse_2);
|
||||
record.set("xse_3", xse_3);
|
||||
record.set("xse_4", xse_4);
|
||||
record.set("xse_5", xse_5);
|
||||
record.set("xse_6", xse_6);
|
||||
record.set("xse_11", xse_11);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2409,12 +2421,14 @@ public class OrderStatService {
|
|||
record.set("xsl_4", all_xsl_4);
|
||||
record.set("xsl_5", all_xsl_5);
|
||||
record.set("xsl_6", all_xsl_6);
|
||||
record.set("xsl_11", all_xsl_11);
|
||||
record.set("xse_1", all_xse_1);
|
||||
record.set("xse_2", all_xse_2);
|
||||
record.set("xse_3", all_xse_3);
|
||||
record.set("xse_4", all_xse_4);
|
||||
record.set("xse_5", all_xse_5);
|
||||
record.set("xse_6", all_xse_6);
|
||||
record.set("xse_11", all_xse_11);
|
||||
|
||||
typelist.add(record);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue