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
a8b445f1
Commit
a8b445f1
authored
Nov 21, 2024
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
供应商把银行信息维护放到主表单;初始化一些默认值
parent
0188c3af
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
122 additions
and
366 deletions
+122
-366
suppliersDataDetail.js
...in/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.js
+18
-160
suppliersDataDetail.jsp
...n/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.jsp
+17
-7
suppliersExtendDataDetail.js
...app/biz/topsun/sap/suppliers/suppliersExtendDataDetail.js
+2
-152
suppliersExtendDataDetail.jsp
...pp/biz/topsun/sap/suppliers/suppliersExtendDataDetail.jsp
+9
-2
SuppliersDataApplicationImpl.java
...pliers/application/impl/SuppliersDataApplicationImpl.java
+8
-45
SuppliersDataController.java
...sun/sap/suppliers/controller/SuppliersDataController.java
+4
-0
SuppliersInfo.java
...com/huigou/topsun/sap/suppliers/domain/SuppliersInfo.java
+64
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.js
View file @
a8b445f1
var
gridManager
=
null
;
var
sapSuppliersPayGridManager
=
null
;
var
sapSuppliersBuyerGridManager
=
null
;
var
sapSuppliersBankGridManager
=
null
;
var
canEdit
=
true
;
$
(
document
).
ready
(
function
()
{
initialize
();
loadSuppliersPayListGrid
();
loadSuppliersBuyerListGrid
();
loadSuppliersBankListGrid
();
bindEvent
();
});
function
initialize
(){
...
...
@@ -87,6 +85,8 @@ function loadSuppliersBuyerListGrid() {
// 行号加一
sequence
:
(
sapSuppliersBuyerGridManager
.
getData
().
length
+
1
)
*
10
,
webre
:
"X"
,
waers
:
"CNY"
,
waersTextView
:
"CNY-人民币"
,
kalsk
:
"Z1"
,
telf1
:
$
(
"#buGroup"
).
val
()
==
"Z005"
?
$
(
"#mobNumber"
).
val
():
""
...
...
@@ -246,7 +246,10 @@ function loadSuppliersPayListGrid() {
UICtrl
.
addGridRow
(
sapSuppliersPayGridManager
,
{
// 行号加一
sequence
:
(
sapSuppliersPayGridManager
.
getData
().
length
+
1
)
*
10
,
reprf
:
"X"
sequence
:
(
sapSuppliersPayGridManager
.
getData
().
length
+
1
)
*
10
,
reprf
:
"X"
,
zterm
:
"Z002"
,
ztermTextView
:
"月结30天"
,
}
);
},
...
...
@@ -385,136 +388,6 @@ function loadSuppliersPayListGrid() {
}
// 加载银行信息表格
function
loadSuppliersBankListGrid
()
{
var
toolbarOptions
=
null
;
if
(
applyType
==
0
){
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
// 添加一行表格
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
sapSuppliersBankGridManager
,
{
// 行号加一
sequence
:
(
sapSuppliersBankGridManager
.
getData
().
length
+
1
)
*
10
}
);
},
// 删除选中的尺码信息
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#sapSuppliersBankGrid'
);
DataUtil
.
delSelectedRows
({
action
:
'sapSuppliersData/deleteSuppliersBanks.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
sapSuppliersBankGridManager
.
loadData
();
}
});
}
});
}
// 表格
sapSuppliersBankGridManager
=
UICtrl
.
grid
(
"#sapSuppliersBankGrid"
,
{
gridManager
:
null
,
columns
:
[
{
display
:
"行号"
,
name
:
"sequence"
,
width
:
80
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
//editor: {type: 'spinner', min: 1, max: 100, mask: 'nnn'}
},
{
display
:
"银行所属国家"
,
name
:
"banksTextView"
,
width
:
150
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
/* editor: {
type: 'dictionary',
data: {name: 'country'},
emptyOption:true,
textField: 'banksTextView',
valueField: 'banks',
required: true,
render: function (item) {
return item.banksTextView;
}
},*/
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionarySelect"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"country"
,
displayNames
:
"国家"
,
displayLens
:
"180"
}
},
// checkbox:true,
// checkboxIndex:'value',
back
:
{
value
:
"banks"
,
name
:
"banksTextView"
}
// valueIndex:'value'
},
}
},
{
display
:
"银行代码"
,
name
:
"bankl"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
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"
,
editor
:
{
type
:
'text'
,
required
:
true
,
maxLength
:
18
}
},
{
display
:
"银行细目的参考明细"
,
name
:
"bkref"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},
{
display
:
"账户持有人姓名"
,
name
:
"koinh"
,
width
:
120
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},
// {
// display: "银行控制代码", name: "bkont", width: 140, minWidth: 60, type: "String", align: "left",
// editor: {type: 'text', required: false}
// },
// {
// display: "对方开户行类型", name: "bvtyp", width: 160, 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}
// }
],
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/sapSuppliersData/slicedSuppliersBankData.ajax'
,
parms
:
{
sId
:
getsId
},
pageSize
:
20
,
usePager
:
true
,
toolbar
:
toolbarOptions
,
enabledEdit
:
canEdit
,
width
:
"98%"
,
height
:
"200px"
,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
});
UICtrl
.
setSearchAreaToggle
(
sapSuppliersBankGridManager
);
}
//获取数据保存的参数
function
getExtendedData
(
processAction
)
{
...
...
@@ -557,17 +430,6 @@ function getExtendedData(processAction) {
}
extendedData
.
suppliersBuyerList
=
Public
.
encodeJSONURI
(
datas
);
}
var
bank_grid
=
UICtrl
.
getGridManager
(
'#sapSuppliersBankGrid'
);
if
(
bank_grid
)
{
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
bank_grid
,
isAllData
:
isAllData
});
if
(
!
datas
)
{
return
false
;
}
extendedData
.
suppliersBankList
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
}
...
...
@@ -588,21 +450,7 @@ function checkConstraints(){
return
false
;
}
}
//银行信息
var
bank_grid
=
UICtrl
.
getGridManager
(
'#sapSuppliersBankGrid'
);
if
(
bank_grid
)
{
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
bank_grid
,
isAllData
:
true
});
if
(
!
datas
)
{
return
false
;
}
if
(
isApplyProcUnit
()
&&
datas
.
length
==
0
&&
"2"
!=
getHandleResult
()){
Public
.
tip
(
"供应商银行信息必填"
);
return
false
;
}
}
//付款信息
var
pay_grid
=
UICtrl
.
getGridManager
(
'#sapSuppliersPayGrid'
);
if
(
pay_grid
)
{
...
...
@@ -684,11 +532,21 @@ function bindEvent(){
$
(
"#buGroup_text"
).
val
(
data
.
text
);
}
})
$
(
'#bankl'
).
searchbox
({
type
:
"system"
,
name
:
"getBankInfo"
,
getParam
:
function
(
item
)
{
return
{
BANKS
:
$
(
"#banks"
).
val
()}
},
onChange
:
function
(
value
,
data
)
{
$
(
'#bankl'
).
val
(
data
.
BANKL
);
$
(
'#banka'
).
val
(
data
.
BANKA
);
}
});
}
function
reloadGrid
()
{
sid
=
$
(
"#id"
).
val
();
sapSuppliersPayGridManager
.
loadData
();
sapSuppliersBuyerGridManager
.
loadData
();
sapSuppliersBankGridManager
.
loadData
();
}
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.jsp
View file @
a8b445f1
...
...
@@ -87,11 +87,22 @@
<x:inputC
name=
"kunnr"
label=
"客户编号"
labelCol=
"1"
fieldCol=
"2"
/>
<%--<x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/>--%>
<x:inputC
name=
"stenr"
label=
"税号"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
maxLength=
"18"
/>
<div
id=
"frozenDiv"
>
<x:selectC
name=
"sperr"
label=
"中心记帐冻结"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"sperr"
/>
<x:selectC
name=
"sperm"
label=
"集中设置的采购冻结"
labelCol=
"2"
fieldCol=
"1"
dictionary=
"sperrB"
/>
</div>
</div>
</div>
<x:title
title=
"供应商银行信息"
name=
"group"
/>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"banks"
label=
"银行所属国家"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
dictionary=
"country"
/>
<x:inputC
name=
"bankl"
label=
"银行代码"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
wrapper=
"select"
/>
<x:inputC
name=
"banka"
label=
"银行名称"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
readonly=
"true"
/>
<x:inputC
name=
"bankn"
label=
"银行帐户号码"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
maxLength=
"18"
/>
<x:inputC
name=
"bkref"
label=
"银行细目的参考明细"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
maxLength=
"18"
/>
<x:inputC
name=
"koinh"
label=
"账户持有人姓名"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
</div>
<div
id=
"frozenDiv"
>
<x:selectC
name=
"sperr"
label=
"中心记帐冻结"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"sperr"
/>
<x:selectC
name=
"sperm"
label=
"集中设置的采购冻结"
labelCol=
"2"
fieldCol=
"1"
dictionary=
"sperrB"
/>
</div>
</div>
<div
style=
"padding-top: 15px;"
>
<x:fileList
bizCode=
"supplier"
bizId=
"id"
id=
"supplierList"
title=
"营业执照/开票资料"
/>
...
...
@@ -103,8 +114,7 @@
<x:title
title=
"供应商公司信息"
name=
"group"
/>
<div
id=
"sapSuppliersPayGrid"
style=
"margin: 2px;"
></div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"供应商银行信息"
name=
"group"
/>
<div
id=
"sapSuppliersBankGrid"
style=
"margin: 2px;"
></div>
</form>
</body>
</html>
topsun-xt/src/main/webapp/biz/topsun/sap/suppliers/suppliersExtendDataDetail.js
View file @
a8b445f1
var
gridManager
=
null
;
var
sapSuppliersPayGridManager
=
null
;
var
sapSuppliersBuyerGridManager
=
null
;
var
sapSuppliersBankGridManager
=
null
;
var
canEdit
=
true
,
cashierGridCanEdit
=
false
;
var
canEdit
=
true
;
var
nowEkorg
,
nowBankl
,
nowBukrs
=
null
;
$
(
document
).
ready
(
function
()
{
initialize
();
loadSuppliersPayListGrid
();
loadSuppliersBuyerListGrid
();
loadSuppliersBankListGrid
();
bindEvent
();
controlCashierGrid
();
initNowData
();
});
function
initialize
(){
...
...
@@ -33,12 +30,10 @@ function setId(bizId) {
_grid
.
options
.
parms
.
sId
=
bizId
;
var
_grid2
=
UICtrl
.
getGridManager
(
'#sapSuppliersBuyerGrid'
);
_grid2
.
options
.
parms
.
sId
=
bizId
;
var
_grid3
=
UICtrl
.
getGridManager
(
'#sapSuppliersBankGrid'
);
_grid3
.
options
.
parms
.
sId
=
bizId
;
$
(
"#sId"
).
val
(
bizId
);
sapSuppliersPayGridManager
.
loadData
();
sapSuppliersBuyerGridManager
.
loadData
();
sapSuppliersBankGridManager
.
loadData
();
$
(
'#supplierList'
).
fileList
({
bizId
:
bizId
...
...
@@ -365,138 +360,6 @@ function loadSuppliersPayListGrid() {
UICtrl
.
setSearchAreaToggle
(
sapSuppliersPayGridManager
);
}
// 加载银行信息表格
function
loadSuppliersBankListGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
// 添加一行表格
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
sapSuppliersBankGridManager
,
{
// 行号加一
sequence
:
(
sapSuppliersBankGridManager
.
getData
().
length
+
1
)
*
10
}
);
},
// 删除选中的尺码信息
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#sapSuppliersBankGrid'
);
DataUtil
.
delSelectedRows
({
action
:
'sapSuppliersData/deleteSuppliersBanks.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
sapSuppliersBankGridManager
.
loadData
();
}
});
}
});
// 表格
sapSuppliersBankGridManager
=
UICtrl
.
grid
(
"#sapSuppliersBankGrid"
,
{
gridManager
:
null
,
columns
:
[
{
display
:
"行号"
,
name
:
"sequence"
,
width
:
80
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
//editor: {type: 'spinner', min: 1, max: 100, mask: 'nnn'}
},
{
display
:
"银行所属国家"
,
name
:
"banksTextView"
,
width
:
150
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
/* editor: {
type: 'dictionary',
data: {name: 'country'},
emptyOption:true,
textField: 'banksTextView',
valueField: 'banks',
required: true,
render: function (item) {
return item.banksTextView;
}
},*/
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionarySelect"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"country"
,
displayNames
:
"国家"
,
displayLens
:
"180"
}
},
// checkbox:true,
// checkboxIndex:'value',
back
:
{
value
:
"banks"
,
name
:
"banksTextView"
}
// valueIndex:'value'
},
}
},
{
display
:
"银行代码"
,
name
:
"bankl"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"getBankInfo"
,
getParam
:
function
(
item
)
{
return
{
BANKS
:
item
.
banks
,
noContain
:
nowBankl
}
},
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"
,
editor
:
{
type
:
'text'
,
required
:
true
,
maxLength
:
18
}
},
{
display
:
"银行细目的参考明细"
,
name
:
"bkref"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},
{
display
:
"账户持有人姓名"
,
name
:
"koinh"
,
width
:
120
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},
// {
// display: "银行控制代码", name: "bkont", width: 140, minWidth: 60, type: "String", align: "left",
// editor: {type: 'text', required: false}
// },
// {
// display: "对方开户行类型", name: "bvtyp", width: 160, 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}
// }
],
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/sapSuppliersData/slicedSuppliersBankData.ajax'
,
parms
:
{
sId
:
getsId
},
pageSize
:
20
,
usePager
:
true
,
toolbar
:
toolbarOptions
,
enabledEdit
:
canEdit
,
width
:
"98%"
,
height
:
"300px"
,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
});
UICtrl
.
setSearchAreaToggle
(
sapSuppliersBankGridManager
);
}
//获取数据保存的参数
function
getExtendedData
(
processAction
)
{
//回退、打回、转交时,不需要验证必填项是否已经填写;
...
...
@@ -538,17 +401,6 @@ function getExtendedData(processAction) {
}
extendedData
.
suppliersBuyerList
=
Public
.
encodeJSONURI
(
datas
);
}
var
_grid
=
UICtrl
.
getGridManager
(
'#sapSuppliersBankGrid'
);
if
(
_grid
)
{
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
isAllData
});
if
(
!
datas
)
{
return
false
;
}
extendedData
.
suppliersBankList
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
}
...
...
@@ -605,7 +457,6 @@ function reloadGrid() {
sid
=
$
(
"#id"
).
val
();
sapSuppliersPayGridManager
.
loadData
();
sapSuppliersBuyerGridManager
.
loadData
();
sapSuppliersBankGridManager
.
loadData
();
}
function
initNowData
(){
...
...
@@ -613,7 +464,6 @@ function initNowData(){
Public
.
ajax
(
web_app
.
name
+
"/sapSuppliersData/getSupplierNowItemList.ajax"
,{
partner
:
partner
},
function
(
data
){
nowBankl
=
data
.
nowBankl
;
nowEkorg
=
data
.
nowEkorg
;
nowBukrs
=
data
.
nowBukrs
})
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/suppliers/suppliersExtendDataDetail.jsp
View file @
a8b445f1
...
...
@@ -83,6 +83,15 @@
<x:selectC
name=
"sperr"
label=
"中心记帐冻结"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"sperr"
disabled=
"true"
/>
<x:selectC
name=
"sperm"
label=
"集中设置的采购冻结"
labelCol=
"2"
fieldCol=
"1"
dictionary=
"sperrB"
disabled=
"true"
/>
</div>
<x:title
title=
"供应商银行信息"
name=
"group"
/>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"banks"
label=
"银行所属国家"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
dictionary=
"country"
disabled=
"true"
/>
<x:inputC
name=
"bankl"
label=
"银行代码"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
readonly=
"true"
/>
<x:inputC
name=
"banka"
label=
"银行名称"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
readonly=
"true"
/>
<x:inputC
name=
"bankn"
label=
"银行帐户号码"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
maxLength=
"18"
readonly=
"true"
/>
<x:inputC
name=
"bkref"
label=
"银行细目的参考明细"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
maxLength=
"18"
readonly=
"true"
/>
<x:inputC
name=
"koinh"
label=
"账户持有人姓名"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
readonly=
"true"
/>
</div>
</div>
<div
style=
"padding-top: 15px;"
>
<x:fileList
bizCode=
"supplier"
bizId=
"attbizId"
id=
"supplierList"
title=
"营业执照/开票资料"
/>
...
...
@@ -94,8 +103,6 @@
<x:title
title=
"供应商公司信息"
name=
"group"
/>
<div
id=
"sapSuppliersPayGrid"
style=
"margin: 2px;"
></div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"供应商银行信息"
name=
"group"
/>
<div
id=
"sapSuppliersBankGrid"
style=
"margin: 2px;"
></div>
</form>
</body>
</html>
topsun/src/main/java/com/huigou/topsun/sap/suppliers/application/impl/SuppliersDataApplicationImpl.java
View file @
a8b445f1
...
...
@@ -76,7 +76,7 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
SuppliersInfo
suppliersInfo
=
getBizEntity
(
SuppliersInfo
.
class
);
List
<
SuppliersPay
>
suppliersPayList
=
getBizEntities
(
SuppliersPay
.
class
,
"suppliersPayList"
);
List
<
SuppliersBuyer
>
suppliersBuyerList
=
getBizEntities
(
SuppliersBuyer
.
class
,
"suppliersBuyerList"
);
List
<
SuppliersBank
>
suppliersBankList
=
getBizEntities
(
SuppliersBank
.
class
,
"suppliersBankList"
);
//
List<SuppliersBank> suppliersBankList = getBizEntities(SuppliersBank.class, "suppliersBankList");
if
(
suppliersInfo
.
isNew
())
{
suppliersInfo
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
...
...
@@ -133,32 +133,6 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
}
}
}
for
(
SuppliersBank
bank
:
suppliersBankList
)
{
if
(
StringUtil
.
isBlank
(
bank
.
getSId
()))
{
bank
.
setSId
(
suppliersInfo
.
getId
());
this
.
suppliersBankRepository
.
save
(
bank
);
}
else
if
(!(
suppliersInfo
.
getId
().
equals
(
bank
.
getSId
())))
{
//从新增带过来的
SuppliersBank
modifyBank
=
new
SuppliersBank
();
ClassHelper
.
copyProperties
(
bank
,
modifyBank
);
modifyBank
.
setId
(
UUID
.
randomUUID
().
toString
());
modifyBank
.
setSId
(
suppliersInfo
.
getId
());
this
.
suppliersBankRepository
.
save
(
modifyBank
);
}
else
{
// bank.setSId(suppliersInfo.getId());
// this.suppliersBankRepository.save(bank);
bank
.
setSId
(
suppliersInfo
.
getId
());
if
(
StringUtil
.
isBlank
(
bank
.
getId
()))
{
this
.
suppliersBankRepository
.
save
(
bank
);
}
else
{
SuppliersBank
suppliersBank
=
suppliersBankRepository
.
findOne
(
bank
.
getId
());
ClassHelper
.
copyProperties
(
bank
,
suppliersBank
);
this
.
suppliersBankRepository
.
saveAndFlush
(
suppliersBank
);
}
}
}
return
suppliersInfo
.
getId
();
}
...
...
@@ -328,20 +302,19 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
}
suppliersInfoVo
.
setSuppliersBuyerList
(
buyerVoList
);
List
<
SuppliersBankVo
>
bankVoList
=
new
ArrayList
<>();
for
(
SuppliersBank
suppliersBank
:
bankList
)
{
SuppliersBankVo
bankVo
=
new
SuppliersBankVo
();
ClassHelper
.
copyProperties
(
suppliersBank
,
bankVo
);
//银行账户,BPM不处理,SAP处理
SuppliersBankVo
bankVo
=
new
SuppliersBankVo
();
ClassHelper
.
copyProperties
(
suppliersInfo
,
bankVo
);
//银行账户,BPM不处理,SAP处理
// if (bankVo.getBankn().length() > 18){
// String bankn = bankVo.getBankn();
// bankVo.setBankn(bankn.substring(0,18));
// //账户明细放18位后的值
// bankVo.setBkref(bankn.substring(18,bankn.length()));
// }
//财务机构名称赋值组织名称1
bankVo
.
setBanka
(
suppliersInfoVo
.
getNameOrg1
());
bankVoList
.
add
(
bankVo
);
}
//财务机构名称赋值组织名称1
bankVo
.
setBanka
(
suppliersInfoVo
.
getNameOrg1
());
bankVoList
.
add
(
bankVo
);
suppliersInfoVo
.
setSuppliersBankList
(
bankVoList
);
ObjectMapper
objectMapper
=
new
ObjectMapper
();
String
url
=
"CUD_SUPPLY/SUPPLY_DATA"
;
...
...
@@ -575,8 +548,6 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
List
<
SuppliersBuyer
>
buyerList
=
this
.
getOtherBuyerList
(
partner
);
List
<
SuppliersBank
>
bankList
=
this
.
getOtherBankList
(
partner
);
List
<
SuppliersPay
>
payList
=
this
.
getOtherPayList
(
partner
);
//已维护的采购组织
...
...
@@ -586,13 +557,6 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
.
collect
(
Collectors
.
toSet
());
String
ekorg
=
StringUtils
.
join
(
ekorgSet
,
","
);
//已维护的银行组织
Set
<
String
>
banklSet
=
bankList
.
stream
()
.
map
(
SuppliersBank:
:
getBankl
)
.
collect
(
Collectors
.
toSet
());
String
bankl
=
StringUtils
.
join
(
banklSet
,
","
);
//已维护的公司代码
Set
<
String
>
bukrsSet
=
payList
.
stream
()
...
...
@@ -602,7 +566,6 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"nowEkorg"
,
ekorg
);
map
.
put
(
"nowBankl"
,
bankl
);
map
.
put
(
"nowBukrs"
,
bukrs
);
return
map
;
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/controller/SuppliersDataController.java
View file @
a8b445f1
...
...
@@ -117,6 +117,10 @@ public class SuppliersDataController extends CommonController {
this
.
putAttribute
(
"bizId"
,
""
);
this
.
putAttribute
(
"sId"
,
bizId
);
this
.
putAttribute
(
"id"
,
""
);
}
else
{
suppliersInfo
.
setBanks
(
"CN"
);
suppliersInfo
.
setLand1
(
"CN"
);
suppliersInfo
.
setLand1Name
(
"中国"
);
}
}
suppliersInfo
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/domain/SuppliersInfo.java
View file @
a8b445f1
package
com
.
huigou
.
topsun
.
sap
.
suppliers
.
domain
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
lombok.Data
;
...
...
@@ -277,6 +278,69 @@ public class SuppliersInfo extends FlowBillAbstractEntity {
@Column
(
name
=
"apply_type"
)
private
String
applyType
;
/**
* 银行所属国家/地区代码
*/
@Column
(
name
=
"banks"
)
@JSONField
(
name
=
"BANKS"
)
private
String
banks
;
/**
* 银行代码
*/
@Column
(
name
=
"bankl"
)
@JSONField
(
name
=
"BANKL"
)
private
String
bankl
;
/**
* 银行帐户号码
*/
@Column
(
name
=
"bankn"
)
@JSONField
(
name
=
"BANKN"
)
private
String
bankn
;
/**
* 账户持有人姓名
*/
@Column
(
name
=
"koinh"
)
@JSONField
(
name
=
"KOINH"
)
private
String
koinh
;
/**
* 银行控制代码
*/
@Column
(
name
=
"bkont"
)
@JSONField
(
name
=
"BKONT"
)
private
String
bkont
;
/**
* 对方开户行类型
*/
@Column
(
name
=
"bvtyp"
)
@JSONField
(
name
=
"BVTYP"
)
private
String
bvtyp
;
/**
* 财务机构名称
*/
@Column
(
name
=
"banka"
)
@JSONField
(
name
=
"BANKA"
)
private
String
banka
;
/**
* 分行
*/
@Column
(
name
=
"brnch"
)
@JSONField
(
name
=
"BRNCH"
)
private
String
brnch
;
/**
* 银行细目的参考明细
*/
@Column
(
name
=
"bkref"
)
@JSONField
(
name
=
"BKREF"
)
private
String
bkref
;
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
// @Column(name = "fillin_date")
// @Temporal(TemporalType.TIMESTAMP)
...
...
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