Commit 07be47b1 by lixinyi

instrId修改

parent 9bea3e94
...@@ -136,9 +136,8 @@ export default [ ...@@ -136,9 +136,8 @@ export default [
label: "Instruction Identification", label: "Instruction Identification",
tag: "instrId", tag: "instrId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+", type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+",
status: "O", status: "M",
maxLength: "16", maxLength: "16",
unable: true,
}, },
{ {
path: "2.0.1", path: "2.0.1",
......
...@@ -85,9 +85,8 @@ export default [ ...@@ -85,9 +85,8 @@ export default [
label: "Instruction Identification", label: "Instruction Identification",
tag: "instrId", tag: "instrId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,16}", type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,16}",
status: "O", status: "M",
maxLength: "16", maxLength: "16",
unable: true,
}, },
{ {
path: "2.0.1", path: "2.0.1",
......
...@@ -88,9 +88,8 @@ export default [ ...@@ -88,9 +88,8 @@ export default [
label: "Instruction Identification", label: "Instruction Identification",
tag: "instrId", tag: "instrId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+", type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+",
status: "O", status: "M",
maxLength: "16", maxLength: "16",
unable: true,
}, },
{ {
path: "2.0.1", path: "2.0.1",
......
...@@ -46,10 +46,9 @@ export default [{ ...@@ -46,10 +46,9 @@ export default [{
name: "Instruction Identification", name: "Instruction Identification",
label: "Instruction Identification", label: "Instruction Identification",
tag: "instrId", tag: "instrId",
status: "O", status: "M",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+", type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+",
maxLength: "35", maxLength: "35",
unable: true,
}, { }, {
path: "2.1", path: "2.1",
name: "Cheque Number", name: "Cheque Number",
...@@ -113,128 +112,8 @@ export default [{ ...@@ -113,128 +112,8 @@ export default [{
name: "Postal Address", name: "Postal Address",
label: "Postal Address", label: "Postal Address",
tag: "pstlAdr", tag: "pstlAdr",
status: "M",
children: [{
path: "2.6.1.0",
name: "Department",
label: "Department",
tag: "dept",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "70"
}, {
path: "2.6.1.1",
name: "Sub Department",
label: "Sub Department",
tag: "subDept",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "70"
}, {
path: "2.6.1.2",
name: "Street Name",
label: "Street Name",
tag: "strtNm",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "70"
}, {
path: "2.6.1.3",
name: "Building Number",
label: "Building Number",
tag: "bldgNb",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "16"
}, {
path: "2.6.1.4",
name: "Building Name",
label: "Building Name",
tag: "bldgNm",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "35"
}, {
path: "2.6.1.5",
name: "Floor",
label: "Floor",
tag: "flr",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "70"
}, {
path: "2.6.1.6",
name: "Post Box",
label: "Post Box",
tag: "pstBx",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "16"
}, {
path: "2.6.1.7",
name: "Room",
label: "Room",
tag: "room",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "70"
}, {
path: "2.6.1.8",
name: "Post Code",
label: "Post Code",
tag: "pstCd",
status: "O", status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+", type: "Address029",
maxLength: "16"
}, {
path: "2.6.1.9",
name: "Town Name",
label: "Town Name",
tag: "twnNm",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "35"
}, {
path: "2.6.1.10",
name: "Town Location Name",
label: "Town Location Name",
tag: "twnLctnNm",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "35"
}, {
path: "2.6.1.11",
name: "District Name",
label: "District Name",
tag: "dstrctNm",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "35"
}, {
path: "2.6.1.12",
name: "Country Sub Division",
label: "Country Sub Division",
tag: "ctrySubDvsn",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "35"
}, {
path: "2.6.1.13",
name: "Country",
label: "Country",
tag: "ctry",
status: "O",
type: "Select#countryCode",
maxLength: "2"
}, {
path: "2.6.1.14",
name: "Address Line",
label: "Address Line",
tag: "adrLine",
status: "O",
type: "List",
maxLength: "35,3"
}]
}, { }, {
path: "2.6.2", path: "2.6.2",
name: "Identification", name: "Identification",
...@@ -757,7 +636,7 @@ export default [{ ...@@ -757,7 +636,7 @@ export default [{
label: "Address Line", label: "Address Line",
tag: "adrLine", tag: "adrLine",
status: "O", status: "O",
type: "List", type: "List#[0-9a-zA-Z/-?:().,'+ !#$%&*=^_`{|}~\";<>@\[\\\]]+",
maxLength: "35,3" maxLength: "35,3"
}] }]
}] }]
...@@ -929,128 +808,8 @@ export default [{ ...@@ -929,128 +808,8 @@ export default [{
name: "Postal Address", name: "Postal Address",
label: "Postal Address", label: "Postal Address",
tag: "pstlAdr", tag: "pstlAdr",
status: "M",
children: [{
path: "2.10.1.0",
name: "Department",
label: "Department",
tag: "dept",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "70"
}, {
path: "2.10.1.1",
name: "Sub Department",
label: "Sub Department",
tag: "subDept",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "70"
}, {
path: "2.10.1.2",
name: "Street Name",
label: "Street Name",
tag: "strtNm",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "70"
}, {
path: "2.10.1.3",
name: "Building Number",
label: "Building Number",
tag: "bldgNb",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "16"
}, {
path: "2.10.1.4",
name: "Building Name",
label: "Building Name",
tag: "bldgNm",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "35"
}, {
path: "2.10.1.5",
name: "Floor",
label: "Floor",
tag: "flr",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "70"
}, {
path: "2.10.1.6",
name: "Post Box",
label: "Post Box",
tag: "pstBx",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "16"
}, {
path: "2.10.1.7",
name: "Room",
label: "Room",
tag: "room",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "70"
}, {
path: "2.10.1.8",
name: "Post Code",
label: "Post Code",
tag: "pstCd",
status: "O", status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+", type: "Address029",
maxLength: "16"
}, {
path: "2.10.1.9",
name: "Town Name",
label: "Town Name",
tag: "twnNm",
status: "O",
type: "TextInput",
maxLength: "35"
}, {
path: "2.10.1.10",
name: "Town Location Name",
label: "Town Location Name",
tag: "twnLctnNm",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "35"
}, {
path: "2.10.1.11",
name: "District Name",
label: "District Name",
tag: "dstrctNm",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "35"
}, {
path: "2.10.1.12",
name: "Country Sub Division",
label: "Country Sub Division",
tag: "ctrySubDvsn",
status: "O",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+",
maxLength: "35"
}, {
path: "2.10.1.13",
name: "Country",
label: "Country",
tag: "ctry",
status: "O",
type: "Select#countryCode",
maxLength: "2"
}, {
path: "2.10.1.14",
name: "Address Line",
label: "Address Line",
tag: "adrLine",
status: "O",
type: "List",
maxLength: "35,3"
}]
}, { }, {
path: "2.10.2", path: "2.10.2",
name: "Identification", name: "Identification",
......
...@@ -757,10 +757,9 @@ export default [ ...@@ -757,10 +757,9 @@ export default [
name : "Instruction Identification", name : "Instruction Identification",
label : "Instruction Identification", label : "Instruction Identification",
tag : "instrId", tag : "instrId",
status : "O", status : "M",
type : "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+", type : "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+",
maxLength : "16", maxLength : "16",
unable: true,
}, { }, {
path : "2.0.1", path : "2.0.1",
name : "End To End Identification", name : "End To End Identification",
......
...@@ -7,15 +7,13 @@ export default function validator(obj) { ...@@ -7,15 +7,13 @@ export default function validator(obj) {
if (!CBPR_Business_Service_Usage_TextualRule(obj.appHdr)) { if (!CBPR_Business_Service_Usage_TextualRule(obj.appHdr)) {
return false; return false;
} }
var chq = obj.chq; var element = obj.chq;
for (var index = 0; index < chq.length; index++) {
const element = chq[index];
//r9 //r9
if (!CBPR_Town_Name_And_Country_FormalRule(element.drwrAgt.finInstnId, `Cheque/DrawerAgent/Financial Institution Identification`)) { if (!CBPR_Town_Name_And_Country_FormalRule(element.drwrAgt.finInstnId.pstlAdr, `Cheque/DrawerAgent/Financial Institution Identification`)) {
return false; return false;
} }
//r10 //r10
if (!CBPR_Town_Name_And_Country_FormalRule(element.drwrAgt.finInstnId, `Cheque/DrawerAgent/Financial Institution Identification`)) { if (!CBPR_Town_Name_And_Country_FormalRule(element.drwrAgt.finInstnId.pstlAdr, `Cheque/DrawerAgent/Financial Institution Identification`)) {
return false; return false;
} }
//r21 //r21
...@@ -23,22 +21,27 @@ export default function validator(obj) { ...@@ -23,22 +21,27 @@ export default function validator(obj) {
return false; return false;
} }
//r19 //r19
if (!CBPR_Structured_vs_Unstructured_FormalRule(element.pyee.finInstnId.pstlAdr, `Cheque/Payee/Financial Institution Identification/Postal Address`)) { if (!CBPR_Structured_vs_Unstructured_FormalRule(element.pyee.pstlAdr, `Cheque/Payee`)) {
return false; return false;
} }
//r18 //r18
if (!CBPR_Agent_Name_Postal_Address_FormalRule(element.pyee, `Cheque/Payee`)) {
return false;
}
if (!CBPR_Agent_Name_Postal_Address_FormalRule(element.pyer, `Cheque/Payer`)) {
return false;
}
if (!CBPR_Agent_Name_Postal_Address_FormalRule(element.drwrAgt.finInstnId, `Cheque/DrawerAgent/Financial Institution Identification`)) { if (!CBPR_Agent_Name_Postal_Address_FormalRule(element.drwrAgt.finInstnId, `Cheque/DrawerAgent/Financial Institution Identification`)) {
return false; return false;
} }
//r20 //r20
if (!CBPR_Town_Name_And_Country_FormalRule(element.pyee.finInstnId, `Cheque/Payee/Financial Institution Identification`)) { if (!CBPR_Town_Name_And_Country_FormalRule(element.pyee.pstlAdr, `Cheque/Payee`)) {
return false; return false;
} }
//r22 //r22
if (!CBPR_Town_Name_And_Country_FormalRule(element.drwrAgt.finInstnId, `Cheque/DrawerAgent/Financial Institution Identification`)) { if (!CBPR_Town_Name_And_Country_FormalRule(element.drwrAgt.finInstnId.pstlAdr, `Cheque/DrawerAgent/Financial Institution Identification`)) {
return false; return false;
} }
}
return true; return true;
} }
......
...@@ -286,6 +286,9 @@ export default function validator(obj) { ...@@ -286,6 +286,9 @@ export default function validator(obj) {
if(!ChargesInformationAndInstructedAmountRule(obj)){ if(!ChargesInformationAndInstructedAmountRule(obj)){
return false; return false;
} }
if(!SettlementMethod_COVE(obj.grpHdr)){
return false;
}
...@@ -555,7 +558,7 @@ function CBPR_DEBT_FormalRule(obj) { ...@@ -555,7 +558,7 @@ function CBPR_DEBT_FormalRule(obj) {
const position = "Charge Bearer"; const position = "Charge Bearer";
var chrgsInf = obj.chrgsInf; var chrgsInf = obj.chrgsInf;
if ('DEBT' == obj.chrgBr) { if ('DEBT' == obj.chrgBr) {
if (isEmpty(chrgsInf) || chrgsInf.length != 1) { if (chrgsInf.length != 1) {
message(position, msg); message(position, msg);
return false; return false;
} }
...@@ -876,3 +879,18 @@ function ChargesInformationAndInstructedAmountRule(obj) { ...@@ -876,3 +879,18 @@ function ChargesInformationAndInstructedAmountRule(obj) {
} }
return true; return true;
} }
//如果结算方式等于COVE,则指示报销代理或指示报销代理必须在场。
function SettlementMethod_COVE(obj){
const msg = "If SettlementMethod is equal to COVE, then InstructedReimbursementAgent or InstructingReimbursementAgent must be present.";
if('COVE' == obj.sttlmInf.sttlmMtd){
if(isEmpty(obj.sttlmInf.instdRmbrsmntAgt)){
if(isEmpty(obj.sttlmInf.instgRmbrsmntAgt)){
message("Charge Bearer", msg);
return false;
}
}
}
return true;
}
\ No newline at end of file
...@@ -58,37 +58,37 @@ public class MxTransfer { ...@@ -58,37 +58,37 @@ public class MxTransfer {
String msgDefIdr = (String) gsonMaps.get("msgDefIdr"); String msgDefIdr = (String) gsonMaps.get("msgDefIdr");
// JSONObject grpHdr = (JSONObject)gsonMaps.get("grpHdr"); // JSONObject grpHdr = (JSONObject)gsonMaps.get("grpHdr");
// grpHdr.put("msgId",bizMsgIdr); // grpHdr.put("msgId",bizMsgIdr);
switch (msgDefIdr.substring(0,8)){ // switch (msgDefIdr.substring(0,8)){
case "pacs.008": // case "pacs.008":
JSONObject pmtId008 = (JSONObject)gsonMaps.get("pmtId"); // JSONObject pmtId008 = (JSONObject)gsonMaps.get("pmtId");
pmtId008.put("instrId",bizMsgIdr); // pmtId008.put("instrId",bizMsgIdr);
// pmtId008.put("endToEndId",bizMsgIdr); //// pmtId008.put("endToEndId",bizMsgIdr);
break;
case "pacs.009":
JSONObject pmtId009 = (JSONObject)gsonMaps.get("pmtId");
pmtId009.put("instrId",bizMsgIdr);
// pmtId009.put("endToEndId",bizMsgIdr);
break;
case "camt.107":
gsonMaps.put("instrId",bizMsgIdr);
// pmtId009.put("endToEndId",bizMsgIdr);
break;
// case "pacs.052":
// JSONObject rpt = (JSONObject)gsonMaps.get("rpt");
// rpt.put("id",bizMsgIdr);
// break; // break;
// case "pacs.053": // case "pacs.009":
// JSONObject stmt = (JSONObject)gsonMaps.get("stmt"); // JSONObject pmtId009 = (JSONObject)gsonMaps.get("pmtId");
// stmt.put("id",bizMsgIdr); // pmtId009.put("instrId",bizMsgIdr);
//// pmtId009.put("endToEndId",bizMsgIdr);
// break; // break;
// case "pacs.054": // case "camt.107":
// JSONObject ntfctn = (JSONObject)gsonMaps.get("ntfctn"); // gsonMaps.put("instrId",bizMsgIdr);
// ntfctn.put("id",bizMsgIdr); //// pmtId009.put("endToEndId",bizMsgIdr);
// break; // break;
// case "pacs.057": //// case "pacs.052":
// break; //// JSONObject rpt = (JSONObject)gsonMaps.get("rpt");
// //// rpt.put("id",bizMsgIdr);
} //// break;
//// case "pacs.053":
//// JSONObject stmt = (JSONObject)gsonMaps.get("stmt");
//// stmt.put("id",bizMsgIdr);
//// break;
//// case "pacs.054":
//// JSONObject ntfctn = (JSONObject)gsonMaps.get("ntfctn");
//// ntfctn.put("id",bizMsgIdr);
//// break;
//// case "pacs.057":
//// break;
////
// }
if ("rtgs".equals(tp)) { if ("rtgs".equals(tp)) {
resourceAsStream = MessageUtil.class.getResourceAsStream("/template/" + identifier + "_rtgs.properties"); resourceAsStream = MessageUtil.class.getResourceAsStream("/template/" + identifier + "_rtgs.properties");
resourceAsStream2 = MessageUtil.class.getResourceAsStream("/template/head00100102_rtgs.properties"); resourceAsStream2 = MessageUtil.class.getResourceAsStream("/template/head00100102_rtgs.properties");
......
<!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="favicon.ico"/><title>ISO手工拟报</title><script defer="defer" src="js/chunk-vendors.23ee7bd5.js"></script><script defer="defer" src="js/app.90843083.js"></script><script defer="defer" src="js/main.59945214.js"></script><link href="css/chunk-vendors.77489a8d.css" rel="stylesheet"><link href="css/app.d2831041.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but swiftiso-editor doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="favicon.ico"/><title>ISO手工拟报</title><script defer="defer" src="js/chunk-vendors.23ee7bd5.js"></script><script defer="defer" src="js/app.c9fac77d.js"></script><script defer="defer" src="js/main.59945214.js"></script><link href="css/chunk-vendors.77489a8d.css" rel="stylesheet"><link href="css/app.d2831041.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but swiftiso-editor doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file \ No newline at end of file
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