liusheng
2023-10-26 201029ebe1fffdc3335c1bbd60dd6befe0283b7c
代码修改
已修改10个文件
318 ■■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonatebaseinfoController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganController.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonatebaseinfo.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceExternalpersonMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceDonatebaseinfoService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceDonateorganService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonateorganServiceImpl.java 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonatebaseinfoController.java
@@ -928,5 +928,13 @@
        return AjaxResult.success(serviceDonatebaseinfoService.countByRecordState(timeVO));
    }
    /**
     * 获取捐献工作流
     */
    @ApiOperation("获取捐献工作流")
    @GetMapping(value = "/getWorkFlow/{id}")
    public AjaxResult getWorkFlow(@PathVariable("id") Long id) {
        return AjaxResult.success(serviceDonatebaseinfoService.getWorkFlow(id));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganController.java
@@ -261,12 +261,5 @@
        return AjaxResult.success(serviceDonateorganService.getOrganCount(timeVO));
    }
    /**
     * 获取捐献工作流
     */
    @ApiOperation("获取捐献工作流")
    @GetMapping(value = "/getWorkFlow/{id}")
    public AjaxResult getWorkFlow(@PathVariable("id") Long id) {
        return AjaxResult.success(serviceDonateorganService.getWorkFlow(id));
    }
}
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonatebaseinfo.java
@@ -377,4 +377,9 @@
    private String annexfiles;
    @ApiModelProperty("工作流")
    @Excel(name = "工作流")
    private Integer workflow;
}
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceExternalpersonMapper.java
@@ -2,17 +2,20 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import com.ruoyi.project.domain.ServiceExternalperson;
import org.apache.ibatis.annotations.Mapper;
/**
 * 外围单位人员Mapper接口
 *
 *
 * @author ruoyi
 * @date 2021-11-24
 */
public interface ServiceExternalpersonMapper extends BaseMapper<ServiceExternalperson>
{
@Mapper
public interface ServiceExternalpersonMapper extends BaseMapper<ServiceExternalperson> {
    /**
     * 查询外围单位人员列表
     *
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceDonatebaseinfoService.java
@@ -1,6 +1,8 @@
package com.ruoyi.project.service;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.project.domain.ServiceDonatebaseinfo;
import com.ruoyi.project.domain.vo.TimeVO;
@@ -42,4 +44,6 @@
    countByRecordStateVO countByRecordState(TimeVO timeVO);
    String getDonateNameById(Long infoid);
    Map<String, Object> getWorkFlow(Long id);
}
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceDonateorganService.java
@@ -71,5 +71,5 @@
    List<organInfoVO> getOrganCount(TimeVO timeVO);
    Map<String, Object> getWorkFlow(Long id);
}
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java
@@ -2,19 +2,18 @@
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.domain.BaseOnlyvalue;
import com.ruoyi.project.domain.BaseOrganization;
import com.ruoyi.project.domain.ServiceDonationwitness;
import com.ruoyi.project.domain.*;
import com.ruoyi.project.domain.vo.TimeVO;
import com.ruoyi.project.domain.vo.countByRecordStateVO;
import com.ruoyi.project.mapper.*;
import com.ruoyi.project.service.IBaseOnlyvalueService;
import com.ruoyi.project.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -22,9 +21,8 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.domain.ServiceDonatebaseinfo;
import com.ruoyi.project.mapper.BaseOrganizationMapper;
import com.ruoyi.project.service.IServiceDonatebaseinfoService;
import org.springframework.util.CollectionUtils;
/**
 * 捐献基础Service业务层处理
@@ -49,6 +47,24 @@
    @Autowired
    private IBaseOnlyvalueService baseOnlyvalueService;
    @Autowired
    private IServiceMedicalevaluationService serviceMedicalevaluationService;
    @Autowired
    private IServiceRelativesconfirmationService serviceRelativesconfirmationService;
    @Autowired
    private IServiceEthicalreviewopinionsService serviceEthicalreviewopinionsService;
    @Autowired
    private IServiceOrganallocationService serviceOrganallocationService;
    @Autowired
    private IServiceDonationwitnessService serviceDonationwitnessService;
    @Autowired
    private IServiceDonatecompletioninfoService serviceDonatecompletioninfoService;
    /**
@@ -246,7 +262,115 @@
        return serviceDonatebaseinfoMapper.getDonateNameById(infoid);
    }
    @Override
    public Map<String, Object> getWorkFlow(Long id) {
        //用于返回
        Map<String, Object> map = new ConcurrentHashMap<>();
        ServiceDonatebaseinfo serviceDonatebaseinfo = getById(id);
        if (ObjectUtils.isEmpty(serviceDonatebaseinfo)) {
            return null;
        }
        //封装serviceDonateorgan潜在捐献数据
        Map<String, String> donateorgan = new HashMap<>();
        donateorgan.put("createtime", serviceDonatebaseinfo.getCreateTime().toString());
        donateorgan.put("updatetime", serviceDonatebaseinfo.getUpdateTime().toString());
        donateorgan.put("process", "");
        //封装serviceDonateorgan潜在捐献返回数据
        map.put("donateorgan", donateorgan);
        //封装医学评估
        Map<String, String> medicalevaluation = new HashMap<>();
        if (serviceDonatebaseinfo.getWorkflow() >= 1) {
            ServiceMedicalevaluation serviceMedicalevaluation = new ServiceMedicalevaluation();
            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("process", "");
            }
        }
        //封装医学评估返回数据
        map.put("medicalevaluation", medicalevaluation);
        //封装捐献确认
        Map<String, String> relativesconfirmation = new HashMap<>();
        if (serviceDonatebaseinfo.getWorkflow() >= 2) {
            ServiceRelativesconfirmation serviceRelativesconfirmation = new ServiceRelativesconfirmation();
            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("process", "");
            }
        }
        //封装捐献确认返回数据
        map.put("relativesconfirmation", relativesconfirmation);
        //封装伦理审查
        Map<String, String> ethicalreviewopinions = new HashMap<>();
        if (serviceDonatebaseinfo.getWorkflow() >= 3) {
            ServiceEthicalreviewopinions serviceEthicalreviewopinions = new ServiceEthicalreviewopinions();
            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("process", "");
            }
        }
        //封装伦理审查返回数据
        map.put("ethicalreviewopinions", ethicalreviewopinions);
        //封装器官分配
        Map<String, String> organallocationService = 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", "");
            }
        }
        //封装器官分配返回数据
        map.put("organallocationService", organallocationService);
        //封装获取见证
        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("process", "");
            }
        }
        //封装获取见证返回数据
        map.put("donationwitness", donationwitness);
        //封装完成登记
        Map<String, String> donatecompletioninfo = new HashMap<>();
        if (serviceDonatebaseinfo.getWorkflow() >= 6) {
            ServiceDonatecompletioninfo serviceDonatecompletioninfo = new ServiceDonatecompletioninfo();
            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("process", "");
            }
        }
        //封装完成登记返回数据
        map.put("donatecompletioninfo", donatecompletioninfo);
        //将数据封闭,并返回
        return map;
    }
}
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonateorganServiceImpl.java
@@ -61,23 +61,6 @@
    @Autowired
    private SysDictDataMapper dictDataMapper;
    @Autowired
    private IServiceMedicalevaluationService serviceMedicalevaluationService;
    @Autowired
    private IServiceRelativesconfirmationService serviceRelativesconfirmationService;
    @Autowired
    private IServiceEthicalreviewopinionsService serviceEthicalreviewopinionsService;
    @Autowired
    private IServiceOrganallocationService serviceOrganallocationService;
    @Autowired
    private IServiceDonationwitnessService serviceDonationwitnessService;
    @Autowired
    private IServiceDonatecompletioninfoService serviceDonatecompletioninfoService;
    /**
@@ -753,97 +736,6 @@
        return l;
    }
    @Override
    public Map<String, Object> getWorkFlow(Long id) {
        //用于返回
        Map<String, Object> map = new ConcurrentHashMap<>();
        ServiceDonateorgan serviceDonateorgan = getById(id);
        if (ObjectUtils.isEmpty(serviceDonateorgan)) {
            return null;
        }
        //封装serviceDonateorgan潜在捐献数据
        Map<String, String> donateorgan = new HashMap<>();
        donateorgan.put("createtime", serviceDonateorgan.getCreateTime().toString());
        donateorgan.put("updatetime", serviceDonateorgan.getUpdateTime().toString());
        donateorgan.put("process", "");
        //封装医学评估
        Map<String, String> medicalevaluation = new HashMap<>();
        ServiceMedicalevaluation serviceMedicalevaluation = new ServiceMedicalevaluation();
        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("process", "");
        }
        //封装捐献确认
        Map<String, String> relativesconfirmation = new HashMap<>();
        ServiceRelativesconfirmation serviceRelativesconfirmation = new ServiceRelativesconfirmation();
        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("process", "");
        }
        //封装伦理审查
        Map<String, String> ethicalreviewopinions = new HashMap<>();
        ServiceEthicalreviewopinions serviceEthicalreviewopinions = new ServiceEthicalreviewopinions();
        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("process", "");
        }
        //封装器官分配
        Map<String, String> organallocationService = new HashMap<>();
        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", "");
        }
        //封装获取见证
        Map<String, String> donationwitness = new HashMap<>();
        ServiceDonationwitness serviceDonationwitness = serviceDonationwitnessService.getByInfoId(id);
        if (!ObjectUtils.isEmpty(serviceDonationwitness)) {
            donationwitness.put("createtime", serviceDonationwitness.getCreateTime().toString());
            donationwitness.put("updatetime", serviceDonationwitness.getUpdateTime().toString());
            donationwitness.put("process", "");
        }
        //封装完成登记
        Map<String, String> donatecompletioninfo = new HashMap<>();
        ServiceDonatecompletioninfo serviceDonatecompletioninfo = new ServiceDonatecompletioninfo();
        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("process", "");
        }
        //将数据封闭,并返回
        map.put("donateorgan", donateorgan);
        map.put("medicalevaluation", medicalevaluation);
        map.put("relativesconfirmation", relativesconfirmation);
        map.put("ethicalreviewopinions", ethicalreviewopinions);
        map.put("organallocationService", organallocationService);
        map.put("donationwitness", donationwitness);
        map.put("donatecompletioninfo", donatecompletioninfo);
        return map;
    }
//    @Override
ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml
@@ -91,6 +91,7 @@
        <result property="leadername"    column="leadername"    />
        <result property="businessarea"    column="businessarea"    />
        <result property="annexfiles"    column="annexfiles"    />
        <result property="workflow"    column="workflow"    />
    </resultMap>
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
@@ -1,19 +1,21 @@
package com.ruoyi.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysDept;
/**
 * 部门管理 数据层
 *
 *
 * @author ruoyi
 */
public interface SysDeptMapper
{
@Mapper
public interface SysDeptMapper {
    /**
     * 查询部门管理数据
     *
     *
     * @param dept 部门信息
     * @return 部门信息集合
     */
@@ -21,8 +23,8 @@
    /**
     * 根据角色ID查询部门树信息
     *
     * @param roleId 角色ID
     *
     * @param roleId            角色ID
     * @param deptCheckStrictly 部门树选择项是否关联显示
     * @return 选中部门列表
     */
@@ -30,7 +32,7 @@
    /**
     * 根据部门ID查询信息
     *
     *
     * @param deptId 部门ID
     * @return 部门信息
     */
@@ -38,7 +40,7 @@
    /**
     * 根据ID查询所有子部门
     *
     *
     * @param deptId 部门ID
     * @return 部门列表
     */
@@ -46,7 +48,7 @@
    /**
     * 根据ID查询所有子部门(正常状态)
     *
     *
     * @param deptId 部门ID
     * @return 子部门数
     */
@@ -54,7 +56,7 @@
    /**
     * 是否存在子节点
     *
     *
     * @param deptId 部门ID
     * @return 结果
     */
@@ -62,7 +64,7 @@
    /**
     * 查询部门是否存在用户
     *
     *
     * @param deptId 部门ID
     * @return 结果
     */
@@ -70,7 +72,7 @@
    /**
     * 校验部门名称是否唯一
     *
     *
     * @param deptName 部门名称
     * @param parentId 父部门ID
     * @return 结果
@@ -79,7 +81,7 @@
    /**
     * 新增部门信息
     *
     *
     * @param dept 部门信息
     * @return 结果
     */
@@ -87,7 +89,7 @@
    /**
     * 修改部门信息
     *
     *
     * @param dept 部门信息
     * @return 结果
     */
@@ -95,14 +97,14 @@
    /**
     * 修改所在部门正常状态
     *
     *
     * @param deptIds 部门ID组
     */
    public void updateDeptStatusNormal(Long[] deptIds);
    /**
     * 修改子元素关系
     *
     *
     * @param depts 子元素
     * @return 结果
     */
@@ -110,7 +112,7 @@
    /**
     * 删除部门管理信息
     *
     *
     * @param deptId 部门ID
     * @return 结果
     */