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
f753bcb6
Commit
f753bcb6
authored
Apr 21, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下列选择框显示优化,物料主数据时间格式
parent
650fc79f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
35 deletions
+59
-35
nonProdApplyDetail.jsp
...webapp/biz/topsun/sap/nonProdApply/nonProdApplyDetail.jsp
+2
-1
ResourceSearchController.java
...om/huigou/topsun/controller/ResourceSearchController.java
+47
-32
NonProdApplyApplicationImpl.java
...odApply/application/impl/NonProdApplyApplicationImpl.java
+10
-2
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyDetail.jsp
View file @
f753bcb6
...
...
@@ -37,6 +37,7 @@
<x:hidden
name=
"positionId"
/>
<x:hidden
name=
"positionName"
/>
<x:hidden
name=
"personMemberId"
/>
<x:hidden
name=
"createdDate"
/>
<%-- <x:hidden name="personMemberName"/>--%>
<x:title
title=
"申请人填写区域"
name=
"group"
/>
<div
class=
"hg-form-cols"
>
...
...
@@ -44,7 +45,7 @@
<x:inputC
name=
"billCode"
label=
"申请单编号"
labelCol=
"1"
readonly=
"true"
fieldCol=
"2"
/>
<x:inputC
name=
"personMemberName"
label=
"申请人"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"deptName"
label=
"申请部门"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"
createdDate"
label=
"申请日期"
readonly=
"true"
wrapper=
"dateTime"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"
fillinDate"
label=
"申请日期"
readonly=
"true"
wrapper=
"dateTime"
maxLength=
"20"
labelCol=
"1"
fieldCol=
"2"
/>
</div>
<div
class=
"hg-form-row"
>
...
...
topsun/src/main/java/com/huigou/topsun/controller/ResourceSearchController.java
View file @
f753bcb6
...
...
@@ -245,38 +245,11 @@ public class ResourceSearchController {
if
(!
CollectionUtils
.
isEmpty
(
mapList
)){
Map
<
String
,
String
>
map
=
mapList
.
get
(
0
);
String
[]
widths
=
new
String
[
map
.
size
()];
for
(
int
i
=
0
;
i
<
mapList
.
size
();
i
++){
Map
<
String
,
String
>
mapp
=
mapList
.
get
(
i
);
int
u
=
0
;
for
(
String
key
:
mapp
.
keySet
())
{
if
(
widths
[
u
]==
null
){
widths
[
u
]
=
"40"
;
}
String
tmpWidth
=
widths
[
u
];
String
value
=(
String
)
mapp
.
get
(
key
);
if
(
value
.
trim
().
length
()>
10
){
if
(
Integer
.
parseInt
(
tmpWidth
)<
150
){
widths
[
u
]=
"120"
;
}
}
u
++;
}
}
String
[]
widths
=
getWidths
(
mapList
);
for
(
int
y
=
0
;
y
<
widths
.
length
;
y
++){
totalWidths
+=
Long
.
valueOf
(
widths
[
y
]);
}
// map.keySet().forEach((index,key)->{
/* String widths="30";
String value=(String) map.get(key);
if (value.trim().length()>10){
widths="100";
}*/
// QuerySchemeField querySchemeField = new QuerySchemeField(key,key,"string",Long.valueOf(widths[0]));
// fields.add(querySchemeField);
//});
int
x
=
0
;
for
(
String
key
:
map
.
keySet
())
{
QuerySchemeField
querySchemeField
=
new
QuerySchemeField
(
key
,
key
,
"string"
,
Long
.
valueOf
(
widths
[
x
]));
...
...
@@ -299,6 +272,36 @@ public class ResourceSearchController {
return
model
;
}
public
String
[]
getWidths
(
List
<
Map
<
String
,
String
>>
mapList
){
Map
<
String
,
String
>
map
=
mapList
.
get
(
0
);
String
[]
widths
=
new
String
[
map
.
size
()];
for
(
int
i
=
0
;
i
<
mapList
.
size
();
i
++){
Map
<
String
,
String
>
mapp
=
mapList
.
get
(
i
);
int
u
=
0
;
for
(
String
key
:
mapp
.
keySet
())
{
if
(
widths
[
u
]==
null
){
widths
[
u
]
=
"40"
;
}
String
tmpWidth
=
widths
[
u
];
String
value
=(
String
)
mapp
.
get
(
key
);
if
(
value
.
trim
().
length
()>
10
){
if
(
Integer
.
parseInt
(
tmpWidth
)<
130
){
widths
[
u
]=
"130"
;
}
}
else
{
if
(
value
.
trim
().
length
()>
6
){
if
(
Integer
.
parseInt
(
tmpWidth
)<
80
){
widths
[
u
]=
String
.
valueOf
(
value
.
trim
().
length
()*
10
);
}
}
}
u
++;
}
}
return
widths
;
}
@EasySearch
(
queryName
=
"getCusAndSuppliers"
)
public
Map
<
String
,
Object
>
getCusAndSuppliers
(
SDO
sdo
)
throws
IOException
{
String
param
=
sdo
.
getString
(
"paramValue"
);
...
...
@@ -380,6 +383,7 @@ public class ResourceSearchController {
public
Map
<
String
,
Object
>
initEasySearchModel
(
List
<
Map
<
String
,
String
>>
mapList
,
String
param
,
SDO
sdo
){
List
<
QuerySchemeField
>
fields
=
new
ArrayList
<>();
Long
totalWidths
=
200L
;
if
(
CollectionUtil
.
isNotEmpty
(
mapList
)){
if
(
StringUtil
.
isNotBlank
(
param
)){
//输入查询条件过滤
mapList
=
mapList
...
...
@@ -389,10 +393,21 @@ public class ResourceSearchController {
}
if
(!
CollectionUtils
.
isEmpty
(
mapList
)){
Map
<
String
,
String
>
map
=
mapList
.
get
(
0
);
map
.
keySet
().
forEach
(
key
->{
String
[]
widths
=
getWidths
(
mapList
);
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
++;
}
/* map.keySet().forEach(key->{
QuerySchemeField querySchemeField = new QuerySchemeField(key,key,"string",200L);
fields.add(querySchemeField);
});
});
*/
}
}
Integer
intPage
=
sdo
.
getInteger
(
"intPage"
,
1
);
...
...
@@ -400,7 +415,7 @@ public class ResourceSearchController {
PageRequest
pageRequest
=
new
PageRequest
(
intPage
-
1
,
pageSize
);
EasySearchParse
easySearchParse
=
new
EasySearchParse
();
easySearchParse
.
setFields
(
fields
);
easySearchParse
.
setWidth
(
450L
);
easySearchParse
.
setWidth
(
totalWidths
);
MemEasySearcher
<
Map
<
String
,
String
>>
memEasySearcher
=
new
MemEasySearcherImpl
<>();
Map
<
String
,
Object
>
model
=
memEasySearcher
.
search
(
mapList
,
easySearchParse
,
pageRequest
,
null
);
return
model
;
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyApplicationImpl.java
View file @
f753bcb6
...
...
@@ -82,6 +82,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
if
(
nonProdApplyBaseInfo
.
isNew
())
{
nonProdApplyBaseInfo
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
nonProdApplyBaseInfo
.
setDistribute
(
0
);
nonProdApplyBaseInfo
.
setCreatedDate
(
new
Date
());
if
(
StringUtil
.
isNotBlank
(
nonProdApplyBaseInfo
.
getSourceId
())){
//有数据来源ID的 表示是变更或扩展的
sapNonProdApplyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptByBaseInfoId
(
nonProdApplyBaseInfo
.
getSourceId
());
}
...
...
@@ -314,6 +315,9 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
public
NonProdApplyBaseInfo
loadNonProdApplyBaseInfoById
(
String
id
)
{
NonProdApplyBaseInfo
nonProdApplyBaseInfo
=
nonProdApplyBaseInfoRepository
.
findOne
(
id
);
if
(
nonProdApplyBaseInfo
==
null
){
throw
new
RuntimeException
(
"数据已经不存在!"
);
}
SapNonProdApplyDept
applyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptByBaseInfoId
(
nonProdApplyBaseInfo
.
getId
());
if
(
applyDept
!=
null
){
nonProdApplyBaseInfo
.
setApplyDeptId
(
applyDept
.
getApplyDeptId
());
...
...
@@ -380,9 +384,13 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
public
void
deleteNonProdApplyBaseInfoByIds
(
List
<
String
>
ids
)
{
ids
.
forEach
(
this
::
deleteNonProdApplyBaseInfoById
);
for
(
String
id:
ids
)
{
nonProdApplyDeptApplication
.
deleteSapNonProdApplyDept
(
nonProdApplyDeptApplication
.
getNonProdApplyDeptByBaseInfoId
(
id
));
}
nonProdApplyDeptApplication
.
deleteSapNonProdApplyDept
(
nonProdApplyDeptApplication
.
getNonProdApplyDeptByBaseInfoId
(
id
));
//更新流程任务的状态
String
sql
=
"update act_ru_task_extension set STATUS_ID_='completed',STATUS_NAME_='已完成' where "
;
sql
+=
" BUSINESS_KEY_='"
+
id
+
"'"
;
sqlExecutorDao
.
executeUpdate
(
sql
);
}
}
@Override
...
...
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