Commit 71819bde authored by 侯彦文's avatar 侯彦文

进度计划更新操作

parent df0da5af
...@@ -15,6 +15,7 @@ import com.yonde.dcs.plan.core.repository.ExtPlanRepository; ...@@ -15,6 +15,7 @@ import com.yonde.dcs.plan.core.repository.ExtPlanRepository;
import com.yonde.dcs.plan.core.service.ExtDistributeRecordService; import com.yonde.dcs.plan.core.service.ExtDistributeRecordService;
import com.yonde.dcs.plan.core.service.ExtPlanService; import com.yonde.dcs.plan.core.service.ExtPlanService;
import com.yonde.dcs.plan.core.util.CommonUtils; import com.yonde.dcs.plan.core.util.CommonUtils;
import com.yonde.dcs.plan.core.util.WorkFlowUtil;
import com.yonde.dcs.plan.entity.po.ExtPlan; import com.yonde.dcs.plan.entity.po.ExtPlan;
import com.yonde.dex.basedata.data.search.SearchItem; import com.yonde.dex.basedata.data.search.SearchItem;
import com.yonde.dex.basedata.data.search.SearchItems; import com.yonde.dex.basedata.data.search.SearchItems;
...@@ -36,11 +37,14 @@ import com.yonde.dex.user.common.vo.DxUserInfoVO; ...@@ -36,11 +37,14 @@ import com.yonde.dex.user.common.vo.DxUserInfoVO;
import com.yonde.dex.user.feign.DxOrganizationFeign; import com.yonde.dex.user.feign.DxOrganizationFeign;
import com.yonde.dex.user.feign.DxUserInfoFeign; import com.yonde.dex.user.feign.DxUserInfoFeign;
import com.yonde.dex.version.plugin.core.deleteType.IterationDeleteVO; import com.yonde.dex.version.plugin.core.deleteType.IterationDeleteVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessSearchVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessVO;
import com.yonde.dex.wfc.feign.api.WfcProcessFeign; import com.yonde.dex.wfc.feign.api.WfcProcessFeign;
import dm.jdbc.util.StringUtil; import dm.jdbc.util.StringUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -492,8 +496,12 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V ...@@ -492,8 +496,12 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
list.add(extPlanVO.getId()); list.add(extPlanVO.getId());
} }
}); });
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
list.stream().forEach(x -> { list.stream().forEach(x -> {
V v = this.get(x);
this.stopWf(v);
IterationDeleteVO deleteWrap = new IterationDeleteVO(); IterationDeleteVO deleteWrap = new IterationDeleteVO();
deleteWrap.setDeleteId(x); deleteWrap.setDeleteId(x);
deleteWrap.setDeleteType(IterationDeleteVO.DeleteType.MASTER_ITERATION); deleteWrap.setDeleteType(IterationDeleteVO.DeleteType.MASTER_ITERATION);
...@@ -505,6 +513,19 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V ...@@ -505,6 +513,19 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
} }
} }
public boolean stopWf(ExtPlanVO extPlanVO){
DxWfProcessSearchVO dxWfProcessSearchVO = new DxWfProcessSearchVO();
dxWfProcessSearchVO.setPboClass(DxDocumentVO.class.getName());
dxWfProcessSearchVO.setPboId(extPlanVO.getVersionId());
Page<DxWfProcessVO> processList = wfcProcessFeign.getProcessList(dxWfProcessSearchVO, 1, 10);
if (!CollectionUtils.isEmpty(processList.getContent())) {
wfcProcessFeign.stopProcess(processList.getContent().get(0).getId());
return true;
}
return false;
}
/** /**
* @param planExcelVO * @param planExcelVO
* @return * @return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment