diff --git a/detection/src/main/java/com/njcn/gather/icd/service/impl/PqIcdPathServiceImpl.java b/detection/src/main/java/com/njcn/gather/icd/service/impl/PqIcdPathServiceImpl.java index 692d6963..b4da9708 100644 --- a/detection/src/main/java/com/njcn/gather/icd/service/impl/PqIcdPathServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/icd/service/impl/PqIcdPathServiceImpl.java @@ -137,6 +137,10 @@ public class PqIcdPathServiceImpl extends ServiceImpl ids) { + List pqIcdPaths = this.listByIds(ids); + String commInstallPath = this.getCommInstallPath(); + pqIcdPaths.forEach(pqIcdPath -> { + String mappingFilePath = commInstallPath + "\\DeviceControl\\Config\\" + pqIcdPath.getName() + ".txt"; + Path path = Paths.get(mappingFilePath); + File file = path.toFile(); + if (file.exists()) { + file.delete(); + } + }); + return this.lambdaUpdate().in(PqIcdPath::getId, ids).set(PqIcdPath::getState, DataStateEnum.DELETED.getCode()).update(); }