| | |
| | | import com.ruoyi.common.enums.OrganEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.DtoConversionUtils; |
| | | import com.ruoyi.project.domain.ServiceDonatebaseinfo; |
| | | import com.ruoyi.project.domain.ServiceDonateorgan; |
| | | import com.ruoyi.project.domain.vo.DonationWitnessVO; |
| | | import com.ruoyi.project.domain.vo.TimeVO; |
| | |
| | | @ApiOperation("新增捐献见证") |
| | | //@PreAuthorize("@ss.hasPermi('project:donationwitness:add')") |
| | | @Log(title = "捐献见证", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceDonationwitness serviceDonationwitness) { |
| | | |
| | | return toAjax(serviceDonationwitnessService.save(serviceDonationwitness)); |
| | | boolean save = serviceDonationwitnessService.save(serviceDonationwitness); |
| | | if (save) { |
| | | //生成“捐献者编号” |
| | | ServiceDonatebaseinfo serviceDonatebaseinfo = serviceDonatebaseinfoService.getById(serviceDonationwitness.getInfoid()); |
| | | log.info("serviceDonatebaseinfo的信息为{}", serviceDonatebaseinfo); |
| | | String donorno = serviceDonatebaseinfoService.getDonateNumber(serviceDonatebaseinfo); |
| | | log.info("生成的捐献者编号为:{}", donorno); |
| | | serviceDonatebaseinfo.setDonorno(donorno); |
| | | serviceDonatebaseinfoService.updateById(serviceDonatebaseinfo); |
| | | } |
| | | return AjaxResult.success(serviceDonationwitness); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("downloadUrl", "/profile/download/wordtemplate/" + name + ".doc"); |
| | | map.put("downloadName", name + ".doc"); |
| | | return map; |
| | | } |
| | | |
| | |
| | | dataMap.put("ZDMCG", donationWitness.getAortacannulatime() == null ? "" : sformat.format(donationWitness.getAortacannulatime())); |
| | | dataMap.put("ZDMGZ", donationWitness.getAortaperfusiontime() == null ? "" : sformat.format(donationWitness.getAortaperfusiontime())); |
| | | |
| | | if (donationWitness.getIsrestoreremains() == 0) { |
| | | if (donationWitness.getIsrestoreremains() != null && donationWitness.getIsrestoreremains() == 0) { |
| | | dataMap.put("HFYT", "□"); |
| | | dataMap.put("BHFYT", (char) 8730); |
| | | } else if (donationWitness.getIsrestoreremains() == 1) { |
| | | } else if (donationWitness.getIsrestoreremains() != null && donationWitness.getIsrestoreremains() == 1) { |
| | | dataMap.put("HFYT", (char) 8730); |
| | | dataMap.put("BHFYT", "□"); |
| | | } |
| | | |
| | | if (donationWitness.getIsspendremember() == 0) { |
| | | if (donationWitness.getIsspendremember() != null && donationWitness.getIsspendremember() == 0) { |
| | | dataMap.put("MA", "□"); |
| | | dataMap.put("BMA", (char) 8730); |
| | | } else if (donationWitness.getIsspendremember() == 1) { |
| | | } else if (donationWitness.getIsspendremember() != null && donationWitness.getIsspendremember() == 1) { |
| | | dataMap.put("MA", (char) 8730); |
| | | dataMap.put("BMA", "□"); |
| | | } |