Commit 8c33046e authored by Quxl's avatar Quxl

x

parent 8dd59193
...@@ -66,9 +66,9 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService { ...@@ -66,9 +66,9 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
header.put("VTWEG", h.getVTWEG()); header.put("VTWEG", h.getVTWEG());
header.put("SPART", h.getSPART()); header.put("SPART", h.getSPART());
header.put("ERNAM", h.getERNAM()); header.put("ERNAM", h.getERNAM());
header.put("BSTDK", DateUtil.parseDateNoEmpty(h.getBSTDK(), DateUtil.FMT_DATE)); header.put("BSTDK", DateUtil.parseDate(h.getBSTDK(), DateUtil.FMT_DATE));
header.put("ERZET", DateUtil.parseDateNoEmpty(h.getERZET(), DateUtil.FMT_TIME)); header.put("ERZET", DateUtil.parseDate(h.getERZET(), DateUtil.FMT_TIME));
header.put("ERDAT", DateUtil.parseDateNoEmpty(h.getERDAT(), DateUtil.FMT_DATE)); header.put("ERDAT", DateUtil.parseDate(h.getERDAT(), DateUtil.FMT_DATE));
header.put("KUNNR", h.getKUNNR()); header.put("KUNNR", h.getKUNNR());
header.put("KGNNR", h.getKGNNR()); header.put("KGNNR", h.getKGNNR());
header.put("NAME1", h.getNAME1()); header.put("NAME1", h.getNAME1());
...@@ -107,14 +107,14 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService { ...@@ -107,14 +107,14 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
itemData.put("MATNR", id.getMATNR()); itemData.put("MATNR", id.getMATNR());
itemData.put("KWMENG", StringUtil.toDouble(id.getKWMENG())); itemData.put("KWMENG", StringUtil.toDouble(id.getKWMENG()));
itemData.put("VRKME", id.getVRKME()); itemData.put("VRKME", id.getVRKME());
itemData.put("EDATU", DateUtil.parseDateNoEmpty(id.getEDATU(), DateUtil.FMT_DATE)); itemData.put("EDATU", DateUtil.parseDate(id.getEDATU(), DateUtil.FMT_DATE));
itemData.put("CDATE", DateUtil.parseDateNoEmpty(id.getCDATE(), DateUtil.FMT_DATE)); itemData.put("CDATE", DateUtil.parseDate(id.getCDATE(), DateUtil.FMT_DATE));
itemData.put("REFLAG", id.getREFLAG()); itemData.put("REFLAG", id.getREFLAG());
itemData.put("MWSTI", StringUtil.toDouble(id.getMWSTI())); itemData.put("MWSTI", StringUtil.toDouble(id.getMWSTI()));
itemData.put("NETWRI", StringUtil.toDouble(id.getNETWRI())); itemData.put("NETWRI", StringUtil.toDouble(id.getNETWRI()));
itemData.put("WAERK_I", id.getWAERK_I()); itemData.put("WAERK_I", id.getWAERK_I());
itemData.put("WERKS", id.getWERKS()); itemData.put("WERKS", id.getWERKS());
itemData.put("ZZCRDDATE", "00000000".equals(ZZCRDDATE) ? "0000-00-00" : DateUtil.parseDateNoEmpty(ZZCRDDATE, DateUtil.FMT_DATE)); itemData.put("ZZCRDDATE", DateUtil.parseDate(ZZCRDDATE, DateUtil.FMT_DATE));
itemData.put("KGNNR_I", id.getKGNNR_I()); itemData.put("KGNNR_I", id.getKGNNR_I());
itemData.put("NAME1_I", id.getNAME1_I()); itemData.put("NAME1_I", id.getNAME1_I());
itemData.put("NAME2_I", id.getNAME2_I()); itemData.put("NAME2_I", id.getNAME2_I());
......
...@@ -82,7 +82,7 @@ public class PriceListServiceImpl implements PriceListService { ...@@ -82,7 +82,7 @@ public class PriceListServiceImpl implements PriceListService {
priceObj.put("MAKTX", item.getMAKTX()); priceObj.put("MAKTX", item.getMAKTX());
priceObj.put("PRSCH", StringUtil.toDouble(item.getPRSCH())); priceObj.put("PRSCH", StringUtil.toDouble(item.getPRSCH()));
priceObj.put("DATAM", DateUtil.parseDate(item.getDATAM(), DateUtil.FMT_DATE)); priceObj.put("DATAM", DateUtil.parseDate(item.getDATAM(), DateUtil.FMT_DATE));
priceObj.put("DATBI", DateUtil.parseDateNoEmpty(item.getDATBI(), DateUtil.FMT_DATE)); priceObj.put("DATBI", DateUtil.parseDate(item.getDATBI(), DateUtil.FMT_DATE));
priceObj.put("PLINE", item.getPLINE()); priceObj.put("PLINE", item.getPLINE());
priceObj.put("PRSCH_1", StringUtil.toDouble(item.getPRSCH_1())); priceObj.put("PRSCH_1", StringUtil.toDouble(item.getPRSCH_1()));
/* /*
......
...@@ -28,7 +28,9 @@ public class DateUtil { ...@@ -28,7 +28,9 @@ public class DateUtil {
} }
public static Object parseDate(String dateString, String fmt) { public static Object parseDate(String dateString, String fmt) {
if ("00000000".equals(dateString)) { if (dateString == null || dateString.trim().length() == 0) {
return null;
} else if ("00000000".equals(dateString)) {
return "0000-00-00"; return "0000-00-00";
} else { } else {
try { try {
...@@ -40,14 +42,6 @@ public class DateUtil { ...@@ -40,14 +42,6 @@ public class DateUtil {
} }
} }
public static Object parseDateNoEmpty(String dateString, String fmt) {
if (dateString != null && !dateString.equals("")) {
return parseDate(dateString, fmt);
} else {
return null;
}
}
public static DateFormat getFmt(String fmt) { public static DateFormat getFmt(String fmt) {
DateFormat df = fmtMap.get(fmt); DateFormat df = fmtMap.get(fmt);
if (df == null) { if (df == null) {
......
Markdown is supported
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