| | |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceRelativesconfirmation serviceRelativesconfirmation) { |
| | | log.info("新增捐献亲属确认:{}", serviceRelativesconfirmation); |
| | | boolean save = serviceRelativesconfirmationService.save(serviceRelativesconfirmation); |
| | | // 2026-10-22:同一案例只允许一条未删除记录——已存在则更新,避免反复保存产生重复行 |
| | | if (serviceRelativesconfirmation.getInfoid() != null) { |
| | | ServiceRelativesconfirmation query = new ServiceRelativesconfirmation(); |
| | | query.setInfoid(serviceRelativesconfirmation.getInfoid()); |
| | | List<ServiceRelativesconfirmation> exist = serviceRelativesconfirmationService.queryList(query); |
| | | if (exist != null && !exist.isEmpty()) { |
| | | serviceRelativesconfirmation.setId(exist.get(0).getId()); |
| | | serviceRelativesconfirmationService.updateById(serviceRelativesconfirmation); |
| | | return AjaxResult.success(serviceRelativesconfirmation); |
| | | } |
| | | } |
| | | serviceRelativesconfirmationService.save(serviceRelativesconfirmation); |
| | | return AjaxResult.success(serviceRelativesconfirmation); |
| | | } |
| | | |