Commit ad1f4ec7 authored by 5359's avatar 5359

添加日志处理

parent 63c600e2
...@@ -22,6 +22,7 @@ import java.util.Random; ...@@ -22,6 +22,7 @@ import java.util.Random;
@Controller @Controller
@RequestMapping(value = {"/r/api", "/"})
public class PingAnController extends BaseController { public class PingAnController extends BaseController {
@Autowired @Autowired
......
...@@ -92,6 +92,7 @@ public class PingAnServiceImpl implements PingAnService { ...@@ -92,6 +92,7 @@ public class PingAnServiceImpl implements PingAnService {
HttpResult result = ApiUtils.invoke(interfaceName, requestBody); HttpResult result = ApiUtils.invoke(interfaceName, requestBody);
if (Objects.nonNull(result)) { if (Objects.nonNull(result)) {
// 通信成功 // 通信成功
logger.info("接口请求结果: {}", result.toString());
if ("200".equals(result.getCode() + "")) { if ("200".equals(result.getCode() + "")) {
JSONObject res = JSONObject.parseObject(result.getData()); JSONObject res = JSONObject.parseObject(result.getData());
switch (interfaceName) { switch (interfaceName) {
...@@ -237,7 +238,16 @@ public class PingAnServiceImpl implements PingAnService { ...@@ -237,7 +238,16 @@ public class PingAnServiceImpl implements PingAnService {
ccbTransaction.setSttVchRemark(data.getString("STT_VCH_REMARK")); ccbTransaction.setSttVchRemark(data.getString("STT_VCH_REMARK"));
ccbTransaction.setReturnCode(data.getString("STT_VCH_MARKCODE")); ccbTransaction.setReturnCode(data.getString("STT_VCH_MARKCODE"));
ccbTransaction.setReturnMsg(data.getString("STT_VCH_PART")); ccbTransaction.setReturnMsg(data.getString("STT_VCH_PART"));
return hlsEbankCcbTransactionService.insertSelective(iRequest, ccbTransaction); ccbTransaction = hlsEbankCcbTransactionService.insertSelective(iRequest, ccbTransaction);
//生成单据编号 日期+id
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
String dateString = formatter.format(new Date());
ccbTransaction.setTransactionNumber(dateString + String.format("%08d", ccbTransaction.getTransactionId()));
ccbTransaction = hlsEbankCcbTransactionService.updateByPrimaryKey(iRequest, ccbTransaction);
return ccbTransaction;
} }
//下载回单文件 //下载回单文件
...@@ -288,7 +298,8 @@ public class PingAnServiceImpl implements PingAnService { ...@@ -288,7 +298,8 @@ public class PingAnServiceImpl implements PingAnService {
for (int i = 0; i < arr.size(); i++) { for (int i = 0; i < arr.size(); i++) {
HlsEbankCcbTransaction ccbTransaction = new HlsEbankCcbTransaction(); HlsEbankCcbTransaction ccbTransaction = new HlsEbankCcbTransaction();
JSONObject data = arr.getJSONObject(i); JSONObject data = arr.getJSONObject(i);
ccbTransaction.setCmbOrderId(data.getString("JournalNo")); if ("C".equalsIgnoreCase(data.getString("DCFlag"))) {
ccbTransaction.setCmbOrderId(data.getString("BizFlowNo"));
ccbTransaction.setTranType(data.getString("DCFlag")); ccbTransaction.setTranType(data.getString("DCFlag"));
int exist = hlsEbankCcbTransactionMapper.queryByCmbOrderId(ccbTransaction); int exist = hlsEbankCcbTransactionMapper.queryByCmbOrderId(ccbTransaction);
if (exist == 0) { if (exist == 0) {
...@@ -296,14 +307,37 @@ public class PingAnServiceImpl implements PingAnService { ...@@ -296,14 +307,37 @@ public class PingAnServiceImpl implements PingAnService {
ccbTransaction.setSttVchCardNo(data.getString("SubAccount")); ccbTransaction.setSttVchCardNo(data.getString("SubAccount"));
ccbTransaction.setSttAcDate(data.getString("AccountDate")); ccbTransaction.setSttAcDate(data.getString("AccountDate"));
ccbTransaction.setAmount(data.getDouble("TranAmount")); ccbTransaction.setAmount(data.getDouble("TranAmount"));
ccbTransaction.setSttAmtRmb(data.getDouble("TranAmount"));
ccbTransaction.setSttVchRcvAcNo(data.getString("OppAccountNo")); ccbTransaction.setSttVchRcvAcNo(data.getString("OppAccountNo"));
ccbTransaction.setSttVchRcvAcName(data.getString("OppAccountName")); ccbTransaction.setSttVchRcvAcName(data.getString("OppAccountName"));
ccbTransaction.setSttVchRcvBkName(data.getString("OppBankName")); ccbTransaction.setSttVchRcvBkName(data.getString("OppBankName"));
ccbTransaction.setSttVchRcvBkNo(data.getString("OppBankNo")); ccbTransaction.setSttVchRcvBkNo(data.getString("OppBankNo"));
ccbTransaction.setSttVchRemark(data.getString("Remark")); ccbTransaction.setSttVchRemark(data.getString("Remark"));
ccbTransaction.setReturnCode(data.getString("abstractCode")); ccbTransaction.setReturnCode(data.getString("SUCCESS"));
ccbTransaction.setReturnMsg(data.getString("abstract")); ccbTransaction.setReturnMsg(data.getString("交易成功"));
hlsEbankCcbTransactionService.insertSelective(iRequest, ccbTransaction); ccbTransaction.setStatus("SUCCESS");
ccbTransaction.setUserId(data.getString("MainAccount"));
ccbTransaction.setNewDate(new Date());
ccbTransaction.setSuccessDate(new Date());
ccbTransaction.setCount(1L);
ccbTransaction.setBankType("PAB");
ccbTransaction.setMerOrderNo(data.getString("JournalNo"));
ccbTransaction.setVersion(data.getString("AccountDate"));
ccbTransaction.setTranDate(data.getString("AccountDate"));
ccbTransaction.setTranTime(data.getString("TranTime"));
/*订单状态接收成功*/
ccbTransaction.setOrderStatus("R");
ccbTransaction.setSttVchSeqNo(data.getString("SeqNo"));
ccbTransaction.setSttVchBal(data.getDouble("Balance"));
ccbTransaction = hlsEbankCcbTransactionService.insertSelective(iRequest, ccbTransaction);
//生成单据编号 日期+id
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
String dateString = formatter.format(new Date());
ccbTransaction.setTransactionNumber(dateString + String.format("%08d", ccbTransaction.getTransactionId()));
hlsEbankCcbTransactionService.updateByPrimaryKey(iRequest, ccbTransaction);
}
} }
} }
} }
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
<result column="SEAL_ID" property="sealId" jdbcType="VARCHAR"/> <result column="SEAL_ID" property="sealId" jdbcType="VARCHAR"/>
<result column="IS_MANAGER_FLAG" property="isManagerFlag" jdbcType="VARCHAR"/> <result column="IS_MANAGER_FLAG" property="isManagerFlag" jdbcType="VARCHAR"/>
<result column="MANAGER_AUTH_FLAG" property="managerAuthFlag" jdbcType="VARCHAR"/> <result column="MANAGER_AUTH_FLAG" property="managerAuthFlag" jdbcType="VARCHAR"/>
<result column="open_id_bak" property="openIdBak" jdbcType="VARCHAR"/>
<result column="open_id_new" property="openIdNew" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<select id="queryUserInfo" resultMap="BaseResultMap" parameterType="com.hand.app.esignHclc.dto.SignUserInfoHclc"> <select id="queryUserInfo" resultMap="BaseResultMap" parameterType="com.hand.app.esignHclc.dto.SignUserInfoHclc">
......
...@@ -9,3 +9,6 @@ queryOrderFileUrl=https://my-st1.orangebank.com.cn:567/fat7/openapi/file/boapFil ...@@ -9,3 +9,6 @@ queryOrderFileUrl=https://my-st1.orangebank.com.cn:567/fat7/openapi/file/boapFil
fileDownLoadOrderFileUrl=https://my-st1.orangebank.com.cn:567/fat7/openapi/file/boapFile/downloadOrderFile fileDownLoadOrderFileUrl=https://my-st1.orangebank.com.cn:567/fat7/openapi/file/boapFile/downloadOrderFile
MrchCode=0090108040000KTAR000 MrchCode=0090108040000KTAR000
AcctNo=15000101414037 AcctNo=15000101414037
#测试客户名称:天津市佳兴机械设备租赁有限公司
#测试合同:L21BD00209
\ 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