From 29458b0fc9cebefe3c1fc005fb78718abf0c2ac2 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 28 Oct 2022 11:49:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E7=94=B3=E8=AF=B7=E8=A2=AB?= =?UTF-8?q?=E6=8B=92=E7=BB=9D=E6=97=B6=20=E5=88=A0=E9=99=A4=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E8=AE=B0=E5=BD=95=20del=5Fflg=20=E7=BD=AE1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/renren/modules/activiti/service/ActTaskService.java | 5 +++++ .../resources/mapper/processForm/TAbilityApplicationDao.xml | 1 + 2 files changed, 6 insertions(+) diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java index 0912f227..d16f2f63 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java @@ -59,6 +59,7 @@ import org.codehaus.jackson.map.ObjectMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -122,6 +123,8 @@ public class ActTaskService extends BaseServiceImpl { private ResourceDao resourceDao; @Autowired private SysNoticeService sysNoticeService; + @Autowired + private JdbcTemplate jdbcTemplate; /** * 根据参数获取当前运行的任务信息 @@ -685,6 +688,7 @@ public class ActTaskService extends BaseServiceImpl { pvmTransitionListC.clear(); pvmTransitionListC.addAll(oriPvmTransitionList); } + jdbcTemplate.update(String.format("UPDATE t_ability_application SET del_flag = 1 WHERE instance_id = %s ;", task.getProcessInstanceId())); sysNoticeService.updateApplyStateById(task.getProcessInstanceId(), 1); } @@ -743,6 +747,7 @@ public class ActTaskService extends BaseServiceImpl { pvmTransitionListC.clear(); pvmTransitionListC.addAll(oriPvmTransitionList); } + jdbcTemplate.update(String.format("UPDATE t_ability_application SET del_flag = 1 WHERE instance_id = %s ;", instanceId)); sysNoticeService.updateApplyStateById(instanceId, 1); } diff --git a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml index a2d39ac4..a2ff7228 100644 --- a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml +++ b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml @@ -274,6 +274,7 @@ AND t_ability_application.user_id = #{userId} AND t_ability_application.resource_id = #{resourceId} AND tb_data_resource.type != '基础设施' + AND t_ability_application.del_flag = 0