|
@@ -3,6 +3,7 @@ package org.jeecg.modules.purCode.controller;
|
|
|
import java.io.OutputStream;
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
import java.io.IOException;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.net.URLDecoder;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
@@ -853,9 +854,20 @@ public class PurOrderController {
|
|
|
purOrder.setPurchaseEmail(sysUser.getEmail());
|
|
|
|
|
|
int rowNum = 1;
|
|
|
+
|
|
|
+ BigDecimal orderMoney = new BigDecimal(0);
|
|
|
for (PurOrderProduct product : productList){
|
|
|
product.setRowNumber(rowNum++);
|
|
|
+ orderMoney = orderMoney.add(product.getTaxAmount());
|
|
|
+ if (product.getDeliveryTime() != null){
|
|
|
+ product.setDeliverDateText(DateUtils.date2Str(product.getDeliveryTime(), DateUtils.date_sdf.get()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(productList.size() > 0){
|
|
|
+
|
|
|
+ purOrder.setQualityGrade(productList.get(0).getQualityGrade());
|
|
|
}
|
|
|
+ purOrder.setOrderMoney(orderMoney);
|
|
|
|
|
|
FillConfig fillConfig = FillConfig.builder().direction(WriteDirectionEnum.VERTICAL).forceNewRow(Boolean.TRUE).build();
|
|
|
excelWriter.fill(new FillWrapper(productList), fillConfig, writeSheet);
|