Commit 83923668 authored by Quxl's avatar Quxl

x

parent 13546b9c
......@@ -60,6 +60,8 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
header.put("MSGTXT", MESSAGE.getMSGTXT());
}
if(h != null) {
String KUNNR = h.getKUNNR();
header.put("BSTKD_E", h.getBSTKD_E());
header.put("VBELN", h.getVBELN());
header.put("VKORG", h.getVKORG());
......@@ -69,7 +71,7 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
header.put("BSTDK", DateUtil.parseDate(h.getBSTDK(), DateUtil.FMT_DATE));
header.put("ERZET", DateUtil.parseDate(h.getERZET(), DateUtil.FMT_TIME));
header.put("ERDAT", DateUtil.parseDate(h.getERDAT(), DateUtil.FMT_DATE));
header.put("KUNNR", h.getKUNNR());
header.put("KUNNR", KUNNR);
header.put("KGNNR", h.getKGNNR());
header.put("NAME1", h.getNAME1());
header.put("NAME2", h.getNAME2());
......@@ -84,7 +86,12 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
header.put("WAERK", h.getWAERK());
header.put("DPFLAG", h.getDPFLAG());
header.put("SEND_STATUS", "N");
header.put("BATCH", dateString + "-" + common.getNextval("T_SO_CONFIRMACTION_HEADER_BATCH_" + dateString));
if(KUNNR == null || KUNNR.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, Distributor number cannot be empty");
}
header.put("BATCH", dateString + "-" + common.getNextval("T_SO_CONFIRMACTION_HEADER_BATCH_" + KUNNR));
header.put("CREATED", now);
header.put("CREATEBY", "system");
String idIndex = StringUtil.format(common.getNextval("T_SO_CONFIRMATION_HEADER_ID_"+dateString), "00000");
......
......@@ -45,6 +45,7 @@ public class DNDeletionServiceImpl implements DNDeletionService {
try {
Map<String, Object> map = new HashMap<String, Object>();
Long ID = Long.valueOf("" + System.currentTimeMillis() + StringUtil.format(common.getNextval("T_SO_DN_DELETION_ID" + dateString), "00000"));
String SOLD_TO = DELETED_DOCUMENTS.getSOLD_TO();
map.put("ID", ID);
map.put("MESSAGE_ID", DELETED_DOCUMENTS.getMSGID());
map.put("TARGET_SYSTEM", DELETED_DOCUMENTS.getTARGET_SYSTEM());
......@@ -52,8 +53,12 @@ public class DNDeletionServiceImpl implements DNDeletionService {
map.put("DOCUMENT_NUMBER", DELETED_DOCUMENTS.getDOCNUMBER());
map.put("SALES_ORG", DELETED_DOCUMENTS.getSALES_ORG());
map.put("DELETED_BY", DELETED_DOCUMENTS.getDELETED_BY());
map.put("SOLD_TO", DELETED_DOCUMENTS.getSOLD_TO());
map.put("BATCH", dateString + "-" + common.getNextval("T_SO_DN_DELETION_BATCH" + dateString));
map.put("SOLD_TO", SOLD_TO);
if(SOLD_TO == null || SOLD_TO.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, Distributor number cannot be empty");
}
map.put("BATCH", dateString + "-" + common.getNextval("T_SO_DN_DELETION_BATCH" + SOLD_TO));
map.put("TRACE_NO", "sapsodndeletion" + DateUtil.formatDate(now, DateUtil.FMT_DATETIME));
map.put("SEND_STATUS", "N");
map.put("CREATED", now);
......
......@@ -103,7 +103,10 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
goods.put("PUBLIC", item.getPUBLIC());
goods.put("INTERNET", item.getINTERNET());
Long BATCHID = common.getNextval(dateString + "T_VEN_GOODS_BATCH_" + dateString);
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);
......
......@@ -74,6 +74,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
headMap.put("GENERAL_BELNR", HEADER_GENERAL_DATA.getBELNR());
headMap.put("GENERAL_ZTERM", HEADER_GENERAL_DATA.getZTERM());
}
String BATCH_CODE = null;
if(partnerList != null) {
for(HEADER_PARTNER_DATA HEADER_PARTNER_DATA : partnerList) {
if(HEADER_PARTNER_DATA != null) {
......@@ -81,6 +82,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
if("AG".equals(PARVW)) {
headMap.put("PARTNER_PARVW1", HEADER_PARTNER_DATA.getPARVW());
headMap.put("PARTNER_PARTN1", HEADER_PARTNER_DATA.getPARTN());
BATCH_CODE = PARVW;
} else if("WE".equals(PARVW)) {
headMap.put("PARTNER_PARVW2", HEADER_PARTNER_DATA.getPARVW());
headMap.put("PARTNER_PARTN2", HEADER_PARTNER_DATA.getPARTN());
......@@ -125,7 +127,10 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
}
}
}
headMap.put("BATCH", dateString + "-" + common.getNextval("T_PERFORM_INVOICE_HEADER_BATCH_" + dateString));
if(BATCH_CODE == null || BATCH_CODE.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, Distributor number cannot be empty");
}
headMap.put("BATCH", dateString + "-" + common.getNextval("T_PERFORM_INVOICE_HEADER_BATCH_" + BATCH_CODE));
headMap.put("TRACE_NO", "sapproformainvoice" + DateUtil.formatDate(now, DateUtil.FMT_DATETIME));
headMap.put("CREATED", now);
headMap.put("CREATEBY", "system");
......
......@@ -88,7 +88,11 @@ public class PriceListServiceImpl implements PriceListService {
priceObj.put("PRSCH_1", StringUtil.toDouble(item.getPRSCH_1()));
priceObj.put("SEND_STATUS", "N");
Long BATCHID = common.getNextval("T_PRICE_LIST_BATCH_" + dateString);
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));
......
......@@ -60,6 +60,7 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
if(Z_DT_SD_007_SHIPPING_NOTIFICATION_FILE != null) {
HEADER_DELIVERY HEADER_DELIVERY = Z_DT_SD_007_SHIPPING_NOTIFICATION_FILE.getHEADER_DELIVERY();
if(HEADER_DELIVERY != null) {
String BATCH_CODE = null;
header.put("DELIVERY_VBELN", HEADER_DELIVERY.getVBELN());
header.put("DELIVERY_LFART", HEADER_DELIVERY.getLFART());
header.put("DELIVERY_INCO1", HEADER_DELIVERY.getINCO1());
......@@ -79,6 +80,7 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
String POSTL_COD1 = HEADER_PARTNER.getPOSTL_COD1();
String CITY1 = HEADER_PARTNER.getCITY1();
if("AG".equals(PARTNER_Q)) {
BATCH_CODE = PARTNER_ID;
header.put("PARTNER_Q1", PARTNER_Q);
header.put("PARTNER_ID1", PARTNER_ID);
header.put("PARTNER_NAME1_1", NAME1);
......@@ -103,6 +105,9 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
header.put("QUALF", HEADER_DATE.getQUALF());
header.put("NTEND", HEADER_DATE.getNTEND());
}
if(BATCH_CODE == null || BATCH_CODE.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, Distributor number cannot be empty");
}
header.put("BATCH", dateString + "-" + common.getNextval("T_SHIPPING_NOTIFICATION_HEADER_BATCH_"+dateString));
header.put("SEND_STATUS", "N");
header.put("TRACE_NO", "sapshippingnotification"+DateUtil.formatDate(now, DateUtil.FMT_DATETIME));
......
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