liusheng
2024-03-19 519886a70d630e3cdd6c0f40f55fcebc6e780dc5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganController.java
@@ -55,17 +55,18 @@
    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);
    }
@@ -106,7 +107,7 @@
    @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();
@@ -121,7 +122,8 @@
            }
        }
        serviceDonateorgan.setOrgannumber(organNumber);
        return toAjax(serviceDonateorganService.save(serviceDonateorgan));
        boolean save = serviceDonateorganService.save(serviceDonateorgan);
        return AjaxResult.success(serviceDonateorgan);
    }