| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.sanshuo.*; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.CopyUtil; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | |
| | | @Resource |
| | | private ComEventMapper comEventMapper; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @Resource |
| | | private CommediateTypeService commediateTypeService; |
| | | |
| | | @Override |
| | | public R pageByComEvent(ComEvent comEvent, Page pagination) { |
| | | public R pageByComEvent(ComEvent comEvent, Page pagination,LoginUserInfoVO loginUserInfoVO) { |
| | | if (nonNull(comEvent.getUserType())){ |
| | | if (comEvent.getUserType().equals(1)){ |
| | | comEvent.setRequestUserId(loginUserInfoVO.getUserId()); |
| | | }else if (comEvent.getUserType().equals(2)){ |
| | | comEvent.setSpecialistId(loginUserInfoVO.getUserId()); |
| | | } |
| | | } |
| | | IPage<ComEvent> list = baseMapper.pageByComEvent(comEvent, pagination); |
| | | if (list.getRecords().size() < 1) { |
| | | return R.ok(Collections.emptyList()); |
| | |
| | | List<ComEventResource> resourceList = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, comEvent1.getId())); |
| | | List<ComEventRequestImageVO> comEventRequestImageVO = CopyUtil.deepCopyListObject(resourceList, ComEventRequestImageVO.class); |
| | | comEvent1.setImages(comEventRequestImageVO); |
| | | // if (nonNull(userService.getUserInfoByUserId(comEvent1.getRequestUserId().toString()).getData().getImageUrl())){ |
| | | // comEvent1.setIcon(userService.getUserInfoByUserId(comEvent1.getRequestUserId().toString()).getData().getImageUrl()); |
| | | // } |
| | | ComMediateType category = commediateTypeService.getById(comEvent1.getEventCategory()); |
| | | comEvent1.setEventCategoryName(category.getName()); |
| | | }); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | @Override |
| | | public List<ComEvent> listByComEvent(ComEvent comEvent) { |
| | | List<ComEvent> list = baseMapper.listByComEvent(comEvent); |
| | | public List<ComEvent> listByComEvent(ComEvent comEvent,LoginUserInfoVO loginUserInfoVO) { |
| | | List<ComEvent> list = baseMapper.listByComEvent(comEvent,null); |
| | | if (list.size() < 1) { |
| | | return Collections.emptyList(); |
| | | } |
| | |
| | | if (comEvent.getRequestUserCommunity() != null) { |
| | | ComActDO community = comActDAO.selectById(comEvent.getRequestUserCommunity()); |
| | | comEvent.setCurrentOrgName(community.getName()); |
| | | comEvent.setCurrentOrgId(community.getCommunityId().toString()); |
| | | comEvent.setCurrentProcessType(2); |
| | | } |
| | | if (!StringUtils.isEmpty(comEvent.getCenterId())) { |
| | | ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getById(comEvent.getCenterId()); |
| | | comEvent.setCurrentOrgName(center.getName()); |
| | | comEvent.setCurrentOrgId(center.getId().toString()); |
| | | comEvent.setCurrentProcessType(1); |
| | | } |
| | | comEvent.setUserEventStatus(2); |
| | | comEvent.setEventProcessStatus(SanShuoEventStatusEnum.UNDO.getCode()); |
| | |
| | | comEvent.setEventSucceed(comEventConciliationVO.getEventSucceed()); |
| | | comEvent.setEventResult(comEventConciliationVO.getEventResult()); |
| | | comEvent.setReportSuperior(comEventConciliationVO.getReportSuperior()); |
| | | if(comEventConciliationVO.getEventSucceed() ==2){ |
| | | comEvent.setEventProcessStatus(6); |
| | | } |
| | | comEvent.setCurrentEventProcessResult(comEventConciliationVO.getCurrentEventProcessResult()); |
| | | //如果当前请求,需要上报上级进行处理 |
| | | if (comEventConciliationVO.getReportSuperior()) { |
| | |
| | | || comEvent.getEventProcessStatus() == SanShuoEventStatusEnum.VALID.getCode().intValue()) { |
| | | comEvent.setId(id); |
| | | comEvent.setUserEventStatus(4); |
| | | comEvent.setEventProcessStatus(SanShuoEventStatusEnum.CANCEL.getCode()); |
| | | comEvent.setEventProcessStatus(8); |
| | | comEvent.setRevokeDes("用户手动取消"); |
| | | int flag = baseMapper.updateById(comEvent); |
| | | return flag > 0 ? R.ok() : R.fail(ReturnMsgConstants.UPDATE_FALSE); |
| | |
| | | ComEvent comEvent = baseMapper.selectById(id); |
| | | ComSanshuoExpert specter = comSanShuoExpertService.getById(comEvent.getSpecialistId()); |
| | | CopyUtil.copyProperties(comEvent, comEventDetailVO); |
| | | comEventDetailVO.setCategoryName(commediateTypeService.getById(comEventDetailVO.getEventCategory()).getName()); |
| | | List<ComEventResource> resourceList = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, id) |
| | | .eq(ComEventResource::getStatus,1)); |
| | | List<ComEventRequestImageVO> comEventRequestImageVO = CopyUtil.deepCopyListObject(resourceList, ComEventRequestImageVO.class); |
| | |
| | | map.put("eventDetail", comEventDetailVO); |
| | | List<ComEventTransferRecord> transferRecord = comEventTransferRecordService.list(new QueryWrapper<ComEventTransferRecord>().lambda().eq(ComEventTransferRecord::getEventId, id)); |
| | | transferRecord.forEach(comEventTransferRecord -> { |
| | | List<ComEventResource> list = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getTransferId, comEventTransferRecord.getId())); |
| | | List<ComEventResource> list = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, comEvent.getId())); |
| | | List<ComEventRequestImageVO> ImageVO = CopyUtil.deepCopyListObject(list, ComEventRequestImageVO.class); |
| | | comEventTransferRecord.setImages(ImageVO); |
| | | }); |
| | |
| | | ComSanshuoExpert specter = comSanShuoExpertService.getById(specterId); |
| | | comEvent.setSpecialistAcceptTime(new Date()); |
| | | comEvent.setSpecialistName(specter.getName()); |
| | | comEvent.setEventProcessStatus(SanShuoEventStatusEnum.ACCEPT.getCode()); |
| | | comEvent.setEventProcessStatus(SanShuoEventStatusEnum.conciliation.getCode()); |
| | | int flag = baseMapper.updateById(comEvent); |
| | | return flag > 0 ? R.ok() : R.fail(ReturnMsgConstants.UPDATE_FALSE); |
| | | } |
| | |
| | | List<ComEventCalculateVO> calculateList = baseMapper.calculate(); |
| | | ComEventCalculateVO comEventCalculateVO =new ComEventCalculateVO(); |
| | | comEventCalculateVO.setStatus("0"); |
| | | comEventCalculateVO.setSum(baseMapper.selectCount(new QueryWrapper<ComEvent>().lambda()).toString()); |
| | | comEventCalculateVO.setSum(baseMapper.selectCount(new QueryWrapper<ComEvent>().lambda().notIn(ComEvent::getEventProcessStatus,(9))).toString()); |
| | | calculateList.add(comEventCalculateVO); |
| | | return R.ok(calculateList); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R archiveRequest(ComEventArchiveVO comEventArchiveVO, LoginUserInfoVO sysUser) { |
| | | ComEvent comEvent = baseMapper.selectById(comEventArchiveVO.getId()); |
| | | if (comEvent.getEventSucceed() == 2) { |
| | | comEvent.setEventProcessStatus(6); |
| | | comEvent.setEventProcessStatus(7); |
| | | } else { |
| | | comEvent.setEventProcessStatus(5); |
| | | comEvent.setEventProcessStatus(6); |
| | | } |
| | | comEvent.setResult(comEventArchiveVO.getResult()); |
| | | baseMapper.updateById(comEvent); |