package cn.cslg.pas.controller; import cn.cslg.pas.common.core.base.Constants; import cn.cslg.pas.common.dto.QuerySplitDTO; import cn.cslg.pas.common.model.cronModel.Records; import cn.cslg.pas.common.utils.Response; import cn.cslg.pas.common.vo.business.SplitVO; import cn.cslg.pas.service.business.FeatureService; import io.swagger.v3.oas.annotations.Operation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** * 特征Controller层 * * @Author lrj * @Date 2023/12/5 */ @Slf4j @RequestMapping(Constants.API_XiaoSHI + "/feature") @RestController public class FeatureController { @Autowired private FeatureService featureService; @Operation(summary = "查询特征") @PostMapping("/spiltFeature") public Response spiltFeature(@RequestBody SplitVO splitVO) throws Exception { try { Records records = new Records(); records.setData(featureService.splitPatentFeature(splitVO)); return Response.success(records); } catch (Exception e) { return Response.error(e.getMessage()); } } @Operation(summary = "查询拆分信息") @PostMapping("/getSplitMessage") public Response getSplitMessage(@RequestBody QuerySplitDTO splitDTO) throws Exception { try { Records records = new Records(); records.setData(featureService.getSplitMessage(splitDTO)); return Response.success(records); } catch (Exception e) { return Response.error(e.getMessage()); } } @Operation(summary = "查询权要") @GetMapping("/getPatentRight") public Response queryCustomField(String patentNo) throws Exception { try { Records records = new Records(); records.setData(featureService.getPatentRight(patentNo)); return Response.success(records); } catch (Exception e) { return Response.error(e.getMessage()); } } }