|
@@ -711,6 +711,9 @@ public class ElectronicMembershipCardController {
|
|
|
String content2;
|
|
|
String orderNoP = "";
|
|
|
String createdDateP ="";
|
|
|
+ String payDateP ="";
|
|
|
+ String oilGunP= "";
|
|
|
+ String receiptNameP="";
|
|
|
String stationNameP ="";
|
|
|
String oilNameP ="";
|
|
|
String orderLitersP ="";
|
|
@@ -730,13 +733,21 @@ public class ElectronicMembershipCardController {
|
|
|
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
createdDateP =sdf.format(infoMap.get("createdDate"));
|
|
|
}
|
|
|
+ if(infoMap.containsKey("payDate") && infoMap.get("payDate") !=null ){
|
|
|
+ //格式化日期
|
|
|
+ SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ payDateP =sdf.format(infoMap.get("payDate"));
|
|
|
+ }
|
|
|
+ if(infoMap.containsKey("oilGun") && infoMap.get("oilGun") !=null ){
|
|
|
+ oilGunP =infoMap.get("oilGun").toString();
|
|
|
+ }
|
|
|
if(infoMap.containsKey("stationName") && infoMap.get("stationName") !=null ){
|
|
|
stationNameP =infoMap.get("stationName").toString();
|
|
|
}
|
|
|
if(infoMap.containsKey("oilName") && infoMap.get("oilName") !=null ){
|
|
|
oilNameP =infoMap.get("oilName").toString();
|
|
|
}
|
|
|
- if(!infoMap.containsKey("oilType") && infoMap.get("oilType").equals("3")) {
|
|
|
+ if(infoMap.containsKey("oilType") && !infoMap.get("oilType").equals("3")) {
|
|
|
//加油升数
|
|
|
if (infoMap.containsKey("orderLiters") && infoMap.get("orderLiters") != null) {
|
|
|
orderLitersP = infoMap.get("orderLiters") + "";
|
|
@@ -748,11 +759,13 @@ public class ElectronicMembershipCardController {
|
|
|
if(infoMap.containsKey("discountAmt") && infoMap.get("discountAmt") !=null ){
|
|
|
discountAmtP =infoMap.get("discountAmt")+"";
|
|
|
}
|
|
|
+ receiptNameP = "油品订单";
|
|
|
}else{
|
|
|
orderLitersP ="0.00";
|
|
|
oilPirceP = "0.00";
|
|
|
discountAmtP ="0.00";
|
|
|
receivableAmtP=infoMap.get("amt")+"";
|
|
|
+ receiptNameP = "非油品订单";
|
|
|
}
|
|
|
if(infoMap.containsKey("receivableAmt") && infoMap.get("receivableAmt") !=null ){
|
|
|
receivableAmtP =infoMap.get("receivableAmt")+"";
|
|
@@ -775,41 +788,52 @@ public class ElectronicMembershipCardController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- content1 = "<CB>支付小票--顾客联</CB><BR>";
|
|
|
+ content1 = "<CB>"+receiptNameP+"--顾客联</CB><BR>";
|
|
|
+ content1 += "<BR>";
|
|
|
+ content1 += "--------------------------------<BR>";
|
|
|
+ content1 += "<BR>";
|
|
|
content1 += "订单号:"+orderNoP+" <BR>";
|
|
|
- content1 += "时间:"+createdDateP+" <BR>";
|
|
|
+ content1 += "支付方式: "+payWayP+" <BR>";
|
|
|
+ content1 += "下单时间:"+createdDateP+" <BR>";
|
|
|
+ content1 += "付款时间:"+payDateP+" <BR>";
|
|
|
content1 += "油站:"+stationNameP+" <BR>";
|
|
|
- if(!infoMap.containsKey("oilType") && infoMap.get("oilType").toString().equals("3")){
|
|
|
+ content1 += "油枪:"+oilGunP+"号枪<BR>";
|
|
|
+ if(infoMap.containsKey("oilType") && !infoMap.get("oilType").toString().equals("3")){
|
|
|
content1 += "油品: "+oilNameP+" <BR>";
|
|
|
content1 += "油量: "+orderLitersP+" 升<BR>";
|
|
|
content1 += "单价: "+oilPirceP+" L/元<BR>";
|
|
|
}
|
|
|
content1 += "<BOLD><B>原价: "+receivableAmtP+" 元</B></BOLD><BR>";
|
|
|
- if(!infoMap.containsKey("oilType") && infoMap.get("oilType").toString().equals("3")){
|
|
|
+ if(infoMap.containsKey("oilType") && !infoMap.get("oilType").toString().equals("3")){
|
|
|
content1 += "优惠: "+discountAmtP+" 元<BR>";
|
|
|
}
|
|
|
content1 += "支付: "+amtP+" 元<BR>";
|
|
|
- content1 += "支付方式: "+payWayP+" <BR>";
|
|
|
+ content1 += "手机号: "+mobilePhoneP+" <BR>";
|
|
|
content1 += "<BR>";
|
|
|
//content1 += "--------------------------------<BR>";
|
|
|
- content1 += "<BR>";
|
|
|
+ //content1 += "<BR>";
|
|
|
|
|
|
- content2 = "<CB>支付小票--商户联</CB><BR>";
|
|
|
- content2 += "订单号:"+orderNoP+" <BR>";
|
|
|
- content2 += "时间:"+createdDateP+"<BR>";
|
|
|
- content2 += "油站:"+stationNameP+" <BR>";
|
|
|
- if(!infoMap.containsKey("oilType") && infoMap.get("oilType").toString().equals("3")){
|
|
|
+ content2 = "<CB>"+receiptNameP+"--商户联</CB><BR>";
|
|
|
+ content2 += "<BR>";
|
|
|
+ content2 += "--------------------------------<BR>";
|
|
|
+ content1 += "<BR>";
|
|
|
+ content2 += "订单号:"+orderNoP+" <BR>";
|
|
|
+ content2 += "支付方式: "+payWayP+" <BR>";
|
|
|
+ content2 += "下单时间:"+createdDateP+" <BR>";
|
|
|
+ content2 += "付款时间:"+payDateP+" <BR>";
|
|
|
+ content2 += "油站:"+stationNameP+" <BR>";
|
|
|
+ content2 += "油枪:"+oilGunP+"号枪<BR>";
|
|
|
+ if(infoMap.containsKey("oilType") && !infoMap.get("oilType").toString().equals("3")){
|
|
|
content2 += "油品: "+oilNameP+" <BR>";
|
|
|
content2 += "油量: "+orderLitersP+" 升<BR>";
|
|
|
content2 += "单价: "+oilPirceP+" L/元<BR>";
|
|
|
}
|
|
|
content2 += "<BOLD><B>原价: "+receivableAmtP+" 元</B></BOLD><BR>";
|
|
|
- if(!infoMap.containsKey("oilType") && infoMap.get("oilType").toString().equals("3")){
|
|
|
+ if(infoMap.containsKey("oilType") && !infoMap.get("oilType").toString().equals("3")){
|
|
|
content2 += "优惠: "+discountAmtP+" 元<BR>";
|
|
|
}
|
|
|
content2 += "支付: "+amtP+" 元<BR>";
|
|
|
content2 += "手机号: "+mobilePhoneP+" <BR>";
|
|
|
- content2 += "支付方式: "+payWayP+" <BR>";
|
|
|
content2 += "<BR>";
|
|
|
//获取打印机编号
|
|
|
//sn = "921611605"; //测试打印机 sn:921611605 key:72338zma
|