|
|
@@ -955,9 +955,9 @@ public class FeiYunUtils {
|
|
|
}
|
|
|
}
|
|
|
//endregion
|
|
|
- if(sum_money_start != null){
|
|
|
+ if (sum_money_start != null) {
|
|
|
stringBuilder.append("名称 单价 数量 金额 <BR>");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
stringBuilder.append("名称 单价 数量<BR>");
|
|
|
}
|
|
|
|
|
|
@@ -987,7 +987,7 @@ public class FeiYunUtils {
|
|
|
}
|
|
|
stringBuilder.append(goods_num_start).append(orderGoods.getGoodsNum()).append(goods_num_end);
|
|
|
stringBuilder.append(" ");
|
|
|
- if(sum_money_start != null){
|
|
|
+ if (sum_money_start != null) {
|
|
|
stringBuilder.append(sum_money_start).append(sumMoney).append(sum_money_end);
|
|
|
}
|
|
|
stringBuilder.append("<BR>");
|
|
|
@@ -1235,11 +1235,12 @@ public class FeiYunUtils {
|
|
|
if (errandMoney == null) {
|
|
|
errandMoney = BigDecimal.ZERO;
|
|
|
}
|
|
|
- stringBuilder.append(errand_money_start).append("跑腿费:").append(errandMoney).append("元").append(errand_money_end + "<BR>");
|
|
|
+ BigDecimal errandMoneyT = errandMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
+ stringBuilder.append(errand_money_start).append("跑腿费:").append(errandMoneyT).append("元").append(errand_money_end + "<BR>");
|
|
|
//从这个表里拿优惠活动 activity_part_record 活动参与记录表
|
|
|
stringBuilder.append(activity_title_start).append("优惠活动:").append(activity == null ? "" : activity.getTitle()).append(activity_title_end + "<BR>");
|
|
|
- stringBuilder.append(pay_money_start).append("合计:").append(tbOrder.getPayMoney()).append("元").append(pay_money_end + "<BR>");
|
|
|
-
|
|
|
+ BigDecimal patMoney = tbOrder.getPayMoney().setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
+ stringBuilder.append(pay_money_start).append("合计:").append(patMoney).append("元").append(pay_money_end + "<BR>");
|
|
|
stringBuilder.append(payStringBuilder.toString());
|
|
|
//endregion
|
|
|
stringBuilder.append("--------------------------------<BR>");
|
|
|
@@ -1483,6 +1484,7 @@ public class FeiYunUtils {
|
|
|
}
|
|
|
|
|
|
String content = stringBuilder.toString();
|
|
|
+ log.info("打印内容:" + content);
|
|
|
//通过POST请求,发送打印信息到服务器
|
|
|
RequestConfig requestConfig = RequestConfig.custom()
|
|
|
.setSocketTimeout(30000)//读取超时
|