Skip to content
Snippets Groups Projects
Commit 5fd29885 authored by zhuxiang's avatar zhuxiang
Browse files

Merge branch 'feature/zhuxiang' into 'develop'

日期标准化

See merge request !153
parents a388916b 6816f68b
Branches feature/wzb
1 merge request!153日期标准化
Pipeline #114718 failed with stage
......@@ -75,6 +75,11 @@ public class ClaimAuditUtil {
if (ObjectUtil.isNull(mainOut.getValue())) {
mainOut.setValue("");
}
if ("invoiceDate".equals(mainOut.getKey())) {
String invoiceDate = mainOut.getValue();
invoiceDate = datefy(invoiceDate);
mainOut.setValue(invoiceDate);
}
// 地税票=是,无需验真
if ("isLocalInvoice".equals(mainOut.getKey()) && "是".equals(mainOut.getValue())) {
map.put("isVerify", "false");
......@@ -206,6 +211,46 @@ public class ClaimAuditUtil {
return maps;
}
private static String datefy(String dat) {
try {
if (ObjectUtil.isEmpty(dat)) {
return "";
}
String datPt1 = "";
String datPt2 = "";
if (dat.contains(" ")) {
datPt1 = dat.split(" ")[0];
datPt2 = dat.split(" ")[1];
} else {
datPt1 = dat;
datPt2 = "";
}
if (datPt1.length() < 10) {
String datPtt1 = datPt1.split("-")[0];
String datPtt2 = datPt1.split("-")[1];
String datPtt3 = datPt1.split("-")[2];
if (datPtt1.length() == 2) {
datPtt1 = "20" + datPtt1;
}
if (datPtt2.length() == 1) {
datPtt2 = "0" + datPtt2;
}
if (datPtt3.length() == 1) {
datPtt3 = "0" + datPtt3;
}
datPt1 = datPtt1 + "-" + datPtt2 + "-" + datPtt3;
}
if (ObjectUtil.isEmpty(datPt2)) {
return datPt1;
} else {
return datPt1 + " " + datPt2;
}
} catch (Exception ex) {
ex.printStackTrace();
return dat;
}
}
private static String getSeatBySeatPlace(String billType, String seatPlace, String trainNumber) {
if (billType.equals("火车票")) {
if (seatPlace.contains("软座")) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment