|
@@ -51,17 +51,17 @@ public class ScoreServiceImpl extends ServiceImpl<ScoreMapper, Score> implements
|
|
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) {
|
|
- User Rater = userMapper.selectById(score.getRaterId());
|
|
|
|
- score.setRater(Rater.getName());
|
|
|
|
- if(Rater == null){
|
|
|
|
- msg.setError("当前打分人身份异常。");
|
|
|
|
- return msg;
|
|
|
|
- }
|
|
|
|
- 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.update(score,new QueryWrapper<Score>().eq("score_id",score.getScoreId()));
|
|
scoreMapper.update(score,new QueryWrapper<Score>().eq("score_id",score.getScoreId()));
|
|
} else {
|
|
} else {
|
|
|
|
+ User Rater = userMapper.selectById(score.getRaterId());
|
|
|
|
+ score.setRater(Rater.getName());
|
|
|
|
+ if(Rater == null){
|
|
|
|
+ msg.setError("当前打分人身份异常。");
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
|
|
+ Score oldScore = scoreMapper.selectOne(new QueryWrapper<Score>().eq("scoring_year_month", score.getScoringYearMonth()).eq("uid",score.getUid()));
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
now.setDate(Integer.parseInt(parameter.getParamValue()));
|
|
now.setDate(Integer.parseInt(parameter.getParamValue()));
|
|
String thisMonth5 = sdfymd.format(now);
|
|
String thisMonth5 = sdfymd.format(now);
|