diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java index ce1d187bf2..9855cee625 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java @@ -169,9 +169,4 @@ public interface ActConstant { * 活动类型-联建活动 */ String PARTY = "party"; - - /** - * 服务事项code - */ - String SERVICE_MATTER_CODE = "1010"; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java index d2f9f6d412..d6234d4a2c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java @@ -9,6 +9,7 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.demand.ServiceItemAddFormDTO; import com.epmet.dto.form.demand.ServiceItemPageFormDTO; import com.epmet.dto.form.demand.StatusFormDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.ServiceItemResultDTO; import com.epmet.service.IcServiceItemDictService; import org.springframework.beans.factory.annotation.Autowired; @@ -17,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * 服务事项分类字典表 * @@ -68,4 +71,15 @@ public class IcServiceItemDictController { icServiceItemDictService.updateStatus(formDTO); return new Result(); } + + /** + * 新增联建单位,查询服务事项列表 + * + * @param tokenDto + * @return + */ + @PostMapping("dict-list") + public Result> queryDictList(@LoginUser TokenDto tokenDto){ + return new Result>().ok(icServiceItemDictService.queryDictList(tokenDto.getCustomerId())); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java index a93e50aaff..fc671c3cdc 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java @@ -22,9 +22,12 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.form.demand.ServiceItemAddFormDTO; import com.epmet.dto.form.demand.ServiceItemPageFormDTO; import com.epmet.dto.form.demand.StatusFormDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.ServiceItemResultDTO; import com.epmet.entity.IcServiceItemDictEntity; +import java.util.List; + /** * 服务事项分类字典表 * @@ -52,4 +55,11 @@ public interface IcServiceItemDictService extends BaseService queryDictList(String customerId); } \ No newline at end of file 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 983c4834a2..e595bdd0c6 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 @@ -35,17 +35,14 @@ import com.epmet.dao.ActUserRelationDao; import com.epmet.dao.HeartUserInfoDao; import com.epmet.dto.ActInfoDTO; import com.epmet.dto.IcPartyUnitDTO; -import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.form.resi.*; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.resi.*; import com.epmet.entity.ActInfoEntity; import com.epmet.entity.ActUserRelationEntity; -import com.epmet.service.ActInfoService; -import com.epmet.service.ActUserRelationService; -import com.epmet.service.IcPartyUnitService; -import com.epmet.service.IcResiDemandDictService; +import com.epmet.service.*; import com.epmet.utils.CaculateDistance; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -77,9 +74,9 @@ public class ActInfoServiceImpl extends BaseServiceImpl page(Map params) { @@ -260,11 +257,9 @@ public class ActInfoServiceImpl extends BaseServiceImpl categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - detailResultDTO.setServiceMatterName(categoryMap.get(detailResultDTO.getServiceMatter())); + List serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + detailResultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(detailResultDTO.getServiceMatter()) ? categoryMap.get(detailResultDTO.getServiceMatter()) : StrConstant.EPMETY_STR); } if (StringUtils.isNotBlank(detailResultDTO.getUnitId())) { //获取单位名称 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index 67391ef70c..cdfa84d5e2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -35,14 +35,13 @@ import com.epmet.dao.IcPartyActivityDao; import com.epmet.dto.IcPartyActivityDTO; import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.PartyActivityFormDTO; -import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.result.ActivityStatisticsDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyActivityEntity; import com.epmet.excel.IcPartyActivityImportExcel; import com.epmet.service.IcPartyActivityService; import com.epmet.service.IcPartyUnitService; -import com.epmet.service.IcResiDemandDictService; +import com.epmet.service.IcServiceItemDictService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; @@ -71,11 +70,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl search(PartyActivityFormDTO formDTO) { @@ -159,10 +155,9 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList=icServiceItemDictService.queryDictList(entity.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + IcPartyActivityDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class); dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter())); //获取单位名称 @@ -225,10 +220,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getLabel, OptionDTO::getValue)); + List serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取联建单位 IcPartyUnitDTO unitDTO = new IcPartyUnitDTO(); unitDTO.setAgencyId(staffInfoCache.getAgencyId()); @@ -369,10 +362,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl option = icPartyUnitService.options(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取服务事项字典 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(tokenDto.getCustomerId()); - codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //数据组装 dtoList.forEach(dto -> { dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter())); 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 3850acd354..383b5e58fa 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 @@ -45,7 +45,6 @@ import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.dto.form.PartyUnitFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; -import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.ServiceStatDTO; @@ -54,6 +53,7 @@ import com.epmet.excel.IcPartyUnitImportExcel; import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.service.IcPartyUnitService; import com.epmet.service.IcResiDemandDictService; +import com.epmet.service.IcServiceItemDictService; import com.epmet.service.IcUserDemandRecService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -87,7 +87,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl search(PartyUnitFormDTO formDTO) { @@ -104,10 +105,10 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl pageInfo = new PageInfo<>(list); List dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); Result> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(formDTO.getCustomerId()); - codeFormDTO.setParentCategoryCode("1010"); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + //服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表 + List serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + dtoList.forEach(item -> { item.setType(unitTypeMap.getData().get(item.getType())); if (StringUtils.isNotBlank(item.getServiceMatter())) { @@ -138,10 +139,9 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl list = baseDao.selectList(wrapper); List dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); Result> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(formDTO.getCustomerId()); - codeFormDTO.setParentCategoryCode("1010"); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + //服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表 + List serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); dtoList.forEach(item -> { item.setType(unitTypeMap.getData().get(item.getType())); if (StringUtils.isNotBlank(item.getServiceMatter())) { @@ -312,10 +312,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getLabel, OptionDTO::getValue)); + List serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //1.数据校验 Iterator iterator = result.iterator(); while (iterator.hasNext()) { diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java index 4235d282c5..1868076ade 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java @@ -28,6 +28,7 @@ import com.epmet.dao.IcServiceItemDictDao; import com.epmet.dto.form.demand.ServiceItemAddFormDTO; import com.epmet.dto.form.demand.ServiceItemPageFormDTO; import com.epmet.dto.form.demand.StatusFormDTO; +import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.ServiceItemResultDTO; import com.epmet.entity.IcServiceItemDictEntity; import com.epmet.service.IcServiceItemDictService; @@ -37,6 +38,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -122,5 +124,28 @@ public class IcServiceItemDictServiceImpl extends BaseServiceImpl queryDictList(String customerId) { + List resultList=new ArrayList<>(); + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(IcServiceItemDictEntity::getCustomerId, customerId) + .orderByAsc(IcServiceItemDictEntity::getSort); + List list=baseDao.selectList(query); + for(IcServiceItemDictEntity entity:list){ + OptionDTO optionDTO=new OptionDTO(); + optionDTO.setLabel(entity.getCategoryName()); + optionDTO.setValue(entity.getCategoryCode()); + optionDTO.setAwardPoint(entity.getAwardPoint()); + resultList.add(optionDTO); + } + return resultList; + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java index 6e2a67aa17..5572a48f48 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java @@ -6,7 +6,6 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.LatestActContentDTO; import com.epmet.dto.LatestActInfoDTO; -import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.form.work.ActPreviewFormDTO; import com.epmet.dto.form.work.DraftActContentFormDTO; import com.epmet.dto.form.work.DraftActInfoFormDTO; @@ -43,14 +42,10 @@ public class WorkActDraftServiceImpl implements WorkActDraftService { @Autowired private LatestActContentService latestActContentService; @Resource - private IcResiDemandDictService icResiDemandDictService; + private IcServiceItemDictService icServiceItemDictService; @Resource private IcPartyUnitService icPartyUnitService; - /** - * 服务事项code - */ - private static final String SERVICE_MATTER_CODE = "1010"; /** * @return com.epmet.dto.form.work.PublishActInitResultDTO @@ -142,10 +137,8 @@ public class WorkActDraftServiceImpl implements WorkActDraftService { if (StringUtils.isNotBlank(actPreviewResultDTO.getServiceMatter())) { //获取服务事项 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(formDTO.getCustomerId()); - codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); actPreviewResultDTO.setServiceMatterName(categoryMap.get(actPreviewResultDTO.getServiceMatter())); } if (StringUtils.isNotBlank(actPreviewResultDTO.getUnitId())) { diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index e113d72019..7b076059b9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -25,7 +25,6 @@ import com.epmet.dto.*; import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.UserMessageFormDTO; import com.epmet.dto.form.WxSubscribeMessageFormDTO; -import com.epmet.dto.form.demand.SubCodeFormDTO; import com.epmet.dto.form.work.*; import com.epmet.dto.result.ActSponsorResultDTO; import com.epmet.dto.result.demand.OptionDTO; @@ -34,6 +33,7 @@ import com.epmet.entity.*; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.*; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -99,10 +99,9 @@ public class WorkActServiceImpl implements WorkActService { @Resource private IcPartyActivityService icPartyActivityService; @Resource - private IcResiDemandDictService icResiDemandDictService; - @Resource private IcPartyUnitService icPartyUnitService; - + @Resource + private IcServiceItemDictService icServiceItemDictService; /** @@ -782,11 +781,10 @@ public class WorkActServiceImpl implements WorkActService { if (StringUtils.isNotBlank(canceledActDetailResultDTO.getServiceMatter())) { //获取服务事项 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(customerId); - codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - canceledActDetailResultDTO.setServiceMatterName(categoryMap.get(canceledActDetailResultDTO.getServiceMatter())); + List serviceItemList = icServiceItemDictService.queryDictList(customerId); + Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + canceledActDetailResultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(canceledActDetailResultDTO.getServiceMatter()) ? + categoryMap.get(canceledActDetailResultDTO.getServiceMatter()) : StrConstant.EPMETY_STR); } if (StringUtils.isNotBlank(canceledActDetailResultDTO.getUnitId())) { //获取单位名称 @@ -840,11 +838,9 @@ public class WorkActServiceImpl implements WorkActService { if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) { //获取服务事项 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(formDTO.getCustomerId()); - codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter())); + List serviceItemList = icServiceItemDictService.queryDictList(formDTO.getCustomerId()); + Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + resultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(resultDTO.getServiceMatter()) ? categoryMap.get(resultDTO.getServiceMatter()) : StrConstant.EPMETY_STR); } if (StringUtils.isNotBlank(resultDTO.getUnitId())) { //获取单位名称 @@ -921,11 +917,9 @@ public class WorkActServiceImpl implements WorkActService { } if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) { //获取服务事项 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(customerId); - codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter())); + List serviceItemList=icServiceItemDictService.queryDictList(customerId); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + resultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(resultDTO.getServiceMatter()) ? categoryMap.get(resultDTO.getServiceMatter()) : StrConstant.EPMETY_STR); } if (StringUtils.isNotBlank(resultDTO.getUnitId())) { //获取单位名称 @@ -1317,11 +1311,9 @@ public class WorkActServiceImpl implements WorkActService { if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) { //获取服务事项 - SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); - codeFormDTO.setCustomerId(customerId); - codeFormDTO.setParentCategoryCode(ActConstant.SERVICE_MATTER_CODE); - Map categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter())); + List serviceItemList=icServiceItemDictService.queryDictList(customerId); + Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + resultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(resultDTO.getServiceMatter()) ? categoryMap.get(resultDTO.getServiceMatter()) : StrConstant.EPMETY_STR); } if (StringUtils.isNotBlank(resultDTO.getUnitId())) { //获取单位名称 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.10__update_service_item.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.10__update_service_item.sql new file mode 100644 index 0000000000..e07a359452 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.10__update_service_item.sql @@ -0,0 +1,49 @@ +-- 服务事项从需求分类字典表中抽离出来了,对应历史数据修改如下 +-- 1、联建单位的服务事项置空 +update ic_party_unit set SERVICE_MATTER =''; +-- 2、联建活动的服务事项修改为新的编码 +update ic_party_activity set SERVICE_MATTER='1006' where SERVICE_MATTER = '10100006'; +update ic_party_activity set SERVICE_MATTER='1008' where SERVICE_MATTER = '10100008'; +update ic_party_activity set SERVICE_MATTER='1002' where SERVICE_MATTER = '10100002'; +update ic_party_activity set SERVICE_MATTER='1009' where SERVICE_MATTER = '10100009'; +update ic_party_activity set SERVICE_MATTER='1017' where SERVICE_MATTER = '10100017'; +update ic_party_activity set SERVICE_MATTER='1021' where SERVICE_MATTER = '10100021'; +update ic_party_activity set SERVICE_MATTER='1015' where SERVICE_MATTER = '10100015'; +update ic_party_activity set SERVICE_MATTER='1011' where SERVICE_MATTER = '10100011'; +update ic_party_activity set SERVICE_MATTER='1018' where SERVICE_MATTER = '10100018'; +update ic_party_activity set SERVICE_MATTER='1005' where SERVICE_MATTER = '10100005'; +update ic_party_activity set SERVICE_MATTER='1010' where SERVICE_MATTER = '10100010'; +update ic_party_activity set SERVICE_MATTER='1003' where SERVICE_MATTER = '10100003'; +update ic_party_activity set SERVICE_MATTER='1020' where SERVICE_MATTER = '10100020'; +update ic_party_activity set SERVICE_MATTER='1022' where SERVICE_MATTER = '10100022'; +update ic_party_activity set SERVICE_MATTER='1014' where SERVICE_MATTER = '10100014'; +update ic_party_activity set SERVICE_MATTER='1007' where SERVICE_MATTER = '10100007'; +update ic_party_activity set SERVICE_MATTER='1001' where SERVICE_MATTER = '10100001'; +update ic_party_activity set SERVICE_MATTER='1004' where SERVICE_MATTER = '10100004'; +update ic_party_activity set SERVICE_MATTER='1016' where SERVICE_MATTER = '10100016'; +update ic_party_activity set SERVICE_MATTER='1013' where SERVICE_MATTER = '10100013'; +update ic_party_activity set SERVICE_MATTER='1012' where SERVICE_MATTER = '10100012'; +update ic_party_activity set SERVICE_MATTER='1019' where SERVICE_MATTER = '10100019'; +-- 3、爱心互助-活动类型为联建活动,对应的服务事项编码改为新的 +update act_info set SERVICE_MATTER='1006' where ACT_TYPE='party' and SERVICE_MATTER='10100006' ; +update act_info set SERVICE_MATTER='1008' where ACT_TYPE='party' and SERVICE_MATTER='10100008' ; +update act_info set SERVICE_MATTER='1002' where ACT_TYPE='party' and SERVICE_MATTER='10100002' ; +update act_info set SERVICE_MATTER='1009' where ACT_TYPE='party' and SERVICE_MATTER='10100009' ; +update act_info set SERVICE_MATTER='1017' where ACT_TYPE='party' and SERVICE_MATTER='10100017' ; +update act_info set SERVICE_MATTER='1021' where ACT_TYPE='party' and SERVICE_MATTER='10100021' ; +update act_info set SERVICE_MATTER='1015' where ACT_TYPE='party' and SERVICE_MATTER='10100015' ; +update act_info set SERVICE_MATTER='1011' where ACT_TYPE='party' and SERVICE_MATTER='10100011' ; +update act_info set SERVICE_MATTER='1018' where ACT_TYPE='party' and SERVICE_MATTER='10100018' ; +update act_info set SERVICE_MATTER='1005' where ACT_TYPE='party' and SERVICE_MATTER='10100005' ; +update act_info set SERVICE_MATTER='1010' where ACT_TYPE='party' and SERVICE_MATTER='10100010' ; +update act_info set SERVICE_MATTER='1003' where ACT_TYPE='party' and SERVICE_MATTER='10100003' ; +update act_info set SERVICE_MATTER='1020' where ACT_TYPE='party' and SERVICE_MATTER='10100020' ; +update act_info set SERVICE_MATTER='1022' where ACT_TYPE='party' and SERVICE_MATTER='10100022' ; +update act_info set SERVICE_MATTER='1014' where ACT_TYPE='party' and SERVICE_MATTER='10100014' ; +update act_info set SERVICE_MATTER='1007' where ACT_TYPE='party' and SERVICE_MATTER='10100007' ; +update act_info set SERVICE_MATTER='1001' where ACT_TYPE='party' and SERVICE_MATTER='10100001' ; +update act_info set SERVICE_MATTER='1004' where ACT_TYPE='party' and SERVICE_MATTER='10100004' ; +update act_info set SERVICE_MATTER='1016' where ACT_TYPE='party' and SERVICE_MATTER='10100016' ; +update act_info set SERVICE_MATTER='1013' where ACT_TYPE='party' and SERVICE_MATTER='10100013' ; +update act_info set SERVICE_MATTER='1012' where ACT_TYPE='party' and SERVICE_MATTER='10100012' ; +update act_info set SERVICE_MATTER='1019' where ACT_TYPE='party' and SERVICE_MATTER='10100019' ; \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryAllListResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryAllListResultDTO.java new file mode 100644 index 0000000000..0251e83f7f --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryAllListResultDTO.java @@ -0,0 +1,43 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/1/17 10:52 上午 + * @DESC + */ +@Data +public class IndividualCategoryAllListResultDTO implements Serializable { + + private static final long serialVersionUID = -3294223041221531203L; + + /** + * 标签 + */ + private String label; + + /** + * 图片 + */ + private String managementIcon; + + /** + * 字段名 + */ + private String columnName; + + /** + * 排序 + */ + private Integer sort; + + private String id; + + /** + * 是否选中 true:是;false:否 + */ + private boolean isSelected = false; +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java index 4089a151df..7a7f7d51cc 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -33,4 +34,8 @@ public class IndividualCategoryListResultDTO implements Serializable { * 排序 */ private Integer sort; + + private String id; + + private Integer count = NumConstant.ZERO; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java index 5a902c2c99..9c90d1bb9b 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java @@ -10,6 +10,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcIndividualCategoryManageDTO; import com.epmet.dto.form.EditIndividualCategoryFormDTO; import com.epmet.dto.form.PackageEditIndividualCategoryFormDTO; +import com.epmet.dto.result.IndividualCategoryAllListResultDTO; import com.epmet.dto.result.IndividualCategoryListResultDTO; import com.epmet.service.IcIndividualCategoryManageService; import org.springframework.beans.factory.annotation.Autowired; @@ -56,4 +57,15 @@ public class IcIndividualCategoryManageController { return new Result(); } + /** + * @Description 查询客户下人员分类,并且赋值本人选中的 + * @param tokenDto + * @author zxc + * @date 2022/1/20 10:44 上午 + */ + @PostMapping("individualcategoryalllist") + public Result> individualCategoryAllList(@LoginUser TokenDto tokenDto){ + return new Result>().ok(icIndividualCategoryManageService.individualCategoryAllList(tokenDto)); + } + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java index 4b15339377..f688fea29d 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcIndividualCategoryManageDTO; import com.epmet.dto.form.EditIndividualCategoryFormDTO; +import com.epmet.dto.result.IndividualCategoryAllListResultDTO; import com.epmet.dto.result.IndividualCategoryListResultDTO; import com.epmet.entity.IcIndividualCategoryManageEntity; @@ -36,4 +37,12 @@ public interface IcIndividualCategoryManageService extends BaseService formDTOS, TokenDto tokenDto); + /** + * @Description 查询客户下人员分类,并且赋值本人选中的 + * @param tokenDto + * @author zxc + * @date 2022/1/20 10:44 上午 + */ + List individualCategoryAllList(TokenDto tokenDto); + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java index c684c8c36e..68529e158c 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java @@ -1,14 +1,27 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.exception.EpmetException; 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.dao.IcIndividualCategoryManageDao; +import com.epmet.dto.IcResiCategoryStatsConfigDTO; import com.epmet.dto.form.EditIndividualCategoryFormDTO; +import com.epmet.dto.form.IcResiCategoryStatsConfigFormDTO; +import com.epmet.dto.form.StatsResiListFormDTO; +import com.epmet.dto.result.IcStatsResiResultDTO; +import com.epmet.dto.result.IcStatsResiWarnBuildingResultDTO; +import com.epmet.dto.result.IndividualCategoryAllListResultDTO; import com.epmet.dto.result.IndividualCategoryListResultDTO; import com.epmet.entity.IcIndividualCategoryManageEntity; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.service.IcIndividualCategoryManageService; import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -24,6 +37,11 @@ import java.util.List; @Service public class IcIndividualCategoryManageServiceImpl extends BaseServiceImpl implements IcIndividualCategoryManageService { + @Autowired + private OperCustomizeOpenFeignClient operCustomizeOpenFeignClient; + @Autowired + private EpmetUserOpenFeignClient userOpenFeignClient; + /** * @Description 【人员分类管理】查询个人分类列表 * @param tokenDto @@ -32,10 +50,30 @@ public class IcIndividualCategoryManageServiceImpl extends BaseServiceImpl individualCategoryList(TokenDto tokenDto) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + if (null == staffInfo){ + throw new EpmetException(String.format("查询工作人员%s信息失败...",tokenDto.getUserId())); + } + StatsResiListFormDTO formDTO = new StatsResiListFormDTO(); + formDTO.setId(staffInfo.getAgencyId()); + formDTO.setLevel("agency"); + formDTO.setCustomerId(tokenDto.getCustomerId()); + Result> list = userOpenFeignClient.getPersonCategoryList(formDTO); + if (!list.success()){ + throw new EpmetException("查询人员分类下人数失败..."); + } + List datas = list.getData(); List result = baseDao.individualCategoryList(tokenDto.getUserId()); - if (CollectionUtils.isNotEmpty(result)){ + if (CollectionUtils.isNotEmpty(datas) && CollectionUtils.isNotEmpty(result)){ + result.forEach( r -> datas.stream().filter( d -> d.getId().equals(r.getId())).forEach(d -> r.setCount(d.getCount()))); + return result; + } + if (CollectionUtils.isEmpty(datas) && CollectionUtils.isNotEmpty(result)){ return result; } + if (CollectionUtils.isEmpty(result)){ + return new ArrayList<>(); + } return new ArrayList<>(); } @@ -59,4 +97,28 @@ public class IcIndividualCategoryManageServiceImpl extends BaseServiceImpl individualCategoryAllList(TokenDto tokenDto) { + IcResiCategoryStatsConfigFormDTO formDTO = new IcResiCategoryStatsConfigFormDTO(); + Result> listResult = operCustomizeOpenFeignClient.resiCategoryStatsListShowd(formDTO); + if (!listResult.success()){ + throw new EpmetException("查询客户下的人员类别失败..."); + } + if (CollectionUtils.isEmpty(listResult.getData())){ + return new ArrayList<>(); + } + List result = ConvertUtils.sourceToTarget(listResult.getData(), IndividualCategoryAllListResultDTO.class); + List configs = baseDao.individualCategoryList(tokenDto.getUserId()); + if (CollectionUtils.isNotEmpty(configs)){ + result.forEach(r -> configs.stream().filter(c -> c.getColumnName().equals(r.getColumnName())).forEach(c -> r.setSelected(true))); + } + return result; + } } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml index 926e0a8baf..68036233b5 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml @@ -14,7 +14,8 @@ cm.SORT, sc.LABEL, sc.MANAGEMENT_ICON, - sc.COLUMN_NAME + sc.COLUMN_NAME, + sc.id AS id FROM ic_individual_category_manage cm INNER JOIN ic_resi_category_stats_config sc ON (sc.ID = cm.COLUMN_ID AND sc.DEL_FLAG = '0' AND `STATUS` = 'show') WHERE cm.DEL_FLAG = 0 diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiListFormDTO.java index 1bb20c647a..131322a8a6 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiListFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiListFormDTO.java @@ -43,4 +43,6 @@ public class StatsResiListFormDTO implements Serializable { @NotBlank(message = "level不能为空") private String level; + private String customerId; + } \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 9c57423628..1b9ac976c6 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -1,6 +1,7 @@ package com.epmet.feign; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.security.dto.TokenDto; @@ -24,8 +25,8 @@ import java.util.Set; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:09 */ -// @FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") -@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) + @FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") +//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) public interface EpmetUserOpenFeignClient { /** @@ -708,4 +709,7 @@ public interface EpmetUserOpenFeignClient { @PostMapping("/epmetuser/userbaseinfo/resirelationinfo") Result resiRelationInfo(@RequestParam("userId")String userId); + @PostMapping("/epmetuser/statsresiwarn/list2") + Result> getPersonCategoryList(@RequestBody StatsResiListFormDTO formDTO); + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 09231a8260..5a68ced017 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -523,4 +523,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "resiRelationInfo", userId); } + + @Override + public Result> getPersonCategoryList(StatsResiListFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getPersonCategoryList", formDTO); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StatsResiWarnController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StatsResiWarnController.java index 8e36190cf0..1be35d69b5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StatsResiWarnController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StatsResiWarnController.java @@ -60,12 +60,23 @@ public class StatsResiWarnController { private StatsResiWarnService statsResiWarnService; @PostMapping("list") - public Result list(@LoginUser TokenDto tokenDto,@RequestBody StatsResiListFormDTO formDTO){ + public Result> list(@LoginUser TokenDto tokenDto,@RequestBody StatsResiListFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO); String customerId = tokenDto.getCustomerId(); List icStatsResiResultDTOList = statsResiWarnService.list(customerId,formDTO.getId(),formDTO.getLevel()); - return new Result().ok(icStatsResiResultDTOList); + return new Result>().ok(icStatsResiResultDTOList); + } + /** + * @Description 内部调了list + * @param formDTO + * @author zxc + * @date 2022/1/20 2:11 下午 + */ + @PostMapping("list2") + public Result> list2(@RequestBody StatsResiListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(statsResiWarnService.list2(formDTO)); } @PostMapping("buildingwarnlist") diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StatsResiWarnService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StatsResiWarnService.java index 37a85105bb..941421fc33 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StatsResiWarnService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StatsResiWarnService.java @@ -17,6 +17,7 @@ package com.epmet.service; +import com.epmet.dto.form.StatsResiListFormDTO; import com.epmet.dto.result.IcStatsResiResultDTO; import com.epmet.dto.result.IcStatsResiWarnBuildingResultDTO; import com.epmet.dto.result.IcStatsResiWarnUserResultDTO; @@ -38,6 +39,8 @@ public interface StatsResiWarnService{ List list(String customerId,String id, String level); + List list2(StatsResiListFormDTO formDTO); + void resiWarn(String customerId); void resiWarnByOne(String customerId,String userId); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java index 3b12bcd10d..122fca634e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java @@ -10,6 +10,7 @@ import com.epmet.dao.IcStatsResiWarnDao; import com.epmet.dto.IcResiCategoryStatsConfigDTO; import com.epmet.dto.IcResiCategoryWarnConfigDTO; import com.epmet.dto.form.IcResiCategoryStatsConfigFormDTO; +import com.epmet.dto.form.StatsResiListFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.IcResiUserEntity; import com.epmet.entity.IcStatsResiWarnEntity; @@ -193,6 +194,11 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService { return result; } + @Override + public List list2(StatsResiListFormDTO formDTO) { + return this.list(formDTO.getCustomerId(), formDTO.getId(), formDTO.getLevel()); + } + /** * 统计 */ diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.24__alter_change_detailed.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.24__alter_change_detailed.sql index 69dda6d4de..bf2a78fe05 100644 --- a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.24__alter_change_detailed.sql +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.24__alter_change_detailed.sql @@ -1,3 +1,3 @@ ALTER TABLE `ic_user_change_detailed` -ADD COLUMN `PIDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT ''组织的所有上级Id'' AFTER `IC_USER_CHANGE_RECORD_ID`; +ADD COLUMN `PIDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织的所有上级Id' AFTER `IC_USER_CHANGE_RECORD_ID`;