liusheng
2023-11-10 6f344e6360751574f7e03b21c00cfa3f4b2bc099
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java
@@ -61,6 +61,9 @@
    private IServiceOrganallocationService serviceOrganallocationService;
    @Autowired
    private IServiceDonateorganService serviceDonateorganService;
    @Autowired
    private IServiceDonationwitnessService serviceDonationwitnessService;
    @Autowired
@@ -272,12 +275,12 @@
            return null;
        }
        //封装serviceDonateorgan潜在捐献数据
        Map<String, String> donateorgan = new HashMap<>();
        donateorgan.put("createtime", serviceDonatebaseinfo.getCreateTime().toString());
        donateorgan.put("updatetime", serviceDonatebaseinfo.getUpdateTime().toString());
        donateorgan.put("process", "");
        Map<String, String> donatebaseinfo = new HashMap<>();
        donatebaseinfo.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonatebaseinfo.getCreateTime()));
        donatebaseinfo.put("updatetime", serviceDonatebaseinfo.getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonatebaseinfo.getUpdateTime()) : "");
        donatebaseinfo.put("process", "");
        //封装serviceDonateorgan潜在捐献返回数据
        map.put("donateorgan", donateorgan);
        map.put("donatebaseinfo", donatebaseinfo);
        //封装医学评估
        Map<String, String> medicalevaluation = new HashMap<>();
@@ -286,8 +289,8 @@
            serviceMedicalevaluation.setInfoid(id);
            List<ServiceMedicalevaluation> serviceMedicalevaluations = serviceMedicalevaluationService.queryList(serviceMedicalevaluation);
            if (!CollectionUtils.isEmpty(serviceMedicalevaluations)) {
                medicalevaluation.put("createtime", serviceMedicalevaluations.get(0).getCreateTime().toString());
                medicalevaluation.put("updatetime", serviceMedicalevaluations.get(0).getUpdateTime().toString());
                medicalevaluation.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceMedicalevaluations.get(0).getCreateTime()));
                medicalevaluation.put("updatetime", serviceMedicalevaluations.get(0).getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceMedicalevaluations.get(0).getUpdateTime()) : null);
                medicalevaluation.put("process", "");
            }
        }
@@ -301,8 +304,8 @@
            serviceRelativesconfirmation.setInfoid(id);
            List<ServiceRelativesconfirmation> serviceRelativesconfirmations = serviceRelativesconfirmationService.queryList(serviceRelativesconfirmation);
            if (!CollectionUtils.isEmpty(serviceRelativesconfirmations)) {
                relativesconfirmation.put("createtime", serviceRelativesconfirmations.get(0).getCreateTime().toString());
                relativesconfirmation.put("updatetime", serviceRelativesconfirmations.get(0).getUpdateTime().toString());
                relativesconfirmation.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceRelativesconfirmations.get(0).getCreateTime()));
                relativesconfirmation.put("updatetime", serviceRelativesconfirmations.get(0).getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceRelativesconfirmations.get(0).getUpdateTime()) : "");
                relativesconfirmation.put("process", "");
            }
        }
@@ -317,8 +320,8 @@
            serviceEthicalreviewopinions.setInfoid(id);
            List<ServiceEthicalreviewopinions> serviceEthicalreviewopinionsList = serviceEthicalreviewopinionsService.queryList(serviceEthicalreviewopinions);
            if (!CollectionUtils.isEmpty(serviceEthicalreviewopinionsList)) {
                ethicalreviewopinions.put("createtime", serviceEthicalreviewopinionsList.get(0).getCreateTime().toString());
                ethicalreviewopinions.put("updatetime", serviceEthicalreviewopinionsList.get(0).getUpdateTime().toString());
                ethicalreviewopinions.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceEthicalreviewopinionsList.get(0).getCreateTime()));
                ethicalreviewopinions.put("updatetime", serviceEthicalreviewopinionsList.get(0).getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceEthicalreviewopinionsList.get(0).getUpdateTime()) : "");
                ethicalreviewopinions.put("process", "");
            }
        }
@@ -326,27 +329,27 @@
        map.put("ethicalreviewopinions", ethicalreviewopinions);
        //封装器官分配
        Map<String, String> organallocationService = new HashMap<>();
        Map<String, String> donateorgansService = new HashMap<>();
        if (serviceDonatebaseinfo.getWorkflow() >= 4) {
            ServiceOrganallocation serviceOrganallocation = new ServiceOrganallocation();
            serviceOrganallocation.setOrganid(id);
            List<ServiceOrganallocation> serviceOrganallocations = serviceOrganallocationService.selectServiceOrganallocationList(serviceOrganallocation);
            if (!CollectionUtils.isEmpty(serviceOrganallocations)) {
                organallocationService.put("createtime", serviceOrganallocations.get(0).getCreateTime().toString());
                organallocationService.put("updatetime", serviceOrganallocations.get(0).getUpdateTime().toString());
                organallocationService.put("process", "");
            ServiceDonateorgan serviceDonateorgan = new ServiceDonateorgan();
            serviceDonateorgan.setInfoid(id);
            List<ServiceDonateorgan> serviceDonateorgans = serviceDonateorganService.queryList(serviceDonateorgan);
            if (!CollectionUtils.isEmpty(serviceDonateorgans)) {
                donateorgansService.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonateorgans.get(0).getCreateTime()));
                donateorgansService.put("updatetime", serviceDonateorgans.get(0).getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonateorgans.get(0).getUpdateTime()) : "");
                donateorgansService.put("process", "");
            }
        }
        //封装器官分配返回数据
        map.put("organallocationService", organallocationService);
        map.put("donateorgansService", donateorgansService);
        //封装获取见证
        Map<String, String> donationwitness = new HashMap<>();
        if (serviceDonatebaseinfo.getWorkflow() >= 5) {
            ServiceDonationwitness serviceDonationwitness = serviceDonationwitnessService.getByInfoId(id);
            if (!ObjectUtils.isEmpty(serviceDonationwitness)) {
                donationwitness.put("createtime", serviceDonationwitness.getCreateTime().toString());
                donationwitness.put("updatetime", serviceDonationwitness.getUpdateTime().toString());
                donationwitness.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonationwitness.getCreateTime()));
                donationwitness.put("updatetime", serviceDonationwitness.getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonationwitness.getUpdateTime()) : "");
                donationwitness.put("process", "");
            }
        }
@@ -360,8 +363,8 @@
            serviceDonatecompletioninfo.setInfoid(id);
            List<ServiceDonatecompletioninfo> serviceDonatecompletioninfos = serviceDonatecompletioninfoService.queryList(serviceDonatecompletioninfo);
            if (!CollectionUtils.isEmpty(serviceDonatecompletioninfos)) {
                donatecompletioninfo.put("createtime", serviceDonatecompletioninfos.get(0).getCreateTime().toString());
                donatecompletioninfo.put("updatetime", serviceDonatecompletioninfos.get(0).getUpdateTime().toString());
                donatecompletioninfo.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonatecompletioninfos.get(0).getCreateTime()));
                donatecompletioninfo.put("updatetime", serviceDonatecompletioninfos.get(0).getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonatecompletioninfos.get(0).getUpdateTime()) : "");
                donatecompletioninfo.put("process", "");
            }
        }