| | |
| | | */ |
| | | package org.springblade.modules.evaluate.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.constant.BladeConstant; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.evaluate.dto.EvaluateTaskDTO; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskEntity; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskExcel; |
| | | import org.springblade.modules.evaluate.service.IEvaluateTaskService; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.evaluate.wrapper.EvaluateTaskWrapper; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.tool.constant.BladeConstant; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | import java.util.Map; |
| | | import java.util.List; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 评优任务表 控制器 |
| | | * |
| | | * @author aix |
| | | * @since 2023-12-08 |
| | | * @since 2024-01-05 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | |
| | | return R.data(EvaluateTaskWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | @GetMapping("/taskList/{deptId}/{userId}") |
| | | public R taskList(@ApiIgnore @PathVariable Long deptId,@ApiIgnore @PathVariable Long userId) { |
| | | QueryWrapper<EvaluateTaskEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.or().like("candidate_num",deptId).or().like("candidate_num",userId); |
| | | List<EvaluateTaskEntity> list = evaluateTaskService.list(wrapper); |
| | | return R.data(EvaluateTaskWrapper.build().listVO(list)); |
| | | } |
| | | |
| | | /** |
| | | * 评优任务表 自定义分页 |
| | | */ |
| | |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入evaluateTask") |
| | | public R save(@Valid @RequestBody EvaluateTaskEntity evaluateTask) { |
| | | return R.status(evaluateTaskService.save(evaluateTask)); |
| | | public R save(@Valid @RequestBody EvaluateTaskDTO dto) { |
| | | return R.status(evaluateTaskService.saveTaskAndCategory(dto)); |
| | | } |
| | | |
| | | /** |