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