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
64a813dd
Commit
64a813dd
authored
Jul 03, 2025
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据字典允许文本重复;固定资产采购申请绑定资产编号时,根据数据字典matklMapping映射关系查询;查询物料时,如果传了ztype="X",SAP才查询 物料文本描述,否则只查询基本视图。
parent
9d881e63
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
85 additions
and
19 deletions
+85
-19
Dictionary.js
huigou-xt/src/main/webapp/system/configuration/Dictionary.js
+3
-3
nonProdApplyNext.js
...in/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
+1
-1
nonProducePickDetail.js
...app/biz/topsun/sap/nonProducePick/nonProducePickDetail.js
+2
-1
purchaseAnln1Detail.js
...ain/webapp/biz/topsun/sap/purchase/purchaseAnln1Detail.js
+4
-1
sapZNE1PurchaseDetail.js
...n/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
+1
-1
ResourceSearchController.java
...om/huigou/topsun/controller/ResourceSearchController.java
+63
-0
SapPurchaseController.java
...topsun/sap/purchase/controller/SapPurchaseController.java
+10
-12
SapDialogQuery.java
...opsun/sap/sapApplication/domain/query/SapDialogQuery.java
+1
-0
No files found.
huigou-xt/src/main/webapp/system/configuration/Dictionary.js
View file @
64a813dd
...
...
@@ -191,9 +191,9 @@ function checkDetailData(){
var
flag
=
true
,
names
=
{},
values
=
{};
$
.
each
(
detailData
,
function
(
i
,
o
){
if
(
names
[
o
.
name
]){
Public
.
tip
(
'成员名称['
+
o
.
name
+
']重复,请检查!'
);
flag
=
false
;
return
false
;
//
Public.tip('成员名称['+o.name+']重复,请检查!');
//
flag=false;
//
return false;
}
else
{
names
[
o
.
name
]
=
1
;
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
View file @
64a813dd
...
...
@@ -484,7 +484,7 @@ function saleMustInput(flag) { //销售必输项
UICtrl
.
setElRequiredFlag
(
"#alandName"
,
flag
);
UICtrl
.
setElRequiredFlag
(
"#aland"
,
flag
);
UICtrl
.
setElRequiredFlag
(
"#taxkm"
,
flag
);
UICtrl
.
setElRequiredFlag
(
"#ktgrm"
,
flag
);
//
UICtrl.setElRequiredFlag("#ktgrm",flag);
UICtrl
.
setElRequiredFlag
(
"#vkorgName"
,
flag
);
UICtrl
.
setElRequiredFlag
(
"#vtwegName"
,
flag
);
var
mtart
=
$
(
"#mtart"
).
val
();
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProducePick/nonProducePickDetail.js
View file @
64a813dd
...
...
@@ -129,7 +129,8 @@ function loadGrid() {
return
{
filterValue
:
$
(
"#werks"
).
val
(),
matkl
:
item
.
matkl
,
mtart
:
"ZGMB"
mtart
:
"ZGMB"
,
ztype
:
"X"
}
},
back
:
{
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/purchaseAnln1Detail.js
View file @
64a813dd
...
...
@@ -23,7 +23,10 @@ function initGrid() {
display
:
"资产编号"
,
name
:
"ANLN1"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},
{
display
:
"资产类型"
,
name
:
"TXK20"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
display
:
"资产类型"
,
name
:
"ANLKL"
,
width
:
"60"
,
align
:
"left"
,
type
:
"string"
,
},
{
display
:
"资产类型描述"
,
name
:
"TXK20"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
},
{
display
:
"资产描述"
,
name
:
"TXT50"
,
width
:
"300"
,
align
:
"left"
,
type
:
"string"
,
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
View file @
64a813dd
...
...
@@ -244,7 +244,7 @@ function getGridColumns() {
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"
d
ictionary"
,
name
:
"
purchaseMatklD
ictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MATKL"
,
...
...
topsun/src/main/java/com/huigou/topsun/controller/ResourceSearchController.java
View file @
64a813dd
...
...
@@ -134,9 +134,11 @@ public class ResourceSearchController {
String
filterValue
=
sdo
.
getString
(
"filterValue"
);
String
mtart
=
sdo
.
getString
(
"mtart"
);
//如果传了刀模板具,就排除掉
String
matkl
=
sdo
.
getString
(
"matkl"
);
//物料组
String
ztype
=
sdo
.
getString
(
"ztype"
);
//标识是否查询物料文本描述
SapDialogQuery
queryRequest
=
sdo
.
toObject
(
SapDialogQuery
.
class
);
queryRequest
.
setWerks
(
filterValue
);
queryRequest
.
setMatkl
(
matkl
);
queryRequest
.
setZtype
(
ztype
);
List
<
Map
<
String
,
String
>>
mapList
=
sapMaterialApplication
.
getSapMaterial
(
queryRequest
);
// if (CollectionUtil.isNotEmpty(mapList)){
// mapList = mapList
...
...
@@ -800,6 +802,67 @@ public class ResourceSearchController {
return
model
;
}
/**
* 物料组字典选择
* @param sdo
* @return
* @throws IOException
*/
@EasySearch
(
queryName
=
"purchaseMatklDictionary"
)
public
Map
<
String
,
Object
>
queryPurchaseMatkDictionary
(
SDO
sdo
)
throws
IOException
{
String
param
=
sdo
.
getString
(
"paramValue"
);
String
filterValue
=
sdo
.
getString
(
"filterValue"
);
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
List
<
Map
<
String
,
String
>>
resultMapList
=
new
ArrayList
<>();
mapList
=
sapDictionaryApplication
.
getSapDictionary
(
"MATKL"
);
List
<
QuerySchemeField
>
fields
=
new
ArrayList
<>();
Long
totalWidths
=
200L
;
if
(
CollectionUtil
.
isNotEmpty
(
mapList
)){
//只返回分类
//原材料 1/2/3开头,去掉二级分类(三位数)
if
(
StringUtil
.
isNotBlank
(
filterValue
)){
//固定条件过滤,前3位为大类编码
resultMapList
=
mapList
.
stream
()
.
filter
(
map
->
map
.
containsKey
(
"MATKL"
)
&&
map
.
get
(
"MATKL"
).
startsWith
(
filterValue
)
&&
(
map
.
get
(
"MATKL"
).
length
()
>
3
||
"A30"
.
equals
(
map
.
get
(
"MATKL"
)))
)
.
sorted
(
Comparator
.
comparing
(
map
->
map
.
get
(
"MATKL"
)))
.
collect
(
Collectors
.
toList
());
}
if
(
StringUtil
.
isNotBlank
(
param
)){
//输入查询条件过滤
resultMapList
=
resultMapList
.
stream
()
.
filter
(
map
->
map
.
values
().
stream
().
anyMatch
(
value
->
value
.
toLowerCase
().
contains
(
param
.
toLowerCase
())))
.
collect
(
Collectors
.
toList
());
}
if
(!
CollectionUtils
.
isEmpty
(
resultMapList
)){
Map
<
String
,
String
>
map
=
resultMapList
.
get
(
0
);
String
[]
widths
=
sapDictionaryApplication
.
getWidths
(
resultMapList
);
for
(
int
y
=
0
;
y
<
widths
.
length
;
y
++){
totalWidths
+=
Long
.
valueOf
(
widths
[
y
]);
}
int
x
=
0
;
for
(
String
key
:
map
.
keySet
())
{
QuerySchemeField
querySchemeField
=
new
QuerySchemeField
(
key
,
key
,
"string"
,
Long
.
valueOf
(
widths
[
x
]));
fields
.
add
(
querySchemeField
);
x
++;
}
}
}
System
.
out
.
println
(
"数据条数:"
+
mapList
.
size
());
Integer
intPage
=
sdo
.
getInteger
(
"intPage"
,
1
);
Integer
pageSize
=
sdo
.
getInteger
(
"pageSize"
,
10
);
PageRequest
pageRequest
=
new
PageRequest
(
intPage
-
1
,
pageSize
);
EasySearchParse
easySearchParse
=
new
EasySearchParse
();
easySearchParse
.
setFields
(
fields
);
easySearchParse
.
setWidth
(
totalWidths
);
MemEasySearcher
<
Map
<
String
,
String
>>
memEasySearcher
=
new
MemEasySearcherImpl
<>();
Map
<
String
,
Object
>
model
=
memEasySearcher
.
search
(
resultMapList
,
easySearchParse
,
pageRequest
,
null
);
return
model
;
}
/**
* 查询异常分类明细
* @param sdo
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/controller/SapPurchaseController.java
View file @
64a813dd
package
com
.
huigou
.
topsun
.
sap
.
purchase
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.huigou.cache.DictUtil
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.common.BillStatus
;
...
...
@@ -136,25 +137,22 @@ public class SapPurchaseController extends CommonController {
public
String
queryAnlanFromSap
()
throws
IOException
{
SDO
sdo
=
this
.
getSDO
();
String
param
=
sdo
.
getString
(
"paramValue"
);
//String werks = sdo.getString("werks");
String
matkl
=
sdo
.
getString
(
"matkl"
);
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
if
(
StringUtil
.
isBlank
(
param
)){
//根据物料组找到固定资产类型映射关系
String
detailText
=
DictUtil
.
getDictionaryDetailText
(
"matklMapping"
,
matkl
);
if
((
StringUtil
.
isBlank
(
detailText
)
||
"all"
.
equals
(
detailText
))
&&
StringUtil
.
isBlank
(
param
)){
return
packGridDataAndResult
(
mapList
);
}
mapList
=
sapDictionaryApplication
.
getSapDictionary
(
"ANLN1"
);
if
(
CollectionUtil
.
isNotEmpty
(
mapList
))
{
// mapList = mapList
// .stream()
// .filter(map -> map.values().stream().anyMatch(value -> value.contains(werks)))
// .collect(Collectors.toList());
//根据物料组筛选对应资产类型下的资产编号
// if ("A0001".equals(matkl)){//固定资产-房屋及建筑物
//
mapList = mapList
//
.stream()
// .filter(map -> map.values().stream().anyMatch(value -> value.contains("Z101
")))
//
.collect(Collectors.toList());
//
}
if
(
StringUtil
.
isNotBlank
(
detailText
)){
mapList
=
mapList
.
stream
()
.
filter
(
map
->
detailText
.
contains
(
map
.
get
(
"ANLKL
"
)))
.
collect
(
Collectors
.
toList
());
}
if
(
StringUtil
.
isNotBlank
(
param
)){
//输入查询条件过滤
mapList
=
mapList
.
stream
()
...
...
topsun/src/main/java/com/huigou/topsun/sap/sapApplication/domain/query/SapDialogQuery.java
View file @
64a813dd
...
...
@@ -14,5 +14,6 @@ public class SapDialogQuery {
private
String
matkl
;
private
String
mtart
;
private
String
ztype
;
}
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