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
74a45113
Commit
74a45113
authored
Apr 09, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料/产品主数据修改,选择业务部门自动增加选择审批人员
parent
7fc7713f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
4 deletions
+48
-4
nonProdApplyNext.js
...in/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
+27
-0
nonProdApplyNext.jsp
...n/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
+3
-0
NonProdApplyDeptApplicationImpl.java
...ply/application/impl/NonProdApplyDeptApplicationImpl.java
+9
-2
NonProdApplyNextController.java
...p/nonProdApply/controller/NonProdApplyNextController.java
+9
-2
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
View file @
74a45113
...
...
@@ -99,6 +99,32 @@ function initializate() {
// }
// });
var
dictUsage
=
dictUsages
.
split
(
";"
);
$
(
'input[name="businessUsage"]'
).
change
(
function
()
{
//alert($(this).is(':checked'));
if
(
$
(
this
).
is
(
':checked'
))
{
console
.
log
(
$
(
this
).
val
());
// 输出选中的值
debugger
var
name
=
""
,
deptCode
=
""
;
for
(
var
u
=
0
;
u
<
dictUsage
.
length
;
u
++
){
if
(
$
(
this
).
val
()
==
dictUsage
[
u
].
split
(
","
)[
0
]){
name
=
dictUsage
[
u
].
split
(
","
)[
1
];
deptCode
=
dictUsage
[
u
].
split
(
","
)[
0
];
break
;
}
}
gridManager
.
addRow
({
deptName
:
name
,
deptCode
:
deptCode
,
userName
:
""
});
}
else
{
let
datas
=
gridManager
.
getData
();
var
selval
=
$
(
this
).
val
();
for
(
var
i
=
0
;
i
<
datas
.
length
;
i
++
)
{
if
(
datas
[
i
].
deptCode
==
selval
){
gridManager
.
deleteRow
(
i
);
}
}
}
});
}
...
...
@@ -127,6 +153,7 @@ function loadGrid() {
// let a=(dept.length+1)*37.5;
gridManager
=
UICtrl
.
grid
(
"#businessPersonnelListGrid"
,
{
columns
:
[
{
display
:
"部门代码"
,
name
:
"deptCode"
,
width
:
0
,
minWidth
:
10
,
type
:
"string"
,
align
:
"left"
,
hide
:
true
},
{
display
:
"部门"
,
name
:
"deptName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"部门人员"
,
name
:
"userName"
,
width
:
280
,
disable
:
true
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
View file @
74a45113
...
...
@@ -4,6 +4,9 @@
<html>
<head>
<script>
var
dictUsages
=
"${dictUsages}"
;
</script>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,date"
/>
<x:script
src=
'/biz/topsun/sap/nonProdApply/nonProdApplyNext.js'
/>
</head>
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyDeptApplicationImpl.java
View file @
74a45113
...
...
@@ -140,6 +140,9 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
try
{
deptStaffList
=
objectMapper
.
readValue
(
deptStaffJSON
,
new
TypeReference
<
List
<
Map
<
String
,
String
>>>()
{
});
if
(
deptStaffList
.
size
()<
1
){
throw
new
RuntimeException
(
"未选择对应的分发人员!"
);
}
}
catch
(
JsonProcessingException
e
)
{
throw
new
RuntimeException
(
"JSON转换失败:"
+
e
);
}
...
...
@@ -205,17 +208,21 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
*/
@Override
public
void
distributeSapNonProdApplyDept
(
SDO
sdo
)
{
//将状态为保存未分发的全部修改为分发未完成
Map
<
String
,
Object
>
map
=
this
.
saveSapNonProdApplyDept
(
sdo
);
//获取分发的部门与人员信息
ObjectMapper
objectMapper
=
new
ObjectMapper
();
String
deptStaffJSON
=
sdo
.
getString
(
"deptStaff"
);
List
<
Map
<
String
,
String
>>
deptStaffList
=
null
;
try
{
deptStaffList
=
objectMapper
.
readValue
(
deptStaffJSON
,
new
TypeReference
<
List
<
Map
<
String
,
String
>>>()
{});
if
(
deptStaffList
.
size
()<
1
){
throw
new
RuntimeException
(
"未选择对应的分发人员!"
);
}
}
catch
(
JsonProcessingException
e
)
{
throw
new
RuntimeException
(
"JSON转换失败:"
+
e
);
}
//将状态为保存未分发的全部修改为分发未完成
Map
<
String
,
Object
>
map
=
this
.
saveSapNonProdApplyDept
(
sdo
);
//保存分发任务
// saveDeptStaff(deptStaffList,map.get("applyDeptId").toString());
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/controller/NonProdApplyNextController.java
View file @
74a45113
...
...
@@ -60,14 +60,21 @@ public class NonProdApplyNextController extends CommonController {
nonProdApplyBaseInfo
.
setApplyType
(
"0"
);
this
.
putAttribute
(
"applyType"
,
"0"
);
SapNonProdApplyDept
nonProdApplyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptByBaseInfoId
(
id
);
Map
<
String
,
String
>
dictMapUsage
=
DictUtil
.
getDictionary
(
"serviceusage"
);
String
dictMapUsages
=
""
;
for
(
Map
.
Entry
<
String
,
String
>
entry:
dictMapUsage
.
entrySet
())
{
// String key = entry.getKey().toUpperCase();
dictMapUsages
+=
entry
.
getKey
().
toUpperCase
()+
","
+
entry
.
getValue
()+
";"
;
}
this
.
putAttribute
(
"dictUsages"
,
dictMapUsages
);
if
(
nonProdApplyBaseInfo
.
getMaintenanceType
().
equals
(
"modify"
)){
nonProdApplyBaseInfo
.
setApplyType
(
"1"
);
this
.
putAttribute
(
"applyType"
,
"1"
);
}
if
(
nonProdApplyBaseInfo
.
getMaintenanceType
().
equals
(
"extend"
)){
nonProdApplyBaseInfo
.
setApplyType
(
"2"
);
this
.
putAttribute
(
"applyType"
,
"2"
);
Map
<
String
,
String
>
dictMapUsage
=
DictUtil
.
getDictionary
(
"serviceusage"
);
NonProdApplyBaseInfo
sourceNonProdApplyBaseInfo
=
nonProdApplyApplication
.
loadNonProdApplyBaseInfoById
(
nonProdApplyBaseInfo
.
getSourceId
());
//
NonProdApplyBaseInfo sourceNonProdApplyBaseInfo=nonProdApplyApplication.loadNonProdApplyBaseInfoById(nonProdApplyBaseInfo.getSourceId());
String
usedBusiness
=
nonProdApplyApplication
.
getChangeBusinessUsage
(
id
,
"扩展"
);
//去掉当前的
usedBusiness
=
usedBusiness
.
replaceAll
(
nonProdApplyBaseInfo
.
getBusinessUsage
(),
""
);
...
...
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