|
|
|
|
@ -247,7 +247,7 @@ public class KhPingceController extends BaseController {
|
|
|
|
|
* ids有值 按任务id-----修改所有关联的vote的voteemp数据为原始状态
|
|
|
|
|
*/
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('kaohe:pingce:remove')")
|
|
|
|
|
@Log(title = "任务清除打分数据", businessType = BusinessType.DELETE)
|
|
|
|
|
@Log(title = "任务清除已打分数据", businessType = BusinessType.DELETE)
|
|
|
|
|
@DeleteMapping("/clean")
|
|
|
|
|
@Transactional
|
|
|
|
|
public AjaxResult removeTest(@RequestParam Long[] ids) {
|
|
|
|
|
@ -260,6 +260,12 @@ public class KhPingceController extends BaseController {
|
|
|
|
|
List<Long> vIds = votes.stream().map(KhVote::getId).collect(Collectors.toList());
|
|
|
|
|
//修改voteemp
|
|
|
|
|
for (Long vId : vIds) {
|
|
|
|
|
//修改投票为未统计计算平均分、最终分
|
|
|
|
|
KhVote v = new KhVote();
|
|
|
|
|
v.setId(vId);
|
|
|
|
|
v.setStatistical("0");
|
|
|
|
|
khVoteService.updateKhVote(v);
|
|
|
|
|
|
|
|
|
|
KhVoteEmp vemp = new KhVoteEmp();
|
|
|
|
|
vemp.setVoteId(vId);
|
|
|
|
|
List<KhVoteEmp> vEmps = khVoteEmpService.selectKhVoteEmpList(vemp);
|
|
|
|
|
@ -291,7 +297,8 @@ public class KhPingceController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return toAjax(1);
|
|
|
|
|
} /*else {//null认为清理所有 (已完成删除全部数据,进行中数据清除评分数据)
|
|
|
|
|
}
|
|
|
|
|
/*else {//null认为清理所有 (已完成删除全部数据,进行中数据清除评分数据)
|
|
|
|
|
//已完成的数据直接清除任务及所有关联数据————完全删除已完成任务
|
|
|
|
|
KhPingce khPingce = new KhPingce();
|
|
|
|
|
khPingce.setState("2");
|
|
|
|
|
@ -348,7 +355,6 @@ public class KhPingceController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
AjaxResult.success("按要求清理数据库成功")
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
return AjaxResult.error("请选择需要清理的考核任务!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|