Commit e9bb927c authored by Quxl's avatar Quxl

x

parent 8368a263
...@@ -63,6 +63,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService { ...@@ -63,6 +63,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
if(items != null) { if(items != null) {
for(ITEM item : items) { for(ITEM item : items) {
if(item != null) {
String GOODS_CODE = item.getMATNR(); String GOODS_CODE = item.getMATNR();
Map<String, Object> goods = getGoods(DIS_CODE, GOODS_CODE); Map<String, Object> goods = getGoods(DIS_CODE, GOODS_CODE);
if (goods == null) { if (goods == null) {
...@@ -115,6 +116,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService { ...@@ -115,6 +116,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
} }
} }
} }
}
} catch (Exception e) { } catch (Exception e) {
isSuccess = false; isSuccess = false;
throw new XRException(ThrowableUtil.getCaused(e).getMessage(), e); throw new XRException(ThrowableUtil.getCaused(e).getMessage(), e);
......
...@@ -63,6 +63,7 @@ public class PriceListServiceImpl implements PriceListService { ...@@ -63,6 +63,7 @@ public class PriceListServiceImpl implements PriceListService {
} }
if(items != null) { if(items != null) {
for(ITEM item : items) { for(ITEM item : items) {
if(item != null) {
String MATNR = item.getMATNR(); String MATNR = item.getMATNR();
Map<String, Object> priceObj = getPriceObj(KUNNR, MATNR); Map<String, Object> priceObj = getPriceObj(KUNNR, MATNR);
if (priceObj == null) { if (priceObj == null) {
...@@ -100,6 +101,7 @@ public class PriceListServiceImpl implements PriceListService { ...@@ -100,6 +101,7 @@ public class PriceListServiceImpl implements PriceListService {
} }
} }
} }
}
} catch (Exception e) { } catch (Exception e) {
isSuccess = false; isSuccess = false;
throw new XRException(ThrowableUtil.getCaused(e).getMessage(), e); throw new XRException(ThrowableUtil.getCaused(e).getMessage(), e);
......
...@@ -71,6 +71,7 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ ...@@ -71,6 +71,7 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
if(HEADER_PARTNERs != null) { if(HEADER_PARTNERs != null) {
for(int i=0; i<HEADER_PARTNERs.size(); i++) { for(int i=0; i<HEADER_PARTNERs.size(); i++) {
HEADER_PARTNER HEADER_PARTNER = HEADER_PARTNERs.get(i); HEADER_PARTNER HEADER_PARTNER = HEADER_PARTNERs.get(i);
if(HEADER_PARTNER != null) {
String PARTNER_Q = HEADER_PARTNER.getPARTNER_Q(); String PARTNER_Q = HEADER_PARTNER.getPARTNER_Q();
String PARTNER_ID = HEADER_PARTNER.getPARTNER_ID(); String PARTNER_ID = HEADER_PARTNER.getPARTNER_ID();
String NAME1 = HEADER_PARTNER.getNAME1(); String NAME1 = HEADER_PARTNER.getNAME1();
...@@ -96,12 +97,15 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ ...@@ -96,12 +97,15 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
} }
} }
} }
}
List<HEADER_DATE> HEADER_DATEs= HEADER_DELIVERY.getHEADER_DATE(); List<HEADER_DATE> HEADER_DATEs= HEADER_DELIVERY.getHEADER_DATE();
if(HEADER_DATEs!=null) { if(HEADER_DATEs!=null) {
HEADER_DATE HEADER_DATE = HEADER_DATEs.get(0); HEADER_DATE HEADER_DATE = HEADER_DATEs.get(0);
if(HEADER_DATE != null) {
header.put("QUALF", HEADER_DATE.getQUALF()); header.put("QUALF", HEADER_DATE.getQUALF());
header.put("NTEND", HEADER_DATE.getNTEND()); header.put("NTEND", HEADER_DATE.getNTEND());
} }
}
header.put("BATCH", dateString + "-" + common.getNextval("T_SHIPPING_NOTIFICATION_HEADER_BATCH_"+dateString)); header.put("BATCH", dateString + "-" + common.getNextval("T_SHIPPING_NOTIFICATION_HEADER_BATCH_"+dateString));
header.put("SEND_STATUS", "N"); header.put("SEND_STATUS", "N");
header.put("TRACE_NO", "sapshippingnotification"+DateUtil.formatDate(now, DateUtil.FMT_DATETIME)); header.put("TRACE_NO", "sapshippingnotification"+DateUtil.formatDate(now, DateUtil.FMT_DATETIME));
...@@ -127,22 +131,28 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ ...@@ -127,22 +131,28 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
List<ITEM_REFERENCE_SO> ITEM_REFERENCE_SOs = ITEM.getITEM_REFERENCE_SO(); List<ITEM_REFERENCE_SO> ITEM_REFERENCE_SOs = ITEM.getITEM_REFERENCE_SO();
if(ITEM_REFERENCE_SOs!=null) { if(ITEM_REFERENCE_SOs!=null) {
ITEM_REFERENCE_SO ITEM_REFERENCE_SO = ITEM_REFERENCE_SOs.get(0); ITEM_REFERENCE_SO ITEM_REFERENCE_SO = ITEM_REFERENCE_SOs.get(0);
if(ITEM_REFERENCE_SO != null) {
item.put("REFERENCE_SO_QUALF", ITEM_REFERENCE_SO.getQUALF()); item.put("REFERENCE_SO_QUALF", ITEM_REFERENCE_SO.getQUALF());
item.put("REFERENCE_SO_BELNR", ITEM_REFERENCE_SO.getBELNR()); item.put("REFERENCE_SO_BELNR", ITEM_REFERENCE_SO.getBELNR());
item.put("REFERENCE_SO_POSNR", ITEM_REFERENCE_SO.getPOSNR()); item.put("REFERENCE_SO_POSNR", ITEM_REFERENCE_SO.getPOSNR());
} }
}
List<ITEM_REFERENCE_PO_TYPE> ITEM_REFERENCE_PO_TYPEs = ITEM.getITEM_REFERENCE_PO_TYPE(); List<ITEM_REFERENCE_PO_TYPE> ITEM_REFERENCE_PO_TYPEs = ITEM.getITEM_REFERENCE_PO_TYPE();
if(ITEM_REFERENCE_PO_TYPEs != null) { if(ITEM_REFERENCE_PO_TYPEs != null) {
for(int i=0; i<ITEM_REFERENCE_PO_TYPEs.size(); i++) { for(int i=0; i<ITEM_REFERENCE_PO_TYPEs.size(); i++) {
ITEM_REFERENCE_PO_TYPE ITEM_REFERENCE_PO_TYPE = ITEM_REFERENCE_PO_TYPEs.get(i); ITEM_REFERENCE_PO_TYPE ITEM_REFERENCE_PO_TYPE = ITEM_REFERENCE_PO_TYPEs.get(i);
if(ITEM_REFERENCE_PO_TYPE != null) {
item.put("REFERENCE_PO_TYPE_TDID"+(i+1), ITEM_REFERENCE_PO_TYPE.getTDID()); item.put("REFERENCE_PO_TYPE_TDID"+(i+1), ITEM_REFERENCE_PO_TYPE.getTDID());
List<ITEM_REFERENCE_PO_DATA> ITEM_REFERENCE_PO_DATAs = ITEM_REFERENCE_PO_TYPE.getITEM_REFERENCE_PO_DATA(); List<ITEM_REFERENCE_PO_DATA> ITEM_REFERENCE_PO_DATAs = ITEM_REFERENCE_PO_TYPE.getITEM_REFERENCE_PO_DATA();
if(ITEM_REFERENCE_PO_DATAs!=null&&ITEM_REFERENCE_PO_DATAs.size()>0) { if(ITEM_REFERENCE_PO_DATAs!=null&&ITEM_REFERENCE_PO_DATAs.size()>0) {
ITEM_REFERENCE_PO_DATA ITEM_REFERENCE_PO_DATA = ITEM_REFERENCE_PO_DATAs.get(0); ITEM_REFERENCE_PO_DATA ITEM_REFERENCE_PO_DATA = ITEM_REFERENCE_PO_DATAs.get(0);
if(ITEM_REFERENCE_PO_DATA != null) {
item.put("REFERENCE_PO_TYPE_TDLINE"+(i+1), ITEM_REFERENCE_PO_DATA.getTDLINE()); item.put("REFERENCE_PO_TYPE_TDLINE"+(i+1), ITEM_REFERENCE_PO_DATA.getTDLINE());
} }
} }
} }
}
}
item.put("CREATED", now); item.put("CREATED", now);
item.put("CREATEBY", "system"); item.put("CREATEBY", "system");
insertTo(item, "t_shipping_notification_item"); insertTo(item, "t_shipping_notification_item");
......
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