| | |
| | | import com.ruoyi.common.enums.Education; |
| | | import com.ruoyi.common.enums.NationalityEnum; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.project.domain.vo.RelativeConfirmationVO; |
| | | import com.ruoyi.project.mapper.ServiceDonatebaseinfoMapper; |
| | | import com.ruoyi.project.mapper.ServiceRelativesconfirmationMapper; |
| | |
| | | @ApiOperation("新增亲属确认") |
| | | //@PreAuthorize("@ss.hasPermi('project:relativesconfirmation:add')") |
| | | @Log(title = "捐献亲属确认", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceRelativesconfirmation serviceRelativesconfirmation) { |
| | | return toAjax(serviceRelativesconfirmationService.save(serviceRelativesconfirmation)); |
| | | boolean save = serviceRelativesconfirmationService.save(serviceRelativesconfirmation); |
| | | return AjaxResult.success(serviceRelativesconfirmation); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping("/edit") |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceRelativesconfirmation serviceRelativesconfirmation) { |
| | | ServiceRelativesconfirmation serviceRelativesconfirmation1 = new ServiceRelativesconfirmation(); |
| | | serviceRelativesconfirmation1.setInfoid(serviceRelativesconfirmation.getInfoid()); |
| | | List<ServiceRelativesconfirmation> list = serviceRelativesconfirmationService.queryList(serviceRelativesconfirmation1); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return error("捐献亲属确认数据不存在,请检查后再次修改"); |
| | | if (serviceRelativesconfirmation.getInfoid() == null || serviceRelativesconfirmation.getId() == null) { |
| | | throw new BaseException("请联系工程师检查ID是否为空"); |
| | | } |
| | | serviceRelativesconfirmation.setId(list.get(0).getId()); |
| | | // ServiceRelativesconfirmation serviceRelativesconfirmation1 = new ServiceRelativesconfirmation(); |
| | | // serviceRelativesconfirmation1.setInfoid(serviceRelativesconfirmation.getInfoid()); |
| | | // List<ServiceRelativesconfirmation> list = serviceRelativesconfirmationService.queryList(serviceRelativesconfirmation1); |
| | | // if (CollectionUtils.isEmpty(list)) { |
| | | // return error("捐献亲属确认数据不存在,请检查后再次修改"); |
| | | // } |
| | | // serviceRelativesconfirmation.setId(list.get(0).getId()); |
| | | return toAjax(serviceRelativesconfirmationService.updateById(serviceRelativesconfirmation)); |
| | | } |
| | | |
| | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("downloadUrl", "/profile/download/wordtemplate/" + name + ".doc"); |
| | | map.put("downloadName", name + ".doc"); |
| | | return map; |
| | | } |
| | | |