Commit 65a35955 authored by Quxl's avatar Quxl

x

parent d5affc7d
......@@ -63,6 +63,8 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
}
List<ITEM> items = RECORD.getITEM();
Long BATCHID = common.getNextval(dateString + "T_VEN_GOODS_BATCH_" + DIS_CODE);
String BATCH = dateString+"-"+BATCHID;
if(items != null) {
for(ITEM item : items) {
......@@ -75,7 +77,6 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
goods.put("DIS_CODE", DIS_CODE);
goods.put("DATUM", DateUtil.parseDate(DATUM, DateUtil.FMT_DATE));
goods.put("UZEIT", DateUtil.parseDate(UZEIT, DateUtil.FMT_TIME));
goods.put("GOODS_CODE", GOODS_CODE);
goods.put("ROUGH_WEIGHT", Double.valueOf(item.getBRGEW()));
goods.put("NET_WEIGHT", Double.valueOf(item.getNTGEW()));
......@@ -105,16 +106,12 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
goods.put("MEABM_B", item.getMEABM_B());
goods.put("PUBLIC", item.getPUBLIC());
goods.put("INTERNET", item.getINTERNET());
if(DIS_CODE == null || DIS_CODE.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, Distributor number cannot be empty");
}
Long BATCHID = common.getNextval(dateString + "T_VEN_GOODS_BATCH_" + DIS_CODE);
String BATCH = dateString+"-"+BATCHID;
goods.put("TRACE_NO", "sapmaterialmaster" + DateUtil.formatDate(now, DateUtil.FMT_DATETIME));
goods.put("BATCH", BATCH);
goods.put("SEND_STATUS", "N");
if (goods.get("ID") != null) {
updateGoods(goods);
} else {
......
......@@ -64,6 +64,10 @@ public class PriceListServiceImpl implements PriceListService {
DATUM = h.getDATUM();
UZEIT = h.getUZEIT();
}
if(KUNNR == null || KUNNR.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, Distributor number cannot be empty");
}
String BATCH = dateString + "-" + common.getNextval("T_PRICE_LIST_BATCH_" + KUNNR);
if(items != null) {
for(ITEM item : items) {
if(item != null) {
......@@ -72,12 +76,10 @@ public class PriceListServiceImpl implements PriceListService {
if (priceObj == null) {
priceObj = new HashMap<>();
}
priceObj.put("KUNNR", KUNNR);
priceObj.put("DATUM", DateUtil.parseDate(DATUM, DateUtil.FMT_DATE));
priceObj.put("UZEIT", DateUtil.parseDate(UZEIT, DateUtil.FMT_TIME));
priceObj.put("MATNR", MATNR);
priceObj.put("KBETR", StringUtil.toDouble(item.getKBETR()));
priceObj.put("KONWA", item.getKONWA());
priceObj.put("KPEIN", item.getKPEIN());
......@@ -89,15 +91,7 @@ public class PriceListServiceImpl implements PriceListService {
priceObj.put("DATBI", DateUtil.parseDate(item.getDATBI(), DateUtil.FMT_DATE));
priceObj.put("PLINE", item.getPLINE());
priceObj.put("PRSCH_1", StringUtil.toDouble(item.getPRSCH_1()));
priceObj.put("SEND_STATUS", "N");
if(KUNNR == null || KUNNR.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, Distributor number cannot be empty");
}
Long BATCHID = common.getNextval("T_PRICE_LIST_BATCH_" + KUNNR);
String BATCH = dateString + "-" + BATCHID;
priceObj.put("TRACE_NO", "sappricelist" + DateUtil.formatDate(now, DateUtil.FMT_DATETIME));
priceObj.put("BATCH", BATCH);
if (priceObj.get("ID") != 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