dangsn
2024-12-03 d0ae279ff3b83358d1c07f4481a041c4ad335026
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLifeCycleServiceImpl.java
@@ -6,7 +6,8 @@
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;
@@ -20,11 +21,10 @@
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;
@@ -36,7 +36,6 @@
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;
@@ -238,6 +237,7 @@
            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);
@@ -299,7 +299,7 @@
      lifeCyle.name = lifeCycleVO.getId();
      lifeCyle.tag = 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();
@@ -712,7 +712,7 @@
         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);
@@ -863,13 +863,24 @@
               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);
            }