10 files modified
1 files deleted
20 files added
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | 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 lombok.AllArgsConstructor; |
| | | 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.entity.EvaluateTaskCategoryCandidateEntity; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskCategoryCandidateExcel; |
| | | import org.springblade.modules.evaluate.service.IEvaluateTaskCategoryCandidateService; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskCategoryCandidateVO; |
| | | import org.springblade.modules.evaluate.wrapper.EvaluateTaskCategoryCandidateWrapper; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 控制器 |
| | | * |
| | | * @author aix |
| | | * @since 2024-01-05 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("evaluate/evaluateTaskCategoryCandidate") |
| | | @Api(value = "评优任务任务类别候选人表", tags = "评优任务任务类别候选人表接口") |
| | | public class EvaluateTaskCategoryCandidateController extends BladeController { |
| | | |
| | | private final IEvaluateTaskCategoryCandidateService evaluateTaskCategoryCandidateService; |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入evaluateTaskCategoryCandidate") |
| | | public R<EvaluateTaskCategoryCandidateVO> detail(EvaluateTaskCategoryCandidateEntity evaluateTaskCategoryCandidate) { |
| | | EvaluateTaskCategoryCandidateEntity detail = evaluateTaskCategoryCandidateService.getOne(Condition.getQueryWrapper(evaluateTaskCategoryCandidate)); |
| | | return R.data(EvaluateTaskCategoryCandidateWrapper.build().entityVO(detail)); |
| | | } |
| | | /** |
| | | * 评优任务任务类别候选人表 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入evaluateTaskCategoryCandidate") |
| | | public R<IPage<EvaluateTaskCategoryCandidateVO>> list(@ApiIgnore @RequestParam Map<String, Object> evaluateTaskCategoryCandidate, Query query) { |
| | | IPage<EvaluateTaskCategoryCandidateEntity> pages = evaluateTaskCategoryCandidateService.page(Condition.getPage(query), Condition.getQueryWrapper(evaluateTaskCategoryCandidate, EvaluateTaskCategoryCandidateEntity.class)); |
| | | return R.data(EvaluateTaskCategoryCandidateWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入evaluateTaskCategoryCandidate") |
| | | public R<IPage<EvaluateTaskCategoryCandidateVO>> page(EvaluateTaskCategoryCandidateVO evaluateTaskCategoryCandidate, Query query) { |
| | | IPage<EvaluateTaskCategoryCandidateVO> pages = evaluateTaskCategoryCandidateService.selectEvaluateTaskCategoryCandidatePage(Condition.getPage(query), evaluateTaskCategoryCandidate); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入evaluateTaskCategoryCandidate") |
| | | public R save(@Valid @RequestBody EvaluateTaskCategoryCandidateEntity evaluateTaskCategoryCandidate) { |
| | | return R.status(evaluateTaskCategoryCandidateService.save(evaluateTaskCategoryCandidate)); |
| | | } |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入evaluateTaskCategoryCandidate") |
| | | public R update(@Valid @RequestBody EvaluateTaskCategoryCandidateEntity evaluateTaskCategoryCandidate) { |
| | | return R.status(evaluateTaskCategoryCandidateService.updateById(evaluateTaskCategoryCandidate)); |
| | | } |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入evaluateTaskCategoryCandidate") |
| | | public R submit(@Valid @RequestBody EvaluateTaskCategoryCandidateEntity evaluateTaskCategoryCandidate) { |
| | | return R.status(evaluateTaskCategoryCandidateService.saveOrUpdate(evaluateTaskCategoryCandidate)); |
| | | } |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(evaluateTaskCategoryCandidateService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出数据 |
| | | */ |
| | | @GetMapping("/export-evaluateTaskCategoryCandidate") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiOperation(value = "导出数据", notes = "传入evaluateTaskCategoryCandidate") |
| | | public void exportEvaluateTaskCategoryCandidate(@ApiIgnore @RequestParam Map<String, Object> evaluateTaskCategoryCandidate, BladeUser bladeUser, HttpServletResponse response) { |
| | | QueryWrapper<EvaluateTaskCategoryCandidateEntity> queryWrapper = Condition.getQueryWrapper(evaluateTaskCategoryCandidate, EvaluateTaskCategoryCandidateEntity.class); |
| | | //if (!AuthUtil.isAdministrator()) { |
| | | // queryWrapper.lambda().eq(EvaluateTaskCategoryCandidate::getTenantId, bladeUser.getTenantId()); |
| | | //} |
| | | queryWrapper.lambda().eq(EvaluateTaskCategoryCandidateEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
| | | List<EvaluateTaskCategoryCandidateExcel> list = evaluateTaskCategoryCandidateService.exportEvaluateTaskCategoryCandidate(queryWrapper); |
| | | ExcelUtil.export(response, "评优任务任务类别候选人表数据" + DateUtil.time(), "评优任务任务类别候选人表数据表", list, EvaluateTaskCategoryCandidateExcel.class); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | 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 lombok.AllArgsConstructor; |
| | | 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.entity.EvaluateTaskCategoryEntity; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskCategoryExcel; |
| | | import org.springblade.modules.evaluate.service.IEvaluateTaskCategoryService; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskCategoryVO; |
| | | import org.springblade.modules.evaluate.wrapper.EvaluateTaskCategoryWrapper; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 评优任务类别 控制器 |
| | | * |
| | | * @author Aix |
| | | * @since 2024-01-05 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("evaluate/evaluateTaskCategory") |
| | | @Api(value = "评优任务类别", tags = "评优任务类别接口") |
| | | public class EvaluateTaskCategoryController extends BladeController { |
| | | |
| | | private final IEvaluateTaskCategoryService evaluateTaskCategoryService; |
| | | |
| | | /** |
| | | * 评优任务类别 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入evaluateTaskCategory") |
| | | public R<EvaluateTaskCategoryVO> detail(EvaluateTaskCategoryEntity evaluateTaskCategory) { |
| | | EvaluateTaskCategoryEntity detail = evaluateTaskCategoryService.getOne(Condition.getQueryWrapper(evaluateTaskCategory)); |
| | | return R.data(EvaluateTaskCategoryWrapper.build().entityVO(detail)); |
| | | } |
| | | /** |
| | | * 评优任务类别 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入evaluateTaskCategory") |
| | | public R<IPage<EvaluateTaskCategoryVO>> list(@ApiIgnore @RequestParam Map<String, Object> evaluateTaskCategory, Query query) { |
| | | IPage<EvaluateTaskCategoryEntity> pages = evaluateTaskCategoryService.page(Condition.getPage(query), Condition.getQueryWrapper(evaluateTaskCategory, EvaluateTaskCategoryEntity.class)); |
| | | return R.data(EvaluateTaskCategoryWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 评优任务类别 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入evaluateTaskCategory") |
| | | public R<IPage<EvaluateTaskCategoryVO>> page(EvaluateTaskCategoryVO evaluateTaskCategory, Query query) { |
| | | IPage<EvaluateTaskCategoryVO> pages = evaluateTaskCategoryService.selectEvaluateTaskCategoryPage(Condition.getPage(query), evaluateTaskCategory); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 评优任务类别 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入evaluateTaskCategory") |
| | | public R save(@Valid @RequestBody EvaluateTaskCategoryEntity evaluateTaskCategory) { |
| | | return R.status(evaluateTaskCategoryService.save(evaluateTaskCategory)); |
| | | } |
| | | |
| | | /** |
| | | * 评优任务类别 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入evaluateTaskCategory") |
| | | public R update(@Valid @RequestBody EvaluateTaskCategoryEntity evaluateTaskCategory) { |
| | | return R.status(evaluateTaskCategoryService.updateById(evaluateTaskCategory)); |
| | | } |
| | | |
| | | /** |
| | | * 评优任务类别 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入evaluateTaskCategory") |
| | | public R submit(@Valid @RequestBody EvaluateTaskCategoryEntity evaluateTaskCategory) { |
| | | return R.status(evaluateTaskCategoryService.saveOrUpdate(evaluateTaskCategory)); |
| | | } |
| | | |
| | | /** |
| | | * 评优任务类别 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(evaluateTaskCategoryService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出数据 |
| | | */ |
| | | @GetMapping("/export-evaluateTaskCategory") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiOperation(value = "导出数据", notes = "传入evaluateTaskCategory") |
| | | public void exportEvaluateTaskCategory(@ApiIgnore @RequestParam Map<String, Object> evaluateTaskCategory, BladeUser bladeUser, HttpServletResponse response) { |
| | | QueryWrapper<EvaluateTaskCategoryEntity> queryWrapper = Condition.getQueryWrapper(evaluateTaskCategory, EvaluateTaskCategoryEntity.class); |
| | | //if (!AuthUtil.isAdministrator()) { |
| | | // queryWrapper.lambda().eq(EvaluateTaskCategory::getTenantId, bladeUser.getTenantId()); |
| | | //} |
| | | queryWrapper.lambda().eq(EvaluateTaskCategoryEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
| | | List<EvaluateTaskCategoryExcel> list = evaluateTaskCategoryService.exportEvaluateTaskCategory(queryWrapper); |
| | | ExcelUtil.export(response, "评优任务类别数据" + DateUtil.time(), "评优任务类别数据表", list, EvaluateTaskCategoryExcel.class); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.evaluate.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | 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.assessment.wrapper.CandidateJsonObj; |
| | | import org.springblade.modules.evaluate.entity.EvaluateResultEntity; |
| | | 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.IEvaluateResultService; |
| | | import org.springblade.modules.evaluate.service.IEvaluateTaskService; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskVO; |
| | | import org.springblade.modules.evaluate.wrapper.EvaluateResultWrapper; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | 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 java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | 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 |
| | |
| | | public class EvaluateTaskController extends BladeController { |
| | | |
| | | private final IEvaluateTaskService evaluateTaskService; |
| | | private final IUserService userService; |
| | | |
| | | private final IEvaluateResultService evaluateResultService; |
| | | |
| | | /** |
| | | * 评优任务表 详情 |
| | |
| | | return R.data(EvaluateTaskWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 评优任务表 自定义分页 |
| | | */ |
| | |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入evaluateTask") |
| | | public R save(@Valid @RequestBody EvaluateTaskVO vo) { |
| | | return R.status(evaluateTaskService.save(vo)); |
| | | public R save(@Valid @RequestBody EvaluateTaskDTO dto) { |
| | | return R.status(evaluateTaskService.saveTaskAndCategory(dto)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入evaluateTask") |
| | | public R update(@Valid @RequestBody EvaluateTaskVO vo) { |
| | | return R.status(evaluateTaskService.updateById(vo)); |
| | | public R update(@Valid @RequestBody EvaluateTaskEntity evaluateTask) { |
| | | return R.status(evaluateTaskService.updateById(evaluateTask)); |
| | | } |
| | | |
| | | /** |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.dto; |
| | | |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryCandidateEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 数据传输对象实体类 |
| | | * |
| | | * @author aix |
| | | * @since 2024-01-05 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class EvaluateTaskCategoryCandidateDTO extends EvaluateTaskCategoryCandidateEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.dto; |
| | | |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 评优任务类别 数据传输对象实体类 |
| | | * |
| | | * @author Aix |
| | | * @since 2024-01-04 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class EvaluateTaskCategoryDTO extends EvaluateTaskCategoryEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.evaluate.dto; |
| | | |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryEntity; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 评优任务表 数据传输对象实体类 |
| | | * |
| | | * @author aix |
| | | * @since 2023-12-08 |
| | | * @since 2024-01-05 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class EvaluateTaskDTO extends EvaluateTaskEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | List<EvaluateTaskCategoryEntity> categoryEntities; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.core.tenant.mp.TenantEntity; |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 实体类 |
| | | * |
| | | * @author aix |
| | | * @since 2024-01-05 |
| | | */ |
| | | @Data |
| | | @TableName("yw_evaluate_task_category_candidate") |
| | | @ApiModel(value = "EvaluateTaskCategoryCandidate对象", description = "评优任务任务类别候选人表") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class EvaluateTaskCategoryCandidateEntity extends TenantEntity { |
| | | |
| | | /** |
| | | * 评优任务类别 |
| | | */ |
| | | @ApiModelProperty(value = "评优任务类别") |
| | | private Long evaluateTaskCategoryId; |
| | | /** |
| | | * 候选人id |
| | | */ |
| | | @ApiModelProperty(value = "候选人id") |
| | | private Long userId; |
| | | /** |
| | | * 候选人名称 |
| | | */ |
| | | @ApiModelProperty(value = "候选人名称") |
| | | private String userName; |
| | | /** |
| | | * 候选人部门id |
| | | */ |
| | | @ApiModelProperty(value = "候选人部门id") |
| | | private Long deptId; |
| | | /** |
| | | * 候选人部门名称 |
| | | */ |
| | | @ApiModelProperty(value = "候选人部门名称") |
| | | private String deptName; |
| | | /** |
| | | * 候选人职位名称 |
| | | */ |
| | | @ApiModelProperty(value = "候选人职位名称") |
| | | private String postName; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.core.tenant.mp.TenantEntity; |
| | | |
| | | /** |
| | | * 评优任务类别 实体类 |
| | | * |
| | | * @author Aix |
| | | * @since 2024-01-04 |
| | | */ |
| | | @Data |
| | | @TableName("yw_evaluate_task_category") |
| | | @ApiModel(value = "EvaluateTaskCategory对象", description = "评优任务类别") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class EvaluateTaskCategoryEntity extends TenantEntity { |
| | | |
| | | /** |
| | | * 任务id |
| | | */ |
| | | @ApiModelProperty(value = "任务id") |
| | | private Long evaluateTaskId; |
| | | /** |
| | | * 类别名称 |
| | | */ |
| | | @ApiModelProperty(value = "类别名称") |
| | | private String categoryName; |
| | | /** |
| | | * 认定标准 |
| | | */ |
| | | @ApiModelProperty(value = "认定标准") |
| | | private String standard; |
| | | /** |
| | | * 名额 |
| | | */ |
| | | @ApiModelProperty(value = "名额") |
| | | private Integer peopleNum; |
| | | |
| | | } |
| | |
| | | package org.springblade.modules.evaluate.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.core.tenant.mp.TenantEntity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 评优任务表 实体类 |
| | | * |
| | | * @author aix |
| | | * @since 2023-12-08 |
| | | * @since 2024-01-05 |
| | | */ |
| | | @Data |
| | | @TableName(value = "yw_evaluate_task", autoResultMap = true) |
| | | @TableName("yw_evaluate_task") |
| | | @ApiModel(value = "EvaluateTask对象", description = "评优任务表") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class EvaluateTaskEntity extends TenantEntity { |
| | |
| | | /** |
| | | * 评优类型(0:员工评优,1:部门评优) |
| | | */ |
| | | @ApiModelProperty(value = "评优类型") |
| | | @ApiModelProperty(value = "评优类型(0:员工评优,1:部门评优)") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 任务名称 |
| | | */ |
| | | @ApiModelProperty(value = "任务名称") |
| | | private String taskName; |
| | | /** |
| | | * 任务类别 |
| | | * 第一轮开始日期 |
| | | */ |
| | | @ApiModelProperty(value = "任务类别") |
| | | private String taskType; |
| | | /** |
| | | * 认定标准描述 |
| | | */ |
| | | @ApiModelProperty(value = "认定标准描述") |
| | | private String remark; |
| | | /** |
| | | * 候选人数量 |
| | | */ |
| | | @ApiModelProperty(value = "候选人数量") |
| | | private Integer candidateNum; |
| | | /** |
| | | * 候选人截止日期 |
| | | */ |
| | | @ApiModelProperty(value = "候选人评选开始日期") |
| | | @ApiModelProperty(value = "第一轮开始日期") |
| | | private Date candidateCutoffTimeStart; |
| | | |
| | | @ApiModelProperty(value = "候选人评选开始截止日期") |
| | | /** |
| | | * 第一轮结束日期 |
| | | */ |
| | | @ApiModelProperty(value = "第一轮结束日期") |
| | | private Date candidateCutoffTimeEnd; |
| | | /** |
| | | * 候选人状态 |
| | | * 候选人状态(2已结束/1进行中) |
| | | */ |
| | | @ApiModelProperty(value = "候选人状态") |
| | | @ApiModelProperty(value = "候选人状态(2已结束/1进行中)") |
| | | private Integer candidateState; |
| | | |
| | | @ApiModelProperty(value = "是否第二波") |
| | | private Integer isAgain; |
| | | /** |
| | | * 评优数量 |
| | | * 投票人员(多个用,分开) |
| | | */ |
| | | @ApiModelProperty(value = "评优数量") |
| | | private Integer evaluateNum; |
| | | @ApiModelProperty(value = "投票人员(多个用,分开)") |
| | | private String pollingPersons; |
| | | /** |
| | | * 最终截止日期 |
| | | * 第二轮开始日期 |
| | | */ |
| | | @ApiModelProperty(value = "最终评选开始日期") |
| | | @ApiModelProperty(value = "第二轮开始日期") |
| | | private Date evaluateCutoffTimeStart; |
| | | |
| | | @ApiModelProperty(value = "最终评选结束日期") |
| | | /** |
| | | * 第二轮结束日期 |
| | | */ |
| | | @ApiModelProperty(value = "第二轮结束日期") |
| | | private Date evaluateCutoffTimeEnd; |
| | | /** |
| | | * 评优评选状态 |
| | | * 评优评选状态(1进行中/0未开始) |
| | | */ |
| | | @ApiModelProperty(value = "评优评选状态") |
| | | @ApiModelProperty(value = "评优评选状态(1进行中/0未开始)") |
| | | private Integer evaluateState; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.excel; |
| | | |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 Excel实体类 |
| | | * |
| | | * @author aix |
| | | * @since 2024-01-05 |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class EvaluateTaskCategoryCandidateExcel implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 租户ID |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("租户ID") |
| | | private String tenantId; |
| | | /** |
| | | * 评优任务类别 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("评优任务类别") |
| | | private Long evaluateTaskCategoryId; |
| | | /** |
| | | * 候选人id |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("候选人id") |
| | | private Long userId; |
| | | /** |
| | | * 候选人名称 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("候选人名称") |
| | | private String userName; |
| | | /** |
| | | * 候选人部门id |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("候选人部门id") |
| | | private Long deptId; |
| | | /** |
| | | * 候选人部门名称 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("候选人部门名称") |
| | | private String deptName; |
| | | /** |
| | | * 候选人职位名称 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("候选人职位名称") |
| | | private String postName; |
| | | /** |
| | | * 是否已删除 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("是否已删除") |
| | | private Integer isDeleted; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.excel; |
| | | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import java.io.Serializable; |
| | | |
| | | |
| | | /** |
| | | * 评优任务类别 Excel实体类 |
| | | * |
| | | * @author Aix |
| | | * @since 2024-01-04 |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class EvaluateTaskCategoryExcel implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 租户ID |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("租户ID") |
| | | private String tenantId; |
| | | /** |
| | | * 任务id |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("任务id") |
| | | private Integer evaluateTaskId; |
| | | /** |
| | | * 类别名称 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("类别名称") |
| | | private String categoryName; |
| | | /** |
| | | * 认定标准 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("认定标准") |
| | | private String standard; |
| | | /** |
| | | * 名额 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("名额") |
| | | private Integer peopleNum; |
| | | /** |
| | | * 是否已删除 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("是否已删除") |
| | | private Integer isDeleted; |
| | | |
| | | } |
| | |
| | | package org.springblade.modules.evaluate.excel; |
| | | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * 评优任务表 Excel实体类 |
| | | * |
| | | * @author aix |
| | | * @since 2023-12-08 |
| | | * @since 2024-01-05 |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | |
| | | @ExcelProperty("租户ID") |
| | | private String tenantId; |
| | | /** |
| | | * 评优类型(0:员工评优,1:部门评优) |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("评优类型(0:员工评优,1:部门评优)") |
| | | private Integer type; |
| | | /** |
| | | * 任务名称 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("任务名称") |
| | | private String taskName; |
| | | /** |
| | | * 任务类别 |
| | | * 第一轮开始日期 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("任务类别") |
| | | private String taskType; |
| | | @ExcelProperty("第一轮开始日期") |
| | | private Date candidateCutoffTimeStart; |
| | | /** |
| | | * 认定标准描述 |
| | | * 第一轮结束日期 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("认定标准描述") |
| | | private String remark; |
| | | @ExcelProperty("第一轮结束日期") |
| | | private Date candidateCutoffTimeEnd; |
| | | /** |
| | | * 候选人数量 |
| | | * 候选人状态(2已结束/1进行中) |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("候选人数量") |
| | | private String candidateNum; |
| | | /** |
| | | * 候选人截止日期 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("候选人截止日期") |
| | | private Date candidateCutoffTime; |
| | | /** |
| | | * 候选人状态 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("候选人状态") |
| | | @ExcelProperty("候选人状态(2已结束/1进行中)") |
| | | private Integer candidateState; |
| | | /** |
| | | * 评优数量 |
| | | * 投票人员(多个用,分开) |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("评优数量") |
| | | private Integer evaluateNum; |
| | | @ExcelProperty("投票人员(多个用,分开)") |
| | | private String pollingPersons; |
| | | /** |
| | | * 候选人截止日期 |
| | | * 第二轮开始日期 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("候选人截止日期") |
| | | private Date evaluateCutoffTime; |
| | | @ExcelProperty("第二轮开始日期") |
| | | private Date evaluateCutoffTimeStart; |
| | | /** |
| | | * 评优评选状态 |
| | | * 第二轮结束日期 |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("评优评选状态") |
| | | @ExcelProperty("第二轮结束日期") |
| | | private Date evaluateCutoffTimeEnd; |
| | | /** |
| | | * 评优评选状态(1进行中/0未开始) |
| | | */ |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("评优评选状态(1进行中/0未开始)") |
| | | private Integer evaluateState; |
| | | /** |
| | | * 是否已删除 |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.mapper; |
| | | |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryCandidateEntity; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskCategoryCandidateVO; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskCategoryCandidateExcel; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 Mapper 接口 |
| | | * |
| | | * @author aix |
| | | * @since 2024-01-05 |
| | | */ |
| | | public interface EvaluateTaskCategoryCandidateMapper extends BaseMapper<EvaluateTaskCategoryCandidateEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param evaluateTaskCategoryCandidate |
| | | * @return |
| | | */ |
| | | List<EvaluateTaskCategoryCandidateVO> selectEvaluateTaskCategoryCandidatePage(IPage page, EvaluateTaskCategoryCandidateVO evaluateTaskCategoryCandidate); |
| | | |
| | | |
| | | /** |
| | | * 获取导出数据 |
| | | * |
| | | * @param queryWrapper |
| | | * @return |
| | | */ |
| | | List<EvaluateTaskCategoryCandidateExcel> exportEvaluateTaskCategoryCandidate(@Param("ew") Wrapper<EvaluateTaskCategoryCandidateEntity> queryWrapper); |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.springblade.modules.evaluate.mapper.EvaluateTaskCategoryCandidateMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="evaluateTaskCategoryCandidateResultMap" type="org.springblade.modules.evaluate.entity.EvaluateTaskCategoryCandidateEntity"> |
| | | <result column="id" property="id"/> |
| | | <result column="tenant_id" property="tenantId"/> |
| | | <result column="evaluate_task_category_id" property="evaluateTaskCategoryId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="user_name" property="userName"/> |
| | | <result column="dept_id" property="deptId"/> |
| | | <result column="dept_name" property="deptName"/> |
| | | <result column="post_name" property="postName"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="create_dept" property="createDept"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="status" property="status"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectEvaluateTaskCategoryCandidatePage" resultMap="evaluateTaskCategoryCandidateResultMap"> |
| | | select * from yw_evaluate_task_category_candidate where is_deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="exportEvaluateTaskCategoryCandidate" resultType="org.springblade.modules.evaluate.excel.EvaluateTaskCategoryCandidateExcel"> |
| | | SELECT * FROM yw_evaluate_task_category_candidate ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.mapper; |
| | | |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryEntity; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskCategoryVO; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskCategoryExcel; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 评优任务类别 Mapper 接口 |
| | | * |
| | | * @author Aix |
| | | * @since 2024-01-04 |
| | | */ |
| | | public interface EvaluateTaskCategoryMapper extends BaseMapper<EvaluateTaskCategoryEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param evaluateTaskCategory |
| | | * @return |
| | | */ |
| | | List<EvaluateTaskCategoryVO> selectEvaluateTaskCategoryPage(IPage page, EvaluateTaskCategoryVO evaluateTaskCategory); |
| | | |
| | | |
| | | /** |
| | | * 获取导出数据 |
| | | * |
| | | * @param queryWrapper |
| | | * @return |
| | | */ |
| | | List<EvaluateTaskCategoryExcel> exportEvaluateTaskCategory(@Param("ew") Wrapper<EvaluateTaskCategoryEntity> queryWrapper); |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.springblade.modules.evaluate.mapper.EvaluateTaskCategoryMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="evaluateTaskCategoryResultMap" type="org.springblade.modules.evaluate.entity.EvaluateTaskCategoryEntity"> |
| | | <result column="id" property="id"/> |
| | | <result column="tenant_id" property="tenantId"/> |
| | | <result column="evaluate_task_id" property="evaluateTaskId"/> |
| | | <result column="category_name" property="categoryName"/> |
| | | <result column="standard" property="standard"/> |
| | | <result column="people_num" property="peopleNum"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="create_dept" property="createDept"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="status" property="status"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectEvaluateTaskCategoryPage" resultMap="evaluateTaskCategoryResultMap"> |
| | | select * from yw_evaluate_task_category where is_deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="exportEvaluateTaskCategory" resultType="org.springblade.modules.evaluate.excel.EvaluateTaskCategoryExcel"> |
| | | SELECT * FROM yw_evaluate_task_category ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 评优任务表 Mapper 接口 |
| | | * |
| | | * @author aix |
| | | * @since 2023-12-08 |
| | | * @since 2024-01-05 |
| | | */ |
| | | public interface EvaluateTaskMapper extends BaseMapper<EvaluateTaskEntity> { |
| | | |
| | |
| | | <resultMap id="evaluateTaskResultMap" type="org.springblade.modules.evaluate.entity.EvaluateTaskEntity"> |
| | | <result column="id" property="id"/> |
| | | <result column="tenant_id" property="tenantId"/> |
| | | <result column="type" property="type"/> |
| | | <result column="task_name" property="taskName"/> |
| | | <result column="task_type" property="taskType"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="candidate_num" property="candidateNum"/> |
| | | <result column="candidate_cutoff_time_start" property="candidateCutoffTimeStart"/> |
| | | <result column="candidate_cutoff_time_end" property="candidateCutoffTimeEnd"/> |
| | | <result column="candidate_state" property="candidateState"/> |
| | | <result column="is_again" property="isAgain"/> |
| | | <result column="evaluate_num" property="evaluateNum"/> |
| | | <result column="polling_persons" property="pollingPersons"/> |
| | | <result column="evaluate_cutoff_time_start" property="evaluateCutoffTimeStart"/> |
| | | <result column="evaluate_cutoff_time_end" property="evaluateCutoffTimeEnd"/> |
| | | <result column="evaluate_state" property="evaluateState"/> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryCandidateEntity; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskCategoryCandidateVO; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskCategoryCandidateExcel; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 服务类 |
| | | * |
| | | * @author aix |
| | | * @since 2024-01-05 |
| | | */ |
| | | public interface IEvaluateTaskCategoryCandidateService extends BaseService<EvaluateTaskCategoryCandidateEntity> { |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param evaluateTaskCategoryCandidate |
| | | * @return |
| | | */ |
| | | IPage<EvaluateTaskCategoryCandidateVO> selectEvaluateTaskCategoryCandidatePage(IPage<EvaluateTaskCategoryCandidateVO> page, EvaluateTaskCategoryCandidateVO evaluateTaskCategoryCandidate); |
| | | |
| | | |
| | | /** |
| | | * 导出数据 |
| | | * |
| | | * @param queryWrapper |
| | | * @return |
| | | */ |
| | | List<EvaluateTaskCategoryCandidateExcel> exportEvaluateTaskCategoryCandidate(Wrapper<EvaluateTaskCategoryCandidateEntity> queryWrapper); |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryEntity; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskCategoryVO; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskCategoryExcel; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 评优任务类别 服务类 |
| | | * |
| | | * @author Aix |
| | | * @since 2024-01-04 |
| | | */ |
| | | public interface IEvaluateTaskCategoryService extends BaseService<EvaluateTaskCategoryEntity> { |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param evaluateTaskCategory |
| | | * @return |
| | | */ |
| | | IPage<EvaluateTaskCategoryVO> selectEvaluateTaskCategoryPage(IPage<EvaluateTaskCategoryVO> page, EvaluateTaskCategoryVO evaluateTaskCategory); |
| | | |
| | | |
| | | /** |
| | | * 导出数据 |
| | | * |
| | | * @param queryWrapper |
| | | * @return |
| | | */ |
| | | List<EvaluateTaskCategoryExcel> exportEvaluateTaskCategory(Wrapper<EvaluateTaskCategoryEntity> queryWrapper); |
| | | |
| | | } |
| | |
| | | package org.springblade.modules.evaluate.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import org.springblade.modules.evaluate.dto.EvaluateTaskDTO; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskEntity; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskVO; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskExcel; |
| | |
| | | * 评优任务表 服务类 |
| | | * |
| | | * @author aix |
| | | * @since 2023-12-08 |
| | | * @since 2024-01-05 |
| | | */ |
| | | public interface IEvaluateTaskService extends BaseService<EvaluateTaskEntity> { |
| | | |
| | | boolean save(EvaluateTaskVO vo); |
| | | |
| | | boolean updateById(EvaluateTaskVO vo); |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | |
| | | */ |
| | | IPage<EvaluateTaskVO> selectEvaluateTaskPage(IPage<EvaluateTaskVO> page, EvaluateTaskVO evaluateTask); |
| | | |
| | | Boolean saveTaskAndCategory(EvaluateTaskDTO dto); |
| | | |
| | | Boolean updateTaskAndCategory(EvaluateTaskDTO dto); |
| | | |
| | | |
| | | /** |
| | | * 导出数据 |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.service.impl; |
| | | |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryCandidateEntity; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskCategoryCandidateVO; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskCategoryCandidateExcel; |
| | | import org.springblade.modules.evaluate.mapper.EvaluateTaskCategoryCandidateMapper; |
| | | import org.springblade.modules.evaluate.service.IEvaluateTaskCategoryCandidateService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 服务实现类 |
| | | * |
| | | * @author aix |
| | | * @since 2024-01-05 |
| | | */ |
| | | @Service |
| | | public class EvaluateTaskCategoryCandidateServiceImpl extends BaseServiceImpl<EvaluateTaskCategoryCandidateMapper, EvaluateTaskCategoryCandidateEntity> implements IEvaluateTaskCategoryCandidateService { |
| | | |
| | | @Override |
| | | public IPage<EvaluateTaskCategoryCandidateVO> selectEvaluateTaskCategoryCandidatePage(IPage<EvaluateTaskCategoryCandidateVO> page, EvaluateTaskCategoryCandidateVO evaluateTaskCategoryCandidate) { |
| | | return page.setRecords(baseMapper.selectEvaluateTaskCategoryCandidatePage(page, evaluateTaskCategoryCandidate)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<EvaluateTaskCategoryCandidateExcel> exportEvaluateTaskCategoryCandidate(Wrapper<EvaluateTaskCategoryCandidateEntity> queryWrapper) { |
| | | List<EvaluateTaskCategoryCandidateExcel> evaluateTaskCategoryCandidateList = baseMapper.exportEvaluateTaskCategoryCandidate(queryWrapper); |
| | | //evaluateTaskCategoryCandidateList.forEach(evaluateTaskCategoryCandidate -> { |
| | | // evaluateTaskCategoryCandidate.setTypeName(DictCache.getValue(DictEnum.YES_NO, EvaluateTaskCategoryCandidate.getType())); |
| | | //}); |
| | | return evaluateTaskCategoryCandidateList; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.service.impl; |
| | | |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryEntity; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskCategoryVO; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskCategoryExcel; |
| | | import org.springblade.modules.evaluate.mapper.EvaluateTaskCategoryMapper; |
| | | import org.springblade.modules.evaluate.service.IEvaluateTaskCategoryService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 评优任务类别 服务实现类 |
| | | * |
| | | * @author Aix |
| | | * @since 2024-01-04 |
| | | */ |
| | | @Service |
| | | public class EvaluateTaskCategoryServiceImpl extends BaseServiceImpl<EvaluateTaskCategoryMapper, EvaluateTaskCategoryEntity> implements IEvaluateTaskCategoryService { |
| | | |
| | | @Override |
| | | public IPage<EvaluateTaskCategoryVO> selectEvaluateTaskCategoryPage(IPage<EvaluateTaskCategoryVO> page, EvaluateTaskCategoryVO evaluateTaskCategory) { |
| | | return page.setRecords(baseMapper.selectEvaluateTaskCategoryPage(page, evaluateTaskCategory)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<EvaluateTaskCategoryExcel> exportEvaluateTaskCategory(Wrapper<EvaluateTaskCategoryEntity> queryWrapper) { |
| | | List<EvaluateTaskCategoryExcel> evaluateTaskCategoryList = baseMapper.exportEvaluateTaskCategory(queryWrapper); |
| | | //evaluateTaskCategoryList.forEach(evaluateTaskCategory -> { |
| | | // evaluateTaskCategory.setTypeName(DictCache.getValue(DictEnum.YES_NO, EvaluateTaskCategory.getType())); |
| | | //}); |
| | | return evaluateTaskCategoryList; |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.evaluate.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskEntity; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskSetEntity; |
| | | import org.springblade.modules.evaluate.service.IEvaluateCandidateService; |
| | | import org.springblade.modules.evaluate.service.IEvaluateTaskSetService; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskVO; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskExcel; |
| | | import org.springblade.modules.evaluate.mapper.EvaluateTaskMapper; |
| | | import org.springblade.modules.evaluate.service.IEvaluateTaskService; |
| | | import org.springblade.modules.evaluate.wrapper.EvaluateCandidateWrapper; |
| | | import org.springblade.modules.evaluate.wrapper.EvaluateTaskWrapper; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.modules.evaluate.dto.EvaluateTaskDTO; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryEntity; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskEntity; |
| | | import org.springblade.modules.evaluate.excel.EvaluateTaskExcel; |
| | | import org.springblade.modules.evaluate.mapper.EvaluateTaskMapper; |
| | | import org.springblade.modules.evaluate.service.IEvaluateTaskCategoryService; |
| | | import org.springblade.modules.evaluate.service.IEvaluateTaskService; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskVO; |
| | | import org.springblade.modules.evaluate.wrapper.EvaluateTaskWrapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 评优任务表 服务实现类 |
| | | * |
| | | * @author aix |
| | | * @since 2023-12-08 |
| | | * @since 2024-01-05 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class EvaluateTaskServiceImpl extends BaseServiceImpl<EvaluateTaskMapper, EvaluateTaskEntity> implements IEvaluateTaskService { |
| | | |
| | | private final IEvaluateTaskSetService evaluateTaskSetService; |
| | | private final IUserService userService; |
| | | |
| | | private final IDeptService deptService; |
| | | |
| | | private final IEvaluateCandidateService evaluateCandidateService; |
| | | |
| | | @Override |
| | | @Transactional |
| | | public boolean save(EvaluateTaskVO vo) { |
| | | Boolean ret = super.save(EvaluateTaskWrapper.build().entityPO(vo)); |
| | | if (ret) { |
| | | ret = evaluateCandidateService.saveBatch(vo.getCandidateEntities()); |
| | | } |
| | | return ret; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public boolean updateById(EvaluateTaskVO vo) { |
| | | if (null == vo.getId()) |
| | | return false; |
| | | |
| | | Boolean ret = super.updateById(EvaluateTaskWrapper.build().entityPO(vo)); |
| | | if (ret) { |
| | | ret = evaluateCandidateService.saveOrUpdateBatch(vo.getCandidateEntities()); |
| | | } |
| | | return ret; |
| | | } |
| | | private final IEvaluateTaskCategoryService evaluateTaskCategoryService; |
| | | |
| | | @Override |
| | | public IPage<EvaluateTaskVO> selectEvaluateTaskPage(IPage<EvaluateTaskVO> page, EvaluateTaskVO evaluateTask) { |
| | | return page.setRecords(baseMapper.selectEvaluateTaskPage(page, evaluateTask)); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public Boolean saveTaskAndCategory(EvaluateTaskDTO dto) { |
| | | EvaluateTaskDTO taskDTO = EvaluateTaskWrapper.build().entityDTO(dto); |
| | | boolean ret = save(taskDTO); |
| | | if (ret) { |
| | | List<EvaluateTaskCategoryEntity> evaluateTaskCategoryEntityList = dto.getCategoryEntities().stream().map(categoryEntity -> { |
| | | categoryEntity.setEvaluateTaskId(taskDTO.getId()); // 给每个categoryEntity对象的EvaluateTaskId属性设置新值 |
| | | return categoryEntity; // 返回修改后的对象 |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | evaluateTaskCategoryService.saveOrUpdateBatch(evaluateTaskCategoryEntityList); |
| | | } |
| | | return ret; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean updateTaskAndCategory(EvaluateTaskDTO dto) { |
| | | boolean ret = updateById(EvaluateTaskWrapper.build().entityDTO(dto)); |
| | | if (ret) { |
| | | List<EvaluateTaskCategoryEntity> evaluateTaskCategoryEntityList = dto.getCategoryEntities().stream().map(categoryEntity -> { |
| | | categoryEntity.setEvaluateTaskId(dto.getId()); // 给每个categoryEntity对象的EvaluateTaskId属性设置新值 |
| | | return categoryEntity; // 返回修改后的对象 |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | evaluateTaskCategoryService.updateBatchById(evaluateTaskCategoryEntityList); |
| | | } |
| | | return ret; |
| | | } |
| | | |
| | | |
| | |
| | | // evaluateTask.setTypeName(DictCache.getValue(DictEnum.YES_NO, EvaluateTask.getType())); |
| | | //}); |
| | | return evaluateTaskList; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public boolean deleteLogic(List<Long> ids) { |
| | | boolean ret = super.deleteLogic(ids); |
| | | if (ret) { |
| | | for (Long id:ids) { |
| | | //先删除 |
| | | QueryWrapper<EvaluateTaskSetEntity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("evaluate_task_id", id); |
| | | evaluateTaskSetService.remove(queryWrapper); |
| | | } |
| | | } |
| | | return ret; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.vo; |
| | | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryCandidateEntity; |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 视图实体类 |
| | | * |
| | | * @author aix |
| | | * @since 2024-01-05 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class EvaluateTaskCategoryCandidateVO extends EvaluateTaskCategoryCandidateEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.vo; |
| | | |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryEntity; |
| | | import org.springblade.core.tool.node.INode; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 评优任务类别 视图实体类 |
| | | * |
| | | * @author Aix |
| | | * @since 2024-01-04 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class EvaluateTaskCategoryVO extends EvaluateTaskCategoryEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.evaluate.vo; |
| | | |
| | | import org.springblade.modules.evaluate.entity.EvaluateCandidateEntity; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.List; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskEntity; |
| | | |
| | | /** |
| | | * 评优任务表 视图实体类 |
| | | * |
| | | * @author aix |
| | | * @since 2023-12-08 |
| | | * @since 2024-01-05 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class EvaluateTaskVO extends EvaluateTaskEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private Object selfCandidate;// 当前部门的候选人 |
| | | |
| | | private Boolean isEvaluateOk;//是否评论完成 |
| | | |
| | | private EvaluateResultVO evaluateResultVO;//评论结果 |
| | | |
| | | private List<EvaluateCandidateEntity> candidateEntities; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.wrapper; |
| | | |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryCandidateEntity; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskCategoryCandidateVO; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 评优任务任务类别候选人表 包装类,返回视图层所需的字段 |
| | | * |
| | | * @author aix |
| | | * @since 2024-01-05 |
| | | */ |
| | | public class EvaluateTaskCategoryCandidateWrapper extends BaseEntityWrapper<EvaluateTaskCategoryCandidateEntity, EvaluateTaskCategoryCandidateVO> { |
| | | |
| | | public static EvaluateTaskCategoryCandidateWrapper build() { |
| | | return new EvaluateTaskCategoryCandidateWrapper(); |
| | | } |
| | | |
| | | @Override |
| | | public EvaluateTaskCategoryCandidateVO entityVO(EvaluateTaskCategoryCandidateEntity evaluateTaskCategoryCandidate) { |
| | | EvaluateTaskCategoryCandidateVO evaluateTaskCategoryCandidateVO = Objects.requireNonNull(BeanUtil.copy(evaluateTaskCategoryCandidate, EvaluateTaskCategoryCandidateVO.class)); |
| | | |
| | | //User createUser = UserCache.getUser(evaluateTaskCategoryCandidate.getCreateUser()); |
| | | //User updateUser = UserCache.getUser(evaluateTaskCategoryCandidate.getUpdateUser()); |
| | | //evaluateTaskCategoryCandidateVO.setCreateUserName(createUser.getName()); |
| | | //evaluateTaskCategoryCandidateVO.setUpdateUserName(updateUser.getName()); |
| | | |
| | | return evaluateTaskCategoryCandidateVO; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.evaluate.wrapper; |
| | | |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskCategoryEntity; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskCategoryVO; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 评优任务类别 包装类,返回视图层所需的字段 |
| | | * |
| | | * @author Aix |
| | | * @since 2024-01-04 |
| | | */ |
| | | public class EvaluateTaskCategoryWrapper extends BaseEntityWrapper<EvaluateTaskCategoryEntity, EvaluateTaskCategoryVO> { |
| | | |
| | | public static EvaluateTaskCategoryWrapper build() { |
| | | return new EvaluateTaskCategoryWrapper(); |
| | | } |
| | | |
| | | @Override |
| | | public EvaluateTaskCategoryVO entityVO(EvaluateTaskCategoryEntity evaluateTaskCategory) { |
| | | EvaluateTaskCategoryVO evaluateTaskCategoryVO = Objects.requireNonNull(BeanUtil.copy(evaluateTaskCategory, EvaluateTaskCategoryVO.class)); |
| | | |
| | | //User createUser = UserCache.getUser(evaluateTaskCategory.getCreateUser()); |
| | | //User updateUser = UserCache.getUser(evaluateTaskCategory.getUpdateUser()); |
| | | //evaluateTaskCategoryVO.setCreateUserName(createUser.getName()); |
| | | //evaluateTaskCategoryVO.setUpdateUserName(updateUser.getName()); |
| | | |
| | | return evaluateTaskCategoryVO; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.evaluate.wrapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.SpringUtil; |
| | | import org.springblade.modules.evaluate.entity.EvaluateCandidateEntity; |
| | | import org.springblade.modules.evaluate.entity.EvaluateResultEntity; |
| | | import org.springblade.modules.evaluate.dto.EvaluateTaskDTO; |
| | | import org.springblade.modules.evaluate.entity.EvaluateTaskEntity; |
| | | import org.springblade.modules.evaluate.service.IEvaluateCandidateService; |
| | | import org.springblade.modules.evaluate.service.IEvaluateResultService; |
| | | import org.springblade.modules.evaluate.vo.EvaluateTaskVO; |
| | | |
| | | import java.util.*; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 评优任务表 包装类,返回视图层所需的字段 |
| | | * |
| | | * @author aix |
| | | * @since 2023-12-08 |
| | | * @since 2024-01-05 |
| | | */ |
| | | public class EvaluateTaskWrapper extends BaseEntityWrapper<EvaluateTaskEntity, EvaluateTaskVO> { |
| | | |
| | | private static final IEvaluateCandidateService evaluateCandidateService; |
| | | private static final IEvaluateResultService evaluateResultService; |
| | | |
| | | static { |
| | | evaluateCandidateService = SpringUtil.getBean(IEvaluateCandidateService.class); |
| | | evaluateResultService = SpringUtil.getBean(IEvaluateResultService.class); |
| | | } |
| | | |
| | | public static EvaluateTaskWrapper build() { |
| | | return new EvaluateTaskWrapper(); |
| | |
| | | return evaluateTaskVO; |
| | | } |
| | | |
| | | public EvaluateTaskEntity entityPO(EvaluateTaskVO vo) { |
| | | EvaluateTaskEntity po = Objects.requireNonNull(BeanUtil.copy(vo, EvaluateTaskEntity.class)); |
| | | return po; |
| | | public EvaluateTaskDTO entityDTO(EvaluateTaskEntity evaluateTask) { |
| | | EvaluateTaskDTO dto = Objects.requireNonNull(BeanUtil.copy(evaluateTask, EvaluateTaskDTO.class)); |
| | | return dto; |
| | | } |
| | | |
| | | |
| | | } |