| | |
| | | */ |
| | | @Override |
| | | public void saveProcess(ComplaintProcessDTO dto, LoginUserInfoVO loginUserInfoVO) { |
| | | //获取当前身份 |
| | | IdentityInformation identityInformationVO = identityInformationService.getIdentityInformation(loginUserInfoVO); |
| | | |
| | | List<PermissionsVO> permissions = identityInformationVO.getPermissions(); |
| | | if (permissions.isEmpty()) { |
| | | throw new ServiceException("请先完善个人信息"); |
| | | } |
| | | //上级 |
| | | String name = ""; |
| | | if (identityInformationVO.getIdentity() == 2) { |
| | | //1=党员,2=管理员 |
| | | SystemUser systemUser = identityInformationVO.getSystemUser(); |
| | | name = systemUser.getName(); |
| | | }else if (identityInformationVO.getIdentity() == 1){ |
| | | PartyMember partyMember = identityInformationVO.getPartyMember(); |
| | | name = partyMember.getName(); |
| | | } |
| | | ComplaintProgress complaintProgress = BeanUtil.copyProperties(dto, ComplaintProgress.class); |
| | | complaintProgress.setCreateTime(new Date()); |
| | | complaintProgress.setCreateBy(loginUserInfoVO.getUserId()); |
| | | complaintProgress.setCreateByName(loginUserInfoVO.getNickName()); |
| | | complaintProgress.setCreateByName(name); |
| | | complaintProgressService.save(complaintProgress); |
| | | } |
| | | |
| | |
| | | throw new ServiceException("请先完善个人信息"); |
| | | } |
| | | Integer accountLevel = null; |
| | | String name = ""; |
| | | //上级 |
| | | if (identityInformationVO.getIdentity() == 2) { |
| | | //1=党员,2=管理员 |
| | | SystemUser systemUser = identityInformationVO.getSystemUser(); |
| | | accountLevel = systemUser.getAccountLevel(); |
| | | name = systemUser.getName(); |
| | | }else if (identityInformationVO.getIdentity() == 1){ |
| | | accountLevel = 5; |
| | | PartyMember partyMember = identityInformationVO.getPartyMember(); |
| | | name = partyMember.getName(); |
| | | } |
| | | Complaint complaint = BeanUtil.copyProperties(dto, Complaint.class); |
| | | complaint.setUpdateTime(new Date()); |
| | | complaint.setCompletionUserId(loginUserInfoVO.getUserId()); |
| | | complaint.setCompletionUsername(loginUserInfoVO.getNickName()); |
| | | complaint.setCompletionUsername(name); |
| | | complaint.setCompletionUserPhone(loginUserInfoVO.getPhone()); |
| | | complaint.setCompletionTime(new Date()); |
| | | complaint.setCompletionUserLevel(accountLevel); |