Update Person attributes
This commit is contained in:
parent
f0d5381b64
commit
7c6a0c1696
3 changed files with 11 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ public class PersonFactoryBuilder {
|
|||
private final static String CONSENT_HASH = "hash";
|
||||
private final static String CONSENT_DIV_CODE = "000-000";
|
||||
private final static String INQ_PURPOSE = "16";
|
||||
private final static String ODT = "Иной документ";
|
||||
|
||||
|
||||
private PersonService.PersonData personData;
|
||||
|
|
@ -58,6 +59,10 @@ public class PersonFactoryBuilder {
|
|||
person.setPn(getPn(passportData.getSerNum(), passportData.getIdNum()));
|
||||
person.setPd(passportData.getIssDate() != null ? DATE_FORMAT.format(CTUtil.localDatetoDate(passportData.getIssDate())) : DEFAULT_DATE);
|
||||
person.setDt(StringUtils.isNotBlank(passportData.getIdType2()) ? passportData.getIdType2() : passportData.getIdType());
|
||||
if (person.getDt() != null && person.getDt().equals("999")){
|
||||
person.setOdt(ODT);
|
||||
person.setConsentOdt(ODT);
|
||||
}
|
||||
person.setIp(IP);
|
||||
person.setUid(uid);
|
||||
person.setOksm(OKSM);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ public class Person {
|
|||
protected String pd;
|
||||
@XmlAttribute(name = "dt", required = true)
|
||||
protected String dt;
|
||||
@XmlAttribute(name = "odt")
|
||||
protected String odt;
|
||||
@XmlAttribute(name = "ip", required = true)
|
||||
protected String ip;
|
||||
@XmlAttribute(name = "consentDate")
|
||||
|
|
@ -73,6 +75,8 @@ public class Person {
|
|||
protected String consentDivCode;
|
||||
@XmlAttribute(name = "consentDt")
|
||||
protected String consentDt;
|
||||
@XmlAttribute(name = "consentOdt")
|
||||
protected String consentOdt;
|
||||
@XmlAttribute(name = "inqPurpose")
|
||||
protected String inqPurpose;
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ public class SignalsStaxXmlWriter extends StaxXmlWriter<Signals>{
|
|||
writerWrapper.addAttribute("pn", person.getPn());
|
||||
writerWrapper.addAttribute("pd", person.getPd());
|
||||
writerWrapper.addAttribute("dt", person.getDt());
|
||||
writerWrapper.addAttribute("odt", person.getOdt());
|
||||
writerWrapper.addAttribute("ip", person.getIp());
|
||||
writerWrapper.addAttribute("consentDate", person.getConsentDate());
|
||||
writerWrapper.addAttribute("consentPurpose", person.getConsentPurpose());
|
||||
|
|
@ -102,6 +103,7 @@ public class SignalsStaxXmlWriter extends StaxXmlWriter<Signals>{
|
|||
writerWrapper.addAttribute("consentPd", person.getConsentPd());
|
||||
writerWrapper.addAttribute("consentDivCode", person.getConsentDivCode());
|
||||
writerWrapper.addAttribute("consentDt", person.getConsentDt());
|
||||
writerWrapper.addAttribute("consentOdt", person.getConsentOdt());
|
||||
writerWrapper.addAttribute("inqPurpose", person.getInqPurpose());
|
||||
writerWrapper.addEndElement(name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue