package com.pashanhoo.destroy.controller; import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest; import com.pashanhoo.common.Result; import com.pashanhoo.destroy.entity.vo.AddDgArchivesDestructionRequest; import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionSearchRequest; import com.pashanhoo.destroy.entity.vo.UpdateDgArchivesDestructionRequest; import com.pashanhoo.destroy.service.DgArchivesDestructionService; import com.pashanhoo.destroycatalog.entity.vo.AddDgDestructionCatalogRequest; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; import java.util.List; /** * <p> * 档案销毁 前端控制器 * </p> * * @author * @since 2021-11-05 */ @RestController @RequestMapping("/system/dgArchivesDestruction/") @Api(tags = "档案销毁接口") public class DgArchivesDestructionController { @Autowired private DgArchivesDestructionService dgarchivesdestructionService; @PostMapping("search") @ApiOperation(value = "根据条件进行列表查询") public Result searchDgArchivesDestructionList(@RequestBody DgArchivesDestructionSearchRequest request) { return dgarchivesdestructionService.searchDgArchivesDestructionList(request); } @GetMapping("deleteDgArchivesDestructionByIds") @ApiOperation(value = "根据销毁记录标识码删除档案销毁记录") public Result deleteDgArchivesDestructionByIds(@ApiParam("档案销毁ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { return dgarchivesdestructionService.deleteDgArchivesDestruction(bsm_destruction); } @PostMapping("insertDgArchivesDestruction") @ApiOperation("新增档案销毁") public Result insertDgArchivesDestruction(@RequestBody AddDgArchivesDestructionRequest request) { return dgarchivesdestructionService.insertDgArchivesDestruction(request); } @PostMapping("showArchivesForDestruction") @ApiOperation("展示可以选择销毁的列表") public Result showArchivesForDestruction(@RequestBody DgArchivesSearchRequest request) { return dgarchivesdestructionService.showArchivesForDestruction(request); } @PostMapping("addDestructionArchivesInfo") @ApiOperation(value = "选择销毁档案List") public Result addDestructionArchivesInfo(@RequestBody List<AddDgDestructionCatalogRequest> archivesList) { return dgarchivesdestructionService.addDestructionArchivesInfo(archivesList); } @PostMapping("queryArchivesInfo") @ApiOperation(value = "档案列表信息展示") public Result queryArchivesInfo(@ApiParam("档案销毁记录ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { return dgarchivesdestructionService.queryArchivesInfo(bsm_destruction); } @GetMapping("deleteArchivesInfo") @ApiOperation(value = "删除档案列表中的档案信息") public Result deleteArchivesInfo(@ApiParam("档案ID") @RequestParam(value = "bsmArchives") String bsmArchives) { return dgarchivesdestructionService.deleteDestructionArchivescataLog(bsmArchives); } @PostMapping("updateDgArchivesDestruction") @ApiOperation("修改档案销毁记录信息") public Result updateDgArchivesDestruction(@RequestBody UpdateDgArchivesDestructionRequest request) { if (dgarchivesdestructionService.updateDgArchivesDestruction(request)) { return Result.ok("修改成功"); } return Result.error("修改失败"); } @GetMapping("getDgArchivesDestructionDetailById") @ApiOperation(value = "查询档案销毁信息") public Result getDgArchivesDestructionDetailById(@ApiParam("档案销毁ID") @RequestParam String bsm_destruction) { return Result.ok(dgarchivesdestructionService.getDgArchivesDestructionDetailById(bsm_destruction)); } @GetMapping("getDestructionArchivescataLog") @ApiOperation(value = "查询档案销毁目录信息") public Result getDestructionArchivescataLog(@ApiParam("档案销毁ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { return dgarchivesdestructionService.queryArchivesInfo(bsm_destruction); } @GetMapping("deleteDestructionArchivescataLog") @ApiOperation(value = "删除档案销毁目录信息") public Result deleteDestructionArchivescataLog(@ApiParam("档案销毁ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { return dgarchivesdestructionService.deleteDestructionArchivescataLog(bsm_destruction); } @PostMapping("updateStateByArchives") @ApiOperation(value = "新增档案销毁列表中的档案销毁操作") public Result updateStateByArchives(@ApiParam("档案业务信息ID列表") @RequestParam(value = "idList") List<String> idList) { return dgarchivesdestructionService.updateStateByArchives(idList); } @GetMapping("updateArchivesStateByDestruction") @ApiOperation(value = "编辑中的销毁操作") public Result updateArchivesStateByDestruction(@ApiParam("档案销毁记录ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) { return dgarchivesdestructionService.updateArchivesStateByDestruction(bsm_destruction); } @GetMapping("getDestroyLeftMenu") @ApiOperation(value = "根据销毁清册编号获取左侧档案号菜单") public Result getDestroyLeftMenu(@ApiParam("销毁清册编号") @RequestParam String xhqcbh) { return Result.ok(dgarchivesdestructionService.getDestroyLeftMenu(xhqcbh)); } }