|
@@ -474,9 +474,10 @@ public class TaskController extends BladeController {
|
|
throw new ServiceException("只有【未认证】状态的业务数据才能上报!");
|
|
throw new ServiceException("只有【未认证】状态的业务数据才能上报!");
|
|
}
|
|
}
|
|
|
|
|
|
- Task taskInfo = jdbcTemplate.query("select status from u_task where task_create_timestamp is not null and form_data_id = " + id, new BeanPropertyRowMapper<>(Task.class)).stream().findAny().orElse(null);
|
|
|
|
|
|
+ /*新增的时候去重判断,status=1或2,有且只有一条*/
|
|
|
|
+ Task taskInfo = jdbcTemplate.query("select status from u_task where task_create_timestamp is not null and status in (1,2) and form_data_id = " + id, new BeanPropertyRowMapper<>(Task.class)).stream().findAny().orElse(null);
|
|
if (ObjectUtil.isNotEmpty(taskInfo)) {
|
|
if (ObjectUtil.isNotEmpty(taskInfo)) {
|
|
- throw new ServiceException("文件【" + archive.getFileName() + "】已经重复选择,请重新选择左侧节点树文件数据进行上报");
|
|
|
|
|
|
+ throw new ServiceException("文件【" + archive.getFileName() + "】已经上报,请重新选择左侧节点树文件数据进行上报");
|
|
}
|
|
}
|
|
|
|
|
|
//创建task审批任务
|
|
//创建task审批任务
|
|
@@ -587,7 +588,8 @@ public class TaskController extends BladeController {
|
|
//判断现在的数据是否是待审批数据,只有上报状态、未认证状态的数据才能撤销
|
|
//判断现在的数据是否是待审批数据,只有上报状态、未认证状态的数据才能撤销
|
|
ArchiveFile archiveFile = jdbcTemplate.queryForObject("select * from u_archive_file where id = " + archiveId, new BeanPropertyRowMapper<>(ArchiveFile.class));
|
|
ArchiveFile archiveFile = jdbcTemplate.queryForObject("select * from u_archive_file where id = " + archiveId, new BeanPropertyRowMapper<>(ArchiveFile.class));
|
|
if (archiveFile != null) {
|
|
if (archiveFile != null) {
|
|
- Task task = jdbcTemplate.query("select id,status,process_instance_id from u_task where task_create_timestamp is not null and form_data_id = " + archiveId, new BeanPropertyRowMapper<>(Task.class)).stream().findAny().orElse(null);
|
|
|
|
|
|
+ /*此处任务会查询出多条,因为存在多次废除任务,那么form_data_id指向同一个id,所以在新增的时候去重判断,status=1或2,有且只有一条*/
|
|
|
|
+ Task task = jdbcTemplate.query("select id,status,process_instance_id from u_task where task_create_timestamp is not null and status in (1,2) and form_data_id = " + archiveId, new BeanPropertyRowMapper<>(Task.class)).stream().findAny().orElse(null);
|
|
if (task != null && task.getStatus().equals(1)) {
|
|
if (task != null && task.getStatus().equals(1)) {
|
|
//修改档案文件收集业务数据状态=已废除
|
|
//修改档案文件收集业务数据状态=已废除
|
|
jdbcTemplate.execute("update u_archive_file set status = 3,is_certification = 0,e_visa_file = null where id = " + archiveId);
|
|
jdbcTemplate.execute("update u_archive_file set status = 3,is_certification = 0,e_visa_file = null where id = " + archiveId);
|