|
|
|
|
@ -9,6 +9,7 @@ import org.dromara.common.core.enums.BusinessStatusEnum;
|
|
|
|
|
import org.dromara.common.core.enums.OAStatusEnum;
|
|
|
|
|
import org.dromara.common.core.exception.ServiceException;
|
|
|
|
|
import org.dromara.common.core.utils.MapstructUtils;
|
|
|
|
|
import org.dromara.common.core.utils.ObjectUtils;
|
|
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
|
|
@ -66,6 +67,9 @@ public class ErpProjectPlanServiceImpl implements IErpProjectPlanService {
|
|
|
|
|
public ErpProjectPlanVo queryById(Long projectPlanId){
|
|
|
|
|
// 使用自定义方法查询,包含关联数据
|
|
|
|
|
ErpProjectPlanVo projectPlanVo = baseMapper.selectCustomErpProjectPlanVoById(projectPlanId);
|
|
|
|
|
if (ObjectUtils.isEmpty(projectPlanVo)) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
// 查询项目计划阶段列表
|
|
|
|
|
MPJLambdaWrapper<ErpProjectPlanStage> lqw = JoinWrappers.lambda(ErpProjectPlanStage.class)
|
|
|
|
|
.selectAll(ErpProjectPlanStage.class)
|
|
|
|
|
@ -139,12 +143,14 @@ public class ErpProjectPlanServiceImpl implements IErpProjectPlanService {
|
|
|
|
|
validateProjectManager(bo.getManagerId());
|
|
|
|
|
List<ErpProjectPlanStage> planStageList = bo.getPlanStageList();
|
|
|
|
|
boolean flag = baseMapper.insert(add) > 0;
|
|
|
|
|
if (flag && planStageList != null && !planStageList.isEmpty()) {
|
|
|
|
|
if (flag) {
|
|
|
|
|
bo.setProjectPlanId(add.getProjectPlanId());
|
|
|
|
|
for (ErpProjectPlanStage planStage : planStageList) {
|
|
|
|
|
planStage.setProjectPlanId(add.getProjectPlanId());
|
|
|
|
|
planStage.setProjectId(add.getProjectId());
|
|
|
|
|
planStageMapper.insert(planStage);
|
|
|
|
|
if ( ObjectUtils.isNotEmpty(planStageList)) {
|
|
|
|
|
for (ErpProjectPlanStage planStage : planStageList) {
|
|
|
|
|
planStage.setProjectPlanId(add.getProjectPlanId());
|
|
|
|
|
planStage.setProjectId(add.getProjectId());
|
|
|
|
|
planStageMapper.insert(planStage);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return flag;
|
|
|
|
|
|