| | |
| | | import freemarker.template.TemplateException; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | * @author ruoyi |
| | | * @date 2021-11-15 |
| | | */ |
| | | @Slf4j |
| | | @Api("亲属确认管理") |
| | | @RestController |
| | | @RequestMapping("/project/relativesconfirmation") |
| | |
| | | * 查询捐献亲属确认列表 |
| | | */ |
| | | @ApiOperation("获取亲属确认列表") |
| | | //@PreAuthorize("@ss.hasPermi('project:relativesconfirmation:list')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceRelativesconfirmation serviceRelativesconfirmation) { |
| | | startPage(); |
| | |
| | | * 导出捐献亲属确认列表 |
| | | */ |
| | | @ApiOperation("导出亲属确认列表") |
| | | //@PreAuthorize("@ss.hasPermi('project:relativesconfirmation:export')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:export')") |
| | | @Log(title = "捐献亲属确认", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(ServiceRelativesconfirmation serviceRelativesconfirmation) { |
| | |
| | | * 获取捐献亲属确认详细信息 |
| | | */ |
| | | @ApiOperation("通过id获取亲属确认信息") |
| | | //@PreAuthorize("@ss.hasPermi('project:relativesconfirmation:query')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(serviceRelativesconfirmationService.getById(id)); |
| | |
| | | * 新增捐献亲属确认 |
| | | */ |
| | | @ApiOperation("新增亲属确认") |
| | | //@PreAuthorize("@ss.hasPermi('project:relativesconfirmation:add')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:add')") |
| | | @Log(title = "捐献亲属确认", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceRelativesconfirmation serviceRelativesconfirmation) { |
| | | log.info("新增捐献亲属确认:{}", serviceRelativesconfirmation); |
| | | boolean save = serviceRelativesconfirmationService.save(serviceRelativesconfirmation); |
| | | return AjaxResult.success(serviceRelativesconfirmation); |
| | | } |
| | |
| | | * 修改捐献亲属确认 |
| | | */ |
| | | @ApiOperation("修改亲属确认") |
| | | //@PreAuthorize("@ss.hasPermi('project:relativesconfirmation:edit')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:edit')") |
| | | @Log(title = "捐献亲属确认", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceRelativesconfirmation serviceRelativesconfirmation) { |
| | | log.info("修改亲属确认:{}", serviceRelativesconfirmation); |
| | | if (serviceRelativesconfirmation.getInfoid() == null || serviceRelativesconfirmation.getId() == null) { |
| | | throw new BaseException("请联系工程师检查ID是否为空"); |
| | | } |
| | |
| | | * 删除捐献亲属确认 |
| | | */ |
| | | @ApiOperation("删除亲属确认") |
| | | //@PreAuthorize("@ss.hasPermi('project:relativesconfirmation:remove')") |
| | | //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:remove')") |
| | | @Log(title = "捐献亲属确认", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | |
| | | } else if (relativeConfirmation.getSex().equals("2")) { |
| | | dataMap.put("XB", "女"); |
| | | } |
| | | |
| | | dataMap.put("CSRQ", relativeConfirmation.getBirthday() == null ? "" : relativeConfirmation.getBirthday().substring(0, 10)); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | dataMap.put("CSRQ", relativeConfirmation.getBirthday() == null ? "" : simpleDateFormat.format(relativeConfirmation.getBirthday()).substring(0, 10)); |
| | | dataMap.put("MZ", NationalityEnum.getDescByCode(relativeConfirmation.getNation()) == null ? "" : NationalityEnum.getDescByCode(relativeConfirmation.getNation())); |
| | | dataMap.put("XL", Education.getDescByCode(relativeConfirmation.getEducation()) == null ? "" : Education.getDescByCode(relativeConfirmation.getEducation())); |
| | | String occupation = ""; |