Commit f621dafd authored by Quxl's avatar Quxl

x

parent a7770b31
...@@ -73,7 +73,7 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService { ...@@ -73,7 +73,7 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
header.put("SPART", h.getSPART()); header.put("SPART", h.getSPART());
header.put("ERNAM", h.getERNAM()); header.put("ERNAM", h.getERNAM());
header.put("BSTDK", DateUtil.parseDate(h.getBSTDK(), DateUtil.FMT_DATE)); header.put("BSTDK", DateUtil.parseDate(h.getBSTDK(), DateUtil.FMT_DATE));
header.put("ERZET", DateUtil.parseDate(h.getERZET(), DateUtil.FMT_TIME)); header.put("ERZET", DateUtil.parseTime_HHmmss(h.getERZET()));
header.put("ERDAT", DateUtil.parseDate(h.getERDAT(), DateUtil.FMT_DATE)); header.put("ERDAT", DateUtil.parseDate(h.getERDAT(), DateUtil.FMT_DATE));
header.put("KUNNR", KUNNR); header.put("KUNNR", KUNNR);
header.put("KGNNR", h.getKGNNR()); header.put("KGNNR", h.getKGNNR());
......
...@@ -79,7 +79,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService { ...@@ -79,7 +79,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
} }
goods.put("DIS_CODE", DIS_CODE); goods.put("DIS_CODE", DIS_CODE);
goods.put("DATUM", DateUtil.parseDate(DATUM, DateUtil.FMT_DATE)); goods.put("DATUM", DateUtil.parseDate(DATUM, DateUtil.FMT_DATE));
goods.put("UZEIT", DateUtil.parseDate(UZEIT, DateUtil.FMT_TIME)); goods.put("UZEIT", DateUtil.parseTime_HHmmss(UZEIT));
goods.put("GOODS_CODE", GOODS_CODE); goods.put("GOODS_CODE", GOODS_CODE);
goods.put("ROUGH_WEIGHT", Double.valueOf(item.getBRGEW())); goods.put("ROUGH_WEIGHT", Double.valueOf(item.getBRGEW()));
goods.put("NET_WEIGHT", Double.valueOf(item.getNTGEW())); goods.put("NET_WEIGHT", Double.valueOf(item.getNTGEW()));
......
...@@ -78,7 +78,7 @@ public class PriceListServiceImpl implements PriceListService { ...@@ -78,7 +78,7 @@ public class PriceListServiceImpl implements PriceListService {
} }
priceObj.put("KUNNR", KUNNR); priceObj.put("KUNNR", KUNNR);
priceObj.put("DATUM", DateUtil.parseDate(DATUM, DateUtil.FMT_DATE)); priceObj.put("DATUM", DateUtil.parseDate(DATUM, DateUtil.FMT_DATE));
priceObj.put("UZEIT", DateUtil.parseDate(UZEIT, DateUtil.FMT_TIME)); priceObj.put("UZEIT", DateUtil.parseTime_HHmmss(UZEIT));
priceObj.put("MATNR", MATNR); priceObj.put("MATNR", MATNR);
priceObj.put("KBETR", StringUtil.toDouble(item.getKBETR())); priceObj.put("KBETR", StringUtil.toDouble(item.getKBETR()));
priceObj.put("KONWA", item.getKONWA()); priceObj.put("KONWA", item.getKONWA());
......
package com.egolm.sso.util; package com.egolm.sso.util;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
...@@ -9,7 +10,6 @@ import com.egolm.sso.config.XRException; ...@@ -9,7 +10,6 @@ import com.egolm.sso.config.XRException;
public class DateUtil { public class DateUtil {
public static final String FMT_DATE = "yyyyMMdd"; public static final String FMT_DATE = "yyyyMMdd";
public static final String FMT_TIME = "HHmmss";
public static final String FMT_DATE_TIME = "yyyy-MM-dd HH:mm:ss"; public static final String FMT_DATE_TIME = "yyyy-MM-dd HH:mm:ss";
public static final String FMT_DATETIME = "yyyyMMddHHmmss"; public static final String FMT_DATETIME = "yyyyMMddHHmmss";
...@@ -33,4 +33,18 @@ public class DateUtil { ...@@ -33,4 +33,18 @@ public class DateUtil {
} }
} }
public static final DateFormat format_HHmmss = new SimpleDateFormat("HHmmss");
public static Date parseTime_HHmmss(String timeString) {
try {
return format_HHmmss.parse(timeString);
} catch (ParseException e) {
throw new XRException("Error time value " + timeString, e);
}
}
public static void main(String[] args) {
String timeString = "121212";
System.out.println(DateUtil.parseTime_HHmmss(timeString));
}
} }
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