| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.security.SecureRandom; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | |
| | | TAppUser appUser = new TAppUser(); |
| | | appUser.setPhone(registerDto.getPhone()); |
| | | appUser.setPassword(SecurityUtils.encryptPassword(registerDto.getPwd())); |
| | | // 5位随机使用英文+数字格式 |
| | | |
| | | appUser.setName("用户"+generateRandomString(5)); |
| | | appUser.setAvatar("https://tcjt-zpw.obs.cn-east-3.myhuaweicloud.com/xinquan/89ff629aace742ff965e88eab7069b9c.png"); |
| | | appUser.setCode(generateUniqueId()); |
| | | appUserService.save(appUser); |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | public static String generateRandomString(int length) { |
| | | String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; |
| | | SecureRandom random = new SecureRandom(); |
| | | StringBuilder sb = new StringBuilder(length); |
| | | |
| | | for (int i = 0; i < length; i++) { |
| | | int index = random.nextInt(characters.length()); |
| | | sb.append(characters.charAt(index)); |
| | | } |
| | | |
| | | return sb.toString(); |
| | | } |
| | | |
| | | public static String generateUniqueId() { |
| | | // 获取当前日期并格式化为yyyyMMdd |
| | |
| | | TAppUser byId = appUserService.getById(userId); |
| | | |
| | | |
| | | String cacheObject = redisCache.getCacheObject(byId.getPhone()); |
| | | if (!code.equals("123456")&&!cacheObject.equals(code)){ |
| | | String cacheObject = redisCache.getCacheObject(newPhone); |
| | | if (!code.equals("123456")&&!code.equals(cacheObject)){ |
| | | return R.fail("验证码错误"); |
| | | } |
| | | |
| | |
| | | .ge(appUserQuery.getCreateTime1() != null, TAppUser::getCreateTime,time1) |
| | | .le(appUserQuery.getCreateTime2() != null, TAppUser::getCreateTime,time2) |
| | | .in(finalIds.size() > 0, TAppUser::getId, finalIds) |
| | | .orderByDesc(TAppUser::getCreateTime) |
| | | .page(Page.of(appUserQuery.getPageNum(), appUserQuery.getPageSize())); |
| | | |
| | | for (TAppUser record : page.getRecords()) { |
| | |
| | | |
| | | String join1 = StringUtils.join(lateString, "、"); |
| | | record.setLateString(join1); |
| | | |
| | | record.setCreateTimeStr(DateUtils.localDateTimeToString(record.getCreateTime())); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | //列表 |
| | | @ApiOperation(value = "查询",tags = {"后台-评审委员会管理","web-评审委员会"}) |
| | | @ApiOperation(value = "查询",tags = {"后台-评审委员会管理"}) |
| | | @PostMapping("/list") |
| | | public R<Page<TCommittee>> list(@RequestBody CommitteeQuery informationQuery){ |
| | | Page<TCommittee> page = tCommitteeService.lambdaQuery() |
| | | Page<TCommittee> page; |
| | | if(informationQuery.getSortType() == 1){ |
| | | page = tCommitteeService.lambdaQuery() |
| | | .like(!StringUtils.isEmpty(informationQuery.getName()), TCommittee::getCommitteeName, informationQuery.getName()) |
| | | .like(!StringUtils.isEmpty(informationQuery.getCommitteeUnit()), TCommittee::getCommitteeLevel, informationQuery.getCommitteeUnit()) |
| | | .like(!StringUtils.isEmpty(informationQuery.getCommitteeUnit()), TCommittee::getCommitteeUnit, informationQuery.getCommitteeUnit()) |
| | | .eq(informationQuery.getRegionId() != null, TCommittee::getRegionId, informationQuery.getRegionId()) |
| | | .eq(informationQuery.getTechnicalId() != null, TCommittee::getTechnicalId, informationQuery.getTechnicalId()) |
| | | .eq(informationQuery.getMajorId() != null, TCommittee::getMajorId, informationQuery.getMajorId()) |
| | | .eq(informationQuery.getLevel() != null, TCommittee::getLevel, informationQuery.getLevel()) |
| | | .orderByDesc(TCommittee::getCreateTime) |
| | | .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize())); |
| | | }else { |
| | | page = tCommitteeService.lambdaQuery() |
| | | .like(!StringUtils.isEmpty(informationQuery.getName()), TCommittee::getCommitteeName, informationQuery.getName()) |
| | | .like(!StringUtils.isEmpty(informationQuery.getCommitteeUnit()), TCommittee::getCommitteeUnit, informationQuery.getCommitteeUnit()) |
| | | .eq(informationQuery.getRegionId() != null, TCommittee::getRegionId, informationQuery.getRegionId()) |
| | | .eq(informationQuery.getTechnicalId() != null, TCommittee::getTechnicalId, informationQuery.getTechnicalId()) |
| | | .eq(informationQuery.getMajorId() != null, TCommittee::getMajorId, informationQuery.getMajorId()) |
| | | .eq(informationQuery.getLevel() != null, TCommittee::getLevel, informationQuery.getLevel()) |
| | | .orderByDesc(TCommittee::getCommitteeSort) |
| | | .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize())); |
| | | } |
| | | |
| | | for (TCommittee record : page.getRecords()) { |
| | | TRegion byId = regionService.getById(record.getRegionId()); |
| | |
| | | @PostMapping(value = "/detail") |
| | | public R<TConsultation> detail(@RequestParam Long id ) { |
| | | TConsultation byId = informationService.getById(id); |
| | | byId.setWatchNum(byId.getWatchNum()+1); |
| | | informationService.updateById(byId); |
| | | TTechnicalTitle byId1 = tTechnicalTitleService.getById(byId.getTitleId()); |
| | | byId.setTechnicalName(byId1.getTitileName()); |
| | | TTitleMajor byId2 = majorService.getById(byId.getMajorId()); |
| | |
| | | @PostMapping(value = "/list") |
| | | public R<Page<TCourse>> list(@RequestBody CourseQuery informationQuery) { |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | |
| | | Page<TCourse> page = courseService.lambdaQuery() |
| | | Page<TCourse> page; |
| | | if (informationQuery.getSortType()==1){ |
| | | page = courseService.lambdaQuery() |
| | | .like(!StringUtils.isEmpty(informationQuery.getName()), TCourse::getCourseName, informationQuery.getName()) |
| | | .eq(informationQuery.getRegionId() != null, TCourse::getRegionId, informationQuery.getRegionId()) |
| | | .eq(informationQuery.getTechnicalId() != null, TCourse::getTechnicalId, informationQuery.getTechnicalId()) |
| | | .eq(informationQuery.getMajorId() != null, TCourse::getMajorId, informationQuery.getMajorId()) |
| | | .eq(informationQuery.getLevel() != null, TCourse::getLevel, informationQuery.getLevel()) |
| | | .orderByDesc(TCourse::getCreateTime) |
| | | .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize())); |
| | | }else { |
| | | page = courseService.lambdaQuery() |
| | | .like(!StringUtils.isEmpty(informationQuery.getName()), TCourse::getCourseName, informationQuery.getName()) |
| | | .eq(informationQuery.getRegionId() != null, TCourse::getRegionId, informationQuery.getRegionId()) |
| | | .eq(informationQuery.getTechnicalId() != null, TCourse::getTechnicalId, informationQuery.getTechnicalId()) |
| | |
| | | .eq(informationQuery.getLevel() != null, TCourse::getLevel, informationQuery.getLevel()) |
| | | .orderByDesc(TCourse::getCommitteeSort) |
| | | .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize())); |
| | | |
| | | } |
| | | |
| | | Set<Long> cacheSet = redisCache.getCacheSet("COURSE:" + userId); |
| | | |
| | |
| | | import java.lang.reflect.Array; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @ApiOperation(value = "查询",tags = {"后台-申报通知","web-职称申报"}) |
| | | @PostMapping(value = "/list") |
| | | public R<Page<TDeclareNotice>> list(@RequestBody DeclareNoticeQuery informationQuery) { |
| | | Page<TDeclareNotice> page = tDeclareNoticeService.lambdaQuery() |
| | | Page<TDeclareNotice> page; |
| | | if(informationQuery.getSortType()==1){ |
| | | page = tDeclareNoticeService.lambdaQuery() |
| | | .like(!StringUtils.isEmpty(informationQuery.getDeclareNoticeName()), TDeclareNotice::getDeclareNoticeName, informationQuery.getDeclareNoticeName()) |
| | | .eq(informationQuery.getRegionId() != null, TDeclareNotice::getRegionId, informationQuery.getRegionId()) |
| | | .eq(informationQuery.getTechnicalId() != null, TDeclareNotice::getTechnicalId, informationQuery.getTechnicalId()) |
| | | .eq(informationQuery.getMajorId() != null, TDeclareNotice::getMajorId, informationQuery.getMajorId()) |
| | | .eq(informationQuery.getLevel() != null, TDeclareNotice::getLevel, informationQuery.getLevel()) |
| | | .eq(informationQuery.getIsOnline()!=null, TDeclareNotice::getIsOnline, informationQuery.getIsOnline()) |
| | | .between(informationQuery.getDeclareStartTime1()!=null,TDeclareNotice::getDeclareStartTime,informationQuery.getDeclareStartTime1(),informationQuery.getDeclareStartTime2()) |
| | | .between(informationQuery.getDeclareEndTime1()!=null,TDeclareNotice::getDeclareEndTime,informationQuery.getDeclareEndTime1(),informationQuery.getDeclareEndTime2()) |
| | | .orderByDesc(TDeclareNotice::getCreateTime) |
| | | .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize())); |
| | | }else { |
| | | page = tDeclareNoticeService.lambdaQuery() |
| | | .like(!StringUtils.isEmpty(informationQuery.getDeclareNoticeName()), TDeclareNotice::getDeclareNoticeName, informationQuery.getDeclareNoticeName()) |
| | | .eq(informationQuery.getRegionId() != null, TDeclareNotice::getRegionId, informationQuery.getRegionId()) |
| | | .eq(informationQuery.getTechnicalId() != null, TDeclareNotice::getTechnicalId, informationQuery.getTechnicalId()) |
| | |
| | | .between(informationQuery.getDeclareEndTime1()!=null,TDeclareNotice::getDeclareEndTime,informationQuery.getDeclareEndTime1(),informationQuery.getDeclareEndTime2()) |
| | | .orderByDesc(TDeclareNotice::getNoticeSort) |
| | | .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize())); |
| | | } |
| | | |
| | | for (TDeclareNotice record : page.getRecords()) { |
| | | TRegion byId = regionService.getById(record.getRegionId()); |
| | |
| | | tDeclareNotice.setDeclareNoticeFiles(tDeclareNoticeFiles); |
| | | tDeclareNotice.setDeclareNoticeTechnicals(tDeclareNoticeTechnicals); |
| | | tDeclareNotice.setDeclareNoticeMajors(tDeclareNoticeMajors); |
| | | if(StringUtils.isEmpty(tDeclareNotice.getDeclareLevel())){ |
| | | tDeclareNotice.setDeclareLevel(tDeclareNoticeTechnicals.stream().map(TDeclareNoticeTechnical::getLevelName).collect(Collectors.joining("/"))); |
| | | } |
| | | return R.ok(tDeclareNotice); |
| | | } |
| | | |
| | |
| | | |
| | | // wordUtil.generate(response, "/templates", "专业技术工作总结.xml", templateParam, "测试动态列表Word"); |
| | | if (generatedRecords.getType()==1) { |
| | | String url = wordUtil.generate("/templates", "专业技术工作总结.xml", templateParam, "职称工作总结", "F:\\"); |
| | | String url = wordUtil.generate("/templates", "专业技术工作总结.xml", templateParam, "专业技术工作总结", "F:\\"); |
| | | return R.ok(url); |
| | | }else { |
| | | String url = wordUtil.generatePdf("/templates", "专业技术工作总结.xml", templateParam, "职称工作总结", "F:\\"); |
| | | String url = wordUtil.generatePdf("/templates", "专业技术工作总结.xml", templateParam, "专业技术工作总结", "F:\\"); |
| | | return R.ok(url); |
| | | } |
| | | |
| | |
| | | |
| | | // wordUtil.generate(response, "/templates", "专业技术工作总结.xml", templateParam, "测试动态列表Word"); |
| | | if (generatedRecords.getType()==1) { |
| | | String url = wordUtil.generate("/templates", "专业技术工作总结.xml", templateParam, "职称工作总结", "F:\\"); |
| | | String url = wordUtil.generate("/templates", "专业技术工作总结.xml", templateParam, "专业技术工作总结", "F:\\"); |
| | | return R.ok(url); |
| | | }else { |
| | | String url = wordUtil.generatePdf("/templates", "专业技术工作总结.xml", templateParam, "职称工作总结", "F:\\"); |
| | | String url = wordUtil.generatePdf("/templates", "专业技术工作总结.xml", templateParam, "专业技术工作总结", "F:\\"); |
| | | return R.ok(url); |
| | | } |
| | | |
| | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public R getByProvinceName() { |
| | | List<TRegion> list1 = regionService.lambdaQuery().groupBy(TRegion::getProvinceName).list(); |
| | | for (TRegion tRegion : list1) { |
| | | |
| | | |
| | | List<TRegion> list = regionService.lambdaQuery().eq(TRegion::getProvinceName, tRegion.getProvinceName()).list(); |
| | | List<Integer> regionIds = new ArrayList<>(); |
| | | list.forEach(region -> regionIds.add(region.getId())); |
| | | if (!regionIds.isEmpty()) { |
| | | Long count = consultationService.lambdaQuery().in(TConsultation::getRegionId, regionIds).count(); |
| | | |
| | | |
| | | Long count = consultationService.lambdaQuery().in(TConsultation::getRegionId, regionIds) |
| | | .in(TConsultation::getClassificationId,Arrays.asList(1,2,3)).count(); |
| | | tRegion.setCount(count); |
| | | }else { |
| | | tRegion.setCount(0L); |
| | |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | TUserChange one = changeService.lambdaQuery().eq(TUserChange::getUserId, userId).orderByDesc(TUserChange::getCreateTime).last("limit 1").one(); |
| | | List<TConsultation> notices = new ArrayList<>(); |
| | | |
| | | if (type==1){ |
| | | if (one!=null){ |
| | | List<TUserChangeDetail> list = changeDetailService.lambdaQuery().eq(TUserChangeDetail::getChangeId, one.getId()).list(); |
| | | for (TUserChangeDetail tUserChangeDetail : list) { |
| | | List<TConsultation> list1 = consultationService.lambdaQuery().eq(TConsultation::getClassificationId,type).eq(TConsultation::getRegionId,tUserChangeDetail.getRegionId()).eq(TConsultation::getMajorId, tUserChangeDetail.getMajorId()).eq(TConsultation::getLevel, tUserChangeDetail.getLevelId()).list(); |
| | | List<TConsultation> list1 = consultationService.lambdaQuery().eq(TConsultation::getClassificationId,type) |
| | | .eq(TConsultation::getRegionId,tUserChangeDetail.getRegionId()) |
| | | .eq(TConsultation::getMajorId, tUserChangeDetail.getMajorId()) |
| | | .eq(TConsultation::getLevel, tUserChangeDetail.getLevelId()) |
| | | .eq(TConsultation::getIsRecommend,1) |
| | | .orderByDesc(TConsultation::getClassificationSort,TConsultation::getCreateTime).list(); |
| | | notices.addAll(list1); |
| | | } |
| | | notices.sort(Comparator.comparing(TConsultation::getCreateTime).reversed()); |
| | | }else { |
| | | // 创建 LambdaQueryWrapper 并设置查询条件 |
| | | |
| | | } |
| | | List<TConsultation> list1 = consultationService.lambdaQuery().eq(TConsultation::getClassificationId,type).eq(TConsultation::getIsRecommend,1).last("ORDER BY RAND() LIMIT 16").list(); |
| | | notices.addAll(list1); |
| | | if (notices.size() > 16) { |
| | | // 只保留前 16 条记录 |
| | | notices = new ArrayList<>(notices.subList(0, 16)); |
| | | } |
| | | }else { |
| | | if (one!=null){ |
| | | List<TUserChangeDetail> list = changeDetailService.lambdaQuery().eq(TUserChangeDetail::getChangeId, one.getId()).list(); |
| | | for (TUserChangeDetail tUserChangeDetail : list) { |
| | | List<TConsultation> list1 = consultationService.lambdaQuery().eq(TConsultation::getClassificationId,type) |
| | | .eq(TConsultation::getRegionId,tUserChangeDetail.getRegionId()) |
| | | .eq(TConsultation::getMajorId, tUserChangeDetail.getMajorId()) |
| | | .eq(TConsultation::getLevel, tUserChangeDetail.getLevelId()).list(); |
| | | notices.addAll(list1); |
| | | } |
| | | notices.sort(Comparator.comparing(TConsultation::getCreateTime).reversed()); |
| | |
| | | if (notices.size() > 16) { |
| | | // 只保留前 16 条记录 |
| | | notices = new ArrayList<>(notices.subList(0, 16)); |
| | | } |
| | | } |
| | | return R.ok(notices); |
| | | } |
| | |
| | | @PostMapping(value = "/allert") |
| | | public R allert() { |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | TAppUser byId = appUserService.getById(userId); |
| | | Object cacheObject = redisCache.getCacheObject("ALLERT:"+userId); |
| | | |
| | | if (cacheObject!=null){ |
| | | if (cacheObject!=null && byId.getIsSetPreference() == 1){ |
| | | return R.ok(cacheObject); |
| | | }else { |
| | | return R.ok(false); |
| | |
| | | // 只保留前 16 条记录 |
| | | notices = new ArrayList<>(notices.subList(0, 16)); |
| | | } |
| | | notices = notices.stream().distinct().collect(Collectors.toList()); |
| | | return R.ok(notices); |
| | | } |
| | | |
| | |
| | | @PostMapping(value = "/list") |
| | | public R<Page<TInformation>> list(@RequestBody InformationQuery informationQuery) { |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | |
| | | Page<TInformation> page = informationService.lambdaQuery() |
| | | Page<TInformation> page; |
| | | if (informationQuery.getSortType()==1){ |
| | | page = informationService.lambdaQuery() |
| | | .like(!StringUtils.isEmpty(informationQuery.getInformationName()), TInformation::getInformationName, informationQuery.getInformationName()) |
| | | .eq(informationQuery.getRegionId() != null, TInformation::getRegionId, informationQuery.getRegionId()) |
| | | .eq(informationQuery.getTechnicalId() != null, TInformation::getTechnicalId, informationQuery.getTechnicalId()) |
| | | .eq(informationQuery.getMajorId() != null, TInformation::getMajorId, informationQuery.getMajorId()) |
| | | .eq(informationQuery.getLevel() != null, TInformation::getLevel, informationQuery.getLevel()) |
| | | .eq(informationQuery.getFree()!=null&&informationQuery.getFree() == 1, TInformation::getInformationPrice, BigDecimal.ZERO) |
| | | .ne(informationQuery.getFree()!=null&&informationQuery.getFree() == 2, TInformation::getInformationPrice, BigDecimal.ZERO) |
| | | .orderByDesc(TInformation::getCreateTime) |
| | | .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize())); |
| | | }else { |
| | | page = informationService.lambdaQuery() |
| | | .like(!StringUtils.isEmpty(informationQuery.getInformationName()), TInformation::getInformationName, informationQuery.getInformationName()) |
| | | .eq(informationQuery.getRegionId() != null, TInformation::getRegionId, informationQuery.getRegionId()) |
| | | .eq(informationQuery.getTechnicalId() != null, TInformation::getTechnicalId, informationQuery.getTechnicalId()) |
| | |
| | | .ne(informationQuery.getFree()!=null&&informationQuery.getFree() == 2, TInformation::getInformationPrice, BigDecimal.ZERO) |
| | | .orderByDesc(TInformation::getCommitteeSort) |
| | | .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize())); |
| | | } |
| | | Set<Long> cacheSet = redisCache.getCacheSet("INFORMATION:" + userId); |
| | | |
| | | for (TInformation record : page.getRecords()) { |
| | |
| | | @ApiOperation(value = "计数",tags = "后台-订单管理") |
| | | @PostMapping("/count") |
| | | public R<List<Map<String,Object>>> count(@RequestBody OrderQuery orderQuery){ |
| | | |
| | | return R.ok(orderService.totalCount(orderQuery)); |
| | | } |
| | | |
| | |
| | | List<TTitleMajor> list1 = majorService.lambdaQuery().eq(TTitleMajor::getTechnicalId, tTechnicalTitle.getId()).list(); |
| | | for (TTitleMajor tTitleMajor : list1) { |
| | | tTitleMajor.setName(tTitleMajor.getMajorName()); |
| | | tTitleMajor.setMajors(list2); |
| | | // tTitleMajor.setMajors(list2); |
| | | } |
| | | tTechnicalTitle.setMajors(list1); |
| | | } |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.domain.TIndexMenu; |
| | | import com.ruoyi.system.domain.TUserChange; |
| | | import com.ruoyi.system.domain.TUserChangeDetail; |
| | | import com.ruoyi.system.domain.*; |
| | | import com.ruoyi.system.dto.AllertTitleDto; |
| | | import com.ruoyi.system.dto.RegionDto; |
| | | import com.ruoyi.system.service.TIndexMenuService; |
| | | import com.ruoyi.system.service.TRegionService; |
| | | import com.ruoyi.system.service.TUserChangeDetailService; |
| | | import com.ruoyi.system.service.TUserChangeService; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.web.controller.query.CityQueryDto; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.nio.file.LinkOption; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @RestController |
| | | @RequestMapping("/web") |
| | |
| | | private TUserChangeService changeService; |
| | | @Resource |
| | | private TUserChangeDetailService changeDetailService; |
| | | @Resource |
| | | private TAppUserService appUserService; |
| | | |
| | | @ApiOperation(value = "获取地区树状图",tags = "web端偏好设置") |
| | | @PostMapping(value = "/region/tree") |
| | |
| | | |
| | | @ApiOperation(value = "通过cityCodes查职称分类",tags = "web端偏好设置") |
| | | @PostMapping(value = "/title/tree") |
| | | public R<List<AllertTitleDto>> list(@RequestBody CityQueryDto cityQueryDto) { |
| | | |
| | | public R<List<AllertTitleDto>> list(@Validated @RequestBody CityQueryDto cityQueryDto) { |
| | | String[] split = cityQueryDto.getStrings().split(","); |
| | | cityQueryDto.getCityCode().addAll(Arrays.asList(split)); |
| | | List<AllertTitleDto> allertTitleDtos = indexMenuService.allert(cityQueryDto.getCityCode()); |
| | | |
| | | return R.ok(allertTitleDtos); |
| | | } |
| | | |
| | |
| | | @PostMapping(value = "/title/set") |
| | | public R<List<AllertTitleDto>> set(@RequestBody List<TUserChangeDetail> userChangeDetails) { |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | TAppUser byId = appUserService.getById(userId); |
| | | if(Objects.nonNull(byId)){ |
| | | byId.setIsSetPreference(1); |
| | | appUserService.updateById(byId); |
| | | } |
| | | |
| | | //保存一次变更记录 |
| | | |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | @Data |
| | | public class CityQueryDto { |
| | | List<String> cityCode; |
| | | List<String> cityCode = new ArrayList<>(); |
| | | |
| | | @NotBlank(message = "城市不可为空") |
| | | private String strings; |
| | | } |
| | |
| | | @ApiModelProperty(value = "1初级2中级3副高级4正高级5高级") |
| | | @TableField("level") |
| | | private Integer level; |
| | | |
| | | @ApiModelProperty(value = "1=后台 2=web端") |
| | | private Integer sortType=1; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "1初级2中级3副高级4正高级5高级") |
| | | @TableField("level") |
| | | private Integer level; |
| | | |
| | | |
| | | @ApiModelProperty(value = "1=后台 2=web端") |
| | | private Integer sortType=1; |
| | | } |
| | |
| | | private LocalDate declareEndTime2; |
| | | @ApiModelProperty("是否在线申报1是0否") |
| | | private Integer isOnline; |
| | | |
| | | |
| | | @ApiModelProperty(value = "1=后台 2=web端") |
| | | private Integer sortType=1; |
| | | |
| | | } |
| | |
| | | private Integer level; |
| | | @ApiModelProperty(value = "1免费2付费") |
| | | private Integer free; |
| | | |
| | | |
| | | @ApiModelProperty(value = "1=后台 2=web端") |
| | | private Integer sortType=1; |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.system.domain.TAppUser; |
| | | import com.ruoyi.system.service.TAppUserService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.Objects; |
| | | import java.util.concurrent.ThreadLocalRandom; |
| | | @RestController |
| | | |
| | | public class MsgUtil { |
| | | @Resource |
| | | private RedisCache redisCache; |
| | | @ApiOperation(value = "通用发送验证码",tags = "通用发送验证码") |
| | | @Resource |
| | | private TAppUserService appUserService; |
| | | @ApiOperation(value = "通用发送验证码,type:1=注册,2=登录,3=修改手机号,4=修改密码",tags = "通用发送验证码") |
| | | @PostMapping("/common/send") |
| | | public String send (String phone){ |
| | | public String send (String phone,Integer type){ |
| | | TAppUser one = appUserService.lambdaQuery().eq(TAppUser::getPhone, phone).one(); |
| | | switch (type){ |
| | | case 1: |
| | | if (one!=null){ |
| | | throw new ServiceException("当前手机号已注册"); |
| | | } |
| | | break; |
| | | case 2: |
| | | if (Objects.isNull(one)){ |
| | | throw new ServiceException("当前手机号未注册"); |
| | | } |
| | | break; |
| | | case 3: |
| | | if (one!=null){ |
| | | throw new ServiceException("当前手机号已存在"); |
| | | } |
| | | break; |
| | | case 4: |
| | | if (Objects.isNull(one)){ |
| | | throw new ServiceException("当前手机号不存在"); |
| | | } |
| | | break; |
| | | } |
| | | String code = createCode(); |
| | | redisCache.setCacheObject(phone,code); |
| | | HashMap<String, Object> paramMap = new HashMap<>(); |
| | |
| | | <w:szCs w:val="28" /> |
| | | </w:rPr> |
| | | <w:t> |
| | | 一直以来遵守公司各项规章制度,遵守行业规则,遵纪守法。从未利用职务质变在经营活动中为自己谋取私利。平等对待所有同事与客户,在履行职责和对外交往中,不敢做有损公司声誉的事情。在业务运作中也是按照有关规章、制度条款执行,保证公司的各项业务记录准确、清晰,严禁有弄虚作假与舞弊或其他行为。</w:t> |
| | | 一直以来遵守公司各项规章制度,遵守行业规则,遵纪守法。从未利用职务之便在经营活动中为自己谋取私利。平等对待所有同事与客户,在履行职责和对外交往中,不敢做有损公司声誉的事情。在业务运作中也是按照有关规章、制度条款执行,保证公司的各项业务记录准确、清晰,严禁有弄虚作假与舞弊或其他行为。</w:t> |
| | | </w:r> |
| | | </w:p> |
| | | <w:p w14:paraId="193DFE44" w14:textId="77777777" w:rsidR="005C5315" |
| | |
| | | // if (user==null){ |
| | | // r |
| | | // } |
| | | // if (StringUtils.isNull(user)){ |
| | | // log.info("登录用户:{} 不存在.", username); |
| | | // throw new ServiceException(MessageUtils.message("user.not.exists")); |
| | | // } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { |
| | | // log.info("登录用户:{} 已被删除.", username); |
| | | // throw new ServiceException(MessageUtils.message("user.password.delete")); |
| | | // } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { |
| | | // log.info("登录用户:{} 已被停用.", username); |
| | | // throw new ServiceException(MessageUtils.message("user.blocked")); |
| | | // } |
| | | if (StringUtils.isNull(user)){ |
| | | log.info("登录用户:{} 不存在.", username); |
| | | throw new ServiceException("登录用户不存在"); |
| | | } else if (user.getIsDelete()) { |
| | | log.info("登录用户:{} 已被删除.", username); |
| | | throw new ServiceException("登录用户已被删除"); |
| | | } else if (user.getStatus() == 2) { |
| | | log.info("登录用户:{} 已被停用.", username); |
| | | throw new ServiceException("登录用户已被冻结"); |
| | | }else if (user.getStatus() == 3) { |
| | | log.info("登录用户:{} 已被注销.", username); |
| | | throw new ServiceException("登录用户已被注销"); |
| | | } |
| | | try |
| | | { |
| | | UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, null); |
| | |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @Excel(width = 30,name = "用户ID") |
| | | private Long id; |
| | | |
| | | @Excel(width = 30,name = "用户ID") |
| | | private String code; |
| | | @ApiModelProperty(value = "用户") |
| | | @TableField("name") |
| | | @Excel(width = 30,name = "用户昵称") |
| | |
| | | @ApiModelProperty(value = "市名称") |
| | | @TableField("city") |
| | | private String city; |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "市区划代码") |
| | | @TableField("city_code") |
| | |
| | | @TableField("last_login_time") |
| | | private LocalDateTime lastLoginTime; |
| | | |
| | | @ApiModelProperty(value = "状态(1=正常,2=冻结,3=注销)") |
| | | @Excel(width = 30,name = "用户状态", replace = {"正常_1", "冻结_2","注销_3"}) |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @TableField("edit_name") |
| | | private String editName; |
| | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("is_delete") |
| | | private Boolean isDelete; |
| | | @ApiModelProperty(value = "是否设置偏好 1是 0否") |
| | | @TableField("is_set_preference") |
| | | private Integer isSetPreference; |
| | | |
| | | @ApiModelProperty(value = "初次偏好设置") |
| | | @Excel(width = 30,name = "初次偏好设置") |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "状态(1=正常,2=冻结,3=注销)") |
| | | @Excel(width = 30,name = "用户状态", replace = {"正常_1", "冻结_2","注销_3"}) |
| | | @TableField("status") |
| | | private Integer status; |
| | | @TableField(exist = false) |
| | | @Excel(width = 30,name = "注册时间") |
| | | private String createTimeStr; |
| | |
| | | @ApiModelProperty(value = "评审通知说明") |
| | | @TableField("declare_info") |
| | | private String declareInfo; |
| | | @ApiModelProperty(value = "职称申报方式") |
| | | @TableField("title_application_type") |
| | | private String titleApplicationType; |
| | | |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | |
| | | |
| | | @TableField("price") |
| | | private BigDecimal price; |
| | | @TableField("name") |
| | | private String name="工作生成总结"; |
| | | |
| | | @TableLogic |
| | | @TableField("is_delete") |
| | |
| | | @ApiModelProperty(value = "实际下载量") |
| | | @TableField("downland_num") |
| | | private Integer downlandNum; |
| | | @ApiModelProperty(value = "内容") |
| | | @TableField("content") |
| | | private String content; |
| | | |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.domain.TTitleMajor; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author luodangjia |
| | | * @since 2024-09-19 |
| | | */ |
| | | @Mapper |
| | | public interface TTitleMajorMapper extends BaseMapper<TTitleMajor> { |
| | | |
| | | List<TTitleMajor> pageList( @Param("pageInfo")PageInfo<TTitleMajor> pageInfo); |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.ruoyi.system.domain.TIndexMenu; |
| | | import com.ruoyi.system.domain.TTitleMajor; |
| | | import com.ruoyi.system.dto.AllertTitleDto; |
| | | import com.ruoyi.system.mapper.TIndexMenuMapper; |
| | | import com.ruoyi.system.mapper.TTitleMajorMapper; |
| | | import com.ruoyi.system.service.TIndexMenuService; |
| | | import com.ruoyi.system.service.TTitleMajorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDate; |
| | |
| | | @Service |
| | | public class TIndexMenuServiceImpl extends ServiceImpl<TIndexMenuMapper, TIndexMenu> implements TIndexMenuService { |
| | | |
| | | @Autowired |
| | | private TTitleMajorMapper titleMajorMapper; |
| | | |
| | | @Override |
| | | public List<AllertTitleDto> allert(List<String> cityCode) { |
| | | return this.baseMapper.allert(cityCode); |
| | | List<AllertTitleDto> allert = this.baseMapper.allert(cityCode); |
| | | for (AllertTitleDto allertTitleDto : allert) { |
| | | List<TTitleMajor> tTitleMajors = titleMajorMapper.selectList(Wrappers.lambdaQuery(TTitleMajor.class) |
| | | .eq(TTitleMajor::getTechnicalId, allertTitleDto.getId())); |
| | | allertTitleDto.setChildren(tTitleMajors); |
| | | } |
| | | return allert; |
| | | } |
| | | |
| | | @Override |
| | |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | order by d.parent_id, d.order_num |
| | | order by d.create_time desc |
| | | </select> |
| | | |
| | | <select id="selectDeptListByRoleId" resultType="Long"> |
| | |
| | | </if> |
| | | AND del_flag = 0 |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from sys_role |
| | |
| | | <result column="last_login_time" property="lastLoginTime" /> |
| | | <result column="status" property="status" /> |
| | | <result column="is_delete" property="isDelete" /> |
| | | <result column="is_set_preference" property="isSetPreference" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, name, phone, avatar, wx_openid, ali_openid, province, province_code, city, city_code, country, email, address, info, remark, create_time, last_login_time, status, is_delete |
| | | id, name, phone, avatar, wx_openid, ali_openid, province, province_code, city, city_code, country, email, address, info, remark, create_time, last_login_time, status, is_delete,is_set_preference |
| | | </sql> |
| | | <select id="getNewIds" resultType="java.lang.Long"> |
| | | SELECT |
| | |
| | | is_delete = 0 |
| | | GROUP BY |
| | | user_id |
| | | limit 1 |
| | | ) uc_newest ON au.id = uc_newest.user_id |
| | | LEFT JOIN t_user_change_detail td on td.change_id = uc_newest.id |
| | | <where> |
| | |
| | | <if test="appUserQuery.levelId1 != null"> |
| | | AND td.level_id = #{appUserQuery.levelId1} |
| | | </if> |
| | | |
| | | |
| | | |
| | | </where> |
| | | GROUP BY au.id |
| | | </select> |
| | |
| | | <if test="appUserQuery.levelId != null"> |
| | | AND td.level_id = #{appUserQuery.levelId} |
| | | </if> |
| | | |
| | | </where> |
| | | GROUP BY au.id |
| | | </select> |
| | |
| | | and tcc.course_id = #{commentQuery.courseId} |
| | | </if> |
| | | </where> |
| | | ORDER BY tcc.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="declare_notice_urls" property="declareNoticeUrls" /> |
| | | <result column="other_files" property="otherFiles" /> |
| | | <result column="declare_info" property="declareInfo" /> |
| | | <result column="title_application_type" property="titleApplicationType" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="is_delete" property="isDelete" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, region_id, notice_sort, technical_id, major_id, level, is_online, declare_year, declare_notice_name, declare_team_name, declare_notice_type, declare_phone, declare_type, recommend_type, declare_level, declare_num, declare_static, declare_start_time, declare_end_time, declare_limit, declare_notice_file_type, declare_notice_urls, other_files, declare_info, create_by, create_time, is_delete |
| | | id, region_id, notice_sort, technical_id, major_id, `level`, is_online, declare_year, declare_notice_name, declare_team_name, declare_notice_type, declare_phone, |
| | | declare_type, recommend_type, declare_level, declare_num, declare_static, declare_start_time, declare_end_time, declare_limit, declare_notice_file_type, |
| | | declare_notice_urls, other_files, declare_info, create_by, create_time, is_delete,title_application_type |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | id, menu_name, menu_sort, create_by, create_time, is_delete |
| | | </sql> |
| | | <select id="allert" resultMap="tree"> |
| | | SELECT tt.id as tid, tt.titile_name,tm.id,tm.major_name |
| | | SELECT tt.id as tid, tt.titile_name |
| | | FROM t_technical_title tt |
| | | LEFT JOIN t_title_major tm on tm.technical_id = tt.id |
| | | WHERE 1=1 and tt.is_delete = 0 and tm.is_delete = 0 |
| | | WHERE 1=1 and tt.is_delete = 0 |
| | | <if test="cityCode != null and cityCode.size() > 0"> |
| | | <foreach collection="cityCode" item="id" separator=","> |
| | | OR FIND_IN_SET(#{id}, tm.region_ids) |
| | | and FIND_IN_SET(#{id}, tt.region_ids) |
| | | </foreach> |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | <select id="userUp" resultType="java.util.Map"> |
| | | SELECT |
| | |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="is_delete" property="isDelete" /> |
| | | <result column="content" property="content" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, region_id, committee_sort, technical_id, major_id, level, information_name, information_price, information_cover, fake_downland_num, downland_num, create_by, create_time, is_delete |
| | | id, region_id, committee_sort, technical_id, major_id, `level`, information_name, information_price, |
| | | information_cover, fake_downland_num, downland_num, create_by, create_time, is_delete,content |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | t2.NAME AS name, |
| | | t2.phone AS phone, |
| | | CONCAT( t2.NAME, ' ', t2.phone ) AS user_search, |
| | | COALESCE ( t_course.course_name, t_information.information_name ) AS good_name, |
| | | COALESCE ( t_course.course_name, t_information.information_name,t_generated_records.recordsName ) AS good_name, |
| | | COALESCE ( t_course.course_cover, t_information.information_cover ) AS cover, |
| | | CONCAT(COALESCE ( t_course.course_name, t_information.information_name ),' ',t1.code) as orderSearch |
| | | FROM |
| | |
| | | AND t1.good_type = 1 |
| | | LEFT JOIN ( SELECT id, information_name AS information_name,information_cover FROM t_information ) t_information ON t1.good_id = t_information.id |
| | | AND t1.good_type = 2 |
| | | LEFT JOIN ( SELECT id, `name` AS recordsName,user_id FROM t_generated_records order by create_time DESC limit 1) t_generated_records ON t1.user_id = t_generated_records.user_id |
| | | AND t1.good_type = 3 |
| | | <where> |
| | | t1.is_delete = 0 |
| | | <if test="orderQuery.orderSearch != null and orderQuery.orderSearch != ''"> |
| | | AND ( t1.code LIKE concat('%',#{orderQuery.orderSearch},'%') or t_course.course_name LIKE concat('%',#{orderQuery.orderSearch},'%') or t_information.information_name LIKE concat('%',#{orderQuery.orderSearch},'%')) |
| | | AND ( t1.code LIKE concat('%',#{orderQuery.orderSearch},'%') |
| | | or t_course.course_name LIKE concat('%',#{orderQuery.orderSearch},'%') |
| | | or t_information.information_name LIKE concat('%',#{orderQuery.orderSearch},'%') |
| | | or t_generated_records.recordsName LIKE concat('%',#{orderQuery.orderSearch},'%')) |
| | | </if> |
| | | <if test="orderQuery.userSearch != null and orderQuery.userSearch != ''"> |
| | | AND (user_name LIKE concat('%',#{orderQuery.userSearch},'%') OR user_phone LIKE concat('%',#{orderQuery.userSearch},'%')) |
| | | AND (t2.name LIKE concat('%',#{orderQuery.userSearch},'%') OR t2.phone LIKE concat('%',#{orderQuery.userSearch},'%')) |
| | | </if> |
| | | <if test="orderQuery.goodType != null "> |
| | | AND t1.good_type = #{orderQuery.goodType} |
| | |
| | | SUM(CASE WHEN o.payment_status = 2 THEN 1 ELSE 0 END) AS paid_count, |
| | | SUM(CASE WHEN o.payment_status = 3 THEN 1 ELSE 0 END) AS cancelled_count, |
| | | count(1) AS refunded_count, |
| | | <if test="orderQuery.paymentType != null and orderQuery.paymentType == 1"> |
| | | SUM(CASE WHEN o.payment_status = 1 THEN o.payment_amount ELSE 0 END) AS payment_amount |
| | | </if> |
| | | <if test="orderQuery.paymentType != null and orderQuery.paymentType == 2"> |
| | | SUM(CASE WHEN o.payment_status = 2 THEN o.payment_amount ELSE 0 END) AS payment_amount |
| | | |
| | | </if> |
| | | <if test="orderQuery.paymentType != null and orderQuery.paymentType == 3"> |
| | | SUM(CASE WHEN o.payment_status = 3 THEN o.payment_amount ELSE 0 END) AS payment_amount |
| | | </if> |
| | | <if test="orderQuery.paymentType == null"> |
| | | SUM(CASE WHEN (o.payment_status = 1 OR o.payment_status = 2 OR o.payment_status = 3) THEN o.payment_amount ELSE 0 END) AS payment_amount |
| | | </if> |
| | | from ( |
| | | SELECT |
| | | t1.*, |
| | |
| | | AND t1.good_type = 1 |
| | | LEFT JOIN ( SELECT id, information_name AS information_name,information_cover FROM t_information ) t_information ON t1.good_id = t_information.id |
| | | AND t1.good_type = 2 |
| | | LEFT JOIN ( SELECT id, `name` AS recordsName,user_id FROM t_generated_records order by create_time DESC limit 1) t_generated_records ON t1.user_id = t_generated_records.user_id |
| | | AND t1.good_type = 3 |
| | | <where> |
| | | t1.is_delete = 0 |
| | | <if test="orderQuery.orderSearch != null and orderQuery.orderSearch != ''"> |
| | | AND ( t1.code LIKE concat('%',#{orderQuery.orderSearch},'%') or t_course.course_name LIKE concat('%',#{orderQuery.orderSearch},'%') or t_information.information_name LIKE concat('%',#{orderQuery.orderSearch},'%')) |
| | | AND ( t1.code LIKE concat('%',#{orderQuery.orderSearch},'%') |
| | | or t_course.course_name LIKE concat('%',#{orderQuery.orderSearch},'%') |
| | | or t_information.information_name LIKE concat('%',#{orderQuery.orderSearch},'%') |
| | | or t_generated_records.recordsName LIKE concat('%',#{orderQuery.orderSearch},'%')) |
| | | </if> |
| | | <if test="orderQuery.userSearch != null and orderQuery.userSearch != ''"> |
| | | AND (user_name LIKE concat('%',#{orderQuery.userSearch},'%') OR user_phone LIKE concat('%',#{orderQuery.userSearch},'%')) |
| | | AND (t2.name LIKE concat('%',#{orderQuery.userSearch},'%') OR t2.phone LIKE concat('%',#{orderQuery.userSearch},'%')) |
| | | </if> |
| | | <if test="orderQuery.goodType != null "> |
| | | AND t1.good_type = #{orderQuery.goodType} |
| | |
| | | <if test="orderQuery.createTime2 != null"> |
| | | AND DATE(t1.create_time) <= #{orderQuery.createTime2} |
| | | </if> |
| | | <if test="orderQuery.userId != null "> |
| | | AND t1.user_id = #{orderQuery.userId} |
| | | </if> |
| | | </where> |
| | | ) o |
| | | |