添加总合计
parent
cd5d3555a7
commit
ab92687b40
|
|
@ -2039,7 +2039,7 @@ public class OrderStatService {
|
||||||
Row row3 = sheet.createRow(2);
|
Row row3 = sheet.createRow(2);
|
||||||
int a2 = 8;
|
int a2 = 8;
|
||||||
|
|
||||||
for (int i=0; i<sups.size(); i++) {
|
for (int i = 0; i < sups.size(); i++) {
|
||||||
Record s = sups.get(i);
|
Record s = sups.get(i);
|
||||||
Double yield = DataUtil.getDoubleByRecord(s, "yield");
|
Double yield = DataUtil.getDoubleByRecord(s, "yield");
|
||||||
|
|
||||||
|
|
@ -2282,6 +2282,24 @@ public class OrderStatService {
|
||||||
|
|
||||||
List<Record> typelist = Db.find("select id customer_type_id, name customer_type_name, name from customer_type");
|
List<Record> typelist = Db.find("select id customer_type_id, name customer_type_name, name from customer_type");
|
||||||
|
|
||||||
|
double all_prepay_total_amount = 0.0;
|
||||||
|
double all_refund_total_amount = 0.0;
|
||||||
|
double all_prepay_surplus = 0.0;
|
||||||
|
double all_weight = 0.0;
|
||||||
|
double all_total_price = 0.0;
|
||||||
|
double all_xsl_1 = 0.0;
|
||||||
|
double all_xsl_2 = 0.0;
|
||||||
|
double all_xsl_3 = 0.0;
|
||||||
|
double all_xsl_4 = 0.0;
|
||||||
|
double all_xsl_5 = 0.0;
|
||||||
|
double all_xsl_6 = 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;
|
||||||
|
|
||||||
for (Record record : typelist) {
|
for (Record record : typelist) {
|
||||||
Integer customer_type_id = record.getInt("customer_type_id");
|
Integer customer_type_id = record.getInt("customer_type_id");
|
||||||
|
|
||||||
|
|
@ -2325,6 +2343,24 @@ public class OrderStatService {
|
||||||
xse_4 += DataUtil.getDefaultByRecord(r, "xse_4");
|
xse_4 += DataUtil.getDefaultByRecord(r, "xse_4");
|
||||||
xse_5 += DataUtil.getDefaultByRecord(r, "xse_5");
|
xse_5 += DataUtil.getDefaultByRecord(r, "xse_5");
|
||||||
xse_6 += DataUtil.getDefaultByRecord(r, "xse_6");
|
xse_6 += DataUtil.getDefaultByRecord(r, "xse_6");
|
||||||
|
|
||||||
|
all_prepay_total_amount += DataUtil.getDefaultByRecord(r, "prepay_total_amount");
|
||||||
|
all_refund_total_amount += DataUtil.getDefaultByRecord(r, "refund_total_amount");
|
||||||
|
all_prepay_surplus += DataUtil.getDefaultByRecord(r, "prepay_surplus");
|
||||||
|
all_weight += DataUtil.getDefaultByRecord(r, "weight");
|
||||||
|
all_total_price += DataUtil.getDefaultByRecord(r, "total_price");
|
||||||
|
all_xsl_1 += DataUtil.getDefaultByRecord(r, "xsl_1");
|
||||||
|
all_xsl_2 += DataUtil.getDefaultByRecord(r, "xsl_2");
|
||||||
|
all_xsl_3 += DataUtil.getDefaultByRecord(r, "xsl_3");
|
||||||
|
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_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");
|
||||||
}
|
}
|
||||||
|
|
||||||
record.set("prepay_total_amount", prepay_total_amount);
|
record.set("prepay_total_amount", prepay_total_amount);
|
||||||
|
|
@ -2358,6 +2394,30 @@ public class OrderStatService {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Record record = new Record();
|
||||||
|
|
||||||
|
record.set("customer_type_id", -1);
|
||||||
|
record.set("name", "合计");
|
||||||
|
record.set("prepay_total_amount", all_prepay_total_amount);
|
||||||
|
record.set("refund_total_amount", all_refund_total_amount);
|
||||||
|
record.set("prepay_surplus", all_prepay_surplus);
|
||||||
|
record.set("weight", all_weight);
|
||||||
|
record.set("total_price", all_total_price);
|
||||||
|
record.set("xsl_1", all_xsl_1);
|
||||||
|
record.set("xsl_2", all_xsl_2);
|
||||||
|
record.set("xsl_3", all_xsl_3);
|
||||||
|
record.set("xsl_4", all_xsl_4);
|
||||||
|
record.set("xsl_5", all_xsl_5);
|
||||||
|
record.set("xsl_6", all_xsl_6);
|
||||||
|
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);
|
||||||
|
|
||||||
|
typelist.add(record);
|
||||||
|
|
||||||
return new Record().set("data", typelist).set("supermarket", sups);
|
return new Record().set("data", typelist).set("supermarket", sups);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue