29 changed files with 2218 additions and 2 deletions
@ -0,0 +1,105 @@ |
|||
package org.dromara.platform.controller; |
|||
|
|||
import java.util.List; |
|||
|
|||
import lombok.RequiredArgsConstructor; |
|||
import jakarta.servlet.http.HttpServletResponse; |
|||
import jakarta.validation.constraints.*; |
|||
import cn.dev33.satoken.annotation.SaCheckPermission; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
|||
import org.dromara.common.log.annotation.Log; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import org.dromara.common.log.enums.BusinessType; |
|||
import org.dromara.common.excel.utils.ExcelUtil; |
|||
import org.dromara.platform.domain.vo.CheckTypeVo; |
|||
import org.dromara.platform.domain.bo.CheckTypeBo; |
|||
import org.dromara.platform.service.ICheckTypeService; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 考核类型-类别 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/platform/checkType") |
|||
public class CheckTypeController extends BaseController { |
|||
|
|||
private final ICheckTypeService checkTypeService; |
|||
|
|||
/** |
|||
* 查询考核类型-类别列表 |
|||
*/ |
|||
@SaCheckPermission("platform:checkType:list") |
|||
@GetMapping("/list") |
|||
public TableDataInfo<CheckTypeVo> list(CheckTypeBo bo, PageQuery pageQuery) { |
|||
return checkTypeService.queryPageList(bo, pageQuery); |
|||
} |
|||
|
|||
/** |
|||
* 导出考核类型-类别列表 |
|||
*/ |
|||
@SaCheckPermission("platform:checkType:export") |
|||
@Log(title = "考核类型-类别", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(CheckTypeBo bo, HttpServletResponse response) { |
|||
List<CheckTypeVo> list = checkTypeService.queryList(bo); |
|||
ExcelUtil.exportExcel(list, "考核类型-类别", CheckTypeVo.class, response); |
|||
} |
|||
|
|||
/** |
|||
* 获取考核类型-类别详细信息 |
|||
* |
|||
* @param id 主键 |
|||
*/ |
|||
@SaCheckPermission("platform:checkType:query") |
|||
@GetMapping("/{id}") |
|||
public R<CheckTypeVo> getInfo(@NotNull(message = "主键不能为空") |
|||
@PathVariable String id) { |
|||
return R.ok(checkTypeService.queryById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增考核类型-类别 |
|||
*/ |
|||
@SaCheckPermission("platform:checkType:add") |
|||
@Log(title = "考核类型-类别", businessType = BusinessType.INSERT) |
|||
@RepeatSubmit() |
|||
@PostMapping() |
|||
public R<Void> add(@Validated(AddGroup.class) @RequestBody CheckTypeBo bo) { |
|||
return toAjax(checkTypeService.insertByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 修改考核类型-类别 |
|||
*/ |
|||
@SaCheckPermission("platform:checkType:edit") |
|||
@Log(title = "考核类型-类别", businessType = BusinessType.UPDATE) |
|||
@RepeatSubmit() |
|||
@PutMapping() |
|||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody CheckTypeBo bo) { |
|||
return toAjax(checkTypeService.updateByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 删除考核类型-类别 |
|||
* |
|||
* @param ids 主键串 |
|||
*/ |
|||
@SaCheckPermission("platform:checkType:remove") |
|||
@Log(title = "考核类型-类别", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public R<Void> remove(@NotEmpty(message = "主键不能为空") |
|||
@PathVariable String[] ids) { |
|||
return toAjax(checkTypeService.deleteWithValidByIds(List.of(ids), true)); |
|||
} |
|||
} |
@ -0,0 +1,105 @@ |
|||
package org.dromara.platform.controller; |
|||
|
|||
import java.util.List; |
|||
|
|||
import lombok.RequiredArgsConstructor; |
|||
import jakarta.servlet.http.HttpServletResponse; |
|||
import jakarta.validation.constraints.*; |
|||
import cn.dev33.satoken.annotation.SaCheckPermission; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
|||
import org.dromara.common.log.annotation.Log; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import org.dromara.common.log.enums.BusinessType; |
|||
import org.dromara.common.excel.utils.ExcelUtil; |
|||
import org.dromara.platform.domain.vo.EvaluationInfoVo; |
|||
import org.dromara.platform.domain.bo.EvaluationInfoBo; |
|||
import org.dromara.platform.service.IEvaluationInfoService; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 考核评分信息 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/platform/evaluationInfo") |
|||
public class EvaluationInfoController extends BaseController { |
|||
|
|||
private final IEvaluationInfoService evaluationInfoService; |
|||
|
|||
/** |
|||
* 查询考核评分信息列表 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationInfo:list") |
|||
@GetMapping("/list") |
|||
public TableDataInfo<EvaluationInfoVo> list(EvaluationInfoBo bo, PageQuery pageQuery) { |
|||
return evaluationInfoService.queryPageList(bo, pageQuery); |
|||
} |
|||
|
|||
/** |
|||
* 导出考核评分信息列表 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationInfo:export") |
|||
@Log(title = "考核评分信息", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(EvaluationInfoBo bo, HttpServletResponse response) { |
|||
List<EvaluationInfoVo> list = evaluationInfoService.queryList(bo); |
|||
ExcelUtil.exportExcel(list, "考核评分信息", EvaluationInfoVo.class, response); |
|||
} |
|||
|
|||
/** |
|||
* 获取考核评分信息详细信息 |
|||
* |
|||
* @param id 主键 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationInfo:query") |
|||
@GetMapping("/{id}") |
|||
public R<EvaluationInfoVo> getInfo(@NotNull(message = "主键不能为空") |
|||
@PathVariable String id) { |
|||
return R.ok(evaluationInfoService.queryById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增考核评分信息 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationInfo:add") |
|||
@Log(title = "考核评分信息", businessType = BusinessType.INSERT) |
|||
@RepeatSubmit() |
|||
@PostMapping() |
|||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EvaluationInfoBo bo) { |
|||
return toAjax(evaluationInfoService.insertByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 修改考核评分信息 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationInfo:edit") |
|||
@Log(title = "考核评分信息", businessType = BusinessType.UPDATE) |
|||
@RepeatSubmit() |
|||
@PutMapping() |
|||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EvaluationInfoBo bo) { |
|||
return toAjax(evaluationInfoService.updateByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 删除考核评分信息 |
|||
* |
|||
* @param ids 主键串 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationInfo:remove") |
|||
@Log(title = "考核评分信息", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public R<Void> remove(@NotEmpty(message = "主键不能为空") |
|||
@PathVariable String[] ids) { |
|||
return toAjax(evaluationInfoService.deleteWithValidByIds(List.of(ids), true)); |
|||
} |
|||
} |
@ -0,0 +1,129 @@ |
|||
package org.dromara.platform.controller; |
|||
|
|||
import java.util.List; |
|||
|
|||
import lombok.RequiredArgsConstructor; |
|||
import jakarta.servlet.http.HttpServletResponse; |
|||
import jakarta.validation.constraints.*; |
|||
import cn.dev33.satoken.annotation.SaCheckPermission; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.dromara.platform.domain.EvaluationTemplate; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
|||
import org.dromara.common.log.annotation.Log; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import org.dromara.common.log.enums.BusinessType; |
|||
import org.dromara.common.excel.utils.ExcelUtil; |
|||
import org.dromara.platform.domain.vo.EvaluationTemplateVo; |
|||
import org.dromara.platform.domain.bo.EvaluationTemplateBo; |
|||
import org.dromara.platform.service.IEvaluationTemplateService; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 考核评分信息-模板 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/platform/evaluationTemplate") |
|||
public class EvaluationTemplateController extends BaseController { |
|||
|
|||
private final IEvaluationTemplateService evaluationTemplateService; |
|||
|
|||
/** |
|||
* 查询考核评分信息-模板列表 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationTemplate:list") |
|||
@GetMapping("/list") |
|||
public TableDataInfo<EvaluationTemplateVo> list(EvaluationTemplateBo bo, PageQuery pageQuery) { |
|||
return evaluationTemplateService.queryPageList(bo, pageQuery); |
|||
} |
|||
|
|||
/** |
|||
* 导出考核评分信息-模板列表 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationTemplate:export") |
|||
@Log(title = "考核评分信息-模板", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(EvaluationTemplateBo bo, HttpServletResponse response) { |
|||
List<EvaluationTemplateVo> list = evaluationTemplateService.queryList(bo); |
|||
ExcelUtil.exportExcel(list, "考核评分信息-模板", EvaluationTemplateVo.class, response); |
|||
} |
|||
|
|||
/** |
|||
* 获取考核评分信息-模板详细信息 |
|||
* |
|||
* @param id 主键 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationTemplate:query") |
|||
@GetMapping("/{id}") |
|||
public R<EvaluationTemplateVo> getInfo(@NotNull(message = "主键不能为空") |
|||
@PathVariable String id) { |
|||
return R.ok(evaluationTemplateService.queryById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增考核评分信息-模板 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationTemplate:add") |
|||
@Log(title = "考核评分信息-模板", businessType = BusinessType.INSERT) |
|||
@RepeatSubmit() |
|||
@PostMapping() |
|||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EvaluationTemplateBo bo) { |
|||
return toAjax(evaluationTemplateService.insertByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 修改考核评分信息-模板 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationTemplate:edit") |
|||
@Log(title = "考核评分信息-模板", businessType = BusinessType.UPDATE) |
|||
@RepeatSubmit() |
|||
@PutMapping() |
|||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EvaluationTemplateBo bo) { |
|||
return toAjax(evaluationTemplateService.updateByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 删除考核评分信息-模板 |
|||
* |
|||
* @param ids 主键串 |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationTemplate:remove") |
|||
@Log(title = "考核评分信息-模板", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public R<Void> remove(@NotEmpty(message = "主键不能为空") |
|||
@PathVariable String[] ids) { |
|||
return toAjax(evaluationTemplateService.deleteWithValidByIds(List.of(ids), true)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 根据标识获取详情 |
|||
* @param flag |
|||
* @return |
|||
*/ |
|||
@SaCheckPermission("platform:evaluationTemplate:queryByFlag") |
|||
@GetMapping("/queryByFlag") |
|||
public R<List<EvaluationTemplate>> queryByFlag(@Param("flag") String flag) { |
|||
List<EvaluationTemplate> rs = evaluationTemplateService.queryByFlag(flag); |
|||
return R.ok(rs); |
|||
} |
|||
|
|||
|
|||
@SaCheckPermission("platform:evaluationTemplate:batchEdit") |
|||
@Log(title = "考核评分信息-模板", businessType = BusinessType.UPDATE) |
|||
@RepeatSubmit() |
|||
@PutMapping("/batchEdit") |
|||
public R<Void> batchEdit(@Validated(EditGroup.class) @RequestBody List<EvaluationTemplate> updateList) { |
|||
return toAjax(evaluationTemplateService.batchEdit(updateList)); |
|||
} |
|||
} |
@ -0,0 +1,105 @@ |
|||
package org.dromara.platform.controller; |
|||
|
|||
import java.util.List; |
|||
|
|||
import lombok.RequiredArgsConstructor; |
|||
import jakarta.servlet.http.HttpServletResponse; |
|||
import jakarta.validation.constraints.*; |
|||
import cn.dev33.satoken.annotation.SaCheckPermission; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
|||
import org.dromara.common.log.annotation.Log; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import org.dromara.common.log.enums.BusinessType; |
|||
import org.dromara.common.excel.utils.ExcelUtil; |
|||
import org.dromara.platform.domain.vo.LargeRatingTypeVo; |
|||
import org.dromara.platform.domain.bo.LargeRatingTypeBo; |
|||
import org.dromara.platform.service.ILargeRatingTypeService; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 评分大类-类别 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/platform/largeRatingType") |
|||
public class LargeRatingTypeController extends BaseController { |
|||
|
|||
private final ILargeRatingTypeService largeRatingTypeService; |
|||
|
|||
/** |
|||
* 查询评分大类-类别列表 |
|||
*/ |
|||
@SaCheckPermission("platform:ratingType:list") |
|||
@GetMapping("/list") |
|||
public TableDataInfo<LargeRatingTypeVo> list(LargeRatingTypeBo bo, PageQuery pageQuery) { |
|||
return largeRatingTypeService.queryPageList(bo, pageQuery); |
|||
} |
|||
|
|||
/** |
|||
* 导出评分大类-类别列表 |
|||
*/ |
|||
@SaCheckPermission("platform:ratingType:export") |
|||
@Log(title = "评分大类-类别", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(LargeRatingTypeBo bo, HttpServletResponse response) { |
|||
List<LargeRatingTypeVo> list = largeRatingTypeService.queryList(bo); |
|||
ExcelUtil.exportExcel(list, "评分大类-类别", LargeRatingTypeVo.class, response); |
|||
} |
|||
|
|||
/** |
|||
* 获取评分大类-类别详细信息 |
|||
* |
|||
* @param id 主键 |
|||
*/ |
|||
@SaCheckPermission("platform:ratingType:query") |
|||
@GetMapping("/{id}") |
|||
public R<LargeRatingTypeVo> getInfo(@NotNull(message = "主键不能为空") |
|||
@PathVariable String id) { |
|||
return R.ok(largeRatingTypeService.queryById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增评分大类-类别 |
|||
*/ |
|||
@SaCheckPermission("platform:ratingType:add") |
|||
@Log(title = "评分大类-类别", businessType = BusinessType.INSERT) |
|||
@RepeatSubmit() |
|||
@PostMapping() |
|||
public R<Void> add(@Validated(AddGroup.class) @RequestBody LargeRatingTypeBo bo) { |
|||
return toAjax(largeRatingTypeService.insertByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 修改评分大类-类别 |
|||
*/ |
|||
@SaCheckPermission("platform:ratingType:edit") |
|||
@Log(title = "评分大类-类别", businessType = BusinessType.UPDATE) |
|||
@RepeatSubmit() |
|||
@PutMapping() |
|||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody LargeRatingTypeBo bo) { |
|||
return toAjax(largeRatingTypeService.updateByBo(bo)); |
|||
} |
|||
|
|||
/** |
|||
* 删除评分大类-类别 |
|||
* |
|||
* @param ids 主键串 |
|||
*/ |
|||
@SaCheckPermission("platform:ratingType:remove") |
|||
@Log(title = "评分大类-类别", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public R<Void> remove(@NotEmpty(message = "主键不能为空") |
|||
@PathVariable String[] ids) { |
|||
return toAjax(largeRatingTypeService.deleteWithValidByIds(List.of(ids), true)); |
|||
} |
|||
} |
@ -0,0 +1,47 @@ |
|||
package org.dromara.platform.domain; |
|||
|
|||
import org.dromara.common.tenant.core.TenantEntity; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.io.Serial; |
|||
|
|||
/** |
|||
* 考核类型-类别对象 check_type |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@TableName("check_type") |
|||
public class CheckType extends TenantEntity { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@TableId(value = "id") |
|||
private String id; |
|||
|
|||
/** |
|||
* 名称 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 当前状态 |
|||
*/ |
|||
private Long status; |
|||
|
|||
/** |
|||
* 删除标志(0代表存在 2代表删除) |
|||
*/ |
|||
@TableLogic |
|||
private String delFlag; |
|||
|
|||
|
|||
} |
@ -0,0 +1,100 @@ |
|||
package org.dromara.platform.domain; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import org.dromara.common.tenant.core.TenantEntity; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.io.Serial; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 考核评分信息对象 evaluation_info |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@TableName("evaluation_info") |
|||
public class EvaluationInfo extends TenantEntity { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@TableId(value = "id") |
|||
private String id; |
|||
|
|||
/** |
|||
* 运维单位 |
|||
*/ |
|||
private String ioCompany; |
|||
|
|||
/** |
|||
* 考核项目 |
|||
*/ |
|||
private String checkProject; |
|||
|
|||
/** |
|||
* 考核名称 |
|||
*/ |
|||
private String checkName; |
|||
|
|||
/** |
|||
* 考核时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") |
|||
private Date checkTime; |
|||
|
|||
/** |
|||
* 考核得分 |
|||
*/ |
|||
private Long checkRating; |
|||
|
|||
/** |
|||
* 评分大类 |
|||
*/ |
|||
private String largeRating; |
|||
|
|||
/** |
|||
* 评分小类 |
|||
*/ |
|||
private String smallRating; |
|||
|
|||
/** |
|||
* 扣分标准 |
|||
*/ |
|||
private String standards; |
|||
|
|||
/** |
|||
* 总分 |
|||
*/ |
|||
private Long sumRating; |
|||
|
|||
/** |
|||
* 扣分 |
|||
*/ |
|||
private Long subRating; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private Long remark; |
|||
|
|||
/** |
|||
* 当前状态 |
|||
*/ |
|||
private Long status; |
|||
|
|||
/** |
|||
* 删除标志(0代表存在 2代表删除) |
|||
*/ |
|||
@TableLogic |
|||
private String delFlag; |
|||
|
|||
|
|||
} |
@ -0,0 +1,77 @@ |
|||
package org.dromara.platform.domain; |
|||
|
|||
import org.dromara.common.tenant.core.TenantEntity; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.io.Serial; |
|||
|
|||
/** |
|||
* 考核评分信息-模板对象 evaluation_template |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@TableName("evaluation_template") |
|||
public class EvaluationTemplate extends TenantEntity { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@TableId(value = "id") |
|||
private String id; |
|||
|
|||
/** |
|||
* 标识用于后续归属 |
|||
*/ |
|||
private String flag; |
|||
|
|||
/** |
|||
* 评分大类 |
|||
*/ |
|||
private String largeRating; |
|||
|
|||
/** |
|||
* 评分小类 |
|||
*/ |
|||
private String smallRating; |
|||
|
|||
/** |
|||
* 扣分标准 |
|||
*/ |
|||
private String standards; |
|||
|
|||
/** |
|||
* 总分,默认为0 |
|||
*/ |
|||
private Long sumRating; |
|||
|
|||
/** |
|||
* 扣分,默认为0 |
|||
*/ |
|||
private Long subRating; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 当前状态 |
|||
*/ |
|||
private Long status; |
|||
|
|||
/** |
|||
* 删除标志(0代表存在 2代表删除) |
|||
*/ |
|||
@TableLogic |
|||
private String delFlag; |
|||
|
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
package org.dromara.platform.domain; |
|||
|
|||
import org.dromara.common.tenant.core.TenantEntity; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.io.Serial; |
|||
|
|||
/** |
|||
* 评分大类-类别对象 large_rating_type |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@TableName("large_rating_type") |
|||
public class LargeRatingType extends TenantEntity { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@TableId(value = "id") |
|||
private String id; |
|||
|
|||
/** |
|||
* 名称 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 当前状态 |
|||
*/ |
|||
private Long status; |
|||
|
|||
/** |
|||
* 删除标志(0代表存在 2代表删除) |
|||
*/ |
|||
@TableLogic |
|||
private String delFlag; |
|||
|
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package org.dromara.platform.domain.bo; |
|||
|
|||
import org.dromara.platform.domain.CheckType; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
/** |
|||
* 考核类型-类别业务对象 check_type |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@AutoMapper(target = CheckType.class, reverseConvertGenerate = false) |
|||
public class CheckTypeBo extends BaseEntity { |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@NotBlank(message = "唯一标识符不能为空", groups = { EditGroup.class }) |
|||
private String id; |
|||
|
|||
/** |
|||
* 名称 |
|||
*/ |
|||
@NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String name; |
|||
|
|||
/** |
|||
* 当前状态 |
|||
*/ |
|||
//@NotNull(message = "当前状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
|||
private Long status; |
|||
|
|||
|
|||
} |
@ -0,0 +1,105 @@ |
|||
package org.dromara.platform.domain.bo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import org.dromara.platform.domain.EvaluationInfo; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 考核评分信息业务对象 evaluation_info |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@AutoMapper(target = EvaluationInfo.class, reverseConvertGenerate = false) |
|||
public class EvaluationInfoBo extends BaseEntity { |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@NotBlank(message = "唯一标识符不能为空", groups = { EditGroup.class }) |
|||
private String id; |
|||
|
|||
/** |
|||
* 运维单位 |
|||
*/ |
|||
@NotBlank(message = "运维单位不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String ioCompany; |
|||
|
|||
/** |
|||
* 考核项目 |
|||
*/ |
|||
@NotBlank(message = "考核项目不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String checkProject; |
|||
|
|||
/** |
|||
* 考核名称 |
|||
*/ |
|||
@NotBlank(message = "考核名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String checkName; |
|||
|
|||
/** |
|||
* 考核时间 |
|||
*/ |
|||
//@NotBlank(message = "考核时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
|||
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") |
|||
private Date checkTime; |
|||
|
|||
/** |
|||
* 考核得分 |
|||
*/ |
|||
// @NotNull(message = "考核得分不能为空", groups = { AddGroup.class, EditGroup.class })
|
|||
private Long checkRating; |
|||
|
|||
/** |
|||
* 评分大类 |
|||
*/ |
|||
// @NotBlank(message = "评分大类不能为空", groups = { AddGroup.class, EditGroup.class })
|
|||
private String largeRating; |
|||
|
|||
/** |
|||
* 评分小类 |
|||
*/ |
|||
//@NotBlank(message = "评分小类不能为空", groups = { AddGroup.class, EditGroup.class })
|
|||
private String smallRating; |
|||
|
|||
/** |
|||
* 扣分标准 |
|||
*/ |
|||
// @NotBlank(message = "扣分标准不能为空", groups = { AddGroup.class, EditGroup.class })
|
|||
private String standards; |
|||
|
|||
/** |
|||
* 总分 |
|||
*/ |
|||
//@NotNull(message = "总分不能为空", groups = { AddGroup.class, EditGroup.class })
|
|||
private Long sumRating; |
|||
|
|||
/** |
|||
* 扣分 |
|||
*/ |
|||
//@NotNull(message = "扣分不能为空", groups = { AddGroup.class, EditGroup.class })
|
|||
private Long subRating; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private Long remark; |
|||
|
|||
/** |
|||
* 当前状态 |
|||
*/ |
|||
//@NotNull(message = "当前状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
|||
private Long status; |
|||
|
|||
|
|||
} |
@ -0,0 +1,77 @@ |
|||
package org.dromara.platform.domain.bo; |
|||
|
|||
import org.dromara.platform.domain.EvaluationTemplate; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
/** |
|||
* 考核评分信息-模板业务对象 evaluation_template |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@AutoMapper(target = EvaluationTemplate.class, reverseConvertGenerate = false) |
|||
public class EvaluationTemplateBo extends BaseEntity { |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@NotBlank(message = "唯一标识符不能为空", groups = { EditGroup.class }) |
|||
private String id; |
|||
|
|||
/** |
|||
* 标识用于后续归属 |
|||
*/ |
|||
@NotBlank(message = "标识用于后续归属不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String flag; |
|||
|
|||
/** |
|||
* 评分大类 |
|||
*/ |
|||
@NotBlank(message = "评分大类不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String largeRating; |
|||
|
|||
/** |
|||
* 评分小类 |
|||
*/ |
|||
@NotBlank(message = "评分小类不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String smallRating; |
|||
|
|||
/** |
|||
* 扣分标准 |
|||
*/ |
|||
@NotBlank(message = "扣分标准不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String standards; |
|||
|
|||
/** |
|||
* 总分,默认为0 |
|||
*/ |
|||
@NotNull(message = "总分,默认为0不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private Long sumRating; |
|||
|
|||
/** |
|||
* 扣分,默认为0 |
|||
*/ |
|||
@NotNull(message = "扣分,默认为0不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private Long subRating; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String remark; |
|||
|
|||
/** |
|||
* 当前状态 |
|||
*/ |
|||
private Long status; |
|||
|
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package org.dromara.platform.domain.bo; |
|||
|
|||
import org.dromara.platform.domain.LargeRatingType; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
/** |
|||
* 评分大类-类别业务对象 large_rating_type |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@AutoMapper(target = LargeRatingType.class, reverseConvertGenerate = false) |
|||
public class LargeRatingTypeBo extends BaseEntity { |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@NotBlank(message = "唯一标识符不能为空", groups = { EditGroup.class }) |
|||
private String id; |
|||
|
|||
/** |
|||
* 名称 |
|||
*/ |
|||
@NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String name; |
|||
|
|||
/** |
|||
* 当前状态 |
|||
*/ |
|||
//@NotNull(message = "当前状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
|||
private Long status; |
|||
|
|||
|
|||
} |
@ -0,0 +1,50 @@ |
|||
package org.dromara.platform.domain.vo; |
|||
|
|||
import org.dromara.platform.domain.CheckType; |
|||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import org.dromara.common.excel.annotation.ExcelDictFormat; |
|||
import org.dromara.common.excel.convert.ExcelDictConvert; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 考核类型-类别视图对象 check_type |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
@AutoMapper(target = CheckType.class) |
|||
public class CheckTypeVo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@ExcelProperty(value = "唯一标识符") |
|||
private String id; |
|||
|
|||
/** |
|||
* 名称 |
|||
*/ |
|||
@ExcelProperty(value = "名称") |
|||
private String name; |
|||
|
|||
/** |
|||
* 当前状态 |
|||
*/ |
|||
@ExcelProperty(value = "当前状态") |
|||
private Long status; |
|||
|
|||
|
|||
} |
@ -0,0 +1,112 @@ |
|||
package org.dromara.platform.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import org.dromara.platform.domain.EvaluationInfo; |
|||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import org.dromara.common.excel.annotation.ExcelDictFormat; |
|||
import org.dromara.common.excel.convert.ExcelDictConvert; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 考核评分信息视图对象 evaluation_info |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
@AutoMapper(target = EvaluationInfo.class) |
|||
public class EvaluationInfoVo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@ExcelProperty(value = "唯一标识符") |
|||
private String id; |
|||
|
|||
/** |
|||
* 运维单位 |
|||
*/ |
|||
@ExcelProperty(value = "运维单位") |
|||
private String ioCompany; |
|||
|
|||
/** |
|||
* 考核项目 |
|||
*/ |
|||
@ExcelProperty(value = "考核项目") |
|||
private String checkProject; |
|||
|
|||
/** |
|||
* 考核名称 |
|||
*/ |
|||
@ExcelProperty(value = "考核名称") |
|||
private String checkName; |
|||
|
|||
/** |
|||
* 考核时间 |
|||
*/ |
|||
@ExcelProperty(value = "考核时间") |
|||
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8") |
|||
private Date checkTime; |
|||
|
|||
/** |
|||
* 考核得分 |
|||
*/ |
|||
@ExcelProperty(value = "考核得分") |
|||
private Long checkRating; |
|||
//
|
|||
// /**
|
|||
// * 评分大类
|
|||
// */
|
|||
// @ExcelProperty(value = "评分大类")
|
|||
// private String largeRating;
|
|||
//
|
|||
// /**
|
|||
// * 评分小类
|
|||
// */
|
|||
// @ExcelProperty(value = "评分小类")
|
|||
// private String smallRating;
|
|||
//
|
|||
// /**
|
|||
// * 扣分标准
|
|||
// */
|
|||
// @ExcelProperty(value = "扣分标准")
|
|||
// private String standards;
|
|||
//
|
|||
// /**
|
|||
// * 总分
|
|||
// */
|
|||
// @ExcelProperty(value = "总分")
|
|||
// private Long sumRating;
|
|||
//
|
|||
// /**
|
|||
// * 扣分
|
|||
// */
|
|||
// @ExcelProperty(value = "扣分")
|
|||
// private Long subRating;
|
|||
//
|
|||
// /**
|
|||
// * 备注
|
|||
// */
|
|||
// @ExcelProperty(value = "备注")
|
|||
// private Long remark;
|
|||
//
|
|||
// /**
|
|||
// * 当前状态
|
|||
// */
|
|||
// @ExcelProperty(value = "当前状态")
|
|||
// private Long status;
|
|||
|
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
package org.dromara.platform.domain.vo; |
|||
|
|||
import org.dromara.platform.domain.EvaluationTemplate; |
|||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import org.dromara.common.excel.annotation.ExcelDictFormat; |
|||
import org.dromara.common.excel.convert.ExcelDictConvert; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 考核评分信息-模板视图对象 evaluation_template |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
@AutoMapper(target = EvaluationTemplate.class) |
|||
public class EvaluationTemplateVo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@ExcelProperty(value = "唯一标识符") |
|||
private String id; |
|||
|
|||
/** |
|||
* 标识用于后续归属 |
|||
*/ |
|||
@ExcelProperty(value = "标识用于后续归属") |
|||
private String flag; |
|||
|
|||
/** |
|||
* 评分大类 |
|||
*/ |
|||
@ExcelProperty(value = "评分大类") |
|||
private String largeRating; |
|||
|
|||
/** |
|||
* 评分小类 |
|||
*/ |
|||
@ExcelProperty(value = "评分小类") |
|||
private String smallRating; |
|||
|
|||
/** |
|||
* 扣分标准 |
|||
*/ |
|||
@ExcelProperty(value = "扣分标准") |
|||
private String standards; |
|||
|
|||
/** |
|||
* 总分,默认为0 |
|||
*/ |
|||
@ExcelProperty(value = "总分,默认为0") |
|||
private Long sumRating; |
|||
|
|||
/** |
|||
* 扣分,默认为0 |
|||
*/ |
|||
@ExcelProperty(value = "扣分,默认为0") |
|||
private Long subRating; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
@ExcelProperty(value = "备注") |
|||
private String remark; |
|||
|
|||
/** |
|||
* 当前状态 |
|||
*/ |
|||
@ExcelProperty(value = "当前状态") |
|||
private Long status; |
|||
|
|||
|
|||
} |
@ -0,0 +1,50 @@ |
|||
package org.dromara.platform.domain.vo; |
|||
|
|||
import org.dromara.platform.domain.LargeRatingType; |
|||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import org.dromara.common.excel.annotation.ExcelDictFormat; |
|||
import org.dromara.common.excel.convert.ExcelDictConvert; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 评分大类-类别视图对象 large_rating_type |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
@AutoMapper(target = LargeRatingType.class) |
|||
public class LargeRatingTypeVo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识符 |
|||
*/ |
|||
@ExcelProperty(value = "唯一标识符") |
|||
private String id; |
|||
|
|||
/** |
|||
* 名称 |
|||
*/ |
|||
@ExcelProperty(value = "名称") |
|||
private String name; |
|||
|
|||
/** |
|||
* 当前状态 |
|||
*/ |
|||
@ExcelProperty(value = "当前状态") |
|||
private Long status; |
|||
|
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
package org.dromara.platform.mapper; |
|||
|
|||
import org.dromara.platform.domain.CheckType; |
|||
import org.dromara.platform.domain.vo.CheckTypeVo; |
|||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
|||
|
|||
/** |
|||
* 考核类型-类别Mapper接口 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
public interface CheckTypeMapper extends BaseMapperPlus<CheckType, CheckTypeVo> { |
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
package org.dromara.platform.mapper; |
|||
|
|||
import org.dromara.platform.domain.EvaluationInfo; |
|||
import org.dromara.platform.domain.vo.EvaluationInfoVo; |
|||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
|||
|
|||
/** |
|||
* 考核评分信息Mapper接口 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
public interface EvaluationInfoMapper extends BaseMapperPlus<EvaluationInfo, EvaluationInfoVo> { |
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
package org.dromara.platform.mapper; |
|||
|
|||
import org.dromara.platform.domain.EvaluationTemplate; |
|||
import org.dromara.platform.domain.vo.EvaluationTemplateVo; |
|||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
|||
|
|||
/** |
|||
* 考核评分信息-模板Mapper接口 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
public interface EvaluationTemplateMapper extends BaseMapperPlus<EvaluationTemplate, EvaluationTemplateVo> { |
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
package org.dromara.platform.mapper; |
|||
|
|||
import org.dromara.platform.domain.LargeRatingType; |
|||
import org.dromara.platform.domain.vo.LargeRatingTypeVo; |
|||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
|||
|
|||
/** |
|||
* 评分大类-类别Mapper接口 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
public interface LargeRatingTypeMapper extends BaseMapperPlus<LargeRatingType, LargeRatingTypeVo> { |
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
package org.dromara.platform.service; |
|||
|
|||
import org.dromara.platform.domain.vo.CheckTypeVo; |
|||
import org.dromara.platform.domain.bo.CheckTypeBo; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 考核类型-类别Service接口 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
public interface ICheckTypeService { |
|||
|
|||
/** |
|||
* 查询考核类型-类别 |
|||
* |
|||
* @param id 主键 |
|||
* @return 考核类型-类别 |
|||
*/ |
|||
CheckTypeVo queryById(String id); |
|||
|
|||
/** |
|||
* 分页查询考核类型-类别列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 考核类型-类别分页列表 |
|||
*/ |
|||
TableDataInfo<CheckTypeVo> queryPageList(CheckTypeBo bo, PageQuery pageQuery); |
|||
|
|||
/** |
|||
* 查询符合条件的考核类型-类别列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 考核类型-类别列表 |
|||
*/ |
|||
List<CheckTypeVo> queryList(CheckTypeBo bo); |
|||
|
|||
/** |
|||
* 新增考核类型-类别 |
|||
* |
|||
* @param bo 考核类型-类别 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
Boolean insertByBo(CheckTypeBo bo); |
|||
|
|||
/** |
|||
* 修改考核类型-类别 |
|||
* |
|||
* @param bo 考核类型-类别 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
Boolean updateByBo(CheckTypeBo bo); |
|||
|
|||
/** |
|||
* 校验并批量删除考核类型-类别信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid); |
|||
} |
@ -0,0 +1,68 @@ |
|||
package org.dromara.platform.service; |
|||
|
|||
import org.dromara.platform.domain.vo.EvaluationInfoVo; |
|||
import org.dromara.platform.domain.bo.EvaluationInfoBo; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 考核评分信息Service接口 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
public interface IEvaluationInfoService { |
|||
|
|||
/** |
|||
* 查询考核评分信息 |
|||
* |
|||
* @param id 主键 |
|||
* @return 考核评分信息 |
|||
*/ |
|||
EvaluationInfoVo queryById(String id); |
|||
|
|||
/** |
|||
* 分页查询考核评分信息列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 考核评分信息分页列表 |
|||
*/ |
|||
TableDataInfo<EvaluationInfoVo> queryPageList(EvaluationInfoBo bo, PageQuery pageQuery); |
|||
|
|||
/** |
|||
* 查询符合条件的考核评分信息列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 考核评分信息列表 |
|||
*/ |
|||
List<EvaluationInfoVo> queryList(EvaluationInfoBo bo); |
|||
|
|||
/** |
|||
* 新增考核评分信息 |
|||
* |
|||
* @param bo 考核评分信息 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
Boolean insertByBo(EvaluationInfoBo bo); |
|||
|
|||
/** |
|||
* 修改考核评分信息 |
|||
* |
|||
* @param bo 考核评分信息 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
Boolean updateByBo(EvaluationInfoBo bo); |
|||
|
|||
/** |
|||
* 校验并批量删除考核评分信息信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid); |
|||
} |
@ -0,0 +1,79 @@ |
|||
package org.dromara.platform.service; |
|||
|
|||
import org.dromara.platform.domain.EvaluationTemplate; |
|||
import org.dromara.platform.domain.vo.EvaluationTemplateVo; |
|||
import org.dromara.platform.domain.bo.EvaluationTemplateBo; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 考核评分信息-模板Service接口 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
public interface IEvaluationTemplateService { |
|||
|
|||
/** |
|||
* 查询考核评分信息-模板 |
|||
* |
|||
* @param id 主键 |
|||
* @return 考核评分信息-模板 |
|||
*/ |
|||
EvaluationTemplateVo queryById(String id); |
|||
|
|||
/** |
|||
* 分页查询考核评分信息-模板列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 考核评分信息-模板分页列表 |
|||
*/ |
|||
TableDataInfo<EvaluationTemplateVo> queryPageList(EvaluationTemplateBo bo, PageQuery pageQuery); |
|||
|
|||
/** |
|||
* 查询符合条件的考核评分信息-模板列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 考核评分信息-模板列表 |
|||
*/ |
|||
List<EvaluationTemplateVo> queryList(EvaluationTemplateBo bo); |
|||
|
|||
/** |
|||
* 新增考核评分信息-模板 |
|||
* |
|||
* @param bo 考核评分信息-模板 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
Boolean insertByBo(EvaluationTemplateBo bo); |
|||
|
|||
/** |
|||
* 修改考核评分信息-模板 |
|||
* |
|||
* @param bo 考核评分信息-模板 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
Boolean updateByBo(EvaluationTemplateBo bo); |
|||
|
|||
/** |
|||
* 校验并批量删除考核评分信息-模板信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid); |
|||
|
|||
/** |
|||
* 根据标识查询 |
|||
* |
|||
* @param flag 标识 |
|||
* @return 考核评分信息-模板列表 |
|||
*/ |
|||
List<EvaluationTemplate> queryByFlag(String flag); |
|||
|
|||
int batchEdit(List<EvaluationTemplate> updateList); |
|||
} |
@ -0,0 +1,68 @@ |
|||
package org.dromara.platform.service; |
|||
|
|||
import org.dromara.platform.domain.vo.LargeRatingTypeVo; |
|||
import org.dromara.platform.domain.bo.LargeRatingTypeBo; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 评分大类-类别Service接口 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
public interface ILargeRatingTypeService { |
|||
|
|||
/** |
|||
* 查询评分大类-类别 |
|||
* |
|||
* @param id 主键 |
|||
* @return 评分大类-类别 |
|||
*/ |
|||
LargeRatingTypeVo queryById(String id); |
|||
|
|||
/** |
|||
* 分页查询评分大类-类别列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 评分大类-类别分页列表 |
|||
*/ |
|||
TableDataInfo<LargeRatingTypeVo> queryPageList(LargeRatingTypeBo bo, PageQuery pageQuery); |
|||
|
|||
/** |
|||
* 查询符合条件的评分大类-类别列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 评分大类-类别列表 |
|||
*/ |
|||
List<LargeRatingTypeVo> queryList(LargeRatingTypeBo bo); |
|||
|
|||
/** |
|||
* 新增评分大类-类别 |
|||
* |
|||
* @param bo 评分大类-类别 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
Boolean insertByBo(LargeRatingTypeBo bo); |
|||
|
|||
/** |
|||
* 修改评分大类-类别 |
|||
* |
|||
* @param bo 评分大类-类别 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
Boolean updateByBo(LargeRatingTypeBo bo); |
|||
|
|||
/** |
|||
* 校验并批量删除评分大类-类别信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid); |
|||
} |
@ -0,0 +1,130 @@ |
|||
package org.dromara.platform.service.impl; |
|||
|
|||
import org.dromara.common.core.utils.MapstructUtils; |
|||
import org.dromara.common.core.utils.StringUtils; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.stereotype.Service; |
|||
import org.dromara.platform.domain.bo.CheckTypeBo; |
|||
import org.dromara.platform.domain.vo.CheckTypeVo; |
|||
import org.dromara.platform.domain.CheckType; |
|||
import org.dromara.platform.mapper.CheckTypeMapper; |
|||
import org.dromara.platform.service.ICheckTypeService; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Collection; |
|||
|
|||
/** |
|||
* 考核类型-类别Service业务层处理 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@RequiredArgsConstructor |
|||
@Service |
|||
public class CheckTypeServiceImpl implements ICheckTypeService { |
|||
|
|||
private final CheckTypeMapper baseMapper; |
|||
|
|||
/** |
|||
* 查询考核类型-类别 |
|||
* |
|||
* @param id 主键 |
|||
* @return 考核类型-类别 |
|||
*/ |
|||
@Override |
|||
public CheckTypeVo queryById(String id){ |
|||
return baseMapper.selectVoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 分页查询考核类型-类别列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 考核类型-类别分页列表 |
|||
*/ |
|||
@Override |
|||
public TableDataInfo<CheckTypeVo> queryPageList(CheckTypeBo bo, PageQuery pageQuery) { |
|||
LambdaQueryWrapper<CheckType> lqw = buildQueryWrapper(bo); |
|||
Page<CheckTypeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
|||
return TableDataInfo.build(result); |
|||
} |
|||
|
|||
/** |
|||
* 查询符合条件的考核类型-类别列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 考核类型-类别列表 |
|||
*/ |
|||
@Override |
|||
public List<CheckTypeVo> queryList(CheckTypeBo bo) { |
|||
LambdaQueryWrapper<CheckType> lqw = buildQueryWrapper(bo); |
|||
return baseMapper.selectVoList(lqw); |
|||
} |
|||
|
|||
private LambdaQueryWrapper<CheckType> buildQueryWrapper(CheckTypeBo bo) { |
|||
Map<String, Object> params = bo.getParams(); |
|||
LambdaQueryWrapper<CheckType> lqw = Wrappers.lambdaQuery(); |
|||
lqw.like(StringUtils.isNotBlank(bo.getName()), CheckType::getName, bo.getName()); |
|||
lqw.eq(bo.getStatus() != null, CheckType::getStatus, bo.getStatus()); |
|||
return lqw; |
|||
} |
|||
|
|||
/** |
|||
* 新增考核类型-类别 |
|||
* |
|||
* @param bo 考核类型-类别 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
@Override |
|||
public Boolean insertByBo(CheckTypeBo bo) { |
|||
CheckType add = MapstructUtils.convert(bo, CheckType.class); |
|||
validEntityBeforeSave(add); |
|||
boolean flag = baseMapper.insert(add) > 0; |
|||
if (flag) { |
|||
bo.setId(add.getId()); |
|||
} |
|||
return flag; |
|||
} |
|||
|
|||
/** |
|||
* 修改考核类型-类别 |
|||
* |
|||
* @param bo 考核类型-类别 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
@Override |
|||
public Boolean updateByBo(CheckTypeBo bo) { |
|||
CheckType update = MapstructUtils.convert(bo, CheckType.class); |
|||
validEntityBeforeSave(update); |
|||
return baseMapper.updateById(update) > 0; |
|||
} |
|||
|
|||
/** |
|||
* 保存前的数据校验 |
|||
*/ |
|||
private void validEntityBeforeSave(CheckType entity){ |
|||
//TODO 做一些数据校验,如唯一约束
|
|||
} |
|||
|
|||
/** |
|||
* 校验并批量删除考核类型-类别信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
@Override |
|||
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) { |
|||
if(isValid){ |
|||
//TODO 做一些业务上的校验,判断是否需要校验
|
|||
} |
|||
return baseMapper.deleteByIds(ids) > 0; |
|||
} |
|||
} |
@ -0,0 +1,165 @@ |
|||
package org.dromara.platform.service.impl; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import jakarta.annotation.Resource; |
|||
import org.dromara.common.core.utils.MapstructUtils; |
|||
import org.dromara.common.core.utils.StringUtils; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.dromara.platform.domain.EvaluationTemplate; |
|||
import org.dromara.platform.mapper.EvaluationTemplateMapper; |
|||
import org.springframework.beans.BeanUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.dromara.platform.domain.bo.EvaluationInfoBo; |
|||
import org.dromara.platform.domain.vo.EvaluationInfoVo; |
|||
import org.dromara.platform.domain.EvaluationInfo; |
|||
import org.dromara.platform.mapper.EvaluationInfoMapper; |
|||
import org.dromara.platform.service.IEvaluationInfoService; |
|||
|
|||
import java.util.*; |
|||
|
|||
/** |
|||
* 考核评分信息Service业务层处理 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@RequiredArgsConstructor |
|||
@Service |
|||
public class EvaluationInfoServiceImpl implements IEvaluationInfoService { |
|||
|
|||
private final EvaluationInfoMapper baseMapper; |
|||
@Resource |
|||
private EvaluationTemplateMapper evaluationTemplateMapper; |
|||
/** |
|||
* 查询考核评分信息 |
|||
* |
|||
* @param id 主键 |
|||
* @return 考核评分信息 |
|||
*/ |
|||
@Override |
|||
public EvaluationInfoVo queryById(String id){ |
|||
return baseMapper.selectVoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 分页查询考核评分信息列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 考核评分信息分页列表 |
|||
*/ |
|||
@Override |
|||
public TableDataInfo<EvaluationInfoVo> queryPageList(EvaluationInfoBo bo, PageQuery pageQuery) { |
|||
LambdaQueryWrapper<EvaluationInfo> lqw = buildQueryWrapper(bo); |
|||
Page<EvaluationInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
|||
return TableDataInfo.build(result); |
|||
} |
|||
|
|||
/** |
|||
* 查询符合条件的考核评分信息列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 考核评分信息列表 |
|||
*/ |
|||
@Override |
|||
public List<EvaluationInfoVo> queryList(EvaluationInfoBo bo) { |
|||
LambdaQueryWrapper<EvaluationInfo> lqw = buildQueryWrapper(bo); |
|||
return baseMapper.selectVoList(lqw); |
|||
} |
|||
|
|||
private LambdaQueryWrapper<EvaluationInfo> buildQueryWrapper(EvaluationInfoBo bo) { |
|||
Map<String, Object> params = bo.getParams(); |
|||
LambdaQueryWrapper<EvaluationInfo> lqw = Wrappers.lambdaQuery(); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getIoCompany()), EvaluationInfo::getIoCompany, bo.getIoCompany()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getCheckProject()), EvaluationInfo::getCheckProject, bo.getCheckProject()); |
|||
lqw.like(StringUtils.isNotBlank(bo.getCheckName()), EvaluationInfo::getCheckName, bo.getCheckName()); |
|||
lqw.eq(bo.getCheckTime() != null, EvaluationInfo::getCheckTime, bo.getCheckTime()); |
|||
lqw.eq(bo.getCheckRating() != null, EvaluationInfo::getCheckRating, bo.getCheckRating()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getLargeRating()), EvaluationInfo::getLargeRating, bo.getLargeRating()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getSmallRating()), EvaluationInfo::getSmallRating, bo.getSmallRating()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getStandards()), EvaluationInfo::getStandards, bo.getStandards()); |
|||
lqw.eq(bo.getSumRating() != null, EvaluationInfo::getSumRating, bo.getSumRating()); |
|||
lqw.eq(bo.getSubRating() != null, EvaluationInfo::getSubRating, bo.getSubRating()); |
|||
lqw.eq(bo.getStatus() != null, EvaluationInfo::getStatus, bo.getStatus()); |
|||
return lqw; |
|||
} |
|||
|
|||
/** |
|||
* 新增考核评分信息 |
|||
* |
|||
* @param bo 考核评分信息 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
@Override |
|||
public Boolean insertByBo(EvaluationInfoBo bo) { |
|||
String ioCompany = bo.getIoCompany(); |
|||
String checkProject = bo.getCheckProject(); |
|||
String checkName = bo.getCheckName(); |
|||
Date checkTime = bo.getCheckTime(); |
|||
|
|||
LambdaQueryWrapper<EvaluationTemplate> queryWrapper = new LambdaQueryWrapper<>(); |
|||
queryWrapper.eq(EvaluationTemplate::getFlag,"模板1"); |
|||
List<EvaluationTemplate> evaluationTemplates = evaluationTemplateMapper.selectList(queryWrapper); |
|||
|
|||
EvaluationInfo evaluationInfo = new EvaluationInfo(); |
|||
evaluationInfo.setIoCompany(ioCompany); |
|||
evaluationInfo.setCheckProject(checkProject); |
|||
evaluationInfo.setCheckName(checkName); |
|||
evaluationInfo.setCheckTime(checkTime); |
|||
|
|||
int size = baseMapper.insert(evaluationInfo); |
|||
if (size>0){ |
|||
List<EvaluationTemplate> addList = new ArrayList<>(); |
|||
String generatedId = evaluationInfo.getId(); |
|||
for (EvaluationTemplate item : evaluationTemplates) { |
|||
EvaluationTemplate evaluationTemplate = new EvaluationTemplate(); |
|||
BeanUtils.copyProperties(item, evaluationTemplate, "id"); |
|||
evaluationTemplate.setFlag(generatedId); |
|||
addList.add(evaluationTemplate); |
|||
} |
|||
evaluationTemplateMapper.insertBatch(addList); |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
/** |
|||
* 修改考核评分信息 |
|||
* |
|||
* @param bo 考核评分信息 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
@Override |
|||
public Boolean updateByBo(EvaluationInfoBo bo) { |
|||
EvaluationInfo update = MapstructUtils.convert(bo, EvaluationInfo.class); |
|||
validEntityBeforeSave(update); |
|||
return baseMapper.updateById(update) > 0; |
|||
} |
|||
|
|||
/** |
|||
* 保存前的数据校验 |
|||
*/ |
|||
private void validEntityBeforeSave(EvaluationInfo entity){ |
|||
//TODO 做一些数据校验,如唯一约束
|
|||
} |
|||
|
|||
/** |
|||
* 校验并批量删除考核评分信息信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
@Override |
|||
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) { |
|||
if(isValid){ |
|||
//TODO 做一些业务上的校验,判断是否需要校验
|
|||
} |
|||
return baseMapper.deleteByIds(ids) > 0; |
|||
} |
|||
} |
@ -0,0 +1,169 @@ |
|||
package org.dromara.platform.service.impl; |
|||
|
|||
import org.apache.ibatis.executor.BatchResult; |
|||
import org.dromara.common.core.utils.MapstructUtils; |
|||
import org.dromara.common.core.utils.StringUtils; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.stereotype.Service; |
|||
import org.dromara.platform.domain.bo.EvaluationTemplateBo; |
|||
import org.dromara.platform.domain.vo.EvaluationTemplateVo; |
|||
import org.dromara.platform.domain.EvaluationTemplate; |
|||
import org.dromara.platform.mapper.EvaluationTemplateMapper; |
|||
import org.dromara.platform.service.IEvaluationTemplateService; |
|||
|
|||
import java.util.Comparator; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Collection; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* 考核评分信息-模板Service业务层处理 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@RequiredArgsConstructor |
|||
@Service |
|||
public class EvaluationTemplateServiceImpl implements IEvaluationTemplateService { |
|||
|
|||
private final EvaluationTemplateMapper baseMapper; |
|||
|
|||
/** |
|||
* 查询考核评分信息-模板 |
|||
* |
|||
* @param id 主键 |
|||
* @return 考核评分信息-模板 |
|||
*/ |
|||
@Override |
|||
public EvaluationTemplateVo queryById(String id){ |
|||
return baseMapper.selectVoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 分页查询考核评分信息-模板列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 考核评分信息-模板分页列表 |
|||
*/ |
|||
@Override |
|||
public TableDataInfo<EvaluationTemplateVo> queryPageList(EvaluationTemplateBo bo, PageQuery pageQuery) { |
|||
LambdaQueryWrapper<EvaluationTemplate> lqw = buildQueryWrapper(bo); |
|||
Page<EvaluationTemplateVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
|||
List<EvaluationTemplateVo> records = result.getRecords(); |
|||
|
|||
List<EvaluationTemplateVo> sortedRecords = records.stream() |
|||
.sorted(Comparator.comparing(EvaluationTemplateVo::getLargeRating)) // 升序排序
|
|||
// 如果需要降序排序,可以链式调用 reversed() 方法
|
|||
//.sorted(Comparator.comparing(EvaluationTemplateVo::getLargeRating).reversed())
|
|||
.collect(Collectors.toList()); |
|||
result.setRecords(sortedRecords); |
|||
return TableDataInfo.build(result); |
|||
} |
|||
|
|||
/** |
|||
* 查询符合条件的考核评分信息-模板列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 考核评分信息-模板列表 |
|||
*/ |
|||
@Override |
|||
public List<EvaluationTemplateVo> queryList(EvaluationTemplateBo bo) { |
|||
LambdaQueryWrapper<EvaluationTemplate> lqw = buildQueryWrapper(bo); |
|||
return baseMapper.selectVoList(lqw); |
|||
} |
|||
|
|||
private LambdaQueryWrapper<EvaluationTemplate> buildQueryWrapper(EvaluationTemplateBo bo) { |
|||
Map<String, Object> params = bo.getParams(); |
|||
LambdaQueryWrapper<EvaluationTemplate> lqw = Wrappers.lambdaQuery(); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getFlag()), EvaluationTemplate::getFlag, bo.getFlag()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getLargeRating()), EvaluationTemplate::getLargeRating, bo.getLargeRating()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getSmallRating()), EvaluationTemplate::getSmallRating, bo.getSmallRating()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getStandards()), EvaluationTemplate::getStandards, bo.getStandards()); |
|||
lqw.eq(bo.getSumRating() != null, EvaluationTemplate::getSumRating, bo.getSumRating()); |
|||
lqw.eq(bo.getSubRating() != null, EvaluationTemplate::getSubRating, bo.getSubRating()); |
|||
lqw.eq(bo.getStatus() != null, EvaluationTemplate::getStatus, bo.getStatus()); |
|||
return lqw; |
|||
} |
|||
|
|||
/** |
|||
* 新增考核评分信息-模板 |
|||
* |
|||
* @param bo 考核评分信息-模板 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
@Override |
|||
public Boolean insertByBo(EvaluationTemplateBo bo) { |
|||
EvaluationTemplate add = MapstructUtils.convert(bo, EvaluationTemplate.class); |
|||
validEntityBeforeSave(add); |
|||
boolean flag = baseMapper.insert(add) > 0; |
|||
if (flag) { |
|||
bo.setId(add.getId()); |
|||
} |
|||
return flag; |
|||
} |
|||
|
|||
/** |
|||
* 修改考核评分信息-模板 |
|||
* |
|||
* @param bo 考核评分信息-模板 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
@Override |
|||
public Boolean updateByBo(EvaluationTemplateBo bo) { |
|||
EvaluationTemplate update = MapstructUtils.convert(bo, EvaluationTemplate.class); |
|||
validEntityBeforeSave(update); |
|||
return baseMapper.updateById(update) > 0; |
|||
} |
|||
|
|||
/** |
|||
* 保存前的数据校验 |
|||
*/ |
|||
private void validEntityBeforeSave(EvaluationTemplate entity){ |
|||
//TODO 做一些数据校验,如唯一约束
|
|||
} |
|||
|
|||
/** |
|||
* 校验并批量删除考核评分信息-模板信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
@Override |
|||
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) { |
|||
if(isValid){ |
|||
//TODO 做一些业务上的校验,判断是否需要校验
|
|||
} |
|||
return baseMapper.deleteByIds(ids) > 0; |
|||
} |
|||
|
|||
@Override |
|||
public List<EvaluationTemplate> queryByFlag(String flag) { |
|||
if (StringUtils.isNotBlank(flag)) { |
|||
LambdaQueryWrapper<EvaluationTemplate> lqw = Wrappers.lambdaQuery(); |
|||
lqw.eq(EvaluationTemplate::getFlag, flag); |
|||
List<EvaluationTemplate> evaluationTemplates = baseMapper.selectList(lqw); |
|||
|
|||
List<EvaluationTemplate> sortedRecords = evaluationTemplates.stream() |
|||
.sorted(Comparator.comparing(EvaluationTemplate::getLargeRating, |
|||
Comparator.nullsLast(Comparator.naturalOrder()))) |
|||
.collect(Collectors.toList()); |
|||
return sortedRecords; |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public int batchEdit(List<EvaluationTemplate> updateList) { |
|||
List<BatchResult> batchResults = baseMapper.updateById(updateList); |
|||
int size = batchResults.size(); |
|||
return size; |
|||
} |
|||
} |
@ -0,0 +1,130 @@ |
|||
package org.dromara.platform.service.impl; |
|||
|
|||
import org.dromara.common.core.utils.MapstructUtils; |
|||
import org.dromara.common.core.utils.StringUtils; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.stereotype.Service; |
|||
import org.dromara.platform.domain.bo.LargeRatingTypeBo; |
|||
import org.dromara.platform.domain.vo.LargeRatingTypeVo; |
|||
import org.dromara.platform.domain.LargeRatingType; |
|||
import org.dromara.platform.mapper.LargeRatingTypeMapper; |
|||
import org.dromara.platform.service.ILargeRatingTypeService; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Collection; |
|||
|
|||
/** |
|||
* 评分大类-类别Service业务层处理 |
|||
* |
|||
* @author gejunhao |
|||
* @date 2025-04-21 |
|||
*/ |
|||
@RequiredArgsConstructor |
|||
@Service |
|||
public class LargeRatingTypeServiceImpl implements ILargeRatingTypeService { |
|||
|
|||
private final LargeRatingTypeMapper baseMapper; |
|||
|
|||
/** |
|||
* 查询评分大类-类别 |
|||
* |
|||
* @param id 主键 |
|||
* @return 评分大类-类别 |
|||
*/ |
|||
@Override |
|||
public LargeRatingTypeVo queryById(String id){ |
|||
return baseMapper.selectVoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 分页查询评分大类-类别列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 评分大类-类别分页列表 |
|||
*/ |
|||
@Override |
|||
public TableDataInfo<LargeRatingTypeVo> queryPageList(LargeRatingTypeBo bo, PageQuery pageQuery) { |
|||
LambdaQueryWrapper<LargeRatingType> lqw = buildQueryWrapper(bo); |
|||
Page<LargeRatingTypeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
|||
return TableDataInfo.build(result); |
|||
} |
|||
|
|||
/** |
|||
* 查询符合条件的评分大类-类别列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 评分大类-类别列表 |
|||
*/ |
|||
@Override |
|||
public List<LargeRatingTypeVo> queryList(LargeRatingTypeBo bo) { |
|||
LambdaQueryWrapper<LargeRatingType> lqw = buildQueryWrapper(bo); |
|||
return baseMapper.selectVoList(lqw); |
|||
} |
|||
|
|||
private LambdaQueryWrapper<LargeRatingType> buildQueryWrapper(LargeRatingTypeBo bo) { |
|||
Map<String, Object> params = bo.getParams(); |
|||
LambdaQueryWrapper<LargeRatingType> lqw = Wrappers.lambdaQuery(); |
|||
lqw.like(StringUtils.isNotBlank(bo.getName()), LargeRatingType::getName, bo.getName()); |
|||
lqw.eq(bo.getStatus() != null, LargeRatingType::getStatus, bo.getStatus()); |
|||
return lqw; |
|||
} |
|||
|
|||
/** |
|||
* 新增评分大类-类别 |
|||
* |
|||
* @param bo 评分大类-类别 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
@Override |
|||
public Boolean insertByBo(LargeRatingTypeBo bo) { |
|||
LargeRatingType add = MapstructUtils.convert(bo, LargeRatingType.class); |
|||
validEntityBeforeSave(add); |
|||
boolean flag = baseMapper.insert(add) > 0; |
|||
if (flag) { |
|||
bo.setId(add.getId()); |
|||
} |
|||
return flag; |
|||
} |
|||
|
|||
/** |
|||
* 修改评分大类-类别 |
|||
* |
|||
* @param bo 评分大类-类别 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
@Override |
|||
public Boolean updateByBo(LargeRatingTypeBo bo) { |
|||
LargeRatingType update = MapstructUtils.convert(bo, LargeRatingType.class); |
|||
validEntityBeforeSave(update); |
|||
return baseMapper.updateById(update) > 0; |
|||
} |
|||
|
|||
/** |
|||
* 保存前的数据校验 |
|||
*/ |
|||
private void validEntityBeforeSave(LargeRatingType entity){ |
|||
//TODO 做一些数据校验,如唯一约束
|
|||
} |
|||
|
|||
/** |
|||
* 校验并批量删除评分大类-类别信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
@Override |
|||
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) { |
|||
if(isValid){ |
|||
//TODO 做一些业务上的校验,判断是否需要校验
|
|||
} |
|||
return baseMapper.deleteByIds(ids) > 0; |
|||
} |
|||
} |
Loading…
Reference in new issue