| | |
| | | */ |
| | | @GetMapping( "/getBizTypes") |
| | | @VciBusinessLog(operateName = "业务类型列表(主要用于对话框使用)") |
| | | @VciUnCheckRight |
| | | public BaseResult getBizTypes(String btmName){ |
| | | try { |
| | | return BaseResult.dataList(Arrays.asList(btmService.getBizTypes(btmName))); |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/impData") |
| | | @VciUnCheckRight |
| | | public BaseResult impData(MultipartFile file){try { |
| | | return btmService.impData(file); |
| | | }catch (Throwable e) { |
| | |
| | | @GetMapping(value = "/getAllAttributesByBtmId") |
| | | @VciBusinessLog(operateName = "查看业务类型的属性") |
| | | public BaseResult<List<OsBtmTypeAttributeVO>> getAllAttributesByBtmId(String btmId){ |
| | | List<OsBtmTypeAttributeVO> osBtmTypeAttributeVOS = btmService.listAttributeByBtmIdHasDefault(btmId); |
| | | List<OsBtmTypeAttributeVO> osBtmTypeAttributeVOS = null; |
| | | try { |
| | | osBtmTypeAttributeVOS = btmService.listAttributeByBtmIdHasDefault(btmId); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | throw new VciBaseException(exceptionMessage); |
| | | } |
| | | return BaseResult.dataList(osBtmTypeAttributeVOS); |
| | | } |
| | | |
| | |
| | | String hasDefaultAttr = baseQueryObject.getConditionMap().getOrDefault("hasDefaultAttr","false"); |
| | | String attrId = baseQueryObject.getConditionMap().containsKey("name")?baseQueryObject.getConditionMap().get("name").replace("*",""):""; |
| | | String attrName = baseQueryObject.getConditionMap().containsKey("label") ? baseQueryObject.getConditionMap().get("label").replace("*","") : ""; |
| | | List<OsBtmTypeAttributeVO> boAttrs = btmService.listAttributeByBtmId(btmTypeId); |
| | | List<OsBtmTypeAttributeVO> boAttrs = null; |
| | | try { |
| | | boAttrs = btmService.listAttributeByBtmId(btmTypeId); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | throw new VciBaseException(exceptionMessage); |
| | | } |
| | | if(boAttrs == null){ |
| | | boAttrs = new ArrayList<>(); |
| | | } |
| | |
| | | String attrId = baseQueryObject.getConditionMap().containsKey("name")?baseQueryObject.getConditionMap().get("name").replace("*",""):""; |
| | | String attrName = baseQueryObject.getConditionMap().containsKey("label") ? baseQueryObject.getConditionMap().get("label").replace("*","") : ""; |
| | | OsBtmTypeVO btmTypeVO = btmService.selectByOid(btmTypeOid); |
| | | List<OsBtmTypeAttributeVO> boAttrs = btmService.listAttributeByBtmId(btmTypeVO.getId()); |
| | | List<OsBtmTypeAttributeVO> boAttrs = null; |
| | | try { |
| | | boAttrs = btmService.listAttributeByBtmId(btmTypeVO.getId()); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | throw new VciBaseException(exceptionMessage); |
| | | } |
| | | List<OsBtmTypeAttributeVO> attrList = boAttrs.stream().filter(s->{ |
| | | boolean usedFlag = true; |
| | | if(StringUtils.isNotBlank(attrId) && !s.getId().contains(attrId)){ |
| | |
| | | */ |
| | | @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); |
| | | } |
| | | } |
| | | |
| | | } |