Commit c92e8d5c by WeiCong

1.修复集合字段签名信息提取异常;2.修正elcs.202.001.01模型

parent 5f1726d7
package com.brilliance.pack;
import org.junit.Before;
import org.junit.Test;
import com.brilliance.dzxt.framework.Result;
import com.brilliance.dzxt.packet.model.elcs_902_001_01.Elcs_902_001_01;
import com.brilliance.dzxt.utils.FastJsonUtil;
import com.brilliance.dzxt.utils.MsgUtil;
public class Elcs_902_001_01Test {
Elcs_902_001_01 elcs_902_001_01;
String json="{\"PtcptBk\":\"ABOCCNBJXXX\",\"AuthrtyInf\":{\"SndBizAuthrtyInf\":{\"MsgTp\":\"elcs.101.001.01\"},\"RcvBizAuthrtyInf\":{\"MsgTp\":\"elcs.101.001.01\"}},\"GrpHdr\":{\"InstdAgt\":{\"MmbId\":0,\"BrnchId\":{\"Id\":0}},\"Rmk\":\"String\",\"SysCd\":\"ELCS\",\"CreDtTm\":\"2019-07-30T16:30:47\",\"MsgId\":2019073000000001,\"InstgAgt\":{\"MmbId\":\"ICBKCNBJXXX\",\"BrnchId\":{\"Id\":\"ICBKCNBJXXX\"}}},\"RigstFlag\":\"REGT\",\"OrigSendTime\":\"094508\",\"OrigSender\":\"102100099998\",\"MesgType\":\"elcs.902.001.01\",\"OrigReceiver\":\"103100022226\",\"OrigSendDate\":\"20190301\",\"MesgDirection\":\"U\",\"MesgRefID\":\"00000000000000000000\",\"MesgID\":\"A1234B1234C1234D1234\"}";
@Before
public void setUp() {
elcs_902_001_01=FastJsonUtil.toBean(json, Elcs_902_001_01.class);
}
/**
* elcs.720.001.01类型报文打包和解包测试
*/
@Test
public void testPackAndUnpack() {
try {
Result reqResult = MsgUtil.packMessage(elcs_902_001_01);
System.out.println("报文头==" + reqResult.getHead());
System.out.println("签名部分==" + reqResult.getSignature());
System.out.println("报文体部分==" + reqResult.getBody());
System.out.println("完整报文==" + reqResult.getMessage());
System.out.println("模型json串==" + reqResult.getElcsModelForJson());
} catch (Exception e) {
e.printStackTrace();
}
}
}
package com.brilliance.pack;
import java.io.File;
import com.brilliance.dzxt.framework.Result;
import com.brilliance.dzxt.utils.MsgUtil;
public class MainTest {
/**
* @param args
*/
public static void main(String[] args) {
try {
Result resResult=MsgUtil.unPackMessage(new File(args[0]));
System.out.println("报文类型:"+resResult.getMessageType());
System.out.println("模型json串:"+resResult.getElcsModelForJson());
} catch (Exception e) {
e.printStackTrace();
}
}
}
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