Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bpm
Overview
Overview
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
王厚康
bpm
Commits
58127b81
Commit
58127b81
authored
Jul 19, 2019
by
Java-曹文达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决问题
parent
770b71a7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
15 deletions
+25
-15
UserApiController.java
src/main/java/com/bbd/bpm/controller/user/UserApiController.java
+2
-2
UserInfoService.java
src/main/java/com/bbd/bpm/service/UserInfoService.java
+4
-3
UserInfoServiceImpl.java
src/main/java/com/bbd/bpm/serviceImpl/UserInfoServiceImpl.java
+5
-4
organizationList.html
src/main/resources/templates/user/organizationList.html
+14
-6
No files found.
src/main/java/com/bbd/bpm/controller/user/UserApiController.java
View file @
58127b81
...
...
@@ -158,9 +158,9 @@ public class UserApiController {
**/
@PostMapping
(
"addOrganizationMember"
)
@ResponseBody
public
Result
addOrganizationMember
(
String
name
,
String
position
,
Long
pId
,
Integer
id
,
Integer
department
,
Integer
type
){
public
Result
addOrganizationMember
(
String
name
,
String
position
,
Long
pId
,
Integer
id
,
Integer
department
,
Integer
type
,
String
userCode
){
//获取session中的值
Result
result
=
userInfoService
.
addOrganizationMember
(
name
,
position
,
pId
,
id
,
department
,
type
);
Result
result
=
userInfoService
.
addOrganizationMember
(
name
,
position
,
pId
,
id
,
department
,
type
,
userCode
);
return
result
;
}
...
...
src/main/java/com/bbd/bpm/service/UserInfoService.java
View file @
58127b81
...
...
@@ -43,15 +43,16 @@ public interface UserInfoService {
* @Author:cwd
* @Description:添加部门人员
* @Date: 2019/03/04 22:53
* @param id
* @param name
* @param position
* @param pId
* @param id
* @param department
* @param position
* @param type
* @param userCode
* @return Result
**/
Result
addOrganizationMember
(
String
name
,
String
position
,
Long
pId
,
Integer
id
,
Integer
department
,
Integer
type
);
Result
addOrganizationMember
(
String
name
,
String
position
,
Long
pId
,
Integer
id
,
Integer
department
,
Integer
type
,
String
userCode
);
/**
* 获取组织列表
* @Author:cwd
...
...
src/main/java/com/bbd/bpm/serviceImpl/UserInfoServiceImpl.java
View file @
58127b81
...
...
@@ -20,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
@Service
...
...
@@ -154,16 +153,17 @@ public class UserInfoServiceImpl implements UserInfoService{
* @Author:cwd
* @Description:添加部门人员
* @Date: 2019/03/04 22:53
* @param id
* @param name
* @param position
* @param pId
* @param id
* @param department
* @param position
* @param type
* @param userCode
* @return Result
**/
@Override
public
Result
addOrganizationMember
(
String
name
,
String
position
,
Long
pId
,
Integer
id
,
Integer
department
,
Integer
type
)
{
public
Result
addOrganizationMember
(
String
name
,
String
position
,
Long
pId
,
Integer
id
,
Integer
department
,
Integer
type
,
String
userCode
)
{
try
{
BpmEmployee
bpmEmployee
=
new
BpmEmployee
();
bpmEmployee
.
setCreateTime
(
new
Date
());
...
...
@@ -179,6 +179,7 @@ public class UserInfoServiceImpl implements UserInfoService{
}
bpmEmployee
.
setPosition
(
position
);
bpmEmployee
.
setStatus
(
0
);
bpmEmployee
.
setUserCode
(
userCode
);
memberMapper
.
insert
(
bpmEmployee
);
return
ResultUtil
.
getResult
(
RespCode
.
Code
.
SUCCESS
);
}
catch
(
Exception
e
){
...
...
src/main/resources/templates/user/organizationList.html
View file @
58127b81
...
...
@@ -431,8 +431,6 @@
var
abbreviationName
=
$
(
"[name='abbreviationName']"
).
val
();
if
(
name
==
''
){
layer
.
msg
(
"组织名称不能为空"
);
}
else
if
(
abbreviationName
==
''
){
layer
.
msg
(
"组织简写不可为空"
);
}
else
{
$
.
post
(
"/bpm/user/editOrganization"
,
...
...
@@ -533,10 +531,12 @@
}
else
if
(
pId
==
1
&&
type
==
2
){
var
content
=
'<div style="margin-top: 13px;margin-left: 27px;"><span ><b>人员名称:</b><input type="text" value="" placeholder="请输入人员名称" name="oName" style="color: black;height: 30px;border: 1px solid #EEEEEE;text-indent: 5px;margin-left: 16px;"/></span><br>
\
n'
+
'
\
t
\
t<br><span ><b>所在部门:</b><select name="areaId" id="areaId" style="color: black;height: 30px;border: 1px solid #EEEEEE;text-indent: 5px;margin-left: 16px;width: 159px;"></select></span><br>
\
n'
+
'
\
t
\
t<br><span ><b style="margin-top: 10px">人员code:</b><input type="text" value="" placeholder="请输入人员code" name="userCode" style="color: black;height: 30px;border: 1px solid #EEEEEE;text-indent: 5px; margin-left: 16px;"/></span><br>
\
n'
+
'
\
t
\
t<br><span ><b style="margin-left: 28px;margin-top: 10px">职位:</b><input type="text" value="" placeholder="请输入职位" name="position" style="color: black;height: 30px;border: 1px solid #EEEEEE;text-indent: 5px; margin-left: 16px;"/></span><br>
\
n'
;
}
else
{
var
content
=
'<div style="margin-bottom: 45px;margin-top: 13px;margin-left: 27px;"><span ><b>人员名称:</b><input type="text" value="" placeholder="请输入人员名称" name="oName" style="color: black;height: 30px;border: 1px solid #EEEEEE;text-indent: 5px;margin-left: 16px;"/></span><br>
\
n'
+
'
\
t
\
t<br><span ><b style="margin-top: 10px">用户code:</b><input type="text" value="" placeholder="请输入code" name="userCode" style="color: black;height: 30px;border: 1px solid #EEEEEE;text-indent: 5px; margin-left: 16px;"/></span><br>
\
n'
+
'
\
t
\
t<br><span ><b style="margin-left: 28px;margin-top: 10px">职位:</b><input type="text" value="" placeholder="请输入职位" name="position" style="color: black;height: 30px;border: 1px solid #EEEEEE;text-indent: 5px; margin-left: 16px;"/></span><br>
\
n'
;
}
//联系方式验证规则
...
...
@@ -619,11 +619,14 @@
var
name
=
$
(
"[name='oName']"
).
val
();
var
position
=
$
(
"[name='position']"
).
val
();
var
areaId
=
$
(
"[name='areaId']"
).
val
();
var
userCode
=
$
(
"[name='userCode']"
).
val
();
if
(
name
==
''
){
layer
.
msg
(
"人员名称不能为空"
);
}
else
if
(
position
==
''
){
layer
.
msg
(
"职位"
);
}
else
{
layer
.
msg
(
"职位不可为空"
);
}
else
if
(
userCode
==
''
){
layer
.
msg
(
"userCode不可为空"
);
}
else
{
$
.
post
(
"/bpm/user/addOrganizationMember"
,
{
...
...
@@ -632,7 +635,8 @@
"name"
:
name
,
"position"
:
position
,
"pId"
:
pId
,
"id"
:
id
"id"
:
id
,
"userCode"
:
userCode
},
function
(
data
)
{
if
(
data
.
code
==
200
){
...
...
@@ -663,14 +667,18 @@
btn1
:
function
(
index
,
layero
)
{
var
name
=
$
(
"[name='oName']"
).
val
();
var
position
=
$
(
"[name='position']"
).
val
();
var
userCode
=
$
(
"[name='userCode']"
).
val
();
if
(
name
==
''
){
layer
.
msg
(
"人员名称不能为空"
);
}
else
if
(
position
==
''
){
layer
.
msg
(
"职位"
);
layer
.
msg
(
"职位不可为空"
);
}
else
if
(
userCode
==
''
){
layer
.
msg
(
"userCode不可为空"
);
}
else
{
$
.
post
(
"/bpm/user/addOrganizationMember"
,
{
"userCode"
:
userCode
,
"name"
:
name
,
"position"
:
position
,
"pId"
:
pId
,
...
...
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