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