参数设置

This commit is contained in:
zhangheng 2025-01-02 15:45:46 +08:00
parent f1174757a6
commit 46eca29edb
4 changed files with 8 additions and 25 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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())) {

View File

@ -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<PropagandaInfo> 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);
}