ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TSystemBulletinController.java
@@ -47,6 +47,10 @@ @ApiOperation(value = "新增系统公告") @PostMapping(value = "/add") public R<Boolean> add(@RequestBody SystemBulletinDTO dto) { if(dto.getStatus()==1){ systemBulletinService.update(Wrappers.lambdaUpdate(TSystemBulletin.class) .set(TSystemBulletin::getStatus, 2)); } systemBulletinService.save(dto); return R.ok(); } @@ -54,6 +58,10 @@ @ApiOperation(value = "编辑系统公告") @PostMapping(value = "/edit") public R<Boolean> edit(@RequestBody SystemBulletinDTO dto) { if(dto.getStatus()==1){ systemBulletinService.update(Wrappers.lambdaUpdate(TSystemBulletin.class) .set(TSystemBulletin::getStatus, 2)); } systemBulletinService.updateById(dto); return R.ok(); } ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/WorkbenchesController.java
@@ -293,7 +293,7 @@ map.put("waitTaskNum", list.stream().filter(tTask -> tTask.getStatus() == 1).count()); // 总计员工数 Integer totalEmployeeNum = sysUserService.selectUserCount(query.getProjectId(),deptType); Integer totalEmployeeNum = sysUserService.selectUserCount(null,deptType); if (deptType != 1) { totalEmployeeNum = totalEmployeeNum + 1; } @@ -1164,6 +1164,8 @@ analysisUnqualifiedCleaningDetailVO.setCount(tTaskDetails.size()); analysisUnqualifiedCleaningDetailVOS.add(analysisUnqualifiedCleaningDetailVO); } // 按照数量倒序排序 analysisUnqualifiedCleaningDetailVOS.sort(Comparator.comparingInt(AnalysisUnqualifiedCleaningDetailVO::getCount).reversed()); analysisUnqualifiedCleaningVO.setAnalysisUnqualifiedCleaningDetailVOS(analysisUnqualifiedCleaningDetailVOS); } ruoyi-admin/src/main/java/com/ruoyi/web/controller/task/TaskUtil.java
@@ -64,7 +64,7 @@ // 每一个小时执行一次 // @Scheduled(cron = "0 0 0 * * ?") // @Scheduled(fixedRate = 1500000000) @Scheduled(fixedRate = 1500000000) public void dayOfCreateInspection() { try { @@ -275,26 +275,26 @@ } } } tLocationList = tLocationList.stream().distinct().collect(Collectors.toList()); // 抽取重复点位 Integer currentValue = detail.getCurrentValue(); if(currentValue != cycle){ // 周期天数加一 detail.setCurrentValue(currentValue + 1); // 获取重复点位 Set<TLocation> repeatLocation = redisCache.getCacheSet(detail.getId() + REPEAT_LOCATION); Set<TLocation> repeatLocation = redisCache.getCacheSet(detail.getId() + ":" + sysUser.getUserId() + REPEAT_LOCATION); if(!CollectionUtils.isEmpty(repeatLocation)){ List<TLocation> locations = randomSelection(new ArrayList<>(tLocationList), num3); tLocationList.addAll(locations); } Set<TLocation> locationSet = new HashSet<>(tLocationList); redisCache.setCacheSet(detail.getId() + REPEAT_LOCATION, locationSet); redisCache.setCacheSet(detail.getId() + ":" + sysUser.getUserId() + REPEAT_LOCATION, locationSet); }else { // 设置当前周期为0 detail.setCurrentValue(0); // 将重复点位置空 redisCache.deleteObject(detail.getId() + REPEAT_LOCATION); redisCache.deleteObject(detail.getId() + ":" + sysUser.getUserId() + REPEAT_LOCATION); // 将项目部权重置空 redisCache.deleteObject(detail.getId() + PROJECT_DEPT_WEIGHT); // 将保洁员权重置空