From cc44920da3d40b8248b67560026e891afdd1a6ab Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期四, 08 五月 2025 17:57:14 +0800 Subject: [PATCH] 1.查询可以被引用的部件接口开发完成 2.借用部件(可批量) 开发完成 3.修改原有新增、修改部件接口 完成 4.修改原有删除文档与导入文档接口 完成 5.修改工作流问题 --- lxzn-module-flowable/src/main/java/org/jeecg/modules/flowable/apithird/business/service/impl/FlowMyBusinessServiceImpl.java | 26 +++++++++++++++++++------- 1 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lxzn-module-flowable/src/main/java/org/jeecg/modules/flowable/apithird/business/service/impl/FlowMyBusinessServiceImpl.java b/lxzn-module-flowable/src/main/java/org/jeecg/modules/flowable/apithird/business/service/impl/FlowMyBusinessServiceImpl.java index 3216cf9..1cf4f7f 100644 --- a/lxzn-module-flowable/src/main/java/org/jeecg/modules/flowable/apithird/business/service/impl/FlowMyBusinessServiceImpl.java +++ b/lxzn-module-flowable/src/main/java/org/jeecg/modules/flowable/apithird/business/service/impl/FlowMyBusinessServiceImpl.java @@ -1,6 +1,7 @@ package org.jeecg.modules.flowable.apithird.business.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -14,9 +15,9 @@ import org.jeecg.modules.flowable.util.TimeUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.util.Date; import java.util.List; @@ -28,7 +29,7 @@ */ @Service public class FlowMyBusinessServiceImpl extends ServiceImpl<FlowMyBusinessMapper, FlowMyBusiness> implements IFlowMyBusinessService { - @Autowired + @Resource private FlowMyBusinessMapper flowMyBusinessMapper; @Autowired @@ -58,13 +59,10 @@ return null; } - @Transactional(isolation = Isolation.READ_COMMITTED) // 闄嶄綆闅旂绾у埆 + @Transactional // 闄嶄綆闅旂绾у埆 public FlowMyBusiness getByDataId(String dataId) { - LambdaQueryWrapper<FlowMyBusiness> flowMyBusinessLambdaQueryWrapper = new LambdaQueryWrapper<>(); - flowMyBusinessLambdaQueryWrapper.eq(FlowMyBusiness::getDataId,dataId) - ; //濡傛灉淇濆瓨鏁版嵁鍓嶆湭璋冪敤蹇呰皟鐨凢lowCommonService.initActBusiness鏂规硶锛屽氨浼氭湁闂 - FlowMyBusiness business = this.getOne(flowMyBusinessLambdaQueryWrapper); + FlowMyBusiness business = flowMyBusinessMapper.selectByDataId(dataId); return business; } @@ -128,4 +126,18 @@ }); return flowMyBusinessDtoIPage; } + + @Override + public FlowMyBusiness getFlowMyBusiness(String instanceId) { + List<FlowMyBusiness> businessList = super.list( + new QueryWrapper<FlowMyBusiness>().eq("process_instance_id", instanceId)); + return businessList.isEmpty() ? null : businessList.get(0); + } + + @Override + public FlowMyBusiness selectByDataId(String dataId) { + List<FlowMyBusiness> businessList = super.list( + new QueryWrapper<FlowMyBusiness>().eq("data_id", dataId)); + return businessList.isEmpty() ? null : businessList.get(0); + } } -- Gitblit v1.9.3