package com.changhong.epc.constter.parsing.bill;
|
|
import com.iemsoft.framework.cloud.core.tools.DateTool;
|
import com.iemsoft.framework.cloud.core.tools.StringUtil;
|
|
import java.util.Objects;
|
|
public interface ConstBill {
|
|
/**
|
* head-费用类型
|
* body-费用类型
|
*/
|
String BILL_TYPE = "billType";
|
|
/**
|
* 票据模板类型
|
*/
|
String BILL_MODEL_TYPE = "billModelType";
|
|
/**
|
* 旅客姓名
|
*/
|
String PERSONAL_NAME = "PersonalName";
|
|
/**
|
* 出发地
|
*/
|
String FROM = "From_site";
|
|
/**
|
* 出发地级市
|
*/
|
String FROM_SIT = "FromSit";
|
|
/**
|
* 到达地
|
*/
|
String TO = "To_site";
|
|
/**
|
* 到达地级市
|
*/
|
String TO_SIT = "ToSit";
|
|
/**
|
* 出发日期
|
*/
|
String FROM_DATE = "FromDate";
|
|
/**
|
* 出发时点
|
*/
|
String FROM_TIME = "FromTime";
|
|
/**
|
* 到达日期
|
*/
|
String TO_DATE = "ToDate";
|
|
/**
|
* 到达时点
|
*/
|
String TO_TIME = "ToTime";
|
|
/**
|
* 离开日期
|
*/
|
String LEAVE_DATE = "LeaveDate";
|
|
/**
|
* 离开时点
|
*/
|
String LEAVE_TIME = "LeaveTime";
|
|
/**
|
* 交通方式
|
*/
|
String VEHICLE = "Vehicle";
|
|
/**
|
* 交通类型
|
*/
|
String TRAFFIC_TYPE = "trafficType";
|
|
/**
|
* 交通席别
|
*/
|
String SEAT_LEVEL = "SeatLevel";
|
|
/**
|
* 合计金额
|
*/
|
String AMOUNT = "Amount";
|
|
/**
|
* 附加金额-保险费
|
*/
|
String PREMIUM = "Premium";
|
|
/**
|
* 附加金额-手续费
|
*/
|
String SERVICE_AMOUNT = "ServiceAmount";
|
|
/**
|
* 附加金额-燃油附加费
|
*/
|
String BS_AMOUNT = "BSAmount";
|
|
/**
|
* 附加金额-其他税费
|
*/
|
String O_TAX_AMOUNT = "OTaxAmount";
|
|
/**
|
* 行项-含税金额
|
*/
|
String R_IAMOUT = "R_IAmout";
|
|
/**
|
* 行项-不含税金额
|
*/
|
String R_EAMOUT = "R_EAmout";
|
|
/**
|
* 行项-增值税额
|
*/
|
String R_VTAX = "R_VTax";
|
|
/**
|
* 开票日期
|
*/
|
String BILL_DATE = "BillDate";
|
|
String BILL_CORRENCY = "currency";
|
|
default String format(String key, String value){
|
if(StringUtil.isBlank(key) || StringUtil.isBlank(value)){
|
return value;
|
}
|
if(Objects.equals(StringUtil.trim(key), FROM_DATE) || Objects.equals(StringUtil.trim(key), TO_DATE)){
|
return DateTool.dateToString(DateTool.stringToDate(value), DateTool.DATE_PATTERN);
|
}else if(Objects.equals(StringUtil.trim(key), FROM_TIME) || Objects.equals(StringUtil.trim(key), TO_TIME)){
|
if(!value.matches("[0-9]{2}.[0-9]{2}")){
|
return "00:00";
|
}
|
return value.replaceAll("[^0-9]", ":");
|
}else{
|
return value;
|
}
|
}
|
|
}
|