From 599109db1c9c8ea3b53857b900d3860f84d65148 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 8 Nov 2022 18:17:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E5=BB=BA=E6=B4=BB=E5=8A=A8=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dao/IcPartyUnitDao.java | 2 ++ .../com/epmet/dao/IcServiceItemDictDao.java | 3 +++ .../com/epmet/service/IcPartyUnitService.java | 20 ++++++++++++------- .../service/IcServiceItemDictService.java | 2 ++ .../impl/IcPartyActivityServiceImpl.java | 17 ++++++++++++++++ .../service/impl/IcPartyUnitServiceImpl.java | 14 +++++++++++++ .../impl/IcServiceItemDictServiceImpl.java | 5 ++++- .../resources/mapper/IcPartyActivityDao.xml | 3 ++- .../main/resources/mapper/IcPartyUnitDao.xml | 13 ++++++++++++ .../resources/mapper/IcServiceItemDictDao.xml | 10 ++++++++++ 10 files changed, 80 insertions(+), 9 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java index e0cb649327..30fcd451c8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java @@ -124,4 +124,6 @@ public interface IcPartyUnitDao extends BaseDao { * @return */ List pageList(PartyUnitFormDTO formDTO); + + List getUnitNames(@Param("unitIds") List unitIds); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java index 1e1fd873c9..c01c80b4d4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.result.demand.ServiceItemResultDTO; import com.epmet.entity.IcServiceItemDictEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -36,4 +37,6 @@ public interface IcServiceItemDictDao extends BaseDao { List pageList(String customerId); IcServiceItemDictEntity selectMax(String customerId); + + String selectName(@Param("customerId") String customerId, @Param("categoryCode") String categoryCode); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index 8cc2d342a7..3ea2e48394 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -6,13 +6,12 @@ import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcPartyUnitDTO; -import com.epmet.dto.form.PartyActivityFormDTO; -import com.epmet.dto.form.PartyTypepercentFormDTO; -import com.epmet.dto.form.PartyUnitFormDTO; -import com.epmet.dto.form.PartyUnitListFormDTO; -import com.epmet.dto.form.PartyUnitListbriefFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; -import com.epmet.dto.result.*; +import com.epmet.dto.result.CheckStaffInfoResultDTO; +import com.epmet.dto.result.PartyTypepercentResultDTO; +import com.epmet.dto.result.PartyUnitDistributionResultDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyUnitEntity; import org.springframework.web.multipart.MultipartFile; @@ -20,7 +19,6 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; -import java.util.Map; /** * 联建单位 @@ -181,4 +179,12 @@ public interface IcPartyUnitService extends BaseService { List getTypepercent(PartyTypepercentFormDTO form); void editPartyOrCommunity(CheckStaffInfoResultDTO formDTO); + + /** + * 查询联建单位名称, + * 不限制del_flag='0' + * @param unitIds + * @return + */ + List getUnitNames(List unitIds); } 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 af01c8a4c3..6ed62cbdf2 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 @@ -79,4 +79,6 @@ public interface IcServiceItemDictService extends BaseService unitIds = Arrays.asList(dto.getUnitId().split(StrConstant.COMMA)); List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); + if(CollectionUtils.isEmpty(unitNames)){ + unitNames=icPartyUnitService.getUnitNames(unitIds); + } dto.setUnitName(StringUtils.join(unitNames, StrConstant.COMMA)); if (StringUtils.isNotEmpty(dto.getGridId())) { GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); @@ -132,6 +135,20 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl serviceMatterid = Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA)); + List serviceMatterNameList=new ArrayList<>(); + for(String id:serviceMatterid){ + String categoryName=icServiceItemDictService.getCategoryName(dto.getCustomerId(),id); + if(StringUtils.isNotBlank(categoryName)){ + serviceMatterNameList.add(categoryName); + } + } + dto.setServiceMatterList(serviceMatterid); + dto.setServiceMatterNameList(serviceMatterNameList); + dto.setServiceMatterName(StringUtils.join(serviceMatterNameList, StrConstant.COMMA)); + } }); } 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 17ed0d4dde..0f31a1287d 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 @@ -778,4 +778,18 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl getUnitNames(List unitIds) { + if(CollectionUtils.isEmpty(unitIds)){ + return new ArrayList<>(); + } + return baseDao.getUnitNames(unitIds); + } } 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 3fbda7cd37..a34bb83907 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 @@ -201,5 +201,8 @@ public class IcServiceItemDictServiceImpl extends BaseServiceImpl order by u.CREATED_TIME desc + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml index 787ccb9d66..4582741dbb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml @@ -31,4 +31,14 @@ order by CATEGORY_CODE desc limit 1 + + \ No newline at end of file