| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.btm.BizType; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.dto.OsBtmTypeDTO; |
| | | import com.vci.model.IndexObject; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.pagemodel.OsBtmTypeAttributeVO; |
| | | import com.vci.pagemodel.OsBtmTypeVO; |
| | | import com.vci.pagemodel.OsERVO; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.Tree; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.ControllerUtil; |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.pagemodel.OsBtmTypeAttributeVO; |
| | | import com.vci.pagemodel.OsBtmTypeVO; |
| | | import com.vci.pagemodel.OsERVO; |
| | | import com.vci.web.service.OsAttributeServiceI; |
| | | import com.vci.web.service.OsBtmServiceI; |
| | | import com.vci.web.service.OsLinkTypeServiceI; |
| | | import com.vci.web.service.WebBtmIOServiceI; |
| | | import feign.Param; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.constant.FrameWorkBusLangCodeConstant.DATA_OID_NOT_EXIST; |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/impData") |
| | | @VciUnCheckRight |
| | | public BaseResult impData(MultipartFile file){try { |
| | | return btmService.impData(file); |
| | | }catch (Throwable e) { |
| | |
| | | List<OsBtmTypeAttributeVO> finalBoAttrs = boAttrs; |
| | | attributeService.getDefaultAttributeVOs().stream().forEach(attr->{ |
| | | OsBtmTypeAttributeVO attributeVO = new OsBtmTypeAttributeVO(); |
| | | BeanUtil.convert(attr,attributeVO); |
| | | BeanUtilForVCI.convert(attr,attributeVO); |
| | | attributeVO.setAttributeLength(attr.getAttrLength()); |
| | | attributeVO.setAttributeDataType(attr.getAttributeDataType()); |
| | | attributeVO.setReferBtmTypeId(attr.getBtmTypeId()); |
| | |
| | | */ |
| | | @GetMapping("/createERDiagram") |
| | | public BaseResult createERDiagram(String id){ |
| | | OsERVO osERVO = btmService.createERDiagram(id); |
| | | return BaseResult.success(osERVO); |
| | | try { |
| | | OsERVO osERVO = btmService.createERDiagram(id); |
| | | return BaseResult.success(osERVO); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String msg = "生成业务类型使用的ER图时出现错误,原因:"+VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(msg); |
| | | return BaseResult.fail(msg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("/createERUsed") |
| | | public BaseResult createERUsed(String id){ |
| | | return BaseResult.success(btmService.createERUsed(id)); |
| | | try { |
| | | return BaseResult.success(btmService.createERUsed(id)); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String msg = "取使用这个业务类型的E-R图时出现错误,原因:"+VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(msg); |
| | | return BaseResult.fail(msg); |
| | | } |
| | | } |
| | | |
| | | } |