Commit ad1f4ec7 authored by 5359's avatar 5359

添加日志处理

parent 63c600e2
......@@ -22,6 +22,7 @@ import java.util.Random;
@Controller
@RequestMapping(value = {"/r/api", "/"})
public class PingAnController extends BaseController {
@Autowired
......
......@@ -92,6 +92,7 @@ public class PingAnServiceImpl implements PingAnService {
HttpResult result = ApiUtils.invoke(interfaceName, requestBody);
if (Objects.nonNull(result)) {
// 通信成功
logger.info("接口请求结果: {}", result.toString());
if ("200".equals(result.getCode() + "")) {
JSONObject res = JSONObject.parseObject(result.getData());
switch (interfaceName) {
......@@ -237,7 +238,16 @@ public class PingAnServiceImpl implements PingAnService {
ccbTransaction.setSttVchRemark(data.getString("STT_VCH_REMARK"));
ccbTransaction.setReturnCode(data.getString("STT_VCH_MARKCODE"));
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,22 +298,46 @@ public class PingAnServiceImpl implements PingAnService {
for (int i = 0; i < arr.size(); i++) {
HlsEbankCcbTransaction ccbTransaction = new HlsEbankCcbTransaction();
JSONObject data = arr.getJSONObject(i);
ccbTransaction.setCmbOrderId(data.getString("JournalNo"));
ccbTransaction.setTranType(data.getString("DCFlag"));
int exist = hlsEbankCcbTransactionMapper.queryByCmbOrderId(ccbTransaction);
if (exist == 0) {
ccbTransaction.setMerId(ApiUtils.AcctNo);
ccbTransaction.setSttVchCardNo(data.getString("SubAccount"));
ccbTransaction.setSttAcDate(data.getString("AccountDate"));
ccbTransaction.setAmount(data.getDouble("TranAmount"));
ccbTransaction.setSttVchRcvAcNo(data.getString("OppAccountNo"));
ccbTransaction.setSttVchRcvAcName(data.getString("OppAccountName"));
ccbTransaction.setSttVchRcvBkName(data.getString("OppBankName"));
ccbTransaction.setSttVchRcvBkNo(data.getString("OppBankNo"));
ccbTransaction.setSttVchRemark(data.getString("Remark"));
ccbTransaction.setReturnCode(data.getString("abstractCode"));
ccbTransaction.setReturnMsg(data.getString("abstract"));
hlsEbankCcbTransactionService.insertSelective(iRequest, ccbTransaction);
if ("C".equalsIgnoreCase(data.getString("DCFlag"))) {
ccbTransaction.setCmbOrderId(data.getString("BizFlowNo"));
ccbTransaction.setTranType(data.getString("DCFlag"));
int exist = hlsEbankCcbTransactionMapper.queryByCmbOrderId(ccbTransaction);
if (exist == 0) {
ccbTransaction.setMerId(ApiUtils.AcctNo);
ccbTransaction.setSttVchCardNo(data.getString("SubAccount"));
ccbTransaction.setSttAcDate(data.getString("AccountDate"));
ccbTransaction.setAmount(data.getDouble("TranAmount"));
ccbTransaction.setSttAmtRmb(data.getDouble("TranAmount"));
ccbTransaction.setSttVchRcvAcNo(data.getString("OppAccountNo"));
ccbTransaction.setSttVchRcvAcName(data.getString("OppAccountName"));
ccbTransaction.setSttVchRcvBkName(data.getString("OppBankName"));
ccbTransaction.setSttVchRcvBkNo(data.getString("OppBankNo"));
ccbTransaction.setSttVchRemark(data.getString("Remark"));
ccbTransaction.setReturnCode(data.getString("SUCCESS"));
ccbTransaction.setReturnMsg(data.getString("交易成功"));
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 @@
<result column="SEAL_ID" property="sealId" jdbcType="VARCHAR"/>
<result column="IS_MANAGER_FLAG" property="isManagerFlag" 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>
<select id="queryUserInfo" resultMap="BaseResultMap" parameterType="com.hand.app.esignHclc.dto.SignUserInfoHclc">
......
......@@ -8,4 +8,7 @@ fileDownLoadUrl=https://my-st1.orangebank.com.cn:567/fat7/openapi/file/boapFile/
queryOrderFileUrl=https://my-st1.orangebank.com.cn:567/fat7/openapi/file/boapFile/queryOrderFile
fileDownLoadOrderFileUrl=https://my-st1.orangebank.com.cn:567/fat7/openapi/file/boapFile/downloadOrderFile
MrchCode=0090108040000KTAR000
AcctNo=15000101414037
\ No newline at end of file
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