| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.client.common.providers.ServiceProvider; |
| | | import com.vci.corba.common.VCIError; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.btm.BizType; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import com.vci.corba.omd.btm.BtmItem; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | public List<OsBtmTypeVO> selectAllBtm() { |
| | | try { |
| | | // return btmDO2VOs(Arrays.stream(platformClientUtil.getBtmService().getAllBtmItem("")).collect(Collectors.toList())); |
| | | return btmDO2VOs(Arrays.stream(ServiceProvider.getOMDService().getBTMService().getAllBtmItem("")).collect(Collectors.toList())); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | // return btmDO2VOs(Arrays.stream(ServiceProvider.getOMDService().getBTMService().getAllBtmItem("")).collect(Collectors.toList())); |
| | | return btmDO2VOs(Arrays.stream(ServiceProvider.getOMDService().getBTMService().getBizTypes("")).collect(Collectors.toList())); |
| | | } catch (PLException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | * @return 显示对象 |
| | | */ |
| | | @Override |
| | | public List<OsBtmTypeVO> btmDO2VOs(Collection<BtmItem> btmItems) { |
| | | public List<OsBtmTypeVO> btmDO2VOs(Collection<BizType> btmItems) { |
| | | List<OsBtmTypeVO> VOS = new ArrayList<>(); |
| | | Optional.ofNullable(btmItems).orElseGet(()->new ArrayList<>()).stream().forEach(btmItem -> { |
| | | OsBtmTypeVO vo = btmDO2VO(btmItem); |
| | |
| | | * @return 显示对象 |
| | | */ |
| | | @Override |
| | | public OsBtmTypeVO btmDO2VO(BtmItem btmItem) { |
| | | public OsBtmTypeVO btmDO2VO(BizType btmItem) { |
| | | OsBtmTypeVO vo = new OsBtmTypeVO(); |
| | | if(btmItem !=null){ |
| | | vo.setOid(btmItem.oid); |