|
@ -1,5 +1,6 @@ |
|
|
package org.dromara.workflow.service.impl; |
|
|
package org.dromara.workflow.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
@ -30,12 +31,14 @@ public class FlwLabelServiceImpl extends ServiceImpl<FlwLabelMapper, FlowLabel> |
|
|
updateWrapper.eq(FlowLabel::getFlowCode, flowDepart.getFlowCode()); |
|
|
updateWrapper.eq(FlowLabel::getFlowCode, flowDepart.getFlowCode()); |
|
|
this.baseMapper.delete(updateWrapper); |
|
|
this.baseMapper.delete(updateWrapper); |
|
|
|
|
|
|
|
|
//查询部门是否还存在别的流程
|
|
|
if (ObjectUtil.isNotEmpty(flowDepart.getLabelIds())) { |
|
|
if (this.baseMapper.checkFlowLabel(flowDepart.getLabelIds()) > 0){ |
|
|
//查询部门是否还存在别的流程
|
|
|
throw new ServiceException("所选的标签中,已存在在其他流程中,请检查后在提交!"); |
|
|
if (this.baseMapper.checkFlowLabel(flowDepart.getLabelIds()) > 0){ |
|
|
} |
|
|
throw new ServiceException("所选的标签中,已存在在其他流程中,请检查后在提交!"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.baseMapper.insert(flowDepart); |
|
|
this.baseMapper.insert(flowDepart); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return flowDepart; |
|
|
return flowDepart; |
|
|
} |
|
|
} |
|
|