Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tjmdp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
other-project
tjmdp
Commits
0330e93a
Commit
0330e93a
authored
May 23, 2019
by
liuchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7aa7eb63
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
13 deletions
+41
-13
UserController.java
src/main/java/com/qiankun/controller/UserController.java
+22
-11
saveuser.jsp
src/main/webapp/WEB-INF/pages/user/saveuser.jsp
+4
-0
userlist.jsp
src/main/webapp/WEB-INF/pages/user/userlist.jsp
+10
-1
user.js
src/main/webapp/resources/js/user/user.js
+5
-1
No files found.
src/main/java/com/qiankun/controller/UserController.java
View file @
0330e93a
...
@@ -110,6 +110,8 @@ public class UserController extends BaseController<Object>{
...
@@ -110,6 +110,8 @@ public class UserController extends BaseController<Object>{
vo
.
setWeight
(
user
.
getWeight
());
vo
.
setWeight
(
user
.
getWeight
());
vo
.
setRemark
(
user
.
getRemark
());
vo
.
setRemark
(
user
.
getRemark
());
vo
.
setRole
(
user
.
getRole
());
vo
.
setRole
(
user
.
getRole
());
vo
.
setStatus
(
user
.
getStatus
());
Set
<
Contacts
>
contacts
=
user
.
getContacts
();
Set
<
Contacts
>
contacts
=
user
.
getContacts
();
Iterator
<
Contacts
>
its
=
contacts
.
iterator
();
Iterator
<
Contacts
>
its
=
contacts
.
iterator
();
...
@@ -123,6 +125,8 @@ public class UserController extends BaseController<Object>{
...
@@ -123,6 +125,8 @@ public class UserController extends BaseController<Object>{
vo
.
setContactsRelation1
(
c
.
getRelation
());
vo
.
setContactsRelation1
(
c
.
getRelation
());
vo
.
setContactsWeixin1
(
c
.
getWeixin
());
vo
.
setContactsWeixin1
(
c
.
getWeixin
());
vo
.
setContactsQQ1
(
c
.
getQq
());
vo
.
setContactsQQ1
(
c
.
getQq
());
vo
.
setLastContactsName1
(
c
.
getLastName
());
vo
.
setLastContactsMobile1
(
c
.
getLastMobile
());
count
++;
count
++;
}
else
{
}
else
{
vo
.
setContactsAddr2
(
c
.
getAddr
());
vo
.
setContactsAddr2
(
c
.
getAddr
());
...
@@ -131,6 +135,8 @@ public class UserController extends BaseController<Object>{
...
@@ -131,6 +135,8 @@ public class UserController extends BaseController<Object>{
vo
.
setContactsRelation2
(
c
.
getRelation
());
vo
.
setContactsRelation2
(
c
.
getRelation
());
vo
.
setContactsWeixin2
(
c
.
getWeixin
());
vo
.
setContactsWeixin2
(
c
.
getWeixin
());
vo
.
setContactsQQ2
(
c
.
getQq
());
vo
.
setContactsQQ2
(
c
.
getQq
());
vo
.
setLastContactsName2
(
c
.
getLastName
());
vo
.
setLastContactsMobile2
(
c
.
getLastMobile
());
}
}
...
@@ -164,6 +170,7 @@ public class UserController extends BaseController<Object>{
...
@@ -164,6 +170,7 @@ public class UserController extends BaseController<Object>{
Contacts
contacts1
=
new
Contacts
();
Contacts
contacts1
=
new
Contacts
();
Contacts
contacts2
=
new
Contacts
();
Contacts
contacts2
=
new
Contacts
();
if
(
StringUtils
.
isEmpty
(
userVo
.
getId
()))
{
if
(
StringUtils
.
isEmpty
(
userVo
.
getId
()))
{
Boolean
userIsExistPaperId
=
userService
.
validateUserExistByPaperId
(
userVo
.
getPaperId
());
Boolean
userIsExistPaperId
=
userService
.
validateUserExistByPaperId
(
userVo
.
getPaperId
());
...
@@ -180,10 +187,10 @@ public class UserController extends BaseController<Object>{
...
@@ -180,10 +187,10 @@ public class UserController extends BaseController<Object>{
return
map
;
return
map
;
}
}
user
.
setLastMobile
(
userVo
.
getMobile
());
user
.
setLastMobile
(
userVo
.
getMobile
());
contacts1
.
setLastName
(
userVo
.
get
Last
ContactsName1
());
contacts1
.
setLastName
(
userVo
.
getContactsName1
());
contacts1
.
setLastMobile
(
userVo
.
get
Last
ContactsMobile1
());
contacts1
.
setLastMobile
(
userVo
.
getContactsMobile1
());
contacts2
.
setLastName
(
userVo
.
get
Last
ContactsName2
());
contacts2
.
setLastName
(
userVo
.
getContactsName2
());
contacts2
.
setLastMobile
(
userVo
.
get
Last
ContactsMobile2
());
contacts2
.
setLastMobile
(
userVo
.
getContactsMobile2
());
user
.
setCreateTime
(
date
);
user
.
setCreateTime
(
date
);
map
.
put
(
"status"
,
1
);
map
.
put
(
"status"
,
1
);
...
@@ -210,6 +217,12 @@ public class UserController extends BaseController<Object>{
...
@@ -210,6 +217,12 @@ public class UserController extends BaseController<Object>{
}
}
user
.
setUpdateTime
(
date
);
user
.
setUpdateTime
(
date
);
contacts1
.
setLastName
(
userVo
.
getLastContactsName1
());
contacts1
.
setLastMobile
(
userVo
.
getLastContactsMobile1
());
contacts2
.
setLastName
(
userVo
.
getLastContactsName2
());
contacts2
.
setLastMobile
(
userVo
.
getLastContactsMobile2
());
user
.
getContacts
().
clear
();
user
.
getContacts
().
clear
();
map
.
put
(
"status"
,
2
);
map
.
put
(
"status"
,
2
);
}
}
...
@@ -245,7 +258,6 @@ public class UserController extends BaseController<Object>{
...
@@ -245,7 +258,6 @@ public class UserController extends BaseController<Object>{
user
.
setRole
(
userVo
.
getRole
());
user
.
setRole
(
userVo
.
getRole
());
user
.
setStatus
(
userVo
.
getStatus
());
user
.
setStatus
(
userVo
.
getStatus
());
contacts1
.
setName
(
userVo
.
getContactsName1
());
contacts1
.
setName
(
userVo
.
getContactsName1
());
contacts1
.
setAddr
(
userVo
.
getContactsAddr1
());
contacts1
.
setAddr
(
userVo
.
getContactsAddr1
());
contacts1
.
setMobile
(
userVo
.
getContactsMobile1
());
contacts1
.
setMobile
(
userVo
.
getContactsMobile1
());
...
@@ -383,6 +395,7 @@ public class UserController extends BaseController<Object>{
...
@@ -383,6 +395,7 @@ public class UserController extends BaseController<Object>{
continue
;
continue
;
}
}
String
status
=
"2"
;
User
u
=
null
;
User
u
=
null
;
Blood
b
=
new
Blood
();
Blood
b
=
new
Blood
();
Contacts
c1
=
new
Contacts
();
Contacts
c1
=
new
Contacts
();
...
@@ -527,9 +540,7 @@ public class UserController extends BaseController<Object>{
...
@@ -527,9 +540,7 @@ public class UserController extends BaseController<Object>{
u
.
setRemark
(
row
.
getCell
(
29
).
getStringCellValue
());
u
.
setRemark
(
row
.
getCell
(
29
).
getStringCellValue
());
u
.
setEducation
(
row
.
getCell
(
31
).
getStringCellValue
());
u
.
setEducation
(
row
.
getCell
(
31
).
getStringCellValue
());
c1
.
setName
(
row
.
getCell
(
35
).
getStringCellValue
());
c1
.
setName
(
row
.
getCell
(
35
).
getStringCellValue
());
c1
.
setLastName
(
row
.
getCell
(
35
).
getStringCellValue
());
c1
.
setLastName
(
row
.
getCell
(
35
).
getStringCellValue
());
c1
.
setRelation
(
row
.
getCell
(
36
).
getStringCellValue
());
c1
.
setRelation
(
row
.
getCell
(
36
).
getStringCellValue
());
...
@@ -552,9 +563,7 @@ public class UserController extends BaseController<Object>{
...
@@ -552,9 +563,7 @@ public class UserController extends BaseController<Object>{
c2
.
setUser
(
u
);
c2
.
setUser
(
u
);
u
.
getContacts
().
add
(
c1
);
u
.
getContacts
().
add
(
c1
);
u
.
getContacts
().
add
(
c2
);
u
.
getContacts
().
add
(
c2
);
b
.
setBloodCollect
(
row
.
getCell
(
32
).
getStringCellValue
());
b
.
setBloodCollect
(
row
.
getCell
(
32
).
getStringCellValue
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
d
=
row
.
getCell
(
26
).
getStringCellValue
();
String
d
=
row
.
getCell
(
26
).
getStringCellValue
();
...
@@ -569,6 +578,8 @@ public class UserController extends BaseController<Object>{
...
@@ -569,6 +578,8 @@ public class UserController extends BaseController<Object>{
break
;
break
;
}
}
u
.
setStatus
(
status
);
u
.
setRole
(
"2"
);
u
.
setCreateTime
(
date
);
u
.
setCreateTime
(
date
);
u
.
setOrigin
(
"3"
);
u
.
setOrigin
(
"3"
);
userService
.
save
(
u
);
userService
.
save
(
u
);
...
...
src/main/webapp/WEB-INF/pages/user/saveuser.jsp
View file @
0330e93a
...
@@ -34,6 +34,10 @@
...
@@ -34,6 +34,10 @@
<form action="#" id="userForm" name="userForm" method="post" onsubmit="return false" class="form-horizontal" role="form">
<form action="#" id="userForm" name="userForm" method="post" onsubmit="return false" class="form-horizontal" role="form">
<input type="hidden" id="id" name="id" value="${user.id}"/>
<input type="hidden" id="id" name="id" value="${user.id}"/>
<input type="hidden" id="lastContactsName1" name="lastContactsName1" value="${user.lastContactsName1}"/>
<input type="hidden" id="lastContactsMobile1" name="lastContactsMobile1" value="${user.lastContactsMobile1}"/>
<input type="hidden" id="lastContactsName2" name="lastContactsName2" value="${user.lastContactsName2}"/>
<input type="hidden" id="lastContactsMobile2" name="lastContactsMobile2" value="${user.lastContactsMobile2}"/>
<div class="row">
<div class="row">
<div class="col-xs-12">
<div class="col-xs-12">
<h3 class="header smaller lighter blue">用户信息</h3></div>
<h3 class="header smaller lighter blue">用户信息</h3></div>
...
...
src/main/webapp/WEB-INF/pages/user/userlist.jsp
View file @
0330e93a
...
@@ -96,6 +96,7 @@
...
@@ -96,6 +96,7 @@
<th>证件</th>
<th>证件</th>
<th>证件号</th>
<th>证件号</th>
<th>手机号</th>
<th>手机号</th>
<th>联系人</th>
<th>角色</th>
<th>角色</th>
<th><i class="icon-time bigger-110 hidden-480"></i>注册时间</th>
<th><i class="icon-time bigger-110 hidden-480"></i>注册时间</th>
...
@@ -123,7 +124,15 @@
...
@@ -123,7 +124,15 @@
<td title="${user.paperType}">${user.paperType} </td>
<td title="${user.paperType}">${user.paperType} </td>
<td title="${user.paperId}">${user.paperId} </td>
<td title="${user.paperId}">${user.paperId} </td>
<td title="${user.mobile}">${user.mobile} </td>
<td title="${user.mobile}"><font <c:if test="${user.mobile!=user.lastMobile}">color="#ff0000"</c:if>>${user.mobile}</font> </td>
<td title="">
<c:forEach var="contacts" items="${user.getContacts().iterator()}">
<font <c:if test="${contacts.name!=contacts.lastName}">color="#ff0000"</c:if>>${contacts.name}</font>
<font <c:if test="${contacts.mobile!=contacts.lastMobile}">color="#ff0000"</c:if>>${contacts.mobile}</font>
</c:forEach>
</td>
<td >
<td >
<c:if test="${user.role==1}">
<c:if test="${user.role==1}">
管理员
管理员
...
...
src/main/webapp/resources/js/user/user.js
View file @
0330e93a
...
@@ -243,7 +243,11 @@ var user = {
...
@@ -243,7 +243,11 @@ var user = {
contactsRelation2
:
$
(
'#contactsRelation2'
).
val
(),
contactsRelation2
:
$
(
'#contactsRelation2'
).
val
(),
contactsWeixin2
:
$
(
'#contactsWeixin2'
).
val
(),
contactsWeixin2
:
$
(
'#contactsWeixin2'
).
val
(),
contactsMobile2
:
$
(
'#contactsMobile2'
).
val
(),
contactsMobile2
:
$
(
'#contactsMobile2'
).
val
(),
contactsAddr2
:
$
(
'#contactsAddr2'
).
val
()
contactsAddr2
:
$
(
'#contactsAddr2'
).
val
(),
lastContactsName1
:
$
(
'#lastContactsName1'
).
val
(),
lastContactsName2
:
$
(
'#lastContactsName2'
).
val
(),
lastContactsMobile1
:
$
(
'#lastContactsMobile1'
).
val
(),
lastContactsMobile2
:
$
(
'#lastContactsMobile2'
).
val
()
},
},
success
:
function
(
data
){
success
:
function
(
data
){
var
status
=
data
.
status
;
var
status
=
data
.
status
;
...
...
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