|
@@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.hssx.pcbms.constant.Constant;
|
|
|
-import com.hssx.pcbms.entity.Idea;
|
|
|
-import com.hssx.pcbms.entity.Parameter;
|
|
|
-import com.hssx.pcbms.entity.Score;
|
|
|
-import com.hssx.pcbms.entity.User;
|
|
|
+import com.hssx.pcbms.entity.*;
|
|
|
import com.hssx.pcbms.entity.vo.IdeaVO;
|
|
|
import com.hssx.pcbms.entity.vo.ScoreVO;
|
|
|
import com.hssx.pcbms.mapper.*;
|
|
@@ -43,6 +40,10 @@ public class ScoreServiceImpl extends ServiceImpl<ScoreMapper, Score> implements
|
|
|
private IdeaMapper ideaMapper;
|
|
|
@Resource
|
|
|
private IdeaCommentMapper ideaCommentMapper;
|
|
|
+ @Resource
|
|
|
+ private NewsNoticeMapper newsNoticeMapper;
|
|
|
+ @Resource
|
|
|
+ private NewsNoticeUserMapper newsNoticeUserMapper;
|
|
|
|
|
|
@Override
|
|
|
public HttpRespMsg add(Score score) throws ParseException {
|
|
@@ -129,6 +130,26 @@ public class ScoreServiceImpl extends ServiceImpl<ScoreMapper, Score> implements
|
|
|
return msg;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public HttpRespMsg scoringTaskNotice() {
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
+ //条件通知消息
|
|
|
+ NewsNotice newsNotice = new NewsNotice();
|
|
|
+ newsNotice.setNoticeType(1);
|
|
|
+ String content = Constant.SCORING_NEWS;
|
|
|
+ newsNotice.setContent(content);
|
|
|
+ newsNoticeMapper.insert(newsNotice);
|
|
|
+ List<User> users = userMapper.selectLeaderUsersListByCondition();
|
|
|
+ //通知所有领导
|
|
|
+ for (User user : users) {
|
|
|
+ NewsNoticeUser noticeUser = new NewsNoticeUser();
|
|
|
+ noticeUser.setNewsId(newsNotice.getId());
|
|
|
+ noticeUser.setUserId(user.getId());
|
|
|
+ newsNoticeUserMapper.insert(noticeUser);
|
|
|
+ }
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+
|
|
|
private HttpRespMsg addScore(Date yearMonth, Date nowDate, Integer type, Score score,Score oldScore) {
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
//评分上个月
|