From 55877613dead713304823a786e0f1f3239a31614 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Fri, 10 Nov 2023 14:13:53 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=AF=94=E8=B5=9B=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E8=83=BD=E5=8A=9B=E8=AF=84=E4=BB=B7=202?= =?UTF-8?q?=E3=80=81=E4=B8=AA=E4=BA=BA=E8=83=BD=E5=8A=9B=E8=AF=84=E4=BB=B7?= =?UTF-8?q?=E6=B1=87=E6=80=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DepartAbilityEvaluationController.java | 157 ++++++++++++++ ...nalAbilityEvaluationCollectController.java | 150 +++++++++++++ .../PersonalAbilityEvaluationController.java | 7 + .../entity/DepartAbilityEvaluation.java | 150 +++++++++++++ .../PersonalAbilityEvaluationCollect.java | 162 ++++++++++++++ .../mapper/DepartAbilityEvaluationMapper.java | 17 ++ ...ersonalAbilityEvaluationCollectMapper.java | 17 ++ .../IDepartAbilityEvaluationService.java | 15 ++ ...rsonalAbilityEvaluationCollectService.java | 18 ++ .../IPersonalAbilityEvaluationService.java | 1 + .../DepartAbilityEvaluationServiceImpl.java | 89 ++++++++ ...alAbilityEvaluationCollectServiceImpl.java | 117 ++++++++++ .../PersonalAbilityEvaluationServiceImpl.java | 186 +++++++++++----- .../vue3/PersonalAbilityEvaluation.data.ts | 189 ---------------- .../PersonalAbilityEvaluation_menu_insert.sql | 26 --- .../src/main/resources/application-dev.yml | 2 + .../src/main/resources/application-prod.yml | 2 + .../depart/DepartAbilityEvaluation.api.ts | 81 +++++++ .../depart/DepartAbilityEvaluation.data.ts | 202 ++++++++++++++++++ .../depart/DepartAbilityEvaluationList.vue | 190 ++++++++++++++++ .../DepartAbilityEvaluationForm.vue | 70 ++++++ .../DepartAbilityEvaluationModal.vue | 4 +- .../PersonalAbilityEvaluationCollect.api.ts | 14 +- .../PersonalAbilityEvaluationCollect.data.ts | 202 ++++++++++++++++++ .../PersonalAbilityEvaluationCollectList.vue | 31 +-- .../PersonalAbilityEvaluationCollectForm.vue | 8 +- .../PersonalAbilityEvaluationCollectModal.vue | 66 ++++++ .../PersonalAbilityEvaluationList.vue | 11 +- .../committee/AnnualCompPointList.vue | 21 +- .../views/awardpersion/AwardPersionList.vue | 22 +- 30 files changed, 1919 insertions(+), 308 deletions(-) create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/DepartAbilityEvaluationController.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/PersonalAbilityEvaluationCollectController.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/DepartAbilityEvaluation.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/PersonalAbilityEvaluationCollect.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/mapper/DepartAbilityEvaluationMapper.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/mapper/PersonalAbilityEvaluationCollectMapper.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IDepartAbilityEvaluationService.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IPersonalAbilityEvaluationCollectService.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/DepartAbilityEvaluationServiceImpl.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationCollectServiceImpl.java delete mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation.data.ts delete mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation_menu_insert.sql create mode 100644 jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.api.ts create mode 100644 jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.data.ts create mode 100644 jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluationList.vue create mode 100644 jeecgboot-vue3-master/src/views/abilityEvaluation/depart/components/DepartAbilityEvaluationForm.vue rename jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/components/PersonalAbilityEvaluationModal.vue => jeecgboot-vue3-master/src/views/abilityEvaluation/depart/components/DepartAbilityEvaluationModal.vue (93%) rename jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation.api.ts => jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollect.api.ts (70%) create mode 100644 jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollect.data.ts rename jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluationList.vue => jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollectList.vue (80%) rename jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/components/PersonalAbilityEvaluationForm.vue => jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/components/PersonalAbilityEvaluationCollectForm.vue (92%) create mode 100644 jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/components/PersonalAbilityEvaluationCollectModal.vue diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/DepartAbilityEvaluationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/DepartAbilityEvaluationController.java new file mode 100644 index 000000000..3a92f3249 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/DepartAbilityEvaluationController.java @@ -0,0 +1,157 @@ +package org.jeecg.modules.demo.abilityEvaluation.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.demo.abilityEvaluation.entity.DepartAbilityEvaluation; +import org.jeecg.modules.demo.abilityEvaluation.service.IDepartAbilityEvaluationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; + +/** + * @Description: 院系年度能力评价 + * @Author: jeecg-boot + * @Date: 2023-11-09 + * @Version: V1.0 + */ +@Api(tags = "院系年度能力评价") +@RestController +@RequestMapping("/abilityEvaluation/departAbilityEvaluation") +@Slf4j +public class DepartAbilityEvaluationController extends JeecgController { + @Autowired + private IDepartAbilityEvaluationService departAbilityEvaluationService; + + /** + * 分页列表查询 + * + * @param departAbilityEvaluation + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "院系年度能力评价-分页列表查询") + @ApiOperation(value = "院系年度能力评价-分页列表查询", notes = "院系年度能力评价-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(DepartAbilityEvaluation departAbilityEvaluation, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(departAbilityEvaluation, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = departAbilityEvaluationService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param departAbilityEvaluation + * @return + */ + @ApiOperation(value = "院系年度能力评价-添加", notes = "院系年度能力评价-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody DepartAbilityEvaluation departAbilityEvaluation) { + departAbilityEvaluationService.collectAbilityEvaluation(departAbilityEvaluation); + return Result.OK("添加成功!"); + } + + @ApiOperation(value = "院系年度能力评价-重新汇算", notes = "院系年度能力评价-重新汇算") + @PostMapping(value = "/reCollectAbilityEvaluation") + public Result reCollectAbilityEvaluation(@RequestBody DepartAbilityEvaluation departAbilityEvaluation) { + departAbilityEvaluationService.collectAbilityEvaluation(departAbilityEvaluation); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param departAbilityEvaluation + * @return + */ + @ApiOperation(value = "院系年度能力评价-编辑", notes = "院系年度能力评价-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) + public Result edit(@RequestBody DepartAbilityEvaluation departAbilityEvaluation) { + departAbilityEvaluationService.updateById(departAbilityEvaluation); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @ApiOperation(value = "院系年度能力评价-通过id删除", notes = "院系年度能力评价-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + departAbilityEvaluationService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @ApiOperation(value = "院系年度能力评价-批量删除", notes = "院系年度能力评价-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { + this.departAbilityEvaluationService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "院系年度能力评价-通过id查询") + @ApiOperation(value = "院系年度能力评价-通过id查询", notes = "院系年度能力评价-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + DepartAbilityEvaluation departAbilityEvaluation = departAbilityEvaluationService.getById(id); + if (departAbilityEvaluation == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(departAbilityEvaluation); + } + + /** + * 导出excel + * + * @param request + * @param departAbilityEvaluation + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, DepartAbilityEvaluation departAbilityEvaluation) { + return super.exportXls(request, departAbilityEvaluation, DepartAbilityEvaluation.class, "院系年度能力评价"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, DepartAbilityEvaluation.class); + } + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/PersonalAbilityEvaluationCollectController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/PersonalAbilityEvaluationCollectController.java new file mode 100644 index 000000000..13d0d9489 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/PersonalAbilityEvaluationCollectController.java @@ -0,0 +1,150 @@ +package org.jeecg.modules.demo.abilityEvaluation.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluationCollect; +import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationCollectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; + +/** + * @Description: 个人能力评价 汇总 + * @Author: jeecg-boot + * @Date: 2023-11-09 + * @Version: V1.0 + */ +@Api(tags = "个人能力评价 汇总") +@RestController +@RequestMapping("/abilityEvaluation/personalAbilityEvaluationCollect") +@Slf4j +public class PersonalAbilityEvaluationCollectController extends JeecgController { + @Autowired + private IPersonalAbilityEvaluationCollectService personalAbilityEvaluationCollectService; + + /** + * 分页列表查询 + * + * @param personalAbilityEvaluationCollect + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "个人能力评价 汇总-分页列表查询") + @ApiOperation(value = "个人能力评价 汇总-分页列表查询", notes = "个人能力评价 汇总-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(PersonalAbilityEvaluationCollect personalAbilityEvaluationCollect, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(personalAbilityEvaluationCollect, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = personalAbilityEvaluationCollectService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param personalAbilityEvaluationCollect + * @return + */ + @ApiOperation(value = "个人能力评价 汇总-添加", notes = "个人能力评价 汇总-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody PersonalAbilityEvaluationCollect personalAbilityEvaluationCollect) { + personalAbilityEvaluationCollectService.save(personalAbilityEvaluationCollect); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param personalAbilityEvaluationCollect + * @return + */ + @ApiOperation(value = "个人能力评价 汇总-编辑", notes = "个人能力评价 汇总-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) + public Result edit(@RequestBody PersonalAbilityEvaluationCollect personalAbilityEvaluationCollect) { + personalAbilityEvaluationCollectService.updateById(personalAbilityEvaluationCollect); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @ApiOperation(value = "个人能力评价 汇总-通过id删除", notes = "个人能力评价 汇总-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + personalAbilityEvaluationCollectService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @ApiOperation(value = "个人能力评价 汇总-批量删除", notes = "个人能力评价 汇总-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { + this.personalAbilityEvaluationCollectService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "个人能力评价 汇总-通过id查询") + @ApiOperation(value = "个人能力评价 汇总-通过id查询", notes = "个人能力评价 汇总-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + PersonalAbilityEvaluationCollect personalAbilityEvaluationCollect = personalAbilityEvaluationCollectService.getById(id); + if (personalAbilityEvaluationCollect == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(personalAbilityEvaluationCollect); + } + + /** + * 导出excel + * + * @param request + * @param personalAbilityEvaluationCollect + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, PersonalAbilityEvaluationCollect personalAbilityEvaluationCollect) { + return super.exportXls(request, personalAbilityEvaluationCollect, PersonalAbilityEvaluationCollect.class, "个人能力评价 汇总"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, PersonalAbilityEvaluationCollect.class); + } + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/PersonalAbilityEvaluationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/PersonalAbilityEvaluationController.java index c6dd13cd7..e316be6a1 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/PersonalAbilityEvaluationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/controller/PersonalAbilityEvaluationController.java @@ -75,6 +75,13 @@ public class PersonalAbilityEvaluationController extends JeecgController personalAbilityEvaluation2(@RequestBody PersonalAbilityEvaluation personalAbilityEvaluation) { + personalAbilityEvaluationService.personalAbilityEvaluation2(personalAbilityEvaluation); + return Result.OK("操作成功!"); + } + /** * 编辑 * diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/DepartAbilityEvaluation.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/DepartAbilityEvaluation.java new file mode 100644 index 000000000..a7de9d187 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/DepartAbilityEvaluation.java @@ -0,0 +1,150 @@ +package org.jeecg.modules.demo.abilityEvaluation.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 院系年度能力评价 + * @Author: jeecg-boot + * @Date: 2023-11-09 + * @Version: V1.0 + */ +@Data +@TableName("depart_ability_evaluation") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "depart_ability_evaluation对象", description = "院系年度能力评价") +public class DepartAbilityEvaluation implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + /** + * 创建人 + */ + @ApiModelProperty(value = "创建人") + private String createBy; + /** + * 创建日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /** + * 更新人 + */ + @ApiModelProperty(value = "更新人") + private String updateBy; + /** + * 更新日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private Date updateTime; + /** + * 所属部门 + */ + @Excel(name = "所属部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @ApiModelProperty(value = "所属部门") + private String depetId; + /** + * 年度 + */ + @Excel(name = "年度", width = 15, dictTable = "annual", dicText = "annual_name", dicCode = "id") + @Dict(dictTable = "annual", dicText = "annual_name", dicCode = "id") + @ApiModelProperty(value = "年度") + private String annualId; + + /** + * 能力1 + */ + @Excel(name = "能力1", width = 15) + @ApiModelProperty(value = "能力1") + private Double soc1; + /** + * 能力2 + */ + @Excel(name = "能力2", width = 15) + @ApiModelProperty(value = "能力2") + private Double soc2; + /** + * 能力3 + */ + @Excel(name = "能力3", width = 15) + @ApiModelProperty(value = "能力3") + private Double soc3; + /** + * 能力4 + */ + @Excel(name = "能力4", width = 15) + @ApiModelProperty(value = "能力4") + private Double soc4; + /** + * 能力5 + */ + @Excel(name = "能力5", width = 15) + @ApiModelProperty(value = "能力5") + private Double soc5; + /** + * 能力6 + */ + @Excel(name = "能力6", width = 15) + @ApiModelProperty(value = "能力6") + private Double soc6; + /** + * 能力7 + */ + @Excel(name = "能力7", width = 15) + @ApiModelProperty(value = "能力7") + private Double soc7; + /** + * 能力8 + */ + @Excel(name = "能力8", width = 15) + @ApiModelProperty(value = "能力8") + private Double soc8; + /** + * 能力9 + */ + @Excel(name = "能力9", width = 15) + @ApiModelProperty(value = "能力9") + private Double soc9; + /** + * 能力10 + */ + @Excel(name = "能力10", width = 15) + @ApiModelProperty(value = "能力10") + private Double soc10; + /** + * 能力11 + */ + @Excel(name = "能力11", width = 15) + @ApiModelProperty(value = "能力11") + private Double soc11; + /** + * 能力12 + */ + @Excel(name = "能力12", width = 15) + @ApiModelProperty(value = "能力12") + private Double soc12; +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/PersonalAbilityEvaluationCollect.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/PersonalAbilityEvaluationCollect.java new file mode 100644 index 000000000..ad215108c --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/entity/PersonalAbilityEvaluationCollect.java @@ -0,0 +1,162 @@ +package org.jeecg.modules.demo.abilityEvaluation.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 个人能力评价 汇总 + * @Author: jeecg-boot + * @Date: 2023-11-09 + * @Version: V1.0 + */ +@Data +@TableName("personal_ability_evaluation_collect") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "personal_ability_evaluation_collect对象", description = "个人能力评价 汇总") +public class PersonalAbilityEvaluationCollect implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + /** + * 创建人 + */ + @ApiModelProperty(value = "创建人") + private String createBy; + /** + * 创建日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /** + * 更新人 + */ + @ApiModelProperty(value = "更新人") + private String updateBy; + /** + * 更新日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private Date updateTime; + + /** + * 年度比赛项目id + */ + private String annualCompP; + + + /** + * 所属部门 + */ + @Excel(name = "所属部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @ApiModelProperty(value = "所属部门") + private String depetId; + /** + * 学号 + */ + @Excel(name = "学号", width = 15) + @ApiModelProperty(value = "学号") + private String workOn; + /** + * 姓名 + */ + @Excel(name = "姓名", width = 15) + @ApiModelProperty(value = "姓名") + private String name; + + /** + * 能力1 + */ + @Excel(name = "能力1", width = 15) + @ApiModelProperty(value = "能力1") + private Double soc1; + /** + * 能力2 + */ + @Excel(name = "能力2", width = 15) + @ApiModelProperty(value = "能力2") + private Double soc2; + /** + * 能力3 + */ + @Excel(name = "能力3", width = 15) + @ApiModelProperty(value = "能力3") + private Double soc3; + /** + * 能力4 + */ + @Excel(name = "能力4", width = 15) + @ApiModelProperty(value = "能力4") + private Double soc4; + /** + * 能力5 + */ + @Excel(name = "能力5", width = 15) + @ApiModelProperty(value = "能力5") + private Double soc5; + /** + * 能力6 + */ + @Excel(name = "能力6", width = 15) + @ApiModelProperty(value = "能力6") + private Double soc6; + /** + * 能力7 + */ + @Excel(name = "能力7", width = 15) + @ApiModelProperty(value = "能力7") + private Double soc7; + /** + * 能力8 + */ + @Excel(name = "能力8", width = 15) + @ApiModelProperty(value = "能力8") + private Double soc8; + /** + * 能力9 + */ + @Excel(name = "能力9", width = 15) + @ApiModelProperty(value = "能力9") + private Double soc9; + /** + * 能力10 + */ + @Excel(name = "能力10", width = 15) + @ApiModelProperty(value = "能力10") + private Double soc10; + /** + * 能力11 + */ + @Excel(name = "能力11", width = 15) + @ApiModelProperty(value = "能力11") + private Double soc11; + /** + * 能力12 + */ + @Excel(name = "能力12", width = 15) + @ApiModelProperty(value = "能力12") + private Double soc12; +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/mapper/DepartAbilityEvaluationMapper.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/mapper/DepartAbilityEvaluationMapper.java new file mode 100644 index 000000000..ebfaa9c5d --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/mapper/DepartAbilityEvaluationMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.abilityEvaluation.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.abilityEvaluation.entity.DepartAbilityEvaluation; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 院系年度能力评价 + * @Author: jeecg-boot + * @Date: 2023-11-09 + * @Version: V1.0 + */ +public interface DepartAbilityEvaluationMapper extends BaseMapper { + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/mapper/PersonalAbilityEvaluationCollectMapper.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/mapper/PersonalAbilityEvaluationCollectMapper.java new file mode 100644 index 000000000..23a8529a7 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/mapper/PersonalAbilityEvaluationCollectMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.abilityEvaluation.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluationCollect; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 个人能力评价 汇总 + * @Author: jeecg-boot + * @Date: 2023-11-09 + * @Version: V1.0 + */ +public interface PersonalAbilityEvaluationCollectMapper extends BaseMapper { + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IDepartAbilityEvaluationService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IDepartAbilityEvaluationService.java new file mode 100644 index 000000000..feafabeff --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IDepartAbilityEvaluationService.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.demo.abilityEvaluation.service; + +import org.jeecg.modules.demo.abilityEvaluation.entity.DepartAbilityEvaluation; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 院系年度能力评价 + * @Author: jeecg-boot + * @Date: 2023-11-09 + * @Version: V1.0 + */ +public interface IDepartAbilityEvaluationService extends IService { + + void collectAbilityEvaluation(DepartAbilityEvaluation departAbilityEvaluation); +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IPersonalAbilityEvaluationCollectService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IPersonalAbilityEvaluationCollectService.java new file mode 100644 index 000000000..d007f9ef1 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IPersonalAbilityEvaluationCollectService.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.demo.abilityEvaluation.service; + +import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation; +import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluationCollect; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * @Description: 个人能力评价 汇总 + * @Author: jeecg-boot + * @Date: 2023-11-09 + * @Version: V1.0 + */ +public interface IPersonalAbilityEvaluationCollectService extends IService { + + void batchSave(String projectId); +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IPersonalAbilityEvaluationService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IPersonalAbilityEvaluationService.java index 06dc6a9ff..2bce12793 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IPersonalAbilityEvaluationService.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/IPersonalAbilityEvaluationService.java @@ -13,4 +13,5 @@ public interface IPersonalAbilityEvaluationService extends IService implements IDepartAbilityEvaluationService { + + @Autowired + private IPersonalAbilityEvaluationService iPersonalAbilityEvaluationService; + + @Override + public void collectAbilityEvaluation(DepartAbilityEvaluation departAbilityEvaluation) { + + List abilityEvaluationList = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper() + .eq(PersonalAbilityEvaluation::getAnnualId, departAbilityEvaluation.getAnnualId()) + .eq(PersonalAbilityEvaluation::getDepetId, departAbilityEvaluation.getDepetId()) + ); + + double sum4Soc1 = 0; + double sum4Soc2 = 0; + double sum4Soc3 = 0; + double sum4Soc4 = 0; + double sum4Soc5 = 0; + double sum4Soc6 = 0; + double sum4Soc7 = 0; + double sum4Soc8 = 0; + double sum4Soc9 = 0; + double sum4Soc10 = 0; + double sum4Soc11 = 0; + double sum4Soc12 = 0; + if (!ObjectUtils.isEmpty(abilityEvaluationList)) { + sum4Soc1 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc1()).sum(); + sum4Soc2 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc2()).sum(); + sum4Soc3 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc3()).sum(); + sum4Soc4 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc4()).sum(); + sum4Soc5 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc5()).sum(); + sum4Soc6 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc6()).sum(); + sum4Soc7 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc7()).sum(); + sum4Soc8 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc8()).sum(); + sum4Soc9 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc9()).sum(); + sum4Soc10 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc10()).sum(); + sum4Soc11 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc11()).sum(); + sum4Soc12 = abilityEvaluationList.stream().mapToDouble(b -> b.getSoc12()).sum(); + } + + departAbilityEvaluation.setSoc1(sum4Soc1); + departAbilityEvaluation.setSoc2(sum4Soc2); + departAbilityEvaluation.setSoc3(sum4Soc3); + departAbilityEvaluation.setSoc4(sum4Soc4); + departAbilityEvaluation.setSoc5(sum4Soc5); + departAbilityEvaluation.setSoc6(sum4Soc6); + departAbilityEvaluation.setSoc7(sum4Soc7); + departAbilityEvaluation.setSoc8(sum4Soc8); + departAbilityEvaluation.setSoc9(sum4Soc9); + departAbilityEvaluation.setSoc10(sum4Soc10); + departAbilityEvaluation.setSoc11(sum4Soc11); + departAbilityEvaluation.setSoc12(sum4Soc12); + + //id不为空,院系的某一年度已汇总过,重新汇算 + if (StringUtils.isNotBlank(departAbilityEvaluation.getId())) { + departAbilityEvaluation.setUpdateTime(new Date()); + this.updateById(departAbilityEvaluation); + } else { + //首次汇总 + departAbilityEvaluation.setCreateTime(new Date()); + this.save(departAbilityEvaluation); + } + + } +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationCollectServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationCollectServiceImpl.java new file mode 100644 index 000000000..2834ecc17 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationCollectServiceImpl.java @@ -0,0 +1,117 @@ +package org.jeecg.modules.demo.abilityEvaluation.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation; +import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluationCollect; +import org.jeecg.modules.demo.abilityEvaluation.mapper.PersonalAbilityEvaluationCollectMapper; +import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationCollectService; +import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationService; +import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.TeamManagement; +import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.ITeamManagementService; +import org.jeecg.modules.system.entity.SysDepart; +import org.jeecg.modules.system.entity.SysUser; +import org.jeecg.modules.system.service.ISysDepartService; +import org.jeecg.modules.system.service.ISysUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; + +import java.util.LinkedList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @Description: 个人能力评价 汇总 + * @Author: jeecg-boot + * @Date: 2023-11-09 + * @Version: V1.0 + */ +@Service +public class PersonalAbilityEvaluationCollectServiceImpl extends ServiceImpl implements IPersonalAbilityEvaluationCollectService { + + + @Autowired + private IPersonalAbilityEvaluationService iPersonalAbilityEvaluationService; + + @Autowired + private ISysDepartService iSysDepartService; + + @Autowired + private ITeamManagementService iTeamManagementService; + + @Autowired + private ISysUserService iSysUserService; + + /** + * @description: 每次先删除,然后再汇总本次项目下所有参赛者的个人能力量化 + * @param: [projectId] + * @return: void + * @author: z.h.c + * @date: 23/11/10 08:11 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void batchSave(String projectId) { + + //删除该项目下所有人的能力量化汇总数据 + this.remove(new LambdaQueryWrapper() + .eq(PersonalAbilityEvaluationCollect::getAnnualCompP, projectId)); + + List saveList = new LinkedList<>(); + + //该项目,本次新增的个人能力数据 + List evaluationList = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper() + .eq(PersonalAbilityEvaluation::getAnnualCompP, projectId)); + + // 报名编号列表,要重新汇总的个人能力 + List enrollCodeList = evaluationList.stream().map(b -> b.getEnrollCode()).collect(Collectors.toList()); + if (!ObjectUtils.isEmpty(enrollCodeList)) { + for (String enrollCode : enrollCodeList) { + //查询每个人的个人能力数据,用于重新汇总 + List list4UserAbilityEvaluation = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper() + .eq(PersonalAbilityEvaluation::getEnrollCode, enrollCode)); + + if (!ObjectUtils.isEmpty(list4UserAbilityEvaluation)) { + double sum4Soc1 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc1()).sum(); + double sum4Soc2 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc2()).sum(); + double sum4Soc3 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc3()).sum(); + double sum4Soc4 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc4()).sum(); + double sum4Soc5 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc5()).sum(); + double sum4Soc6 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc6()).sum(); + double sum4Soc7 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc7()).sum(); + double sum4Soc8 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc8()).sum(); + double sum4Soc9 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc9()).sum(); + double sum4Soc10 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc10()).sum(); + double sum4Soc11 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc11()).sum(); + double sum4Soc12 = list4UserAbilityEvaluation.stream().mapToDouble(b -> b.getSoc12()).sum(); + + PersonalAbilityEvaluationCollect person = new PersonalAbilityEvaluationCollect(); + person.setAnnualCompP(projectId); + TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper() + .eq(TeamManagement::getEnrollCode, enrollCode)); + SysUser sysUser = iSysUserService.getById(management.getUserId()); + person.setWorkOn(sysUser.getWorkNo()); + person.setName(sysUser.getRealname()); + SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode()); + person.setDepetId(sysDepart.getId()); + person.setSoc1(sum4Soc1); + person.setSoc2(sum4Soc2); + person.setSoc3(sum4Soc3); + person.setSoc4(sum4Soc4); + person.setSoc5(sum4Soc5); + person.setSoc6(sum4Soc6); + person.setSoc7(sum4Soc7); + person.setSoc8(sum4Soc8); + person.setSoc9(sum4Soc9); + person.setSoc10(sum4Soc10); + person.setSoc11(sum4Soc11); + person.setSoc12(sum4Soc12); + saveList.add(person); + } + } + this.saveBatch(saveList); + } + } +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java index 725356bcf..0d5df8377 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/service/impl/PersonalAbilityEvaluationServiceImpl.java @@ -6,6 +6,7 @@ import org.apache.commons.lang3.StringUtils; import org.jeecg.common.util.ComputeUtils; import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation; import org.jeecg.modules.demo.abilityEvaluation.mapper.PersonalAbilityEvaluationMapper; +import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationCollectService; import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationService; import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService; @@ -25,10 +26,13 @@ import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.system.service.ISysUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; import org.springframework.util.ObjectUtils; +import java.util.LinkedList; import java.util.List; +import java.util.Optional; /** * @Description: 个人能力评价 @@ -63,6 +67,9 @@ public class PersonalAbilityEvaluationServiceImpl extends ServiceImpl() +// .eq(TeamManagement::getEnrollCode, enrollCode)); +// if (ObjectUtils.isEmpty(management)) return; +// +// +// //根据年度比赛项目和报名编号查询 查询个人获奖表 +// AwardPersion awardPersion = iAwardPersionService.getOne(new LambdaQueryWrapper() +// .eq(AwardPersion::getAnnualCompP, projectId) +// .eq(AwardPersion::getEnrollCode, enrollCode) +// .last("limit 1")); +// +// if (ObjectUtils.isEmpty(awardPersion)) return; +// +// //查询获奖个人对应的分数 +// ScorePersion scorePersion = iScorePersionService.getOne(new LambdaQueryWrapper() +// .eq(ScorePersion::getEnrollCode, enrollCode) +// .eq(ScorePersion::getAnnualCompP, projectId) +// .last("limit 1")); +// if (ObjectUtils.isEmpty(scorePersion)) return; +// +// String score = scorePersion.getScore(); +// if (StringUtils.isBlank(score)) return; +// +// Double score_d = Double.valueOf(score); +// +// PersonalAbilityEvaluation person = new PersonalAbilityEvaluation(); +// person.setAnnualId(annualComp.getAnnualid()); +// person.setAnnualCompId(annualCompPoint.getAnnualCompId()); +// person.setAnnualCompP(projectId); +// SysUser sysUser = iSysUserService.getById(management.getUserId()); +// person.setWorkOn(sysUser.getWorkNo()); +// person.setName(sysUser.getRealname()); +// SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode()); +// person.setDepetId(sysDepart.getId()); +// +// //查询项目各能力权值 +// List compskillList = iCompskillService.list(new LambdaQueryWrapper().eq(Compskill::getAnnucompid, projectId)); +// if (!ObjectUtils.isEmpty(compskillList)) { +// //计算能力量化各类指标 能力量化值 = 直接按项目的能力权值和项目奖项得分算 +// //能力量化值 = 项目得分*项目的能力权值/100 +// this.convertScore(compskillList, person, score_d); +// } +// this.save(person); + } - //年度比赛项目 - AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(projectId); - Assert.notNull(annualCompPoint, "年度比赛项目不存在"); + + /** + * @description: + * 1、在年度项目管理操作列,添加“个人能力评价”操作, + * 2、个人能力评价可以重复操作 + * 3、在个人能力评价中自动完成个人能力汇总功能, + * 4、实现方法:每次操作个人能力评价都删除该项目下的个人能力评价数据和个人能力评价汇总数据,再重新增加 + * @param: [param] + * @return: void + * @author: z.h.c + * @date: 23/11/9 16:45 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void personalAbilityEvaluation2(PersonalAbilityEvaluation param) { + + //年度比赛id + String annualCompId = param.getAnnualCompId(); + //年度比赛项目id + String projectId = param.getId(); //年度比赛 - AnnualComp annualComp = iAnnualCompService.getById(annualCompPoint.getAnnualCompId()); + AnnualComp annualComp = iAnnualCompService.getById(annualCompId); if (ObjectUtils.isEmpty(annualComp)) return; - TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper() - .eq(TeamManagement::getEnrollCode, enrollCode)); - if (ObjectUtils.isEmpty(management)) return; - - - //根据年度比赛项目和报名编号查询 查询个人获奖表 - AwardPersion awardPersion = iAwardPersionService.getOne(new LambdaQueryWrapper() - .eq(AwardPersion::getAnnualCompP, projectId) - .eq(AwardPersion::getEnrollCode, enrollCode) - .last("limit 1")); - - if (ObjectUtils.isEmpty(awardPersion)) return; - - //查询获奖个人对应的分数 - ScorePersion scorePersion = iScorePersionService.getOne(new LambdaQueryWrapper() - .eq(ScorePersion::getEnrollCode, enrollCode) - .eq(ScorePersion::getAnnualCompP, projectId) - .last("limit 1")); - if (ObjectUtils.isEmpty(scorePersion)) return; - - String score = scorePersion.getScore(); - if (StringUtils.isBlank(score)) return; - - Double score_d = Double.valueOf(score); - - PersonalAbilityEvaluation person = new PersonalAbilityEvaluation(); - person.setAnnualId(annualComp.getAnnualid()); - person.setAnnualCompId(annualCompPoint.getAnnualCompId()); - person.setAnnualCompP(projectId); - SysUser sysUser = iSysUserService.getById(management.getUserId()); - person.setWorkOn(sysUser.getWorkNo()); - person.setName(sysUser.getRealname()); - SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode()); - person.setDepetId(sysDepart.getId()); - - //查询项目各能力权值 - List compskillList = iCompskillService.list(new LambdaQueryWrapper().eq(Compskill::getAnnucompid, projectId)); - if (!ObjectUtils.isEmpty(compskillList)) { - //计算能力量化各类指标 能力量化值 = 直接按项目的能力权值和项目奖项得分算 - //能力量化值 = 项目得分*项目的能力权值/100 - this.convertScore(compskillList, person, score_d); - } - this.save(person); + //年度比赛项目,状态为已评奖时才能进行能力评价 + AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(projectId); + if (ObjectUtils.isEmpty(annualCompPoint)) return; + + //根据年度比赛项目查询个人获奖表 + List awardPersionList = iAwardPersionService.list(new LambdaQueryWrapper().eq(AwardPersion::getAnnualCompP, projectId)); + + List saveList = new LinkedList<>(); + Optional.ofNullable(awardPersionList).orElse(new LinkedList<>()).forEach(e -> { + //查询获奖个人对应的分数 + ScorePersion scorePersion = iScorePersionService.getOne(new LambdaQueryWrapper() + .eq(ScorePersion::getEnrollCode, e.getEnrollCode()) + .eq(ScorePersion::getAnnualCompP, projectId) + .last("limit 1")); + + if (!ObjectUtils.isEmpty(scorePersion) && StringUtils.isNotBlank(scorePersion.getScore())) { + PersonalAbilityEvaluation person = new PersonalAbilityEvaluation(); + person.setAnnualId(annualComp.getAnnualid()); + person.setAnnualCompId(annualCompPoint.getAnnualCompId()); + person.setAnnualCompP(projectId); + TeamManagement management = iTeamManagementService.getOne(new LambdaQueryWrapper() + .eq(TeamManagement::getEnrollCode, e.getEnrollCode())); + SysUser sysUser = iSysUserService.getById(management.getUserId()); + person.setWorkOn(sysUser.getWorkNo()); + person.setName(sysUser.getRealname()); + SysDepart sysDepart = iSysDepartService.getById(sysUser.getOrgCode()); + person.setDepetId(sysDepart.getId()); + + //查询项目各能力权值 + List compskillList = iCompskillService.list(new LambdaQueryWrapper().eq(Compskill::getAnnucompid, projectId)); + if (!ObjectUtils.isEmpty(compskillList)) { + //计算能力量化各类指标 能力量化值 = 直接按项目的能力权值和项目奖项得分算 + //能力量化值 = 项目得分*项目的能力权值/100 + this.convertScore(compskillList, person, Double.valueOf(scorePersion.getScore())); + } + saveList.add(person); + } + }); + + //删除该项目下所有人的能力量化数据 + this.remove(new LambdaQueryWrapper() + .eq(PersonalAbilityEvaluation::getAnnualCompP, projectId)); + + //新增个人能力量化 + this.saveBatch(saveList); + //新增个人能力量化汇总 + iPersonalAbilityEvaluationCollectService.batchSave(projectId); } + PersonalAbilityEvaluation convertScore(List compskillList, PersonalAbilityEvaluation person, final double score_d) { for (int i = 1; i <= compskillList.size(); i++) { diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation.data.ts b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation.data.ts deleted file mode 100644 index 0ae55b002..000000000 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation.data.ts +++ /dev/null @@ -1,189 +0,0 @@ -import {BasicColumn} from '/@/components/Table'; -import {FormSchema} from '/@/components/Table'; -import { rules} from '/@/utils/helper/validator'; -import { render } from '/@/utils/common/renderUtils'; -//列表数据 -export const columns: BasicColumn[] = [ - { - title: '年度', - align:"center", - dataIndex: 'annualId_dictText' - }, - { - title: '年度比赛', - align:"center", - dataIndex: 'annualCompId_dictText' - }, - { - title: '年度比赛项目', - align:"center", - dataIndex: 'annualCompP_dictText' - }, - { - title: '学号', - align:"center", - dataIndex: 'workOn' - }, - { - title: '姓名', - align:"center", - dataIndex: 'name' - }, - { - title: '能力1', - align:"center", - dataIndex: 'soc1' - }, - { - title: '能力2', - align:"center", - dataIndex: 'soc2' - }, - { - title: '能力3', - align:"center", - dataIndex: 'soc3' - }, - { - title: '能力4', - align:"center", - dataIndex: 'soc4' - }, - { - title: '能力5', - align:"center", - dataIndex: 'soc5' - }, - { - title: '能力6', - align:"center", - dataIndex: 'soc6' - }, - { - title: '能力7', - align:"center", - dataIndex: 'soc7' - }, - { - title: '能力8', - align:"center", - dataIndex: 'soc8' - }, - { - title: '能力9', - align:"center", - dataIndex: 'soc9' - }, - { - title: '能力10', - align:"center", - dataIndex: 'soc10' - }, - { - title: '能力11', - align:"center", - dataIndex: 'soc11' - }, - { - title: '能力12', - align:"center", - dataIndex: 'soc12' - }, -]; -//查询数据 -export const searchFormSchema: FormSchema[] = [ - { - label: "所属部门", - field: 'depetId', - component: 'JDictSelectTag', - componentProps:{ - dictCode:"sys_depart,depart_name,id" - }, - colProps: {span: 6}, - }, - { - label: "年度", - field: 'annualId', - component: 'JDictSelectTag', - componentProps:{ - dictCode:"annual,annual_name,id" - }, - colProps: {span: 6}, - }, - { - label: "年度比赛项目", - field: 'annualCompP', - component: 'JDictSelectTag', - componentProps:{ - dictCode:"annual_comp_point,obj_name,id" - }, - colProps: {span: 6}, - }, - { - label: "学号", - field: 'workOn', - component: 'Input', - colProps: {span: 6}, - }, - { - label: "姓名", - field: 'name', - component: 'Input', - colProps: {span: 6}, - }, -]; -//表单数据 -export const formSchema: FormSchema[] = [ - { - label: '年度', - field: 'annualId', - component: 'JDictSelectTag', - componentProps:{ - dictCode:"annual,annual_name,id" - }, - }, - { - label: '年度比赛', - field: 'annualCompId', - component: 'JDictSelectTag', - componentProps:{ - dictCode:"" - }, - }, - { - label: '年度比赛项目', - field: 'annualCompP', - component: 'JDictSelectTag', - componentProps:{ - dictCode:"annual_comp_point,obj_name,id" - }, - }, - { - label: '学号', - field: 'workOn', - component: 'Input', - }, - { - label: '姓名', - field: 'name', - component: 'Input', - }, - // TODO 主键隐藏字段,目前写死为ID - { - label: '', - field: 'id', - component: 'Input', - show: false - }, -]; - - - -/** -* 流程表单调用这个方法获取formSchema -* @param param -*/ -export function getBpmFormSchema(_formData): FormSchema[]{ - // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema - return formSchema; -} \ No newline at end of file diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation_menu_insert.sql b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation_menu_insert.sql deleted file mode 100644 index a0264633c..000000000 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation_menu_insert.sql +++ /dev/null @@ -1,26 +0,0 @@ --- 注意:该页面对应的前台目录为views/abilityEvaluation文件夹下 --- 如果你想更改到其他目录,请修改sql中component字段对应的值 - - -INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) -VALUES ('2023110705066770200', NULL, '个人能力评价', '/abilityEvaluation/personalAbilityEvaluationList', 'abilityEvaluation/PersonalAbilityEvaluationList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0); - --- 权限控制sql --- 新增 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023110705066770201', '2023110705066770200', '添加个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0); --- 编辑 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023110705066770202', '2023110705066770200', '编辑个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0); --- 删除 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023110705066770203', '2023110705066770200', '删除个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0); --- 批量删除 -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023110705066770204', '2023110705066770200', '批量删除个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0); --- 导出excel -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023110705066770205', '2023110705066770200', '导出excel_个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0); --- 导入excel -INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023110705066770206', '2023110705066770200', '导入excel_个人能力评价', NULL, NULL, 0, NULL, NULL, 2, 'abilityEvaluation:personal_ability_evaluation:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-11-07 17:06:20', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecg-boot-master/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml b/jeecg-boot-master/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml index e6cc9a4fe..b491ccece 100644 --- a/jeecg-boot-master/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml +++ b/jeecg-boot-master/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml @@ -20,6 +20,8 @@ management: include: metrics,httptrace spring: + main: + allow-circular-references: true servlet: multipart: max-file-size: 10MB diff --git a/jeecg-boot-master/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml b/jeecg-boot-master/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml index d334f463d..e3a9dfc12 100644 --- a/jeecg-boot-master/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml +++ b/jeecg-boot-master/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml @@ -20,6 +20,8 @@ management: include: metrics,httptrace spring: + main: + allow-circular-references: true servlet: multipart: max-file-size: 10MB diff --git a/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.api.ts b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.api.ts new file mode 100644 index 000000000..217517ae7 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.api.ts @@ -0,0 +1,81 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/abilityEvaluation/departAbilityEvaluation/list', + save='/abilityEvaluation/departAbilityEvaluation/add', + edit='/abilityEvaluation/departAbilityEvaluation/edit', + deleteOne = '/abilityEvaluation/departAbilityEvaluation/delete', + deleteBatch = '/abilityEvaluation/departAbilityEvaluation/deleteBatch', + importExcel = '/abilityEvaluation/departAbilityEvaluation/importExcel', + exportXls = '/abilityEvaluation/departAbilityEvaluation/exportXls', + collectAbilityEvaluation = '/abilityEvaluation/departAbilityEvaluation/reCollectAbilityEvaluation', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} + +// 院系总积分 重新汇总 +export const reCollectAbilityEvaluation = (params,handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认操作', + content: '确认发送请求吗', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.post({url: Api.collectAbilityEvaluation,params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} diff --git a/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.data.ts b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.data.ts new file mode 100644 index 000000000..56090e422 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluation.data.ts @@ -0,0 +1,202 @@ +import {BasicColumn, FormSchema} from '/@/components/Table'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '所属部门', + align: "center", + dataIndex: 'depetId_dictText' + }, + { + title: '年度', + align: "center", + dataIndex: 'annualId_dictText' + }, + { + title: '能力1', + align: "center", + dataIndex: 'soc1' + }, + { + title: '能力2', + align: "center", + dataIndex: 'soc2' + }, + { + title: '能力3', + align: "center", + dataIndex: 'soc3' + }, + { + title: '能力4', + align: "center", + dataIndex: 'soc4' + }, + { + title: '能力5', + align: "center", + dataIndex: 'soc5' + }, + { + title: '能力6', + align: "center", + dataIndex: 'soc6' + }, + { + title: '能力7', + align: "center", + dataIndex: 'soc7' + }, + { + title: '能力8', + align: "center", + dataIndex: 'soc8' + }, + { + title: '能力9', + align: "center", + dataIndex: 'soc9' + }, + { + title: '能力10', + align: "center", + dataIndex: 'soc10' + }, + { + title: '能力11', + align: "center", + dataIndex: 'soc11' + }, + { + title: '能力12', + align: "center", + dataIndex: 'soc12' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "所属部门", + field: 'depetId', + component: 'JDictSelectTag', + componentProps: { + dictCode: "sys_depart,depart_name,id" + }, + colProps: {span: 6}, + }, + { + label: "年度", + field: 'annualId', + component: 'JDictSelectTag', + componentProps: { + dictCode: "annual,annual_name,id" + }, + colProps: {span: 6}, + }, +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '所属部门', + field: 'depetId', + component: 'JDictSelectTag', + componentProps: { + dictCode: "sys_depart,depart_name,id" + }, + dynamicRules: ({model, schema}) => { + return [ + {required: true, message: '请输入所属部门!'}, + ]; + }, + }, + { + label: '年度', + field: 'annualId', + component: 'JDictSelectTag', + componentProps: { + dictCode: "annual,annual_name,id" + }, + dynamicRules: ({model, schema}) => { + return [ + {required: true, message: '请输入年度!'}, + ]; + }, + }, + { + label: '能力1', + field: 'soc1', + component: 'InputNumber', + }, + { + label: '能力2', + field: 'soc2', + component: 'InputNumber', + }, + { + label: '能力3', + field: 'soc3', + component: 'InputNumber', + }, + { + label: '能力4', + field: 'soc4', + component: 'InputNumber', + }, + { + label: '能力5', + field: 'soc5', + component: 'InputNumber', + }, + { + label: '能力6', + field: 'soc6', + component: 'InputNumber', + }, + { + label: '能力7', + field: 'soc7', + component: 'InputNumber', + }, + { + label: '能力8', + field: 'soc8', + component: 'InputNumber', + }, + { + label: '能力9', + field: 'soc9', + component: 'InputNumber', + }, + { + label: '能力10', + field: 'soc10', + component: 'InputNumber', + }, + { + label: '能力11', + field: 'soc11', + component: 'InputNumber', + }, + { + label: '能力12', + field: 'soc12', + component: 'InputNumber', + }, + + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + + +/** + * 流程表单调用这个方法获取formSchema + * @param param + */ +export function getBpmFormSchema(_formData): FormSchema[] { + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} diff --git a/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluationList.vue b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluationList.vue new file mode 100644 index 000000000..5898e9063 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/DepartAbilityEvaluationList.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/components/DepartAbilityEvaluationForm.vue b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/components/DepartAbilityEvaluationForm.vue new file mode 100644 index 000000000..63599e263 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/components/DepartAbilityEvaluationForm.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/components/PersonalAbilityEvaluationModal.vue b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/components/DepartAbilityEvaluationModal.vue similarity index 93% rename from jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/components/PersonalAbilityEvaluationModal.vue rename to jeecgboot-vue3-master/src/views/abilityEvaluation/depart/components/DepartAbilityEvaluationModal.vue index c94da9aaf..dde4c09ef 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/components/PersonalAbilityEvaluationModal.vue +++ b/jeecgboot-vue3-master/src/views/abilityEvaluation/depart/components/DepartAbilityEvaluationModal.vue @@ -8,8 +8,8 @@ import {ref, computed, unref} from 'vue'; import {BasicModal, useModalInner} from '/@/components/Modal'; import {BasicForm, useForm} from '/@/components/Form/index'; - import {formSchema} from '../PersonalAbilityEvaluation.data'; - import {saveOrUpdate} from '../PersonalAbilityEvaluation.api'; + import {formSchema} from '../DepartAbilityEvaluation.data'; + import {saveOrUpdate} from '../DepartAbilityEvaluation.api'; // Emits声明 const emit = defineEmits(['register','success']); const isUpdate = ref(true); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation.api.ts b/jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollect.api.ts similarity index 70% rename from jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation.api.ts rename to jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollect.api.ts index 04b796e33..3b446dde6 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluation.api.ts +++ b/jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollect.api.ts @@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage"; const { createConfirm } = useMessage(); enum Api { - list = '/abilityEvaluation/personalAbilityEvaluation/list', - save='/abilityEvaluation/personalAbilityEvaluation/add', - edit='/abilityEvaluation/personalAbilityEvaluation/edit', - deleteOne = '/abilityEvaluation/personalAbilityEvaluation/delete', - deleteBatch = '/abilityEvaluation/personalAbilityEvaluation/deleteBatch', - importExcel = '/abilityEvaluation/personalAbilityEvaluation/importExcel', - exportXls = '/abilityEvaluation/personalAbilityEvaluation/exportXls', + list = '/abilityEvaluation/personalAbilityEvaluationCollect/list', + save='/abilityEvaluation/personalAbilityEvaluationCollect/add', + edit='/abilityEvaluation/personalAbilityEvaluationCollect/edit', + deleteOne = '/abilityEvaluation/personalAbilityEvaluationCollect/delete', + deleteBatch = '/abilityEvaluation/personalAbilityEvaluationCollect/deleteBatch', + importExcel = '/abilityEvaluation/personalAbilityEvaluationCollect/importExcel', + exportXls = '/abilityEvaluation/personalAbilityEvaluationCollect/exportXls', } /** * 导出api diff --git a/jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollect.data.ts b/jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollect.data.ts new file mode 100644 index 000000000..7221cf4b2 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollect.data.ts @@ -0,0 +1,202 @@ +import {BasicColumn, FormSchema} from '/@/components/Table'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '所属部门', + align: "center", + dataIndex: 'depetId_dictText' + }, + { + title: '学号', + align: "center", + dataIndex: 'workOn' + }, + { + title: '姓名', + align: "center", + dataIndex: 'name' + }, + { + title: '能力1', + align: "center", + dataIndex: 'soc1' + }, + { + title: '能力2', + align: "center", + dataIndex: 'soc2' + }, + { + title: '能力3', + align: "center", + dataIndex: 'soc3' + }, + { + title: '能力4', + align: "center", + dataIndex: 'soc4' + }, + { + title: '能力5', + align: "center", + dataIndex: 'soc5' + }, + { + title: '能力6', + align: "center", + dataIndex: 'soc6' + }, + { + title: '能力7', + align: "center", + dataIndex: 'soc7' + }, + { + title: '能力8', + align: "center", + dataIndex: 'soc8' + }, + { + title: '能力9', + align: "center", + dataIndex: 'soc9' + }, + { + title: '能力10', + align: "center", + dataIndex: 'soc10' + }, + { + title: '能力11', + align: "center", + dataIndex: 'soc11' + }, + { + title: '能力12', + align: "center", + dataIndex: 'soc12' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "所属部门", + field: 'depetId', + component: 'JDictSelectTag', + componentProps: { + dictCode: "sys_depart,depart_name,id" + }, + colProps: {span: 6}, + }, + { + label: "学号", + field: 'workOn', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "姓名", + field: 'name', + component: 'Input', + colProps: {span: 6}, + }, +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '所属部门', + field: 'depetId', + component: 'JDictSelectTag', + componentProps: { + dictCode: "sys_depart,depart_name,id" + }, + }, + { + label: '学号', + field: 'workOn', + component: 'Input', + }, + { + label: '姓名', + field: 'name', + component: 'Input', + }, + { + label: '能力1', + field: 'soc1', + component: 'InputNumber', + }, + { + label: '能力2', + field: 'soc2', + component: 'InputNumber', + }, + { + label: '能力3', + field: 'soc3', + component: 'InputNumber', + }, + { + label: '能力4', + field: 'soc4', + component: 'InputNumber', + }, + { + label: '能力5', + field: 'soc5', + component: 'InputNumber', + }, + { + label: '能力6', + field: 'soc6', + component: 'InputNumber', + }, + { + label: '能力7', + field: 'soc7', + component: 'InputNumber', + }, + { + label: '能力8', + field: 'soc8', + component: 'InputNumber', + }, + { + label: '能力9', + field: 'soc9', + component: 'InputNumber', + }, + { + label: '能力10', + field: 'soc10', + component: 'InputNumber', + }, + { + label: '能力11', + field: 'soc11', + component: 'InputNumber', + }, + { + label: '能力12', + field: 'soc12', + component: 'InputNumber', + }, + + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + + +/** + * 流程表单调用这个方法获取formSchema + * @param param + */ +export function getBpmFormSchema(_formData): FormSchema[] { + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluationList.vue b/jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollectList.vue similarity index 80% rename from jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluationList.vue rename to jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollectList.vue index 59a18e4a4..2e79cb667 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/abilityEvaluation/vue3/PersonalAbilityEvaluationList.vue +++ b/jeecgboot-vue3-master/src/views/abilityEvaluation/persanlCollect/PersonalAbilityEvaluationCollectList.vue @@ -4,9 +4,9 @@ - + + \ No newline at end of file diff --git a/jeecgboot-vue3-master/src/views/abilityEvaluation/persoanl/PersonalAbilityEvaluationList.vue b/jeecgboot-vue3-master/src/views/abilityEvaluation/persoanl/PersonalAbilityEvaluationList.vue index fcbcf86e9..651d38e63 100644 --- a/jeecgboot-vue3-master/src/views/abilityEvaluation/persoanl/PersonalAbilityEvaluationList.vue +++ b/jeecgboot-vue3-master/src/views/abilityEvaluation/persoanl/PersonalAbilityEvaluationList.vue @@ -4,7 +4,7 @@