Commit 2595cc25 authored by mengmeng's avatar mengmeng

Merge branch 'xmm' into 'master'

Xmm

See merge request !5
parents d4149659 7343c1d9
...@@ -75,7 +75,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn ...@@ -75,7 +75,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
if("嫌疑人".equals(item.getUserRole()) || "被害人".equals(item.getUserRole())){ if("嫌疑人".equals(item.getUserRole()) || "被害人".equals(item.getUserRole())){
dto.setPeopleName(item.getUserName()); dto.setPeopleName(item.getUserName());
} }
if("代理人".equals(item.getUserRole()) && !"".equals(item.getUserName())){ if("代理人".equals(item.getUserRole()) && StringUtils.isNotBlank(item.getUserName())){
dto.setAgentName(item.getUserName()); dto.setAgentName(item.getUserName());
} }
}); });
...@@ -109,7 +109,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn ...@@ -109,7 +109,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
if(dto.getPeopleInfo()!=null && dto.getPeopleInfo().size()>0){ if(dto.getPeopleInfo()!=null && dto.getPeopleInfo().size()>0){
dto.getPeopleInfo().stream().forEach(item ->{ dto.getPeopleInfo().stream().forEach(item ->{
UserEntity userEntity = null; UserEntity userEntity = null;
if(!"".equals(item.getUserMobile()) ){ if(StringUtils.isNotBlank(item.getUserMobile()) ){
userEntity = userService.getByMobile(item.getUserMobile()); userEntity = userService.getByMobile(item.getUserMobile());
} }
...@@ -118,7 +118,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn ...@@ -118,7 +118,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
if("嫌疑人".equals(item.getUserRole()) || "被害人".equals(item.getUserRole())){ if("嫌疑人".equals(item.getUserRole()) || "被害人".equals(item.getUserRole())){
actRoleName = "当事人"; actRoleName = "当事人";
if(!"".equals(item.getUserName()) ){ if(StringUtils.isNotBlank(item.getUserName()) ){
Map<String, Object> query = new HashMap<>(); Map<String, Object> query = new HashMap<>();
query.put("username",item.getUserName()); query.put("username",item.getUserName());
userEntity = userService.getByParams(query); userEntity = userService.getByParams(query);
...@@ -127,13 +127,13 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn ...@@ -127,13 +127,13 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
//案件相关人员不存在人员表中则插入 //案件相关人员不存在人员表中则插入
if(userEntity==null){ if(userEntity==null){
if("".equals(item.getUserName())){ if(StringUtils.isBlank(item.getUserName())){
return; return;
} }
//tb_user中添加人员 //tb_user中添加人员
UserEntity user = new UserEntity(); UserEntity user = new UserEntity();
user.setUsername(item.getUserName()); user.setUsername(item.getUserName());
user.setMobile("".equals(item.getUserMobile())?"":item.getUserMobile()); user.setMobile(StringUtils.isBlank(item.getUserMobile())?"":item.getUserMobile());
user.setCreateDate(new Date()); user.setCreateDate(new Date());
user.setUserIdno(item.getUserIdNo()); user.setUserIdno(item.getUserIdNo());
user.setIdentity(item.getUserRole()); user.setIdentity(item.getUserRole());
...@@ -156,9 +156,9 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn ...@@ -156,9 +156,9 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
Long userId = userEntity.getId(); Long userId = userEntity.getId();
//人员信息更新 //人员信息更新
userEntity.setMobile("".equals(item.getUserMobile())?userEntity.getMobile():item.getUserMobile()); userEntity.setMobile(StringUtils.isBlank(item.getUserMobile())?userEntity.getMobile():item.getUserMobile());
userEntity.setUsername(item.getUserName()); userEntity.setUsername(item.getUserName());
userEntity.setUserIdno("".equals(item.getUserIdNo())?userEntity.getUserIdno():item.getUserIdNo()); userEntity.setUserIdno(StringUtils.isBlank(item.getUserIdNo())?userEntity.getUserIdno():item.getUserIdNo());
userEntity.setIdentity(item.getUserRole()); userEntity.setIdentity(item.getUserRole());
userService.updateById(userEntity); userService.updateById(userEntity);
...@@ -204,7 +204,9 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn ...@@ -204,7 +204,9 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
*/ */
public boolean undertakerInfoNotNull(Map<String, Object> params){ public boolean undertakerInfoNotNull(Map<String, Object> params){
if(params.get("undertaker")!=null && params.get("undertakerMobile")!=null && !"".equals(params.get("undertaker")) && !"".equals(params.get("undertakerMobile"))){ if(params.get("undertaker")!=null && params.get("undertakerMobile")!=null
&& StringUtils.isNotBlank(params.get("undertaker").toString())
&& StringUtils.isNotBlank(params.get("undertakerMobile").toString())){
return true; return true;
} }
return false; return false;
......
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