Commit 6ff65178 by zhaojg

地质接口更新以及凭证根据坐标生成

parent 277664af
......@@ -18,6 +18,10 @@ public class Receipt {
*/
public String receiptNo;
/**
* 银行
*/
public String bankName;
/**
* 购买日期
*/
public String buyDate;
......@@ -79,11 +83,23 @@ public class Receipt {
*/
public String interest;
/**
* 年利率
*/
public String rate2;
/**
* 柜员号
*/
public String tellerNum2;
/**
* 复核
*/
public String reviewer;
/**
* 经办
*/
public String operator;
/**
* 当前状态
* 备案状态
*/
public String status;
/**
......
......@@ -88,10 +88,19 @@ public class QryAvgOnlineRateServiceImpl implements QryAvgOnlineRateService {
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _shareService.getAvgOnlineRate(payload);
String result;
try {
result = _shareService.getAvgOnlineRate(payload);
}catch (Exception e){
try {
result = _shareService.getAvgOnlineRate(payload);
}catch (Exception e1){
result = _shareService.getAvgOnlineRate(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
JSONObject json = JSONObject.parseObject(jsonStr);
JSONArray jsonArray = json.getJSONArray("resultdata");
if(null != jsonArray && jsonArray.size() > 0 ) {
......
......@@ -51,7 +51,16 @@ public class QryDBDataPointsServiceImpl implements QryDBDataPointsService {
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _businessService.getDBDataPoints(payload);
String result;
try {
result = _businessService.getDBDataPoints(payload);
}catch (Exception e){
try {
result = _businessService.getDBDataPoints(payload);
}catch (Exception e1){
result = _businessService.getDBDataPoints(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
RspComBo<RspDBDataPointsBo> rsp = JSONObject.parseObject(jsonStr, new TypeReference<RspComBo<RspDBDataPointsBo>>() {});
......
......@@ -56,7 +56,16 @@ public class QryDeviceAndSensorCountServiceImpl implements QryDeviceAndSensorCou
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _shareService.getDeviceAndSensorCount(payload);
String result;
try {
result = _shareService.getDeviceAndSensorCount(payload);
}catch (Exception e){
try {
result = _shareService.getDeviceAndSensorCount(payload);
}catch (Exception e1){
result = _shareService.getDeviceAndSensorCount(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
return JSONObject.parseObject(jsonStr);
......
......@@ -50,7 +50,16 @@ public class QryEarthReportServiceImpl implements QryEarthReportService {
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _shareService.getEarthReport(payload);
String result;
try {
result = _shareService.getEarthReport(payload);
}catch (Exception e){
try {
result = _shareService.getEarthReport(payload);
}catch (Exception e1){
result = _shareService.getEarthReport(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
RspFileComBo rsp = JSONObject.parseObject(jsonStr, RspFileComBo.class);
......
......@@ -54,7 +54,16 @@ public class QryEarthReportTrendDataServiceImpl implements QryEarthReportTrendDa
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _shareService.getEarthReportTrendData(payload);
String result;
try {
result = _shareService.getEarthReportTrendData(payload);
}catch (Exception e){
try {
result = _shareService.getEarthReportTrendData(payload);
}catch (Exception e1){
result = _shareService.getEarthReportTrendData(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
RspComBo<RspEarthReportTrendDataBo> rsp = JSONObject.parseObject(jsonStr, new TypeReference<RspComBo<RspEarthReportTrendDataBo>>() {});
......
......@@ -52,7 +52,16 @@ public class QryImportReportServiceImpl implements QryImportReportService {
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _shareService.getImportReport(payload);
String result;
try {
result = _shareService.getImportReport(payload);
}catch (Exception e){
try {
result = _shareService.getImportReport(payload);
}catch (Exception e1){
result = _shareService.getImportReport(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
RspFileComBo rsp = JSONObject.parseObject(jsonStr, RspFileComBo.class);
......
......@@ -54,7 +54,16 @@ public class QryManuInfosBySimpleNameServiceImpl implements QryManuInfosBySimple
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _shareService.getManuInfosBySimpleName(payload);
String result;
try {
result = _shareService.getManuInfosBySimpleName(payload);
}catch (Exception e){
try {
result = _shareService.getManuInfosBySimpleName(payload);
}catch (Exception e1){
result = _shareService.getManuInfosBySimpleName(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
RspComBo<String> rsp = JSONObject.parseObject(jsonStr, new TypeReference<RspComBo<String>>() {});
......
......@@ -48,7 +48,16 @@ public class QryMonitorDeviceListServiceImpl implements QryMonitorDeviceListServ
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _businessService.getMonitorDeviceList(payload);
String result;
try {
result = _businessService.getMonitorDeviceList(payload);
}catch (Exception e){
try {
result = _businessService.getMonitorDeviceList(payload);
}catch (Exception e1){
result = _businessService.getMonitorDeviceList(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
RspComBo<RspMonitorDeviceListBo> rsp = JSONObject.parseObject(jsonStr, new TypeReference<RspComBo<RspMonitorDeviceListBo>>() {});
......
......@@ -54,7 +54,16 @@ public class QryMonitorPointAllServiceImpl implements QryMonitorPointAllService
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _businessService.getMonitorPointAll(payload);
String result;
try {
result = _businessService.getMonitorPointAll(payload);
}catch (Exception e){
try {
result = _businessService.getMonitorPointAll(payload);
}catch (Exception e1){
result = _businessService.getMonitorPointAll(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
RspComBo<RspMonitorPointAllBo> rsp = JSONObject.parseObject(jsonStr, new TypeReference<RspComBo<RspMonitorPointAllBo>>() {});
......
......@@ -53,7 +53,16 @@ public class QryOnlineRateOfMonthServiceImpl implements QryOnlineRateOfMonthServ
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _shareService.getOnlineRateOfMonth(payload);
String result;
try {
result = _shareService.getOnlineRateOfMonth(payload);
}catch (Exception e){
try {
result = _shareService.getOnlineRateOfMonth(payload);
}catch (Exception e1){
result = _shareService.getOnlineRateOfMonth(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
return JSONObject.parseObject(jsonStr);
......
......@@ -53,7 +53,16 @@ public class QryOnlineRateRankServiceImpl implements QryOnlineRateRankService {
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _shareService.getOnlineRateRank(payload);
String result;
try {
result = _shareService.getOnlineRateRank(payload);
}catch (Exception e){
try {
result = _shareService.getOnlineRateRank(payload);
}catch (Exception e1){
result = _shareService.getOnlineRateRank(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
RspComBo<RspOnlineRateRankBo> rsp = JSONObject.parseObject(jsonStr, new TypeReference<RspComBo<RspOnlineRateRankBo>>() {});
......
......@@ -52,7 +52,16 @@ public class QryWarnMsgDisposeRateOfMonthServiceImpl implements QryWarnMsgDispos
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _shareService.getWarnMsgDisposeRateOfMonth(payload);
String result;
try {
result = _shareService.getWarnMsgDisposeRateOfMonth(payload);
}catch (Exception e){
try {
result = _shareService.getWarnMsgDisposeRateOfMonth(payload);
}catch (Exception e1){
result = _shareService.getWarnMsgDisposeRateOfMonth(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
RspComBo<RspWarnMsgDisposeRateOfMonthBo> rsp = JSONObject.parseObject(jsonStr, new TypeReference<RspComBo<RspWarnMsgDisposeRateOfMonthBo>>() {});
......
......@@ -53,7 +53,16 @@ public class QryWarnMsgDisposeRateServiceImpl implements QryWarnMsgDisposeRateSe
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _shareService.getWarnMsgDisposeRate(payload);
String result;
try {
result = _shareService.getWarnMsgDisposeRate(payload);
}catch (Exception e){
try {
result = _shareService.getWarnMsgDisposeRate(payload);
}catch (Exception e1){
result = _shareService.getWarnMsgDisposeRate(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
RspComObjBo<RspWarnMsgDisposeRateBo> rsp = JSONObject.parseObject(jsonStr, new TypeReference<RspComObjBo<RspWarnMsgDisposeRateBo>>() {});
......
......@@ -53,7 +53,16 @@ public class QryWeatherReportServiceImpl implements QryWeatherReportService {
.build());
byte[] encrypt = _encryption.encrypt(jsonBytes);
String payload = PayloadWrapperUtil.byte2hex(encrypt);
String result = _shareService.getWeatherReport(payload);
String result;
try {
result = _shareService.getWeatherReport(payload);
}catch (Exception e){
try {
result = _shareService.getWeatherReport(payload);
}catch (Exception e1){
result = _shareService.getWeatherReport(payload);
}
}
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
RspFileComBo rsp = JSONObject.parseObject(jsonStr, RspFileComBo.class);
......
package com.brilliance.utils;
import org.springframework.util.StringUtils;
/**
* 凭证枚举值
*/
public class ReceiptConstant {
public static final String RECEIPTNUM_CODE="receiptNum";
public static final String RECEIPTNUM = "数字凭证编号";
public static final String RECEIPTNO_CODE="receiptNo";
public static final String RECEIPTNO = "凭证编号";
public static final String BANKNAME_CODE="bankName";
public static final String BANKNAME = "银"+(char)12175;
public static final String BUYDATE_CODE="buyDate";
public static final String BUYDATE = "购买日期";
public static final String STARTDATE_CODE="startDate";
public static final String STARTDATE = "起息日期";
public static final String SEAL_CODE="seal";
public static final String SEAL = "印密";
public static final String YEAR_CODE="year";
public static final String YEAR = "年度";
public static final String PERIOD_CODE="period";
public static final String PERIOD = "期次";
public static final String DEADLINE_CODE="deadline";
public static final String DEADLINE = "期限";
public static final String RATE_CODE="rate";
public static final String RATE = "年利率";
public static final String ENDDATE_CODE="endDate";
public static final String ENDDATE = "到期日期";
public static final String TELLERNUM_CODE="tellerNum";
public static final String TELLERNUM = "柜员号";
public static final String ACCOUNTNUM_CODE="accountNum";
public static final String ACCOUNTNUM = "账号";
public static final String ACCOUNTNAME_CODE="accountName";
public static final String ACCOUNTNAME = "户名";
public static final String MONEY_CODE="money";
public static final String MONEY= "⾦额 (⼤、小写)";
public static final String REDEMPTIONDATE_CODE="redemptionDate";
public static final String REDEMPTIONDATE = "兑取日期";
public static final String INTERESTACCDAYS_CODE="interestAccDays";
public static final String INTERESTACCDAYS = "计息天数";
public static final String INTEREST_CODE="interest";
public static final String INTEREST = "利息";
public static final String REVIEWER_CODE="reviewer";
public static final String REVIEWER = "复核";
public static final String OPERATOR_CODE="operator";
public static final String OPERATOR = "经办";
public static final String STATUS_CODE="status";
public static final String STATUS = "备案状态";
public static final String RECORDNUM_CODE="recordNum";
public static final String RECORDNUM = "备案编号";
public static final String RATE2_CODE="rate2";
public static final String RATE2 = "年利率2";
public static final String TELLERNUM2_CODE="tellerNum2";
public static final String TELLERNUM2 = "柜员号2";
public static String getName(String receipt){
if(StringUtils.isEmpty(receipt)) return "";
String name ="";
switch(receipt){
case ReceiptConstant.RECEIPTNUM:
name = ReceiptConstant.RECEIPTNUM_CODE;
break;
case ReceiptConstant.RECEIPTNO:
name = ReceiptConstant.RECEIPTNO_CODE;
break;
case ReceiptConstant.BANKNAME:
name = ReceiptConstant.BANKNAME_CODE;
break;
case ReceiptConstant.BUYDATE:
name = ReceiptConstant.BUYDATE_CODE;
break;
case ReceiptConstant.STARTDATE:
name = ReceiptConstant.STARTDATE_CODE;
break;
case ReceiptConstant.SEAL:
name = ReceiptConstant.SEAL_CODE;
break;
case ReceiptConstant.YEAR:
name = ReceiptConstant.YEAR_CODE;
break;
case ReceiptConstant.PERIOD:
name = ReceiptConstant.PERIOD_CODE;
break;
case ReceiptConstant.DEADLINE:
name = ReceiptConstant.DEADLINE_CODE;
break;
case ReceiptConstant.RATE:
name = ReceiptConstant.RATE_CODE;
break;
case ReceiptConstant.ENDDATE:
name = ReceiptConstant.ENDDATE_CODE;
break;
case ReceiptConstant.TELLERNUM:
name = ReceiptConstant.TELLERNUM_CODE;
break;
case ReceiptConstant.ACCOUNTNUM:
name = ReceiptConstant.ACCOUNTNUM_CODE;
break;
case ReceiptConstant.ACCOUNTNAME:
name = ReceiptConstant.ACCOUNTNAME_CODE;
break;
case ReceiptConstant.MONEY:
name = ReceiptConstant.MONEY_CODE;
break;
case ReceiptConstant.REDEMPTIONDATE:
name = ReceiptConstant.REDEMPTIONDATE_CODE;
break;
case ReceiptConstant.INTERESTACCDAYS:
name = ReceiptConstant.INTERESTACCDAYS_CODE;
break;
case ReceiptConstant.INTEREST:
name = ReceiptConstant.INTEREST_CODE;
break;
case ReceiptConstant.REVIEWER:
name = ReceiptConstant.REVIEWER_CODE;
break;
case ReceiptConstant.OPERATOR:
name = ReceiptConstant.OPERATOR_CODE;
break;
case ReceiptConstant.STATUS:
name = ReceiptConstant.STATUS_CODE;
break;
case ReceiptConstant.RECORDNUM:
name = ReceiptConstant.RECORDNUM_CODE;
break;
case ReceiptConstant.RATE2:
name = ReceiptConstant.RATE2_CODE;
break;
case ReceiptConstant.TELLERNUM2:
name = ReceiptConstant.TELLERNUM2_CODE;
break;
default:break;
}
return name ;
}
}
package com.brilliance.utils;
public class TextLocation {
private String text;
private float x;
private float y;
public TextLocation(String text, float x, float y) {
this.text = text;
this.x = x;
this.y = y;
}
public String getText() {
return text;
}
public float getX() {
return x;
}
public float getY() {
return y;
}
}
......@@ -213,7 +213,7 @@ public class Demo {
int cod = _encryption.initiate();
log.info("建立与加解密网关的通讯结果:",cod);
Map<String, String> p = new HashMap<>();
p.put("areaCode", "");
p.put("areaCode", "520100");
p.put("startDate","2024-10-30");
p.put("endDate","2024-11-7");
p.put("manufacturerName", "");
......@@ -227,6 +227,9 @@ public class Demo {
String jsonStr = new String(_encryption.decrypt(PayloadWrapperUtil.hex2byte(result)));
log.info("jsonstr++++++:" + jsonStr);
jsonStr = jsonStr.substring(1,jsonStr.length()-1).replace("\\","");
JSONObject json = JSONObject.parseObject(jsonStr);
json.getInteger("status");
log.info("status++++++:" + json.getInteger("status"));
log.info("jsonstr++++++:" + jsonStr);
RspComBo<RspMonitorPointAllBo> rsp = JSONObject.parseObject(jsonStr, new TypeReference<RspComBo<RspMonitorPointAllBo>>() {});
log.info("rsp++++++:" + rsp.toString());
......
......@@ -26,7 +26,8 @@ public class Test {
//2.3.10
//demo.getImportReport();
//2.3.11
//demo.getAvgOnlineRate();
demo.getAvgOnlineRate();
demo.getAvgOnlineRate();
//2.3.12
//demo.getOnlineRateRank();
//2.3.13
......@@ -42,7 +43,7 @@ public class Test {
//2.3.18
//demo.getWarnMsgDisposeRateOfMonth();
//2.3.19
demo.getManuInfosBySimpleName();
//demo.getManuInfosBySimpleName();
/*String sourceFilePath = "C:\\Users\\zhaojg\\Documents\\input.txt";
String destinationFilePath = "C:\\Users\\zhaojg\\Documents\\output.doc";
......
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