From 46eca29edbddebad47babc0ddbfab85a82248a99 Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Thu, 2 Jan 2025 15:45:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 3 --- .../xinelu/common/config/XinYiLuDatabase.java | 18 ------------------ .../impl/SystemHomePageServiceImpl.java | 2 +- .../impl/PropagandaInfoServiceImpl.java | 10 +++++++--- 4 files changed, 8 insertions(+), 25 deletions(-) delete mode 100644 postdischarge-common/src/main/java/com/xinelu/common/config/XinYiLuDatabase.java diff --git a/postdischarge-admin/src/main/resources/application.yml b/postdischarge-admin/src/main/resources/application.yml index 0d59a8be..87bb28de 100644 --- a/postdischarge-admin/src/main/resources/application.yml +++ b/postdischarge-admin/src/main/resources/application.yml @@ -294,6 +294,3 @@ aiob: # 任务执行回调地址--测试 callBackUrl: http://182.92.166.109:9707/api/taskCallBack # callBackUrl: http://8.131.93.145:54011/api/taskCallBack - -xinyilu-database: - id: 46 diff --git a/postdischarge-common/src/main/java/com/xinelu/common/config/XinYiLuDatabase.java b/postdischarge-common/src/main/java/com/xinelu/common/config/XinYiLuDatabase.java deleted file mode 100644 index 3206d0fb..00000000 --- a/postdischarge-common/src/main/java/com/xinelu/common/config/XinYiLuDatabase.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xinelu.common.config; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * @Description 新医路院后数据库账号id参数配置类 - * @Author zh - * @Date 2024-07-31 - */ -@Data -@Component -@ConfigurationProperties(prefix = "xinyilu-database") -public class XinYiLuDatabase { - - private Long id; -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/homepage/impl/SystemHomePageServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/homepage/impl/SystemHomePageServiceImpl.java index 08c2cc48..ad7466ec 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/homepage/impl/SystemHomePageServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/homepage/impl/SystemHomePageServiceImpl.java @@ -163,7 +163,7 @@ public class SystemHomePageServiceImpl implements SystemHomePageService { allCount = patientAndNodes.size(); for (PatientAndNode patientAndNode : patientAndNodes) { LocalDate localDate = null; - if (Objects.nonNull(patientAndNode.getDischargeTime())) { + if (Objects.nonNull(patientAndNode.getDischargeTime()) && Objects.nonNull(patientAndNode.getRouteNodeDay())) { localDate = patientAndNode.getDischargeTime().plusDays(patientAndNode.getRouteNodeDay()); } if (Objects.isNull(patientAndNode.getDischargeTime()) && Objects.nonNull(patientAndNode.getVisitDate()) && Objects.nonNull(patientAndNode.getRouteNodeDay())) { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java index 8c32c665..183d8013 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java @@ -1,7 +1,6 @@ package com.xinelu.manage.service.propagandainfo.impl; import com.xinelu.common.annotation.DataScope; -import com.xinelu.common.config.XinYiLuDatabase; import com.xinelu.common.constant.Constants; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; @@ -26,6 +25,8 @@ import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import javax.annotation.Resource; + +import com.xinelu.system.service.ISysConfigService; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; @@ -51,7 +52,7 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService { @Resource private GenerateSystemCodeUtil generateSystemCodeUtil; @Resource - private XinYiLuDatabase xinYiLuDatabase; + private ISysConfigService sysConfigService; /** * 查询宣教库管理 @@ -96,7 +97,10 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService { //@DataScope(agencyAlias = "p") 除admin其他账号的机构id必传 public List selectPropagandaInfoList(PropagandaInfoDto propagandaInfo) { if (StringUtils.isNotBlank(propagandaInfo.getSource()) && propagandaInfo.getSource().equals("PUBLIC")){ - propagandaInfo.setPublicId(xinYiLuDatabase.getId()); + String publicAgencyId = sysConfigService.selectConfigByKey("public_agency_id"); + if (StringUtils.isNotBlank(publicAgencyId)){ + propagandaInfo.setPublicId(Long.parseLong(publicAgencyId)); + } } return propagandaInfoMapper.selectPropagandaInfoList(propagandaInfo); }