package com.rongwei.bsserver.controller; import com.rongwei.bscommon.sys.service.ZhcxItpTemplateNodesService; import com.rongwei.bsentity.dto.node.ExportNodeRequest; import com.rongwei.bsentity.dto.node.ImportNodeRequest; import com.rongwei.bsentity.vo.CopyNodeVo; import com.rongwei.rwcommon.base.R; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; /** *

* itp地图模板检验点 前端控制器 *

* * @author fpy * @since 2023-11-21 */ @RestController @RequestMapping("/zhcxItpTemplateNodes") @Api(tags = "itp地图模板检验点") public class ZhcxItpTemplateNodesController { @Autowired private ZhcxItpTemplateNodesService zhcxItpTemplateNodesService; @ApiOperation("复制ITP地图模板节点") @PostMapping("/copyItpTemplateNode") public R copyItpTemplateNode(@RequestBody CopyNodeVo copyNodeVo){ List> maps = zhcxItpTemplateNodesService.copyItpTemplateNode(copyNodeVo); return R.ok(maps); } @PostMapping("excelImport") @ApiOperation("excel导入") public R excelImport(ImportNodeRequest req, MultipartFile file) { zhcxItpTemplateNodesService.importQcp(req, file); return R.ok("导入成功"); } @PostMapping("excelExport") @ApiOperation("excel导出") public void excelExport(@RequestBody ExportNodeRequest req, HttpServletResponse res) { zhcxItpTemplateNodesService.exportQcp(req, res); } @PostMapping("templateExcelImport") //TEMPLATE @ApiOperation("核心检验指标模板excel导入") public R templateExcelImport(MultipartFile file) { zhcxItpTemplateNodesService.templateExcelImport(file); return R.ok("导入成功"); } }