package com.ruoyi.web.controller.project; 
 | 
  
 | 
import java.io.*; 
 | 
import java.text.SimpleDateFormat; 
 | 
import java.util.*; 
 | 
  
 | 
import com.ruoyi.common.config.RuoYiConfig; 
 | 
import com.ruoyi.common.constant.HttpStatus; 
 | 
import com.ruoyi.common.enums.Education; 
 | 
import com.ruoyi.common.enums.NationalityEnum; 
 | 
import com.ruoyi.common.exception.ServiceException; 
 | 
import com.ruoyi.common.exception.base.BaseException; 
 | 
import com.ruoyi.project.domain.vo.RelativeConfirmationVO; 
 | 
import com.ruoyi.project.mapper.ServiceDonatebaseinfoMapper; 
 | 
import com.ruoyi.project.mapper.ServiceRelativesconfirmationMapper; 
 | 
import com.ruoyi.project.service.IServiceDonatebaseinfoService; 
 | 
import freemarker.template.Configuration; 
 | 
import freemarker.template.Template; 
 | 
import freemarker.template.TemplateException; 
 | 
import io.swagger.annotations.Api; 
 | 
import io.swagger.annotations.ApiOperation; 
 | 
import org.springframework.security.access.prepost.PreAuthorize; 
 | 
import org.springframework.beans.factory.annotation.Autowired; 
 | 
import org.springframework.util.CollectionUtils; 
 | 
import org.springframework.web.bind.annotation.GetMapping; 
 | 
import org.springframework.web.bind.annotation.PostMapping; 
 | 
import org.springframework.web.bind.annotation.PutMapping; 
 | 
import org.springframework.web.bind.annotation.DeleteMapping; 
 | 
import org.springframework.web.bind.annotation.PathVariable; 
 | 
import org.springframework.web.bind.annotation.RequestBody; 
 | 
import org.springframework.web.bind.annotation.RequestMapping; 
 | 
import org.springframework.web.bind.annotation.RestController; 
 | 
import com.ruoyi.common.annotation.Log; 
 | 
import com.ruoyi.common.annotation.RepeatSubmit; 
 | 
import com.ruoyi.common.core.controller.BaseController; 
 | 
import com.ruoyi.common.core.domain.AjaxResult; 
 | 
import com.ruoyi.common.enums.BusinessType; 
 | 
import com.ruoyi.project.domain.ServiceRelativesconfirmation; 
 | 
import com.ruoyi.project.service.IServiceRelativesconfirmationService; 
 | 
import com.ruoyi.common.utils.poi.ExcelUtil; 
 | 
import com.ruoyi.common.core.page.TableDataInfo; 
 | 
  
 | 
/** 
 | 
 * 捐献亲属确认Controller 
 | 
 * 
 | 
 * @author ruoyi 
 | 
 * @date 2021-11-15 
 | 
 */ 
 | 
@Api("亲属确认管理") 
 | 
@RestController 
 | 
@RequestMapping("/project/relativesconfirmation") 
 | 
public class ServiceRelativesconfirmationController extends BaseController { 
 | 
    @Autowired 
 | 
    private IServiceRelativesconfirmationService serviceRelativesconfirmationService; 
 | 
  
 | 
  
 | 
    @Autowired 
 | 
    private ServiceDonatebaseinfoMapper serviceDonatebaseinfoMapper; 
 | 
  
 | 
    @Autowired 
 | 
    ServiceRelativesconfirmationMapper serviceRelativesconfirmationMapper; 
 | 
  
 | 
    private static Configuration configuration = null; 
 | 
  
 | 
    public ServiceRelativesconfirmationController() { 
 | 
        configuration = new Configuration(); 
 | 
        configuration.setDefaultEncoding("utf-8"); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 查询捐献亲属确认列表 
 | 
     */ 
 | 
    @ApiOperation("获取亲属确认列表") 
 | 
    //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:list')") 
 | 
    @GetMapping("/list") 
 | 
    public TableDataInfo list(ServiceRelativesconfirmation serviceRelativesconfirmation) { 
 | 
        startPage(); 
 | 
        List<ServiceRelativesconfirmation> list = serviceRelativesconfirmationService.queryList(serviceRelativesconfirmation); 
 | 
        return getDataTable(list); 
 | 
    } 
 | 
  
 | 
    @GetMapping("/listnew") 
 | 
    public TableDataInfo listnew(RelativeConfirmationVO relativeConfirmationVO) { 
 | 
        startPage(); 
 | 
        List<RelativeConfirmationVO> list = serviceRelativesconfirmationService.selectVOList(relativeConfirmationVO); 
 | 
        return getDataTable(list); 
 | 
    } 
 | 
  
 | 
  
 | 
    /** 
 | 
     * 导出捐献亲属确认列表 
 | 
     */ 
 | 
    @ApiOperation("导出亲属确认列表") 
 | 
    //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:export')") 
 | 
    @Log(title = "捐献亲属确认", businessType = BusinessType.EXPORT) 
 | 
    @GetMapping("/export") 
 | 
    public AjaxResult export(ServiceRelativesconfirmation serviceRelativesconfirmation) { 
 | 
        List<ServiceRelativesconfirmation> list = serviceRelativesconfirmationService.queryList(serviceRelativesconfirmation); 
 | 
        ExcelUtil<ServiceRelativesconfirmation> util = new ExcelUtil<ServiceRelativesconfirmation>(ServiceRelativesconfirmation.class); 
 | 
        return util.exportExcel(list, "捐献亲属确认数据"); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 获取捐献亲属确认详细信息 
 | 
     */ 
 | 
    @ApiOperation("通过id获取亲属确认信息") 
 | 
    //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:query')") 
 | 
    @GetMapping(value = "/{id}") 
 | 
    public AjaxResult getInfo(@PathVariable("id") Long id) { 
 | 
        return AjaxResult.success(serviceRelativesconfirmationService.getById(id)); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 新增捐献亲属确认 
 | 
     */ 
 | 
    @ApiOperation("新增亲属确认") 
 | 
    //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:add')") 
 | 
    @Log(title = "捐献亲属确认", businessType = BusinessType.INSERT) 
 | 
    @PostMapping("/add") 
 | 
    @RepeatSubmit 
 | 
    public AjaxResult add(@RequestBody ServiceRelativesconfirmation serviceRelativesconfirmation) { 
 | 
        boolean save = serviceRelativesconfirmationService.save(serviceRelativesconfirmation); 
 | 
        return AjaxResult.success(serviceRelativesconfirmation); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 修改捐献亲属确认 
 | 
     */ 
 | 
    @ApiOperation("修改亲属确认") 
 | 
    //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:edit')") 
 | 
    @Log(title = "捐献亲属确认", businessType = BusinessType.UPDATE) 
 | 
    @PostMapping("/edit") 
 | 
    @RepeatSubmit 
 | 
    public AjaxResult edit(@RequestBody ServiceRelativesconfirmation serviceRelativesconfirmation) { 
 | 
        if (serviceRelativesconfirmation.getInfoid() == null || serviceRelativesconfirmation.getId() == null) { 
 | 
            throw new BaseException("请联系工程师检查ID是否为空"); 
 | 
        } 
 | 
//        ServiceRelativesconfirmation serviceRelativesconfirmation1 = new ServiceRelativesconfirmation(); 
 | 
//        serviceRelativesconfirmation1.setInfoid(serviceRelativesconfirmation.getInfoid()); 
 | 
//        List<ServiceRelativesconfirmation> list = serviceRelativesconfirmationService.queryList(serviceRelativesconfirmation1); 
 | 
//        if (CollectionUtils.isEmpty(list)) { 
 | 
//            return error("捐献亲属确认数据不存在,请检查后再次修改"); 
 | 
//        } 
 | 
//        serviceRelativesconfirmation.setId(list.get(0).getId()); 
 | 
        return toAjax(serviceRelativesconfirmationService.updateById(serviceRelativesconfirmation)); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 删除捐献亲属确认 
 | 
     */ 
 | 
    @ApiOperation("删除亲属确认") 
 | 
    //// @PreAuthorize("@ss.hasPermi('project:relativesconfirmation:remove')") 
 | 
    @Log(title = "捐献亲属确认", businessType = BusinessType.DELETE) 
 | 
    @GetMapping("/remove/{ids}") 
 | 
    public AjaxResult remove(@PathVariable Long[] ids) { 
 | 
        return toAjax(serviceRelativesconfirmationService.removeByIds(Arrays.asList(ids))); 
 | 
    } 
 | 
  
 | 
  
 | 
    @GetMapping(value = "/addH4H5InDonateNumber/{infoid}") 
 | 
    public AjaxResult addH4H5(@PathVariable Long infoid) { 
 | 
        return AjaxResult.success(serviceRelativesconfirmationService.addH4H5(infoid)); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 下载人体器官捐献亲属确认登记表 
 | 
     */ 
 | 
    @ApiOperation("通过id下载人体器官捐献亲属确认登记表") 
 | 
    @GetMapping(value = "/download/{id}") 
 | 
    public Map downloadInfo(@PathVariable("id") Long id) throws IOException { 
 | 
        Map dataMap = new HashMap(); 
 | 
        getData(dataMap, id); 
 | 
        String filePath = getClass().getResource("/template/").getPath(); 
 | 
        System.out.println(filePath); 
 | 
        //设置模本装置方法和路径,FreeMarker支持多种模板装载方法。可以重servlet,classpath,数据库教程装载, 
 | 
        configuration.setDirectoryForTemplateLoading(new File(filePath)); 
 | 
        Template t = null; 
 | 
        try { 
 | 
            //捐献表.ftl为要装载的模板 
 | 
            t = configuration.getTemplate("人体器官捐献亲属确认登记表.ftl"); 
 | 
        } catch (IOException e) { 
 | 
            e.printStackTrace(); 
 | 
        } 
 | 
        String newTime = String.valueOf(Calendar.getInstance().getTimeInMillis()); 
 | 
        String name = "人体器官捐献亲属确认登记表_" + dataMap.get("XM") + "_" + newTime; 
 | 
        //输出文档路径及名称 
 | 
        File outFile = new File(RuoYiConfig.getProfile() + "/download/wordtemplate/" + name + ".doc"); 
 | 
        Writer out = null; 
 | 
  
 | 
        try { 
 | 
            out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile), "utf-8")); 
 | 
            t.process(dataMap, out); 
 | 
        } catch (TemplateException e) { 
 | 
            e.printStackTrace(); 
 | 
        } 
 | 
        Map<String, Object> map = new HashMap<>(); 
 | 
        map.put("downloadUrl", "/profile/download/wordtemplate/" + name + ".doc"); 
 | 
        map.put("downloadName", name + ".doc"); 
 | 
        return map; 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 注意dataMap里存放的数据Key值要与模板中的参数相对应 
 | 
     * 
 | 
     * @param dataMap 
 | 
     */ 
 | 
    private void getData(Map dataMap, Long id) { 
 | 
        ServiceRelativesconfirmation serviceRelativesconfirmation = new ServiceRelativesconfirmation(); 
 | 
        serviceRelativesconfirmation.setInfoid(id); 
 | 
        List<ServiceRelativesconfirmation> list = serviceRelativesconfirmationService.queryList(serviceRelativesconfirmation); 
 | 
        if (list.size() == 0 || list.size() > 1) { 
 | 
            throw new ServiceException("下载失败,亲属信息出错", HttpStatus.NO_CONTENT); 
 | 
        } 
 | 
        //亲属信息 
 | 
        ServiceRelativesconfirmation serviceRelatives = list.get(0); 
 | 
  
 | 
        RelativeConfirmationVO relativeConfirmationVO = new RelativeConfirmationVO(); 
 | 
        relativeConfirmationVO.setInfoid(id); 
 | 
        List<RelativeConfirmationVO> selectVOList = serviceRelativesconfirmationMapper.selectVOList(relativeConfirmationVO); 
 | 
        if (selectVOList.size() == 0 || list.size() > 1) { 
 | 
            throw new ServiceException("下载失败,用户信息出错", HttpStatus.NO_CONTENT); 
 | 
        } 
 | 
        //捐献人信息 
 | 
        RelativeConfirmationVO relativeConfirmation = selectVOList.get(0); 
 | 
  
 | 
        dataMap.put("JXBH", serviceRelatives.getDonorno() == null ? "" : serviceRelatives.getDonorno()); 
 | 
        String donorName = serviceDonatebaseinfoMapper.getDonorNameById(serviceRelatives.getInfoid()); 
 | 
        dataMap.put("XM", donorName == null ? "" : donorName); 
 | 
        if (relativeConfirmation.getSex().equals("0")) { 
 | 
            dataMap.put("XB", "未知的性别"); 
 | 
        } else if (relativeConfirmation.getSex().equals("1")) { 
 | 
            dataMap.put("XB", "男"); 
 | 
        } else if (relativeConfirmation.getSex().equals("2")) { 
 | 
            dataMap.put("XB", "女"); 
 | 
        } 
 | 
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
 | 
        dataMap.put("CSRQ", relativeConfirmation.getBirthday() == null ? "" : simpleDateFormat.format(relativeConfirmation.getBirthday()).substring(0, 10)); 
 | 
        dataMap.put("MZ", NationalityEnum.getDescByCode(relativeConfirmation.getNation()) == null ? "" : NationalityEnum.getDescByCode(relativeConfirmation.getNation())); 
 | 
        dataMap.put("XL", Education.getDescByCode(relativeConfirmation.getEducation()) == null ? "" : Education.getDescByCode(relativeConfirmation.getEducation())); 
 | 
        String occupation = ""; 
 | 
        if (relativeConfirmation.getOccupation().equals("admin")) { 
 | 
            occupation = "国家机关工作人员"; 
 | 
        } 
 | 
        if (relativeConfirmation.getOccupation().equals("tech")) { 
 | 
            occupation = "专业技术人员"; 
 | 
        } 
 | 
        if (relativeConfirmation.getOccupation().equals("business")) { 
 | 
            occupation = "商业从业人员"; 
 | 
        } 
 | 
        if (relativeConfirmation.getOccupation().equals("worker")) { 
 | 
            occupation = "工人"; 
 | 
        } 
 | 
        if (relativeConfirmation.getOccupation().equals("peasant")) { 
 | 
            occupation = "农林牧渔水利生产人员"; 
 | 
        } 
 | 
        if (relativeConfirmation.getOccupation().equals("police")) { 
 | 
            occupation = "军人"; 
 | 
        } 
 | 
        if (relativeConfirmation.getOccupation().equals("student")) { 
 | 
            occupation = "学生"; 
 | 
        } 
 | 
        if (relativeConfirmation.getOccupation().equals("others")) { 
 | 
            occupation = "其他人员"; 
 | 
        } 
 | 
  
 | 
        dataMap.put("ZY", relativeConfirmation.getOccupation() == null ? "" : occupation); 
 | 
        dataMap.put("JG", relativeConfirmation.getNativeplace() == null ? "" : relativeConfirmation.getNativeplace()); 
 | 
        dataMap.put("GJ", relativeConfirmation.getNationality() == null ? "" : relativeConfirmation.getNationality()); 
 | 
        if (relativeConfirmation.getIdcardtype() == 1) { 
 | 
            dataMap.put("ZJLX", "身份证"); 
 | 
        } else if (relativeConfirmation.getIdcardtype() == 2) { 
 | 
            dataMap.put("ZJLX", "军人证"); 
 | 
        } else if (relativeConfirmation.getIdcardtype() == 3) { 
 | 
            dataMap.put("ZJLX", "护照"); 
 | 
        } else if (relativeConfirmation.getIdcardtype() == 4) { 
 | 
            dataMap.put("ZJLX", "户口本"); 
 | 
        } else if (relativeConfirmation.getIdcardtype() == 5) { 
 | 
            dataMap.put("ZJLX", "外国人永久居住证"); 
 | 
        } else if (relativeConfirmation.getIdcardtype() == 6) { 
 | 
            dataMap.put("ZJLX", "武警证"); 
 | 
        } else if (relativeConfirmation.getIdcardtype() == 10) { 
 | 
            dataMap.put("ZJLX", "学生证"); 
 | 
        } else if (relativeConfirmation.getIdcardtype() == 11) { 
 | 
            dataMap.put("ZJLX", "士兵证"); 
 | 
        } else if (relativeConfirmation.getIdcardtype() == 16) { 
 | 
            dataMap.put("ZJLX", "港澳居民来往内地通行证"); 
 | 
        } else if (relativeConfirmation.getIdcardtype() == 17) { 
 | 
            dataMap.put("ZJLX", "台湾居民来往大陆通行证"); 
 | 
        } else if (relativeConfirmation.getIdcardtype() == 18) { 
 | 
            dataMap.put("ZJLX", "其他证件类型"); 
 | 
        } 
 | 
        dataMap.put("ZJHM", relativeConfirmation.getIdcardno() == null ? "" : relativeConfirmation.getIdcardno()); 
 | 
        dataMap.put("QSXM", serviceRelatives.getName() == null ? "" : serviceRelatives.getName()); 
 | 
        if (serviceRelatives.getFamilyrelations() == null) { 
 | 
            dataMap.put("GX", ""); 
 | 
        } 
 | 
        if (serviceRelatives.getFamilyrelations().equals("0")) { 
 | 
            dataMap.put("GX", "本人"); 
 | 
        } else if (serviceRelatives.getFamilyrelations().equals("1")) { 
 | 
            dataMap.put("GX", "配偶"); 
 | 
        } else if (serviceRelatives.getFamilyrelations().equals("2")) { 
 | 
            dataMap.put("GX", "子"); 
 | 
        } else if (serviceRelatives.getFamilyrelations().equals("3")) { 
 | 
            dataMap.put("GX", "女"); 
 | 
        } else if (serviceRelatives.getFamilyrelations().equals("4")) { 
 | 
            dataMap.put("GX", "父母"); 
 | 
        } else if (serviceRelatives.getFamilyrelations().equals("5")) { 
 | 
            dataMap.put("GX", "爷爷"); 
 | 
        } else if (serviceRelatives.getFamilyrelations().equals("6")) { 
 | 
            dataMap.put("GX", "其他"); 
 | 
        } 
 | 
        dataMap.put("SFZH", serviceRelatives.getIdcardno() == null ? "" : serviceRelatives.getIdcardno()); 
 | 
        dataMap.put("SHENG", serviceRelatives.getResidenceprovincename() == null ? "" : serviceRelatives.getResidenceprovincename()); 
 | 
        dataMap.put("SHI", serviceRelatives.getResidencecityname() == null ? "" : serviceRelatives.getResidencecityname()); 
 | 
        dataMap.put("XIAN", serviceRelatives.getResidencetownname() == null ? "" : serviceRelatives.getResidencetownname()); 
 | 
        dataMap.put("QT", serviceRelatives.getResidencecommunityname() == null ? "" : serviceRelatives.getResidencecommunityname()); 
 | 
        dataMap.put("XJZD", serviceRelatives.getResidenceaddress() == null ? "" : serviceRelatives.getResidenceaddress()); 
 | 
        dataMap.put("SJHM", serviceRelatives.getPhone() == null ? "" : serviceRelatives.getPhone()); 
 | 
        if (serviceRelatives.getKinship().contains("0")) { 
 | 
            dataMap.put("PE", (char) 8730); 
 | 
            if (serviceRelatives.getKinship().contains("1")) { 
 | 
                dataMap.put("CNZN", (char) 8730); 
 | 
                if (serviceRelatives.getKinship().contains("2")) { 
 | 
                    dataMap.put("FQ", (char) 8730); 
 | 
                    if (serviceRelatives.getKinship().contains("3")) { 
 | 
                        dataMap.put("MQ", (char) 8730); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } else { 
 | 
                        dataMap.put("MQ", "□"); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } 
 | 
                } else { 
 | 
                    dataMap.put("FQ", "□"); 
 | 
                    if (serviceRelatives.getKinship().contains("3")) { 
 | 
                        dataMap.put("MQ", (char) 8730); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } else { 
 | 
                        dataMap.put("MQ", "□"); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } 
 | 
                } 
 | 
            } else { 
 | 
                dataMap.put("CNZN", "□"); 
 | 
                if (serviceRelatives.getKinship().contains("2")) { 
 | 
                    dataMap.put("FQ", (char) 8730); 
 | 
                    if (serviceRelatives.getKinship().contains("3")) { 
 | 
                        dataMap.put("MQ", (char) 8730); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } else { 
 | 
                        dataMap.put("MQ", "□"); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } 
 | 
                } else { 
 | 
                    dataMap.put("FQ", "□"); 
 | 
                    if (serviceRelatives.getKinship().contains("3")) { 
 | 
                        dataMap.put("MQ", (char) 8730); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } else { 
 | 
                        dataMap.put("MQ", "□"); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } 
 | 
                } 
 | 
            } 
 | 
        } else { 
 | 
            dataMap.put("PE", "□"); 
 | 
            if (serviceRelatives.getKinship().contains("1")) { 
 | 
                dataMap.put("CNZN", (char) 8730); 
 | 
                if (serviceRelatives.getKinship().contains("2")) { 
 | 
                    dataMap.put("FQ", (char) 8730); 
 | 
                    if (serviceRelatives.getKinship().contains("3")) { 
 | 
                        dataMap.put("MQ", (char) 8730); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } else { 
 | 
                        dataMap.put("MQ", "□"); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } 
 | 
                } else { 
 | 
                    dataMap.put("FQ", "□"); 
 | 
                    if (serviceRelatives.getKinship().contains("3")) { 
 | 
                        dataMap.put("MQ", (char) 8730); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } else { 
 | 
                        dataMap.put("MQ", "□"); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } 
 | 
                } 
 | 
            } else { 
 | 
                dataMap.put("CNZN", "□"); 
 | 
                if (serviceRelatives.getKinship().contains("2")) { 
 | 
                    dataMap.put("FQ", (char) 8730); 
 | 
                    if (serviceRelatives.getKinship().contains("3")) { 
 | 
                        dataMap.put("MQ", (char) 8730); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } else { 
 | 
                        dataMap.put("MQ", "□"); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } 
 | 
                } else { 
 | 
                    dataMap.put("FQ", "□"); 
 | 
                    if (serviceRelatives.getKinship().contains("3")) { 
 | 
                        dataMap.put("MQ", (char) 8730); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } else { 
 | 
                        dataMap.put("MQ", "□"); 
 | 
                        if (serviceRelatives.getKinship().contains("5")) { 
 | 
                            dataMap.put("STR", (char) 8730); 
 | 
                        } else { 
 | 
                            dataMap.put("STR", "□"); 
 | 
                        } 
 | 
                    } 
 | 
                } 
 | 
            } 
 | 
        } 
 | 
        dataMap.put("ZNSL", serviceRelatives.getKinshipChildrennum() == null ? "" : serviceRelatives.getKinshipChildrennum()); 
 | 
        if (serviceRelatives.getOrgandecision().contains("肝脏")) { 
 | 
            dataMap.put("GZ", (char) 8730); 
 | 
        } else { 
 | 
            dataMap.put("GZ", "□"); 
 | 
        } 
 | 
        if (serviceRelatives.getOrgandecision().contains("双肾脏")) { 
 | 
            dataMap.put("SSZ", (char) 8730); 
 | 
        } else { 
 | 
            dataMap.put("SSZ", "□"); 
 | 
        } 
 | 
        if (serviceRelatives.getOrgandecision().contains("心脏")) { 
 | 
            dataMap.put("XZ", (char) 8730); 
 | 
        } else { 
 | 
            dataMap.put("XZ", "□"); 
 | 
        } 
 | 
        if (serviceRelatives.getOrgandecision().contains("肺脏")) { 
 | 
            dataMap.put("FZ", (char) 8730); 
 | 
        } else { 
 | 
            dataMap.put("FZ", "□"); 
 | 
        } 
 | 
        if (serviceRelatives.getOrgandecision().contains("胰腺")) { 
 | 
            dataMap.put("YX", (char) 8730); 
 | 
        } else { 
 | 
            dataMap.put("YX", "□"); 
 | 
        } 
 | 
        if (serviceRelatives.getOrgandecision().contains("小肠")) { 
 | 
            dataMap.put("XC", (char) 8730); 
 | 
        } else { 
 | 
            dataMap.put("XC", "□"); 
 | 
        } 
 | 
        if (serviceRelatives.getOrgandecision().contains("双眼组织")) { 
 | 
            dataMap.put("SYZZ", (char) 8730); 
 | 
        } else { 
 | 
            dataMap.put("SYZZ", "□"); 
 | 
        } 
 | 
        if (serviceRelatives.getOrgandecision().contains("遗体")) { 
 | 
            dataMap.put("YT", (char) 8730); 
 | 
        } else { 
 | 
            dataMap.put("YT", "□"); 
 | 
        } 
 | 
        dataMap.put("JXJDQT", serviceRelatives.getOrgandecisionOther() == null ? "" : serviceRelatives.getOrgandecisionOther()); 
 | 
        dataMap.put("HQZZ", serviceRelatives.getAcquisitiontissuename() == null ? "" : serviceRelatives.getAcquisitiontissuename()); 
 | 
  
 | 
        dataMap.put("XTY1", serviceRelatives.getCoordinatedusernameo() == null ? "" : serviceRelatives.getCoordinatedusernameo()); 
 | 
        dataMap.put("XTY2", serviceRelatives.getCoordinatedusernamet() == null ? "" : serviceRelatives.getCoordinatedusernamet()); 
 | 
        dataMap.put("FZRQZ", serviceRelatives.getResponsibleusername() == null ? "" : serviceRelatives.getResponsibleusername()); 
 | 
        Date dt = serviceRelatives.getSigndate(); 
 | 
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
 | 
        String date = formatter.format(dt); 
 | 
        String time = date.substring(0, 10); 
 | 
        dataMap.put("QSRQ", serviceRelatives.getSigndate() == null ? "" : time); 
 | 
    } 
 | 
  
 | 
} 
 |