| | |
| | | import com.vci.corba.omd.lcm.LifeCycle; |
| | | import com.vci.corba.omd.lcm.TransitionVO; |
| | | import com.vci.corba.omd.lcm.TransitionVOEvent; |
| | | import com.vci.corba.omd.vrm.VersionRule; |
| | | import com.vci.dto.OsLifeCycleDTO; |
| | | import com.vci.dto.OsLifeCycleLineDTO; |
| | | import com.vci.dto.OsLifeCycleLineEventDTO; |
| | | import com.vci.dto.OsRevisionRuleDTO; |
| | | import com.vci.model.OsLifeCycleDO; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.po.OsLifeCyclePO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | | import com.vci.starter.poi.constant.ExcelLangCodeConstant; |
| | | import com.vci.starter.poi.util.ExcelUtil; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.model.OsLifeCycleDO; |
| | | import com.vci.starter.web.util.WebThreadLocalUtil; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.web.service.OsStatusServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.hssf.util.HSSFColor; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.swing.*; |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | */ |
| | | @Autowired |
| | | private WebBoServiceI boService; |
| | | |
| | | /** |
| | | * 必填列 |
| | | */ |
| | | private List<Integer> ColumnNameisRed = new ArrayList<Integer>(); |
| | | |
| | | /** |
| | | * 日志 |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | life.setOid(lifeCycle.oid); |
| | | Bound[] bounds = lifeCycle.bounds; |
| | | if(bounds != null && bounds.length>0){ |
| | | List<OsLifeCycleLineBoundVO> boundVOList = new ArrayList<>(); |
| | | Arrays.stream(bounds).forEach(bound->{ |
| | | OsLifeCycleLineBoundVO boundVO = new OsLifeCycleLineBoundVO(); |
| | | boundVO.setId(bound.id); |
| | | boundVO.setName(bound.name); |
| | | boundVO.setCellx(bound.cellx); |
| | | boundVO.setCelly(bound.celly); |
| | | boundVO.setCellh(bound.cellh); |
| | | boundVO.setCellw(bound.cellw); |
| | | boundVO.setCellicon(bound.cellicon); |
| | | boundVOList.add(boundVO); |
| | | }); |
| | | life.setBounds(boundVOList.toArray(new OsLifeCycleLineBoundVO[boundVOList.size()])); |
| | | }else{ |
| | | life.setBounds(new OsLifeCycleLineBoundVO[0]); |
| | | } |
| | | List<OsLifeCycleLineVO> lineVOS = new ArrayList<>(); |
| | | if(lifeCycle.routes!=null&& lifeCycle.routes.length>0){ |
| | | if(lifeCycle.routes!=null && lifeCycle.routes.length>0){ |
| | | Arrays.stream(lifeCycle.routes).forEach(route->{ |
| | | OsLifeCycleLineVO lineVO = new OsLifeCycleLineVO(); |
| | | lineVO.setSourceLifeStatus(route.source); |
| | |
| | | * @return 数据对象 |
| | | */ |
| | | @Override |
| | | public LifeCycle lifeCycleVO2DO(OsLifeCycleVO lifeCycleVO){ |
| | | public LifeCycle lifeCycleVO2DO(OsLifeCycleVO lifeCycleVO) throws PLException { |
| | | LifeCycle lifeCyle = new LifeCycle(); |
| | | lifeCyle.name = lifeCycleVO.getId(); |
| | | lifeCyle.tag = lifeCycleVO.getName(); |
| | |
| | | lifeCyle.description = lifeCycleVO.getDescription(); |
| | | lifeCyle.modifier = Func.isBlank(lifeCycleVO.getLastModifier()) ? userId:lifeCycleVO.getLastModifier(); |
| | | lifeCyle.modifyTime = System.currentTimeMillis(); |
| | | lifeCyle.createTime = lifeCycleVO.getCreateTime() != null ? lifeCycleVO.getCreateTime().getTime():null; |
| | | lifeCyle.createTime = lifeCycleVO.getCreateTime() != null ? lifeCycleVO.getCreateTime().getTime():System.currentTimeMillis(); |
| | | lifeCyle.startState =lifeCycleVO.getStartStatus(); |
| | | lifeCyle.ts = VciDateUtil.date2Str(lifeCycleVO.getTs(),VciDateUtil.DateTimeMillFormat); |
| | | if(lifeCycleVO.getBounds() !=null && lifeCycleVO.getBounds().length>0) { |
| | |
| | | }else{ |
| | | lifeCyle.bounds = new Bound[0]; |
| | | } |
| | | //加链接线 |
| | | //加连接线 |
| | | List<TransitionVO> lines = new ArrayList<>(); |
| | | for (int i = 0; i < lifeCycleVO.getLines().size(); i++) { |
| | | OsLifeCycleLineVO lineVO = lifeCycleVO.getLines().get(i); |
| | |
| | | * @param lineVO 连接线对象 |
| | | * @return 平台的连接线对象 |
| | | */ |
| | | private TransitionVO lifeCycleLineVO2DO(OsLifeCycleLineVO lineVO){ |
| | | private TransitionVO lifeCycleLineVO2DO(OsLifeCycleLineVO lineVO) throws PLException { |
| | | com.vci.corba.omd.lcm.TransitionVO transitionVO = new com.vci.corba.omd.lcm.TransitionVO(); |
| | | transitionVO.id = lineVO.getOid(); |
| | | transitionVO.source = lineVO.getSourceLifeStatus(); |
| | |
| | | OsLifeCycleLineEventVO eventVO = lineVO.getEvents()[j]; |
| | | TransitionVOEvent event = new TransitionVOEvent(); |
| | | event.id = eventVO.getOid(); |
| | | event.name = eventVO.getEventFullName(); |
| | | event.name = Func.isBlank(eventVO.getEventFullName()) ? |
| | | platformClientUtil.getLifeCycleService().getLCEventValueByKey(eventVO.getOid()):eventVO.getEventFullName(); |
| | | events[j] = event; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 使用生命周期的编号回去包含的状态显示对象 |
| | | * 使用生命周期的编号获取包含的状态显示对象 |
| | | * |
| | | * @param lifeCycleId 生命周期的编号 |
| | | * @return 状态的显示对象 |
| | |
| | | statusVOList.add(statusVOMap.getOrDefault(statusId,new OsStatusVO())); |
| | | }); |
| | | return statusVOList; |
| | | } |
| | | |
| | | /** |
| | | * 使用多个编号获取生命周期的对象 |
| | | * @param lcIdList 编号 |
| | | * @return 显示对象 |
| | | */ |
| | | @Override |
| | | public List<OsLifeCycleVO> getLifeCycleByIds(Collection<String> lcIdList) { |
| | | if(Func.isEmpty(lcIdList)){ |
| | | return null; |
| | | } |
| | | Map<String, OsLifeCycleVO> lifeCycleVOMap = self.selectAllLifeCycleMap(); |
| | | List<OsLifeCycleVO> lifeCycleVOList = new ArrayList<>(); |
| | | lcIdList.stream().forEach(vrId->{ |
| | | OsLifeCycleVO lifeCycleVO = lifeCycleVOMap.getOrDefault(vrId,null); |
| | | if(lifeCycleVO != null){ |
| | | lifeCycleVOList.add(lifeCycleVO); |
| | | } |
| | | }); |
| | | return lifeCycleVOList; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public String exportLifeCycles(String exportFileName, String lcNames, boolean flag) throws PLException { |
| | | if(Func.isBlank(lcNames)){ |
| | | throw new PLException("500",new String[]{"请勾选要导出的生命周期模板!"}); |
| | | } |
| | | //界面没传名称,使用默认导出名称 |
| | | exportFileName = Func.isBlank(exportFileName) ? "生命周期导出_" + Func.format(new Date(),"yyyy-MM-dd HHmmss.sss"):exportFileName; |
| | | //设置列名 |
| | | List<String> columns = this.getCloumns(flag); |
| | | |
| | | //写excel |
| | | String excelPath = LocalFileUtil.getDefaultTempFolder() + File.separator + exportFileName + ".xls"; |
| | | try { |
| | | new File(excelPath).createNewFile(); |
| | | } catch (Throwable e) { |
| | | throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[]{excelPath}, e); |
| | | } |
| | | //设置列 |
| | | List<WriteExcelData> excelDataList = new ArrayList<>(); |
| | | //设置列头 |
| | | for (int index = 0; index < columns.size(); index++) { |
| | | excelDataList.add(new WriteExcelData(0,index, columns.get(index))); |
| | | } |
| | | //按照版本规则名查询,然后处理版本规则导出 |
| | | List<String> lcIdList = Func.toStrList(lcNames); |
| | | List<OsLifeCycleVO> lifeCycleVOList = this.getLifeCycleByIds(lcIdList); |
| | | if(Func.isEmpty(lifeCycleVOList)){ |
| | | excelDataList.add(new WriteExcelData(1,1, "根据名称未查询到生命周期信息,请刷新后尝试重新导出!")); |
| | | }else{ |
| | | int row = 1; |
| | | for (int i = 0; i < lifeCycleVOList.size(); i++) { |
| | | OsLifeCycleVO lifeCycleVO = lifeCycleVOList.get(i); |
| | | List<OsLifeCycleLineVO> lines = lifeCycleVO.getLines(); |
| | | if(Func.isNotEmpty(lines)){ |
| | | for (int j = 0; j < lines.size(); j++) { |
| | | int start = row + j; |
| | | excelDataList.add(new WriteExcelData(start,0, lifeCycleVO.getId())); |
| | | excelDataList.add(new WriteExcelData(start,1, lifeCycleVO.getName())); |
| | | excelDataList.add(new WriteExcelData(start,2, lifeCycleVO.getStartStatus())); |
| | | excelDataList.add(new WriteExcelData(start,3, lifeCycleVO.getDescription())); |
| | | OsLifeCycleLineVO osLifeCycleLineVO = lines.get(j); |
| | | //按照导出模板列填数据 |
| | | if(!flag){ |
| | | excelDataList.add(new WriteExcelData(start,4, osLifeCycleLineVO.getName())); |
| | | excelDataList.add(new WriteExcelData(start,5, osLifeCycleLineVO.getSourceLifeStatus())); |
| | | excelDataList.add(new WriteExcelData(start,6, osLifeCycleLineVO.getSourceLifeStatusName())); |
| | | excelDataList.add(new WriteExcelData(start,7, osLifeCycleLineVO.getTargetLifeStatus())); |
| | | excelDataList.add(new WriteExcelData(start,8, osLifeCycleLineVO.getTargetLifeStatusName())); |
| | | //处理连接线包含的事件 |
| | | OsLifeCycleLineEventVO[] events = osLifeCycleLineVO.getEvents(); |
| | | if(events != null && events.length > 0){ |
| | | String collect = Arrays.stream(events).map(OsLifeCycleLineEventVO::getOid).collect(Collectors.joining(";")); |
| | | excelDataList.add(new WriteExcelData(start,9, collect)); |
| | | } |
| | | excelDataList.add(new WriteExcelData(start,10, Func.format(lifeCycleVO.getCreateTime(),"yyyy年MM月dd日 hh:mm:ss"))); |
| | | }else{ |
| | | excelDataList.add(new WriteExcelData(start,4, osLifeCycleLineVO.getSourceLifeStatus())); |
| | | excelDataList.add(new WriteExcelData(start,5, osLifeCycleLineVO.getTargetLifeStatus())); |
| | | } |
| | | } |
| | | row = row+lines.size(); |
| | | }else{ |
| | | excelDataList.add(new WriteExcelData(row,0, lifeCycleVO.getId())); |
| | | excelDataList.add(new WriteExcelData(row,1, lifeCycleVO.getName())); |
| | | excelDataList.add(new WriteExcelData(row,2, lifeCycleVO.getStartStatus())); |
| | | excelDataList.add(new WriteExcelData(row,3, lifeCycleVO.getDescription())); |
| | | if(!flag){ |
| | | excelDataList.add(new WriteExcelData(row,10, Func.format(lifeCycleVO.getCreateTime(),"yyyy年MM月dd日 hh:mm:ss"))); |
| | | } |
| | | row++; |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | } |
| | | WriteExcelOption excelOption = new WriteExcelOption(excelDataList); |
| | | ExcelUtil.writeDataToFile(excelPath, excelOption); |
| | | return excelPath; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public String downloadLifeCycleTemplate(String exportFileName) throws Exception { |
| | | return null; |
| | | //界面没传名称,使用默认导出名称 |
| | | exportFileName = Func.isBlank(exportFileName) ? "生命周期导入模板_" + Func.format(new Date(),"yyyy-MM-dd HHmmss.sss"):exportFileName; |
| | | //设置列名 |
| | | List<String> columns = this.getCloumns(true); |
| | | //设置必填列 |
| | | ColumnNameisRed.clear(); |
| | | ColumnNameisRed.add(0); |
| | | ColumnNameisRed.add(2); |
| | | |
| | | //写excel |
| | | String excelPath = LocalFileUtil.getDefaultTempFolder() + File.separator + exportFileName + ".xls"; |
| | | try { |
| | | new File(excelPath).createNewFile(); |
| | | } catch (Throwable e) { |
| | | throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[]{excelPath}, e); |
| | | } |
| | | //设置列 |
| | | List<WriteExcelData> excelDataList = new ArrayList<>(); |
| | | //设置列头 |
| | | for (int index = 0; index < columns.size(); index++) { |
| | | //判断是否为必填列,给必填列设置颜色 |
| | | if(ColumnNameisRed.contains(index)){ |
| | | WriteExcelData excelData = new WriteExcelData(0, index, columns.get(index)); |
| | | excelData.setFontColor(String.valueOf(HSSFColor.HSSFColorPredefined.RED.getIndex())); |
| | | excelDataList.add(excelData); |
| | | }else{ |
| | | excelDataList.add(new WriteExcelData(0,index, columns.get(index))); |
| | | } |
| | | } |
| | | WriteExcelOption excelOption = new WriteExcelOption(excelDataList); |
| | | ExcelUtil.writeDataToFile(excelPath, excelOption); |
| | | return excelPath; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public BaseResult importLifeCycles(File file) throws Exception { |
| | | VciBaseUtil.alertNotNull(file,"excel文件"); |
| | | if(!file.exists()){ |
| | | throw new VciBaseException("导入的excel文件不存在,{0}",new String[]{file.getPath()}); |
| | | } |
| | | try{ |
| | | //1、读取excel中的数据,组成对象 |
| | | ReadExcelOption excelOption = new ReadExcelOption(); |
| | | List<OsLifeCyclePO> poList = ExcelUtil.readDataObjectFromExcel(file, OsLifeCyclePO.class,excelOption,(value, po, fieldName)->{}); |
| | | //去除都是空的情况 |
| | | if(CollectionUtils.isEmpty(poList)){ |
| | | return BaseResult.fail(ExcelLangCodeConstant.IMPORT_CONTENT_NULL,new String[]{}); |
| | | } |
| | | //将枚举和枚举项处理成一对多关系的对象 |
| | | Map<String, OsLifeCyclePO> groupPOMap = new HashMap<>(); |
| | | //默认的生命周期图标的坐标和宽度等信息 |
| | | List<OsLifeCycleLineBoundVO> defaultBoundList = new ArrayList<>(); |
| | | for (OsLifeCyclePO po : poList) { |
| | | //拼接用来作为分组的key |
| | | String key = po.getId() + "_" + po.getName() + "_" + po.getStartStatus(); |
| | | OsLifeCyclePO group = groupPOMap.get(key); |
| | | if (group == null) { |
| | | group = new OsLifeCyclePO(); |
| | | //拿出现的首行做后续的提示行 |
| | | group.setRowIndex(po.getRowIndex()); |
| | | group.setId(po.getId()); |
| | | group.setName(po.getName()); |
| | | group.setStartStatus(po.getStartStatus()); |
| | | group.setDescription(po.getDescription()); |
| | | groupPOMap.put(key, group); |
| | | //第一行起始状态需要单独处理 |
| | | if(po.getRowIndex().equals("1")){ |
| | | OsLifeCycleLineBoundVO boundVO = new OsLifeCycleLineBoundVO(); |
| | | boundVO.setName(po.getStartStatus()); |
| | | boundVO.setCellh("30.0"); |
| | | boundVO.setCellw("80.0"); |
| | | boundVO.setCellx(String.valueOf(200+(Integer.parseInt(po.getRowIndex())*60))); |
| | | boundVO.setCelly(String.valueOf(300+(Integer.parseInt(po.getRowIndex())*60))); |
| | | boundVO.setCellicon(""); |
| | | defaultBoundList.add(boundVO); |
| | | } |
| | | //处理生命周期图标的默认的坐标信息 |
| | | OsLifeCycleLineBoundVO boundVO = new OsLifeCycleLineBoundVO(); |
| | | boundVO.setName(po.getTargetLifeStatus()); |
| | | boundVO.setCellh("30.0"); |
| | | boundVO.setCellw("80.0"); |
| | | boundVO.setCellx(String.valueOf(250+(Integer.parseInt(po.getRowIndex())*60))); |
| | | boundVO.setCelly(String.valueOf(350+(Integer.parseInt(po.getRowIndex())*60))); |
| | | boundVO.setCellicon(""); |
| | | defaultBoundList.add(boundVO); |
| | | } |
| | | |
| | | OsLifeCycleLineVO lineItemVO = new OsLifeCycleLineVO(); |
| | | lineItemVO.setName("line"+po.getRowIndex()); |
| | | lineItemVO.setSourceLifeStatus(po.getSourceLifeStatus()); |
| | | lineItemVO.setTargetLifeStatus(po.getTargetLifeStatus()); |
| | | |
| | | return null; |
| | | //处理连接线包含的事件 |
| | | String[] eventArr = po.getEvents().split(";"); |
| | | if(eventArr != null & eventArr.length > 0){ |
| | | List<OsLifeCycleLineEventVO> eventVOList = new ArrayList<>(); |
| | | for (int i = 0; i < eventArr.length; i++) { |
| | | OsLifeCycleLineEventVO osLCLineEventVO = new OsLifeCycleLineEventVO(); |
| | | osLCLineEventVO.setOid(eventArr[i]); |
| | | String lcEventValueByKey = platformClientUtil.getLifeCycleService().getLCEventValueByKey(eventArr[i]); |
| | | osLCLineEventVO.setEventFullName(lcEventValueByKey); |
| | | eventVOList.add(osLCLineEventVO); |
| | | } |
| | | lineItemVO.setEvents(eventVOList.toArray(new OsLifeCycleLineEventVO[eventVOList.size()])); |
| | | } |
| | | group.getLineItems().add(lineItemVO); |
| | | } |
| | | Collection<OsLifeCyclePO> newPOList = groupPOMap.values(); |
| | | //数据库查询是否有已存在的生命周期名,方便后续做判重处理 |
| | | List<OsLifeCycleVO> lifeCycleVOList = this.getLifeCycleByIds(poList.stream().map(OsLifeCyclePO::getId).collect(Collectors.toSet())); |
| | | List<String> repeatLCId = new ArrayList<>(); |
| | | if(Func.isNotEmpty(lifeCycleVOList)){ |
| | | repeatLCId = lifeCycleVOList.stream().map(OsLifeCycleVO::getId).collect(Collectors.toList()); |
| | | } |
| | | //当前excel中是否重复用的判重Map:(key:判重属性,value:行号) |
| | | Map<String, String> excelReapeat = new HashMap<>(); |
| | | //判断必填属性是否为空等等 |
| | | List<String> finalRepeatLCId = repeatLCId; |
| | | newPOList.stream().forEach(lcPO -> { |
| | | if(Func.isBlank(lcPO.getId())){ |
| | | throw new VciBaseException("第【"+lcPO.getRowIndex()+"】行,lcnameerror"); |
| | | }else if(Func.isEmpty(lcPO.getStartStatus())){ |
| | | throw new VciBaseException("第【"+lcPO.getRowIndex()+"】行,startstatuserror"); |
| | | }else if(!lcPO.getId().matches("^[A-Za-z]+$")){ |
| | | throw new VciBaseException("第【"+lcPO.getRowIndex()+"】行数据,名称只能为英文字母"); |
| | | }else if(excelReapeat.containsKey(lcPO.getId())){//名称表格中判重 |
| | | throw new VciBaseException("第【"+excelReapeat.get(lcPO.getId())+"】行和第【"+lcPO.getRowIndex()+"】行数据,名称重复"); |
| | | }else if (Func.isNotEmpty(finalRepeatLCId) && finalRepeatLCId.contains(lcPO.getId())){//2、判断名称是否与系统中重复 |
| | | throw new VciBaseException("第【"+lcPO.getRowIndex()+"】行,名称在系统中已经存在,请修改!"); |
| | | } |
| | | //先对枚举名excel中需要判重处理 |
| | | excelReapeat.put(lcPO.getId(),lcPO.getRowIndex()); |
| | | }); |
| | | //保存逻辑 |
| | | for (OsLifeCyclePO osLifeCyclePO : newPOList) { |
| | | OsLifeCycleVO osLifeCycleVO = new OsLifeCycleVO(); |
| | | //生成存储的DTO对象 |
| | | osLifeCycleVO.setId(osLifeCyclePO.getId()); |
| | | osLifeCycleVO.setName(osLifeCyclePO.getName()); |
| | | osLifeCycleVO.setDescription(osLifeCyclePO.getDescription()); |
| | | osLifeCycleVO.setStartStatus(osLifeCyclePO.getStartStatus()); |
| | | osLifeCycleVO.setLines(osLifeCyclePO.getLineItems()); |
| | | osLifeCycleVO.setBounds(defaultBoundList.toArray(new OsLifeCycleLineBoundVO[defaultBoundList.size()])); |
| | | //调用新增枚举方法 |
| | | boolean addBoolean = platformClientUtil.getLifeCycleService().addLifeCycle(lifeCycleVO2DO(osLifeCycleVO)); |
| | | if(!addBoolean){ |
| | | throw new PLException("500",new String[]{"保存生命周期名,为【" + osLifeCycleVO.getId() + "】的数据时出现错误!"}); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | if(logger.isErrorEnabled()){ |
| | | logger.error("读取excel内容时或保存生命周期信息时出现了错误,具体原因:",VciBaseUtil.getExceptionMessage(e)); |
| | | } |
| | | e.printStackTrace(); |
| | | return BaseResult.fail(VciBaseUtil.getExceptionMessage(e),new String[]{},e); |
| | | } |
| | | return BaseResult.success("生命周期导入成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 获取导出或导入模板的列名 |
| | | * @param flag 是否获取导入模板列名 |
| | | * @return |
| | | */ |
| | | private List<String> getCloumns(boolean flag){ |
| | | if(flag){ |
| | | return new ArrayList<>( |
| | | Arrays.asList( |
| | | "名称", "标签", "起始状态", "描述", |
| | | "连接线起始状态", "连接线目标状态", "事件(;间隔)" |
| | | ) |
| | | ); |
| | | } |
| | | return new ArrayList<>( |
| | | Arrays.asList( |
| | | "名称", "标签", "起始状态", "描述", |
| | | "连接线名称", "连接线起始状态英文名称","连接线起始状态中文名称", |
| | | "连接线目标状态英文名称","连接线目标状态中文名称", "事件", "创建时间" |
| | | ) |
| | | ); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 查询所有跃迁事件key |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<String> getLCEventKeys() throws PLException { |
| | | return Arrays.asList(platformClientUtil.getLifeCycleService().getLCEventKeys()); |
| | | } |
| | | |
| | | /** |
| | | * 批量执行跃迁操作,要求必须是同一个业务类型下的 |
| | | * @param bos 业务类型数据对象 |
| | | * @param lineVOs 跃迁对象 |