| | |
| | | import com.vci.starter.web.constant.FrameWorkLcStatusConstant; |
| | | import com.vci.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | |
| | | import com.vci.starter.word.util.WordUtil; |
| | | import com.vci.web.properties.OsDDLExportWordFieldProperties; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | lifeCyle = lifeCycleService.lifeCycleVO2DO(allLifeCycleLowMap.get(lifeCycleId)); |
| | | edit = true; |
| | | } |
| | | lifeCyle.tag = lifeCycleDTO.getName(); |
| | | lifeCyle.label = lifeCycleDTO.getName(); |
| | | lifeCyle.description = lifeCycleDTO.getDescription() == null?"":lifeCycleDTO.getDescription(); |
| | | lifeCyle.startState = lifeCycleDTO.getStartStatus() == null?"":lifeCycleDTO.getStartStatus(); |
| | | lifeCyle.modifier = userId; |
| | |
| | | |
| | | attributes.stream().forEach( t -> { |
| | | int index = indexMap.get("index"); |
| | | Map<String,Object> columnData = attributeToWordMap(t,index); |
| | | Map<String,Object> columnData = null; |
| | | try { |
| | | columnData = attributeToWordMap(t,index); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "将属性对象拷贝到word数据对象中时出现错误,原因:"+VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | } |
| | | indexMap.put("index",index+1); |
| | | columnDataList.add(columnData); |
| | | }); |
| | |
| | | List<OsBtmTypeAttributeVO> attributes = new ArrayList<>(); |
| | | linkAttributes.stream().forEach(t -> { |
| | | OsBtmTypeAttributeVO attributeVO = new OsBtmTypeAttributeVO(); |
| | | BeanUtil.convert(t,attributeVO); |
| | | BeanUtilForVCI.convert(t,attributeVO); |
| | | attributeVO.setPkBtmType(t.getPkLinkType()); |
| | | attributes.add(attributeVO); |
| | | }); |
| | |
| | | indexMap.put("index",1); |
| | | attributes.stream().forEach( t -> { |
| | | int index = indexMap.get("index"); |
| | | Map<String,Object> columnData = attributeToWordMap(t,index); |
| | | Map<String,Object> columnData = null; |
| | | try { |
| | | columnData = attributeToWordMap(t,index); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "将属性对象拷贝到word数据对象中时出现错误,原因:"+VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | } |
| | | indexMap.put("index",index+1); |
| | | columnDataList.add(columnData); |
| | | }); |
| | |
| | | if(!CollectionUtils.isEmpty(linkTypeVOList)){ |
| | | linkTypeVOList.stream().forEach(linkTypeVO->{ |
| | | String linkTypeId = linkTypeVO.getId(); |
| | | List<OsLinkTypeAttributeVO> attributeVOS = linkTypeService.listAttributeByLinkId(linkTypeId); |
| | | List<OsLinkTypeAttributeVO> attributeVOS = null; |
| | | try { |
| | | attributeVOS = linkTypeService.listAttributeByLinkId(linkTypeId); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String errorLog = "查询链接类型时出现错误,原因:"+VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorLog); |
| | | throw new VciBaseException(errorLog); |
| | | } |
| | | //先是名称 |
| | | int rowIndex = index[0]; |
| | | WriteExcelData idED = new WriteExcelData(rowIndex, 0, linkTypeId); |
| | |
| | | * @param index 索引 |
| | | * @return 数据映射,key 是word里的域字段,value是对应的值 |
| | | */ |
| | | private Map<String,Object> attributeToWordMap(OsBtmTypeAttributeVO btmTypeAttributeVO,int index){ |
| | | private Map<String,Object> attributeToWordMap(OsBtmTypeAttributeVO btmTypeAttributeVO,int index) throws PLException { |
| | | Map<String,Object> columnData = new HashMap<>(); |
| | | if(StringUtils.isNotBlank(wordFieldProperties.getColumnIndex())) { |
| | | columnData.put(wordFieldProperties.getColumnIndex(), index); |
| | |
| | | return ""; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加属性到oracle |
| | | * @param addedAbList 添加的属性 |
| | |
| | | // DDLToolClient.getService().batchExecuteUpdateOracle(new String[]{removeSql}); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 封装业务类型 |
| | |
| | | linkType.modifyTime = now; |
| | | linkType.id = ""; |
| | | linkType.name = linkId; |
| | | linkType.tag = linkTypeDTO.getName(); |
| | | linkType.label = linkTypeDTO.getName(); |
| | | linkType.description = linkTypeDTO.getDescription() == null ?"":linkTypeDTO.getDescription(); |
| | | linkType.implClass = ""; |
| | | linkType.shape = ""; |