Commit d03c13b4 by lixinyi

报文标识号修改

parent 7fda7cb5
......@@ -84,6 +84,13 @@ export default{
data:data
})
},
getISOBankId(data){
return new link({
url:`/swift/getBankId`,
method:"post",
data:data
})
},
getBankId(data){
return new link({
url:`/cips/getBankId`,
......
......@@ -123,8 +123,12 @@ export default {
"txId" === this.dataModel.tag ||
"cdtId" === this.dataModel.tag
) {
var id = this.generateRandomString(16);//适应后端改为16
this.generateId(id);
send.getMsgId().then((res) => {
var data = res.data;
console.log(res);
id = data;
this.dataModel.defaultValue = this.generateId(id);
});
}else if(
("id" === this.dataModel.tag && "16" === this.dataModel.maxLength) ||
("instrId" === this.dataModel.tag && "16" === this.dataModel.maxLength) ||
......@@ -261,7 +265,7 @@ export default {
if (bicid != null || bicid != undefined) {
this.dataModel.defaultValue = this.generateId(bicid);
} else {
send.getBankId().then((res) => {
send.getISOBankId().then((res) => {
var data = res.data;
console.log(res);
bicid = data;
......
......@@ -20,9 +20,8 @@ export default [
label: "Message Identification",
tag: "msgId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "1.1",
......@@ -99,9 +98,8 @@ export default [
label: "Identification",
tag: "id",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "2.1",
......
......@@ -20,9 +20,8 @@ export default [
label: "Message Identification",
tag: "msgId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "1.1",
......@@ -99,9 +98,8 @@ export default [
label: "Identification",
tag: "id",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "2.1",
......
......@@ -20,9 +20,8 @@ export default [
label: "Message Identification",
tag: "msgId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "1.1",
......@@ -100,9 +99,8 @@ export default [
label: "Identification",
tag: "id",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "2.1",
......
......@@ -19,9 +19,8 @@ export default [
label: "Message Identification",
tag: "msgId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "1.1",
......
......@@ -19,9 +19,8 @@ export default [
label: "Message Identification",
tag: "msgId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "1.1",
......
......@@ -20,9 +20,8 @@ export default [
label: "Message Identification",
tag: "msgId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "1.1",
......
......@@ -20,9 +20,8 @@ export default [
label: "Message Identification",
tag: "msgId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "1.1",
......@@ -147,9 +146,8 @@ export default [
label: "End To End Identification",
tag: "endToEndId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "2.0.2",
......
......@@ -19,9 +19,8 @@ export default [
label: "Message Identification",
tag: "msgId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "1.1",
......@@ -96,9 +95,8 @@ export default [
label: "End To End Identification",
tag: "endToEndId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "2.0.2",
......
......@@ -20,9 +20,8 @@ export default [
label: "Message Identification",
tag: "msgId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "1.1",
......@@ -99,9 +98,8 @@ export default [
label: "End To End Identification",
tag: "endToEndId",
type: "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]{1,35}",
status: "O",
status: "M",
maxLength: "35",
unable: true,
},
{
path: "2.0.2",
......
......@@ -18,10 +18,9 @@ export default [
name : "Message Identification",
label : "Message Identification",
tag : "msgId",
status : "O",
status : "M",
type : "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+",
maxLength : "35",
unable: true,
}, {
path : "1.1",
name : "Creation Date Time",
......@@ -767,10 +766,9 @@ export default [
name : "End To End Identification",
label : "End To End Identification",
tag : "endToEndId",
status : "O",
status : "M",
type : "TextInput#[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+",
maxLength : "35",
unable: true,
}, {
path : "2.0.2",
name : "Transaction Identification",
......
......@@ -160,6 +160,10 @@ export default function validator(obj) {
if (!CBPR_Original_Message_Name_Identification_FormalRule(obj)){
return false;
}
//r12
if (!CBPR_CRED_FormalRule(obj)){
return false;
}
//r95
// if (!CBPR_Partial_Return_TextualRule(obj)){
......@@ -334,6 +338,9 @@ export default function validator(obj) {
return false;
}
if(!ChargesInformationAndInstructedAmountRule(obj)){
return false;
}
return true;
......@@ -424,9 +431,16 @@ function CBPR_Co_existence_Postal_Address_TextualRule() {
}
//r12
function CBPR_CRED_FormalRule() {
function CBPR_CRED_FormalRule(obj) {
const msg = "Charge information is mandatory if CRED is present – if no charges are taken, Zero must be used in 'Amount' (any agent in the payment chain).";
var chrgBr = obj.cdtTrfTxInf.chrgBr;
var chrgsInf = obj.cdtTrfTxInf.chrgsInf;
if (isNotEmpty(chrgBr) && 'CRED' == chrgBr){
if(isEmpty(chrgsInf)){
message("Charge Bearer", msg);
return false;
}
}
return true;
}
......@@ -893,4 +907,18 @@ function CBPR_UltimateDebtor_Option_3_Jurisdictions_only_TextualRule() {
const msg = "For Jurisdictional transactions, Name and/or Identification (Private or Organisation (that is within a country or for regions under same legislations – eg EEA)Countries impacted by the Jurisdictional rule:Belgium, Bulgaria, Czechia, Denmark, Germany, Estonia, Ireland, Greece, Spain, France, Croatia, Italy, Cyprus, Latvia, Lithuania, Luxembourg, Hungary, Malta, Netherlands, Austria, Poland, Portugal, Romania, Slovenia, Slovakia, Finland, Sweden - Iceland, Liechtenstein, Norway.Note: The jurisdictional rules apply only when all agents in the payment chain underly the same jurisdiction.";
return true;
}
// CrossElementComplexRule 如果存在收费信息,则指示金额必须存在
function ChargesInformationAndInstructedAmountRule(obj) {
const msg = "If ChargesInformation is present, then InstructedAmount must be present.";
var chrgsInf = obj.cdtTrfTxInf.chrgsInf;
var instdAmt = obj.cdtTrfTxInf.instdAmt;
if(isNotEmpty(chrgsInf)){
if(isEmpty(instdAmt)){
message("Instructed Amount", msg);
return false;
}
}
return true;
}
\ No newline at end of file
......@@ -52,6 +52,11 @@ export default function validator(obj) {
return false;
}
//r32
if (!CBPR_CRED_FormalRule(obj)){
return false;
}
//r45
if (!CBPR_Agent_Name_Postal_Address_FormalRule(obj.cdtTrfTxInf.prvsInstgAgt1.finInstnId, "Previous Instructing Agent1/Financial Institution Identification")) {
return false;
......@@ -278,6 +283,9 @@ export default function validator(obj) {
if (!CBPR_Name_Postal_Address_FormalRule(obj.cdtTrfTxInf.ultmtCdtr)){
return false;
}
if(!ChargesInformationAndInstructedAmountRule(obj)){
return false;
}
......@@ -492,9 +500,17 @@ function CBPR_Co_existence_Postal_Address_TextualRule(obj) {
}
//r32 如果存在CRED,则必须提供费用信息——如果不收取费用,则必须在“金额”中使用零(支付链中的任何代理)。
function CBPR_CRED_FormalRule() {
function CBPR_CRED_FormalRule(obj) {
const msg = "Charge information is mandatory if CRED is present – if no charges are taken, Zero must be used in 'Amount' (any agent in the payment chain).";
return true;
var chrgBr = obj.cdtTrfTxInf.chrgBr;
var chrgsInf = obj.cdtTrfTxInf.chrgsInf;
if (isNotEmpty(chrgBr) && 'CRED' == chrgBr){
if(isEmpty(chrgsInf)){
message("Charge Bearer", msg);
return false;
}
}
return true;
}
//r89 如果存在任何BIC,则不允许使用(名称和邮政地址)(其他元素仍然是可选的)-但是,在信息冲突的情况下,AnyBIC将始终优先。
......@@ -846,4 +862,17 @@ function CBPR_UltimateCreditor_Option_2_Jurisdictions_only_TextualRule() {
function CBPR_UltimateDebtor_Option_3_Jurisdictions_only_TextualRule() {
const msg = "For Jurisdictional transactions, Name and/or Identification (Private or Organisation) (that is within a country or for regions under same legislations – eg EEA)Countries impacted by the Jurisdictional rule:Belgium, Bulgaria, Czechia, Denmark, Germany, Estonia, Ireland, Greece, Spain, France, Croatia, Italy, Cyprus, Latvia, Lithuania, Luxembourg, Hungary, Malta, Netherlands, Austria, Poland, Portugal, Romania, Slovenia, Slovakia, Finland, Sweden - Iceland, Liechtenstein, Norway.Note: The jurisdictional rules apply only when all agents in the payment chain underly the same jurisdiction.";
return true;
}
// CrossElementComplexRule 如果存在收费信息,则指示金额必须存在
function ChargesInformationAndInstructedAmountRule(obj) {
const msg = "If ChargesInformation is present, then InstructedAmount must be present.";
var chrgsInf = obj.cdtTrfTxInf.chrgsInf;
var instdAmt = obj.cdtTrfTxInf.instdAmt;
if(isNotEmpty(chrgsInf)){
if(isEmpty(instdAmt)){
message("Instructed Amount", msg);
return false;
}
}
return true;
}
\ No newline at end of file
......@@ -175,8 +175,16 @@ var commonRule = {
return true;
},
//如果存在CRED,则必须提供费用信息——如果不收取费用,则必须在“金额”中使用零(支付链中的任何代理)。
CBPR_CRED_FormalRule() {
CBPR_CRED_FormalRule(obj) {
const msg = "Charge information is mandatory if CRED is present – if no charges are taken, Zero must be used in 'Amount' (any agent in the payment chain).";
var chrgBr = obj.cdtTrfTxInf.chrgBr;
var chrgsInf = obj.cdtTrfTxInf.chrgsInf;
if (isNotEmpty(chrgBr) && 'CRED' == chrgBr){
if(isEmpty(chrgsInf)){
message("Charge Bearer", msg);
return false;
}
}
return true;
},
//如果存在任何BIC,则不允许使用(名称和邮政地址)(其他元素仍然是可选的)-但是,在信息冲突的情况下,AnyBIC将始终优先。
......@@ -385,5 +393,18 @@ var commonRule = {
return true;
},
}
// CrossElementComplexRule 如果存在收费信息,则指示金额必须存在
function ChargesInformationAndInstructedAmountRule(obj) {
const msg = "If ChargesInformation is present, then InstructedAmount must be present.";
var chrgsInf = obj.cdtTrfTxInf.chrgsInf;
var instdAmt = obj.cdtTrfTxInf.instdAmt;
if(isNotEmpty(chrgsInf)){
if(isEmpty(instdAmt)){
message("Instructed Amount", msg);
return false;
}
}
return true;
}
module.exports = commonRule;
\ No newline at end of file
......@@ -55,34 +55,34 @@ public class MxTransfer {
}
bizMsgIdr = gsonMaps.get("bizMsgIdr").toString();
String msgDefIdr = (String) gsonMaps.get("msgDefIdr");
JSONObject grpHdr = (JSONObject)gsonMaps.get("grpHdr");
grpHdr.put("msgId",bizMsgIdr);
// JSONObject grpHdr = (JSONObject)gsonMaps.get("grpHdr");
// grpHdr.put("msgId",bizMsgIdr);
switch (msgDefIdr.substring(0,8)){
case "pacs.008":
JSONObject pmtId008 = (JSONObject)gsonMaps.get("pmtId");
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 "pacs.052":
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;
// case "pacs.009":
// JSONObject pmtId009 = (JSONObject)gsonMaps.get("pmtId");
// pmtId009.put("instrId",bizMsgIdr);
// pmtId009.put("endToEndId",bizMsgIdr);
// break;
// case "pacs.052":
// 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)) {
resourceAsStream = MessageUtil.class.getResourceAsStream("/template/" + identifier + "_rtgs.properties");
......
......@@ -368,11 +368,7 @@ public class MxEditorController {
map.put("user", swiftVo.getLoginUser());
map.put("nam", swiftVo.getName());
map.put("desp", swiftVo.getText());
if ("rtgs".equals(type)) {
map.put("mty", "RTGS." + swiftVo.getMty());
} else {
map.put("mty", "CBPR." + swiftVo.getMty());
}
map.put("mty", swiftVo.getMty());
map.put("sf2temp", swiftVo.getJson());
Map rs = (Map) CommonSend.send(map);
String retcod = (String) rs.get("retcode");
......@@ -477,5 +473,21 @@ public class MxEditorController {
return list;
}
//iso取默认bic
@RequestMapping(value = "/getBankId", method = RequestMethod.POST)
@ResponseBody
public String getBankId() {
Map<String, Object> map = new HashMap();
map.put("interface", "bdTaskFive");
map.put("transaction", "getBankId");
Map rs = (Map) CommonSend.send(map);
logger.info("getBankId结果:"+rs.toString());
String retcod = (String) rs.get("retcode");
if (retcod != null && retcod.endsWith("0000000")) {
return (String) rs.get("bankId");
}else
return null;
}
}
<!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.dbe64cdc.js"></script><script defer="defer" src="js/app.bb694e97.js"></script><script defer="defer" src="js/main.59945214.js"></script><link href="css/chunk-vendors.77489a8d.css" rel="stylesheet"><link href="css/app.19b6ae5c.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
<!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.dbe64cdc.js"></script><script defer="defer" src="js/app.a8e6e710.js"></script><script defer="defer" src="js/main.59945214.js"></script><link href="css/chunk-vendors.77489a8d.css" rel="stylesheet"><link href="css/app.1726963b.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
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