|
@@ -47,7 +47,7 @@ public class ScoreServiceImpl extends ServiceImpl<ScoreMapper, Score> implements
|
|
@Override
|
|
@Override
|
|
public HttpRespMsg add(Score score) throws ParseException {
|
|
public HttpRespMsg add(Score score) throws ParseException {
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
-// SimpleDateFormat sdfymd = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
|
+ SimpleDateFormat sdfymd = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat sdfym = new SimpleDateFormat("yyyy-MM");
|
|
SimpleDateFormat sdfym = new SimpleDateFormat("yyyy-MM");
|
|
Parameter parameter = parameterMapper.selectOne(new QueryWrapper<Parameter>().eq("param_key", Constant.SCORING_DEADLINE_CODE));
|
|
Parameter parameter = parameterMapper.selectOne(new QueryWrapper<Parameter>().eq("param_key", Constant.SCORING_DEADLINE_CODE));
|
|
if (parameter != null) {
|
|
if (parameter != null) {
|
|
@@ -57,20 +57,20 @@ public class ScoreServiceImpl extends ServiceImpl<ScoreMapper, Score> implements
|
|
msg.setError("当前打分人身份异常。");
|
|
msg.setError("当前打分人身份异常。");
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
- Score oldScore = scoreMapper.selectOne(new QueryWrapper<Score>().eq("scoring_year_month", score.getScoringYearMonth()));
|
|
|
|
|
|
+ Score oldScore = scoreMapper.selectOne(new QueryWrapper<Score>().eq("scoring_year_month", score.getScoringYearMonth()).eq("uid",score.getUid()));
|
|
if (score.getScoreId() != null) {
|
|
if (score.getScoreId() != null) {
|
|
//修改打分
|
|
//修改打分
|
|
scoreMapper.updateById(score);
|
|
scoreMapper.updateById(score);
|
|
} else {
|
|
} else {
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
now.setDate(Integer.parseInt(parameter.getParamValue()));
|
|
now.setDate(Integer.parseInt(parameter.getParamValue()));
|
|
- String thisMonth5 = sdfym.format(now);
|
|
|
|
|
|
+ String thisMonth5 = sdfymd.format(now);
|
|
now.setMonth(now.getMonth() - 1);
|
|
now.setMonth(now.getMonth() - 1);
|
|
- String lastMonth5 = sdfym.format(now);
|
|
|
|
|
|
+ String lastMonth5 = sdfymd.format(now);
|
|
now.setMonth(now.getMonth() + 2);
|
|
now.setMonth(now.getMonth() + 2);
|
|
- String nextMonth5 = sdfym.format(now);
|
|
|
|
|
|
+ String nextMonth5 = sdfymd.format(now);
|
|
Date nowDate = new Date();
|
|
Date nowDate = new Date();
|
|
- String currentDateStr = sdfym.format(nowDate);
|
|
|
|
|
|
+ String currentDateStr = sdfymd.format(nowDate);
|
|
//打分日期
|
|
//打分日期
|
|
Date yearMonth = sdfym.parse(score.getScoringYearMonth());
|
|
Date yearMonth = sdfym.parse(score.getScoringYearMonth());
|
|
if (currentDateStr.compareTo(lastMonth5) >= 0 && currentDateStr.compareTo(thisMonth5) <= 0) {
|
|
if (currentDateStr.compareTo(lastMonth5) >= 0 && currentDateStr.compareTo(thisMonth5) <= 0) {
|