Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-support-rlwx
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rl
hls-support-rlwx
Commits
46f96d11
Commit
46f96d11
authored
Dec 16, 2022
by
胡建龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix]修改近期明细查询接口查询逻辑
parent
240d64c1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
17 deletions
+90
-17
HlsEbankCcbTransactionMapper.java
...ava/com/chinapay/mapper/HlsEbankCcbTransactionMapper.java
+1
-1
HlsEbankCcbTransactionMapper.xml
...java/com/chinapay/mapper/HlsEbankCcbTransactionMapper.xml
+9
-0
PingAnController.java
...ava/com/hand/app/pingAn/controllers/PingAnController.java
+2
-1
PingAnService.java
.../main/java/com/hand/app/pingAn/service/PingAnService.java
+2
-0
PingAnServiceImpl.java
...a/com/hand/app/pingAn/service/impl/PingAnServiceImpl.java
+76
-15
No files found.
core/src/main/java/com/chinapay/mapper/HlsEbankCcbTransactionMapper.java
View file @
46f96d11
...
...
@@ -10,5 +10,5 @@ import com.hand.hap.mybatis.common.Mapper;
* Time: 9:08
*/
public
interface
HlsEbankCcbTransactionMapper
extends
Mapper
<
HlsEbankCcbTransaction
>
{
Integer
queryByCmbOrderId
(
String
CmbOrderId
);
}
core/src/main/java/com/chinapay/mapper/HlsEbankCcbTransactionMapper.xml
0 → 100644
View file @
46f96d11
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.chinapay.mapper.HlsEbankCcbTransactionMapper"
>
<select
id=
"queryByCmbOrderId"
resultType=
"java.lang.Integer"
>
select count(*) from hls_ebank_ccb_transaction hect where hect.cmb_order_id = #{CmbOrderId} limit 1
</select>
</mapper>
\ No newline at end of file
core/src/main/java/com/hand/app/pingAn/controllers/PingAnController.java
View file @
46f96d11
...
...
@@ -38,7 +38,8 @@ public class PingAnController extends BaseController {
@RequestMapping
(
"/bedl/InquiryIntoTheCurrentDetailsOfMainSubaccountAccountTwo"
)
@ResponseBody
public
JSONObject
recentDetailQuery
(
HttpServletRequest
request
,
@RequestBody
(
required
=
true
)
JSONObject
reqParams
){
return
pingAnService
.
invoke
(
"bedl/InquiryIntoTheCurrentDetailsOfMainSubaccountAccountTwo"
,
reqParams
);
IRequest
iRequest
=
createRequestContext
(
request
);
return
pingAnService
.
preInvoke
(
iRequest
,
"bedl/InquiryIntoTheCurrentDetailsOfMainSubaccountAccountTwo"
,
reqParams
);
}
@ApiModelProperty
(
"明细通知接口(BEDL_ZNA001)"
)
...
...
core/src/main/java/com/hand/app/pingAn/service/PingAnService.java
View file @
46f96d11
...
...
@@ -11,4 +11,6 @@ public interface PingAnService {
JSONObject
invoke
(
String
interfaceName
,
JSONObject
params
);
ResponseData
detailNotify
(
IRequest
iRequest
,
JSONObject
data
);
public
JSONObject
preInvoke
(
IRequest
iRequest
,
String
interfaceName
,
JSONObject
params
);
}
core/src/main/java/com/hand/app/pingAn/service/impl/PingAnServiceImpl.java
View file @
46f96d11
...
...
@@ -44,6 +44,8 @@ public class PingAnServiceImpl implements PingAnService {
private
IHapInterfaceHeaderService
headerService
;
@Autowired
private
IHlsEbankCcbTransactionService
hlsEbankCcbTransactionService
;
@Autowired
private
HlsEbankCcbTransactionMapper
hlsEbankCcbTransactionMapper
;
private
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
());
...
...
@@ -73,7 +75,26 @@ public class PingAnServiceImpl implements PingAnService {
if
(
Objects
.
nonNull
(
result
))
{
// 通信成功
if
(
"200"
.
equals
(
result
.
getCode
()
+
""
))
{
// todo 不同接口返回不同数据,需要确认返回结果的格式
JSONObject
res
=
JSONObject
.
parseObject
(
result
.
getData
());
switch
(
interfaceName
)
{
case
"bedl/SubAcctMaintenance"
:
hlsWsRequests
.
setFunctionName
(
"pingAn_SubAcctMaintenance"
);
responseData
.
put
(
"data"
,
res
);
break
;
case
"bedl/InquiryIntoTheCurrentDetailsOfMainSubaccountAccountTwo"
:
hlsWsRequests
.
setFunctionName
(
"pingAn_recentDetailQuery"
);
responseData
.
put
(
"data"
,
res
);
break
;
case
"bedl/DetailReportQueryNew"
:
hlsWsRequests
.
setFunctionName
(
"pingAn_DetailReportQueryNew"
);
//返回数组类型数据,所以
JSONArray
fileArr
=
JSONArray
.
parseArray
(
result
.
getData
());
responseData
.
put
(
"data"
,
fileArr
);
//进行文件下载
dowloadDetailFile
(
res
);
break
;
}
// 具体业务是否请求成功判定,目前观察成功请求可能没有Code值
if
(
"000000"
.
equals
(
res
.
getString
(
"Code"
))
||
Objects
.
isNull
(
res
.
getString
(
"Code"
))){
hlsWsRequests
.
setReturnStatus
(
"s"
);
...
...
@@ -89,21 +110,6 @@ public class PingAnServiceImpl implements PingAnService {
responseData
.
put
(
Constants
.
RESP_MSG
,
res
.
getJSONArray
(
"Errors"
).
getJSONObject
(
0
).
getString
(
"ErrorMessage"
));
}
}
// todo 不同接口返回不同数据,需要确认返回结果的格式
switch
(
interfaceName
)
{
case
"bedl/SubAcctMaintenance"
:
hlsWsRequests
.
setFunctionName
(
"pingAn_SubAcctMaintenance"
);
responseData
.
put
(
"data"
,
res
);
break
;
case
"bedl/InquiryIntoTheCurrentDetailsOfMainSubaccountAccountTwo"
:
hlsWsRequests
.
setFunctionName
(
"pingAn_recentDetailQuery"
);
responseData
.
put
(
"data"
,
res
);
break
;
case
"bedl/DetailReportQueryNew"
:
hlsWsRequests
.
setFunctionName
(
"pingAn_DetailReportQueryNew"
);
responseData
.
put
(
"data"
,
res
);
break
;
}
}
else
{
//请求失败
hlsWsRequests
.
setReturnStatus
(
"f"
);
...
...
@@ -203,4 +209,59 @@ public class PingAnServiceImpl implements PingAnService {
ccbTransaction
.
setReturnMsg
(
data
.
getString
(
"STT_VCH_PART"
));
return
hlsEbankCcbTransactionService
.
insertSelective
(
iRequest
,
ccbTransaction
);
}
//下载回单文件
private
boolean
dowloadDetailFile
(
JSONObject
data
){
return
true
;
}
/**
* 近期明细查询
* @param interfaceName
* @param params
* @return
*/
public
JSONObject
preInvoke
(
IRequest
iRequest
,
String
interfaceName
,
JSONObject
params
)
{
JSONObject
responseData
=
new
JSONObject
();
int
pageNo
=
0
;
String
isEnd
=
"N"
;
while
(
"N"
.
equalsIgnoreCase
(
isEnd
)){
params
.
put
(
"PageNo"
,++
pageNo
);
JSONObject
res
=
invoke
(
interfaceName
,
params
);
isEnd
=
res
.
getString
(
"isEnd"
);
// 对当前查询到的数据进行存表
JSONObject
data
=
res
.
getJSONObject
(
"data"
);
JSONArray
arr
=
data
.
getJSONArray
(
"list"
);
if
(
Objects
.
nonNull
(
arr
)){
batchSaveTransactionByC00602
(
iRequest
,
arr
);
}
}
responseData
.
put
(
Constants
.
RESP_CODE
,
"0000"
);
responseData
.
put
(
"respMsg"
,
"请求成功"
);
return
responseData
;
}
private
void
batchSaveTransactionByC00602
(
IRequest
iRequest
,
JSONArray
arr
)
{
for
(
int
i
=
0
;
i
<
arr
.
size
();
i
++)
{
HlsEbankCcbTransaction
ccbTransaction
=
new
HlsEbankCcbTransaction
();
JSONObject
data
=
arr
.
getJSONObject
(
i
);
int
exist
=
hlsEbankCcbTransactionMapper
.
queryByCmbOrderId
(
data
.
getString
(
"JournalNo"
));
if
(
exist
==
0
){
ccbTransaction
.
setMerId
(
ApiUtils
.
AcctNo
);
ccbTransaction
.
setSttVchCardNo
(
data
.
getString
(
"SubAccount"
));
ccbTransaction
.
setSttAcDate
(
data
.
getString
(
"AccountDate"
));
ccbTransaction
.
setCmbOrderId
(
data
.
getString
(
"JournalNo"
));
ccbTransaction
.
setTranType
(
data
.
getString
(
"DCFlag"
));
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
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment