From bcbdb084c3a3a0a4de8fca1aa16caf0bc4681ddf Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期二, 27 十月 2026 09:41:51 +0800
Subject: [PATCH] feat(device): 删除核查计划明细时连带清理未审核记录和附件,已审核记录仍禁止删除
---
cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceExaminePlanServiceImpl.java | 308 +++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 262 insertions(+), 46 deletions(-)
diff --git a/cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceExaminePlanServiceImpl.java b/cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceExaminePlanServiceImpl.java
index a8b3ace..1381d0e 100644
--- a/cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceExaminePlanServiceImpl.java
+++ b/cnas-device/src/main/java/com/ruoyi/device/service/impl/DeviceExaminePlanServiceImpl.java
@@ -20,16 +20,22 @@
import com.ruoyi.device.dto.DeviceExaminePlanDetailsDto;
import com.ruoyi.device.dto.DeviceExaminePlanDto;
import com.ruoyi.device.excel.upload.DeviceExaminePlanUpload;
+import com.ruoyi.device.mapper.DeviceExamineAttachmentMapper;
import com.ruoyi.device.mapper.DeviceExaminePlanDetailsMapper;
import com.ruoyi.device.mapper.DeviceExaminePlanMapper;
+import com.ruoyi.device.mapper.DeviceExamineRecordContrastDetailsMapper;
import com.ruoyi.device.mapper.DeviceExamineRecordContrastMapper;
+import com.ruoyi.device.mapper.DeviceExamineRecordDetailMapper;
import com.ruoyi.device.mapper.DeviceExamineRecordMapper;
import com.ruoyi.device.mapper.DeviceMapper;
import com.ruoyi.device.pojo.Device;
+import com.ruoyi.device.pojo.DeviceExamineAttachment;
import com.ruoyi.device.pojo.DeviceExaminePlan;
import com.ruoyi.device.pojo.DeviceExaminePlanDetails;
import com.ruoyi.device.pojo.DeviceExamineRecord;
import com.ruoyi.device.pojo.DeviceExamineRecordContrast;
+import com.ruoyi.device.pojo.DeviceExamineRecordContrastDetails;
+import com.ruoyi.device.pojo.DeviceExamineRecordDetail;
import com.ruoyi.device.service.DeviceExaminePlanDetailsService;
import com.ruoyi.device.service.DeviceExaminePlanService;
import com.ruoyi.framework.exception.ErrorException;
@@ -38,6 +44,7 @@
import com.ruoyi.system.mapper.UserMapper;
import com.ruoyi.system.service.InformationNotificationService;
import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -45,6 +52,7 @@
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -57,6 +65,7 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import java.util.stream.Collectors;
/**
* <p>
@@ -86,6 +95,18 @@
private DeviceExamineRecordMapper deviceExamineRecordMapper;
@Resource
private DeviceExamineRecordContrastMapper deviceExamineRecordContrastMapper;
+ @Resource
+ private DeviceExamineRecordDetailMapper deviceExamineRecordDetailMapper;
+ @Resource
+ private DeviceExamineRecordContrastDetailsMapper deviceExamineRecordContrastDetailsMapper;
+ @Resource
+ private DeviceExamineAttachmentMapper deviceExamineAttachmentMapper;
+
+ @Value("${file.path}")
+ private String filePath;
+
+ @Value("${wordUrl}")
+ private String wordUrl;
/**
* 鏂板璁惧鏍告煡璁″垝
@@ -164,6 +185,7 @@
throw new ErrorException("璁惧缂栧彿" + examinePlanDetail.getDeviceNumber() + "鏈煡璇㈠埌鏍告煡浜�");
}
examinePlanDetail.setDeviceId(device.getId());
+ examinePlanDetail.setDeviceModel(device.getSpecificationModel());
examinePlanDetail.setCheckChargerUserId(user.getId());
}
@@ -415,12 +437,8 @@
if (device == null) {
return;
}
- // 鎻愬墠鏍告煡鏃惰鍒掓湀浠藉彲鑳借繕娌″埌锛屽彇瀹為檯瀹屾垚褰撳ぉ锛涘惁鍒欐寜鏈疆璁″垝鏍告煡鏈堜唤
- LocalDate checkDate = parseCheckDate(detail.getCheckTime());
- if (checkDate.isAfter(LocalDate.now())) {
- checkDate = LocalDate.now();
- }
- LocalDateTime checkDateTime = checkDate.atStartOfDay();
+ // 瀹℃牳閫氳繃褰撳ぉ鍗宠涓哄疄闄呮牳鏌ュ畬鎴愭椂闂�
+ LocalDateTime checkDateTime = LocalDate.now().atStartOfDay();
// 鍙厑璁稿悜鍓嶆粴鍔紝閬垮厤閲嶅澶嶆牳鏃ц褰曟椂鎶婃棩鏈熸敼鍥炲幓
if (device.getLastExamineDate() != null && !checkDateTime.isAfter(device.getLastExamineDate())) {
return;
@@ -502,30 +520,11 @@
DeviceExaminePlanDetails detail = new DeviceExaminePlanDetails();
detail.setPlanId(plan.getPlanId());
detail.setDeviceId(device.getId());
- String deviceName = device.getDeviceName() == null ? "" : device.getDeviceName();
- if (StringUtils.isNotBlank(device.getSpecificationModel())) {
- deviceName = deviceName + " " + device.getSpecificationModel();
- }
- detail.setDeviceName(deviceName);
+ detail.setDeviceName(device.getDeviceName() == null ? "" : device.getDeviceName());
+ detail.setDeviceModel(device.getSpecificationModel());
detail.setDeviceNumber(device.getManagementNumber());
detail.setCheckTime(checkTime);
deviceExaminePlanDetailsMapper.insert(detail);
- }
-
- /**
- * 璁″垝鏄庣粏鐨勬牳鏌ユ椂闂村彲鑳芥槸 yyyy-MM 鎴� yyyy-MM-dd锛岀粺涓�鍙栨湀浠介鏃�
- */
- private LocalDate parseCheckDate(String checkTime) {
- if (StringUtils.isNotBlank(checkTime)) {
- String normalized = checkTime.trim().replace('.', '-').replace('/', '-');
- if (normalized.length() >= 7) {
- try {
- return YearMonth.parse(normalized.substring(0, 7)).atDay(1);
- } catch (Exception ignored) {
- }
- }
- }
- return LocalDate.now();
}
/**
@@ -533,6 +532,18 @@
*/
@Override
public DeviceExaminePlanDetails resolveExaminePlanDetail(Integer deviceId, String checkTime) {
+ return findExaminePlanDetail(deviceId, checkTime, true);
+ }
+
+ /**
+ * 鏌ユ壘鎸囧畾璁惧鍙鐢ㄧ殑璁″垝鏄庣粏锛涘彧鏌ヨ锛屼笉鏂板璁″垝鎴栨槑缁�
+ */
+ @Override
+ public DeviceExaminePlanDetails findExaminePlanDetail(Integer deviceId, String checkTime) {
+ return findExaminePlanDetail(deviceId, checkTime, false);
+ }
+
+ private DeviceExaminePlanDetails findExaminePlanDetail(Integer deviceId, String checkTime, boolean createIfAbsent) {
if (deviceId == null) {
throw new ErrorException("璇烽�夋嫨鏍告煡璁惧");
}
@@ -541,7 +552,16 @@
throw new ErrorException("鏍告煡璁惧涓嶅瓨鍦�");
}
String checkMonth = normalizeCheckMonth(checkTime);
- DeviceExaminePlan plan = getOrCreatePlanEntity(checkMonth.substring(0, 4));
+ String planYear = checkMonth.substring(0, 4);
+ DeviceExaminePlan plan;
+ if (createIfAbsent) {
+ plan = getOrCreatePlanEntity(planYear);
+ } else {
+ plan = baseMapper.selectOne(Wrappers.<DeviceExaminePlan>lambdaQuery()
+ .eq(DeviceExaminePlan::getPlanYear, planYear)
+ .orderByDesc(DeviceExaminePlan::getPlanId)
+ .last("limit 1"));
+ }
List<DeviceExaminePlanDetails> details = deviceExaminePlanDetailsMapper.selectList(
Wrappers.<DeviceExaminePlanDetails>lambdaQuery()
.eq(DeviceExaminePlanDetails::getDeviceId, deviceId)
@@ -555,7 +575,7 @@
if (recordCount != null && recordCount > 0) {
continue;
}
- if (detail.getPlanId() != null && detail.getPlanId().equals(plan.getPlanId())) {
+ if (plan != null && detail.getPlanId() != null && detail.getPlanId().equals(plan.getPlanId())) {
return detail;
}
long distance = monthDistance(detail.getCheckTime(), checkMonth);
@@ -568,16 +588,17 @@
if (nearest != null) {
return nearest;
}
+ if (!createIfAbsent) {
+ return null;
+ }
DeviceExaminePlanDetails detail = new DeviceExaminePlanDetails();
detail.setPlanId(plan.getPlanId());
detail.setDeviceId(device.getId());
- String deviceName = device.getDeviceName() == null ? "" : device.getDeviceName();
- if (StringUtils.isNotBlank(device.getSpecificationModel())) {
- deviceName = deviceName + " " + device.getSpecificationModel();
- }
- detail.setDeviceName(deviceName);
+ detail.setDeviceName(device.getDeviceName() == null ? "" : device.getDeviceName());
+ detail.setDeviceModel(device.getSpecificationModel());
detail.setDeviceNumber(device.getManagementNumber());
- detail.setCheckTime(checkMonth);
+ String detailCheckTime = normalizeCheckDate(checkTime);
+ detail.setCheckTime(StringUtils.isBlank(detailCheckTime) ? checkMonth : detailCheckTime);
deviceExaminePlanDetailsMapper.insert(detail);
return detail;
}
@@ -596,6 +617,23 @@
}
}
return LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM"));
+ }
+
+ /**
+ * 瑙勮寖鏍告煡鏃ユ湡锛氬甫鍏蜂綋鏃ユ湡鐨勪繚鐣欏埌鏃ワ紝鍙~鏈堜唤鐨勮鑼冧负 yyyy-MM
+ */
+ private String normalizeCheckDate(String checkTime) {
+ if (StringUtils.isBlank(checkTime)) {
+ return null;
+ }
+ String normalized = checkTime.trim().replace('.', '-').replace('/', '-');
+ if (normalized.length() >= 10) {
+ try {
+ return LocalDate.parse(normalized.substring(0, 10)).toString();
+ } catch (Exception ignored) {
+ }
+ }
+ return normalizeCheckMonth(normalized);
}
/**
@@ -620,29 +658,207 @@
throw new ErrorException("缂哄皯璁惧鏍告煡璁″垝鏄庣粏id");
}
if (StringUtils.isNotBlank(detail.getCheckTime())) {
- String checkMonth = normalizeCheckMonth(detail.getCheckTime());
- detail.setCheckTime(checkMonth);
- DeviceExaminePlan plan = getOrCreatePlanEntity(checkMonth.substring(0, 4));
+ String checkTime = normalizeCheckDate(detail.getCheckTime());
+ detail.setCheckTime(checkTime);
+ DeviceExaminePlan plan = getOrCreatePlanEntity(checkTime.substring(0, 4));
detail.setPlanId(plan.getPlanId());
}
return deviceExaminePlanDetailsMapper.updateById(detail) > 0;
}
/**
- * 鍒犻櫎璁″垝鏄庣粏锛涘凡鏈夋牳鏌�/姣斿璁板綍鐨勪笉鍏佽鍒犻櫎锛屼繚璇佸巻鍙茬暀妗�
+ * 鍒犻櫎璁″垝鏄庣粏锛涘凡瀹℃牳瀹屾垚鐨勬牳鏌�/姣斿璁板綍闅忓巻鍙茬暀妗d笉鍏佽鍒犻櫎锛屾湭瀹℃牳鐨勮褰曢殢鏄庣粏涓�璧峰垹闄�
*/
@Override
public boolean removeExaminePlanDetail(Integer planDetailsId) {
if (planDetailsId == null) {
throw new ErrorException("缂哄皯璁惧鏍告煡璁″垝鏄庣粏id");
}
- Long recordCount = deviceExamineRecordMapper.selectCount(Wrappers.<DeviceExamineRecord>lambdaQuery()
- .eq(DeviceExamineRecord::getPlanDetailsId, planDetailsId));
- Long contrastCount = deviceExamineRecordContrastMapper.selectCount(Wrappers.<DeviceExamineRecordContrast>lambdaQuery()
- .eq(DeviceExamineRecordContrast::getPlanDetailsId, planDetailsId));
- if ((recordCount != null && recordCount > 0) || (contrastCount != null && contrastCount > 0)) {
- throw new ErrorException("璇ヨ鍒掑凡瀛樺湪鏍告煡璁板綍锛屼负淇濈暀鍘嗗彶璁板綍涓嶅厑璁稿垹闄�");
+ DeviceExaminePlanDetails detail = deviceExaminePlanDetailsMapper.selectById(planDetailsId);
+ if (detail == null) {
+ return false;
}
- return deviceExaminePlanDetailsService.removeById(planDetailsId);
+ List<DeviceExamineRecord> records = deviceExamineRecordMapper.selectList(Wrappers.<DeviceExamineRecord>lambdaQuery()
+ .eq(DeviceExamineRecord::getPlanDetailsId, planDetailsId));
+ List<DeviceExamineRecordContrast> contrasts = deviceExamineRecordContrastMapper.selectList(Wrappers.<DeviceExamineRecordContrast>lambdaQuery()
+ .eq(DeviceExamineRecordContrast::getPlanDetailsId, planDetailsId));
+ boolean hasReviewedRecord = records.stream().anyMatch(item -> item.getReviewStatus() != null
+ && (item.getReviewStatus() == 0 || item.getReviewStatus() == 1));
+ boolean hasReviewedContrast = contrasts.stream().anyMatch(item -> item.getReviewStatus() != null
+ && (item.getReviewStatus() == 0 || item.getReviewStatus() == 1));
+ if (hasReviewedRecord || hasReviewedContrast) {
+ throw new ErrorException("璇ヨ鍒掑凡瀛樺湪瀹℃牳瀹屾垚鐨勬牳鏌ヨ褰曪紝涓轰繚鐣欏巻鍙茶褰曚笉鍏佽鍒犻櫎");
+ }
+ if (!records.isEmpty()) {
+ List<Integer> recordIds = records.stream().map(DeviceExamineRecord::getRecordId).collect(Collectors.toList());
+ deviceExamineRecordDetailMapper.delete(Wrappers.<DeviceExamineRecordDetail>lambdaQuery()
+ .in(DeviceExamineRecordDetail::getRecordId, recordIds));
+ deviceExamineRecordMapper.deleteBatchIds(recordIds);
+ }
+ if (!contrasts.isEmpty()) {
+ List<Integer> contrastIds = contrasts.stream().map(DeviceExamineRecordContrast::getRecordContrastId).collect(Collectors.toList());
+ deviceExamineRecordContrastDetailsMapper.delete(Wrappers.<DeviceExamineRecordContrastDetails>lambdaQuery()
+ .in(DeviceExamineRecordContrastDetails::getRecordContrastId, contrastIds));
+ deviceExamineRecordContrastMapper.deleteBatchIds(contrastIds);
+ }
+ deviceExamineAttachmentMapper.delete(Wrappers.<DeviceExamineAttachment>lambdaQuery()
+ .eq(DeviceExamineAttachment::getPlanDetailsId, planDetailsId));
+ boolean removed = deviceExaminePlanDetailsService.removeById(planDetailsId);
+ if (removed && detail.getDeviceId() != null) {
+ rollbackDeviceExamineDate(detail);
+ }
+ return removed;
+ }
+
+ /**
+ * 鍒犻櫎鏈鏍哥殑璁″垝鍚庯紝鎶婅澶囨。妗堟仮澶嶅埌鏈�杩戜竴鏉″鏍搁�氳繃鐨勮褰曪紱
+ * 娌℃湁宸插畬鎴愯褰曟椂锛屾墠娓呯┖妗f鐨勬牳鏌ユ棩鏈熷拰鍛ㄦ湡
+ */
+ private void rollbackDeviceExamineDate(DeviceExaminePlanDetails removedDetail) {
+ Device device = deviceMapper.selectById(removedDetail.getDeviceId());
+ if (device == null) {
+ return;
+ }
+ Long remainCount = deviceExaminePlanDetailsMapper.selectCount(Wrappers.<DeviceExaminePlanDetails>lambdaQuery()
+ .eq(DeviceExaminePlanDetails::getDeviceId, removedDetail.getDeviceId()));
+ boolean isCurrentRound = sameExamineMonth(removedDetail.getCheckTime(), device.getNextExamineDate());
+ // 鍒犻櫎鐨勪笉鏄。妗堝綋鍓嶇櫥璁扮殑閭d竴杞紝涓旇澶囪繕鏈夊叾浠栬鍒掓椂锛屼笉鍔ㄦ。妗�
+ if (!isCurrentRound && remainCount != null && remainCount > 0) {
+ return;
+ }
+ LocalDate lastDone = null;
+ List<DeviceExaminePlanDetails> details = deviceExaminePlanDetailsMapper.selectList(
+ Wrappers.<DeviceExaminePlanDetails>lambdaQuery()
+ .eq(DeviceExaminePlanDetails::getDeviceId, removedDetail.getDeviceId()));
+ for (DeviceExaminePlanDetails item : details) {
+ if (!hasPassedExamineRecord(item.getPlanDetailsId())) {
+ continue;
+ }
+ LocalDate date = parseCheckMonth(item.getCheckTime());
+ if (date != null && (lastDone == null || date.isAfter(lastDone))) {
+ lastDone = date;
+ }
+ }
+ if (lastDone == null) {
+ deviceMapper.update(null, Wrappers.<Device>lambdaUpdate()
+ .eq(Device::getId, removedDetail.getDeviceId())
+ .set(Device::getLastExamineDate, null)
+ .set(Device::getNextExamineDate, null)
+ .set(Device::getExamineCycle, null));
+ return;
+ }
+ LocalDateTime last = lastDone.atStartOfDay();
+ LocalDateTime next = null;
+ if (StringUtils.isNotBlank(device.getExamineCycle())) {
+ try {
+ next = last.plusMonths(Long.parseLong(device.getExamineCycle().trim()));
+ } catch (NumberFormatException ignored) {
+ }
+ }
+ deviceMapper.update(null, Wrappers.<Device>lambdaUpdate()
+ .eq(Device::getId, removedDetail.getDeviceId())
+ .set(Device::getLastExamineDate, last)
+ .set(Device::getNextExamineDate, next));
+ }
+
+ /**
+ * 鏄庣粏涓嬫槸鍚﹀瓨鍦ㄥ鏍搁�氳繃鐨勬牳鏌ヨ褰曟垨姣斿璁板綍
+ */
+ private boolean hasPassedExamineRecord(Integer planDetailsId) {
+ Long recordCount = deviceExamineRecordMapper.selectCount(Wrappers.<DeviceExamineRecord>lambdaQuery()
+ .eq(DeviceExamineRecord::getPlanDetailsId, planDetailsId)
+ .eq(DeviceExamineRecord::getReviewStatus, 1));
+ if (recordCount != null && recordCount > 0) {
+ return true;
+ }
+ Long contrastCount = deviceExamineRecordContrastMapper.selectCount(Wrappers.<DeviceExamineRecordContrast>lambdaQuery()
+ .eq(DeviceExamineRecordContrast::getPlanDetailsId, planDetailsId)
+ .eq(DeviceExamineRecordContrast::getReviewStatus, 1));
+ return contrastCount != null && contrastCount > 0;
+ }
+
+ /**
+ * 璁″垝鏄庣粏鐨勬牳鏌ユ湀浠芥槸鍚﹀氨鏄。妗堜笅娆℃牳鏌ユ棩鏈熸墍鍦ㄦ湀浠�
+ */
+ private boolean sameExamineMonth(String checkTime, LocalDateTime nextExamineDate) {
+ if (StringUtils.isBlank(checkTime) || nextExamineDate == null) {
+ return false;
+ }
+ String normalized = checkTime.trim().replace('.', '-').replace('/', '-');
+ return normalized.length() >= 7
+ && normalized.substring(0, 7).equals(nextExamineDate.format(DateTimeFormatter.ofPattern("yyyy-MM")));
+ }
+
+ /**
+ * 瑙f瀽鏄庣粏鏍告煡鏈堜唤涓哄綋鏈堥鏃ワ紝鏍煎紡涓嶅悎娉曟椂杩斿洖 null
+ */
+ private LocalDate parseCheckMonth(String checkTime) {
+ if (StringUtils.isNotBlank(checkTime)) {
+ String normalized = checkTime.trim().replace('.', '-').replace('/', '-');
+ if (normalized.length() >= 7) {
+ try {
+ return YearMonth.parse(normalized.substring(0, 7)).atDay(1);
+ } catch (Exception ignored) {
+ }
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public List<DeviceExamineAttachment> selectAttachments(Integer planDetailsId) {
+ if (planDetailsId == null) {
+ return new ArrayList<>();
+ }
+ return deviceExamineAttachmentMapper.selectList(Wrappers.<DeviceExamineAttachment>lambdaQuery()
+ .eq(DeviceExamineAttachment::getPlanDetailsId, planDetailsId)
+ .orderByAsc(DeviceExamineAttachment::getSort, DeviceExamineAttachment::getId));
+ }
+
+ @Override
+ public DeviceExamineAttachment uploadAttachment(Integer planDetailsId, MultipartFile file) {
+ if (planDetailsId == null) {
+ throw new ErrorException("缂哄皯鏍告煡璁″垝鏄庣粏id");
+ }
+ if (deviceExaminePlanDetailsMapper.selectById(planDetailsId) == null) {
+ throw new ErrorException("鏍告煡璁″垝鏄庣粏涓嶅瓨鍦�");
+ }
+ if (file == null || file.isEmpty()) {
+ throw new ErrorException("闄勪欢涓嶈兘涓虹┖");
+ }
+ // 绯荤粺鍏ㄥ眬涓婁紶涓婇檺涓�200MB锛岃繖閲屾彁鍓嶇粰鍑哄弸濂芥彁绀�
+ if (file.getSize() > 200L * 1024 * 1024) {
+ throw new ErrorException("闄勪欢涓嶈兘瓒呰繃200MB");
+ }
+ String originalName = file.getOriginalFilename();
+ if (originalName == null || originalName.trim().isEmpty()) {
+ originalName = "鏈懡鍚嶆枃浠�";
+ }
+ // 涓埆娴忚鍣ㄥ彲鑳藉甫涓婅矾寰勫墠缂�锛屽彧淇濈暀鏂囦欢鍚嶆湰韬�
+ originalName = originalName.replaceAll(".*[/\\\\]", "");
+ try {
+ // 鍥剧墖鏀惧浘鐗囩洰褰曪紙/img 闈欐�佽矾寰勶級锛屽叾浣欎换鎰忔牸寮忔斁 word 鐩綍锛�/word 闈欐�佽矾寰勶級
+ boolean image = originalName.matches("(?i).+\\.(jpg|jpeg|png|gif)$");
+ File directory = new File(image ? filePath : wordUrl);
+ if (!directory.exists()) {
+ directory.mkdirs();
+ }
+ String fileUrl = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmssSSS")) + "-" + originalName;
+ file.transferTo(new File(directory, fileUrl));
+ DeviceExamineAttachment attachment = new DeviceExamineAttachment();
+ attachment.setPlanDetailsId(planDetailsId);
+ attachment.setFileName(originalName);
+ attachment.setFileUrl(fileUrl);
+ attachment.setSort(selectAttachments(planDetailsId).size());
+ deviceExamineAttachmentMapper.insert(attachment);
+ return attachment;
+ } catch (IOException e) {
+ throw new ErrorException("闄勪欢涓婁紶澶辫触");
+ }
+ }
+
+ @Override
+ public boolean deleteAttachment(Long id) {
+ return deviceExamineAttachmentMapper.deleteById(id) > 0;
}
}
--
Gitblit v1.9.3