Commit 4670221e authored by Quxl's avatar Quxl

x

parent 56b439aa
...@@ -68,7 +68,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService { ...@@ -68,7 +68,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
HEADER_DOCU_DATE HEADER_DOCU_DATE = Z_DT_SD_005_PERFORM_INVOICE.getHEADER_DOCU_DATE(); HEADER_DOCU_DATE HEADER_DOCU_DATE = Z_DT_SD_005_PERFORM_INVOICE.getHEADER_DOCU_DATE();
HEADER_REFERENCE_DATA HEADER_REFERENCE_DATA = Z_DT_SD_005_PERFORM_INVOICE.getHEADER_REFERENCE_DATA(); HEADER_REFERENCE_DATA HEADER_REFERENCE_DATA = Z_DT_SD_005_PERFORM_INVOICE.getHEADER_REFERENCE_DATA();
HEADER_BANK_DATA HEADER_BANK_DATA = Z_DT_SD_005_PERFORM_INVOICE.getHEADER_BANK_DATA(); HEADER_BANK_DATA HEADER_BANK_DATA = Z_DT_SD_005_PERFORM_INVOICE.getHEADER_BANK_DATA();
HEADER_ORGANIZATIONAL_DATA HEADER_ORGANIZATIONAL_DATA = Z_DT_SD_005_PERFORM_INVOICE.getHEADER_ORGANIZATIONAL_DATA(); List<HEADER_ORGANIZATIONAL_DATA> HEADER_ORGANIZATIONAL_DATA_LIST = Z_DT_SD_005_PERFORM_INVOICE.getHEADER_ORGANIZATIONAL_DATA();
List<SUMMARY_GENERAL> summaryList = Z_DT_SD_005_PERFORM_INVOICE.getSUMMARY_GENERAL(); List<SUMMARY_GENERAL> summaryList = Z_DT_SD_005_PERFORM_INVOICE.getSUMMARY_GENERAL();
List<ITEM_DATA> itemList = Z_DT_SD_005_PERFORM_INVOICE.getITEM_DATA(); List<ITEM_DATA> itemList = Z_DT_SD_005_PERFORM_INVOICE.getITEM_DATA();
Long headerId = Long.valueOf(now.getTime() + "" + StringUtil.format(common.getNextval("T_PERFORM_INVOICE_HEADER_ID"), "00000")); Long headerId = Long.valueOf(now.getTime() + "" + StringUtil.format(common.getNextval("T_PERFORM_INVOICE_HEADER_ID"), "00000"));
...@@ -108,31 +108,26 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService { ...@@ -108,31 +108,26 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
if(HEADER_BANK_DATA != null) { if(HEADER_BANK_DATA != null) {
headMap.put("BANK_ACNUM", HEADER_BANK_DATA.getACNUM()); headMap.put("BANK_ACNUM", HEADER_BANK_DATA.getACNUM());
} }
if(HEADER_ORGANIZATIONAL_DATA != null) {
List<String> QUALF_LIST = HEADER_ORGANIZATIONAL_DATA.getQUALF(); if(HEADER_ORGANIZATIONAL_DATA_LIST != null) {
List<String> ORGID_LIST = HEADER_ORGANIZATIONAL_DATA.getORGID(); for(HEADER_ORGANIZATIONAL_DATA HEADER_ORGANIZATIONAL_DATA : HEADER_ORGANIZATIONAL_DATA_LIST) {
if(QUALF_LIST != null && ORGID_LIST != null && QUALF_LIST.size() == ORGID_LIST.size()) { String QUALF = HEADER_ORGANIZATIONAL_DATA.getQUALF();
for(int i = 0; i < QUALF_LIST.size(); i++) { String ORGID = HEADER_ORGANIZATIONAL_DATA.getORGID();
String QUALF = QUALF_LIST.get(i); if("008".equals(QUALF)) {
String ORGID = ORGID_LIST.get(i); headMap.put("ORGANIZATIONAL_QUALF1", QUALF);
if("008".equals(QUALF)) { headMap.put("ORGANIZATIONAL_ORGID1", ORGID);
headMap.put("ORGANIZATIONAL_QUALF1", QUALF); } else if("007".equals(QUALF)) {
headMap.put("ORGANIZATIONAL_ORGID1", ORGID); headMap.put("ORGANIZATIONAL_QUALF2", QUALF);
} else if("007".equals(QUALF)) { headMap.put("ORGANIZATIONAL_ORGID2", ORGID);
headMap.put("ORGANIZATIONAL_QUALF2", QUALF); } else if("006".equals(QUALF)) {
headMap.put("ORGANIZATIONAL_ORGID2", ORGID); headMap.put("ORGANIZATIONAL_QUALF3", QUALF);
} else if("006".equals(QUALF)) { headMap.put("ORGANIZATIONAL_ORGID3", ORGID);
headMap.put("ORGANIZATIONAL_QUALF3", QUALF); } else if("015".equals(QUALF)) {
headMap.put("ORGANIZATIONAL_ORGID3", ORGID); headMap.put("ORGANIZATIONAL_QUALF4", QUALF);
} else if("015".equals(QUALF)) { headMap.put("ORGANIZATIONAL_ORGID4", ORGID);
headMap.put("ORGANIZATIONAL_QUALF4", QUALF); } else {
headMap.put("ORGANIZATIONAL_ORGID4", ORGID); throw new XRException("Organizational identity undefined [" + QUALF + "] in HEADER_ORGANIZATIONAL_DATA");
} else {
throw new XRException("Organizational identity undefined [" + QUALF + "] in HEADER_ORGANIZATIONAL_DATA");
}
} }
} else {
throw new XRException("The number of ORGID and QUALF does not match");
} }
} }
if(summaryList != null) { if(summaryList != null) {
......
...@@ -30,7 +30,7 @@ public class Z_MT_SD_005_PERFORM_INVOICE { ...@@ -30,7 +30,7 @@ public class Z_MT_SD_005_PERFORM_INVOICE {
@XmlElement(required = false, nillable=true) @XmlElement(required = false, nillable=true)
HEADER_BANK_DATA HEADER_BANK_DATA; HEADER_BANK_DATA HEADER_BANK_DATA;
@XmlElement(required = false, nillable=true) @XmlElement(required = false, nillable=true)
HEADER_ORGANIZATIONAL_DATA HEADER_ORGANIZATIONAL_DATA; List<HEADER_ORGANIZATIONAL_DATA> HEADER_ORGANIZATIONAL_DATA;
@XmlElement(required = false, nillable=true) @XmlElement(required = false, nillable=true)
List<ITEM_DATA> ITEM_DATA; List<ITEM_DATA> ITEM_DATA;
@XmlElement(required = false, nillable=true) @XmlElement(required = false, nillable=true)
...@@ -76,14 +76,6 @@ public class Z_MT_SD_005_PERFORM_INVOICE { ...@@ -76,14 +76,6 @@ public class Z_MT_SD_005_PERFORM_INVOICE {
HEADER_BANK_DATA = hEADER_BANK_DATA; HEADER_BANK_DATA = hEADER_BANK_DATA;
} }
public HEADER_ORGANIZATIONAL_DATA getHEADER_ORGANIZATIONAL_DATA() {
return HEADER_ORGANIZATIONAL_DATA;
}
public void setHEADER_ORGANIZATIONAL_DATA(HEADER_ORGANIZATIONAL_DATA hEADER_ORGANIZATIONAL_DATA) {
HEADER_ORGANIZATIONAL_DATA = hEADER_ORGANIZATIONAL_DATA;
}
public List<SUMMARY_GENERAL> getSUMMARY_GENERAL() { public List<SUMMARY_GENERAL> getSUMMARY_GENERAL() {
return SUMMARY_GENERAL; return SUMMARY_GENERAL;
} }
...@@ -99,6 +91,14 @@ public class Z_MT_SD_005_PERFORM_INVOICE { ...@@ -99,6 +91,14 @@ public class Z_MT_SD_005_PERFORM_INVOICE {
public void setITEM_DATA(List<ITEM_DATA> iTEM_DATA) { public void setITEM_DATA(List<ITEM_DATA> iTEM_DATA) {
ITEM_DATA = iTEM_DATA; ITEM_DATA = iTEM_DATA;
} }
public List<HEADER_ORGANIZATIONAL_DATA> getHEADER_ORGANIZATIONAL_DATA() {
return HEADER_ORGANIZATIONAL_DATA;
}
public void setHEADER_ORGANIZATIONAL_DATA(List<HEADER_ORGANIZATIONAL_DATA> hEADER_ORGANIZATIONAL_DATA) {
HEADER_ORGANIZATIONAL_DATA = hEADER_ORGANIZATIONAL_DATA;
}
} }
@XmlType(name = "HEADER_GENERAL_DATA") @XmlType(name = "HEADER_GENERAL_DATA")
...@@ -230,19 +230,19 @@ public class Z_MT_SD_005_PERFORM_INVOICE { ...@@ -230,19 +230,19 @@ public class Z_MT_SD_005_PERFORM_INVOICE {
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public static class HEADER_ORGANIZATIONAL_DATA { public static class HEADER_ORGANIZATIONAL_DATA {
@XmlElement(required = false, nillable=true) @XmlElement(required = false, nillable=true)
List<String> QUALF; String QUALF;
@XmlElement(required = false, nillable=true) @XmlElement(required = false, nillable=true)
List<String> ORGID; String ORGID;
public List<String> getQUALF() { public String getQUALF() {
return QUALF; return QUALF;
} }
public void setQUALF(List<String> qUALF) { public void setQUALF(String qUALF) {
QUALF = qUALF; QUALF = qUALF;
} }
public List<String> getORGID() { public String getORGID() {
return ORGID; return ORGID;
} }
public void setORGID(List<String> oRGID) { public void setORGID(String oRGID) {
ORGID = oRGID; ORGID = oRGID;
} }
} }
......
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