InsOrdersUnderwriting.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. package com.ydtech.modules.order.controller;
  2. import com.ydtech.core.page.HttpResult;
  3. import com.ydtech.modules.order.entity.InsAreaCompany;
  4. import com.ydtech.modules.order.service.InsAreaCompanyService;
  5. import com.ydtech.modules.order.service.impl.InsOrdersUnderwritingReasonServiceImpl;
  6. import io.swagger.annotations.Api;
  7. import io.swagger.annotations.ApiOperation;
  8. import lombok.RequiredArgsConstructor;
  9. import org.springframework.web.bind.annotation.GetMapping;
  10. import org.springframework.web.bind.annotation.PathVariable;
  11. import org.springframework.web.bind.annotation.RequestMapping;
  12. import org.springframework.web.bind.annotation.RestController;
  13. @Api(tags = "核保数据")
  14. @RequestMapping("/insurance/underwriting")
  15. @RestController
  16. @RequiredArgsConstructor
  17. public class InsOrdersUnderwriting {
  18. private final InsOrdersUnderwritingReasonServiceImpl insOrdersUnderwritingReasonService;
  19. private final InsAreaCompanyService insAreaCompanyService;
  20. @GetMapping("/cause/{subNoOrder}")
  21. @ApiOperation("获取核保原因")
  22. public HttpResult<String> cause(@PathVariable String subNoOrder) {
  23. InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subNoOrder);
  24. String insOrdersUnderwritingReason = insOrdersUnderwritingReasonService.getInsOrdersUnderwritingReason(subNoOrder, insAreaCompany.getOrderstatus());
  25. return HttpResult.ok(insOrdersUnderwritingReason);
  26. }
  27. }