|
@@ -43,6 +43,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.io.InputStream;
|
|
import java.io.InputStream;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
|
+import java.math.BigInteger;
|
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
@@ -527,10 +528,10 @@ public class FsStoreHealthOrderScrmController extends BaseController {
|
|
|
setCellValue(sheet, 28, 1, fsStoreScrm.getRefundPhone());//联系电话 这个地方拉取商家入驻的时候填写的退货电话
|
|
setCellValue(sheet, 28, 1, fsStoreScrm.getRefundPhone());//联系电话 这个地方拉取商家入驻的时候填写的退货电话
|
|
|
setCellValue(sheet, 29, 1, sdf.format(fsStorePaymentScrms.get(0).getRefundTime()));//退货日期
|
|
setCellValue(sheet, 29, 1, sdf.format(fsStorePaymentScrms.get(0).getRefundTime()));//退货日期
|
|
|
int startNul = 1;
|
|
int startNul = 1;
|
|
|
- Integer total = 0;
|
|
|
|
|
|
|
+ BigDecimal total = new BigDecimal(BigInteger.ZERO); //退款金额(元)总退款金额
|
|
|
for (int i = 0; i < items.size(); i++) {
|
|
for (int i = 0; i < items.size(); i++) {
|
|
|
setCellValue(sheet, 32, startNul + i, items.get(0).getMah());//生产企业名称
|
|
setCellValue(sheet, 32, startNul + i, items.get(0).getMah());//生产企业名称
|
|
|
- Integer tal = 0;
|
|
|
|
|
|
|
+ BigDecimal tal = new BigDecimal(BigInteger.ZERO);
|
|
|
String jsonInfo = items.get(i).getJsonInfo();
|
|
String jsonInfo = items.get(i).getJsonInfo();
|
|
|
if (StringUtils.isNotEmpty(jsonInfo)) {
|
|
if (StringUtils.isNotEmpty(jsonInfo)) {
|
|
|
StoreOrderProductDTO cartInfo = JSONObject.parseObject(jsonInfo, StoreOrderProductDTO.class);
|
|
StoreOrderProductDTO cartInfo = JSONObject.parseObject(jsonInfo, StoreOrderProductDTO.class);
|
|
@@ -542,10 +543,10 @@ public class FsStoreHealthOrderScrmController extends BaseController {
|
|
|
setCellValue(sheet, 36, startNul + i, String.valueOf(cartInfo.getPrice()));//单价(元)
|
|
setCellValue(sheet, 36, startNul + i, String.valueOf(cartInfo.getPrice()));//单价(元)
|
|
|
setCellValue(sheet, 37, startNul + i, cartInfo.getNum() == null || cartInfo.getPrice() == null ? "" : String.valueOf(cartInfo.getPrice().multiply(new BigDecimal(cartInfo.getNum()))));//退货金额(元) 单个产品的单价*数量
|
|
setCellValue(sheet, 37, startNul + i, cartInfo.getNum() == null || cartInfo.getPrice() == null ? "" : String.valueOf(cartInfo.getPrice().multiply(new BigDecimal(cartInfo.getNum()))));//退货金额(元) 单个产品的单价*数量
|
|
|
if (cartInfo.getNum() != null && cartInfo.getPrice() != null) {
|
|
if (cartInfo.getNum() != null && cartInfo.getPrice() != null) {
|
|
|
- tal = cartInfo.getNum() * (Integer.valueOf(String.valueOf(cartInfo.getPrice())));
|
|
|
|
|
|
|
+ tal = new BigDecimal(cartInfo.getNum()).multiply(cartInfo.getPrice());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- total += tal;
|
|
|
|
|
|
|
+ total=total.add(tal);
|
|
|
}
|
|
}
|
|
|
setCellValue(sheet, 34, 1, fsStoreOrderScrm.getVerifyCode());//有效期/追溯码 这应该药品的追溯码一样,都是发货的时候才会上传
|
|
setCellValue(sheet, 34, 1, fsStoreOrderScrm.getVerifyCode());//有效期/追溯码 这应该药品的追溯码一样,都是发货的时候才会上传
|
|
|
|
|
|