parent
2ec98d5157
commit
55877613de
30 changed files with 1919 additions and 308 deletions
@ -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<DepartAbilityEvaluation, IDepartAbilityEvaluationService> { |
||||||
|
@Autowired |
||||||
|
private IDepartAbilityEvaluationService departAbilityEvaluationService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页列表查询 |
||||||
|
* |
||||||
|
* @param departAbilityEvaluation |
||||||
|
* @param pageNo |
||||||
|
* @param pageSize |
||||||
|
* @param req |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
//@AutoLog(value = "院系年度能力评价-分页列表查询")
|
||||||
|
@ApiOperation(value = "院系年度能力评价-分页列表查询", notes = "院系年度能力评价-分页列表查询") |
||||||
|
@GetMapping(value = "/list") |
||||||
|
public Result<IPage<DepartAbilityEvaluation>> queryPageList(DepartAbilityEvaluation departAbilityEvaluation, |
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||||
|
HttpServletRequest req) { |
||||||
|
QueryWrapper<DepartAbilityEvaluation> queryWrapper = QueryGenerator.initQueryWrapper(departAbilityEvaluation, req.getParameterMap()); |
||||||
|
Page<DepartAbilityEvaluation> page = new Page<DepartAbilityEvaluation>(pageNo, pageSize); |
||||||
|
IPage<DepartAbilityEvaluation> pageList = departAbilityEvaluationService.page(page, queryWrapper); |
||||||
|
return Result.OK(pageList); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 添加 |
||||||
|
* |
||||||
|
* @param departAbilityEvaluation |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@ApiOperation(value = "院系年度能力评价-添加", notes = "院系年度能力评价-添加") |
||||||
|
@PostMapping(value = "/add") |
||||||
|
public Result<String> add(@RequestBody DepartAbilityEvaluation departAbilityEvaluation) { |
||||||
|
departAbilityEvaluationService.collectAbilityEvaluation(departAbilityEvaluation); |
||||||
|
return Result.OK("添加成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
@ApiOperation(value = "院系年度能力评价-重新汇算", notes = "院系年度能力评价-重新汇算") |
||||||
|
@PostMapping(value = "/reCollectAbilityEvaluation") |
||||||
|
public Result<String> 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<String> edit(@RequestBody DepartAbilityEvaluation departAbilityEvaluation) { |
||||||
|
departAbilityEvaluationService.updateById(departAbilityEvaluation); |
||||||
|
return Result.OK("编辑成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 通过id删除 |
||||||
|
* |
||||||
|
* @param id |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@ApiOperation(value = "院系年度能力评价-通过id删除", notes = "院系年度能力评价-通过id删除") |
||||||
|
@DeleteMapping(value = "/delete") |
||||||
|
public Result<String> 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<String> 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<DepartAbilityEvaluation> 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); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -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<PersonalAbilityEvaluationCollect, IPersonalAbilityEvaluationCollectService> { |
||||||
|
@Autowired |
||||||
|
private IPersonalAbilityEvaluationCollectService personalAbilityEvaluationCollectService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页列表查询 |
||||||
|
* |
||||||
|
* @param personalAbilityEvaluationCollect |
||||||
|
* @param pageNo |
||||||
|
* @param pageSize |
||||||
|
* @param req |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
//@AutoLog(value = "个人能力评价 汇总-分页列表查询")
|
||||||
|
@ApiOperation(value = "个人能力评价 汇总-分页列表查询", notes = "个人能力评价 汇总-分页列表查询") |
||||||
|
@GetMapping(value = "/list") |
||||||
|
public Result<IPage<PersonalAbilityEvaluationCollect>> queryPageList(PersonalAbilityEvaluationCollect personalAbilityEvaluationCollect, |
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||||
|
HttpServletRequest req) { |
||||||
|
QueryWrapper<PersonalAbilityEvaluationCollect> queryWrapper = QueryGenerator.initQueryWrapper(personalAbilityEvaluationCollect, req.getParameterMap()); |
||||||
|
Page<PersonalAbilityEvaluationCollect> page = new Page<PersonalAbilityEvaluationCollect>(pageNo, pageSize); |
||||||
|
IPage<PersonalAbilityEvaluationCollect> pageList = personalAbilityEvaluationCollectService.page(page, queryWrapper); |
||||||
|
return Result.OK(pageList); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 添加 |
||||||
|
* |
||||||
|
* @param personalAbilityEvaluationCollect |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@ApiOperation(value = "个人能力评价 汇总-添加", notes = "个人能力评价 汇总-添加") |
||||||
|
@PostMapping(value = "/add") |
||||||
|
public Result<String> 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<String> edit(@RequestBody PersonalAbilityEvaluationCollect personalAbilityEvaluationCollect) { |
||||||
|
personalAbilityEvaluationCollectService.updateById(personalAbilityEvaluationCollect); |
||||||
|
return Result.OK("编辑成功!"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 通过id删除 |
||||||
|
* |
||||||
|
* @param id |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@ApiOperation(value = "个人能力评价 汇总-通过id删除", notes = "个人能力评价 汇总-通过id删除") |
||||||
|
@DeleteMapping(value = "/delete") |
||||||
|
public Result<String> 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<String> 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<PersonalAbilityEvaluationCollect> 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); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -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; |
||||||
|
} |
@ -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; |
||||||
|
} |
@ -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<DepartAbilityEvaluation> { |
||||||
|
|
||||||
|
} |
@ -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<PersonalAbilityEvaluationCollect> { |
||||||
|
|
||||||
|
} |
@ -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<DepartAbilityEvaluation> { |
||||||
|
|
||||||
|
void collectAbilityEvaluation(DepartAbilityEvaluation departAbilityEvaluation); |
||||||
|
} |
@ -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<PersonalAbilityEvaluationCollect> { |
||||||
|
|
||||||
|
void batchSave(String projectId); |
||||||
|
} |
@ -0,0 +1,89 @@ |
|||||||
|
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.apache.commons.lang3.StringUtils; |
||||||
|
import org.jeecg.modules.demo.abilityEvaluation.entity.DepartAbilityEvaluation; |
||||||
|
import org.jeecg.modules.demo.abilityEvaluation.entity.PersonalAbilityEvaluation; |
||||||
|
import org.jeecg.modules.demo.abilityEvaluation.mapper.DepartAbilityEvaluationMapper; |
||||||
|
import org.jeecg.modules.demo.abilityEvaluation.service.IDepartAbilityEvaluationService; |
||||||
|
import org.jeecg.modules.demo.abilityEvaluation.service.IPersonalAbilityEvaluationService; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import org.springframework.util.ObjectUtils; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Description: 院系年度能力评价 |
||||||
|
* @Author: jeecg-boot |
||||||
|
* @Date: 2023-11-09 |
||||||
|
* @Version: V1.0 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class DepartAbilityEvaluationServiceImpl extends ServiceImpl<DepartAbilityEvaluationMapper, DepartAbilityEvaluation> implements IDepartAbilityEvaluationService { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private IPersonalAbilityEvaluationService iPersonalAbilityEvaluationService; |
||||||
|
|
||||||
|
@Override |
||||||
|
public void collectAbilityEvaluation(DepartAbilityEvaluation departAbilityEvaluation) { |
||||||
|
|
||||||
|
List<PersonalAbilityEvaluation> abilityEvaluationList = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>() |
||||||
|
.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); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -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<PersonalAbilityEvaluationCollectMapper, PersonalAbilityEvaluationCollect> 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<PersonalAbilityEvaluationCollect>() |
||||||
|
.eq(PersonalAbilityEvaluationCollect::getAnnualCompP, projectId)); |
||||||
|
|
||||||
|
List<PersonalAbilityEvaluationCollect> saveList = new LinkedList<>(); |
||||||
|
|
||||||
|
//该项目,本次新增的个人能力数据
|
||||||
|
List<PersonalAbilityEvaluation> evaluationList = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>() |
||||||
|
.eq(PersonalAbilityEvaluation::getAnnualCompP, projectId)); |
||||||
|
|
||||||
|
// 报名编号列表,要重新汇总的个人能力
|
||||||
|
List<String> enrollCodeList = evaluationList.stream().map(b -> b.getEnrollCode()).collect(Collectors.toList()); |
||||||
|
if (!ObjectUtils.isEmpty(enrollCodeList)) { |
||||||
|
for (String enrollCode : enrollCodeList) { |
||||||
|
//查询每个人的个人能力数据,用于重新汇总
|
||||||
|
List<PersonalAbilityEvaluation> list4UserAbilityEvaluation = iPersonalAbilityEvaluationService.list(new LambdaQueryWrapper<PersonalAbilityEvaluation>() |
||||||
|
.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<TeamManagement>() |
||||||
|
.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); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -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; |
|
||||||
} |
|
@ -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); |
|
@ -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(); |
||||||
|
}); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
@ -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; |
||||||
|
} |
@ -0,0 +1,190 @@ |
|||||||
|
<template> |
||||||
|
<div> |
||||||
|
<!--引用表格--> |
||||||
|
<BasicTable @register="registerTable" :rowSelection="rowSelection"> |
||||||
|
<!--插槽:table标题--> |
||||||
|
<template #tableTitle> |
||||||
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined">能力评价汇总</a-button> |
||||||
|
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> |
||||||
|
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>--> |
||||||
|
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> |
||||||
|
<!-- <template #overlay>--> |
||||||
|
<!-- <a-menu>--> |
||||||
|
<!-- <a-menu-item key="1" @click="batchHandleDelete">--> |
||||||
|
<!-- <Icon icon="ant-design:delete-outlined"></Icon>--> |
||||||
|
<!-- 删除--> |
||||||
|
<!-- </a-menu-item>--> |
||||||
|
<!-- </a-menu>--> |
||||||
|
<!-- </template>--> |
||||||
|
<!-- <a-button>批量操作--> |
||||||
|
<!-- <Icon icon="mdi:chevron-down"></Icon>--> |
||||||
|
<!-- </a-button>--> |
||||||
|
<!-- </a-dropdown>--> |
||||||
|
</template> |
||||||
|
<!--操作栏--> |
||||||
|
<template #action="{ record }"> |
||||||
|
<!-- <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>--> |
||||||
|
<TableAction :actions="getTableAction(record)" /> |
||||||
|
</template> |
||||||
|
<!--字段回显插槽--> |
||||||
|
<template #htmlSlot="{text}"> |
||||||
|
<div v-html="text"></div> |
||||||
|
</template> |
||||||
|
<!--省市区字段回显插槽--> |
||||||
|
<template #pcaSlot="{text}"> |
||||||
|
{{ getAreaTextByCode(text) }} |
||||||
|
</template> |
||||||
|
<template #fileSlot="{text}"> |
||||||
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
||||||
|
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button> |
||||||
|
</template> |
||||||
|
</BasicTable> |
||||||
|
<!-- 表单区域 --> |
||||||
|
<DepartAbilityEvaluationModal @register="registerModal" @success="handleSuccess"></DepartAbilityEvaluationModal> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script lang="ts" name="abilityEvaluation-departAbilityEvaluation" setup> |
||||||
|
import {ref, computed, unref} from 'vue'; |
||||||
|
import {BasicTable, useTable, TableAction} from '/@/components/Table'; |
||||||
|
import {useModal} from '/@/components/Modal'; |
||||||
|
import { useListPage } from '/@/hooks/system/useListPage' |
||||||
|
import DepartAbilityEvaluationModal from './components/DepartAbilityEvaluationModal.vue' |
||||||
|
import {columns, searchFormSchema} from './DepartAbilityEvaluation.data'; |
||||||
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,reCollectAbilityEvaluation} from './DepartAbilityEvaluation.api'; |
||||||
|
import { downloadFile } from '/@/utils/common/renderUtils'; |
||||||
|
import {reCollectScore} from "/@/views/annualScore/departCompTotalScore/DepartCompTotalScore.api"; |
||||||
|
const checkedKeys = ref<Array<string | number>>([]); |
||||||
|
//注册model |
||||||
|
const [registerModal, {openModal}] = useModal(); |
||||||
|
//注册table数据 |
||||||
|
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ |
||||||
|
tableProps:{ |
||||||
|
title: '院系年度能力评价', |
||||||
|
api: list, |
||||||
|
columns, |
||||||
|
canResize:false, |
||||||
|
formConfig: { |
||||||
|
//labelWidth: 120, |
||||||
|
schemas: searchFormSchema, |
||||||
|
autoSubmitOnEnter:true, |
||||||
|
showAdvancedButton:true, |
||||||
|
fieldMapToNumber: [ |
||||||
|
], |
||||||
|
fieldMapToTime: [ |
||||||
|
], |
||||||
|
}, |
||||||
|
actionColumn: { |
||||||
|
width: 220, |
||||||
|
fixed:'right' |
||||||
|
}, |
||||||
|
}, |
||||||
|
exportConfig: { |
||||||
|
name:"院系年度能力评价", |
||||||
|
url: getExportUrl, |
||||||
|
}, |
||||||
|
importConfig: { |
||||||
|
url: getImportUrl, |
||||||
|
success: handleSuccess |
||||||
|
}, |
||||||
|
}) |
||||||
|
|
||||||
|
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增事件 |
||||||
|
*/ |
||||||
|
function handleAdd() { |
||||||
|
openModal(true, { |
||||||
|
isUpdate: false, |
||||||
|
showFooter: true, |
||||||
|
}); |
||||||
|
} |
||||||
|
/** |
||||||
|
* 编辑事件 |
||||||
|
*/ |
||||||
|
function handleEdit(record: Recordable) { |
||||||
|
openModal(true, { |
||||||
|
record, |
||||||
|
isUpdate: true, |
||||||
|
showFooter: true, |
||||||
|
}); |
||||||
|
} |
||||||
|
/** |
||||||
|
* 详情 |
||||||
|
*/ |
||||||
|
function handleDetail(record: Recordable) { |
||||||
|
openModal(true, { |
||||||
|
record, |
||||||
|
isUpdate: true, |
||||||
|
showFooter: false, |
||||||
|
}); |
||||||
|
} |
||||||
|
/** |
||||||
|
* 删除事件 |
||||||
|
*/ |
||||||
|
async function handleDelete(record) { |
||||||
|
await deleteOne({id: record.id}, handleSuccess); |
||||||
|
} |
||||||
|
/** |
||||||
|
* 批量删除事件 |
||||||
|
*/ |
||||||
|
async function batchHandleDelete() { |
||||||
|
await batchDelete({ids: selectedRowKeys.value}, handleSuccess); |
||||||
|
} |
||||||
|
/** |
||||||
|
* 成功回调 |
||||||
|
*/ |
||||||
|
function handleSuccess() { |
||||||
|
(selectedRowKeys.value = []) && reload(); |
||||||
|
} |
||||||
|
|
||||||
|
function handleCollectAbilityEvaluationApply(record: Recordable) { |
||||||
|
reCollectAbilityEvaluation({id: record.id, annualId: record.annualId, depetId:record.depetId}, handleSuccess); |
||||||
|
} |
||||||
|
/** |
||||||
|
* 操作栏 |
||||||
|
*/ |
||||||
|
function getTableAction(record){ |
||||||
|
return [ |
||||||
|
{ |
||||||
|
label: '重新汇算', |
||||||
|
onClick: handleCollectAbilityEvaluationApply.bind(null, record), |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '详情', |
||||||
|
onClick: handleDetail.bind(null, record), |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '删除', |
||||||
|
popConfirm: { |
||||||
|
title: '是否确认删除', |
||||||
|
confirm: handleDelete.bind(null, record), |
||||||
|
} |
||||||
|
} |
||||||
|
] |
||||||
|
} |
||||||
|
/** |
||||||
|
* 下拉操作栏 |
||||||
|
*/ |
||||||
|
function getDropDownAction(record){ |
||||||
|
return [ |
||||||
|
{ |
||||||
|
label: '详情', |
||||||
|
onClick: handleDetail.bind(null, record), |
||||||
|
}, { |
||||||
|
label: '删除', |
||||||
|
popConfirm: { |
||||||
|
title: '是否确认删除', |
||||||
|
confirm: handleDelete.bind(null, record), |
||||||
|
} |
||||||
|
} |
||||||
|
] |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
</script> |
||||||
|
|
||||||
|
<style scoped> |
||||||
|
|
||||||
|
</style> |
@ -0,0 +1,70 @@ |
|||||||
|
<template> |
||||||
|
<div style="min-height: 400px"> |
||||||
|
<BasicForm @register="registerForm"></BasicForm> |
||||||
|
<div style="width: 100%;text-align: center" v-if="!formDisabled"> |
||||||
|
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script lang="ts"> |
||||||
|
import {BasicForm, useForm} from '/@/components/Form/index'; |
||||||
|
import {computed, defineComponent} from 'vue'; |
||||||
|
import {defHttp} from '/@/utils/http/axios'; |
||||||
|
import { propTypes } from '/@/utils/propTypes'; |
||||||
|
import {getBpmFormSchema} from '../DepartAbilityEvaluation.data'; |
||||||
|
import {saveOrUpdate} from '../DepartAbilityEvaluation.api'; |
||||||
|
|
||||||
|
export default defineComponent({ |
||||||
|
name: "DepartAbilityEvaluationForm", |
||||||
|
components:{ |
||||||
|
BasicForm |
||||||
|
}, |
||||||
|
props:{ |
||||||
|
formData: propTypes.object.def({}), |
||||||
|
formBpm: propTypes.bool.def(true), |
||||||
|
}, |
||||||
|
setup(props){ |
||||||
|
const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({ |
||||||
|
labelWidth: 150, |
||||||
|
schemas: getBpmFormSchema(props.formData), |
||||||
|
showActionButtonGroup: false, |
||||||
|
baseColProps: {span: 24} |
||||||
|
}); |
||||||
|
|
||||||
|
const formDisabled = computed(()=>{ |
||||||
|
if(props.formData.disabled === false){ |
||||||
|
return false; |
||||||
|
} |
||||||
|
return true; |
||||||
|
}); |
||||||
|
|
||||||
|
let formData = {}; |
||||||
|
const queryByIdUrl = '/abilityEvaluation/departAbilityEvaluation/queryById'; |
||||||
|
async function initFormData(){ |
||||||
|
let params = {id: props.formData.dataId}; |
||||||
|
const data = await defHttp.get({url: queryByIdUrl, params}); |
||||||
|
formData = {...data} |
||||||
|
//设置表单的值 |
||||||
|
await setFieldsValue(formData); |
||||||
|
//默认是禁用 |
||||||
|
await setProps({disabled: formDisabled.value}) |
||||||
|
} |
||||||
|
|
||||||
|
async function submitForm() { |
||||||
|
let data = getFieldsValue(); |
||||||
|
let params = Object.assign({}, formData, data); |
||||||
|
console.log('表单数据', params) |
||||||
|
await saveOrUpdate(params, true) |
||||||
|
} |
||||||
|
|
||||||
|
initFormData(); |
||||||
|
|
||||||
|
return { |
||||||
|
registerForm, |
||||||
|
formDisabled, |
||||||
|
submitForm, |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
</script> |
@ -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; |
||||||
|
} |
@ -0,0 +1,66 @@ |
|||||||
|
<template> |
||||||
|
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit"> |
||||||
|
<BasicForm @register="registerForm"/> |
||||||
|
</BasicModal> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script lang="ts" setup> |
||||||
|
import {ref, computed, unref} from 'vue'; |
||||||
|
import {BasicModal, useModalInner} from '/@/components/Modal'; |
||||||
|
import {BasicForm, useForm} from '/@/components/Form/index'; |
||||||
|
import {formSchema} from '../PersonalAbilityEvaluationCollect.data'; |
||||||
|
import {saveOrUpdate} from '../PersonalAbilityEvaluationCollect.api'; |
||||||
|
// Emits声明 |
||||||
|
const emit = defineEmits(['register','success']); |
||||||
|
const isUpdate = ref(true); |
||||||
|
//表单配置 |
||||||
|
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({ |
||||||
|
//labelWidth: 150, |
||||||
|
schemas: formSchema, |
||||||
|
showActionButtonGroup: false, |
||||||
|
baseColProps: {span: 24} |
||||||
|
}); |
||||||
|
//表单赋值 |
||||||
|
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => { |
||||||
|
//重置表单 |
||||||
|
await resetFields(); |
||||||
|
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter}); |
||||||
|
isUpdate.value = !!data?.isUpdate; |
||||||
|
if (unref(isUpdate)) { |
||||||
|
//表单赋值 |
||||||
|
await setFieldsValue({ |
||||||
|
...data.record, |
||||||
|
}); |
||||||
|
} |
||||||
|
// 隐藏底部时禁用整个表单 |
||||||
|
setProps({ disabled: !data?.showFooter }) |
||||||
|
}); |
||||||
|
//设置标题 |
||||||
|
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑')); |
||||||
|
//表单提交事件 |
||||||
|
async function handleSubmit(v) { |
||||||
|
try { |
||||||
|
let values = await validate(); |
||||||
|
setModalProps({confirmLoading: true}); |
||||||
|
//提交表单 |
||||||
|
await saveOrUpdate(values, isUpdate.value); |
||||||
|
//关闭弹窗 |
||||||
|
closeModal(); |
||||||
|
//刷新列表 |
||||||
|
emit('success'); |
||||||
|
} finally { |
||||||
|
setModalProps({confirmLoading: false}); |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
|
|
||||||
|
<style lang="less" scoped> |
||||||
|
/** 时间和数字输入框样式 */ |
||||||
|
:deep(.ant-input-number){ |
||||||
|
width: 100% |
||||||
|
} |
||||||
|
|
||||||
|
:deep(.ant-calendar-picker){ |
||||||
|
width: 100% |
||||||
|
} |
||||||
|
</style> |
Loading…
Reference in new issue