| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.project.common.CalculateDateUtils; |
| | | import com.ruoyi.project.domain.vo.MedicalEvaluationVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | * 查询医学评估列表 |
| | | */ |
| | | @ApiOperation("获取医疗评估列表") |
| | | //@PreAuthorize("@ss.hasPermi('project:medicalevaluation:list')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:medicalevaluation:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceMedicalevaluation serviceMedicalevaluation) { |
| | | startPage(); |
| | |
| | | public TableDataInfo listnew(MedicalEvaluationVO medicalEvaluationVO) { |
| | | startPage(); |
| | | List<MedicalEvaluationVO> list = serviceMedicalevaluationService.selectVOList(medicalEvaluationVO); |
| | | for (MedicalEvaluationVO medicalEvaluationVO1 : list) { |
| | | if (medicalEvaluationVO1.getBirthday() != null) { |
| | | Map<String, String> map = CalculateDateUtils.calculateAge(medicalEvaluationVO1.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now()); |
| | | medicalEvaluationVO1.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null); |
| | | medicalEvaluationVO1.setAgeunit(map.get("ageUnit")); |
| | | medicalEvaluationVO1.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null); |
| | | medicalEvaluationVO1.setAgeunit2(map.get("ageUnit2")); |
| | | } |
| | | } |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | * 导出医学评估列表 |
| | | */ |
| | | @ApiOperation("导出医疗评估列表") |
| | | //@PreAuthorize("@ss.hasPermi('project:medicalevaluation:export')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:medicalevaluation:export')") |
| | | @Log(title = "医学评估", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(ServiceMedicalevaluation serviceMedicalevaluation) { |
| | |
| | | * 获取医学评估详细信息 |
| | | */ |
| | | @ApiOperation("通过id获取医疗评估信息") |
| | | //@PreAuthorize("@ss.hasPermi('project:medicalevaluation:query')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:medicalevaluation:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(serviceMedicalevaluationService.getById(id)); |
| | |
| | | * 新增医学评估 |
| | | */ |
| | | @ApiOperation("新增医学评估") |
| | | //@PreAuthorize("@ss.hasPermi('project:medicalevaluation:add')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:medicalevaluation:add')") |
| | | @Log(title = "医学评估", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | // @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | |
| | | * 修改医学评估 |
| | | */ |
| | | @ApiOperation("修改医学评估") |
| | | //@PreAuthorize("@ss.hasPermi('project:medicalevaluation:edit')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:medicalevaluation:edit')") |
| | | @Log(title = "医学评估", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | // @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | |
| | | * 删除医学评估 |
| | | */ |
| | | @ApiOperation("删除医学评估") |
| | | //@PreAuthorize("@ss.hasPermi('project:medicalevaluation:remove')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:medicalevaluation:remove')") |
| | | @Log(title = "医学评估", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |