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
351f1e2d
Commit
351f1e2d
authored
Feb 08, 2025
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
供应商增加供应商子范围(待完善接口)
parent
15ed414b
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
639 additions
and
4 deletions
+639
-4
suppliersDataDetail.js
...in/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.js
+196
-0
suppliersDataDetail.jsp
...n/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.jsp
+3
-0
suppliersExtendDataDetail.js
...app/biz/topsun/sap/suppliers/suppliersExtendDataDetail.js
+196
-0
suppliersExtendDataDetail.jsp
...pp/biz/topsun/sap/suppliers/suppliersExtendDataDetail.jsp
+3
-0
SuppliersDataApplication.java
...n/sap/suppliers/application/SuppliersDataApplication.java
+2
-0
SuppliersDataApplicationImpl.java
...pliers/application/impl/SuppliersDataApplicationImpl.java
+45
-4
SuppliersDataController.java
...sun/sap/suppliers/controller/SuppliersDataController.java
+16
-0
SuppliersItemPeriod.java
...igou/topsun/sap/suppliers/domain/SuppliersItemPeriod.java
+157
-0
SuppliersItemPeriodRepository.java
...p/suppliers/repository/SuppliersItemPeriodRepository.java
+15
-0
suppliersData.xml
...rces/config/topsun/sap/sapSuppliersData/suppliersData.xml
+6
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.js
View file @
351f1e2d
var
gridManager
=
null
;
var
sapSuppliersPayGridManager
=
null
;
var
sapSuppliersBuyerGridManager
=
null
;
var
sapSuppliersItemPeriodGridManager
=
null
;
var
canEdit
=
true
;
$
(
document
).
ready
(
function
()
{
initialize
();
loadSuppliersPayListGrid
();
loadSuppliersBuyerListGrid
();
loadSuppliersItemPeriodListGrid
();
bindEvent
();
});
function
initialize
(){
...
...
@@ -43,10 +45,13 @@ function setId(bizId) {
_grid
.
options
.
parms
.
sId
=
bizId
;
var
_grid2
=
UICtrl
.
getGridManager
(
'#sapSuppliersBuyerGrid'
);
_grid2
.
options
.
parms
.
sId
=
bizId
;
var
_grid3
=
UICtrl
.
getGridManager
(
'#sapSuppliersItemPeriodGrid'
);
_grid3
.
options
.
parms
.
sId
=
bizId
;
$
(
"#sId"
).
val
(
bizId
);
sapSuppliersPayGridManager
.
loadData
();
sapSuppliersBuyerGridManager
.
loadData
();
sapSuppliersItemPeriodGridManager
.
loadData
();
$
(
'#supplierList'
).
fileList
({
bizId
:
bizId
...
...
@@ -234,6 +239,177 @@ function getBuyColumns(){
return
columns
;
}
//加载供应商子范围
function
loadSuppliersItemPeriodListGrid
()
{
var
toolbarOptions
=
null
;
if
(
applyType
==
0
){
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
// 添加一行表格
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
sapSuppliersItemPeriodGridManager
,
{
// 行号加一
sequence
:
(
sapSuppliersItemPeriodGridManager
.
getData
().
length
+
1
)
*
10
,
webre
:
"X"
,
waers
:
"CNY"
,
waersTextView
:
"CNY-人民币"
,
kalsk
:
"Z1"
,
telf1
:
$
(
"#buGroup"
).
val
()
==
"Z005"
?
$
(
"#mobNumber"
).
val
():
""
}
);
},
// 删除
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#sapSuppliersItemPeriodGrid'
);
DataUtil
.
delSelectedRows
({
action
:
'sapSuppliersData/deleteSuppliersItemPeriods.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
sapSuppliersItemPeriodGridManager
.
loadData
();
}
});
}
});
}
// 表格
sapSuppliersItemPeriodGridManager
=
UICtrl
.
grid
(
"#sapSuppliersItemPeriodGrid"
,
{
gridManager
:
null
,
columns
:
getItemPeriodColumns
(),
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/sapSuppliersData/slicedSuppliersItemPeriodData.ajax'
,
parms
:
{
sId
:
getsId
},
pageSize
:
20
,
usePager
:
true
,
toolbar
:
toolbarOptions
,
enabledEdit
:
canEdit
,
width
:
"98%"
,
height
:
"200px"
,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
onAfterEdit
:
function
(
editParm
)
{
var
c
=
editParm
.
column
,
data
=
editParm
.
record
;
if
(
c
.
name
==
'telf1'
&&
$
(
"#buGroup"
).
val
()
==
"Z005"
)
{
$
(
"#mobNumber"
).
val
(
data
.
telf1
)
}
},
});
UICtrl
.
setSearchAreaToggle
(
sapSuppliersItemPeriodGridManager
);
}
function
getItemPeriodColumns
(){
var
columns
=
[];
columns
.
push
({
display
:
"行号"
,
name
:
"sequence"
,
width
:
80
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
//editor: {type: 'spinner', min: 1, max: 100, mask: 'nnn'}
},)
columns
.
push
({
display
:
"供应商子范围"
,
name
:
"ltsnr"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
true
}
},)
columns
.
push
({
display
:
"供应商子范围描述"
,
name
:
"ltsbz"
,
width
:
120
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
true
}
},)
columns
.
push
({
display
:
"工厂"
,
name
:
"werks"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"WERKS"
}
},
back
:
{
WERKS
:
"werks"
,
NAME1
:
"name1"
},
},
}
},)
columns
.
push
({
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
},)
columns
.
push
({
display
:
"货币码"
,
name
:
"waersTextView"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'dictionary'
,
data
:
{
name
:
'waers'
},
textField
:
'waersTextView'
,
valueField
:
'waers'
,
required
:
true
,
render
:
function
(
item
)
{
return
item
.
waersTextView
;
}
},
},)
columns
.
push
({
display
:
"付款条件"
,
name
:
"payConditionTextView"
,
width
:
150
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'dictionary'
,
data
:
{
name
:
'payCondition'
},
textField
:
'payConditionTextView'
,
valueField
:
'payCondition'
,
required
:
true
,
render
:
function
(
item
)
{
return
item
.
payConditionTextView
;
}
},
},)
columns
.
push
({
display
:
"国际贸易条款"
,
name
:
"inco1TextView"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'dictionary'
,
data
:
{
name
:
'inco1'
},
textField
:
'inco1TextView'
,
valueField
:
'inco1'
,
required
:
false
,
render
:
function
(
item
)
{
return
item
.
inco1TextView
;
}
},
},)
columns
.
push
({
display
:
"国际贸易条款位置1"
,
name
:
"inco2L"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
columns
.
push
(
{
display
:
"国际贸易条款位置2"
,
name
:
"inco3L"
,
width
:
160
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
columns
.
push
({
display
:
"收货的发票验证"
,
name
:
"webre"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
//editor: {type: 'text', required: true}
},)
columns
.
push
({
display
:
"供应商方案组"
,
name
:
"kalsk"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
//editor: {type: 'text', required: true}
},)
columns
.
push
({
display
:
"供应商销售人员"
,
name
:
"verkf"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
columns
.
push
({
display
:
"供应商电话号码"
,
name
:
"telf1"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
columns
.
push
({
display
:
"服务的发票校验标识"
,
name
:
"lebre"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
columns
.
push
(
{
display
:
"采购冻结"
,
name
:
"sperm"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
return
columns
;
}
// 加载付款信息表格
function
loadSuppliersPayListGrid
()
{
var
toolbarOptions
=
null
;
...
...
@@ -428,6 +604,25 @@ function getExtendedData(processAction) {
}
extendedData
.
suppliersBuyerList
=
Public
.
encodeJSONURI
(
datas
);
}
var
item_period_grid
=
UICtrl
.
getGridManager
(
'#sapSuppliersItemPeriodGrid'
);
if
(
item_period_grid
)
{
var
rows
=
item_period_grid
.
getData
();
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
var
row
=
rows
[
i
];
if
(
row
.
Inco1
!=
""
&&
row
.
Inco2L
==
""
)
{
Public
.
errorTip
(
'请输入国际贸易条款位置1!'
);
return
false
;
}
}
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
item_period_grid
,
isAllData
:
isAllData
});
if
(
!
datas
)
{
return
false
;
}
extendedData
.
suppliersItemPeriodList
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
}
...
...
@@ -547,4 +742,5 @@ function reloadGrid() {
sid
=
$
(
"#id"
).
val
();
sapSuppliersPayGridManager
.
loadData
();
sapSuppliersBuyerGridManager
.
loadData
();
sapSuppliersItemPeriodGridManager
.
loadData
();
}
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.jsp
View file @
351f1e2d
...
...
@@ -111,6 +111,9 @@
<x:title
title=
"供应商采购组织信息"
name=
"group"
/>
<div
id=
"sapSuppliersBuyerGrid"
style=
"margin: 2px;"
></div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"供应商子范围"
name=
"group"
/>
<div
id=
"sapSuppliersItemPeriodGrid"
style=
"margin: 2px;"
></div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"供应商公司信息"
name=
"group"
/>
<div
id=
"sapSuppliersPayGrid"
style=
"margin: 2px;"
></div>
<div
class=
"blank_div clearfix"
></div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/suppliers/suppliersExtendDataDetail.js
View file @
351f1e2d
var
gridManager
=
null
;
var
sapSuppliersPayGridManager
=
null
;
var
sapSuppliersBuyerGridManager
=
null
;
var
sapSuppliersItemPeriodGridManager
=
null
;
var
canEdit
=
true
;
var
nowEkorg
,
nowBankl
,
nowBukrs
=
null
;
...
...
@@ -8,6 +9,7 @@ $(document).ready(function () {
initialize
();
loadSuppliersPayListGrid
();
loadSuppliersBuyerListGrid
();
loadSuppliersItemPeriodListGrid
();
bindEvent
();
initNowData
();
});
...
...
@@ -30,10 +32,13 @@ function setId(bizId) {
_grid
.
options
.
parms
.
sId
=
bizId
;
var
_grid2
=
UICtrl
.
getGridManager
(
'#sapSuppliersBuyerGrid'
);
_grid2
.
options
.
parms
.
sId
=
bizId
;
var
_grid3
=
UICtrl
.
getGridManager
(
'#sapSuppliersItemPeriodGrid'
);
_grid3
.
options
.
parms
.
sId
=
bizId
;
$
(
"#sId"
).
val
(
bizId
);
sapSuppliersPayGridManager
.
loadData
();
sapSuppliersBuyerGridManager
.
loadData
();
sapSuppliersItemPeriodGridManager
.
loadData
();
$
(
'#supplierList'
).
fileList
({
bizId
:
bizId
...
...
@@ -205,6 +210,177 @@ function getBuyColumns(){
return
columns
;
}
//加载供应商子范围
function
loadSuppliersItemPeriodListGrid
()
{
var
toolbarOptions
=
null
;
if
(
applyType
==
0
){
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
// 添加一行表格
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
sapSuppliersItemPeriodGridManager
,
{
// 行号加一
sequence
:
(
sapSuppliersItemPeriodGridManager
.
getData
().
length
+
1
)
*
10
,
webre
:
"X"
,
waers
:
"CNY"
,
waersTextView
:
"CNY-人民币"
,
kalsk
:
"Z1"
,
telf1
:
$
(
"#buGroup"
).
val
()
==
"Z005"
?
$
(
"#mobNumber"
).
val
():
""
}
);
},
// 删除
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#sapSuppliersItemPeriodGrid'
);
DataUtil
.
delSelectedRows
({
action
:
'sapSuppliersData/deleteSuppliersItemPeriods.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
sapSuppliersItemPeriodGridManager
.
loadData
();
}
});
}
});
}
// 表格
sapSuppliersItemPeriodGridManager
=
UICtrl
.
grid
(
"#sapSuppliersItemPeriodGrid"
,
{
gridManager
:
null
,
columns
:
getItemPeriodColumns
(),
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/sapSuppliersData/slicedSuppliersItemPeriodData.ajax'
,
parms
:
{
sId
:
getsId
},
pageSize
:
20
,
usePager
:
true
,
toolbar
:
toolbarOptions
,
enabledEdit
:
canEdit
,
width
:
"98%"
,
height
:
"200px"
,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
onAfterEdit
:
function
(
editParm
)
{
var
c
=
editParm
.
column
,
data
=
editParm
.
record
;
if
(
c
.
name
==
'telf1'
&&
$
(
"#buGroup"
).
val
()
==
"Z005"
)
{
$
(
"#mobNumber"
).
val
(
data
.
telf1
)
}
},
});
UICtrl
.
setSearchAreaToggle
(
sapSuppliersItemPeriodGridManager
);
}
function
getItemPeriodColumns
(){
var
columns
=
[];
columns
.
push
({
display
:
"行号"
,
name
:
"sequence"
,
width
:
80
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
//editor: {type: 'spinner', min: 1, max: 100, mask: 'nnn'}
},)
columns
.
push
({
display
:
"供应商子范围"
,
name
:
"ltsnr"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
true
}
},)
columns
.
push
({
display
:
"供应商子范围描述"
,
name
:
"ltsbz"
,
width
:
120
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
true
}
},)
columns
.
push
({
display
:
"工厂"
,
name
:
"werks"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"WERKS"
}
},
back
:
{
WERKS
:
"werks"
,
NAME1
:
"name1"
},
},
}
},)
columns
.
push
({
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
},)
columns
.
push
({
display
:
"货币码"
,
name
:
"waersTextView"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'dictionary'
,
data
:
{
name
:
'waers'
},
textField
:
'waersTextView'
,
valueField
:
'waers'
,
required
:
true
,
render
:
function
(
item
)
{
return
item
.
waersTextView
;
}
},
},)
columns
.
push
({
display
:
"付款条件"
,
name
:
"payConditionTextView"
,
width
:
150
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'dictionary'
,
data
:
{
name
:
'payCondition'
},
textField
:
'payConditionTextView'
,
valueField
:
'payCondition'
,
required
:
true
,
render
:
function
(
item
)
{
return
item
.
payConditionTextView
;
}
},
},)
columns
.
push
({
display
:
"国际贸易条款"
,
name
:
"inco1TextView"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'dictionary'
,
data
:
{
name
:
'inco1'
},
textField
:
'inco1TextView'
,
valueField
:
'inco1'
,
required
:
false
,
render
:
function
(
item
)
{
return
item
.
inco1TextView
;
}
},
},)
columns
.
push
({
display
:
"国际贸易条款位置1"
,
name
:
"inco2L"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
columns
.
push
(
{
display
:
"国际贸易条款位置2"
,
name
:
"inco3L"
,
width
:
160
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
columns
.
push
({
display
:
"收货的发票验证"
,
name
:
"webre"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
//editor: {type: 'text', required: true}
},)
columns
.
push
({
display
:
"供应商方案组"
,
name
:
"kalsk"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
//editor: {type: 'text', required: true}
},)
columns
.
push
({
display
:
"供应商销售人员"
,
name
:
"verkf"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
columns
.
push
({
display
:
"供应商电话号码"
,
name
:
"telf1"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
columns
.
push
({
display
:
"服务的发票校验标识"
,
name
:
"lebre"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
columns
.
push
(
{
display
:
"采购冻结"
,
name
:
"sperm"
,
width
:
140
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
}
},)
return
columns
;
}
// 加载付款信息表格
function
loadSuppliersPayListGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
...
...
@@ -401,6 +577,25 @@ function getExtendedData(processAction) {
}
extendedData
.
suppliersBuyerList
=
Public
.
encodeJSONURI
(
datas
);
}
var
item_period_grid
=
UICtrl
.
getGridManager
(
'#sapSuppliersItemPeriodGrid'
);
if
(
item_period_grid
)
{
var
rows
=
item_period_grid
.
getData
();
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
var
row
=
rows
[
i
];
if
(
row
.
Inco1
!=
""
&&
row
.
Inco2L
==
""
)
{
Public
.
errorTip
(
'请输入国际贸易条款位置1!'
);
return
false
;
}
}
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
item_period_grid
,
isAllData
:
isAllData
});
if
(
!
datas
)
{
return
false
;
}
extendedData
.
suppliersItemPeriodList
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
}
...
...
@@ -457,6 +652,7 @@ function reloadGrid() {
sid
=
$
(
"#id"
).
val
();
sapSuppliersPayGridManager
.
loadData
();
sapSuppliersBuyerGridManager
.
loadData
();
sapSuppliersItemPeriodGridManager
.
loadData
();
}
function
initNowData
(){
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/suppliers/suppliersExtendDataDetail.jsp
View file @
351f1e2d
...
...
@@ -100,6 +100,9 @@
<x:title
title=
"供应商采购组织信息"
name=
"group"
/>
<div
id=
"sapSuppliersBuyerGrid"
style=
"margin: 2px;"
></div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"供应商子范围"
name=
"group"
/>
<div
id=
"sapSuppliersItemPeriodGrid"
style=
"margin: 2px;"
></div>
<div
class=
"blank_div clearfix"
></div>
<x:title
title=
"供应商公司信息"
name=
"group"
/>
<div
id=
"sapSuppliersPayGrid"
style=
"margin: 2px;"
></div>
<div
class=
"blank_div clearfix"
></div>
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/application/SuppliersDataApplication.java
View file @
351f1e2d
...
...
@@ -35,6 +35,7 @@ public interface SuppliersDataApplication {
Map
<
String
,
Object
>
loadSuppliersBuyerDatas
(
SuppliersBuyerQueryRequest
queryRequest
);
Map
<
String
,
Object
>
loadSuppliersBankDatas
(
SuppliersBankQueryRequest
queryRequest
);
Map
<
String
,
Object
>
loadSuppliersItemPeriodDatas
(
SuppliersBankQueryRequest
queryRequest
);
void
deleteSuppliersDataByIds
(
List
<
String
>
ids
);
...
...
@@ -43,6 +44,7 @@ public interface SuppliersDataApplication {
void
deleteSuppliersPaysByIds
(
List
<
String
>
ids
);
void
deleteSuppliersBuyerByIds
(
List
<
String
>
ids
);
void
deleteSuppliersItemPeriodByIds
(
List
<
String
>
ids
);
void
deleteSuppliersBankByIds
(
List
<
String
>
ids
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/application/impl/SuppliersDataApplicationImpl.java
View file @
351f1e2d
...
...
@@ -22,10 +22,7 @@ import com.huigou.topsun.sap.suppliers.domain.vo.SuppliersBankVo;
import
com.huigou.topsun.sap.suppliers.domain.vo.SuppliersBuyerVo
;
import
com.huigou.topsun.sap.suppliers.domain.vo.SuppliersInfoVo
;
import
com.huigou.topsun.sap.suppliers.domain.vo.SuppliersPayVo
;
import
com.huigou.topsun.sap.suppliers.repository.SuppliersBankRepository
;
import
com.huigou.topsun.sap.suppliers.repository.SuppliersBuyerRepository
;
import
com.huigou.topsun.sap.suppliers.repository.SuppliersInfoRepository
;
import
com.huigou.topsun.sap.suppliers.repository.SuppliersPayRepository
;
import
com.huigou.topsun.sap.suppliers.repository.*
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.ApprovalParameter
;
import
com.huigou.uasp.bpm.FlowBroker
;
...
...
@@ -58,6 +55,8 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
DefaultHttpClient
defaultHttpClient
;
@Autowired
SapMutualEpLogApplication
sapMutualEpLogApplication
;
@Autowired
SuppliersItemPeriodRepository
suppliersItemPeriodRepository
;
@Override
public
Map
<
String
,
Object
>
slicedSuppliersDataQuery
(
SuppliersDataQueryRequest
query
)
{
...
...
@@ -76,6 +75,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
<
SuppliersItemPeriod
>
suppliersItemPeriodList
=
getBizEntities
(
SuppliersItemPeriod
.
class
,
"suppliersItemPeriodList"
);
//List<SuppliersBank> suppliersBankList = getBizEntities(SuppliersBank.class, "suppliersBankList");
if
(
suppliersInfo
.
isNew
())
{
...
...
@@ -133,6 +133,30 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
}
}
}
for
(
SuppliersItemPeriod
suppliersItemPeriod
:
suppliersItemPeriodList
)
{
if
(
StringUtil
.
isNotBlank
(
suppliersItemPeriod
.
getInco1
())&&
StringUtil
.
isBlank
(
suppliersItemPeriod
.
getInco2L
())){
throw
new
RuntimeException
(
"请输入国际贸易条款位置1!"
);
}
if
(
StringUtil
.
isBlank
(
suppliersItemPeriod
.
getSId
()))
{
suppliersItemPeriod
.
setSId
(
suppliersInfo
.
getId
());
this
.
suppliersItemPeriodRepository
.
save
(
suppliersItemPeriod
);
}
else
if
(!(
suppliersInfo
.
getId
().
equals
(
suppliersItemPeriod
.
getSId
())))
{
//从新增带过来的
SuppliersItemPeriod
modifyItemPeriod
=
new
SuppliersItemPeriod
();
ClassHelper
.
copyProperties
(
suppliersItemPeriod
,
modifyItemPeriod
);
modifyItemPeriod
.
setId
(
UUID
.
randomUUID
().
toString
());
modifyItemPeriod
.
setSId
(
suppliersInfo
.
getId
());
this
.
suppliersItemPeriodRepository
.
save
(
modifyItemPeriod
);
}
else
{
suppliersItemPeriod
.
setSId
(
suppliersInfo
.
getId
());
if
(
StringUtil
.
isBlank
(
suppliersItemPeriod
.
getId
()))
{
this
.
suppliersItemPeriodRepository
.
save
(
suppliersItemPeriod
);
}
else
{
SuppliersItemPeriod
suppliersItemPeriod1
=
suppliersItemPeriodRepository
.
findOne
(
suppliersItemPeriod
.
getId
());
ClassHelper
.
copyProperties
(
suppliersItemPeriod
,
suppliersItemPeriod1
);
this
.
suppliersItemPeriodRepository
.
saveAndFlush
(
suppliersItemPeriod1
);
}
}
}
return
suppliersInfo
.
getId
();
}
...
...
@@ -436,6 +460,16 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
@Override
public
Map
<
String
,
Object
>
loadSuppliersItemPeriodDatas
(
SuppliersBankQueryRequest
queryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"slicedSuppliersItemPeriodList"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
queryModel
.
putDictionary
(
"banks"
,
DictUtil
.
getDictionary
(
"country"
));
queryModel
.
addCriteria
(
" and t.s_id =:sId"
);
queryModel
.
putParam
(
"sId"
,
queryRequest
.
getSId
());
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
//删除数据
@Override
public
void
deleteSuppliersDataByIds
(
List
<
String
>
ids
)
{
...
...
@@ -491,6 +525,13 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
}
}
@Override
public
void
deleteSuppliersItemPeriodByIds
(
List
<
String
>
ids
)
{
for
(
String
id
:
ids
)
{
suppliersItemPeriodRepository
.
delete
(
id
);
}
}
@Override
public
void
deleteSuppliersBankByIds
(
List
<
String
>
ids
){
for
(
String
id:
ids
){
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/controller/SuppliersDataController.java
View file @
351f1e2d
...
...
@@ -170,6 +170,15 @@ public class SuppliersDataController extends CommonController {
Map
<
String
,
Object
>
map
=
suppliersDataApplication
.
loadSuppliersBankDatas
(
queryRequest
);
return
toResult
(
map
);
}
public
String
slicedSuppliersItemPeriodData
(){
SDO
sdo
=
this
.
getSDO
();
SuppliersBankQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
SuppliersBankQueryRequest
.
class
);
queryRequest
.
setSId
(
sdo
.
getString
(
"sId"
));
Map
<
String
,
Object
>
map
=
suppliersDataApplication
.
loadSuppliersItemPeriodDatas
(
queryRequest
);
return
toResult
(
map
);
}
public
String
deleteSuppliersData
()
{
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
...
...
@@ -198,6 +207,13 @@ public class SuppliersDataController extends CommonController {
return
success
();
}
public
String
deleteSuppliersItemPeriods
()
{
SDO
sdo
=
this
.
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
suppliersDataApplication
.
deleteSuppliersItemPeriodByIds
(
ids
);
return
success
();
}
public
String
importInitData
(){
SDO
sdo
=
this
.
getSDO
();
impDataFromXLS
.
readFile
();
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/domain/SuppliersItemPeriod.java
0 → 100644
View file @
351f1e2d
package
com
.
huigou
.
topsun
.
sap
.
suppliers
.
domain
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
lombok.Data
;
import
org.hibernate.annotations.GenericGenerator
;
import
javax.persistence.*
;
import
java.io.Serializable
;
/**
*
* @TableName sap_suppliers_item_period
* 供应商子范围
*/
@Table
(
name
=
"sap_suppliers_item_period"
)
@Data
@Entity
public
class
SuppliersItemPeriod
implements
Serializable
{
@Id
@GeneratedValue
(
generator
=
"system-uuid"
)
@GenericGenerator
(
name
=
"system-uuid"
,
strategy
=
"guid"
)
private
String
id
;
/**
* 主表id
*/
@Column
(
name
=
"s_id"
)
@JSONField
(
name
=
"S_ID"
)
private
String
sId
;
/**
* 供应商子范围
*/
@Column
(
name
=
"ltsnr"
)
@JSONField
(
name
=
"LTSNR"
)
private
String
ltsnr
;
/**
* 供应商子范围描述
*/
@Column
(
name
=
"ltsbz"
)
@JSONField
(
name
=
"LTSBZ"
)
private
String
ltsbz
;
/**
* 工厂
*/
@Column
(
name
=
"werks"
)
@JSONField
(
name
=
"WERKS"
)
private
String
werks
;
/**
* 工厂名称
*/
@Column
(
name
=
"name1"
)
@JSONField
(
name
=
"NAME1"
)
private
String
name1
;
/**
* 货币码
*/
@Column
(
name
=
"waers"
)
@JSONField
(
name
=
"WAERS"
)
private
String
waers
;
/**
* 付款条件代码
*/
@Column
(
name
=
"pay_condition"
)
@JSONField
(
name
=
"ZTERM"
)
private
String
payCondition
;
/**
* 国际贸易条款
*/
@Column
(
name
=
"inco1"
)
@JSONField
(
name
=
"INCO1"
)
private
String
inco1
;
/**
* 国际贸易条款位置 1
*/
@Column
(
name
=
"inco2_l"
)
@JSONField
(
name
=
"INCO2_L"
)
private
String
inco2L
;
/**
* 国际贸易条款位置 2
*/
@Column
(
name
=
"inco3_l"
)
@JSONField
(
name
=
"INCO3_L"
)
private
String
inco3L
;
/**
* 标识:基于收货的发票验证
*/
@Column
(
name
=
"webre"
)
@JSONField
(
name
=
"WEBRE"
)
private
String
webre
;
/**
* 计算方案组(供应商)
*/
@Column
(
name
=
"kalsk"
)
@JSONField
(
name
=
"KALSK"
)
private
String
kalsk
;
/**
* 供应商办公室的负责销售人员
*/
@Column
(
name
=
"verkf"
)
@JSONField
(
name
=
"VERKF"
)
private
String
verkf
;
/**
* 供应商电话号码
*/
@Column
(
name
=
"telf1"
)
@JSONField
(
name
=
"TELF1"
)
private
String
telf1
;
/**
* 基于服务的发票校验标识
*/
@Column
(
name
=
"lebre"
)
@JSONField
(
name
=
"LEBRE"
)
private
String
lebre
;
/**
* 边境运输方式(欧盟内部贸易统计)
*/
@Column
(
name
=
"expvz"
)
@JSONField
(
name
=
"EXPVZ"
)
private
String
expvz
;
/**
* 采购冻结在采购组织层
*/
@Column
(
name
=
"sperm"
)
@JSONField
(
name
=
"SPERM"
)
private
String
sperm
;
@Column
(
name
=
"sequence"
)
private
int
sequence
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/suppliers/repository/SuppliersItemPeriodRepository.java
0 → 100644
View file @
351f1e2d
package
com
.
huigou
.
topsun
.
sap
.
suppliers
.
repository
;
import
com.huigou.topsun.sap.suppliers.domain.SuppliersItemPeriod
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @author xin.lu
* @Description: TODO
* @date 2025/2/811:43
*/
public
interface
SuppliersItemPeriodRepository
extends
JpaRepository
<
SuppliersItemPeriod
,
String
>
{
List
<
SuppliersItemPeriod
>
findAllBySId
(
String
sId
);
}
topsun/src/main/resources/config/topsun/sap/sapSuppliersData/suppliersData.xml
View file @
351f1e2d
...
...
@@ -36,6 +36,12 @@
</sql-query>
<condition
column=
"s_id"
name=
"sId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"slicedSuppliersItemPeriodList"
label=
"供应商子范围"
table=
"sap_suppliers_item_period"
>
<sql-query>
select t.* from sap_suppliers_item_period t
</sql-query>
<condition
column=
"s_id"
name=
"sId"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"slicedSuppliersBankList"
label=
"银行明细"
table=
"sap_suppliers_bank"
>
<sql-query>
select t.*
...
...
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