Commit a9b1b172 authored by Quxl's avatar Quxl

x

parent fb1358f0
......@@ -104,9 +104,19 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
if(summaryList != null) {
for(int i = 0; i < summaryList.size(); i++) {
SUMMARY_GENERAL SUMMARY_GENERAL = summaryList.get(i);
headMap.put("SUMMARY_SUMID" + (i + 1), SUMMARY_GENERAL.getSUMID());
headMap.put("SUMMARY_SUMME" + (i + 1), SUMMARY_GENERAL.getSUMME());
headMap.put("SUMMARY_WAERQ" + (i + 1), SUMMARY_GENERAL.getWAERQ());
String SUMID = SUMMARY_GENERAL.getSUMID();
if("005".equals(SUMID)) {
headMap.put("SUMMARY_SUMID1", SUMMARY_GENERAL.getSUMID());
headMap.put("SUMMARY_SUMME1", SUMMARY_GENERAL.getSUMME());
headMap.put("SUMMARY_WAERQ1", SUMMARY_GENERAL.getWAERQ());
} else if("010".equals(SUMID)) {
headMap.put("SUMMARY_SUMID2", SUMMARY_GENERAL.getSUMID());
headMap.put("SUMMARY_SUMME2", SUMMARY_GENERAL.getSUMME());
headMap.put("SUMMARY_WAERQ2", SUMMARY_GENERAL.getWAERQ());
} else {
throw new XRException("Amount type undefined [" + SUMID + "] in SUMMARY_GENERAL");
}
}
}
headMap.put("BATCH", dateString + "-" + common.getNextval("T_PERFORM_INVOICE_HEADER_BATCH_" + dateString));
......@@ -146,8 +156,17 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
if(itemAmountList != null) {
for(int i = 0; i < itemAmountList.size(); i++) {
ITEM_AMOUNT_DATA ITEM_AMOUNT_DATA = itemAmountList.get(i);
itemDataMap.put("AMOUNT_QUALF" + (i + 1), ITEM_AMOUNT_DATA.getQUALF());
itemDataMap.put("AMOUNT_BETRG" + (i + 1), ITEM_AMOUNT_DATA.getBETRG());
String QUALF = ITEM_AMOUNT_DATA.getQUALF();
if("001".equals(QUALF)) {
itemDataMap.put("AMOUNT_QUALF1", ITEM_AMOUNT_DATA.getQUALF());
itemDataMap.put("AMOUNT_BETRG1", ITEM_AMOUNT_DATA.getBETRG());
} else if("003".equals(QUALF)) {
itemDataMap.put("AMOUNT_QUALF2", ITEM_AMOUNT_DATA.getQUALF());
itemDataMap.put("AMOUNT_BETRG2", ITEM_AMOUNT_DATA.getBETRG());
} else {
throw new XRException("Amount type undefined [" + QUALF + "] in ITEM_AMOUNT_LIST");
}
}
}
if(ITEM_VAT_DATA != null) {
......@@ -157,8 +176,16 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
if(poTypeList != null) {
for(int i = 0; i < poTypeList.size(); i++) {
ITEM_REFERENCE_PO_TYPE ITEM_REFERENCE_PO_TYPE = poTypeList.get(i);
itemDataMap.put("REFERENCE_PO_TYPE_TDID" + (i + 1), ITEM_REFERENCE_PO_TYPE.getTDID());
itemDataMap.put("REFERENCE_PO_DATA_TDLINE" + (i + 1), ITEM_REFERENCE_PO_TYPE.getITEM_REFERENCE_PO_DATA().getTDLINE());
String TDID = ITEM_REFERENCE_PO_TYPE.getTDID();
if("ZXI2".equals(TDID)) {
itemDataMap.put("REFERENCE_PO_TYPE_TDID1", ITEM_REFERENCE_PO_TYPE.getTDID());
itemDataMap.put("REFERENCE_PO_DATA_TDLINE1", ITEM_REFERENCE_PO_TYPE.getITEM_REFERENCE_PO_DATA().getTDLINE());
} else if("ZXI1".equals(TDID)) {
itemDataMap.put("REFERENCE_PO_TYPE_TDID2", ITEM_REFERENCE_PO_TYPE.getTDID());
itemDataMap.put("REFERENCE_PO_DATA_TDLINE2", ITEM_REFERENCE_PO_TYPE.getITEM_REFERENCE_PO_DATA().getTDLINE());
} else {
throw new XRException("Text type undefined [" + TDID + "] in ITEM_REFERENCE_PO_TYPE");
}
}
}
itemDataMap.put("CREATED", now);
......
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