Commit 546c4ea1 authored by Quxl's avatar Quxl

x

parent b0f936b4
......@@ -105,6 +105,33 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
headMap.put("BANK_ACNUM", HEADER_BANK_DATA.getACNUM());
}
if(HEADER_ORGANIZATIONAL_DATA != null) {
List<String> QUALF_LIST = HEADER_ORGANIZATIONAL_DATA.getQUALF();
List<String> ORGID_LIST = HEADER_ORGANIZATIONAL_DATA.getORGID();
if(QUALF_LIST != null && ORGID_LIST != null && QUALF_LIST.size() == ORGID_LIST.size()) {
for(int i = 0; i < QUALF_LIST.size(); i++) {
String QUALF = QUALF_LIST.get(i);
String ORGID = ORGID_LIST.get(i);
if("008".equals(QUALF)) {
headMap.put("ORGANIZATIONAL_QUALF1", QUALF);
headMap.put("ORGANIZATIONAL_ORGID1", ORGID);
} else if("007".equals(QUALF)) {
headMap.put("ORGANIZATIONAL_QUALF2", QUALF);
headMap.put("ORGANIZATIONAL_ORGID2", ORGID);
} else if("006".equals(QUALF)) {
headMap.put("ORGANIZATIONAL_QUALF3", QUALF);
headMap.put("ORGANIZATIONAL_ORGID3", ORGID);
} else if("015".equals(QUALF)) {
headMap.put("ORGANIZATIONAL_QUALF4", QUALF);
headMap.put("ORGANIZATIONAL_ORGID4", ORGID);
} 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");
}
headMap.put("ORGANIZATIONAL_QUALF", HEADER_ORGANIZATIONAL_DATA.getQUALF());
headMap.put("ORGANIZATIONAL_ORGID", HEADER_ORGANIZATIONAL_DATA.getORGID());
}
......
......@@ -230,23 +230,19 @@ public class Z_MT_SD_005_PERFORM_INVOICE {
@XmlAccessorType(XmlAccessType.FIELD)
public static class HEADER_ORGANIZATIONAL_DATA {
@XmlElement(required = false, nillable=true)
String QUALF;
List<String> QUALF;
@XmlElement(required = false, nillable=true)
String ORGID;
public String getQUALF() {
List<String> ORGID;
public List<String> getQUALF() {
return QUALF;
}
public void setQUALF(String qUALF) {
public void setQUALF(List<String> qUALF) {
QUALF = qUALF;
}
public String getORGID() {
public List<String> getORGID() {
return ORGID;
}
public void setORGID(String oRGID) {
public void setORGID(List<String> 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