|
@@ -3484,7 +3484,7 @@ public class TaskController extends BladeController {
|
|
|
}
|
|
|
//校验是否被使用过
|
|
|
List<Task> tasks = jdbcTemplate
|
|
|
- .query("SELECT * FROM u_task WHERE contract_id = ? and is_deleted = 0 AND fixed_flow_id = ? ",
|
|
|
+ .query("SELECT * FROM u_task WHERE contract_id = ? and is_deleted = 0 and status != 3 AND fixed_flow_id = ? ",
|
|
|
new Object[]{dto.getContractId(),dto.getFixedFlowId()}, new BeanPropertyRowMapper<>(Task.class));
|
|
|
if (tasks.size() > 0){
|
|
|
return R.fail("当前流程已经使用,不能修改");
|
|
@@ -3545,7 +3545,7 @@ public class TaskController extends BladeController {
|
|
|
@ApiOperation(value = "计量刪除预设流程", notes = "传入预设流程id")
|
|
|
public R<Object> deleteFixedFlow(@RequestParam String id) {
|
|
|
List<Task> tasks = jdbcTemplate
|
|
|
- .query("SELECT * FROM u_task WHERE is_deleted = 0 AND fixed_flow_id = ? ",
|
|
|
+ .query("SELECT * FROM u_task WHERE is_deleted = 0 and status != 3 AND fixed_flow_id = ? ",
|
|
|
new Object[]{id}, new BeanPropertyRowMapper<>(Task.class));
|
|
|
if (tasks.size() > 0){
|
|
|
return R.fail("当前流程已经使用,不能删除");
|