Commit b0f936b4 authored by Quxl's avatar Quxl

x

parent 83923668
......@@ -140,7 +140,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
for(ITEM_DATA ITEM_DATA : itemList) {
Map<String, Object> itemDataMap = new HashMap<String, Object>();
Long itemId = Long.valueOf("" + now.getTime() + StringUtil.format(common.getNextval("T_PERFORM_INVOICE_ITEM_DATE_ID_" + dateString), "00000"));
ITEM_REFERENCE_DATA ITEM_REFERENCE_DATA = ITEM_DATA.getITEM_REFERENCE_DATA();
List<ITEM_REFERENCE_DATA> ITEM_REFERENCE_DATA_LIST = ITEM_DATA.getITEM_REFERENCE_DATA();
ITEM_MATERIAL_DATA ITEM_MATERIAL_DATA = ITEM_DATA.getITEM_MATERIAL_DATA();
List<ITEM_AMOUNT_DATA> itemAmountList = ITEM_DATA.getITEM_AMOUNT_DATA();
ITEM_VAT_DATA ITEM_VAT_DATA = ITEM_DATA.getITEM_VAT_DATA();
......@@ -153,10 +153,23 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
itemDataMap.put("MENEE", ITEM_DATA.getMENEE());
itemDataMap.put("WERKS", ITEM_DATA.getWERKS());
}
if(ITEM_REFERENCE_DATA != null) {
if(ITEM_REFERENCE_DATA_LIST != null) {
int size = ITEM_REFERENCE_DATA_LIST.size();
if(size > 2) {
throw new XRException("List[ITEM_REFERENCE_DATA] size cannot greater than maximum 2");
}
for(int i = 0; i < size; i++) {
ITEM_REFERENCE_DATA ITEM_REFERENCE_DATA = ITEM_REFERENCE_DATA_LIST.get(i);
if(i == 0) {
itemDataMap.put("REFERENCE_QUALF", ITEM_REFERENCE_DATA.getQUALF());
itemDataMap.put("REFERENCE_BELNR", ITEM_REFERENCE_DATA.getBELNR());
itemDataMap.put("REFERENCE_ZEILE", ITEM_REFERENCE_DATA.getZEILE());
} else if(i == 1) {
itemDataMap.put("REFERENCE_QUALF_DN", ITEM_REFERENCE_DATA.getQUALF());
itemDataMap.put("REFERENCE_BELNR_DN", ITEM_REFERENCE_DATA.getBELNR());
itemDataMap.put("REFERENCE_ZEILE_DN", ITEM_REFERENCE_DATA.getZEILE());
}
}
}
if(ITEM_MATERIAL_DATA != null) {
itemDataMap.put("MATERIAL_QUALF", ITEM_MATERIAL_DATA.getQUALF());
......
......@@ -290,7 +290,7 @@ public class Z_MT_SD_005_PERFORM_INVOICE {
@XmlAccessorType(XmlAccessType.FIELD)
public static class ITEM_DATA {
@XmlElement(required = false, nillable=true)
ITEM_REFERENCE_DATA ITEM_REFERENCE_DATA;
List<ITEM_REFERENCE_DATA> ITEM_REFERENCE_DATA;
@XmlElement(required = false, nillable=true)
ITEM_MATERIAL_DATA ITEM_MATERIAL_DATA;
@XmlElement(required = false, nillable=true)
......@@ -308,14 +308,6 @@ public class Z_MT_SD_005_PERFORM_INVOICE {
@XmlElement(required = false, nillable=true)
String WERKS;
public ITEM_REFERENCE_DATA getITEM_REFERENCE_DATA() {
return ITEM_REFERENCE_DATA;
}
public void setITEM_REFERENCE_DATA(ITEM_REFERENCE_DATA iTEM_REFERENCE_DATA) {
ITEM_REFERENCE_DATA = iTEM_REFERENCE_DATA;
}
public ITEM_MATERIAL_DATA getITEM_MATERIAL_DATA() {
return ITEM_MATERIAL_DATA;
}
......@@ -379,6 +371,14 @@ public class Z_MT_SD_005_PERFORM_INVOICE {
public void setWERKS(String wERKS) {
WERKS = wERKS;
}
public List<ITEM_REFERENCE_DATA> getITEM_REFERENCE_DATA() {
return ITEM_REFERENCE_DATA;
}
public void setITEM_REFERENCE_DATA(List<ITEM_REFERENCE_DATA> iTEM_REFERENCE_DATA) {
ITEM_REFERENCE_DATA = iTEM_REFERENCE_DATA;
}
}
@XmlType(name = "ITEM_REFERENCE_DATA")
......
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