Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
Details
Activity
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
鲁鑫
topsun-bpm
Commits
1a514085
Commit
1a514085
authored
Apr 09, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据银行所属国家选择银行代码和名称
parent
ca1983d4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
117 additions
and
10 deletions
+117
-10
Org.js
huigou-xt/src/main/webapp/system/opm/organization/Org.js
+15
-0
PersonDetail.jsp
.../src/main/webapp/system/opm/organization/PersonDetail.jsp
+1
-1
suppliersDataDetail.js
...in/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.js
+18
-5
ResourceSearchController.java
...om/huigou/topsun/controller/ResourceSearchController.java
+12
-4
SapBankInfoApplication.java
...ap/sapApplication/application/SapBankInfoApplication.java
+20
-0
SapBankInfoApplicationImpl.java
...lication/application/impl/SapBankInfoApplicationImpl.java
+51
-0
No files found.
huigou-xt/src/main/webapp/system/opm/organization/Org.js
View file @
1a514085
...
...
@@ -536,6 +536,21 @@ function initPersonDialog() {
$
(
'#regionName'
).
val
(
data
.
BEZEI
);
}
});
$
(
'#bankCode'
).
searchbox
({
type
:
"system"
,
name
:
"getBankInfo"
,
getParam
:
function
(
item
)
{
if
(
Public
.
isBlank
(
$
(
'#bankCountry'
).
val
())){
Public
.
tip
(
"请先选择银行所属国家"
)
return
false
;
}
return
{
BANKS
:
$
(
'#bankCountry'
).
val
(),
}
},
onChange
:
function
(
value
,
data
)
{
$
(
'#bankCode'
).
val
(
data
.
BANKL
);
}
});
}
function
sapMesShow
(){
...
...
huigou-xt/src/main/webapp/system/opm/organization/PersonDetail.jsp
View file @
1a514085
...
...
@@ -50,7 +50,7 @@
<x:selectC
dictionary=
"country"
name=
"bankCountry"
label=
"银行所属国家"
labelCol=
"2"
fieldCol=
"4"
/>
</div>
<div
class=
"col-md-4"
>
<x:inputC
name=
"bankCode"
label=
"银行代码"
labelCol=
"4"
fieldCol=
"8"
/>
<x:inputC
name=
"bankCode"
label=
"银行代码"
labelCol=
"4"
fieldCol=
"8"
wrapper=
"select"
/>
</div>
</div>
<div
class=
"hg-form-row"
>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.js
View file @
1a514085
...
...
@@ -409,7 +409,24 @@ function loadSuppliersBankListGrid() {
},
{
display
:
"银行代码"
,
name
:
"bankl"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
true
}
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"getBankInfo"
,
getParam
:
function
(
item
)
{
return
{
BANKS
:
item
.
banks
}
},
back
:
{
BANKL
:
"bankl"
,
BANKA
:
"banka"
,
}
},
}
},
{
display
:
"银行名称"
,
name
:
"banka"
,
width
:
300
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
//editor: {type: 'text', required: false}
},
{
display
:
"银行帐户号码"
,
name
:
"bankn"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
...
...
@@ -431,10 +448,6 @@ function loadSuppliersBankListGrid() {
display
:
"对方开户行类型"
,
name
:
"bvtyp"
,
width
:
160
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},
{
display
:
"银行名称"
,
name
:
"banka"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},
{
display
:
"分行"
,
name
:
"brnch"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
...
...
topsun/src/main/java/com/huigou/topsun/controller/ResourceSearchController.java
View file @
1a514085
...
...
@@ -4,10 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.topsun.sap.sapApplication.application.SapAreaApplication
;
import
com.huigou.topsun.sap.sapApplication.application.SapDictionaryApplication
;
import
com.huigou.topsun.sap.sapApplication.application.SapMaterialApplication
;
import
com.huigou.topsun.sap.sapApplication.application.SapPaymentApplication
;
import
com.huigou.topsun.sap.sapApplication.application.*
;
import
com.huigou.topsun.sap.sapApplication.domain.query.SapDialogQuery
;
import
com.huigou.topsun.util.SAPUtils
;
import
com.huigou.uasp.annotation.ControllerMapping
;
...
...
@@ -48,6 +45,8 @@ public class ResourceSearchController {
private
SapAreaApplication
sapAreaApplication
;
@Autowired
private
DictionaryApplication
dictionaryApplication
;
@Autowired
private
SapBankInfoApplication
sapBankInfoApplication
;
@EasySearch
(
queryName
=
"knttp"
)
public
Map
<
String
,
Object
>
knttpSelect
(
SDO
sdo
){
...
...
@@ -333,6 +332,15 @@ public class ResourceSearchController {
return
this
.
initEasySearchModel
(
mapList
,
param
,
sdo
);
}
@EasySearch
(
queryName
=
"getBankInfo"
)
public
Map
<
String
,
Object
>
getBankInfo
(
SDO
sdo
)
throws
IOException
{
String
param
=
sdo
.
getString
(
"paramValue"
);
String
BANKS
=
sdo
.
getString
(
"BANKS"
);
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
mapList
=
sapBankInfoApplication
.
getBankInfo
(
BANKS
);
return
this
.
initEasySearchModel
(
mapList
,
param
,
sdo
);
}
public
Map
<
String
,
Object
>
initEasySearchModel
(
List
<
Map
<
String
,
String
>>
mapList
,
String
param
,
SDO
sdo
){
List
<
QuerySchemeField
>
fields
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isNotEmpty
(
mapList
)){
...
...
topsun/src/main/java/com/huigou/topsun/sap/sapApplication/application/SapBankInfoApplication.java
0 → 100644
View file @
1a514085
package
com
.
huigou
.
topsun
.
sap
.
sapApplication
.
application
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/04/09/15:03
* @Description:
*/
public
interface
SapBankInfoApplication
{
/**
* 根据银行国家代码查询银行信息
* @param BANKS
* @return
* @throws IOException
*/
List
<
Map
<
String
,
String
>>
getBankInfo
(
String
BANKS
)
throws
IOException
;
}
topsun/src/main/java/com/huigou/topsun/sap/sapApplication/application/impl/SapBankInfoApplicationImpl.java
0 → 100644
View file @
1a514085
package
com
.
huigou
.
topsun
.
sap
.
sapApplication
.
application
.
impl
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.huigou.topsun.sap.common.HttpClient
;
import
com.huigou.topsun.sap.common.domain.SapResult
;
import
com.huigou.topsun.sap.sapApplication.application.SapBankInfoApplication
;
import
com.huigou.topsun.util.SAPUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: xin.lu
* @Date: 2024/04/09/15:04
* @Description:
*/
@Service
(
"sapBankInfoApplication"
)
public
class
SapBankInfoApplicationImpl
implements
SapBankInfoApplication
{
@Autowired
private
HttpClient
httpClient
;
@Override
public
List
<
Map
<
String
,
String
>>
getBankInfo
(
String
BANKS
)
throws
IOException
{
Map
<
String
,
String
>
param
=
new
HashMap
<>();
param
.
put
(
"BANKS"
,
BANKS
);
List
<
Map
<
String
,
String
>>
paramList
=
new
ArrayList
<>();
paramList
.
add
(
param
);
String
execute
=
null
;
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
try
{
execute
=
httpClient
.
execute
(
paramList
,
"search/sch_bank_info"
);
Map
<
String
,
String
>
map
=
JSONObject
.
parseObject
(
execute
,
Map
.
class
);
List
<
SapResult
>
sapResultList
=
JSONObject
.
parseArray
(
JSONUtil
.
toJsonStr
(
map
.
get
(
"MSG"
)),
SapResult
.
class
);
if
(
"S"
.
equals
(
sapResultList
.
get
(
0
).
getTYPE
()))
{
ObjectMapper
objectMapper
=
SAPUtils
.
objectMapper
();
mapList
=
objectMapper
.
readValue
(
com
.
huigou
.
util
.
JSONUtil
.
toString
(
map
.
get
(
"RDATA"
)),
new
TypeReference
<
List
<
Map
<
String
,
String
>>>()
{});
}
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"根据银行国家代码查询银行信息出错。"
);
}
return
mapList
;
}
}
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