Commit 0330e93a authored by liuchao's avatar liuchao

no message

parent 7aa7eb63
......@@ -110,6 +110,8 @@ public class UserController extends BaseController<Object>{
vo.setWeight(user.getWeight());
vo.setRemark(user.getRemark());
vo.setRole(user.getRole());
vo.setStatus(user.getStatus());
Set<Contacts> contacts = user.getContacts();
Iterator<Contacts> its = contacts.iterator();
......@@ -123,6 +125,8 @@ public class UserController extends BaseController<Object>{
vo.setContactsRelation1(c.getRelation());
vo.setContactsWeixin1(c.getWeixin());
vo.setContactsQQ1(c.getQq());
vo.setLastContactsName1(c.getLastName());
vo.setLastContactsMobile1(c.getLastMobile());
count ++;
} else {
vo.setContactsAddr2(c.getAddr());
......@@ -131,6 +135,8 @@ public class UserController extends BaseController<Object>{
vo.setContactsRelation2(c.getRelation());
vo.setContactsWeixin2(c.getWeixin());
vo.setContactsQQ2(c.getQq());
vo.setLastContactsName2(c.getLastName());
vo.setLastContactsMobile2(c.getLastMobile());
}
......@@ -164,6 +170,7 @@ public class UserController extends BaseController<Object>{
Contacts contacts1 = new Contacts();
Contacts contacts2 = new Contacts();
if (StringUtils.isEmpty(userVo.getId())) {
Boolean userIsExistPaperId = userService.validateUserExistByPaperId(userVo.getPaperId());
......@@ -180,10 +187,10 @@ public class UserController extends BaseController<Object>{
return map;
}
user.setLastMobile(userVo.getMobile());
contacts1.setLastName(userVo.getLastContactsName1());
contacts1.setLastMobile(userVo.getLastContactsMobile1());
contacts2.setLastName(userVo.getLastContactsName2());
contacts2.setLastMobile(userVo.getLastContactsMobile2());
contacts1.setLastName(userVo.getContactsName1());
contacts1.setLastMobile(userVo.getContactsMobile1());
contacts2.setLastName(userVo.getContactsName2());
contacts2.setLastMobile(userVo.getContactsMobile2());
user.setCreateTime(date);
map.put("status", 1);
......@@ -210,6 +217,12 @@ public class UserController extends BaseController<Object>{
}
user.setUpdateTime(date);
contacts1.setLastName(userVo.getLastContactsName1());
contacts1.setLastMobile(userVo.getLastContactsMobile1());
contacts2.setLastName(userVo.getLastContactsName2());
contacts2.setLastMobile(userVo.getLastContactsMobile2());
user.getContacts().clear();
map.put("status", 2);
}
......@@ -245,7 +258,6 @@ public class UserController extends BaseController<Object>{
user.setRole(userVo.getRole());
user.setStatus(userVo.getStatus());
contacts1.setName(userVo.getContactsName1());
contacts1.setAddr(userVo.getContactsAddr1());
contacts1.setMobile(userVo.getContactsMobile1());
......@@ -383,6 +395,7 @@ public class UserController extends BaseController<Object>{
continue;
}
String status = "2";
User u = null;
Blood b = new Blood();
Contacts c1 = new Contacts();
......@@ -527,9 +540,7 @@ public class UserController extends BaseController<Object>{
u.setRemark(row.getCell(29).getStringCellValue());
u.setEducation(row.getCell(31).getStringCellValue());
c1.setName(row.getCell(35).getStringCellValue());
c1.setLastName(row.getCell(35).getStringCellValue());
c1.setRelation(row.getCell(36).getStringCellValue());
......@@ -552,9 +563,7 @@ public class UserController extends BaseController<Object>{
c2.setUser(u);
u.getContacts().add(c1);
u.getContacts().add(c2);
b.setBloodCollect(row.getCell(32).getStringCellValue());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String d = row.getCell(26).getStringCellValue();
......@@ -569,6 +578,8 @@ public class UserController extends BaseController<Object>{
break;
}
u.setStatus(status);
u.setRole("2");
u.setCreateTime(date);
u.setOrigin("3");
userService.save(u);
......
......@@ -34,6 +34,10 @@
<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="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="col-xs-12">
<h3 class="header smaller lighter blue">用户信息</h3></div>
......
......@@ -96,6 +96,7 @@
<th>证件</th>
<th>证件号</th>
<th>手机号</th>
<th>联系人</th>
<th>角色</th>
<th><i class="icon-time bigger-110 hidden-480"></i>注册时间</th>
......@@ -123,7 +124,15 @@
<td title="${user.paperType}">${user.paperType} </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>&nbsp;
</c:forEach>
</td>
<td >
<c:if test="${user.role==1}">
管理员
......
......@@ -243,7 +243,11 @@ var user = {
contactsRelation2:$('#contactsRelation2').val(),
contactsWeixin2:$('#contactsWeixin2').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){
var status=data.status;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment