删除补录信息和对应档案资料
补录归档
Showing
5 changed files
with
211 additions
and
18 deletions
| 1 | package com.pashanhoo.archive.entity; | ||
| 2 | |||
| 3 | public enum ArchiveStatus { | ||
| 4 | //档案状态(1:正在接收;2:正在补录;3:正在修改;4:在库;5:正在销毁;6:已销毁;7:正在借阅;8:已借阅) | ||
| 5 | /** | ||
| 6 | * 正在接收 | ||
| 7 | */ | ||
| 8 | RECEIVING("1","正在接收"), | ||
| 9 | /** | ||
| 10 | * 正在补录 | ||
| 11 | */ | ||
| 12 | REPLENISHING("2","正在补录"), | ||
| 13 | /** | ||
| 14 | * 正在修改 | ||
| 15 | */ | ||
| 16 | MODIFYING("3","正在修改"), | ||
| 17 | /** | ||
| 18 | * 在库 | ||
| 19 | */ | ||
| 20 | STORED("4","在库"), | ||
| 21 | /** | ||
| 22 | * 正在销毁 | ||
| 23 | */ | ||
| 24 | DESTROYING("5","正在销毁"), | ||
| 25 | /** | ||
| 26 | * 已销毁 | ||
| 27 | */ | ||
| 28 | DESTROYED("6","已销毁"), | ||
| 29 | /** | ||
| 30 | * 正在借阅 | ||
| 31 | */ | ||
| 32 | LENDING("7","正在借阅"), | ||
| 33 | /** | ||
| 34 | * 已借阅 | ||
| 35 | */ | ||
| 36 | LENDED("8","已借阅"); | ||
| 37 | |||
| 38 | private String code; | ||
| 39 | private String description; | ||
| 40 | |||
| 41 | ArchiveStatus(String code,String description) { | ||
| 42 | this.code = code; | ||
| 43 | this.description = description; | ||
| 44 | } | ||
| 45 | |||
| 46 | public String getCode() { | ||
| 47 | return this.code; | ||
| 48 | } | ||
| 49 | } |
| ... | @@ -2,7 +2,9 @@ package com.pashanhoo.common.util.fileupload; | ... | @@ -2,7 +2,9 @@ package com.pashanhoo.common.util.fileupload; |
| 2 | 2 | ||
| 3 | import com.pashanhoo.file.entity.vo.FileAttribute; | 3 | import com.pashanhoo.file.entity.vo.FileAttribute; |
| 4 | import io.minio.MinioClient; | 4 | import io.minio.MinioClient; |
| 5 | import io.minio.Result; | ||
| 5 | import io.minio.errors.*; | 6 | import io.minio.errors.*; |
| 7 | import io.minio.messages.DeleteError; | ||
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | import org.springframework.stereotype.Component; | 9 | import org.springframework.stereotype.Component; |
| 8 | import org.springframework.util.Assert; | 10 | import org.springframework.util.Assert; |
| ... | @@ -93,8 +95,8 @@ public class MinioUtil { | ... | @@ -93,8 +95,8 @@ public class MinioUtil { |
| 93 | /** | 95 | /** |
| 94 | * 删除附件 | 96 | * 删除附件 |
| 95 | * | 97 | * |
| 96 | * @param bucketName | 98 | * @param bucketName 存储桶名称 |
| 97 | * @param objectName | 99 | * @param objectName 附件存储路径 |
| 98 | * @throws Exception | 100 | * @throws Exception |
| 99 | */ | 101 | */ |
| 100 | public void removeObject(String bucketName, String objectName) throws Exception { | 102 | public void removeObject(String bucketName, String objectName) throws Exception { |
| ... | @@ -102,6 +104,15 @@ public class MinioUtil { | ... | @@ -102,6 +104,15 @@ public class MinioUtil { |
| 102 | } | 104 | } |
| 103 | 105 | ||
| 104 | /** | 106 | /** |
| 107 | * 批量删除附件 | ||
| 108 | * @param bucketName 存储桶名称 | ||
| 109 | * @param objectNames 附件存储路径集合 | ||
| 110 | */ | ||
| 111 | public Iterable batchRemove(String bucketName,Iterable<String> objectNames){ | ||
| 112 | return minioClient.removeObjects(bucketName, objectNames); | ||
| 113 | } | ||
| 114 | |||
| 115 | /** | ||
| 105 | * 通过输入流上传到minio | 116 | * 通过输入流上传到minio |
| 106 | * @param inputStream 文件输入流 | 117 | * @param inputStream 文件输入流 |
| 107 | * @param fileName 文件名,去除后缀名 | 118 | * @param fileName 文件名,去除后缀名 | ... | ... |
| ... | @@ -42,11 +42,15 @@ public class DgArchivesReplenishController { | ... | @@ -42,11 +42,15 @@ public class DgArchivesReplenishController { |
| 42 | 42 | ||
| 43 | @DeleteMapping("deleteDgArchivesReplenishByIds") | 43 | @DeleteMapping("deleteDgArchivesReplenishByIds") |
| 44 | @ApiOperation(value = "批量删除档案补录信息") | 44 | @ApiOperation(value = "批量删除档案补录信息") |
| 45 | public Result deleteDgArchivesReplenishByIds(@ApiParam("档案补录信息ID列表") @RequestParam(value = "idList") List<String> idList) { | 45 | public Result deleteDgArchivesReplenishByIds(@ApiParam("档案标识码") @RequestParam(value = "bsmArchives") List<String> bsmArchives) { |
| 46 | if(dgarchivesreplenishService.removeByIds(idList)) { | 46 | try { |
| 47 | return Result.ok("删除成功"); | 47 | if(dgarchivesreplenishService.delete(bsmArchives)) { |
| 48 | return Result.ok("删除成功"); | ||
| 49 | } | ||
| 50 | } catch (Exception e) { | ||
| 51 | return Result.exception(e.getMessage()); | ||
| 48 | } | 52 | } |
| 49 | return Result.error("删除失败"); | 53 | return Result.ok("删除失败"); |
| 50 | } | 54 | } |
| 51 | 55 | ||
| 52 | @PutMapping("updateDgArchivesReplenish") | 56 | @PutMapping("updateDgArchivesReplenish") |
| ... | @@ -70,4 +74,10 @@ public class DgArchivesReplenishController { | ... | @@ -70,4 +74,10 @@ public class DgArchivesReplenishController { |
| 70 | 74 | ||
| 71 | return Result.ok(dgarchivesreplenishService.searchDgArchivesReplenishList(request)); | 75 | return Result.ok(dgarchivesreplenishService.searchDgArchivesReplenishList(request)); |
| 72 | } | 76 | } |
| 77 | |||
| 78 | @GetMapping("doReplenishArchive") | ||
| 79 | @ApiOperation(value = "归档") | ||
| 80 | public Result doReplenishArchive(@ApiParam("归档id") @RequestParam String bsmModify,@ApiParam("档案标识码") @RequestParam String bsmArchive){ | ||
| 81 | return Result.ok(dgarchivesreplenishService.doReplenishArchive(bsmModify,bsmArchive)); | ||
| 82 | } | ||
| 73 | } | 83 | } | ... | ... |
| ... | @@ -8,6 +8,8 @@ import com.pashanhoo.common.Result; | ... | @@ -8,6 +8,8 @@ import com.pashanhoo.common.Result; |
| 8 | import com.pashanhoo.replenish.entity.*; | 8 | import com.pashanhoo.replenish.entity.*; |
| 9 | import com.pashanhoo.replenish.entity.vo.*; | 9 | import com.pashanhoo.replenish.entity.vo.*; |
| 10 | 10 | ||
| 11 | import java.util.List; | ||
| 12 | |||
| 11 | /** | 13 | /** |
| 12 | * <p> | 14 | * <p> |
| 13 | * 档案补录信息 服务类 | 15 | * 档案补录信息 服务类 |
| ... | @@ -17,8 +19,9 @@ import com.pashanhoo.replenish.entity.vo.*; | ... | @@ -17,8 +19,9 @@ import com.pashanhoo.replenish.entity.vo.*; |
| 17 | * @since 2021-11-05 | 19 | * @since 2021-11-05 |
| 18 | */ | 20 | */ |
| 19 | public interface DgArchivesReplenishService extends IService<DgArchivesReplenishDO> { | 21 | public interface DgArchivesReplenishService extends IService<DgArchivesReplenishDO> { |
| 20 | /** | 22 | /** |
| 21 | * 新增记录 | 23 | * 新增记录 |
| 24 | * | ||
| 22 | * @param request | 25 | * @param request |
| 23 | * @return | 26 | * @return |
| 24 | */ | 27 | */ |
| ... | @@ -26,6 +29,7 @@ public interface DgArchivesReplenishService extends IService<DgArchivesReplenish | ... | @@ -26,6 +29,7 @@ public interface DgArchivesReplenishService extends IService<DgArchivesReplenish |
| 26 | 29 | ||
| 27 | /** | 30 | /** |
| 28 | * 根据主键查询记录详情 | 31 | * 根据主键查询记录详情 |
| 32 | * | ||
| 29 | * @param id | 33 | * @param id |
| 30 | * @return | 34 | * @return |
| 31 | */ | 35 | */ |
| ... | @@ -33,6 +37,7 @@ public interface DgArchivesReplenishService extends IService<DgArchivesReplenish | ... | @@ -33,6 +37,7 @@ public interface DgArchivesReplenishService extends IService<DgArchivesReplenish |
| 33 | 37 | ||
| 34 | /** | 38 | /** |
| 35 | * 修改单条记录 | 39 | * 修改单条记录 |
| 40 | * | ||
| 36 | * @param request | 41 | * @param request |
| 37 | * @return | 42 | * @return |
| 38 | */ | 43 | */ |
| ... | @@ -40,8 +45,27 @@ public interface DgArchivesReplenishService extends IService<DgArchivesReplenish | ... | @@ -40,8 +45,27 @@ public interface DgArchivesReplenishService extends IService<DgArchivesReplenish |
| 40 | 45 | ||
| 41 | /** | 46 | /** |
| 42 | * 根据条件进行列表查询 | 47 | * 根据条件进行列表查询 |
| 48 | * | ||
| 43 | * @param request | 49 | * @param request |
| 44 | * @return | 50 | * @return |
| 45 | */ | 51 | */ |
| 46 | IPage<DgArchivesReplenishListVO> searchDgArchivesReplenishList(DgArchivesReplenishSearchRequest request); | 52 | IPage<DgArchivesReplenishListVO> searchDgArchivesReplenishList(DgArchivesReplenishSearchRequest request); |
| 53 | |||
| 54 | /** | ||
| 55 | * 删除补录信息 | ||
| 56 | * | ||
| 57 | * @param bsmArchives 档案标识码 | ||
| 58 | * @return | ||
| 59 | */ | ||
| 60 | boolean delete(List<String> bsmArchives) throws Exception; | ||
| 61 | |||
| 62 | /** | ||
| 63 | * 补录归档 | ||
| 64 | * 补录记录的状态为已归档和归档日期,一并修改档案记录的状态为在库 | ||
| 65 | * | ||
| 66 | * @param bsmModify 补录标识码 | ||
| 67 | * @param bsmArchive 档案标识码 | ||
| 68 | * @return | ||
| 69 | */ | ||
| 70 | boolean doReplenishArchive(String bsmModify,String bsmArchive); | ||
| 47 | } | 71 | } | ... | ... |
| ... | @@ -4,12 +4,11 @@ package com.pashanhoo.replenish.service.impl; | ... | @@ -4,12 +4,11 @@ package com.pashanhoo.replenish.service.impl; |
| 4 | import cn.hutool.core.date.DateTime; | 4 | import cn.hutool.core.date.DateTime; |
| 5 | import cn.hutool.core.date.DateUtil; | 5 | import cn.hutool.core.date.DateUtil; |
| 6 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 6 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| 7 | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | ||
| 7 | import com.baomidou.mybatisplus.core.metadata.IPage; | 8 | import com.baomidou.mybatisplus.core.metadata.IPage; |
| 8 | import com.baomidou.mybatisplus.core.toolkit.IdWorker; | 9 | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| 9 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 10 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 10 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 11 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 11 | import com.github.pagehelper.PageHelper; | ||
| 12 | import com.github.pagehelper.PageInfo; | ||
| 13 | import com.pashanhoo.archive.entity.DgArchivesConverter; | 12 | import com.pashanhoo.archive.entity.DgArchivesConverter; |
| 14 | import com.pashanhoo.archive.entity.DgArchivesDO; | 13 | import com.pashanhoo.archive.entity.DgArchivesDO; |
| 15 | import com.pashanhoo.archive.entity.vo.AddDgArchivesRequest; | 14 | import com.pashanhoo.archive.entity.vo.AddDgArchivesRequest; |
| ... | @@ -25,9 +24,15 @@ import com.pashanhoo.business.entity.DgBusinessDO; | ... | @@ -25,9 +24,15 @@ import com.pashanhoo.business.entity.DgBusinessDO; |
| 25 | import com.pashanhoo.business.entity.vo.AddDgBusinessRequest; | 24 | import com.pashanhoo.business.entity.vo.AddDgBusinessRequest; |
| 26 | import com.pashanhoo.business.entity.vo.UpdateDgBusinessRequest; | 25 | import com.pashanhoo.business.entity.vo.UpdateDgBusinessRequest; |
| 27 | import com.pashanhoo.business.service.DgBusinessService; | 26 | import com.pashanhoo.business.service.DgBusinessService; |
| 28 | import com.pashanhoo.common.Result; | 27 | import com.pashanhoo.catalog.entity.DgArchivesCatalogDO; |
| 28 | import com.pashanhoo.catalog.service.DgArchivesCatalogService; | ||
| 29 | import com.pashanhoo.common.util.SysCode.SysCodeUtil; | 29 | import com.pashanhoo.common.util.SysCode.SysCodeUtil; |
| 30 | import com.pashanhoo.common.util.SysCode.SysCodeVO; | 30 | import com.pashanhoo.common.util.SysCode.SysCodeVO; |
| 31 | import com.pashanhoo.common.util.fileupload.MinioConfig; | ||
| 32 | import com.pashanhoo.common.util.fileupload.MinioUtil; | ||
| 33 | import com.pashanhoo.file.entity.DgFileDO; | ||
| 34 | import com.pashanhoo.file.service.DgFileService; | ||
| 35 | import com.pashanhoo.archive.entity.ArchiveStatus; | ||
| 31 | import com.pashanhoo.replenish.entity.DgArchivesReplenishConverter; | 36 | import com.pashanhoo.replenish.entity.DgArchivesReplenishConverter; |
| 32 | import com.pashanhoo.replenish.entity.DgArchivesReplenishDO; | 37 | import com.pashanhoo.replenish.entity.DgArchivesReplenishDO; |
| 33 | import com.pashanhoo.replenish.entity.vo.*; | 38 | import com.pashanhoo.replenish.entity.vo.*; |
| ... | @@ -37,8 +42,9 @@ import org.springframework.beans.factory.annotation.Autowired; | ... | @@ -37,8 +42,9 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 37 | import org.springframework.stereotype.Service; | 42 | import org.springframework.stereotype.Service; |
| 38 | import org.springframework.transaction.annotation.Transactional; | 43 | import org.springframework.transaction.annotation.Transactional; |
| 39 | 44 | ||
| 40 | import java.util.Date; | 45 | import java.util.ArrayList; |
| 41 | import java.util.List; | 46 | import java.util.List; |
| 47 | import java.util.stream.Collectors; | ||
| 42 | 48 | ||
| 43 | /** | 49 | /** |
| 44 | * <p> | 50 | * <p> |
| ... | @@ -78,10 +84,18 @@ public class DgArchivesReplenishServiceImpl extends ServiceImpl<DgArchivesReplen | ... | @@ -78,10 +84,18 @@ public class DgArchivesReplenishServiceImpl extends ServiceImpl<DgArchivesReplen |
| 78 | @Autowired | 84 | @Autowired |
| 79 | SysCodeUtil sysCodeUtil; | 85 | SysCodeUtil sysCodeUtil; |
| 80 | 86 | ||
| 81 | /** | 87 | @Autowired |
| 82 | * 案卷基本信息状态补录中 | 88 | DgArchivesCatalogService dgArchivesCatalogService; |
| 83 | */ | 89 | |
| 84 | private final Integer REPLENISHING = 2; | 90 | @Autowired |
| 91 | DgFileService dgFileService; | ||
| 92 | |||
| 93 | @Autowired | ||
| 94 | MinioUtil minioUtil; | ||
| 95 | |||
| 96 | @Autowired | ||
| 97 | MinioConfig minioConfig; | ||
| 98 | |||
| 85 | 99 | ||
| 86 | /** | 100 | /** |
| 87 | * 新增记录 | 101 | * 新增记录 |
| ... | @@ -99,7 +113,7 @@ public class DgArchivesReplenishServiceImpl extends ServiceImpl<DgArchivesReplen | ... | @@ -99,7 +113,7 @@ public class DgArchivesReplenishServiceImpl extends ServiceImpl<DgArchivesReplen |
| 99 | //案卷基本信息 | 113 | //案卷基本信息 |
| 100 | AddDgArchivesRequest addDgArchivesRequest = request.getAddDgArchivesRequest(); | 114 | AddDgArchivesRequest addDgArchivesRequest = request.getAddDgArchivesRequest(); |
| 101 | addDgArchivesRequest.setBsmArchives(bsmArchive); | 115 | addDgArchivesRequest.setBsmArchives(bsmArchive); |
| 102 | addDgArchivesRequest.setDazt(REPLENISHING); | 116 | addDgArchivesRequest.setDazt(Integer.valueOf(ArchiveStatus.REPLENISHING.getCode())); |
| 103 | DgArchivesDO dgArchivesDO = dgArchivesConverter.addRequest2DO(addDgArchivesRequest); | 117 | DgArchivesDO dgArchivesDO = dgArchivesConverter.addRequest2DO(addDgArchivesRequest); |
| 104 | dgArchivesService.save(dgArchivesDO); | 118 | dgArchivesService.save(dgArchivesDO); |
| 105 | 119 | ||
| ... | @@ -180,7 +194,7 @@ public class DgArchivesReplenishServiceImpl extends ServiceImpl<DgArchivesReplen | ... | @@ -180,7 +194,7 @@ public class DgArchivesReplenishServiceImpl extends ServiceImpl<DgArchivesReplen |
| 180 | DgBusinessDO dgBusinessDO = dgBusinessConverter.updateRequest2DO(updateDgBusinessRequest); | 194 | DgBusinessDO dgBusinessDO = dgBusinessConverter.updateRequest2DO(updateDgBusinessRequest); |
| 181 | QueryWrapper<DgBusinessDO> queryWrapper = new QueryWrapper<>(); | 195 | QueryWrapper<DgBusinessDO> queryWrapper = new QueryWrapper<>(); |
| 182 | queryWrapper.lambda().eq(DgBusinessDO::getBsmArchives, bsmArchives); | 196 | queryWrapper.lambda().eq(DgBusinessDO::getBsmArchives, bsmArchives); |
| 183 | return dgBusinessService.update(dgBusinessDO,queryWrapper); | 197 | return dgBusinessService.update(dgBusinessDO, queryWrapper); |
| 184 | 198 | ||
| 185 | } | 199 | } |
| 186 | 200 | ||
| ... | @@ -197,4 +211,89 @@ public class DgArchivesReplenishServiceImpl extends ServiceImpl<DgArchivesReplen | ... | @@ -197,4 +211,89 @@ public class DgArchivesReplenishServiceImpl extends ServiceImpl<DgArchivesReplen |
| 197 | return dgarchivesreplenishMapper.search(pageParam, request); | 211 | return dgarchivesreplenishMapper.search(pageParam, request); |
| 198 | } | 212 | } |
| 199 | 213 | ||
| 214 | /** | ||
| 215 | * 删除补录信息和对应档案资料 | ||
| 216 | * | ||
| 217 | * @param bsmArchives 档案标识码 | ||
| 218 | * @return | ||
| 219 | */ | ||
| 220 | @Override | ||
| 221 | @Transactional(rollbackFor = Exception.class) | ||
| 222 | public boolean delete(List<String> bsmArchives) throws Exception { | ||
| 223 | //删除补录记录 | ||
| 224 | QueryWrapper<DgArchivesReplenishDO> replenishWrapper = new QueryWrapper<>(); | ||
| 225 | replenishWrapper.lambda().in(DgArchivesReplenishDO::getBsmArchives, bsmArchives); | ||
| 226 | this.remove(replenishWrapper); | ||
| 227 | |||
| 228 | //删除不动产信息 | ||
| 229 | QueryWrapper<DgBdcdyDO> bdcdyWrapper = new QueryWrapper<>(); | ||
| 230 | bdcdyWrapper.lambda().in(DgBdcdyDO::getBsmArchives, bsmArchives); | ||
| 231 | dgBdcdyService.remove(bdcdyWrapper); | ||
| 232 | |||
| 233 | //删除档案业务信息 | ||
| 234 | QueryWrapper<DgBusinessDO> businessWrapper = new QueryWrapper<>(); | ||
| 235 | businessWrapper.lambda().in(DgBusinessDO::getBsmArchives, bsmArchives); | ||
| 236 | dgBusinessService.remove(businessWrapper); | ||
| 237 | |||
| 238 | //删除卷内目录信息 | ||
| 239 | QueryWrapper<DgArchivesCatalogDO> catalogWrapper = new QueryWrapper<>(); | ||
| 240 | catalogWrapper.lambda().in(DgArchivesCatalogDO::getBsmArchives, bsmArchives); | ||
| 241 | List<DgArchivesCatalogDO> catalogList = dgArchivesCatalogService.list(catalogWrapper); | ||
| 242 | // TODO: 2021/11/16/0016 删除卷内目录操作移动到删除附件表之后 | ||
| 243 | |||
| 244 | //删除附件表信息 | ||
| 245 | List<String> bsmCatalogs = new ArrayList<>(); | ||
| 246 | for (DgArchivesCatalogDO dgArchivesCatalogDO : catalogList) { | ||
| 247 | bsmCatalogs.add(dgArchivesCatalogDO.getBsmCatalog()); | ||
| 248 | } | ||
| 249 | QueryWrapper<DgFileDO> fileWrapper = new QueryWrapper<>(); | ||
| 250 | fileWrapper.lambda().select(DgFileDO::getFjurl).in(DgFileDO::getBsmCatalog, bsmCatalogs); | ||
| 251 | //获取文件存储路径 | ||
| 252 | List<DgFileDO> files = dgFileService.list(fileWrapper); | ||
| 253 | QueryWrapper<DgFileDO> deleteWrapper = new QueryWrapper<>(); | ||
| 254 | deleteWrapper.lambda().in(DgFileDO::getBsmCatalog, bsmCatalogs); | ||
| 255 | dgFileService.remove(deleteWrapper); | ||
| 256 | //删除卷内目录.测试环境主外键约束需要先删除附件表再删除卷内目录表.所以代码移动到这里 | ||
| 257 | dgArchivesCatalogService.remove(catalogWrapper); | ||
| 258 | |||
| 259 | |||
| 260 | //删除档案信息表 | ||
| 261 | QueryWrapper<DgArchivesDO> archivesWrapper = new QueryWrapper<>(); | ||
| 262 | archivesWrapper.lambda().in(DgArchivesDO::getBsmArchives, bsmArchives); | ||
| 263 | boolean flag = dgArchivesService.remove(archivesWrapper); | ||
| 264 | |||
| 265 | //删除文件服务器附件 | ||
| 266 | List<String> fileUrls = files.stream().map(DgFileDO::getFjurl).collect(Collectors.toList()); | ||
| 267 | for (String fileUrl : fileUrls) { | ||
| 268 | minioUtil.removeObject(minioConfig.getBucket(), fileUrl); | ||
| 269 | } | ||
| 270 | |||
| 271 | return flag; | ||
| 272 | } | ||
| 273 | |||
| 274 | /** | ||
| 275 | * 补录归档 | ||
| 276 | * 补录记录的状态为已归档和归档日期,一并修改档案记录的状态为在库 | ||
| 277 | * | ||
| 278 | * @param bsmModify 补录标识码 | ||
| 279 | * @param bsmArchive 档案标识码 | ||
| 280 | * @return | ||
| 281 | */ | ||
| 282 | @Override | ||
| 283 | public boolean doReplenishArchive(String bsmModify,String bsmArchive) { | ||
| 284 | //更新补录表归档信息 | ||
| 285 | UpdateWrapper<DgArchivesReplenishDO> replenishUpdateWrapper = new UpdateWrapper<>(); | ||
| 286 | DgArchivesReplenishDO replenishDO = new DgArchivesReplenishDO(); | ||
| 287 | replenishDO.setBsmModify(bsmModify); | ||
| 288 | replenishUpdateWrapper.lambda().set(DgArchivesReplenishDO::getCreateTime, DateUtil.date()).set(DgArchivesReplenishDO::getState, "2").eq(DgArchivesReplenishDO::getBsmModify, bsmModify); | ||
| 289 | this.update(replenishDO,replenishUpdateWrapper); | ||
| 290 | |||
| 291 | //更新档案表状态 | ||
| 292 | UpdateWrapper<DgArchivesDO> archiveUpdateWrapper = new UpdateWrapper<>(); | ||
| 293 | DgArchivesDO archivesDO = new DgArchivesDO(); | ||
| 294 | archivesDO.setBsmArchives(bsmArchive); | ||
| 295 | archiveUpdateWrapper.lambda().set(DgArchivesDO::getDazt, ArchiveStatus.STORED.getCode()).eq(DgArchivesDO::getBsmArchives, bsmArchive); | ||
| 296 | return dgArchivesService.update(archivesDO, archiveUpdateWrapper); | ||
| 297 | } | ||
| 298 | |||
| 200 | } | 299 | } | ... | ... |
-
Please register or sign in to post a comment