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
f45774d4
Commit
f45774d4
authored
Feb 14, 2025
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
供应商接口中增加供应商子范围
parent
95ba3307
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
182 additions
and
14 deletions
+182
-14
suppliersDataDetail.js
...in/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.js
+21
-4
SuppliersDataApplicationImpl.java
...pliers/application/impl/SuppliersDataApplicationImpl.java
+30
-10
SuppliersItemPeriod.java
...igou/topsun/sap/suppliers/domain/SuppliersItemPeriod.java
+7
-0
SuppliersInfoVo.java
...uigou/topsun/sap/suppliers/domain/vo/SuppliersInfoVo.java
+3
-0
SuppliersItemPeriodVo.java
...topsun/sap/suppliers/domain/vo/SuppliersItemPeriodVo.java
+121
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/suppliers/suppliersDataDetail.js
View file @
f45774d4
...
@@ -250,9 +250,8 @@ function loadSuppliersItemPeriodListGrid() {
...
@@ -250,9 +250,8 @@ function loadSuppliersItemPeriodListGrid() {
{
{
// 行号加一
// 行号加一
sequence
:
(
sapSuppliersItemPeriodGridManager
.
getData
().
length
+
1
)
*
10
,
sequence
:
(
sapSuppliersItemPeriodGridManager
.
getData
().
length
+
1
)
*
10
,
ltsnr
:
(
sapSuppliersItemPeriodGridManager
.
getData
().
length
+
1
)
*
10
,
webre
:
"X"
,
webre
:
"X"
,
waers
:
"CNY"
,
waersTextView
:
"CNY-人民币"
,
kalsk
:
"Z1"
,
kalsk
:
"Z1"
,
telf1
:
$
(
"#buGroup"
).
val
()
==
"Z005"
?
$
(
"#mobNumber"
).
val
():
""
telf1
:
$
(
"#buGroup"
).
val
()
==
"Z005"
?
$
(
"#mobNumber"
).
val
():
""
...
@@ -283,6 +282,8 @@ function loadSuppliersItemPeriodListGrid() {
...
@@ -283,6 +282,8 @@ function loadSuppliersItemPeriodListGrid() {
parms
:
{
sId
:
getsId
},
parms
:
{
sId
:
getsId
},
pageSize
:
20
,
pageSize
:
20
,
usePager
:
true
,
usePager
:
true
,
sortName
:
'sequence'
,
sortOrder
:
'asc'
,
toolbar
:
toolbarOptions
,
toolbar
:
toolbarOptions
,
enabledEdit
:
canEdit
,
enabledEdit
:
canEdit
,
width
:
"98%"
,
width
:
"98%"
,
...
@@ -296,6 +297,9 @@ function loadSuppliersItemPeriodListGrid() {
...
@@ -296,6 +297,9 @@ function loadSuppliersItemPeriodListGrid() {
if
(
c
.
name
==
'telf1'
&&
$
(
"#buGroup"
).
val
()
==
"Z005"
)
{
if
(
c
.
name
==
'telf1'
&&
$
(
"#buGroup"
).
val
()
==
"Z005"
)
{
$
(
"#mobNumber"
).
val
(
data
.
telf1
)
$
(
"#mobNumber"
).
val
(
data
.
telf1
)
}
}
if
(
c
.
name
==
'waersTextView'
)
{
sapSuppliersItemPeriodGridManager
.
updateRow
(
data
,{
ltsbz
:
data
.
ltsnr
+
"-"
+
data
.
waersTextView
});
}
},
},
});
});
UICtrl
.
setSearchAreaToggle
(
sapSuppliersItemPeriodGridManager
);
UICtrl
.
setSearchAreaToggle
(
sapSuppliersItemPeriodGridManager
);
...
@@ -307,13 +311,26 @@ function getItemPeriodColumns(){
...
@@ -307,13 +311,26 @@ function getItemPeriodColumns(){
display
:
"行号"
,
name
:
"sequence"
,
width
:
80
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
display
:
"行号"
,
name
:
"sequence"
,
width
:
80
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
//editor: {type: 'spinner', min: 1, max: 100, mask: 'nnn'}
//editor: {type: 'spinner', min: 1, max: 100, mask: 'nnn'}
},)
},)
columns
.
push
({
display
:
"采购组织"
,
name
:
"ekorgTextView"
,
width
:
200
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'dictionary'
,
data
:
{
name
:
'ekorg'
},
textField
:
'ekorgTextView'
,
valueField
:
'ekorg'
,
required
:
true
,
render
:
function
(
item
)
{
return
item
.
ekorgTextView
;
}
},
},)
columns
.
push
({
columns
.
push
({
display
:
"供应商子范围"
,
name
:
"ltsnr"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
display
:
"供应商子范围"
,
name
:
"ltsnr"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
true
}
//
editor: {type: 'text', required: true}
},)
},)
columns
.
push
({
columns
.
push
({
display
:
"供应商子范围描述"
,
name
:
"ltsbz"
,
width
:
120
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
display
:
"供应商子范围描述"
,
name
:
"ltsbz"
,
width
:
120
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
true
}
//
editor: {type: 'text', required: true}
},)
},)
columns
.
push
({
columns
.
push
({
display
:
"工厂"
,
name
:
"werks"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
display
:
"工厂"
,
name
:
"werks"
,
width
:
100
,
minWidth
:
60
,
type
:
"String"
,
align
:
"left"
,
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/application/impl/SuppliersDataApplicationImpl.java
View file @
f45774d4
...
@@ -18,10 +18,7 @@ import com.huigou.topsun.sap.suppliers.domain.query.SuppliersBankQueryRequest;
...
@@ -18,10 +18,7 @@ import com.huigou.topsun.sap.suppliers.domain.query.SuppliersBankQueryRequest;
import
com.huigou.topsun.sap.suppliers.domain.query.SuppliersBuyerQueryRequest
;
import
com.huigou.topsun.sap.suppliers.domain.query.SuppliersBuyerQueryRequest
;
import
com.huigou.topsun.sap.suppliers.domain.query.SuppliersDataQueryRequest
;
import
com.huigou.topsun.sap.suppliers.domain.query.SuppliersDataQueryRequest
;
import
com.huigou.topsun.sap.suppliers.domain.query.SuppliersPayQueryRequest
;
import
com.huigou.topsun.sap.suppliers.domain.query.SuppliersPayQueryRequest
;
import
com.huigou.topsun.sap.suppliers.domain.vo.SuppliersBankVo
;
import
com.huigou.topsun.sap.suppliers.domain.vo.*
;
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.*
;
import
com.huigou.topsun.sap.suppliers.repository.*
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.ApprovalParameter
;
import
com.huigou.uasp.bpm.ApprovalParameter
;
...
@@ -243,8 +240,9 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
...
@@ -243,8 +240,9 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
List
<
SuppliersBuyer
>
buyerList
=
this
.
suppliersBuyerRepository
.
findAllBySId
(
suppliersInfo
.
getId
());
List
<
SuppliersBuyer
>
buyerList
=
this
.
suppliersBuyerRepository
.
findAllBySId
(
suppliersInfo
.
getId
());
List
<
SuppliersBank
>
bankList
=
this
.
suppliersBankRepository
.
findAllBySId
(
suppliersInfo
.
getId
());
List
<
SuppliersBank
>
bankList
=
this
.
suppliersBankRepository
.
findAllBySId
(
suppliersInfo
.
getId
());
List
<
SuppliersItemPeriod
>
periodList
=
this
.
suppliersItemPeriodRepository
.
findAllBySId
(
suppliersInfo
.
getId
());
sendSapData
(
suppliersInfo
,
payList
,
buyerList
,
bankList
);
sendSapData
(
suppliersInfo
,
payList
,
buyerList
,
bankList
,
periodList
);
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
suppliersInfo
.
setStatusId
(
status
.
getId
());
suppliersInfo
.
setStatusId
(
status
.
getId
());
suppliersInfoRepository
.
save
(
suppliersInfo
);
suppliersInfoRepository
.
save
(
suppliersInfo
);
...
@@ -279,7 +277,7 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
...
@@ -279,7 +277,7 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
/**
/**
* 远程调用sap接口,传递数据
* 远程调用sap接口,传递数据
*/
*/
public
void
sendSapData
(
SuppliersInfo
suppliersInfo
,
List
<
SuppliersPay
>
payList
,
List
<
SuppliersBuyer
>
buyerList
,
List
<
SuppliersBank
>
bankList
)
{
public
void
sendSapData
(
SuppliersInfo
suppliersInfo
,
List
<
SuppliersPay
>
payList
,
List
<
SuppliersBuyer
>
buyerList
,
List
<
SuppliersBank
>
bankList
,
List
<
SuppliersItemPeriod
>
periodList
)
{
SuppliersInfoVo
suppliersInfoVo
=
new
SuppliersInfoVo
();
SuppliersInfoVo
suppliersInfoVo
=
new
SuppliersInfoVo
();
BeanUtil
.
copyProperties
(
suppliersInfo
,
suppliersInfoVo
);
BeanUtil
.
copyProperties
(
suppliersInfo
,
suppliersInfoVo
);
suppliersInfoVo
.
setKtokk
(
suppliersInfoVo
.
getRltgr
());
suppliersInfoVo
.
setKtokk
(
suppliersInfoVo
.
getRltgr
());
...
@@ -298,6 +296,8 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
...
@@ -298,6 +296,8 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
bankList
.
addAll
(
otherBankList
);
bankList
.
addAll
(
otherBankList
);
List
<
SuppliersBuyer
>
otherBuyerList
=
this
.
getOtherBuyerList
(
suppliersInfo
.
getPartner
());
List
<
SuppliersBuyer
>
otherBuyerList
=
this
.
getOtherBuyerList
(
suppliersInfo
.
getPartner
());
buyerList
.
addAll
(
otherBuyerList
);
buyerList
.
addAll
(
otherBuyerList
);
List
<
SuppliersItemPeriod
>
otherItemPeriodList
=
this
.
getOtherItemPeriodList
(
suppliersInfo
.
getPartner
());
periodList
.
addAll
(
otherItemPeriodList
);
}
}
if
(
"0"
.
equals
(
suppliersInfoVo
.
getSperr
())){
if
(
"0"
.
equals
(
suppliersInfoVo
.
getSperr
())){
suppliersInfoVo
.
setSperr
(
""
);
suppliersInfoVo
.
setSperr
(
""
);
...
@@ -340,6 +340,16 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
...
@@ -340,6 +340,16 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
bankVo
.
setBanka
(
suppliersInfoVo
.
getNameOrg1
());
bankVo
.
setBanka
(
suppliersInfoVo
.
getNameOrg1
());
bankVoList
.
add
(
bankVo
);
bankVoList
.
add
(
bankVo
);
suppliersInfoVo
.
setSuppliersBankList
(
bankVoList
);
suppliersInfoVo
.
setSuppliersBankList
(
bankVoList
);
//供应商子范围
List
<
SuppliersItemPeriodVo
>
itemPeriodVoList
=
new
ArrayList
<>();
periodList
.
forEach
(
period
->
{
SuppliersItemPeriodVo
itemPeriodVo
=
new
SuppliersItemPeriodVo
();
ClassHelper
.
copyProperties
(
period
,
itemPeriodVo
);
itemPeriodVoList
.
add
(
itemPeriodVo
);
});
suppliersInfoVo
.
setSuppliersItemPeriodVoList
(
itemPeriodVoList
);
ObjectMapper
objectMapper
=
new
ObjectMapper
();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
String
url
=
"CUD_SUPPLY/SUPPLY_DATA"
;
String
url
=
"CUD_SUPPLY/SUPPLY_DATA"
;
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
...
@@ -352,6 +362,7 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
...
@@ -352,6 +362,7 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
parameter
=
parameter
.
replaceAll
(
"suppliersPayList"
,
"LFB1"
);
parameter
=
parameter
.
replaceAll
(
"suppliersPayList"
,
"LFB1"
);
parameter
=
parameter
.
replaceAll
(
"suppliersBuyerList"
,
"LFM1"
);
parameter
=
parameter
.
replaceAll
(
"suppliersBuyerList"
,
"LFM1"
);
parameter
=
parameter
.
replaceAll
(
"suppliersBankList"
,
"BANK"
);
parameter
=
parameter
.
replaceAll
(
"suppliersBankList"
,
"BANK"
);
parameter
=
parameter
.
replaceAll
(
"suppliersItemPeriodVoList"
,
"LFM2"
);
// parameter=com.huigou.topsun.util.CommonUtil.camelToUnderline(parameter);
// parameter=com.huigou.topsun.util.CommonUtil.camelToUnderline(parameter);
resultMap
.
put
(
"parameter"
,
parameter
);
resultMap
.
put
(
"parameter"
,
parameter
);
String
result
=
defaultHttpClient
.
execute
(
suppliersInfoVos
,
url
);
String
result
=
defaultHttpClient
.
execute
(
suppliersInfoVos
,
url
);
...
@@ -407,13 +418,13 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
...
@@ -407,13 +418,13 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
//设置标题
//设置标题
// String wantGoodsNameText = DictUtil.getDictionaryDetailText("A0051", wantGoods.getCustomerName());
// String wantGoodsNameText = DictUtil.getDictionaryDetailText("A0051", wantGoods.getCustomerName());
if
(
suppliersInfo
.
getApplyType
().
equals
(
"1"
))
{
if
(
suppliersInfo
.
getApplyType
().
equals
(
"1"
))
{
return
String
.
format
(
"%s-%s(%s)"
,
"供应商主数据修改"
,
""
,
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
"供应商主数据修改"
,
suppliersInfo
.
getNameOrg1
()
,
fillinDateStr
);
}
else
if
(
suppliersInfo
.
getApplyType
().
equals
(
"-1"
))
{
}
else
if
(
suppliersInfo
.
getApplyType
().
equals
(
"-1"
))
{
return
String
.
format
(
"%s-%s(%s)"
,
"供应商主数据删除"
,
""
,
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
"供应商主数据删除"
,
suppliersInfo
.
getNameOrg1
()
,
fillinDateStr
);
}
else
if
(
suppliersInfo
.
getApplyType
().
equals
(
"2"
))
{
}
else
if
(
suppliersInfo
.
getApplyType
().
equals
(
"2"
))
{
return
String
.
format
(
"%s-%s(%s)"
,
"供应商主数据扩展"
,
""
,
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
"供应商主数据扩展"
,
suppliersInfo
.
getNameOrg1
()
,
fillinDateStr
);
}
else
{
}
else
{
return
String
.
format
(
"%s-%s(%s)"
,
"供应商主数据申请"
,
""
,
fillinDateStr
);
return
String
.
format
(
"%s-%s(%s)"
,
"供应商主数据申请"
,
suppliersInfo
.
getNameOrg1
()
,
fillinDateStr
);
}
}
}
}
...
@@ -652,6 +663,15 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
...
@@ -652,6 +663,15 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
return
buyerList
;
return
buyerList
;
}
}
public
List
<
SuppliersItemPeriod
>
getOtherItemPeriodList
(
String
partner
){
Map
<
String
,
String
>
idGroup
=
this
.
getIdGroup
(
partner
);
//采购组织
List
<
SuppliersItemPeriod
>
periodList
=
suppliersItemPeriodRepository
.
findAllBySId
(
idGroup
.
get
(
"id"
));
List
<
SuppliersItemPeriod
>
extendperiodList
=
suppliersItemPeriodRepository
.
findAllBySId
(
idGroup
.
get
(
"extendId"
));
periodList
.
addAll
(
extendperiodList
);
return
periodList
;
}
public
List
<
SuppliersBank
>
getOtherBankList
(
String
partner
){
public
List
<
SuppliersBank
>
getOtherBankList
(
String
partner
){
Map
<
String
,
String
>
idGroup
=
this
.
getIdGroup
(
partner
);
Map
<
String
,
String
>
idGroup
=
this
.
getIdGroup
(
partner
);
//银行信息
//银行信息
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/domain/SuppliersItemPeriod.java
View file @
f45774d4
...
@@ -35,6 +35,13 @@ public class SuppliersItemPeriod implements Serializable {
...
@@ -35,6 +35,13 @@ public class SuppliersItemPeriod implements Serializable {
@JSONField
(
name
=
"S_ID"
)
@JSONField
(
name
=
"S_ID"
)
private
String
sId
;
private
String
sId
;
/**
* 采购组织
*/
@Column
(
name
=
"ekorg"
)
@JSONField
(
name
=
"EKORG"
)
private
String
ekorg
;
/**
/**
* 供应商子范围
* 供应商子范围
*/
*/
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/domain/vo/SuppliersInfoVo.java
View file @
f45774d4
...
@@ -220,4 +220,7 @@ public class SuppliersInfoVo implements Serializable {
...
@@ -220,4 +220,7 @@ public class SuppliersInfoVo implements Serializable {
@JsonProperty
(
"BANK"
)
@JsonProperty
(
"BANK"
)
private
List
<
SuppliersBankVo
>
suppliersBankList
;
private
List
<
SuppliersBankVo
>
suppliersBankList
;
@JsonProperty
(
"LFM2"
)
private
List
<
SuppliersItemPeriodVo
>
suppliersItemPeriodVoList
;
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/suppliers/domain/vo/SuppliersItemPeriodVo.java
0 → 100644
View file @
f45774d4
package
com
.
huigou
.
topsun
.
sap
.
suppliers
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
*
* @TableName sap_suppliers_item_period
* 供应商子范围
*/
@Data
public
class
SuppliersItemPeriodVo
implements
Serializable
{
/**
* 采购组织
*/
@JsonProperty
(
"EKORG"
)
private
String
ekorg
;
/**
* 供应商子范围
*/
@JsonProperty
(
"LTSNR"
)
private
String
ltsnr
;
/**
* 供应商子范围描述
*/
@JsonProperty
(
"LTSBZ"
)
private
String
ltsbz
;
/**
* 工厂
*/
@JsonProperty
(
"WERKS"
)
private
String
werks
;
/**
* 工厂名称
*/
@JsonProperty
(
"NAME1"
)
private
String
name1
;
/**
* 货币码
*/
@JsonProperty
(
"WAERS"
)
private
String
waers
;
/**
* 付款条件代码
*/
@JsonProperty
(
"ZTERM"
)
private
String
payCondition
;
/**
* 国际贸易条款
*/
@JsonProperty
(
"INCO1"
)
private
String
inco1
;
/**
* 国际贸易条款位置 1
*/
@JsonProperty
(
"INCO2_L"
)
private
String
inco2L
;
/**
* 国际贸易条款位置 2
*/
@JsonProperty
(
"INCO3_L"
)
private
String
inco3L
;
/**
* 标识:基于收货的发票验证
*/
@JsonProperty
(
"WEBRE"
)
private
String
webre
;
/**
* 计算方案组(供应商)
*/
@JsonProperty
(
"KALSK"
)
private
String
kalsk
;
/**
* 供应商办公室的负责销售人员
*/
@JsonProperty
(
"VERKF"
)
private
String
verkf
;
/**
* 供应商电话号码
*/
@JsonProperty
(
"TELF1"
)
private
String
telf1
;
/**
* 基于服务的发票校验标识
*/
@JsonProperty
(
"LEBRE"
)
private
String
lebre
;
/**
* 边境运输方式(欧盟内部贸易统计)
*/
@JsonProperty
(
"EXPVZ"
)
private
String
expvz
;
/**
* 采购冻结在采购组织层
*/
@JsonProperty
(
"SPERM"
)
private
String
sperm
;
}
\ No newline at end of file
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