diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java index 388594a48b..0036e17a81 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java @@ -30,6 +30,7 @@ import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.SpringContextUtils; import com.epmet.constant.ActConstant; import com.epmet.dao.ActInfoDao; import com.epmet.dao.ActUserRelationDao; @@ -66,16 +67,13 @@ public class ActInfoServiceImpl extends BaseServiceImpl option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + Map option = SpringContextUtils.getBean(IcPartyUnitService.class).option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); List unitIds = icActivityUnitRelationService.getUnitList(dto.getId()); List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); detailResultDTO.setUnitIdList(unitIds); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 07014bd72c..d0d8c5d541 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -44,6 +44,7 @@ import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.FileUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.SpringContextUtils; import com.epmet.constant.UserDemandConstant; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcPartyUnitDao; @@ -99,16 +100,16 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl serviceItemList = icServiceItemDictService.queryDictList(formDTO.getCustomerId()); Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取单位积分 - Map pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); + Map pointMap = SpringContextUtils.getBean(IcUserDemandRecService.class).getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); dtoList.forEach(item -> { item.setTypeName(unitTypeMap.getData().get(item.getType())); //这是错误的,应该是赋值type,遗留bug, 先不改了.... @@ -180,7 +181,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl serviceItemList = icServiceItemDictService.queryDictList(formDTO.getCustomerId()); Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取单位积分 - Map pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); + Map pointMap = SpringContextUtils.getBean(IcUserDemandRecService.class).getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); dtoList.forEach(item -> { item.setTypeName(unitTypeMap.getData().get(item.getType())); //这是错误的,应该是赋值type,遗留bug, 先不改了.... @@ -211,7 +212,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl pointMap = icUserDemandRecService.getServicePoint(entity.getCustomerId(), UserDemandConstant.PARTY_UNIT); + Map pointMap = SpringContextUtils.getBean(IcUserDemandRecService.class).getServicePoint(entity.getCustomerId(), UserDemandConstant.PARTY_UNIT); dto.setServiceMatterList(Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA))); dto.setScore(null == pointMap.get(id) ? NumConstant.ZERO : pointMap.get(id)); // 分类名称 @@ -271,7 +272,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + if (SpringContextUtils.getBean(IcUserDemandRecService.class).selectCountByServerId(id) > NumConstant.ZERO) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "存在未完成的服务", "存在未完成的服务,不能删除"); } //校验是否有同步到通讯录,是否存在工作人员下有未处理项目数据【联建单位被同步到通讯录部门的,如果部门下人员存在未办结项目则不允许删除】 @@ -438,7 +439,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl list = icUserDemandRecService.groupByServer(formDTO.getCustomerId(), formDTO.getServerId(), formDTO.getServiceType()); + List list = SpringContextUtils.getBean(IcUserDemandRecService.class).groupByServer(formDTO.getCustomerId(), formDTO.getServerId(), formDTO.getServiceType()); for (ServiceStatDTO serviceStatDTO : list) { if (0 != serviceStatDTO.getDemandCount()) { BigDecimal result = serviceStatDTO.getTotalScore().divide(new BigDecimal(serviceStatDTO.getDemandCount()), 4, BigDecimal.ROUND_HALF_UP);