档案销毁相关接口优化
Showing
9 changed files
with
91 additions
and
57 deletions
| ... | @@ -41,32 +41,20 @@ public class DgArchivesDestructionController { | ... | @@ -41,32 +41,20 @@ public class DgArchivesDestructionController { |
| 41 | public Result deleteDgArchivesDestructionByIds(@ApiParam("档案销毁ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { | 41 | public Result deleteDgArchivesDestructionByIds(@ApiParam("档案销毁ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { |
| 42 | return dgarchivesdestructionService.deleteDgArchivesDestruction(bsm_destruction); | 42 | return dgarchivesdestructionService.deleteDgArchivesDestruction(bsm_destruction); |
| 43 | } | 43 | } |
| 44 | 44 | @GetMapping("getDgArchivesDestructionDetailById") | |
| 45 | @PostMapping("insertDgArchivesDestruction") | 45 | @ApiOperation(value = "查询档案销毁信息") |
| 46 | @ApiOperation("新增档案销毁") | 46 | public Result getDgArchivesDestructionDetailById(@ApiParam("档案销毁ID") @RequestParam String bsm_destruction) { |
| 47 | public Result insertDgArchivesDestruction(@RequestBody AddDgArchivesDestructionRequest request) { | 47 | return Result.ok(dgarchivesdestructionService.getDgArchivesDestructionDetailById(bsm_destruction)); |
| 48 | return dgarchivesdestructionService.insertDgArchivesDestruction(request); | ||
| 49 | } | 48 | } |
| 50 | @PostMapping("showArchivesForDestruction") | 49 | @PostMapping("showArchivesForDestruction") |
| 51 | @ApiOperation("展示可以选择销毁的列表") | 50 | @ApiOperation("展示可以选择销毁的列表") |
| 52 | public Result showArchivesForDestruction(@RequestBody DgArchivesSearchRequest request) { | 51 | public Result showArchivesForDestruction(@RequestBody DgArchivesSearchRequest request) { |
| 53 | return dgarchivesdestructionService.showArchivesForDestruction(request); | 52 | return dgarchivesdestructionService.showArchivesForDestruction(request); |
| 54 | } | 53 | } |
| 55 | |||
| 56 | @PostMapping("addDestructionArchivesInfo") | 54 | @PostMapping("addDestructionArchivesInfo") |
| 57 | @ApiOperation(value = "选择销毁档案List") | 55 | @ApiOperation(value = "选择销毁档案List") |
| 58 | public Result addDestructionArchivesInfo(@RequestBody List<AddDgDestructionCatalogRequest> archivesList) { | 56 | public Result addDestructionArchivesInfo(@ApiParam("案卷基本信息ID列表") @RequestParam(value = "idList") List<String> idList) { |
| 59 | return dgarchivesdestructionService.addDestructionArchivesInfo(archivesList); | 57 | return dgarchivesdestructionService.addDestructionArchivesInfo(idList); |
| 60 | } | ||
| 61 | @PostMapping("queryArchivesInfo") | ||
| 62 | @ApiOperation(value = "档案列表信息展示") | ||
| 63 | public Result queryArchivesInfo(@ApiParam("档案销毁记录ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { | ||
| 64 | return dgarchivesdestructionService.queryArchivesInfo(bsm_destruction); | ||
| 65 | } | ||
| 66 | @GetMapping("deleteArchivesInfo") | ||
| 67 | @ApiOperation(value = "删除档案列表中的档案信息") | ||
| 68 | public Result deleteArchivesInfo(@ApiParam("档案ID") @RequestParam(value = "bsmArchives") String bsmArchives) { | ||
| 69 | return dgarchivesdestructionService.deleteDestructionArchivescataLog(bsmArchives); | ||
| 70 | } | 58 | } |
| 71 | @PostMapping("updateDgArchivesDestruction") | 59 | @PostMapping("updateDgArchivesDestruction") |
| 72 | @ApiOperation("修改档案销毁记录信息") | 60 | @ApiOperation("修改档案销毁记录信息") |
| ... | @@ -76,10 +64,10 @@ public class DgArchivesDestructionController { | ... | @@ -76,10 +64,10 @@ public class DgArchivesDestructionController { |
| 76 | } | 64 | } |
| 77 | return Result.error("修改失败"); | 65 | return Result.error("修改失败"); |
| 78 | } | 66 | } |
| 79 | @GetMapping("getDgArchivesDestructionDetailById") | 67 | @GetMapping("deleteArchivesInfo") |
| 80 | @ApiOperation(value = "查询档案销毁信息") | 68 | @ApiOperation(value = "删除档案列表中的档案信息") |
| 81 | public Result getDgArchivesDestructionDetailById(@ApiParam("档案销毁ID") @RequestParam String bsm_destruction) { | 69 | public Result deleteArchivesInfo(@ApiParam("档案ID") @RequestParam(value = "bsmArchives") String bsmArchives) { |
| 82 | return Result.ok(dgarchivesdestructionService.getDgArchivesDestructionDetailById(bsm_destruction)); | 70 | return dgarchivesdestructionService.deleteDestructionArchivescataLog(bsmArchives); |
| 83 | } | 71 | } |
| 84 | @GetMapping("getDestructionArchivescataLog") | 72 | @GetMapping("getDestructionArchivescataLog") |
| 85 | @ApiOperation(value = "查询档案销毁目录信息") | 73 | @ApiOperation(value = "查询档案销毁目录信息") |
| ... | @@ -91,17 +79,11 @@ public class DgArchivesDestructionController { | ... | @@ -91,17 +79,11 @@ public class DgArchivesDestructionController { |
| 91 | public Result deleteDestructionArchivescataLog(@ApiParam("档案销毁ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { | 79 | public Result deleteDestructionArchivescataLog(@ApiParam("档案销毁ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { |
| 92 | return dgarchivesdestructionService.deleteDestructionArchivescataLog(bsm_destruction); | 80 | return dgarchivesdestructionService.deleteDestructionArchivescataLog(bsm_destruction); |
| 93 | } | 81 | } |
| 94 | @PostMapping("updateStateByArchives") | ||
| 95 | @ApiOperation(value = "新增档案销毁列表中的档案销毁操作") | ||
| 96 | public Result updateStateByArchives(@ApiParam("档案业务信息ID列表") @RequestParam(value = "idList") List<String> idList) { | ||
| 97 | return dgarchivesdestructionService.updateStateByArchives(idList); | ||
| 98 | } | ||
| 99 | @GetMapping("updateArchivesStateByDestruction") | 82 | @GetMapping("updateArchivesStateByDestruction") |
| 100 | @ApiOperation(value = "编辑中的销毁操作") | 83 | @ApiOperation(value = "销毁操作") |
| 101 | public Result updateArchivesStateByDestruction(@ApiParam("档案销毁记录ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { | 84 | public Result updateArchivesStateByDestruction(@ApiParam("档案销毁记录ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { |
| 102 | return dgarchivesdestructionService.updateArchivesStateByDestruction(bsm_destruction); | 85 | return dgarchivesdestructionService.updateArchivesStateByDestruction(bsm_destruction); |
| 103 | } | 86 | } |
| 104 | |||
| 105 | @GetMapping("getDestroyLeftMenu") | 87 | @GetMapping("getDestroyLeftMenu") |
| 106 | @ApiOperation(value = "根据销毁清册编号获取左侧档案号菜单") | 88 | @ApiOperation(value = "根据销毁清册编号获取左侧档案号菜单") |
| 107 | public Result getDestroyLeftMenu(@ApiParam("销毁清册编号") @RequestParam String xhqcbh) { | 89 | public Result getDestroyLeftMenu(@ApiParam("销毁清册编号") @RequestParam String xhqcbh) { | ... | ... |
| ... | @@ -77,6 +77,10 @@ public class DgArchivesDestructionDO implements Serializable { | ... | @@ -77,6 +77,10 @@ public class DgArchivesDestructionDO implements Serializable { |
| 77 | */ | 77 | */ |
| 78 | @TableField("XHRQ") | 78 | @TableField("XHRQ") |
| 79 | private Date xhrq; | 79 | private Date xhrq; |
| 80 | 80 | /** | |
| 81 | * 状态 1:销毁中,2:已销毁 | ||
| 82 | */ | ||
| 83 | @TableField("STATE") | ||
| 84 | private String state; | ||
| 81 | 85 | ||
| 82 | } | 86 | } | ... | ... |
| ... | @@ -35,4 +35,7 @@ public interface DgArchivesDestructionMapper extends BaseMapper<DgArchivesDestru | ... | @@ -35,4 +35,7 @@ public interface DgArchivesDestructionMapper extends BaseMapper<DgArchivesDestru |
| 35 | List<DgArchivesListVO> queryArchivesInfo(@Param("bsm_destruction") String bsm_destruction); | 35 | List<DgArchivesListVO> queryArchivesInfo(@Param("bsm_destruction") String bsm_destruction); |
| 36 | 36 | ||
| 37 | boolean updateArchivesStatusBatch(@Param("idList") List<String> idList,@Param("dazt") String dazt); | 37 | boolean updateArchivesStatusBatch(@Param("idList") List<String> idList,@Param("dazt") String dazt); |
| 38 | |||
| 39 | boolean updateDestructionArchivesStatus(@Param("bsm_destruction") String bsm_destruction,@Param("dazt") String dazt); | ||
| 40 | |||
| 38 | } | 41 | } | ... | ... |
| ... | @@ -49,10 +49,10 @@ public interface DgArchivesDestructionService extends IService<DgArchivesDestruc | ... | @@ -49,10 +49,10 @@ public interface DgArchivesDestructionService extends IService<DgArchivesDestruc |
| 49 | Result deleteDestructionArchivescataLog(String bsmArchives); | 49 | Result deleteDestructionArchivescataLog(String bsmArchives); |
| 50 | /** | 50 | /** |
| 51 | * 选择销毁档案List | 51 | * 选择销毁档案List |
| 52 | * @param archivesList | 52 | * @param idList |
| 53 | * @return | 53 | * @return |
| 54 | */ | 54 | */ |
| 55 | Result addDestructionArchivesInfo(List<AddDgDestructionCatalogRequest> archivesList); | 55 | Result addDestructionArchivesInfo(List<String> idList); |
| 56 | /** | 56 | /** |
| 57 | * 销毁接口 | 57 | * 销毁接口 |
| 58 | * @param bsm_destruction | 58 | * @param bsm_destruction | ... | ... |
| 1 | package com.pashanhoo.destroy.service.impl; | 1 | package com.pashanhoo.destroy.service.impl; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.date.DateUtil; | ||
| 3 | import com.baomidou.mybatisplus.core.toolkit.IdWorker; | 4 | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| 4 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 5 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 5 | import com.github.pagehelper.PageHelper; | 6 | import com.github.pagehelper.PageHelper; |
| 6 | import com.github.pagehelper.PageInfo; | 7 | import com.github.pagehelper.PageInfo; |
| 8 | import com.pashanhoo.archive.entity.DgArchivesDO; | ||
| 7 | import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest; | 9 | import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest; |
| 8 | import com.pashanhoo.archive.service.DgArchivesService; | 10 | import com.pashanhoo.archive.service.DgArchivesService; |
| 9 | import com.pashanhoo.common.Result; | 11 | import com.pashanhoo.common.Result; |
| 12 | import com.pashanhoo.common.util.SysCode.SysCodeUtil; | ||
| 13 | import com.pashanhoo.common.util.SysCode.SysCodeVO; | ||
| 10 | import com.pashanhoo.destroy.entity.DgArchivesDestructionConverter; | 14 | import com.pashanhoo.destroy.entity.DgArchivesDestructionConverter; |
| 11 | import com.pashanhoo.destroy.entity.DgArchivesDestructionDO; | 15 | import com.pashanhoo.destroy.entity.DgArchivesDestructionDO; |
| 12 | import com.pashanhoo.destroy.entity.vo.*; | 16 | import com.pashanhoo.destroy.entity.vo.*; |
| 13 | import com.pashanhoo.archive.entity.DgArchivesDO; | ||
| 14 | import com.pashanhoo.destroy.entity.vo.AddDgArchivesDestructionRequest; | ||
| 15 | import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionDetailVO; | ||
| 16 | import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionSearchRequest; | ||
| 17 | import com.pashanhoo.destroy.entity.vo.UpdateDgArchivesDestructionRequest; | ||
| 18 | import com.pashanhoo.destroy.mapper.DgArchivesDestructionMapper; | 17 | import com.pashanhoo.destroy.mapper.DgArchivesDestructionMapper; |
| 19 | import com.pashanhoo.destroy.service.DgArchivesDestructionService; | 18 | import com.pashanhoo.destroy.service.DgArchivesDestructionService; |
| 20 | import com.pashanhoo.destroycatalog.entity.DgDestructionCatalogConverter; | 19 | import com.pashanhoo.destroycatalog.entity.DgDestructionCatalogConverter; |
| 21 | import com.pashanhoo.destroycatalog.entity.DgDestructionCatalogDO; | ||
| 22 | import com.pashanhoo.destroycatalog.entity.vo.AddDgDestructionCatalogRequest; | ||
| 23 | import com.pashanhoo.destroycatalog.service.DgDestructionCatalogService; | 20 | import com.pashanhoo.destroycatalog.service.DgDestructionCatalogService; |
| 21 | import com.pashanhoo.lend.mapper.DgLendMapper; | ||
| 24 | import org.springframework.beans.factory.annotation.Autowired; | 22 | import org.springframework.beans.factory.annotation.Autowired; |
| 25 | import org.springframework.stereotype.Service; | 23 | import org.springframework.stereotype.Service; |
| 26 | import org.springframework.transaction.annotation.Transactional; | 24 | import org.springframework.transaction.annotation.Transactional; |
| 27 | 25 | ||
| 28 | import java.math.BigDecimal; | ||
| 29 | import java.util.List; | 26 | import java.util.List; |
| 30 | 27 | ||
| 31 | /** | 28 | /** |
| ... | @@ -51,6 +48,10 @@ public class DgArchivesDestructionServiceImpl extends ServiceImpl<DgArchivesDest | ... | @@ -51,6 +48,10 @@ public class DgArchivesDestructionServiceImpl extends ServiceImpl<DgArchivesDest |
| 51 | private DgDestructionCatalogConverter catalogConverter; | 48 | private DgDestructionCatalogConverter catalogConverter; |
| 52 | @Autowired | 49 | @Autowired |
| 53 | private DgArchivesService archivesService; | 50 | private DgArchivesService archivesService; |
| 51 | @Autowired | ||
| 52 | SysCodeUtil sysCodeUtil; | ||
| 53 | @Autowired | ||
| 54 | private DgLendMapper dglendMapper; | ||
| 54 | 55 | ||
| 55 | 56 | ||
| 56 | /** | 57 | /** |
| ... | @@ -133,21 +134,43 @@ public class DgArchivesDestructionServiceImpl extends ServiceImpl<DgArchivesDest | ... | @@ -133,21 +134,43 @@ public class DgArchivesDestructionServiceImpl extends ServiceImpl<DgArchivesDest |
| 133 | } | 134 | } |
| 134 | 135 | ||
| 135 | @Override | 136 | @Override |
| 136 | public Result addDestructionArchivesInfo(List<AddDgDestructionCatalogRequest> archivesList) { | 137 | @Transactional(rollbackFor = Exception.class) |
| 137 | List<DgDestructionCatalogDO> list=catalogConverter.addRequestList2DO(archivesList); | 138 | public Result addDestructionArchivesInfo(List<String> idList) { |
| 138 | catalogService.saveBatch(list); | 139 | //获取补录编号 |
| 140 | SysCodeVO sysCodeVO = new SysCodeVO(); | ||
| 141 | sysCodeVO.setTaskno("XH" + DateUtil.year(DateUtil.date())); | ||
| 142 | sysCodeVO.setCtype("sequence"); | ||
| 143 | sysCodeVO.setTaskname("补录序列号"); | ||
| 144 | sysCodeVO.setTaskchild(5); | ||
| 145 | String xhbh = sysCodeUtil.getSequence(sysCodeVO); | ||
| 146 | //1.新增销毁案卷信息表数据 | ||
| 147 | String archivesUuid=IdWorker.get32UUID(); | ||
| 148 | DgArchivesDestructionDO destructionDO=new DgArchivesDestructionDO(); | ||
| 149 | destructionDO.setBsmDestruction(archivesUuid); | ||
| 150 | destructionDO.setXhqcbh(xhbh); | ||
| 151 | destructionDO.setFqr("admin"); | ||
| 152 | destructionDO.setShyj("同意"); | ||
| 153 | destructionDO.setState("1"); | ||
| 154 | dgarchivesdestructionMapper.insert(destructionDO); | ||
| 155 | //2.新增销毁目录信息表 | ||
| 156 | catalogService.saveBatchDestructionCatalog(idList,archivesUuid); | ||
| 157 | //3.档案信息修改状态为修改中 | ||
| 158 | dglendMapper.updateArchivesStatusBatch(idList,"5"); | ||
| 139 | return Result.ok(); | 159 | return Result.ok(); |
| 140 | } | 160 | } |
| 141 | 161 | ||
| 142 | @Override | 162 | @Override |
| 143 | public Result updateArchivesStateByDestruction(String bsm_destruction) { | 163 | public Result updateArchivesStateByDestruction(String bsm_destruction) { |
| 144 | //修改档案信息表状态 | 164 | //1.修改档案信息表状态 |
| 145 | dgarchivesdestructionMapper.updateArchivesStatus(bsm_destruction,"6"); | 165 | dgarchivesdestructionMapper.updateArchivesStatus(bsm_destruction,"6"); |
| 166 | //2.修改档案销毁信息表中的状态 | ||
| 167 | dgarchivesdestructionMapper.updateDestructionArchivesStatus(bsm_destruction,"2"); | ||
| 146 | return Result.ok(); | 168 | return Result.ok(); |
| 147 | } | 169 | } |
| 148 | 170 | ||
| 149 | @Override | 171 | @Override |
| 150 | public Result updateStateByArchives(List<String> idList) { | 172 | public Result updateStateByArchives(List<String> idList) { |
| 173 | //1.修改档案基本信息表中的状态 | ||
| 151 | dgarchivesdestructionMapper.updateArchivesStatusBatch(idList,"6"); | 174 | dgarchivesdestructionMapper.updateArchivesStatusBatch(idList,"6"); |
| 152 | return Result.ok(); | 175 | return Result.ok(); |
| 153 | } | 176 | } | ... | ... |
| ... | @@ -23,18 +23,19 @@ import java.util.List; | ... | @@ -23,18 +23,19 @@ import java.util.List; |
| 23 | */ | 23 | */ |
| 24 | @RestController | 24 | @RestController |
| 25 | @RequestMapping("/system/dgDestructionCatalog/") | 25 | @RequestMapping("/system/dgDestructionCatalog/") |
| 26 | @Api(tags = "档案销毁目录接口") | ||
| 27 | public class DgDestructionCatalogController { | 26 | public class DgDestructionCatalogController { |
| 28 | @Autowired | 27 | @Autowired |
| 29 | private DgDestructionCatalogService dgdestructioncatalogService; | 28 | private DgDestructionCatalogService dgdestructioncatalogService; |
| 30 | 29 | ||
| 31 | @PostMapping("insertDgDestructionCatalog") | 30 | @PostMapping("saveBatchDestructionCatalog") |
| 32 | @ApiOperation("新增档案销毁目录") | 31 | @ApiOperation("新增档案销毁目录") |
| 33 | public Result insertDgDestructionCatalog(@RequestBody AddDgDestructionCatalogRequest request){ | 32 | public Result saveBatchDestructionCatalog(@ApiParam("档案销毁目录ID列表") @RequestParam(value = "idList") List<String> idList,@ApiParam("档案销毁信息ID") String bsm_destruction){ |
| 34 | if(dgdestructioncatalogService.insertDgDestructionCatalog(request)){ | 33 | boolean flag=dgdestructioncatalogService.saveBatchDestructionCatalog(idList,bsm_destruction); |
| 35 | return Result.ok(); | 34 | if(flag){ |
| 35 | return Result.ok("批量新增目录成功"); | ||
| 36 | }else{ | ||
| 37 | return Result.error("批量新增目录失败"); | ||
| 36 | } | 38 | } |
| 37 | return Result.error("新增失败"); | ||
| 38 | } | 39 | } |
| 39 | 40 | ||
| 40 | @DeleteMapping("deleteDgDestructionCatalogByIds") | 41 | @DeleteMapping("deleteDgDestructionCatalogByIds") | ... | ... |
| ... | @@ -8,6 +8,9 @@ import com.pashanhoo.destroycatalog.entity.vo.DgDestructionCatalogDetailVO; | ... | @@ -8,6 +8,9 @@ import com.pashanhoo.destroycatalog.entity.vo.DgDestructionCatalogDetailVO; |
| 8 | import com.pashanhoo.destroycatalog.entity.vo.UpdateDgDestructionCatalogRequest; | 8 | import com.pashanhoo.destroycatalog.entity.vo.UpdateDgDestructionCatalogRequest; |
| 9 | import com.pashanhoo.destroycatalog.entity.vo.DgDestructionCatalogSearchRequest; | 9 | import com.pashanhoo.destroycatalog.entity.vo.DgDestructionCatalogSearchRequest; |
| 10 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 10 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 11 | import io.swagger.annotations.ApiParam; | ||
| 12 | |||
| 13 | import java.util.List; | ||
| 11 | 14 | ||
| 12 | /** | 15 | /** |
| 13 | * <p> | 16 | * <p> |
| ... | @@ -19,11 +22,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ... | @@ -19,11 +22,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 19 | */ | 22 | */ |
| 20 | public interface DgDestructionCatalogService extends IService<DgDestructionCatalogDO> { | 23 | public interface DgDestructionCatalogService extends IService<DgDestructionCatalogDO> { |
| 21 | /** | 24 | /** |
| 22 | * 新增记录 | 25 | * 批量销毁目录新增记录 |
| 23 | * @param request | 26 | * @param idList,bsm_destruction |
| 24 | * @return | 27 | * @return |
| 25 | */ | 28 | */ |
| 26 | boolean insertDgDestructionCatalog(AddDgDestructionCatalogRequest request); | 29 | boolean saveBatchDestructionCatalog(List<String> idList,String bsm_destruction); |
| 27 | 30 | ||
| 28 | /** | 31 | /** |
| 29 | * 根据主键查询记录详情 | 32 | * 根据主键查询记录详情 | ... | ... |
| 1 | package com.pashanhoo.destroycatalog.service.impl; | 1 | package com.pashanhoo.destroycatalog.service.impl; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.core.toolkit.IdWorker; | ||
| 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 4 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | import com.pashanhoo.common.Result; | 5 | import com.pashanhoo.common.Result; |
| 5 | import com.pashanhoo.destroycatalog.entity.DgDestructionCatalogConverter; | 6 | import com.pashanhoo.destroycatalog.entity.DgDestructionCatalogConverter; |
| ... | @@ -16,6 +17,9 @@ import org.springframework.stereotype.Service; | ... | @@ -16,6 +17,9 @@ import org.springframework.stereotype.Service; |
| 16 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 17 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 17 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 18 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| 18 | 19 | ||
| 20 | import java.util.ArrayList; | ||
| 21 | import java.util.List; | ||
| 22 | |||
| 19 | /** | 23 | /** |
| 20 | * <p> | 24 | * <p> |
| 21 | * 档案销毁目录 服务实现类 | 25 | * 档案销毁目录 服务实现类 |
| ... | @@ -35,13 +39,22 @@ public class DgDestructionCatalogServiceImpl extends ServiceImpl<DgDestructionCa | ... | @@ -35,13 +39,22 @@ public class DgDestructionCatalogServiceImpl extends ServiceImpl<DgDestructionCa |
| 35 | 39 | ||
| 36 | /** | 40 | /** |
| 37 | * 新增记录 | 41 | * 新增记录 |
| 38 | * @param request | 42 | * @param idList,bsm_destruction |
| 39 | * @return | 43 | * @return |
| 40 | */ | 44 | */ |
| 41 | @Override | 45 | @Override |
| 42 | public boolean insertDgDestructionCatalog(AddDgDestructionCatalogRequest request) { | 46 | public boolean saveBatchDestructionCatalog(List<String> idList, String bsm_destruction) { |
| 43 | DgDestructionCatalogDO dgdestructioncatalogDO = dgdestructioncatalogConverter.addRequest2DO(request); | 47 | List<DgDestructionCatalogDO> list=new ArrayList<DgDestructionCatalogDO>(); |
| 44 | return this.save(dgdestructioncatalogDO); | 48 | DgDestructionCatalogDO catalogDO=null; |
| 49 | for (int i = 0; i < idList.size(); i++) { | ||
| 50 | catalogDO=new DgDestructionCatalogDO(); | ||
| 51 | catalogDO.setBsmDestructioncatalog(IdWorker.get32UUID()); | ||
| 52 | catalogDO.setBsmDestruction(bsm_destruction); | ||
| 53 | catalogDO.setBsmArchives(idList.get(i)); | ||
| 54 | list.add(catalogDO); | ||
| 55 | } | ||
| 56 | |||
| 57 | return this.saveBatch(list); | ||
| 45 | } | 58 | } |
| 46 | 59 | ||
| 47 | /** | 60 | /** | ... | ... |
| ... | @@ -80,6 +80,11 @@ | ... | @@ -80,6 +80,11 @@ |
| 80 | #{item,jdbcType=VARCHAR} | 80 | #{item,jdbcType=VARCHAR} |
| 81 | </foreach> | 81 | </foreach> |
| 82 | </update> | 82 | </update> |
| 83 | <update id="updateDestructionArchivesStatus"> | ||
| 84 | update DG_DESTRUCTION b | ||
| 85 | set b.dazt = #{dazt,jdbcType=VARCHAR} | ||
| 86 | where bsm_destruction=#{bsm_destruction,jdbcType=VARCHAR} | ||
| 87 | </update> | ||
| 83 | <select id="selectXhResult" resultMap="ShowDestructionResultMap"> | 88 | <select id="selectXhResult" resultMap="ShowDestructionResultMap"> |
| 84 | select a.BSM_DESTRUCTION, | 89 | select a.BSM_DESTRUCTION, |
| 85 | a.XHQCBH, | 90 | a.XHQCBH, | ... | ... |
-
Please register or sign in to post a comment