移除警告

develop
zhouj1203@hotmail.com 4 months ago
parent 4f3b4e6d6b
commit 763ce06af1

@ -39,7 +39,7 @@ import static cn.teammodel.utils.SchoolDateUtil.calculateWeekNum;
/**
* @author winter
* @create 2023-12-06 14:46
* @create 2023-12-06 14:46
*/
@Service
public class AdminAppraiseServiceImpl implements AdminAppraiseService {
@ -366,8 +366,7 @@ public class AdminAppraiseServiceImpl implements AdminAppraiseService {
rules = rules.stream().sorted(Comparator.comparing(AchievementRule::getLevel)).collect(Collectors.toList());
boolean flag = false;
int lastPromotionCount = 0;
for (int i = 0, rulesSize = rules.size(); i < rulesSize; i++) {
AchievementRule rule = rules.get(i);
for (AchievementRule rule : rules) {
if (updateRule.getId().equals(rule.getId())) {
BeanUtils.copyProperties(updateRule, rule);
lastPromotionCount = rule.getLevelCount() * rule.getPromotionLevel();

@ -3,7 +3,6 @@ package cn.teammodel.controller.admin.service.impl;
import cn.teammodel.common.ErrorCode;
import cn.teammodel.common.PK;
import cn.teammodel.config.exception.ServiceException;
import cn.teammodel.config.ies.IESConfig;
import cn.teammodel.controller.admin.service.AdminIndexDutyService;
import cn.teammodel.model.dto.admin.appraise.TimeRangeDto;
import cn.teammodel.model.dto.weekDuty.LessonRecordDto;
@ -22,26 +21,11 @@ import cn.teammodel.repository.SchoolRepository;
import cn.teammodel.repository.TeacherRepository;
import cn.teammodel.security.utils.SecurityUtil;
import cn.teammodel.utils.GroupUtil;
import cn.teammodel.utils.JsonUtil;
import cn.teammodel.utils.SchoolDateUtil;
import com.azure.spring.data.cosmos.core.query.CosmosPageRequest;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.type.TypeFactory;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import lombok.var;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.data.domain.Slice;
@ -49,7 +33,6 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*;
@ -59,7 +42,7 @@ import static cn.teammodel.utils.SchoolDateUtil.calculateWeekNum;
/**
* @author winter
* @create 2024-02-28 15:07
* &#064;create 2024-02-28 15:07
*/
@Service
@Slf4j

@ -13,8 +13,6 @@ import cn.teammodel.model.dto.admin.common.RMember;
import cn.teammodel.model.vo.admin.ArtElementsVo;
import cn.teammodel.model.vo.admin.DataFileVo;
import cn.teammodel.repository.ArtRepository;
import cn.teammodel.repository.ClassRepository;
import cn.teammodel.repository.StudentRepository;
import cn.teammodel.utils.GroupUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
@ -30,10 +28,6 @@ import com.alibaba.fastjson.TypeReference;
public class ArtServiceImpl implements ArtService {
@Resource
private ArtRepository artRepository;
@Resource
private ClassRepository classRepository;
@Resource
private StudentRepository studentRepository;
@Autowired
private Environment env;
@Override

@ -11,18 +11,14 @@ import cn.teammodel.repository.ClassRepository;
import cn.teammodel.repository.CommentRepository;
import cn.teammodel.repository.SchoolRepository;
import cn.teammodel.utils.MonthToNumberConverter;
import com.azure.cosmos.models.CosmosPatchOperations;
import com.azure.cosmos.models.PartitionKey;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.Instant;
import java.time.LocalDate;
import java.time.Month;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Stream;
import static java.time.LocalDate.now;
@ -50,7 +46,7 @@ public class CommonServiceImpl implements CommonService {
for (ClassInfo classInfo : classes) {
if(period.get(0).getId().equalsIgnoreCase(classInfo.getPeriodId())) {
for (School.Semester semester : period.get(0).getSemesters()) {
int time = 0;
int time;
if(semester.getStart() == 1) {
if (mon == semester.getMonth())
{

@ -4,13 +4,11 @@ import cn.teammodel.common.ErrorCode;
import cn.teammodel.config.exception.ServiceException;
import cn.teammodel.controller.admin.service.ExamService;
import cn.teammodel.model.dto.admin.exam.OverViewDto;
import cn.teammodel.repository.ExamRepository;
import cn.teammodel.utils.GroupUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
@ -19,8 +17,6 @@ public class ExamServiceImpl implements ExamService {
@Autowired
private Environment env;
@Resource
private ExamRepository examRepository;
@Override
public Map<String, Object> getAnalysis(OverViewDto overViewDto, HttpServletRequest request) {

Loading…
Cancel
Save