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