|
@@ -477,17 +477,14 @@ public class TaskController extends BladeController {
|
|
|
@ApiOperationSupport(order = 8)
|
|
|
@ApiOperation(value = "批量撤销(废除)-档案")
|
|
|
public R<Object> batchRepealTaskArchive(@RequestBody ArchiveTaskBatchRepealDTO repealDTO) throws IOException {
|
|
|
- if (repealDTO.getType().equals(1)) { //文件收集废除
|
|
|
+ if (repealDTO.getType().equals(1)) { //文件收集废除(有可能是 认证废除 或 上报任务废除)
|
|
|
String[] archiveIds = repealDTO.getIds().split(",");
|
|
|
for (String archiveId : archiveIds) {
|
|
|
//判断现在的数据是否是待审批数据,只有上报状态、未认证状态的数据才能撤销
|
|
|
ArchiveFile archiveFile = jdbcTemplate.queryForObject("select * from u_archive_file where id = " + archiveId, new BeanPropertyRowMapper<>(ArchiveFile.class));
|
|
|
- if (archiveFile != null && !archiveFile.getIsCertification().equals(0) && (!archiveFile.getStatus().equals(1) || !archiveFile.getStatus().equals(2))) {
|
|
|
- throw new ServiceException("当前数据不是未认证,并且处于上报状态,无法进行废除操作!");
|
|
|
- }
|
|
|
if (archiveFile != null) {
|
|
|
//修改档案文件收集业务数据状态=已废除
|
|
|
- jdbcTemplate.execute("update u_archive_file set status = 3 where id = " + archiveId);
|
|
|
+ jdbcTemplate.execute("update u_archive_file set status = 3,is_certification = 0,e_visa_file = null where id = " + archiveId);
|
|
|
Task task = jdbcTemplate.query("select id,status,process_instance_id from u_task where form_data_id = " + archiveId, new BeanPropertyRowMapper<>(Task.class)).stream().findAny().orElse(null);
|
|
|
if (task != null && task.getStatus().equals(1)) {
|
|
|
//待审批审批任务=已废除
|
|
@@ -525,7 +522,7 @@ public class TaskController extends BladeController {
|
|
|
//审批任务详情=已废除
|
|
|
jdbcTemplate.execute("update u_task_parallel set status = 3 where process_instance_id = '" + task.getProcessInstanceId() + "'");
|
|
|
//修改档案文件收集业务数据状态
|
|
|
- jdbcTemplate.execute("update u_archive_file set status = 3 where id = " + task.getFormDataId());
|
|
|
+ jdbcTemplate.execute("update u_archive_file set status = 3,e_visa_file = null where id = " + task.getFormDataId());
|
|
|
}
|
|
|
}
|
|
|
//WebSocket推送
|