package jnpf.elnController; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jnpf.base.ActionResult; import jnpf.elnEntity.ElnMubanFileVo; import jnpf.elnService.ElnDianziJiluMubanService; import lombok.RequiredArgsConstructor; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @Tag(name = "ELN电子记录模板") @RestController @RequestMapping("/dianzi_jilu_muban") @RequiredArgsConstructor public class ElnDianziJiluMubanController { private final ElnDianziJiluMubanService mubanService; @Operation(summary = "按检验项目查询模板文件") @GetMapping("/file") public ActionResult file( @RequestParam(value = "jianyan_xiangmu", required = false) String jianyanXiangmu) { if (!StringUtils.hasText(jianyanXiangmu)) { return ActionResult.fail("检验项目不能为空"); } return ActionResult.success(mubanService.getFile(jianyanXiangmu.trim())); } }