|
@@ -13,6 +13,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* 流程表单模板 服务实现类
|
|
@@ -48,6 +49,12 @@ public class FlwFormTemplateServiceImpl extends BaseServiceImpl<FlwFormTemplateM
|
|
|
return super.updateById(flwFormTemplate);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public boolean removeNotBindByIds(List<Long> ids) {
|
|
|
+ return super.remove(Wrappers.<FlwFormTemplate>lambdaQuery().eq(FlwFormTemplate::getId, ids)
|
|
|
+ .ne(FlwFormTemplate::getStatus, 3));
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public boolean existByFormCategoryIds(List<Long> formCategoryIds) {
|
|
|
return lambdaQuery().in(FlwFormTemplate::getFormCategoryId, formCategoryIds).count() > 0;
|
|
@@ -67,6 +74,14 @@ public class FlwFormTemplateServiceImpl extends BaseServiceImpl<FlwFormTemplateM
|
|
|
}
|
|
|
}
|
|
|
ApiAssert.fail(null == id, "业务表单配置内容有误");
|
|
|
- return this.checkById(id);
|
|
|
+ FlwFormTemplate flwFormTemplate = this.checkById(id);
|
|
|
+ if (null != flwFormTemplate && !Objects.equals(3, flwFormTemplate.getStatus())) {
|
|
|
+ // 加载设置为绑定状态,该状态不允许删除,只能修改编辑
|
|
|
+ FlwFormTemplate temp = new FlwFormTemplate();
|
|
|
+ temp.setStatus(3);
|
|
|
+ temp.setId(flwFormTemplate.getId());
|
|
|
+ super.updateById(temp);
|
|
|
+ }
|
|
|
+ return flwFormTemplate;
|
|
|
}
|
|
|
}
|