| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.corba.common.VCIError; |
| | | import com.vci.corba.omd.etm.EnumType; |
| | | import com.vci.corba.omd.lcm.Bound; |
| | | import com.vci.corba.omd.lcm.LifeCycle; |
| | | import com.vci.corba.omd.lcm.TransitionVO; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | | import com.vci.starter.poi.util.ExcelUtil; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import plm.bs.omd.linktype.common.LinkTypeProvider; |
| | | import plm.corba.attribpool.AttribItem; |
| | | import plm.corba.btm.BTMServiceOperations; |
| | | import plm.corba.btm.BtmItem; |
| | | import com.vci.corba.omd.etm.EnumItem; |
| | | import plm.corba.lifecycle.Bound; |
| | | import plm.corba.lifecycle.LifeCyle; |
| | | import plm.corba.lifecycle.TransitionVO; |
| | | import plm.corba.lifecycle.TransitionVOEvent; |
| | | import plm.corba.linkTypeManager.LinkType; |
| | | import plm.corba.statePoolManager.StatePool; |
| | | import plm.ddlTool.client.DDLToolClient; |
| | | import plm.vo.omd.btm.common.BtmProvider; |
| | | import plm.vo.omd.btm.resource.Tool; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileNotFoundException; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static plm.vo.omd.attribpool.ui.VTDataTypePanel.*; |
| | | |
| | | |
| | | /** |
| | |
| | | allLifeCycleLowMap.put(id.toLowerCase(Locale.ROOT),lifeCycleVO); |
| | | }); |
| | | //不存在的生命周期对象 |
| | | List<LifeCyle> unExistLifeCycleList = new ArrayList<LifeCyle>(); |
| | | List<LifeCyle> editLifeCycleList = new ArrayList<LifeCyle>(); |
| | | List<LifeCycle> unExistLifeCycleList = new ArrayList<LifeCycle>(); |
| | | List<LifeCycle> editLifeCycleList = new ArrayList<LifeCycle>(); |
| | | String userId = WebUtil.getCurrentUserId(); |
| | | String now = VciDateUtil.getNowString(VciDateUtil.DateTimeFormat); |
| | | //循环分析需要添加还是修改 |
| | | for(OsLifeCycleDTO lifeCycleDTO : lifeCycleDTOList){ |
| | | String lifeCycleId = lifeCycleDTO.getId().toLowerCase().trim(); |
| | | LifeCyle lifeCyle = null; |
| | | LifeCycle lifeCyle = null; |
| | | boolean edit = false; |
| | | if(!existLifeCycleLowIds.contains(lifeCycleId)) { |
| | | lifeCyle = new LifeCyle(); |
| | | lifeCyle = new LifeCycle(); |
| | | lifeCyle.oid = ""; |
| | | lifeCyle.id = ""; |
| | | lifeCyle.creator = userId; |
| | | lifeCyle.createTime = now; |
| | | lifeCyle.createTime = System.currentTimeMillis(); |
| | | lifeCyle.ts = now; |
| | | lifeCyle.name = lifeCycleDTO.getId(); |
| | | }else { |
| | |
| | | lifeCyle.description = lifeCycleDTO.getDescription() == null?"":lifeCycleDTO.getDescription(); |
| | | lifeCyle.startState = lifeCycleDTO.getStartStatus() == null?"":lifeCycleDTO.getStartStatus(); |
| | | lifeCyle.modifier = userId; |
| | | lifeCyle.modifyTime = now; |
| | | lifeCyle.modifyTime = System.currentTimeMillis(); |
| | | //找区域 |
| | | List<OsLifeCycleLineDTO> lineDTOList = lifeCycleDTO.getLineDTOList(); |
| | | if(CollectionUtils.isEmpty(lineDTOList)){ |