From bf6b3c9274ab284b933399e57e4acbeef6c7f2cf Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 3 Feb 2023 14:53:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E4=BA=8B=E9=A1=B9=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/demand/ServiceItemResultDTO.java | 4 ++++ .../IcServiceItemDictController.java | 12 ++++++++++ .../service/IcServiceItemDictService.java | 2 ++ .../impl/IcServiceItemDictServiceImpl.java | 22 +++++++++++++++++++ 4 files changed, 40 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceItemResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceItemResultDTO.java index 3408b5f724..7a745fa207 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceItemResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceItemResultDTO.java @@ -13,6 +13,10 @@ import java.io.Serializable; public class ServiceItemResultDTO implements Serializable { private static final long serialVersionUID = -590440160577071133L; private String categoryId; + /** + * 分类编码 + */ + private String categoryCode; private String categoryName; private Integer awardPoint; private Boolean usableFlag; 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 7608069b76..b2b12c40e8 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 @@ -87,6 +87,18 @@ public class IcServiceItemDictController { return new Result>().ok(icServiceItemDictService.queryDictListForSelect(formDTO)); } + /** + * 烟台的公共服务组织:服务事项列表 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("dict-options") + public Result> queryDictOption(@LoginUser TokenDto tokenDto, @RequestBody ServiceItemSelectFormDTO formDTO) { + return new Result>().ok(icServiceItemDictService.queryDictOption(formDTO.getType(), tokenDto.getCustomerId())); + } + /** * 客户初始化数据 * @Param customerId 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 6ed62cbdf2..92a6dc4ef6 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 @@ -81,4 +81,6 @@ public interface IcServiceItemDictService extends BaseService queryDictOption(String type, 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/IcServiceItemDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java index a34bb83907..1e7b7f0271 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 @@ -205,4 +205,26 @@ public class IcServiceItemDictServiceImpl extends BaseServiceImpl queryDictOption(String type, String customerId) { + List resultList = new ArrayList<>(); + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(IcServiceItemDictEntity::getCustomerId, customerId) + .eq(StringUtils.isNotBlank(type) && "usable".equals(type), IcServiceItemDictEntity::getUsableFlag, true) + .orderByAsc(IcServiceItemDictEntity::getSort); + List list = baseDao.selectList(query); + for (IcServiceItemDictEntity entity : list) { + ServiceItemResultDTO dto = new ServiceItemResultDTO(); + dto.setCategoryName(entity.getCategoryName()); + dto.setCategoryId(entity.getId()); + dto.setCategoryCode(entity.getCategoryCode()); + dto.setUsableFlag(entity.getUsableFlag()); + dto.setAwardPoint(entity.getAwardPoint()); + resultList.add(dto); + } + return resultList; + } + + } \ No newline at end of file