|
|
|
|
@ -31,9 +31,12 @@ import com.biutag.supervision.pojo.dto.flow.VerifyData;
|
|
|
|
|
import com.biutag.supervision.pojo.dto.jwdc.NegativeApiDto; |
|
|
|
|
import com.biutag.supervision.pojo.entity.*; |
|
|
|
|
import com.biutag.supervision.pojo.model.UserAuth; |
|
|
|
|
import com.biutag.supervision.pojo.param.NegativeQueryParam; |
|
|
|
|
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionPageRequest; |
|
|
|
|
import com.biutag.supervision.pojo.vo.NegativeQueryVo; |
|
|
|
|
import com.biutag.supervision.pojo.vo.NegativeFileVo; |
|
|
|
|
import com.biutag.supervision.service.complaintCollection.ComplaintCollectionService; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
import com.biutag.supervision.util.SpringUtil; |
|
|
|
|
import com.biutag.supervision.util.TimeUtil; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
@ -42,6 +45,7 @@ import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
import java.time.LocalDate; |
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.concurrent.atomic.AtomicReference; |
|
|
|
|
@ -427,6 +431,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public boolean remove(String id) { |
|
|
|
|
exportBeforeRemove(id); |
|
|
|
|
removeById(id); |
|
|
|
|
negativeHistoryService.removeById(id); |
|
|
|
|
// 工作表
|
|
|
|
|
@ -682,6 +687,18 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void exportBeforeRemove(String id) { |
|
|
|
|
try { |
|
|
|
|
NegativeQueryParam param = new NegativeQueryParam(); |
|
|
|
|
param.setOriginId(id); |
|
|
|
|
Page<NegativeQueryVo> page = SpringUtil.getBean(NegativeQueryService.class).page(param); |
|
|
|
|
String taskName = String.format("%s删除留存记录", LocalDate.now()); |
|
|
|
|
String taskId = SpringUtil.getBean(NegativeTaskService.class).save(page.getRecords().size(), taskName).getId(); |
|
|
|
|
SpringUtil.getBean(NegativeTaskService.class).exportExcel(page.getRecords(), taskId); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.warn("删除前导出失败: {}", e.getMessage()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|