|
|
|
|
@ -3,12 +3,9 @@ package com.ruoyi.kaohe.controller;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import com.ruoyi.kaohe.domain.KhPcEmp;
|
|
|
|
|
import com.ruoyi.kaohe.domain.KhPingce;
|
|
|
|
|
import com.ruoyi.kaohe.domain.KhVoteEmp;
|
|
|
|
|
import com.ruoyi.kaohe.service.IKhPcEmpService;
|
|
|
|
|
import com.ruoyi.kaohe.service.IKhPingceService;
|
|
|
|
|
import com.ruoyi.kaohe.service.IKhVoteEmpService;
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.kaohe.domain.*;
|
|
|
|
|
import com.ruoyi.kaohe.service.*;
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
@ -26,8 +23,6 @@ import com.ruoyi.common.annotation.Log;
|
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
|
|
import com.ruoyi.kaohe.domain.KhVote;
|
|
|
|
|
import com.ruoyi.kaohe.service.IKhVoteService;
|
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
|
|
|
|
|
|
@ -48,6 +43,8 @@ public class KhVoteController extends BaseController {
|
|
|
|
|
private IKhVoteEmpService voteEmpService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private IKhPingceService khPingceService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private IKhTemItemService khTemItemService;
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 * * * * ?") // 每分钟的第0秒执行一次 监测时间修改评分状态
|
|
|
|
|
public void performTask() {
|
|
|
|
|
@ -78,9 +75,15 @@ public class KhVoteController extends BaseController {
|
|
|
|
|
List<KhPingce> pingces = khPingceService.selectKhPingceList(param);
|
|
|
|
|
for (KhPingce pingce : pingces) {
|
|
|
|
|
boolean finishflag=true;
|
|
|
|
|
//查询考核任务下面有几个考核项
|
|
|
|
|
KhTemItem temItem = new KhTemItem();
|
|
|
|
|
temItem.setTemId(pingce.getTemplateId());
|
|
|
|
|
int itemNo = khTemItemService.selectKhTemItemList(temItem).size();
|
|
|
|
|
//查询考核任务已有评测任务
|
|
|
|
|
KhVote khVote = new KhVote();
|
|
|
|
|
khVote.setPingceId(pingce.getId());
|
|
|
|
|
List<KhVote> khVotes = khVoteService.selectKhVoteList(khVote);
|
|
|
|
|
if(khVotes.size()==itemNo){ //任务下所有考核项都已经发布
|
|
|
|
|
for (KhVote vote : khVotes) {
|
|
|
|
|
if(!vote.getState().equals("2")){
|
|
|
|
|
finishflag=false;
|
|
|
|
|
@ -95,6 +98,8 @@ public class KhVoteController extends BaseController {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询投票评测列表
|
|
|
|
|
*/
|
|
|
|
|
|