| | |
| | | public TableDataInfo list(ServiceDonateorgan serviceDonateorgan) { |
| | | startPage(); |
| | | List<ServiceDonateorgan> list = serviceDonateorganService.queryList(serviceDonateorgan); |
| | | if (!CollectionUtils.isEmpty(list)) { |
| | | List<ServiceDonateorganVO> serviceDonateorganVOS = DtoConversionUtils.sourceToTarget(list, ServiceDonateorganVO.class); |
| | | // for (ServiceDonateorganVO serviceDonateorganVO : serviceDonateorganVOS) { |
| | | // ServiceOrganallocation serviceOrganallocation = new ServiceOrganallocation(); |
| | | // serviceOrganallocation.setOrganid(serviceDonateorganVO.getId()); |
| | | // List<ServiceOrganallocation> serviceOrganallocations = serviceOrganallocationService.selectServiceOrganallocationList(serviceOrganallocation); |
| | | // serviceDonateorganVO.setServiceOrganallocations(serviceOrganallocations); |
| | | // } |
| | | return getDataTable(serviceDonateorganVOS); |
| | | } |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 器官分配累计 |
| | | */ |
| | | @ApiOperation("器官分配累计") |
| | | @GetMapping("/countList") |
| | | public TableDataInfo countList(ServiceDonateorgan serviceDonateorgan) { |
| | | startPage(); |
| | | List<ServiceDonateorgan> list = serviceDonateorganService.countList(serviceDonateorgan); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | @ApiOperation("新增捐献器官信息") |
| | | //@PreAuthorize("@ss.hasPermi('project:donateorgan:add')") |
| | | @Log(title = "捐献器官管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceDonateorgan serviceDonateorgan) { |
| | | String organNumber = serviceDonateorgan.getDonorno() + "." + serviceDonateorgan.getOrganno(); |
| | |
| | | } |
| | | } |
| | | serviceDonateorgan.setOrgannumber(organNumber); |
| | | return toAjax(serviceDonateorganService.save(serviceDonateorgan)); |
| | | boolean save = serviceDonateorganService.save(serviceDonateorgan); |
| | | return AjaxResult.success(serviceDonateorgan); |
| | | } |
| | | |
| | | |