|
|
@ -25,20 +25,16 @@ public class WorkTicketInfoWrapper extends BaseEntityWrapper<WorkTicketInfoEntit |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public WorkTicketInfoVO entityVO(WorkTicketInfoEntity entity) { |
|
|
|
public WorkTicketInfoVO entityVO(WorkTicketInfoEntity entity) { |
|
|
|
WorkTicketInfoVO workTicketInfoVO = BeanUtil.copy(entity,WorkTicketInfoVO.class); |
|
|
|
WorkTicketInfoVO workTicketInfoVO = BeanUtil.copy(entity,WorkTicketInfoVO.class); |
|
|
|
User creator = UserCache.getUser(workTicketInfoVO.getCreateUser()); |
|
|
|
workTicketInfoVO.setCreateUserName(Optional.ofNullable(workTicketInfoVO.getCreateUser()).map(UserCache::getUser).map(User::getName).orElse(null)); |
|
|
|
User updater = UserCache.getUser(workTicketInfoVO.getUpdateUser()); |
|
|
|
workTicketInfoVO.setUpdateUserName(Optional.ofNullable(workTicketInfoVO.getUpdateUser()).map(UserCache::getUser).map(User::getName).orElse(null)); |
|
|
|
workTicketInfoVO.setCreateUserName(Optional.ofNullable(creator).map(User::getName).orElse(null)); |
|
|
|
|
|
|
|
workTicketInfoVO.setUpdateUserName(Optional.ofNullable(updater).map(User::getName).orElse(null)); |
|
|
|
|
|
|
|
/*完善负责人、许可人名称*/ |
|
|
|
/*完善负责人、许可人名称*/ |
|
|
|
if(Func.isEmpty(workTicketInfoVO.getPrincipal())){ |
|
|
|
if(Func.isEmpty(workTicketInfoVO.getPrincipal())){ |
|
|
|
workTicketInfoVO.setPrincipalName(workTicketInfoVO.getPrincipalManual()); |
|
|
|
workTicketInfoVO.setPrincipalName(workTicketInfoVO.getPrincipalManual()); |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
else{ |
|
|
|
User principal = UserCache.getUser(workTicketInfoVO.getPrincipal()); |
|
|
|
workTicketInfoVO.setPrincipalName(Optional.ofNullable(workTicketInfoVO.getPrincipal()).map(UserCache::getUser).map(User::getName).orElse(null)); |
|
|
|
workTicketInfoVO.setPrincipalName(Optional.ofNullable(principal).map(User::getName).orElse(null)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
User licensor = UserCache.getUser(workTicketInfoVO.getLicensor()); |
|
|
|
workTicketInfoVO.setLicensorName(Optional.ofNullable(workTicketInfoVO.getLicensor()).map(UserCache::getUser).map(User::getName).orElse(null)); |
|
|
|
workTicketInfoVO.setLicensorName(Optional.ofNullable(licensor).map(User::getName).orElse(null)); |
|
|
|
|
|
|
|
if(Func.isNotEmpty(workTicketInfoVO.getClassGroupMembersManual())){ |
|
|
|
if(Func.isNotEmpty(workTicketInfoVO.getClassGroupMembersManual())){ |
|
|
|
workTicketInfoVO.setClassGroupMembersName(workTicketInfoVO.getClassGroupMembersManual()); |
|
|
|
workTicketInfoVO.setClassGroupMembersName(workTicketInfoVO.getClassGroupMembersManual()); |
|
|
|
} |
|
|
|
} |
|
|
|