From 68b49efb4da346edb42a5d8ebb39af47207402bd Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期一, 12 十月 2026 11:14:13 +0800
Subject: [PATCH] 修改了报销校验
---
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceEthicalreviewopinionsServiceImpl.java | 42 +++++++++++++++++++++++++++---------------
1 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceEthicalreviewopinionsServiceImpl.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceEthicalreviewopinionsServiceImpl.java
index 1d5aaab..1d974e5 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceEthicalreviewopinionsServiceImpl.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceEthicalreviewopinionsServiceImpl.java
@@ -23,6 +23,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Map;
import com.ruoyi.common.utils.StringUtils;
@@ -99,28 +100,39 @@
}
List<EthicalReviewVO> ethicalReviewVOS = serviceEthicalreviewopinionsMapper.selectVOList(ethicalReviewVO);
+ // 涓�娆℃�у彇鍑哄悇鎹愮尞鍩虹瀵瑰簲鐨勬浜℃椂闂达紝閬垮厤鍦ㄥ惊鐜噷鎸夋崘鐚熀纭�ID閫愭潯鏌ヨ璇佽〃锛圢+1锛�
+ List<Long> infoIds = new ArrayList<>();
+ for (EthicalReviewVO item : ethicalReviewVOS) {
+ if (item.getId() != null) {
+ infoIds.add(item.getId());
+ }
+ }
+ Map<Long, Date> deathTimeMap = new HashMap<>();
+ if (!infoIds.isEmpty()) {
+ for (ServiceDonationwitness witness : serviceDonationwitnessMapper.selectDeathTimeByInfoIds(infoIds)) {
+ if (witness.getInfoid() != null && !deathTimeMap.containsKey(witness.getInfoid())) {
+ deathTimeMap.put(witness.getInfoid(), witness.getDeathtime());
+ }
+ }
+ }
+
for (EthicalReviewVO ethicalReviewVO1 : ethicalReviewVOS) {
//鍏堢粰涓勾榫勯粯璁ゅ�硷紙鍥犱负age鏄暟瀛楃被鍨嬶紝涓嶈兘鏀炬í鏉狅紝鎵�浠ュ氨鎵�妯墰鏀惧埌鍗曚綅涓婏級
ethicalReviewVO1.setAgeunit("-");
ethicalReviewVO1.setAge(null);
ethicalReviewVO1.setAge2(null);
//鑾峰彇姝讳骸鏃堕棿锛屽鏋滆幏鍙栬璇侀噷鏈夋浜℃椂闂达紝鍒欒繘琛岃绠椾粬鐨勫勾榫�
- ServiceDonationwitness sdw = new ServiceDonationwitness();
- sdw.setInfoid(ethicalReviewVO1.getId());
- List<ServiceDonationwitness> serviceDonationwitnessList = serviceDonationwitnessMapper.selectServiceDonationwitnessList(sdw);
- if (!CollectionUtils.isEmpty(serviceDonationwitnessList) && ethicalReviewVO1.getBirthday() != null) {
- Date deathtime = serviceDonationwitnessList.get(0).getDeathtime();
- if (ObjectUtils.isNotEmpty(deathtime)) {
- Map<String, String> map = CalculateDateUtils.calculateAge(ethicalReviewVO1.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), deathtime.toInstant().atZone(ZoneId.systemDefault()).toLocalDate());
- if (ObjectUtils.isEmpty(map)) {
- log.error("EthicalReviewVO鍑虹敓鏃ユ湡锛歿},EthicalReviewVO姝讳骸鏃ユ湡锛歿}", ethicalReviewVO1.getBirthday(), deathtime);
- continue;
- }
- ethicalReviewVO1.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null);
- ethicalReviewVO1.setAgeunit(map.get("ageUnit"));
- ethicalReviewVO1.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null);
- ethicalReviewVO1.setAgeunit2(map.get("ageUnit2"));
+ Date deathtime = deathTimeMap.get(ethicalReviewVO1.getId());
+ if (ObjectUtils.isNotEmpty(deathtime) && ethicalReviewVO1.getBirthday() != null) {
+ Map<String, String> map = CalculateDateUtils.calculateAge(ethicalReviewVO1.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), deathtime.toInstant().atZone(ZoneId.systemDefault()).toLocalDate());
+ if (ObjectUtils.isEmpty(map)) {
+ log.error("EthicalReviewVO鍑虹敓鏃ユ湡锛歿},EthicalReviewVO姝讳骸鏃ユ湡锛歿}", ethicalReviewVO1.getBirthday(), deathtime);
+ continue;
}
+ ethicalReviewVO1.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null);
+ ethicalReviewVO1.setAgeunit(map.get("ageUnit"));
+ ethicalReviewVO1.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null);
+ ethicalReviewVO1.setAgeunit2(map.get("ageUnit2"));
}
}
--
Gitblit v1.9.3