| | |
| | | import com.vci.corba.omd.lcm.LifeCycle; |
| | | import com.vci.corba.omd.lcm.TransitionVO; |
| | | import com.vci.corba.omd.lcm.TransitionVOEvent; |
| | | import com.vci.dto.*; |
| | | import com.vci.dto.OsLifeCycleDTO; |
| | | 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.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.model.OsLifeCycleDO; |
| | | 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.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.swing.*; |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | 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); |
| | |
| | | life.setLines(lineVOS); |
| | | life.setStartStatus(lifeCycle.startState); |
| | | life.setStartStatusName(statusVOMap.getOrDefault(lifeCycle.startState,new OsStatusVO()).getName()); |
| | | life.setName(lifeCycle.tag); |
| | | life.setName(lifeCycle.label); |
| | | try { |
| | | life.setTs(VciDateUtil.str2Date(lifeCycle.ts,VciDateUtil.DateTimeMillFormat)); |
| | | } catch (Exception e) { |
| | |
| | | public LifeCycle lifeCycleVO2DO(OsLifeCycleVO lifeCycleVO) throws PLException { |
| | | LifeCycle lifeCyle = new LifeCycle(); |
| | | lifeCyle.name = lifeCycleVO.getId(); |
| | | lifeCyle.tag = lifeCycleVO.getName(); |
| | | lifeCyle.label = lifeCycleVO.getName(); |
| | | lifeCyle.oid = lifeCycleVO.getOid(); |
| | | String userId = "developer";//WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(); |
| | | String userId = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(); |
| | | lifeCyle.creator = Func.isBlank(lifeCycleVO.getCreator()) ? userId:lifeCycleVO.getCreator(); |
| | | lifeCyle.description = lifeCycleVO.getDescription(); |
| | | lifeCyle.modifier = Func.isBlank(lifeCycleVO.getLastModifier()) ? userId:lifeCycleVO.getLastModifier(); |
| | |
| | | throw new PLException("500",new String[]{"请勾选要导出的生命周期模板!"}); |
| | | } |
| | | //界面没传名称,使用默认导出名称 |
| | | exportFileName = Func.isBlank(exportFileName) ? "版本规则导出_" + Func.format(new Date(),"yyyy-MM-dd HHmmss.sss"):exportFileName; |
| | | exportFileName = Func.isBlank(exportFileName) ? "生命周期导出_" + Func.format(new Date(),"yyyy-MM-dd HHmmss.sss"):exportFileName; |
| | | //设置列名 |
| | | List<String> columns = this.getCloumns(flag); |
| | | |
| | |
| | | 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(200+(Integer.parseInt(po.getRowIndex())*60))); |
| | | boundVO.setCelly(String.valueOf(300+(Integer.parseInt(po.getRowIndex())*60))); |
| | | 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); |
| | | } |